Vehicle debugging function control method and device and electronic equipment

By introducing a multi-factor verification mechanism in the vehicle system, using the server's online private key signature and the vehicle's public key verification, the problem of difficult security of the vehicle debugging function is solved, and higher security and identity verification reliability are achieved.

CN120200780APending Publication Date: 2025-06-24GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510238879.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The prior art is difficult to effectively protect the safety of vehicle debugging functions and prevent unauthorized users from opening the debugging functions of the vehicle system, resulting in safety risks and information leakage of the vehicle system.

Method used

When the identity of the debugging device has been verified by multiple times, online private key signature is performed based on the server and public key verification is performed based on the vehicle, to determine whether the debugging function of the vehicle is turned on. The specific steps include: obtaining vehicle information and random numbers, verifying the identity certificate and public key of the debugging device, signing based on the private key and sending the signature to the vehicle for signature verification. If the signature verification is passed, the debugging function will be turned on.

Benefits of technology

It improves the user identity reliability of turning on the vehicle debugging function, prevents key leakage, enhances the security of turning on the debugging function, and ensures the security of the vehicle system and information protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120200780A_ABST
    Figure CN120200780A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle debugging function control method and device and electronic equipment. The method comprises the steps that a vehicle in communication connection with debugging equipment is acquired to verify the debugging equipment, and vehicle information and a first random number which are sent to the debugging equipment after verification are passed; acquiring an identity certificate and a first public key sent by the debugging equipment; if it is determined that the identity certificate is qualified and a first private key corresponding to the first public key exists in the debugging equipment, determining a first signature according to a second private key, the vehicle information and the first random number; and the first signature is sent to the debugging equipment, so that the debugging equipment forwards the first signature to the vehicle, the first signature is verified by the vehicle according to a second public key corresponding to the second private key, and the debugging function of the vehicle is opened under the condition that the verification is passed, so that the safety of opening the debugging function of the vehicle is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle control, and more particularly, to a control method, device, and electronic device for vehicle debugging functions. Background Art

[0002] With the development of automotive electronic control technology, to protect the safety of vehicle systems and reduce safety issues caused by vehicle system debugging, the debugging function of vehicle systems is usually turned off during mass production of vehicles. However, in the case of vehicle anomalies or when the vehicle needs maintenance and repair, the debugging function of the vehicle system needs to be turned on. Illegally turning on the debugging function of the vehicle system may give unauthorized users high permissions to operate the vehicle system, leading to problems such as endangering the vehicle system and leaking vehicle-related information. Therefore, in related technologies, there is a challenge in protecting the activation of the vehicle's debugging function and preventing unauthorized users from turning it on and using it. Summary of the Invention

[0003] In view of this, embodiments of the present application propose a control method, device, and electronic device for vehicle debugging functions to improve the above problems.

[0004] In a first aspect, an embodiment of the present application provides a control method for a vehicle debugging function. The method includes: obtaining vehicle information and a first random number sent by a debugging device, where the vehicle information and the first random number are sent to the debugging device by a vehicle communicatively connected to the debugging device after verifying the debugging device; obtaining an identity certificate and a first public key sent by the debugging device; if it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device, then determining a first signature according to a second private key, the vehicle information, and the first random number; sending the first signature to the debugging device so that the debugging device forwards the first signature to the vehicle, and the first signature is used by the vehicle to verify according to a second public key corresponding to the second private key, and the debugging function of the vehicle is turned on when the verification passes.

[0005] Second aspect, an embodiment of the present application provides a control method for a vehicle debugging function. The method includes: after the vehicle verifies a debugging device communicatively connected to the vehicle and passes the verification, sending the vehicle information of the vehicle and a first random number to the debugging device; receiving a first signature sent by the debugging device, where the first signature is determined by the server according to a second private key, the identity certificate sent by the debugging device, and the first public key after the server obtains the identity certificate and the first public key sent by the debugging device, determines that the identity certificate is qualified, and there is a first private key corresponding to the first public key in the debugging device; if the first signature is verified to be passed according to a second public key corresponding to the second private key, the debugging function of the vehicle is turned on.

[0006] Third aspect, an embodiment of the present application provides a control method for a vehicle debugging function. The method includes: the debugging device obtains the vehicle information and a first random number sent by the vehicle, and sends the vehicle information and the first random number to the server, where the vehicle information and the first random number are sent to the debugging device by the vehicle communicatively connected to the debugging device after verifying the debugging device and passing the verification; sending the identity certificate and the first public key of the debugging device to the server; obtaining a first signature sent by the server, where the first signature is determined by the server according to the second private key, the vehicle information, and the first random number after determining that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device; sending the first signature to the vehicle so that the vehicle verifies the first signature according to a second public key corresponding to the second private key and turns on the debugging function of the vehicle when the verification passes.

[0007] Fourth aspect, an embodiment of the present application provides a control device for a vehicle debugging function. The device includes: a vehicle information acquisition module, an identity certificate acquisition module, a first signature determination module, and a first signature sending module. Among them, the vehicle information acquisition module is used to acquire vehicle information and a first random number sent by a debugging device, where the vehicle information and the first random number are sent to the debugging device by a vehicle that is communicatively connected to the debugging device after verifying the debugging device and passing the verification; the identity certificate acquisition module is used to acquire the identity certificate and a first public key sent by the debugging device; the first signature determination module is used to determine a first signature according to a second private key, the vehicle information, and the first random number if it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device; the first signature sending module is used to send the first signature to the debugging device so that the debugging device forwards the first signature to the vehicle, and the first signature is used by the vehicle to verify according to a second public key corresponding to the second private key, and the debugging function of the vehicle is opened when the verification passes.

[0008] Fifth aspect, an embodiment of the present application provides a control device for a vehicle debugging function. The device includes: a vehicle information sending module, a first signature receiving module, and a debugging function opening module. Among them, the vehicle information sending module is used to send the vehicle information and a first random number of the vehicle to the debugging device after the vehicle verifies the debugging device communicatively connected to the vehicle and passes the verification; the first signature receiving module is used to receive the first signature sent by the debugging device, where the first signature is determined by a server according to a second private key, the identity certificate sent by the debugging device, and the first public key when it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device; the debugging function opening module is used to open the debugging function of the vehicle if the first signature is verified to pass according to a second public key corresponding to the second private key.

[0009] Sixth aspect, an embodiment of the present application provides a control device for a vehicle debugging function. The device includes: a vehicle information forwarding module, an identity certificate sending module, a first signature obtaining module, and a first signature forwarding module. Among them, the vehicle information forwarding module is configured to obtain vehicle information and a first random number sent by a vehicle by a debugging device, and send the vehicle information and the first random number to a server, where the vehicle information and the first random number are sent to the debugging device after a vehicle communicatively connected to the debugging device verifies the debugging device and passes the verification; the identity certificate sending module is configured to send the identity certificate and a first public key of the debugging device to the server; the first signature obtaining module is configured to obtain a first signature sent by the server, where the first signature is determined by the server according to a second private key, the vehicle information, and the first random number when it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device; the first signature forwarding module is configured to send the first signature to the vehicle so that the vehicle verifies the first signature according to a second public key corresponding to the second private key and turns on the vehicle debugging function when the verification passes.

[0010] Seventh aspect, an embodiment of the present application provides an electronic device, including a memory and a processor. The memory is coupled to the processor, and the memory stores instructions. When the instructions are executed by the processor, the processor executes the control methods for the vehicle debugging function provided in the first aspect, the second aspect, and the third aspect above.

[0011] Eighth aspect, an embodiment of the present application provides a computer-readable storage medium. Program code is stored in the computer-readable storage medium, and the program code can be called by a processor to execute the control methods for the vehicle debugging function provided in the first aspect, the second aspect, and the third aspect above.

[0012] In the solution of the present application, the server obtains the vehicle information and the first random number sent by the debugging device that is authenticated by the vehicle, and when it is determined that the identity certificate sent by the debugging device is qualified and there is a first private key corresponding to the first public key sent by the debugging device in the debugging device, the server determines the first signature according to the second private key, the vehicle information, and the first random number. Thus, when the debugging device passes the identity authentication of the server, the vehicle information and the first random number are signed with the second private key to obtain the first signature, and the first signature is sent to the debugging device, so that the debugging device forwards the first signature to the vehicle. The first signature is used by the vehicle to perform verification according to the second public key corresponding to the second private key, and when the verification passes, the debugging function of the vehicle is turned on. Therefore, by signing based on the second private key stored in the server and verifying the signature with the second public key related to the first private key stored in the vehicle, the immunity to key leakage is improved, and when the signature verification passes, the debugging function of the vehicle is turned on. Moreover, both the vehicle and the server verify the debugging device during the process of the debugging device obtaining the signature. Therefore, the reliability of the user who turns on the debugging function of the vehicle can be improved, illegal access can be better prevented, and the security of the vehicle system debugging function can be enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0014] Figure 1 FIG. shows a schematic diagram of an application environment provided by an embodiment of the present application;

