Smart vehicle communication method and related device
View Patent ↗A communication method includes obtaining, from a second electronic device, an operation request comprising a temporary key and a control instruction; checking the temporary key; performing a time validity check based on a first valid time period, wherein the first valid time period corresponds to the temporary key and is stored in a security system of a vehicle; and operating, based on the control instruction, the vehicle when checking the temporary key and the time validity check have succeeded.
1 . A method implemented by a vehicle, wherein the method comprises:
obtaining, from a second electronic device, an operation request comprising a temporary key and a control instruction;
checking the temporary key;
performing a time validity check based on a first valid time period corresponding to the temporary key;
operating, based on the control instruction, the vehicle when checking the temporary key and the time validity check have succeeded;
receiving, from the second electronic device, encrypted data based on encryption of a temporary credential of a first electronic device and the first valid time period using a smart vehicle key, wherein the temporary credential is based on the smart vehicle key and the first valid time period;
decrypting, using the smart vehicle key, the encrypted data to obtain the temporary credential and the first valid time period;
checking the temporary credential and the first valid time period;
generating the temporary key when checking the temporary credential and the first valid time period have succeeded;
encrypting, based on the encrypted data, the temporary key to obtain an encrypted temporary key; and
sending, to the second electronic device, the encrypted temporary key.
2 . The method of claim 1 , wherein before obtaining the operation request, the method further comprises:
obtaining a vehicle use request comprising the first valid time period;
generating, based on the first valid time period, the temporary key; and
sending, to a server, the temporary key.
3 . The method of claim 2 , wherein obtaining the vehicle use request comprises receiving, from the first electronic device in a short-range communication manner, the vehicle use request.
4 . The method of claim 2 , wherein obtaining the vehicle use request comprises receiving, from the first electronic device through a mobile network, the vehicle use request.
5 . The method of claim 2 , wherein obtaining the vehicle use request comprises receiving, from a vehicle rental platform, the vehicle use request.
6 . The method of claim 2 , further comprising signing the smart vehicle key using a private key to obtain a signed smart vehicle key, wherein the vehicle use request further comprises the signed smart vehicle key and wherein after obtaining the vehicle use request, the method further comprises:
receiving, from the first electronic device, a first public key; and
performing a first signature verification on the signed smart vehicle key based on the first public key.
7 . The method of claim 6 , further comprising sending, to the first electronic device, a certificate comprising vehicle identity identification information and a second public key, wherein the certificate is signed by a third-party authority and verifies the second public key.
8 . The method of claim 6 , further comprising verifying, based on a certificate, the first public key.
9 . The method of claim 8 , wherein before verifying the first public key, the method further comprises receiving, from the first electronic device, the certificate, wherein the certificate comprises identity information of the first electronic device and the first public key, and wherein the certificate is signed by a third-party authority.
10 . The method of claim 9 , further comprising:
pre-storing a root certificate for checking the certificate; and
performing a second signature verification on the certificate based on the root certificate.
11 . The method of claim 6 , wherein the first valid time period is encrypted using the smart vehicle key, and wherein the method further comprises:
decrypting, using the smart vehicle key, an encrypted first valid time period to obtain a decrypted first valid time period; and
performing secure storage on the decrypted first valid time period.
12 . The method of claim 1 , wherein after generating the temporary key, the method further comprises performing secure storage on the first valid time period.
13 . The method of claim 1 , wherein the operation request comprises the encrypted temporary key that is based on a first public key, and wherein before checking the temporary key, the method further comprises decrypting, using a private key, the encrypted temporary key to obtain the temporary key.
14 . The method of claim 13 , further comprising sending, to the second electronic device, a certificate comprising vehicle identity identification information and the first public key, wherein the certificate is signed by a third-party authority and verifies the first public key.
15 . The method of claim 13 , further comprising:
receiving, from the second electronic device, a second public key; and
verifying, based on a certificate, the second public key.
16 . The method of claim 15 , wherein before verifying the second public key, the method further comprises receiving, from the second electronic device, the certificate, wherein the certificate comprises identity information of the second electronic device and the second public key, and wherein the certificate is signed by a third-party authority.
17 . A vehicle comprising:
a memory configured to store instructions; and
one or more processors coupled to the memory, wherein when executed by the one or more processors, the instructions cause the vehicle to:
obtain an operation request comprising a temporary key and a control instruction;
check the temporary key;
perform a time validity check based on a valid time period corresponding to the temporary key;
operate, based on the control instruction, the vehicle when checking the temporary key and the time validity check have succeeded;
receive encrypted data based on encryption of a temporary credential of a first electronic device and the valid time period using a smart vehicle key, wherein the temporary credential is based on the smart vehicle key and the valid time period;
decrypt, using the smart vehicle key, the encrypted data to obtain the temporary credential and the valid time period;
check the temporary credential and the valid time period;
generate the temporary key when checking the temporary credential and the valid time period have succeeded;
encrypt, based on the encrypted data, the temporary key to obtain an encrypted temporary key; and
send the encrypted temporary key.
18 . A computer program product comprising computer-executable instructions that are stored on a non-transitory computer-readable storage medium and that, when executed by one or more processors, cause a vehicle to:
obtain an operation request comprising a temporary key and a control instruction;
check the temporary key;
perform a time validity check based on a first valid time period corresponding to the temporary key;
operate, based on the control instruction, the vehicle when checking the temporary key and the time validity check have succeeded;
receive encrypted data based on encryption of a temporary credential of a first electronic device and the first valid time period using a smart vehicle key, wherein the temporary credential is based on the smart vehicle key and the first valid time period;
decrypt, using the smart vehicle key, the encrypted data to obtain the temporary credential and the first valid time period;
check the temporary credential and the first valid time period;
generate the temporary key when checking the temporary credential and the first valid time period have succeeded;
encrypt, based on the encrypted data, the temporary key to obtain an encrypted temporary key; and
send the encrypted temporary key.