A kind of method and system remotely controlled for vehicle safety with diagnosis
Technical field
The present invention relates to a kind of field of vehicle safety, specifically, relate to it is a kind of remotely control for vehicle safety and
The method and system of diagnosis.
Background technique
With the universal of perfect, all kinds of mobile terminals, the rapid development of intellectualized technology and the vehicle of wireless network covering
The extensive use of MCU or ECU, people are higher and higher to the intelligent demand of automobile, currently, for remotely starting vehicle, remote
Cheng Kaiguan vehicle air conditioning, remote switch vehicle window, remotely drive vehicle, the vehicles such as remote diagnosis of vehicle's fault long-range control with far
Journey diagnostic techniques greatly facilitates use of the people for vehicle, also facilitates the timely remote diagnosis of vehicle manufacturer and collects vehicle letter
Breath.
However, vehicle it is long-range control and remote diagnosis while bringing convenient and efficient practical, there is also
Very important security risk.For example, the remote control commands of hacker or the people hijack legitimate user with malicious attack behavior,
Replay Attack is carried out with operating and controlling vehicle;Or information between user terminal and car-mounted terminal is stolen by network interceptor, thus
Obtain vehicle basic information, control instruction, diagnostic instruction and diagnostic result, vehicle location, user information etc., to legitimate user or
Vehicle manufacturers cause economic loss or other adverse effects.
In order to solve the above problems, people are seeking always a kind of ideal technical solution.
Summary of the invention
The purpose of the present invention is in view of the deficiencies of the prior art, to provide a kind of design science, practical, convenient fast
A kind of method and system remotely controlled for vehicle safety with diagnosis prompt, highly-safe, reliability is high.
To achieve the goals above, the technical scheme adopted by the invention is that: one kind remotely control for vehicle safety and
The system of diagnosis, including control diagnosis terminal, communicate to connect cloud commander server and the first security module, are used for and the cloud
Commander server is held to carry out the first authentication and key agreement;First security module communicates to connect the control diagnosis terminal,
The command information sent for receiving the control diagnosis terminal, returns to the control diagnosis terminal after encryption or decryption;Vehicle
Mounted terminal communicates to connect the second security module and wirelessly communicates to connect cloud commander server, takes for instructing with the cloud
Business device carries out the second authentication and key agreement;Second security module, communicates to connect the car-mounted terminal and vehicle control is examined
Disconnected module, the command information sent for receiving the car-mounted terminal return to the car-mounted terminal after encryption or decryption, simultaneously
For the control diagnostic instruction after decryption to be sent to the vehicle control diagnostic module, and receive the vehicle control diagnosis mould
The return information of block is sent to the car-mounted terminal after encryption;Cloud commander server communicates to connect the control diagnosis terminal
With encryption authentication module, and the car-mounted terminal is wirelessly communicated to connect, for recognizing by encryption authentication module processing identity
Card and key agreement task;Authentication module is encrypted, the cloud commander server is communicated to connect, for receiving the cloud instruction
The cloud commander server is returned to after the command information that server is sent, encryption or decryption;Vehicle control diagnostic module leads to
Letter connects second security module, the control diagnostic instruction sent for receiving second security module, and will execute knot
Fruit returns to second security module.
Based on above-mentioned, the vehicle control diagnostic module is thermoacoustic prime engine MCU or ECU.
Based on above-mentioned, first security module and second security module are respectively a kind of secure private chip, branch
The commercial cipher algorithm held includes at least one of SM1, SM2 or SM3;The world of support commonly use cryptographic algorithm include 3DES,
At least one of AES, RSA or SHA-1.
A method of it is remotely controlled for vehicle safety and diagnosis, comprising:
Step 1, control diagnosis terminal and cloud commander server carry out the first authentication and key agreement;
Step 2, car-mounted terminal and cloud commander server carry out the second authentication and key agreement;
Step 3, the control diagnosis terminal establishes communication link by the cloud commander server and the car-mounted terminal
It connects, and according to the control diagnostic instruction of user vehicle is remotely controlled or remote diagnosis.
Based on above-mentioned, the step 1 includes:
Step 1.1, the control diagnosis terminal controls the first security module and generates the first authentication information and first close
Key negotiates solicited message, and first authentication information and the first key are negotiated solicited message and are sent to the cloud
Hold commander server;
Step 1.2, the cloud commander server receives and by first authentication information and the first key
Negotiate solicited message and is sent to encryption authentication module;
Step 1.3, the encryption authentication module verifies first authentication information and first key negotiation is asked
After asking information legal, the first data encryption key is calculated according to preset Key Exchange Protocol, then generates first key association
Quotient's return information simultaneously returns to the cloud commander server;
Step 1.4, first key negotiation return information is returned to the control and examined by the cloud commander server
Disconnected terminal, and the safe condition of the control diagnosis terminal currently connected is recorded as key swap status;
Step 1.5, the control diagnosis terminal sends first key negotiation return information to first safety
Module, while the equipment safety state for recording itself is key swap status;
Step 1.6, first security module negotiates return information, confirmation message number according to the first key received
According to correctness and after calculating and obtaining first data encryption key, return to first key negotiation to the control diagnosis terminal
Complete information;
Step 1.7, the equipment safety state that the control diagnosis terminal updates itself is key agreement completion status, and will
The first key negotiates completion information and is sent to the cloud commander server;
Step 1.8, first key negotiation completion information is sent to the encryption and recognized by the cloud commander server
Card module is to confirm key agreement success, and then the cloud commander server examines the control being currently attached with it
The safe condition update of disconnected terminal is recorded as key agreement completion status.
Based on above-mentioned, the step 2 includes:
Step 2.1, the car-mounted terminal controls second security module and generates the second authentication information and second close
Key negotiates solicited message, and second authentication information and the second key negotiation request information are sent to the cloud
Hold commander server;
Step 2.2, the cloud commander server receives and by second authentication information and second key
Negotiate solicited message and is sent to the encryption authentication module;
Step 2.3, the encryption authentication module verifies second authentication information and second key agreement is asked
After asking information legal, the second data encryption key is calculated according to preset Key Exchange Protocol, then generates the second key association
Quotient's return information simultaneously returns to the cloud commander server;
Step 2.4, the cloud commander server sends the second key agreement return information to the vehicle-mounted end
End, and the safe condition of the car-mounted terminal currently connected is recorded as key swap status;
Step 2.5, the car-mounted terminal sends the second key agreement return information to second security module,
The equipment safety state for recording itself simultaneously is key swap status;
Step 2.6, second security module is according to the second key agreement return information received, confirmation message number
According to correctness and after calculating and obtaining second data encryption key, Xiang Suoshu car-mounted terminal returns to the second key agreement and completes
Information;
Step 2.7, it is key agreement completion status that the car-mounted terminal, which updates the equipment safety state of itself, and will be described
Second key agreement completes information and is sent to the cloud commander server;
Step 2.8, second key agreement completion information is sent to the encryption and recognized by the cloud commander server
Card module is to confirm key agreement success, the vehicle-mounted end that then the cloud commander server will be currently attached with it
The safe condition update at end is recorded as key agreement completion status.
Based on above-mentioned, the step 3 includes:
Step 3.1, after the control diagnosis terminal receives control diagnostic instruction, the control diagnosis terminal calling described the
One security module is encrypted using plaintext of first data encryption key to the control diagnostic instruction, and will be after encryption
The first obtained control extension diagnostic instruction is sent to the cloud commander server;
Step 3.2, the cloud commander server is received and is sent to the first control extension diagnostic instruction described
Encrypt authentication module;
Step 3.3, the encryption authentication module decrypts first control extension using first data encryption key
After diagnostic instruction, the plaintext of the control diagnostic instruction is obtained, then again with second data encryption key by the control
The plaintext of diagnostic instruction encrypts, and the second control extension diagnostic instruction obtained after encryption is returned to the cloud command service
Device;The second control extension diagnostic instruction is sent to the car-mounted terminal again by the cloud commander server;
Step 3.4, the car-mounted terminal calls second security module to dock using second data encryption key
The the second control extension diagnostic instruction received is decrypted, and obtains the plaintext of the control diagnostic instruction;Then, described
The control diagnostic instruction is handed to corresponding vehicle control diagnostic module by two security modules;
Step 3.5, the vehicle control diagnostic module executes the control diagnostic instruction, and by the control diagnostic instruction
Implementing result return to second security module, second security module is again by the execution knot of the control diagnostic instruction
Fruit returns to the car-mounted terminal and returns to the control diagnosis terminal by the cloud commander server, and the control is examined
Disconnected terminal returns to the implementing result of the control diagnostic instruction to user.
Based on above-mentioned, the step 3.5 includes:
The implementing result of the control diagnostic instruction is being returned to the vehicle by step 3.5.1, second security module
Before mounted terminal, return again to after the implementing result of the control diagnostic instruction is encrypted with second data encryption key to the vehicle
Mounted terminal;
Step 3.5.2, the cloud commander server are receiving being added with second data for the car-mounted terminal return
After the implementing result of the control diagnostic instruction of key encryption, the encryption authentication module is called to use second data
Encryption key decryption obtains the plaintext of the implementing result of the control diagnostic instruction, then again with first data encryption key
The control diagnosis terminal will be sent to after the plaintext encryption of the implementing result of the control diagnostic instruction;
Step 3.5.3, the control diagnosis terminal call the first security module to use first data encryption key pair
After the implementing result of the control diagnostic instruction is decrypted, the plaintext of the implementing result of the control diagnostic instruction is obtained, and
The plaintext of the implementing result of the control diagnostic instruction is returned into the control diagnosis terminal;
Step 3.5.4, the control diagnosis terminal return to the implementing result of the control diagnostic instruction to user.
Based on above-mentioned, authentication and key are successfully completed in the control diagnosis terminal and the cloud commander server
After negotiation, the control diagnosis terminal is exited;The cloud commander server is deleted after confirming that the control diagnosis terminal is offline
Except the session information with the control diagnosis terminal, while the encryption authentication module deletes first data encryption key;
After the car-mounted terminal and the cloud commander server successfully complete authentication and key agreement, the car-mounted terminal is moved back
Out;The cloud commander server deletes the session information with the car-mounted terminal, together after confirming that the car-mounted terminal is offline
Shi Suoshu encrypts authentication module and deletes second data encryption key.
Based on above-mentioned, the cloud commander server connects at least one described control diagnosis terminal, first identity
Authentication information includes the first identifier information of first security module, and the cloud commander server and control diagnosis are eventually
End establish communication connection after, the cloud commander server by the first identifier information and it is described control diagnosis terminal communication
Connection is associated, to distinguish the different control diagnosis terminals being attached from the cloud commander server;The cloud
Commander server connects at least one described car-mounted terminal, and second authentication information includes second security module
After second identifier information, the cloud commander server and the car-mounted terminal establish communication connection, the cloud command service
The second identifier information and the communication connection of the car-mounted terminal are associated by device, to distinguish and the cloud command service
The different car-mounted terminals that device is attached.
The present invention has substantive distinguishing features outstanding and significant progress compared with the prior art, and specifically, the present invention is logical
It crosses and carries out identity respectively between control diagnosis terminal and cloud commander server, between car-mounted terminal and cloud commander server
Certification, can be effectively prevented illegal user's access system;By to control diagnosis terminal and cloud commander server between, vehicle
Key agreement is carried out between mounted terminal and cloud commander server and the control diagnostic instruction of transmission is encrypted, and is made
Rogue attacks person can not obtain information in plain text, meanwhile, it controls between diagnosis terminal and cloud commander server, car-mounted terminal and cloud
It holds and uses different keys between commander server, further ensured the information security of long-range control diagnostic message, effectively
Solve the problems, such as that prior art safety is insufficient, with design science, practical, convenient and efficient, highly-safe, reliable
Spend high advantage.
Detailed description of the invention
Fig. 1 is the composition block diagram of present system.
Fig. 2 is another composition block diagram of present system.
Specific embodiment
Below by specific embodiment, technical scheme of the present invention will be described in further detail.
As depicted in figs. 1 and 2, a kind of system remotely controlled for vehicle safety with diagnosis, including control diagnosis terminal,
Cloud commander server and the first security module are communicated to connect, for carrying out the first authentication with the cloud commander server
And key agreement;First security module communicates to connect the control diagnosis terminal, sends for receiving the control diagnosis terminal
Command information, encryption or decryption after return again to the control diagnosis terminal;Car-mounted terminal communicates to connect the second security module
And cloud commander server is wirelessly communicated to connect, for carrying out the second authentication and key association with the cloud commander server
Quotient;Second security module communicates to connect the car-mounted terminal and vehicle control diagnostic module, for receiving the car-mounted terminal hair
The car-mounted terminal is returned to after the command information sent, encryption or decryption, while for the control diagnostic instruction hair after decrypting
The vehicle control diagnostic module is given, and receives the return information of the vehicle control diagnostic module, institute is sent to after encryption
State car-mounted terminal;Cloud commander server communicates to connect the control diagnosis terminal and encryption authentication module, and wireless communication link
The car-mounted terminal is connect, for handling authentication and key agreement task by the encryption authentication module;Encryption certification mould
Block communicates to connect the cloud commander server, the command information sent for receiving the cloud commander server, encryption or
The cloud commander server is returned to after decryption;Vehicle control diagnostic module communicates to connect second security module, is used for
The control diagnostic instruction that second security module is sent is received, and implementing result is returned into second security module.
When stating the system for remotely controlling and diagnosing for vehicle safety in use, comprising: step 1, control diagnosis terminal
The first authentication and key agreement are carried out with cloud commander server;Step 2, car-mounted terminal and cloud commander server carry out
Second authentication and key agreement;Step 3, the control diagnosis terminal by the cloud commander server with it is described vehicle-mounted
Terminal establishes communication connection, and is remotely controlled vehicle according to the control diagnostic instruction of user or remote diagnosis.
Specifically, control diagnosis terminal carries out the first authentication with cloud commander server and key agreement includes:
Step 1.1, the control diagnosis terminal controls the first security module and generates the first authentication information and first close
Key negotiates solicited message, and first authentication information and the first key are negotiated solicited message and are sent to the cloud
Hold commander server;
Step 1.2, the cloud commander server receives and by first authentication information and the first key
Negotiate solicited message and is sent to encryption authentication module;
Step 1.3, the encryption authentication module verifies first authentication information and first key negotiation is asked
After asking information legal, the first data encryption key is calculated according to preset Key Exchange Protocol, then generates first key association
Quotient's return information simultaneously returns to the cloud commander server, wherein it includes described first that the first key, which negotiates return information,
Data encryption key;
Step 1.4, first key negotiation return information is returned to the control and examined by the cloud commander server
Disconnected terminal, and the safe condition of the control diagnosis terminal currently connected is recorded as key swap status;
Step 1.5, the control diagnosis terminal sends first key negotiation return information to first safety
Module, while the equipment safety state for recording itself is key swap status;
Step 1.6, first security module negotiates return information, confirmation message number according to the first key received
According to correctness and after calculating and obtaining first data encryption key, return to first key negotiation to the control diagnosis terminal
Complete information;
Step 1.7, the equipment safety state that the control diagnosis terminal updates itself is key agreement completion status, and will
The first key negotiates completion information and is sent to the cloud commander server;
Step 1.8, first key negotiation completion information is sent to the encryption and recognized by the cloud commander server
Card module is to confirm key agreement success, and then the cloud commander server examines the control being currently attached with it
The safe condition update of disconnected terminal is recorded as key agreement completion status.
Car-mounted terminal carries out the second authentication with cloud commander server and key agreement includes:
Step 2.1, the car-mounted terminal controls second security module and generates the second authentication information and second close
Key negotiates solicited message, and second authentication information and the second key negotiation request information are sent to the cloud
Hold commander server;
Step 2.2, the cloud commander server receives and by second authentication information and second key
Negotiate solicited message and is sent to the encryption authentication module;
Step 2.3, the encryption authentication module verifies second authentication information and second key agreement is asked
After asking information legal, the first data encryption key calculates the second data encryption key, then generates the reply of the second key agreement
Information simultaneously returns to the cloud commander server, wherein the second key agreement return information includes that second data add
Key;
Step 2.4, the cloud commander server sends the second key agreement return information to the vehicle-mounted end
End, and the safe condition of the car-mounted terminal currently connected is recorded as key swap status;
Step 2.5, the car-mounted terminal sends the second key agreement return information to second security module,
The equipment safety state for recording itself simultaneously is key swap status;
Step 2.6, second security module is according to the second key agreement return information received, confirmation message number
According to correctness and after calculating and obtaining second data encryption key, Xiang Suoshu car-mounted terminal returns to the second key agreement and completes
Information;
Step 2.7, it is key agreement completion status that the car-mounted terminal, which updates the equipment safety state of itself, and will be described
Second key agreement completes information and is sent to the cloud commander server;
Step 2.8, second key agreement completion information is sent to the encryption and recognized by the cloud commander server
Card module is to confirm key agreement success, the vehicle-mounted end that then the cloud commander server will be currently attached with it
The safe condition update at end is recorded as key agreement completion status.
The control diagnosis terminal establishes communication connection with the car-mounted terminal by the cloud commander server
Step 3.1, user receives institute in the control diagnosis terminal input control diagnostic instruction, the control diagnosis terminal
After stating control diagnostic instruction, the control diagnosis terminal calls first security module to use first data encryption key
The plaintext of the control diagnostic instruction is encrypted, and the first control extension diagnostic instruction obtained after encryption is sent to institute
State cloud commander server;
Step 3.2, the cloud commander server is received and is sent to the first control extension diagnostic instruction described
Encrypt authentication module;
Step 3.3, the encryption authentication module decrypts first control extension using first data encryption key
After diagnostic instruction, the plaintext of the control diagnostic instruction is obtained, then again with second data encryption key by the control
The plaintext of diagnostic instruction encrypts, and the second control extension diagnostic instruction obtained after encryption is returned to the cloud command service
Device;The second control extension diagnostic instruction is sent to the car-mounted terminal again by the cloud commander server;
Step 3.4, the car-mounted terminal calls second security module to dock using second data encryption key
The the second control extension diagnostic instruction received is decrypted, and obtains the plaintext of the control diagnostic instruction;Then, described
The control diagnostic instruction is handed to corresponding vehicle control diagnostic module by two security modules;
Step 3.5, the vehicle control diagnostic module executes the control diagnostic instruction, and by the control diagnostic instruction
Implementing result return to second security module, second security module is again by the execution knot of the control diagnostic instruction
Fruit returns to the car-mounted terminal and returns to the control diagnosis terminal by the cloud commander server, and the control is examined
Disconnected terminal returns to the implementing result of the control diagnostic instruction to user.
Preferably, include: when the step 3.5 implements
The implementing result of the control diagnostic instruction is being returned to the vehicle by step 3.5.1, second security module
Before mounted terminal, return again to after the implementing result of the control diagnostic instruction is encrypted with second data encryption key to the vehicle
Mounted terminal;
Step 3.5.2, the cloud commander server are receiving being added with second data for the car-mounted terminal return
After the implementing result of the control diagnostic instruction of key encryption, the encryption authentication module is called to use second data
Encryption key decryption obtains the plaintext of the implementing result of the control diagnostic instruction, then again with first data encryption key
The control diagnosis terminal will be sent to after the plaintext encryption of the implementing result of the control diagnostic instruction;
Step 3.5.3, the control diagnosis terminal call the first security module to use first data encryption key pair
After the implementing result of the control diagnostic instruction is decrypted, the plaintext of the implementing result of the control diagnostic instruction is obtained, and
The plaintext of the implementing result of the control diagnostic instruction is returned into the control diagnosis terminal;
Step 3.5.4, the control diagnosis terminal return to the implementing result of the control diagnostic instruction to user.
In specifically control example, the control diagnostic instruction is the control instruction or long-range for remotely controlling vehicle
The diagnostic instruction of vehicle is diagnosed, the control instruction for remotely controlling vehicle includes: the instruction for controlling engine start and stop, control vehicle
The finger that the instruction for carrying air-conditioning start and stop, the instruction for controlling window lifting, the instruction for controlling lighting switch, control vehicle-mounted camera switch
Instruction, the instruction of control vehicle brake, the instruction for controlling Vehicular turn, control vehicle speed variation for enabling, controlling vehicle electric throttle
The instruction of device gear and the instruction of control car door electric control door lock switch;Diagnostic instruction for remote diagnosis vehicle includes: power
Powertrain systems diagnostic instruction, chassis control system diagnostic instruction, body control system diagnostic instruction, on-vehicle information and Communication Control
System diagnostics instruction and backup control system diagnostic instruction.
When specifically selecting chipset, first security module and second security module can be using safety
Special chip, the commercial cipher algorithm supported includes at least one of SM1, SM2 or SM3, it is also as one such or
A variety of combinations;It includes at least one of 3DES, AES, RSA or SHA-1 that cryptographic algorithm is commonly used in the world of support.The safety
The available cryptographic service of special chip includes: for storing individual digital letter of identity and signature private key, mentioning for mobile terminal
For digital signature, signature verification and data encrypting and deciphering, secure memory space is provided in the secure private chip, it is close for saving
Key and user's private data, the hardware interface that the secure private chip is supported includes: SPI, SD and USB.
It is described control diagnosis terminal be insertion or be embedded with first security module have wirelessly and/or wire communication
The equipment of function, including smart phone, tablet computer, laptop and desktop computer.
The car-mounted terminal is that the front end for the vehicle monitoring management system for being inserted into or being embedded with second security module is set
It is standby, comprising: wireless communication module, GPS module, vehicle-mounted LCD touch screen, video server, External video camera, talking handle and vehicle
Alarm.
The encryption authentication module is inside the cloud commander server for executing the mould of certification and cryptographic tasks
Block or the independent encryption certificate server being connected by network with the cloud commander server.
The vehicle control diagnostic module is thermoacoustic prime engine MCU or ECU, comprising: on-vehicle information and communication control system
ECU, power drive system ECU, chassis control system ECU, body control system ECU and backup control system ECU.
In other embodiments, in order to further ensure communication security, refer in the control diagnosis terminal with the cloud
After enabling server successfully complete authentication and key agreement, the control diagnosis terminal is exited;The cloud commander server
After confirming that the control diagnosis terminal is offline, the session information with the control diagnosis terminal is deleted, while the encryption is recognized
It demonstrate,proves module and deletes first data encryption key;Identity is successfully completed in the car-mounted terminal and the cloud commander server
After certification and key agreement, the car-mounted terminal is exited;The cloud commander server after confirming that the car-mounted terminal is offline,
The session information with the car-mounted terminal is deleted, while the encryption authentication module deletes second data encryption key.
It should be strongly noted that the cloud commander server connects at least one described control diagnosis terminal, it is described
First authentication information includes the first identifier information of first security module, the cloud commander server and the control
After diagnosis terminal processed establishes communication connection, the cloud commander server diagnoses the first identifier information and the control eventually
The communication connection at end is associated, to distinguish the different control diagnosis being attached from the cloud commander server eventually
End;
The cloud commander server connects at least one described car-mounted terminal, and second authentication information includes institute
The second identifier information of the second security module is stated, after the cloud commander server and the car-mounted terminal establish communication connection,
The second identifier information and the communication connection of the car-mounted terminal are associated by the cloud commander server, to distinguish
The different car-mounted terminals being attached from the cloud commander server.
Finally it should be noted that: the above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof;To the greatest extent
The present invention is described in detail with reference to preferred embodiments for pipe, it should be understood by those ordinary skilled in the art that: still
It can modify to a specific embodiment of the invention or some technical features can be equivalently replaced;Without departing from this hair
The spirit of bright technical solution should all cover within the scope of the technical scheme claimed by the invention.