[0015] Figure 2 FIG. shows a schematic flowchart of a control method for a vehicle debugging function provided by an embodiment of the present application;

[0016] Figure 3 FIG. shows a schematic flowchart of a control method for a vehicle debugging function provided by an embodiment of the present application;

[0017] Figure 4 FIG. shows a schematic flowchart of the issuance of an identity certificate provided by an embodiment of the present application;

[0018] Figure 5 FIG. shows a schematic flowchart of the authentication of a debugging device provided by an embodiment of the present application;

[0019] Figure 6 FIG. shows a schematic flowchart of a control method for a vehicle debugging function provided by an embodiment of the present application;

[0020] Figure 7 The flowchart shows the control method of the vehicle debugging function provided by an embodiment of the present application;

[0021] Figure 8 The flowchart shows the control method of the vehicle debugging function provided by an embodiment of the present application;

[0022] Figure 9 The block diagram shows the control device of the vehicle debugging function provided by an embodiment of the present application;

[0023] Figure 10 The block diagram shows the control device of the vehicle debugging function provided by an embodiment of the present application;

[0024] Figure 11 The block diagram shows the control device of the vehicle debugging function provided by an embodiment of the present application;

[0025] Figure 12 The block diagram shows the electronic device for executing the control method of the vehicle debugging function according to the embodiment of the present application;

[0026] Figure 13 The storage unit shows the program code for saving or carrying the control method of the vehicle debugging function according to the embodiment of the present application. Detailed implementation manners

[0027] In order to enable those skilled in the art to better understand the solutions of 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 in the embodiments of the present application.

[0028] Currently, the security protection methods for opening the debugging interface of the vehicle system include: the method of opening with a special tool, the method of account password verification, etc. Among them, in the process of authenticating the identity of the requester through a special tool or account password, it is necessary to input the password or store the password each time, which poses a security risk. In addition, there are also problems with non-standard business use of special tools and account passwords (such as tool leakage, simple passwords, fixed passwords, employee departure, etc.), resulting in inconvenient business use and even affecting the security of opening the system debugging function. At the same time, the use of the vehicle debugging function also lacks effective monitoring, and it is impossible to master the usage of the vehicle debugging function, so it is impossible or very difficult to disable the illegal use that has been leaked. For example, by obtaining the account password or the leaked special tool, etc., the user's identity authentication can be passed, and thus the debugging function of the vehicle system can be illegally opened to attack the vehicle system (such as illegally updating the vehicle system through the debugging function, illegally obtaining vehicle information, etc.), making the vehicle system have security risks.

[0029] Therefore, in the related art, there is a challenge in protecting the activation of the vehicle debugging function and preventing unauthorized users from opening and using the vehicle debugging function.

[0030] In view of the above problems, through long-term research, the inventors have proposed a control method, device, and electronic device for a vehicle debugging function provided in an embodiment of the present application. By performing multiple verifications on the identity of the debugging device, performing online private key signing based on a server, and performing public key signature verification based on the vehicle, the reliability of the identity of the user who opens the vehicle debugging function is improved, the key leakage is effectively prevented, and the security of opening the debugging function is enhanced. Among them, the specific control method for the vehicle debugging function will be described in detail in the subsequent embodiments.

[0031] To better understand the solution of the embodiment of the present application, the following first explains the technical terms used in the embodiment of the present application.

[0032] OpenSSL, Open Secure Sockets Layer, is an open-source software library package on computer networks. Application programs can use this package for secure communication, avoiding eavesdropping and at the same time verifying the identity of the other end connection. This package is widely used on web servers on the Internet.

[0033] PKI system, Public Key Infrastructure, is a collection including hardware, software, personnel, policies, and procedures, used to implement functions such as generation, management, storage, distribution, and revocation of keys and certificates based on public key cryptography.

[0034] KMS system, Key Management Service, is a service that provides full life cycle management of keys. It allows users to securely create, store, use, rotate, and destroy encryption keys.

[0035] SDK interface, Software Development Kit, refers to the programming interfaces provided in the software development kit, which allow developers to access and use the functions in the SDK.

[0036] The following elaborates in detail on the implementation details of the technical solution of the embodiment of the present application:

[0037] Figure 1 is a schematic diagram of an application scenario shown according to an embodiment of the present application, as Figure 1As shown in the figure, the application scenario includes an electronic device 101, a debugging device 102, and a vehicle 103. Among them, the electronic device 101 can be communicatively connected to the debugging device 102 through a network, and the debugging device 102 can be communicatively connected to the vehicle 103 through a network. Among them, the network for the communicative connection can be a wide area network or a local area network, or a combination of the two. Among them, the electronic device 101 can be a device with data processing capabilities such as a server, a computer, etc.; among them, the debugging device 102 can be a device with data processing capabilities such as a desktop computer, a laptop computer, etc.; among them, the vehicle 103 can be a device with debugging functions such as an electric vehicle, a fuel vehicle, a two-wheeler, etc. Figure 1 Only a schematic diagram is shown in which the electronic device 101 is a server, the debugging device 102 is a personal computer, and the vehicle 103 is a four-wheeler.

[0038] Among them, the electronic device 101 can obtain the vehicle information and the first random number sent by the debugging device 102. Among them, the vehicle information and the first random number can be obtained after the vehicle 103 communicatively connected to the debugging device 102 verifies the debugging device 102 and sends them to the debugging device 102 after passing the verification. The electronic device 101 can also obtain the identity certificate and the first public key sent by the debugging device 102, and if it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device 102, it can determine the first signature according to the second private key, the vehicle information, and the first random number, and can send the first signature to the debugging device 102, so that the debugging device 102 forwards the first signature to the vehicle 103. The first signature can be used by the vehicle 103 to verify according to the second public key corresponding to the second private key, and when the verification passes, the debugging function of the vehicle 103 can be opened. Thus, in the case where the identity of the debugging device 102 has been verified multiple times, online private key signing is performed based on the electronic device 101, and public key signature verification is performed based on the vehicle 103, which improves the reliability of the identity of the user who opens the debugging function of the vehicle 103, effectively prevents key leakage, and enhances the security of opening the debugging function.

[0039] The embodiments related to the present application will be described below with reference to the accompanying drawings.

[0040] Please refer to Figure 2 , Figure 2 which shows a schematic flowchart of a control method for a vehicle debugging function provided by an embodiment of the present application. In a specific embodiment, the control method for the vehicle debugging function can be applied to a control device 200 for a vehicle debugging function as shown in Figure 9 and an electronic device 100 configured with the control device 200 for the vehicle debugging function ( Figure 12)). Hereinafter, taking an electronic device as an example, the specific process of this embodiment will be described. Of course, it can be understood that the electronic devices to which this embodiment is applied may include devices such as servers, desktop computers, and laptop computers, which are not limited herein. Next, the process shown in Figure 2 will be elaborated in detail with the electronic device being a server. The control method for the vehicle debugging function may specifically include the following steps:

[0041] Step S110: Obtain the vehicle information and the first random number sent by the debugging device. Among them, the vehicle information and the first random number are obtained by the vehicle communicating with the debugging device, and after passing the verification, they are sent to the debugging device.

[0042] In some embodiments, the server may be communicatively connected to the debugging device; among them, the debugging device may be communicatively connected to the vehicle, and the vehicle is equipped with debugging software; correspondingly, the debugging device may be communicatively connected to the debugging software, and may open the debugging function of the vehicle by requesting the interface of the debugging software to perform operations such as system upgrade, maintenance, and repair on the vehicle.

[0043] Among them, after the vehicle is communicatively connected to the debugging device, it can verify the debugging device, and when it is determined that the debugging device passes the verification, it sends the vehicle information of this vehicle and the first random number to the debugging device. Among them, after the debugging device obtains the vehicle information and the first random number, it can send the vehicle information and the first random number to the server; correspondingly, the server can obtain the vehicle information and the first random number sent by the debugging device, so that when the debugging device passes the vehicle's identity check, the vehicle then sends the vehicle information and the first random number to the debugging device to request the server for private key signature by the debugging device, which improves the requirements for the identity of the debugging requester, also improves the reliability of the server's private key signature, and reduces the power consumption of the server.

[0044] Among them, the vehicle information may include the vehicle identification number VIN, the class identifier of a specific data set in the vehicle, the instance identifier of a specific instance in the specific data set in the vehicle, etc. Among them, the first random number may include timestamp data, such as the vehicle's network connection time, vehicle startup time, vehicle network disconnection time, etc. It should be noted that the vehicle information and the first random number are unique.

[0045] Among them, an identity certificate can be pre-stored in the debugging device, and the identity certificate can include account information and a second signature. Among them, the identity certificate can also be applied by the debugging device to an associated electronic device, generated by the electronic device, and sent to the debugging device. Among them, the account information can include the account ID corresponding to the debugging device, or can include the authorization information corresponding to the debugging device (for example, a specified user opens the debugging function of a specified vehicle at a specified time, a specified user opens the debugging function of vehicles within a specified range at a specified time, etc.), which is not limited here. Among them, the second signature can be understood as the result of signing the account information with the private key in the public-private key pair used to generate the identity certificate.

[0046] Among them, during the process of sending the identity certificate, the debugging device can carry the first public key generated by the debugging device in the identity certificate and send it together. Among them, the first public key can be understood as the public key for proving the identity of the debugging device. Optionally, the debugging device can include the first public key in the identity certificate and send it, that is, the identity certificate can include the first public key; the debugging device can also send the first public key separately from the identity certificate.

[0047] Among them, during the process of the vehicle performing an identity check on the debugging device, it can obtain the identity certificate and the first public key of the debugging device, and can perform identity verification on the debugging device based on the identity certificate; if it is determined that the identity certificate verification passes, and it is determined that there is a first private key corresponding to the first public key in the debugging device, it can be determined that the debugging device passes the identity verification of the vehicle, and the vehicle information and the first random number can be sent to the debugging device; if it is determined that the identity certificate verification fails, it can be determined that the debugging device fails the identity check of the vehicle. Accordingly, the vehicle can disconnect the communication connection with the debugging device to ensure the security of the debugging function of the vehicle being turned on.

[0048] Optionally, a third public key may be pre-stored in the vehicle. During the process of the vehicle authenticating based on the debugging device, the vehicle may verify the second signature in the identity certificate based on the third public key, and may compare the verification result with the account information in the identity certificate. If the contents are consistent, the vehicle may send a third random number to the debugging device, so that the debugging device signs the third random number based on a preset private key and sends the signature to the vehicle. The vehicle may verify the signature based on the first public key. If the verification passes, it is determined that the debugging device passes the vehicle's identity authentication; otherwise, it is determined that the debugging device fails the vehicle's identity authentication. Optionally, during the process of the vehicle checking the identity of the debugging device based on the debugging device, the vehicle may sign the account information in the identity certificate based on the third public key built into the vehicle, and may compare the signature result with the second signature in the identity certificate. If the contents are consistent, it may be determined that the identity certificate of the debugging device is qualified; otherwise, it may be determined that the identity certificate is unqualified, and it may be determined that the debugging device fails the vehicle's identity authentication. The third random number may include timestamp data, which is not limited herein.

[0049] Step S120: Obtain the identity certificate and the first public key sent by the debugging device.

[0050] In some embodiments, when the server is communicatively connected to the debugging device, the server may obtain the identity certificate and the first public key sent by the debugging device. Optionally, after the debugging device obtains the vehicle information and the first random number sent by the vehicle with which it has established a communication connection, the debugging device may send the identity certificate and the first public key sent by the debugging device to the server. When the server determines that the identity certificate is qualified and the debugging device has a first private key corresponding to the first public key, the vehicle information and the first random number may be sent to the server to improve the transmission efficiency of the vehicle information and the first random number. Optionally, the debugging device may also send the debugging device identity certificate and the first public key to the server at the same time as sending the vehicle information and the first random number to the server, so that when the server determines that the identity certificate is qualified and the debugging device has a first private key corresponding to the first public key, the vehicle information and the first random number are signed, improving the server's signature efficiency.

[0051] Among them, the debugging device may pre-store an identity certificate, which may include account information and a second signature. Among them, the first public key may be generated by the debugging device. Correspondingly, the debugging device may store a first private key corresponding to the first public key. Correspondingly, the debugging device may send the identity certificate and the first public key to the server for the server to verify the identity certificate of the debugging device and to verify whether there is a first private key corresponding to the first public key in the debugging device, so as to prevent the credentials of the debugging device from being forged or tampered with, and also to verify the possession of the private key by the requesting debugger, improving the requirements for verifying the legitimacy of the debugging device and enhancing the security of enabling the vehicle debugging function.

[0052] Step S130: If it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device, then determine a first signature according to the second private key, the vehicle information, and the first random number.

[0053] In some embodiments, after obtaining the identity certificate and the first public key of the debugging device, the server may verify whether the identity certificate is qualified and determine whether there is a first private key corresponding to the first public key in the debugging device, and may determine whether to sign the vehicle information and the first random number based on the second private key to obtain a first signature according to the verification result of the identity certificate and the judgment result of the existence of the first private key.

[0054] As an implementable manner, if the server determines that the identity certificate of the debugging device is qualified and there is a first private key corresponding to the first public key in the debugging device, then a first signature may be determined according to the second private key, the vehicle information, and the first random number. Among them, the second private key may be generated by the debugging device and stored in the debugging device. Among them, the server may sign the vehicle information and the first random number based on the second private key to obtain a first signature. It should be noted that the first signature may be obtained by signing the vehicle information and the first random number based on the second private key. Thus, the first signature may change in real time.

[0055] Among them, the identity certificate may include account information and a second signature, and a third public key may be built into the vehicle. Optionally, after obtaining the identity certificate sent by the debugging device, the server may verify the second signature based on the third public key to obtain a signature verification result, and compare the signature verification result with the account information. If it is determined that the signature verification result is consistent with the account information, it may be determined that the identity certificate of the debugging device is qualified, and a second random number may be sent to the debugging device for the debugging device to sign the second random number to obtain a third signature and return it to the server. Among them, the server may verify the third signature based on the first public key and compare the signature verification result with the second random number. If it is determined that the signature verification result is consistent with the second random number, it may be determined that there is a first private key corresponding to the first public key in the debugging device.

[0056] Among them, the second random number may include timestamp data (such as, when the electronic device has network access, the startup time of the electronic device, when the electronic device has no network access, etc.). Among them, the second random number may change in real time and is not limited herein.

[0057] Among them, when the server determines that the identity certificate of the debugging device is qualified and there is a first private key corresponding to the first public key in the debugging device, it may determine a first signature according to the second private key, vehicle information, and the first random number. Among them, the server may sign the vehicle information and the first random number based on the second private key to obtain a first signature. Among them, the second private key may be pre-stored in the server and may be saved based on hardware (such as, encryption machine hardware, etc.) to protect the second private key by the hardware, avoid the leakage of the second private key, facilitate the server to monitor the vehicle debugging function and disable the vehicle debugging function, and improve the security of enabling the vehicle debugging function.

[0058] Exemplarily, during the process of the server signing the vehicle information and the first random number, the vehicle can generate digest information based on the SHA256 algorithm and the first random number (such as the vehicle's network connection time, the vehicle's startup time, when the vehicle's network is not connected, etc.), and can determine the position of the data with added patterns as the 1st byte in the digest information, and the length of the data with added patterns as the 2nd byte in the digest information; and can start from a specified position of the vehicle information, and insert the data with patterns into the digest information in a cyclic manner of 1, 2, 4, 8, 4, 2, 1, 2, …, and add 2-byte data with pattern information at the end of the data to obtain the vehicle information and the first random number that need to be signed by the electronic device. After the server obtains the vehicle information and the first random number that need to be signed based on the second private key, it can reverse-remove the data with patterns, complete the signature, and obtain the first signature. Correspondingly, the vehicle can perform signature verification based on the original data before adding the patterns. Thus, the vehicle side can add patterns randomly, and the server side can remove the patterns, thereby increasing the difficulty of illegally cracking the signature and signature verification, and can also effectively avoid the situation of directly forging the server to complete the verification by simply replacing the public key (such as replacing the encryption chip, public key file, etc.), improving the security of enabling the vehicle debugging function.

[0059] Step S140: Send the first signature to the debugging device, so that the debugging device forwards the first signature to the vehicle, and the first signature is used by the vehicle to verify according to the second public key corresponding to the second private key, and open the debugging function of the vehicle in the case of successful verification.

[0060] In some embodiments, after the server signs the vehicle information and the first random number based on the second private key to obtain the first signature, it can send the first signature to the debugging device, so that the debugging device forwards the first signature to the vehicle connected by communication; wherein, the first signature can be used by the vehicle to verify according to the second public key corresponding to the second private key, and open the debugging function of the vehicle in the case of successful verification.

[0061] Among them, the second public key corresponding to the second private key can be pre-stored in the vehicle, and the vehicle can protect the second public key based on hardware, that is, the vehicle side securely stores the relevant verification public key (i.e., the second public key) for verifying the identity of the debugging requester. Among them, the vehicle side can securely store the second public key by combining the method of writing the one-time public key into the hardware, and use the second public key to verify the signature of the requester who requests to open the debugging.

[0062] Among them, the vehicle can verify the first signature based on the second public key, and compare the verification result with the vehicle information and the first random number. If the verification result is consistent with the vehicle information and the first random number, it can be determined that the verification of the first signature passes. Correspondingly, the vehicle can turn on the debugging function when the verification is passed. Thus, the debugging function of the vehicle is turned on based on the online signature of the server and the vehicle-side signature verification, including multiple security checks on the identity of the requester, protecting the debugging function of the vehicle from being illegally turned on, ensuring the identity legality of turning on the debugging function of the vehicle, and the relevant verification cannot be bypassed. It also prevents the leakage of the keys for signature and signature verification, and online controls the debugging function of the vehicle, responds to debugging requests in real time, realizes the monitoring of the debugging function, and improves the security of the vehicle system.

[0063] Among them, it can be understood that in this embodiment, the vehicle terminal stores the second public key for relevant verification to verify the identity of the debugging device, while the second private key for relevant verification is securely stored on the server, which can effectively prevent the leakage of the keys. At the same time, when the debugging requester requests to turn on the debugging function of the vehicle, it is required to provide a qualified identity certificate and hold a self-generated public-private key pair (the first public key and the first private key) to effectively disable the illegal opening of the debugging function by illegal users who obtain a qualified identity certificate but do not hold the private key of the requester. The identity requirements for turning on the debugging function are higher, which better prevents illegal access. In addition, the server can sign the data carrying the time and vehicle information based on the second private key to facilitate the real-time monitoring of the use of the debugging function of the vehicle. Through server signature and vehicle-side signature verification, the security of turning on the debugging function of the vehicle is improved.

[0064] A control method for a vehicle debugging function provided by an embodiment of the present application. The server obtains vehicle information and a first random number sent by a debugging device that has passed vehicle authentication. When it is determined that the identity certificate sent by the debugging device is qualified and there is a first private key corresponding to the first public key sent by the debugging device in the debugging device, a first signature is determined according to the second private key, the vehicle information, and the first random number. Thus, when the debugging device passes the server's identity authentication, the vehicle information and the first random number are signed with the second private key to obtain the first signature, and the first signature is sent to the debugging device, so that the debugging device forwards the first signature to the vehicle. The first signature is used by the vehicle to verify according to the second public key corresponding to the second private key. When the verification passes, the debugging function of the vehicle is opened. Thus, signing is performed based on the second private key stored in the server, and verification is performed using the second public key related to the first private key stored in the vehicle, improving the immunity to key leakage. When the verification passes, the debugging function of the vehicle is opened. Moreover, both the vehicle and the server verify the debugging device during the process of the debugging device obtaining the signature. Therefore, the reliability of the user who opens the debugging function of the vehicle can be improved, illegal access can be better prevented, and the security of the vehicle system debugging function can be enhanced.

[0065] Please refer to Figure 3 , Figure 3 which shows a schematic flowchart of a control method for a vehicle debugging function provided by an embodiment of the present application. This method is applied to the above-mentioned server. The following will elaborate in detail on the Figure 3 shown process. The control method for the vehicle debugging function may specifically include the following steps:

[0066] Step S210: Obtain the vehicle information and the first random number sent by the debugging device. Among them, the vehicle information and the first random number are sent to the debugging device by the vehicle that is communicatively connected to the debugging device after verifying the debugging device, and the vehicle information includes the vehicle identification code of the vehicle.

[0067] In some embodiments, the server may be communicatively connected to a debugging device. The debugging device may request to enable the debugging function of the vehicle. The vehicle may verify the debugging device and, after passing the verification, send the vehicle information of its own vehicle and a first random number to the debugging device. Correspondingly, after receiving the vehicle information and the first random number sent by the vehicle, the debugging device may forward the vehicle information and the first random number to the server for the server to sign the vehicle information and the first random number. Wherein, the vehicle information may include the vehicle identification number (VIN) of the vehicle, and the first random number may be a timestamp, so as to generate a first signature of the timestamp plus the unique identifier of the vehicle based on the vehicle information and the first random number, to determine whether the debugging device has the permission to enable the vehicle debugging function, improving the uniqueness of the signature.

[0068] Step S220: Obtain the identity certificate and the first public key sent by the debugging device. The identity certificate includes account information and a second signature.

[0069] In some embodiments, the server may obtain the identity certificate and the first public key sent by the debugging device. Among them, the identity certificate and the first public key may be pre-stored in the debugging device. The identity certificate may be obtained by the debugging device from an associated cloud or electronic device, and the identity certificate may include account information, a second signature, etc. The first public key may be generated by the debugging device. Correspondingly, the first private key corresponding to the first public key may also be stored in the debugging device. The first private key may be used as the private key to prove the identity of the debugging device and is stored in the debugging device without being used outside the debugging device. The first public key may be transmitted between the debugging device and the associated electronic device. Correspondingly, the debugging device may carry the first public key for transmission during the process of transmitting the identity certificate, that is, the identity certificate may include account information, a second signature, and the first public key.

[0070] As an implementable manner, the server may be understood as the background. The identity certificate of the debugging device may be generated by the background and sent to the debugging device.

[0071] Among them, before obtaining the identity certificate sent by the debugging device, the server can, in response to the certificate issuance request sent by the debugging device, generate the account information corresponding to the debugging device, as well as the third private key and the third public key corresponding to the debugging device, and can determine the second signature according to the third private key and the account information; and can determine the identity certificate according to the account information and the second signature, and send the identity certificate to the debugging device, so that the debugging device uses the identity certificate as proof of its own identity. Correspondingly, the third public key corresponding to the identity certificate of the debugging device can be built into the server, so that the server verifies whether the identity certificate is qualified based on the third public key; optionally, the server can also send the third public key to the associated vehicle, so that the vehicle verifies whether the identity certificate of the debugging device is qualified. Among them, the server and the vehicle can save the third public key based on the hardware encryption machine to prevent the leakage of the key and improve the reliability of the identity certificate verification.

[0072] Among them, in the process of the server responding to the certificate issuance request sent by the debugging device, it can detect whether the channel through which the debugging device sends the certificate issuance request is legal. If the channel is legal, it can respond to the certificate issuance request sent by the debugging device. Among them, the legal channel can include the certificate issuance request sent by the software authenticated by the server, or can include the certificate sending request sent through the communication protocol authenticated by the server, which is not limited here.

[0073] Exemplarily, please refer to Figure 4 , which shows a schematic flowchart of the identity certificate issuance provided by an embodiment of the present application. Among them, the server can be understood as an online system, which can include a PKI system, an OpenSSL tool, an online management authorization system, a certificate management system, etc.; among them, the PKI system can be used for the management of digital certificates and can be used to issue identity certificates to users who need debugging functions. Among them, the debugging device can send a certificate issuance request to the server. Among them, if the server detects that the channel through which the debugging device sends the certificate issuance request is legal, it can determine that the debugging device is a legal user; correspondingly, when the server determines that the debugging device is a legal user, it can generate the public-private key pair (the third public key and the third private key) required for the identity certificate through the OpenSSL tool, and can apply for an account to open the debugging function for the debugging device through the online management authorization system, and generate legal account information (such as the account ID of the debugging device, the authorized content of the debugging, the optional device information of the identity certificate, etc.).

[0074] Among them, it can be understood that the account ID is generated and assigned by the online management authorization system. The generation of the public-private key pair can ensure the transmission of the private key within the server and is not easily leaked. The optional device information can also be used to bind the device to determine the authorization scope of the identity certificate. Among them, the server can also include a set of authorization management for setting the authorization content, such as specifying that a user can open the settings of a specified vehicle at a specified time and recording user requests, etc.

[0075] Among them, the server can generate an identity certificate for a legitimate user through the certificate management system using the legitimate account information and the third private key as the security access credential for the legitimate user. Among them, the server can sign the account information based on the third private key to obtain a second signature; and can generate an identity certificate through the PKI system according to the account information and the second signature, and can send the identity certificate to the debugging device. Thus, the server generates a signed certificate with identity information for the legitimate requester of the debugging function to open, so that the requester of the debugging function has a certificate to access the online system, and can send the identity certificate to the online system when accessing the service (such as requesting to open the debugging function of a specified vehicle), so that the online system authenticates the identity certificate.

[0076] Step S230: Determine a third signature according to the third public key and the account information, where the third public key is generated during the generation of the identity certificate.

[0077] In some embodiments, after the server obtains the identity certificate of the debugging device, it can determine the third signature according to the third public key and the account information. Among them, the server can sign the account information based on the third public key to obtain the third signature. The third public key can be generated and pre-stored in the server during the generation of the identity certificate, or can be obtained by the server from the associated cloud or electronic device, which is not limited here.

[0078] Step S240: If it is determined that the third signature matches the second signature, determine that the identity certificate is qualified and send a second random number to the debugging device.

[0079] In some embodiments, after the server obtains the third signature according to the third public key and the account information, it can match the third signature with the second signature in the identity certificate. If it is determined that the third signature matches the second signature, it can be determined that the identity certificate is qualified, and a second random number can be sent to the debugging device. The process by which the server determines whether the identity certificate is qualified can be understood as a process of checking the legality of the identity credential for the debugging request. If the identity certificate is qualified, it can be understood that the identity credential for the debugging request is legal.

[0080] Among them, the second random number may include timestamp data, such as the network connection time of the server, the server startup time, the time when the server has no network connection, etc. The server may send the second random number to the debugging device to verify the private key of the identity certificate of the debugging device.

[0081] Step S250: Obtain a fourth signature sent by the debugging device, where the fourth signature is determined by the debugging device according to a preset private key and the second random number.

[0082] Among them, after the server sends the fourth signature to the debugging device, the debugging device determines the fourth signature according to the preset private key and the second random number. The preset private key may be pre-stored in the debugging device; the debugging device may sign the second random number based on the preset private key to obtain the fourth signature and send it to the server; correspondingly, the server may obtain the fourth signature sent by the debugging device to determine whether there is a first private key in the debugging device that proves the legality of the debugging device according to the fourth signature and the first public key.

[0083] Step S260: If the verification of the fourth signature passes according to the first public key, determine that there is a first private key corresponding to the first public key in the debugging device, and determine the preset private key as the first private key.

[0084] Among them, after the server obtains the fourth signature, it can verify the signature of the fourth signature based on the first public key. If the verification of the fourth signature passes according to the first public key, it can be determined that there is a first private key corresponding to the first public key in the debugging device, and it can be determined that there is a first private key in the debugging device that proves the legality of the identity of the debugging device, and the preset private key can be determined as the first private key.

[0085] Exemplarily, please refer to Figure 5 , which shows a schematic flow diagram of debugging device identity verification provided by an embodiment of the present application. Among them, the server can be understood as an online system, which may include a PKI system, a PKI public key, an SDK, an SDK interface, etc. The online system can obtain the first public key and the identity certificate sent by the debugging device through the PKI system or the SDK interface, and can extract information such as the account information and the second signature carried in the identity certificate, and perform signature verification using the built-in third public key and the first public key, and determine whether the identity verification of the debugging device passes according to the verification result, and whether to perform signature services on the vehicle information and the first random number.

[0086] Among them, the debugging device can send the identity certificate to the online system. The online system can, through the PKI system or the SDK, check the legality of the identity certificate of the debugging device based on the built-in third public key, and can return a second random number to the debugging device when the identity certificate is qualified. Among them, the debugging device can sign the second random number provided by the online system based on the first private key proving the legality of the debugging device to obtain a fourth signature, and can send the fourth signature to the online system. Among them, if the online system passes the verification of the fourth signature based on the first public key, it can determine that the identity verification of the debugging device passes, and can perform signature services on the vehicle information and the first random number.

[0087] Among them, if the online system determines that the identity certificate is unqualified, it can determine that the identity verification of the debugging device fails, and can refuse to perform signature services on the vehicle information and the first random number; among them, if the online system fails to pass the verification of the fourth signature based on the first public key, it can determine that the identity verification of the debugging device fails, and can refuse to perform signature services on the vehicle information and the first random number.

[0088] Step S270: If it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device, then determine a first signature according to the second private key, the vehicle information, and the first random number.

[0089] Step S280: Send the first signature to the debugging device, so that the debugging device forwards the first signature to the vehicle. The first signature is used by the vehicle to verify according to the second public key corresponding to the second private key, and the debugging function of the vehicle is turned on when the verification passes.

[0090] Among them, for the specific descriptions of steps S270 - S280, please refer to the descriptions of steps S130 - S140 above, and will not be elaborated here one by one.

[0091] Exemplarily, please refer to Figure 6, which shows a schematic flowchart of a control method for a vehicle debugging function provided by an embodiment of the present application. Among them, the debugging device may include the tool software of the engineer device, the vehicle may include debugging software, and the server may be understood as an online system; the tool software may establish a communication connection with the debugging software of the vehicle, and the debugging software may also communicate with the online system. Among them, the vehicle may authenticate the tool software, and when the tool software passes the authentication, the vehicle may send information such as the vehicle's VIN code and the first random number to the tool software to request the online system to perform private key signing. Among them, if the vehicle determines that the tool software fails to pass the authentication, it may disconnect the communication connection with the tool software and not send information such as the vehicle's VIN code and the first random number to the tool software.

[0092] Among them, the tool software may send an identity certificate and the first public key to the online system for authentication, and when passing the authentication, send information such as the VIN code and random number to be signed to the online system to request the online system to perform private key signing. Among them, if the tool software fails to pass the authentication of the online system, it may disconnect the communication connection with the tool software.

[0093] Among them, the online system may include a KMS system. The online system may call the KMS system interface to sign information such as the VIN code and random number to be signed based on the second private key, obtain the first signature and send it to the tool software. The KMS system may be used for key management, may be used to generate public-private key pairs, protect the security of the private key through a hardware encryption machine, and the private key does not leave the KMS system, and private key-related operations are completed within the system.

[0094] Among them, the tool software may forward the first signature to the debugging software of the vehicle. If the debugging software of the vehicle can verify the signature with the second public key corresponding to the second private key; if the signature verification passes, the vehicle's debugging function may be opened; if the signature verification fails, the vehicle's debugging function may be refused to be opened.

[0095] In some embodiments, in response to the vehicle's refusal to open the vehicle's debugging function, the vehicle may generate an alarm prompt message when refusing to open the vehicle's debugging function, and the alarm prompt message may be used to prompt that the debugging device fails to open the vehicle's debugging function.

[0096] Optionally, the vehicle can also be communicatively connected to an online system. In the case where the vehicle refuses to open the debugging function, the vehicle can report the anomaly to the online system, or record the anomaly and report it to the online service after recording a preset number of anomalies. During the process of the vehicle recording the anomaly, it can record the IP of the debugging device that illegally requests to open the vehicle's debugging function, the vehicle's VIN, and anomaly information such as the identity certificate (e.g., account ID) of the debugging device. The online system can count and analyze the anomaly information, determine the IP and account ID of the debugging device whose authentication fails to reach the preset number within a specified time, and can add the IP to a preset blacklist, or revoke, disable, update, etc. the identity certificate corresponding to the account ID. By blocking the risk source's request to open the vehicle's debugging function through the blacklist, it is convenient to master the usage of the vehicle's debugging function, and can respond in real time to illegal requests such as identity certificate leakage, disable the vehicle's debugging function, and improve the security of enabling the vehicle's debugging function.

[0097] It can be understood that in this example, the online system and the vehicle can respectively authenticate the debugging device, which improves the requirements for authenticating the identity of the requester who requests the vehicle's debugging function, effectively preventing unauthorized users from opening the debugging function and endangering the security of the vehicle system. At the same time, when the identity of the debugging device has been verified multiple times, the online system manages and controls the debugging interface, combines the public certificate system to generate identity certificates, the key management system, and the encryption machine to protect the key. The online system signs with the second private key, and the vehicle side combines the one-time public key to write the hardware to securely store the second public key, and uses the second public key to verify the signature of the requester who requests to open the debugger. Due to the hardware protection of the key, the leakage of the key is effectively avoided. In addition, by signing with the private key through the online system and verifying the signature based on the vehicle's public key, the online system manages and authorizes specified users to open the vehicle's debugging function at a specified time, or authorizes and manages the range of the prompt function that specifies users open the vehicle at a specified time, which facilitates the online system to monitor and disable the vehicle's debugging function and enhances the security of enabling the debugging function.

[0098] The control method of the vehicle debugging function provided by an embodiment of the present application, compared with Figure 2The control method of the vehicle debugging function shown. In this embodiment, the vehicle information includes the vehicle identification code of the vehicle, so as to perform private key signature and public key verification on the vehicle unique identification code, and verify the opening of the debugging function for the specified vehicle, improving the effectiveness of the opening of the vehicle debugging function. In this embodiment, the identity certificate of the debugging device may include account information and a second signature. This embodiment may also determine a third signature according to the built-in third public key and the account information in the identity certificate before determining the first signature according to the second private key, vehicle information, and the first random number if it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device; if it is determined that the third signature matches the second signature, it is determined that the identity certificate is qualified, and a second random number is sent to the debugging device; obtain the fourth signature sent by the debugging device, where the fourth signature is determined by the debugging device according to the preset private key and the second random number; if the fourth signature is verified to pass according to the first public key, it is determined that there is a first private key corresponding to the first public key in the debugging device, and the preset private key is determined as the first private key, so as to verify the second signature through the built-in third public key, and when it is determined that the verification result matches the account information, it is determined that the content of the identity certificate has not been tampered with, and when it is determined that the identity certificate is qualified, it is determined whether there is a first private key corresponding to the first public key in the debugging device. When the first private key is only transmitted in the debugging device, verify whether the debugging device is an illegal user who illegally obtains a qualified identity certificate but does not hold the unique private key, and when it is determined that the identity certificate of the debugging device is qualified and there is a unique private key, sign the vehicle information and the first random number based on the second private key, improving the security and effectiveness of the debugging requester identity verification and the security of opening the vehicle debugging function.

[0099] Please refer to Figure 7 , Figure 7 shows a schematic flowchart of the control method of the vehicle debugging function provided by an embodiment of the present application. In a specific embodiment, the control method of the vehicle debugging function can be applied to the vehicle debugging function control device 300 shown in Figure 10 and the electronic device 100 configured with the vehicle debugging function control device 300 ( Figure 12 ). Hereinafter, taking the electronic device as an example, the specific process of this embodiment will be described. Of course, it can be understood that the electronic device to which this embodiment is applied may include devices such as vehicles, in-vehicle terminals, and car infotainment systems, which are not limited herein. Hereinafter, the process shown in Figure 7 will be elaborated in detail with the vehicle as the electronic device. The control method of the vehicle debugging function may specifically include the following steps:

[0100] Step S310: After the vehicle verifies and passes the verification of the debugging device communicatively connected to the vehicle, the vehicle information and the first random number of the vehicle are sent to the debugging device.

[0101] After the vehicle establishes a communication connection with the debugging device, it can verify the debugging device connected to the vehicle. After verifying the debugging device connected to the vehicle and passing the verification, the vehicle information and the first random number of the vehicle can be sent to the debugging device. The vehicle information may include the VIN code of the vehicle. The first random number may be timestamp data, which may include the network connection time of the vehicle, the start time of the vehicle, the network disconnection time of the vehicle, etc.

[0102] During the process of the vehicle verifying the debugging device connected to the vehicle, the vehicle can obtain the identity certificate and the first public key sent by the debugging device. The identity certificate may include account information and a second signature. If the second signature in the identity certificate is verified through the third public key built in the vehicle and the account information in the identity certificate, a fourth random number can be sent to the debugging device, so that the debugging device signs the fourth random number based on the first private key corresponding to the first public key and sends the signature result to the vehicle. Correspondingly, the vehicle can verify the signature based on the first public key. If the signature verification passes, the vehicle information and the first random number of the vehicle can be sent to the debugging device. If the vehicle fails to verify the second signature through the built-in third public key and the account information, or if the vehicle fails to verify the signature of the fourth random number based on the first private key by the first public key, the communication connection with the debugging device can be disconnected, thereby effectively verifying the identity of the requester who opens the vehicle debugging function and enhancing the security of the vehicle debugging function.

[0103] Step S320: Receive the first signature sent by the debugging device. The first signature is determined by the server according to the second private key, the identity certificate sent by the debugging device, and the first public key when the server obtains the identity certificate and the first public key sent by the debugging device, determines that the identity certificate is qualified, and there is a first private key corresponding to the first public key in the debugging device.

[0104] After the vehicle sends the vehicle information and the first random number to the debugging device, the debugging device can forward the vehicle information and the first random number to the server, and the debugging device can also send the identity certificate and the first public key to the server. If the server determines that the identity certificate is qualified after obtaining the identity certificate and the first public key sent by the debugging device, and there is a first private key corresponding to the first public key in the debugging device, the first signature can be determined according to the second private key, the identity certificate sent by the debugging device, and the first public key, and the first signature is sent to the debugging device. The debugging device can forward the first signature to the vehicle.

[0105] Among them, when the identity certificate of the debugging device is qualified and there is a first private key corresponding to the first public key in the debugging device, the server signs based on the second private key, which can resist situations such as identity certificate leakage and impersonation. Requiring the identity certificate of the debugging device and holding a specific private key for signing can effectively prevent illegal users from opening the debugging function. If an attacker cannot obtain a qualified identity certificate or does not hold the first private key corresponding to the identity certificate, they cannot pass the authentication and cannot obtain the private key signature, making the owner of the vehicle debugging function legitimate, preventing the vehicle system from being illegally accessed and illegally tampered with, and improving the security of the vehicle system.

[0106] Among them, the first public key corresponding to the first private key not leaving the debugging device can prevent the theft of the certificate and also ensure that the stolen identity certificate is useless. That is, the private key proving the identity of the debugging device not leaving the debugging device can prevent leakage. Binding the private key to the device will make the identity certificate of the replacement device useless. Illegal users cannot obtain the private key proving the identity of the debugging device through the public interface of the relevant system, ensuring the security of the identity authentication of the debugging device.

[0107] Exemplarily, both the PKI system and the KMS system can use a hardware encryption machine to store the private key, so that the operation of the private key does not leave the relevant system, and the optional device information directly binds the identity certificate to the device, ensuring the key security of the private key proving the identity of the debugging device and the signature private key.

[0108] Step S330: If the first signature is verified to pass according to the second public key corresponding to the second private key, open the debugging function of the vehicle.

[0109] Among them, after the vehicle obtains the first signature, if the first signature is verified to pass according to the second public key corresponding to the second private key, the debugging function of the vehicle can be opened. Among them, the second public key can be pre-stored in the vehicle. The one-time public key in the vehicle is written into the hardware security storage (or secure refresh), which prevents the second public key from being damaged, avoids situations such as account key leakage and tool leakage, and improves the protection ability of the vehicle system. The one-time public key of the vehicle is written into the hardware storage module (which can be protected by secure refresh) and can be used to store the second public key, ensuring the security of the signature verification public key.

[0110] The control method for the vehicle debugging function provided by an embodiment of the present application. After the vehicle verifies the debugging device communicatively connected to the vehicle and passes the verification, the vehicle information and the first random number of the vehicle are sent to the debugging device; receive the first signature sent by the debugging device. The first signature is determined by the server after obtaining the identity certificate and the first public key sent by the debugging device, determining that the identity certificate is qualified, and there is a first private key corresponding to the first public key in the debugging device, based on the second private key, the obtained identity certificate sent by the debugging device, and the first public key; if the first signature is verified to be passed according to the second public key corresponding to the second private key, the debugging function of the vehicle is turned on. Thus, in the case where the identity of the debugging device has been verified multiple times, online private key signature is performed based on the server, and public key signature verification is performed based on the vehicle, improving the reliability of the identity of the user who turns on the debugging function of the vehicle, effectively preventing key leakage, and enhancing the security of turning on the debugging function.

[0111] Please refer to Figure 8 , Figure 8 which shows a schematic flowchart of the control method for the vehicle debugging function provided by an embodiment of the present application. In a specific embodiment, the control method for the vehicle debugging function can be applied to the vehicle debugging function control device 400 as shown in Figure 11 and the electronic device 100 configured with the vehicle debugging function control device 400 ( Figure 12 ). Hereinafter, taking the electronic device as an example, the specific process of this embodiment will be described. Of course, it can be understood that the electronic device applied in this embodiment may include devices such as servers, desktop computers, and laptop computers, which are not limited herein. Next, the following will be elaborated in detail for the Figure 8 shown process with the electronic device as the debugging device. The control method for the vehicle debugging function may specifically include the following steps:

[0112] Step S410: The debugging device obtains the vehicle information and the first random number sent by the vehicle, and sends the vehicle information and the first random number to the server, where the vehicle information and the first random number are sent to the debugging device by the vehicle communicatively connected to the debugging device after verifying the debugging device and passing the verification.

[0113] Among them, the debugging device can establish a communication connection with the vehicle. The vehicle can verify the debugging device and send the vehicle information and the first random number to the debugging device after passing the verification; correspondingly, the debugging device can obtain the vehicle information and the first random number sent by the vehicle and can send the vehicle information and the first random number to the server.

[0114] In some embodiments, the debugging device may send an identity certificate and a first public key to the vehicle. The identity certificate may include account information and a second signature. And in the case that the vehicle verifies the second signature through the third public key and the account information and there is a first private key corresponding to the first public key in the debugging device, the debugging device may obtain the vehicle information and a first random number sent by the vehicle.

[0115] Step S420: Send the identity certificate and the first public key of the debugging device to the server.

[0116] Among them, the debugging device may also send the identity certificate and the first public key to the server. The first public key may be generated by the debugging device and may be bound to the debugging device. The identity certificate may include account information and a second signature. The identity certificate may be pre-stored in the debugging device. The identity certificate of the debugging device may be generated by the PKI system of the server based on a third private key, which can prevent the identity certificate from being forged or tampered with.

[0117] Step S430: Obtain a first signature sent by the server. The first signature is determined by the server according to a second private key, the vehicle information, and the first random number in the case that the server determines that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device.

[0118] Among them, after the debugging device sends the identity certificate and the first public key to the server, the server may authenticate the debugging device. The server may determine a first signature according to the second private key, the vehicle information sent by the debugging device, and the first random number in the case that the server determines that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device, and send it to the debugging device.

[0119] In some embodiments, the identity certificate may include account information and a second signature. Among them, before the debugging device obtains the first signature sent by the server, the debugging device may obtain a second random number sent by the server, where the second random number may be determined by the server based on the built-in third public key and the account information, determine the third signature, and determine that the third signature matches the second signature, and then determine that the identity certificate is qualified and sent. The debugging device may determine a fourth signature according to the preset private key and the second random number, and may send the fourth signature to the server, so that when the server verifies and passes the fourth signature according to the first public key, it determines that there is a first private key corresponding to the first public key in the debugging device, and determines the preset private key as the first private key. When the debugging device requests the server interface, the server may verify the signature based on the first public key through the PKI system to determine that the source of the requester is trustworthy, verify whether the requester holds the first private key corresponding to the first public key using the public-private key pair, and then decide the next processing for the legality or illegality of the requester, improving the reliability of identity verification.

[0120] Step S440: Send the first signature to the vehicle so that the vehicle verifies the first signature according to the second public key corresponding to the second private key, and opens the debugging function of the vehicle when the verification passes.

[0121] Among them, the debugging device may send the first signature to the vehicle so that the vehicle verifies the first signature according to the second public key corresponding to the second private key, and opens the debugging function of the vehicle when the verification passes.

[0122] The control method for the vehicle debugging function provided by an embodiment of the present application is as follows: the debugging device obtains the vehicle information and the first random number sent by the vehicle, and sends the vehicle information and the first random number to the server, where the vehicle information and the first random number are verified by the vehicle communicatively connected to the debugging device and sent to the debugging device after passing the verification; send the identity certificate and the first public key of the debugging device to the server; obtain the first signature sent by the server, where the first signature is determined by the server according to the second private key, the vehicle information and the first random number when it determines that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device; send the first signature to the vehicle so that the vehicle verifies the first signature according to the second public key corresponding to the second private key, and opens the debugging function of the vehicle when the verification passes. Thus, when the identity of the debugging device has been verified multiple times, online private key signature is performed based on the server, and public key signature verification is performed based on the vehicle, improving the reliability of the identity of the user who opens the vehicle debugging function, effectively preventing key leakage, and enhancing the security of opening the debugging function.

[0123] Please refer toFigure 9 , Figure 9 shows a block diagram of a control device for a vehicle debugging function provided by an embodiment of the present application. The control device 200 for the vehicle debugging function is applied to the above-mentioned electronic device. The following will elaborate in detail on Figure 9 the process shown. The control device 200 for the vehicle debugging function includes: a vehicle information acquisition module 210, an identity certificate acquisition module 220, a first signature determination module 230, and a first signature sending module 240, where:

[0124] The vehicle information acquisition module 210 is configured to acquire vehicle information and a first random number sent by a debugging device, where the vehicle information and the first random number are obtained by a vehicle communicatively connected to the debugging device verifying the debugging device and sending them to the debugging device after passing the verification.

[0125] The identity certificate acquisition module 220 is configured to acquire an identity certificate and a first public key sent by the debugging device.

[0126] The first signature determination module 230 is configured to, if it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device, determine a first signature according to a second private key, the vehicle information, and the first random number.

[0127] The first signature sending module 240 is configured to send the first signature to the debugging device, so that the debugging device forwards the first signature to the vehicle. The first signature is used by the vehicle to perform verification according to a second public key corresponding to the second private key, and the debugging function of the vehicle is opened when the verification passes.

[0128] Further, the identity certificate includes account information and a second signature. Before the step of, if it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device, determining a first signature according to a second private key, the vehicle information, and the first random number, the control device 200 for the vehicle debugging function may further include: a third signature determination unit, a second random number sending unit, a fourth signature acquisition unit, and a fourth signature verification unit, where:

[0129] The third signature determination unit is configured to determine a third signature according to a third public key and the account information, where the third public key is generated during the generation of the identity certificate.

[0130] The second random number sending unit is configured to, if it is determined that the third signature matches the second signature, determine that the identity certificate is qualified and send a second random number to the debugging device.

[0131] A fourth signature acquisition unit, configured to acquire a fourth signature sent by the debugging device, where the fourth signature is determined by the debugging device according to a preset private key and the second random number.

[0132] A fourth signature verification unit, configured to determine that there is a first private key corresponding to the first public key in the debugging device if the verification of the fourth signature passes according to the first public key, and determine the preset private key as the first private key.

[0133] Further, before acquiring the identity certificate sent by the debugging device, the control device 200 of the vehicle debugging function may further include: a certificate issuance request response unit, a second signature determination unit, and an identity certificate distribution unit, where:

[0134] The certificate issuance request response unit is configured to generate account information corresponding to the debugging device, and a third private key and a third public key corresponding to the debugging device in response to a certificate issuance request sent by the debugging device.

[0135] The second signature determination unit is configured to determine the second signature according to the third private key and the account information.

[0136] The identity certificate distribution unit is configured to determine the identity certificate according to the account information and the second signature, and send the identity certificate to the debugging device.

[0137] Further, the vehicle information includes a vehicle identification code of the vehicle.

[0138] Please refer to Figure 10 , Figure 10 which shows a block diagram of a control device of a vehicle debugging function provided in an embodiment of the present application. The control device 300 of the vehicle debugging function is applied to the above-mentioned electronic device. The following will elaborate in detail on Figure 10 the process shown. The control device 300 of the vehicle debugging function includes: a vehicle information sending module 310, a first signature receiving module 320, and a debugging function opening module 330, where:

[0139] The vehicle information sending module 310 is configured to send the vehicle information of the vehicle and a first random number to the debugging device after the vehicle verifies the debugging device communicatively connected to the vehicle and passes the verification.

[0140] The first signature receiving module 320 is configured to receive the first signature sent by the debugging device. The first signature is determined by the server according to the second private key, the identity certificate sent by the debugging device, and the first public key when the server obtains the identity certificate and the first public key sent by the debugging device, determines that the identity certificate is qualified, and there is a first private key corresponding to the first public key in the debugging device.

[0141] The debugging function enabling module 330 is configured to enable the debugging function of the vehicle if the verification of the first signature by the second public key corresponding to the second private key passes.

[0142] Further, the vehicle information sending module 310 may include: an identity certificate obtaining unit and a debugging device identity verification unit, where:

[0143] The identity certificate obtaining unit is configured to obtain the identity certificate and the first public key sent by the debugging device by the vehicle. The identity certificate includes account information and a second signature.

[0144] The debugging device identity verification unit is configured to send the vehicle information and the first random number to the debugging device if the verification of the second signature by the third public key and the account information passes and it is determined that there is a first private key corresponding to the first public key in the debugging device.

[0145] Please refer to Figure 11 , Figure 11 which shows a block diagram of a control device for a vehicle debugging function provided in an embodiment of the present application. The control device 400 for the vehicle debugging function is applied to the above-mentioned electronic device. The following will elaborate in detail on the Figure 11 shown process. The control device 400 for the vehicle debugging function includes: a vehicle information forwarding module 410, an identity certificate sending module 420, a first signature obtaining module 430, and a first signature forwarding module 440, where:

[0146] The vehicle information forwarding module 410 is configured to enable the debugging device to obtain the vehicle information and the first random number sent by the vehicle, and send the vehicle information and the first random number to the server. The vehicle information and the first random number are sent to the debugging device by the vehicle communicatively connected to the debugging device after passing the verification.

[0147] The identity certificate sending module 420 is configured to send the identity certificate and the first public key of the debugging device to the server.

[0148] The first signature acquisition module 430 is configured to acquire the first signature sent by the server, where the first signature is determined by the server based on a second private key, the vehicle information, and the first random number when it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device.

[0149] The first signature forwarding module 440 is configured to send the first signature to the vehicle, so that the vehicle verifies the first signature according to a second public key corresponding to the second private key, and turns on the debugging function of the vehicle when the verification is passed.

[0150] Further, the vehicle information forwarding module 410 may include: an identity certificate sending unit and an identity verification passing unit, where:

[0151] The identity certificate sending unit is configured to send the identity certificate and the first public key to the vehicle, and the identity certificate includes account information and a second signature.

[0152] The identity verification passing unit is configured to acquire the vehicle information and the first random number sent by the vehicle when the vehicle verifies the second signature through a third public key and the account information and there is a first private key corresponding to the first public key in the debugging device.

[0153] Further, the identity certificate includes account information and a second signature. Before acquiring the first signature sent by the server, the control device 400 of the vehicle debugging function may further include: a second random number acquisition unit, a fourth signature determination unit, and a fourth signature sending unit, where:

[0154] The second random number acquisition unit is configured to acquire the second random number sent by the server, where the second random number is sent by the server when it determines that the identity certificate is qualified after determining a third signature according to a third public key and the account information and determining that the third signature matches the second signature.

[0155] The fourth signature determination unit is configured to determine a fourth signature according to a preset private key and the second random number.

[0156] The fourth signature sending unit is configured to send the fourth signature to the server, so that the server determines that there is a first private key corresponding to the first public key in the debugging device when the fourth signature is verified through the first public key, and determines the preset private key as the first private key.

[0157] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0158] In several embodiments provided by the present application, the coupling between modules can be electrical, mechanical, or other forms of coupling.

[0159] In addition, in each embodiment of the present application, each functional module can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.

[0160] Please refer to Figure 12 , which shows a structural block diagram of an electronic device 100 provided by an embodiment of the present application. The electronic device 100 can be an electronic device with processing capabilities such as a server, a vehicle, a tablet computer, a robot, etc. The electronic device 100 in the present application can include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs can be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more programs are configured to execute the methods described in the foregoing method embodiments.

[0161] Among them, the processor 110 can include one or more processing cores. The processor 110 connects various parts within the entire electronic device 100 through various interfaces and lines, and by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120, it executes various functions of the electronic device 100 and processes data. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 110 can integrate one or several combinations of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed; the modem is used to process wireless communication. It can be understood that the above modem can also not be integrated into the processor 110 and can be implemented separately through a communication chip.

[0162] The memory 120 may include a Random Access Memory (RAM), or may also include a Read-Only Memory. The memory 120 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area. Among them, 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 created during the use of the electronic device 100 (such as a phone book, audio and video data, chat record data, etc.).

[0163] Please refer to Figure 13 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code is stored in the computer-readable medium 500, and the program code can be called by a processor to execute the method described in the above method embodiments.

[0164] The computer-readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 500 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 500 has a storage space for the program code 510 for executing any method step in the above method. These program codes can be read out from or written into one or more computer program products. The program code 510 can be compressed in an appropriate form, for example.

[0165] 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 foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and 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 method for controlling a vehicle debugging function, characterized in that: The method comprises: Acquire vehicle information and a first random number sent by a debugging device, wherein the vehicle information and the first random number are sent to the debugging device after the debugging device is verified by a vehicle that is in communication connection with the debugging device; Obtaining the identity certificate and the first public key sent by the debugging device; If it is determined that the identity certificate is qualified and a first private key corresponding to the first public key exists in the debugging device, a first signature is determined according to a second private key, the vehicle information and the first random number; The first signature is sent to the debugging device so that the debugging device forwards the first signature to the vehicle, and the first signature is used by the vehicle to verify according to the second public key corresponding to the second private key, and the debugging function of the vehicle is turned on if the verification passes.

2. The method according to claim 1, characterized in that The identity certificate includes account information and a second signature. If it is determined that the identity certificate is qualified and there is a first private key corresponding to the first public key in the debugging device, before determining the first signature according to the second private key, the vehicle information and the first random number, it also includes: Determine a third signature according to a third public key and the account information, wherein the third public key is generated during the process of generating the identity certificate; If it is determined that the third signature matches the second signature, the identity certificate is determined to be qualified, and a second random number is sent to the debugging device; Obtaining a fourth signature sent by the debugging device, wherein the fourth signature is determined by the debugging device according to a preset private key and the second random number; If the fourth signature is successfully verified according to the first public key, it is determined that a first private key corresponding to the first public key exists in the debugging device, and the preset private key is determined as the first private key.

3. The method according to claim 2, characterized in that Before obtaining the identity certificate sent by the debugging device, the method further includes: In response to the certificate issuance request sent by the debugging device, generate account information corresponding to the debugging device, and a third private key and a third public key corresponding to the debugging device; Determine the second signature according to the third private key and the account information; The identity certificate is determined according to the account information and the second signature, and the identity certificate is sent to the debugging device.

4. The method according to any one of claims 1 to 3, characterized in that: The vehicle information includes a vehicle identification code of the vehicle.

5. A method for controlling a vehicle debugging function, characterized in that: The method comprises: After the vehicle verifies the debugging device that is in communication connection with the vehicle and passes the verification, the vehicle information of the vehicle and the first random number are sent to the debugging device; receiving a first signature sent by the debugging device, wherein the first signature is determined by the server according to a second private key, the obtained identity certificate and the first public key sent by the debugging device, when the server obtains the identity certificate and the first public key sent by the debugging device and determines that the identity certificate is qualified and the debugging device has a first private key corresponding to the first public key; If the first signature is successfully verified according to the second public key corresponding to the second private key, the debugging function of the vehicle is turned on.

6. The method according to claim 5, characterized in that After the vehicle verifies the debugging device that is in communication with the vehicle and passes the verification, the vehicle information of the vehicle and the first random number are sent to the debugging device, including: The vehicle obtains the identity certificate and the first public key sent by the debugging device, wherein the identity certificate includes account information and a second signature; If the second signature is verified successfully through the third public key and the account information, and it is determined that the first private key corresponding to the first public key exists in the debugging device, the vehicle information and the first random number are sent to the debugging device.

7. A method for controlling a vehicle debugging function, characterized in that: The method comprises: The debugging device obtains vehicle information and a first random number sent by the vehicle, and sends the vehicle information and the first random number to the server, wherein the vehicle information and the first random number are verified by the debugging device by the vehicle communicating with the debugging device, and sent to the debugging device after verification; Sending the identity certificate and the first public key of the debugging device to the server; Obtaining a first signature sent by the server, where the first signature is determined by the server according to a second private key, the vehicle information, and the first random number when it is determined that the identity certificate is qualified and a first private key corresponding to the first public key exists in the debugging device; The first signature is sent to the vehicle, so that the vehicle verifies the first signature according to a second public key corresponding to the second private key, and turns on the debugging function of the vehicle if the verification passes.

8. The method according to claim 7, characterized in that The obtaining of vehicle information and a first random number sent by the vehicle includes: Sending the identity certificate and the first public key to the vehicle, the identity certificate including the account information and the second signature; When the vehicle verifies the second signature through the third public key and the account information, and the debugging device has a first private key corresponding to the first public key, the vehicle information and the first random number sent by the vehicle are obtained.

9. The method according to claim 7, characterized in that: The identity card includes account information and a second signature, and before obtaining the first signature sent by the server, it also includes: Obtaining a second random number sent by the server, wherein the second random number is sent by the server after determining a third signature based on a third public key and the account information and determining that the third signature matches the second signature and determining that the identity certificate is qualified; Determine a fourth signature according to the preset private key and the second random number; The fourth signature is sent to the server, so that when the server verifies that the fourth signature passes according to the first public key, it is determined that there is a first private key corresponding to the first public key in the debugging device, and the preset private key is determined as the first private key.

10. A control device for a vehicle debugging function, characterized in that: The device comprises: A vehicle information acquisition module, used to acquire vehicle information and a first random number sent by a debugging device, wherein the vehicle information and the first random number are sent to the debugging device after the debugging device is verified by a vehicle that is in communication with the debugging device; An identity certificate acquisition module, used to acquire the identity certificate and the first public key sent by the debugging device; A first signature determination module, configured to determine a first signature according to a second private key, the vehicle information and the first random number if it is determined that the identity certificate is qualified and a first private key corresponding to the first public key exists in the debugging device; The first signature sending module is used to send the first signature to the debugging device so that the debugging device forwards the first signature to the vehicle. The first signature is used by the vehicle to verify according to the second public key corresponding to the second private key, and the debugging function of the vehicle is turned on if the verification passes.

11. A control device for a vehicle debugging function, characterized in that: The device comprises: A vehicle information sending module, configured to send the vehicle information of the vehicle and a first random number to the debugging device in communication connection with the vehicle after the vehicle has verified the debugging device and passed the verification; a first signature receiving module, configured to receive a first signature sent by the debugging device, wherein the first signature is determined by the server according to a second private key, the obtained identity certificate and the first public key sent by the debugging device, when the server obtains the identity certificate and the first public key sent by the debugging device and determines that the identity certificate is qualified and the debugging device has a first private key corresponding to the first public key; The debugging function enabling module is used to enable the debugging function of the vehicle if the first signature is verified successfully according to the second public key corresponding to the second private key.

12. A control device for a vehicle debugging function, characterized in that: The device comprises: A vehicle information forwarding module is used for the debugging device to obtain the vehicle information and the first random number sent by the vehicle, and send the vehicle information and the first random number to the server, wherein the vehicle information and the first random number are verified by the vehicle communicating with the debugging device, and sent to the debugging device after verification; An identity certificate sending module, used to send the identity certificate and the first public key of the debugging device to the server; A first signature acquisition module, used to acquire a first signature sent by the server, wherein the first signature is determined by the server according to a second private key, the vehicle information and the first random number when it is determined that the identity certificate is qualified and a first private key corresponding to the first public key exists in the debugging device; The first signature forwarding module is used to send the first signature to the vehicle, so that the vehicle verifies the first signature according to the second public key corresponding to the second private key, and turns on the debugging function of the vehicle if the verification passes.

13. An electronic device, characterized in that: include: one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-9.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 9.