CN113404390B - Method and device for sharing digital vehicle key, computer equipment and storage medium - Google Patents

Method and device for sharing digital vehicle key, computer equipment and storage medium Download PDF

Info

Publication number
CN113404390B
CN113404390B CN202110777616.XA CN202110777616A CN113404390B CN 113404390 B CN113404390 B CN 113404390B CN 202110777616 A CN202110777616 A CN 202110777616A CN 113404390 B CN113404390 B CN 113404390B
Authority
CN
China
Prior art keywords
public key
intelligent
master
intelligent device
encryption state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110777616.XA
Other languages
Chinese (zh)
Other versions
CN113404390A (en
Inventor
万勇
刘志平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yunzhi Yilian Technology Co ltd
Original Assignee
Shenzhen Yunzhi Yilian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yunzhi Yilian Technology Co ltd filed Critical Shenzhen Yunzhi Yilian Technology Co ltd
Priority to CN202110777616.XA priority Critical patent/CN113404390B/en
Publication of CN113404390A publication Critical patent/CN113404390A/en
Application granted granted Critical
Publication of CN113404390B publication Critical patent/CN113404390B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • EFIXED CONSTRUCTIONS
    • E05LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
    • E05BLOCKS; ACCESSORIES THEREFOR; HANDCUFFS
    • E05B19/00Keys; Accessories therefor
    • EFIXED CONSTRUCTIONS
    • E05LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
    • E05BLOCKS; ACCESSORIES THEREFOR; HANDCUFFS
    • E05B51/00Operating or controlling locks or other fastening devices by other non-mechanical means
    • EFIXED CONSTRUCTIONS
    • E05LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
    • E05BLOCKS; ACCESSORIES THEREFOR; HANDCUFFS
    • E05B71/00Locks specially adapted for bicycles, other than padlocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • G06K17/0025Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device the arrangement consisting of a wireless interrogation device in combination with a device for optically marking the record carrier

Abstract

The embodiment of the invention discloses a method, a device, computer equipment and a storage medium for sharing a digital car key, which comprises the following steps: if the authorization request is detected, sending the authorization request to the main intelligent device; if a registration request sent by the non-master intelligent device is received, acquiring authorization information of the master intelligent device, and registering the non-master intelligent device; requesting a non-owner public key from the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state; decrypting it to obtain a non-owner public key; encrypting the intelligent lock public key according to the non-owner public key to obtain the intelligent lock public key in the second encryption state and sending the intelligent lock public key to the non-master intelligent equipment so that the non-master intelligent equipment decrypts and verifies the intelligent lock public key and sends the vehicle key certificate in the first encryption state; and sending authorization success information to the non-master intelligent device according to the vehicle key certificate in the first encryption state. The invention can share the digital car key to other users.

Description

Method and device for sharing digital vehicle key, computer equipment and storage medium
Technical Field
The invention relates to the field of vehicle control equipment, in particular to a method and a device for sharing a digital vehicle key, computer equipment and a storage medium.
Background
At present, the switch lock and the ignition of a motorcycle or an electric vehicle (two-wheel vehicle) can be operated by using a vehicle key, the traditional vehicle key can be unlocked and ignited only by physically contacting the motorcycle or the electric vehicle, although a few operations for realizing the switch lock and the ignition through wireless control are already carried out, a physical vehicle key is still needed, however, the motorcycle and the electric vehicle are used as a convenient vehicle, the requirement that the motorcycle or the electric vehicle needs to be lent to relatives, friends or colleagues exists in daily use, the existing lending mode is to lend the vehicle key to people needing to use the vehicle, namely, the distance between a vehicle owner and the person borrowing the vehicle is required to be closer, certain risks exist, and the inconvenience is very high.
Disclosure of Invention
The embodiment of the invention provides a method and a device for sharing a digital car key, computer equipment and a storage medium, which can share the digital car key to other intelligent equipment, so that the intelligent equipment can unlock an intelligent lock, and the convenience is improved.
In a first aspect, an embodiment of the present invention provides a method for sharing digital car keys, where the method specifically includes: if an authorization request is detected, sending the authorization request to a main intelligent device so that the main intelligent device can authorize non-main intelligent devices;
if a registration request sent by the non-master intelligent device is received, acquiring authorization information of the master intelligent device, and registering the non-master intelligent device;
if the registration of the non-master intelligent device is finished, requesting a non-owner public key from the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state;
if the non-owner public key in the first encryption state is received, decrypting the non-owner public key to obtain the non-owner public key;
encrypting the intelligent lock public key according to the non-owner public key to obtain an intelligent lock public key in a second encryption state and sending the intelligent lock public key to the non-master intelligent equipment so that the non-master intelligent equipment decrypts and verifies the intelligent lock public key and sends a vehicle key certificate in a first encryption state;
and sending authorization success information to the non-master intelligent device according to the vehicle key certificate in the first encryption state.
In a second aspect, an embodiment of the present invention further provides a device for sharing digital car keys, where the device specifically includes: the first request unit is used for sending an authorization request to a main intelligent device to enable the main intelligent device to authorize non-main intelligent devices if the authorization request is detected;
the first registration unit is used for acquiring the authorization information of the main intelligent device and registering the non-main intelligent device if a registration request sent by the non-main intelligent device is received;
the second request unit is used for requesting a non-owner public key to the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state if the registration of the non-master intelligent device is completed;
the first decryption unit is used for decrypting the non-owner public key in the first encryption state to obtain the non-owner public key if the non-owner public key in the first encryption state is received;
the first encryption unit is used for encrypting the intelligent lock public key according to the non-owner public key to obtain the intelligent lock public key in a second encryption state and sending the intelligent lock public key to the non-master intelligent equipment so that the non-master intelligent equipment decrypts and verifies the intelligent lock public key and sends a vehicle key certificate in a first encryption state;
and the first sending unit is used for sending authorization success information to the non-main intelligent equipment according to the vehicle key certificate in the first encryption state.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program.
In a fourth aspect, the present invention also provides a computer-readable storage medium, which stores a computer program, and the computer program can implement the above method when being executed by a processor.
The embodiment of the invention provides a method, a device, computer equipment and a storage medium for sharing digital car keys, wherein the method comprises the following steps: if an authorization request is detected, sending the authorization request to a main intelligent device so that the main intelligent device authorizes a non-main intelligent device; if a registration request sent by the non-master intelligent device is received, acquiring authorization information of the master intelligent device, and registering the non-master intelligent device; if the registration of the non-master intelligent device is finished, requesting a non-owner public key from the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state; if the non-owner public key in the first encryption state is received, decrypting the non-owner public key to obtain the non-owner public key; encrypting the intelligent lock public key according to the non-owner public key to obtain an intelligent lock public key in a second encryption state and sending the intelligent lock public key to the non-master intelligent equipment so that the non-master intelligent equipment decrypts and verifies the intelligent lock public key and sends a vehicle key certificate in a first encryption state; and sending authorization success information to the non-master intelligent device according to the vehicle key certificate in the first encryption state. The embodiment of the invention authorizes the non-master intelligent device through the master intelligent device when detecting the authorization request, thereby allowing the registration between the non-master intelligent device and the intelligent lock, acquiring the authorization information through the registration of the non-master intelligent device, and finally completing the authorization of the non-master intelligent device through the verification between the non-master intelligent device and the intelligent lock, thereby allowing the non-master intelligent device to open the intelligent lock.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for sharing a digital car key according to an embodiment of the present invention;
fig. 2 is a schematic sub-flow diagram of a method for sharing a digital car key according to an embodiment of the present invention
Fig. 3 is a schematic sub-flow chart of a method for sharing a digital car key according to an embodiment of the present invention;
fig. 4 is a schematic sub-flow chart of a method for sharing a digital car key according to an embodiment of the present invention;
fig. 5 is a schematic flowchart illustrating a method for sharing digital car keys according to another embodiment of the present invention;
fig. 6 is a schematic sub-flow chart of a method for sharing a digital car key according to another embodiment of the present invention;
fig. 7 is a schematic sub-flow chart of a method for sharing a digital car key according to another embodiment of the present invention;
FIG. 8 is a schematic block diagram of a digital vehicle key sharing apparatus provided by an embodiment of the present invention;
fig. 9 is a schematic block diagram of an authorization request unit of a device sharing digital car keys according to an embodiment of the present invention
Fig. 10 is a schematic block diagram of a first encryption unit of the digital car key sharing device according to the embodiment of the present invention;
fig. 11 is a schematic block diagram of a first transmitting unit of the digital car key sharing device according to the embodiment of the present invention;
FIG. 12 is a schematic block diagram of a digital car key sharing apparatus according to another embodiment of the present invention;
fig. 13 is a schematic block diagram of a fifth transmitting unit of the digital car key sharing device according to another embodiment of the present invention;
fig. 14 is a schematic block diagram of a first starting unit of a digital car key sharing device according to another embodiment of the present invention;
fig. 15 is a schematic block diagram of an intelligent device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for sharing a digital car key according to an embodiment of the present invention. The method for sharing the digital car key can be applied to the intelligent lock of the motorcycle or the electric car. The method of the invention not only can carry out the locking and unlocking and ignition operations on the motorcycle or the electric vehicle through the digital vehicle key, but also can share the digital vehicle key to other equipment, so that other users can also carry out the locking and unlocking and ignition operations on the motorcycle or the electric vehicle through the digital vehicle key.
S110, if the authorization request is detected, the authorization request is sent to the main intelligent device so that the main intelligent device can authorize the non-main intelligent device.
In the embodiment of the present invention, the master smart device generally refers to a smart device bound by a vehicle owner and a motorcycle or an electric vehicle (hereinafter, described as an electric vehicle), and the non-master smart device generally refers to a smart device that needs to obtain authorization from the master smart device due to a lease relationship with the vehicle owner. When a user needs to rent the electric vehicle, the user can scan the two-dimensional code on the electric vehicle through the mobile phone to send an authorization request to the intelligent lock of the electric vehicle. The intelligent lock is a lock arranged in the electric vehicle and used for controlling the opening and closing of the electric vehicle and ignition.
In some embodiments, such as this embodiment, as shown in FIG. 2, the step S110 may include steps S111-S112.
And S111, if the sharing authorization request sent by the non-main intelligent device is detected, sending the information of the non-main intelligent device to a vehicle owner to acquire the authorization information, wherein the authorization information comprises an authorizer and an authorization mode.
In the embodiment of the invention, the non-master intelligent device sends an authorization request to the intelligent lock by scanning the two-dimensional code, the intelligent lock can send information to the non-master intelligent device after receiving the authorization request, so that the non-master intelligent device sends the authorization request to the intelligent lock cloud platform, the intelligent lock cloud platform sends the authorization request to the master intelligent device, and the master intelligent device can remind the vehicle owner of the device request authorization after receiving the authorization request and inquire whether the vehicle owner authorizes the vehicle owner or not and an authorization mode, wherein the authorization mode can comprise authorization according to times and authorization according to time, for example, the authorization is cancelled after the unlocking times are successful, or the authorization is cancelled after a certain time. . The intelligent lock cloud platform is used as an intermediate platform between the non-master intelligent device and the master intelligent device, so that the master intelligent device and the non-master intelligent device can exchange information through the intelligent lock cloud platform.
S112, the authorization information, the intelligent lock public key and the vehicle key certificate encrypted by the vehicle owner public key are sent to the non-master intelligent device to complete authorization of the non-master intelligent device.
In the embodiment of the invention, after the main intelligent device obtains the authorization information, the vehicle key certificate is encrypted through the vehicle owner public key, and the intelligent lock public key, the encrypted vehicle key certificate and the authorization information are sent to the non-main intelligent device. The intelligent lock comprises an intelligent lock private key, and can open information encrypted by the intelligent lock public key.
And S120, if a registration request sent by the non-master intelligent device is received, acquiring authorization information of the master intelligent device, and registering the non-master intelligent device.
In the embodiment of the present invention, after obtaining the authorization information of the master smart device, the non-master smart device sends a connection request, which may be a bluetooth connection request, to the smart lock, so as to complete the connection with the smart lock. After the connection is completed, the non-master smart device sends a registration request to the smart lock to facilitate the smart lock to register the authorization information. After the intelligent lock registers the non-main intelligent device according to the authorization information, the ID of the authorized device, what the authorization mode is and the ID of the authorized device can be known, so that subsequent verification is facilitated to complete authorization.
S130, if the registration of the non-master intelligent device is completed, requesting a non-owner public key from the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state.
In the embodiment of the invention, after the registration of the non-master intelligent device is completed, the intelligent lock already acquires the authorization information at the moment, but the non-master intelligent device also already acquires the vehicle key certificate and the intelligent lock public key encrypted by the vehicle owner public key, and then the intelligent lock public key needs to verify the vehicle key certificate so as to confirm the authenticity of the vehicle key certificate. The first step of the verification process is to request a non-owner public key from the non-master intelligent device, the non-master intelligent device corresponds to a non-owner public key after obtaining the authorization information, the non-owner public key is generated by the non-master intelligent device, the non-owner public keys of all the non-master intelligent devices are different, after the non-master intelligent device receives the request of the all-love intelligent lock, the non-owner public key is encrypted by the intelligent lock to generate a non-owner public key in a first encryption state, and the non-owner public key in the first encryption state is sent to the intelligent lock.
S140, if the non-owner public key in the first encryption state is received, decrypting the non-owner public key to obtain the non-owner public key.
In the embodiment of the present invention, after receiving the non-owner public key in the first encryption state, the intelligent lock decrypts the non-owner public key to obtain the non-owner public key, for example, the non-owner intelligent device encrypts the non-owner public key through the intelligent lock public key to obtain the non-owner public key in the first encryption state, and the intelligent lock decrypts the intelligent lock private key through the intelligent lock private key to obtain the non-owner public key.
S150, encrypting the intelligent lock public key according to the non-vehicle owner public key to obtain the intelligent lock public key in the second encryption state, and sending the intelligent lock public key to the non-main intelligent device so that the non-main intelligent device decrypts and verifies the intelligent lock public key and sends the vehicle key certificate in the first encryption state.
In the embodiment of the invention, after the intelligent lock obtains the non-owner public key, the intelligent lock encrypts the intelligent lock public key through the non-owner public key to obtain the intelligent lock public key in the second encryption state, and sends the intelligent lock public key to the non-master intelligent equipment. After the non-master intelligent device receives the intelligent lock public key in the second encryption state, the intelligent lock public key in the second encryption state is encrypted through the non-owner public key, so that the non-master intelligent device can decrypt the intelligent lock public key in the second encryption state through the non-owner private key to obtain the intelligent lock public key, verify the intelligent lock public key and the intelligent lock public key stored on the device, encrypt the vehicle key certificate encrypted by the owner public key through the intelligent lock public key to obtain the vehicle key certificate in the first encryption state after verification is error-free, and send the vehicle key certificate in the first encryption state to the intelligent lock.
In some embodiments, such as this embodiment, as shown in FIG. 3, the step S150 may include steps S151-S154.
And S151, decrypting the intelligent lock public key in the first encryption state according to the non-owner private key to obtain the intelligent lock public key.
In the embodiment of the invention, the non-main intelligent device comprises the non-owner public key and the non-owner private key, and the information encrypted by the non-owner public key can be decrypted by the non-owner private key. In the embodiment of the invention, the intelligent lock public key in the first encryption state is decrypted by the non-owner private key to obtain the intelligent lock public key, and the intelligent lock public key is sent by the intelligent lock and can be verified with the intelligent lock public key stored in the non-owner intelligent device so as to improve the safety.
And S152, verifying the public key of the intelligent lock.
In the embodiment of the present invention, the smart lock public key in the first encryption state sent by the smart lock may be different from the smart lock public key acquired by the non-master smart device from the master smart device, and therefore, verification is required to confirm the association between the smart lock and the non-master smart device.
And S153, if the verification is successful, generating a security code.
In the embodiment of the present invention, after the verification is successful, it indicates that the smart lock is associated with the non-master smart device, and then the non-master smart device generates a security code for the verification in the subsequent steps.
S154, encrypting the vehicle key certificate and the security code according to the public key of the intelligent lock to obtain the vehicle key certificate in the first encryption state and the security code in the first encryption state, and sending the vehicle key certificate in the first encryption state and the security code in the first encryption state.
In the embodiment of the invention, after the security code is generated, the security code and the vehicle key certificate which is obtained from the main intelligent device in advance and encrypted by the vehicle owner public key are encrypted by the intelligent lock public key to obtain the vehicle key certificate in the first encryption state and the security code in the first encryption state, and the vehicle key certificate and the security code are sent to the intelligent lock.
And S160, sending authorization success information to the non-main intelligent equipment according to the vehicle key certificate in the first encryption state.
In the embodiment of the invention, after receiving the car key certificate in the first encryption state, the intelligent lock decrypts the car key certificate through the intelligent lock private key to obtain the car key certificate, the intelligent lock comprises an intelligent lock public key and an intelligent lock private key, the car key certificate is verified through the two pieces of information, when the verification is successful, the information of successful authorization can be sent to the non-master intelligent device, and the non-master intelligent device can feed back the information to inform the master intelligent device through the intelligent lock cloud platform after receiving the information of successful authorization.
In some embodiments, such as this embodiment, the step S160 may include steps S161-S163, as shown in fig. 4.
S161, decrypting the vehicle key certificate in the first encryption state and the security code in the first encryption state according to the private key of the smart lock to obtain the vehicle key certificate and the security code.
And S162, verifying the vehicle key certificate.
In the embodiment of the invention, the vehicle key certificate in the first encryption state and the security code in the first encryption state are respectively decrypted by the private key of the intelligent lock to obtain the vehicle key certificate and the security code. The intelligent lock comprises an intelligent lock private key and an intelligent lock public key, the vehicle key certificate can be verified through the intelligent lock private key and the intelligent lock public key, so that the authenticity of the vehicle key certificate is judged, and the safety code is used for subsequent verification.
And S163, if the verification is successful, encrypting the security code according to the public key of the non-owner to obtain the security code in the first encryption state, and sending the security code to the non-main intelligent device so that the non-main intelligent device verifies the security code to complete the authorization of the non-main intelligent device.
In the embodiment of the invention, when the vehicle key certificate is correct, the security code is encrypted through the non-vehicle owner public key to obtain the security code in the first encryption state and is sent to the non-main intelligent device, when the non-main intelligent device receives the security code in the first encryption state, the non-main intelligent device decrypts the security code through the non-vehicle owner private key to obtain the security code, the security code is compared with the previously generated security code, so that secondary operation is carried out, and if the vehicle key certificate is verified to be correct, the non-main intelligent device sends information of successful authorization to the intelligent lock cloud platform.
In some embodiments, such as this embodiment, as shown in FIG. 5, steps S170-S190 may be included after step S160.
S170, if the unlocking request sent by the non-master intelligent device is detected, sending verification information to the non-master intelligent device so that the non-master intelligent device sends the vehicle key certificate according to the verification information.
In the embodiment of the invention, after the non-master intelligent device is authorized, the non-master intelligent device can control the electric vehicle to be turned on and off by controlling the intelligent lock to be turned on and off. When the non-master intelligent device needs to use the electric vehicle, an unlocking request is sent to the intelligent lock, and after the intelligent lock receives the unlocking request, verification information is sent to the non-master intelligent device to request the non-master intelligent device to send a vehicle key certificate. It should be noted that after the authorization of the non-master smart device is completed, when the non-master smart device needs to be unlocked next time, the unlocking request can be sent only by establishing connection with the smart lock, for example, by connecting with the smart lock through bluetooth.
And S180, verifying the vehicle key certificate.
And S190, if the verification is successful, the intelligent lock is unlocked.
In the embodiment of the invention, after the vehicle key certificate sent by the non-master intelligent device is received, the intelligent lock verifies the vehicle key certificate through the intelligent lock public key and the intelligent lock private key of the intelligent lock, and if the verification is successful, the electric vehicle is directly started.
In some embodiments, such as the present embodiment, the verification information includes first verification information and second verification information, and as shown in fig. 6, the step S170 may include steps S171-S173.
And S171, generating a first random verification code, encrypting the first random verification code according to the public key of the intelligent lock to obtain first verification information, and sending the first verification information to the non-master intelligent device, so that the non-master intelligent device obtains the first random verification code through the first verification information, encrypts the first random verification code to obtain intermediate verification information, and sends the intermediate verification information.
In the embodiment of the invention, after the intelligent lock receives the unlocking request, the first random verification code is generated, the first random verification code is encrypted through the public key of the intelligent lock to obtain the first verification information, and the first verification information is sent to the non-main intelligent equipment. After the non-master intelligent device receives the first verification information, the first verification information is decrypted through the intelligent lock public key to obtain a first random verification code, after the first random verification code is obtained, the first random verification code is encrypted through the non-master intelligent device public key to obtain intermediate verification information, and the intermediate verification information is sent to the intelligent lock.
S172, the intermediate verification information is decrypted to verify the first random verification code, and a second random verification code is generated.
In the embodiment of the invention, after receiving the intermediate verification information sent by the non-master intelligent device, the intelligent lock decrypts the intermediate verification information through the non-master public key to obtain the first random verification code, compares the first random verification code with the first random verification code generated by the intelligent lock, and generates the second random verification code if the results are the same, and performs secondary verification.
And S173, encrypting the second random verification code according to the public key of the intelligent lock to obtain second verification information, and sending the second verification information to the non-master intelligent device, so that the non-master intelligent device obtains the second random verification code through the second verification information, and encrypts and sends the second random verification code and the vehicle key certificate.
In the embodiment of the invention, the second random verification code is encrypted according to the public key of the intelligent lock to obtain second verification information, and the second verification information is sent to the non-master intelligent device. And after receiving the second verification information, the non-master intelligent device decrypts the second verification information by using the intelligent lock public key to obtain the second verification information. The first random verification code and the second random verification code can enable the intelligent lock and the non-master intelligent device to mutually verify the public key of the intelligent lock and the public key of the non-master intelligent device, and therefore information verification is completed. After the second verification information is obtained, the second random verification code and the vehicle key certificate encrypted by the vehicle owner public key are encrypted through the non-vehicle owner public key, and the encrypted second random verification code and the vehicle key certificate encrypted by the vehicle owner public key are sent to the intelligent lock.
In some embodiments, such as the present embodiment, the step S190 may include steps S191-S192, as shown in FIG. 7.
And S191, judging whether the distance between the non-main intelligent device and the non-main intelligent device is smaller than a preset distance.
In the embodiment of the invention, after the verification of the vehicle key certificate is completed, the distance between the non-master intelligent device and the non-master intelligent device needs to be further judged, and whether to start the electric vehicle is judged according to different distances. Taking bluetooth connection as an example, the closer the distance is, the stronger the RSSI (Received Signal Strength Indication) value in the bluetooth broadcast Signal is, the farther the distance is, the weaker the RSSI value in the bluetooth broadcast Signal is, if the preset safety distance is 1 meter, when the distance between the non-main intelligent device and the electric vehicle is less than 1 meter, the intelligent lock is opened.
And S192, if the distance is smaller than the preset distance, the intelligent lock is unlocked.
In the embodiment of the invention, when the distance between the non-master intelligent device and the electric vehicle is less than the preset distance, the intelligent lock is opened, and if the distance is greater than the preset distance, the intelligent lock is refused to be opened.
Fig. 8 is a schematic block diagram of a shared digital car key device 100 according to an embodiment of the present invention. As shown in fig. 8, the present invention further provides a sharing digital car key device 100 corresponding to the above method for sharing digital car keys. The digital car key sharing apparatus 100 includes a unit for performing the above-described digital car key sharing method. Specifically, referring to fig. 8, the shared digital car key device 100 includes an authorization request unit 110, a registration information unit 120, a first request unit 130, a first decryption unit 140, a first encryption unit 150, and a first sending unit 160.
The authorization request unit 110 is configured to send an authorization request to a master smart device if the authorization request is detected, so that the master smart device authorizes a non-master smart device; the registration information unit 120 is configured to, if a registration request sent by the non-master smart device is received, obtain authorization information of the master smart device, and register the non-master smart device; the first requesting unit 130 is configured to request, if the registration of the non-master smart device is completed, a non-owner public key from the non-master smart device, so that the non-master smart device sends the non-owner public key in a first encryption state; the first decryption unit 140 is configured to decrypt the non-owner public key in the first encrypted state to obtain the non-owner public key if the non-owner public key in the first encrypted state is received; the first encryption unit 150 is configured to encrypt the smart lock public key according to the non-vehicle owner public key to obtain a smart lock public key in a second encryption state, and send the smart lock public key to the non-master smart device, so that the non-master smart device decrypts and verifies the smart lock public key and sends a vehicle key certificate in a first encryption state; the first sending unit 160 is configured to send authorization success information to the non-master smart device according to the vehicle key certificate in the first encryption state.
In some embodiments, for example, in the present embodiment, referring to fig. 9, the authorization request unit 110 includes a second sending unit 111 and a third sending unit 112.
The second sending unit 111 is configured to send information of the non-master smart device to an owner to obtain the authorization information if a request for sharing authorization sent by the non-master smart device is detected, where the authorization information includes an authorizer and an authorization manner; the third sending unit 112 is configured to send the authorization information, the smart lock public key and the vehicle key certificate encrypted by the vehicle owner public key to the non-master smart device to complete authorization of the non-master smart device.
In some embodiments, for example, in the present embodiment, referring to fig. 10, the book first encryption unit 150 includes a second decryption unit 151, a first verification unit 152, a first generation unit 153, and a second encryption unit 154.
The second decryption unit 151 is configured to decrypt the smart lock public key in the first encryption state according to a non-owner private key to obtain the smart lock public key; the first verification unit 152 is configured to verify the public key of the smart lock; the first generating unit 153 is configured to generate a security code if the verification is successful; the second encryption unit 154 is configured to encrypt the vehicle key certificate and the security code according to the smart lock public key to obtain a vehicle key certificate in a first encryption state and a security code in the first encryption state, and send the vehicle key certificate in the first encryption state and the security code in the first encryption state.
In some embodiments, for example in this embodiment, referring to fig. 11, the first sending unit 160 includes a third decryption unit 161, a second verification unit 162, and a fourth sending unit 163.
The third decryption unit 161 is configured to decrypt, according to the smart lock private key, the vehicle key certificate in the first encryption state and the security code in the first encryption state to obtain the vehicle key certificate and the security code; the second verification unit 162 is configured to verify the vehicle key certificate; the fourth sending unit 163 is configured to, if the verification is successful, encrypt the security code according to the non-vehicle owner public key to obtain the security code in the first encryption state, and send the security code to the non-host smart device, so that the non-host smart device verifies the security code to complete authorization of the non-host smart device.
In some embodiments, for example, in this embodiment, referring to fig. 12, the shared digital car key device 100 further includes a fifth sending unit 170, a third verifying unit 180, and a first starting unit 190.
The fifth sending unit 170 is configured to, if an unlocking request sent by the non-master smart device is detected, send verification information to the non-master smart device so that the non-master smart device sends the vehicle key certificate according to the verification information; the third verifying unit 180 is configured to verify the vehicle key certificate, and the first starting unit 190 is configured to unlock the smart lock if the verification is successful.
In some embodiments, for example, in the present embodiment, referring to fig. 13, the fifth sending unit 170 includes a second generating unit 171, a third generating unit 172, and a third encrypting unit 173.
The second generating unit 171 is configured to generate a first random verification code, encrypt the first random verification code according to the smart lock public key to obtain the first verification information, and send the first verification information to the non-master smart device, so that the non-master smart device obtains the first random verification code through the first verification information and encrypts the first random verification code to obtain intermediate verification information, and send the intermediate verification information; the third generating unit 172 is configured to decrypt the intermediate verification information to verify the first random verification code, and generate a second random verification code; the third encryption unit 173 is configured to encrypt the second random verification code according to the smart lock public key to obtain the second verification information, and send the second verification information to the non-master smart device, so that the non-master smart device obtains the second random verification code through the second verification information, and encrypts and sends the second random verification code and the vehicle key certificate.
In some embodiments, for example, in the present embodiment, referring to fig. 14, the first enabling unit 190 includes a judging unit 191 and a second enabling unit 192.
The judging unit 191 is configured to judge whether a distance between the non-master smart device and the non-master smart device is smaller than a preset distance; the second starting unit 192 is configured to unlock the smart lock if the distance is smaller than a preset distance.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation process of the above-mentioned shared digital car key device and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.
The above-mentioned sharing digital car key device can be implemented in the form of a computer program, which can be run on the smart device as shown in fig. 15.
Referring to fig. 15, fig. 15 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a terminal, wherein the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
Referring to fig. 15, the computer device 500 includes a processor 502, memory and an interface 507 coupled by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 when executed cause the processor 502 to perform a method for sharing digital car keys.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be enabled to execute a shared digital car key method.
The interface 505 is used to communicate with other devices. Those skilled in the art will appreciate that the architecture shown in fig. 15 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing device 500 to which the disclosed aspects apply, as a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to perform the steps of:
if an authorization request is detected, sending the authorization request to a main intelligent device so that the main intelligent device authorizes a non-main intelligent device;
if a registration request sent by the non-master intelligent device is received, acquiring authorization information of the master intelligent device, and registering the non-master intelligent device;
if the registration of the non-master intelligent device is finished, requesting a non-owner public key from the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state;
if the non-owner public key in the first encryption state is received, decrypting the non-owner public key to obtain the non-owner public key;
encrypting the intelligent lock public key according to the non-owner public key to obtain an intelligent lock public key in a second encryption state and sending the intelligent lock public key to the non-master intelligent equipment so that the non-master intelligent equipment decrypts and verifies the intelligent lock public key and sends a vehicle key certificate in a first encryption state;
and sending authorization success information to the non-master intelligent device according to the vehicle key certificate in the first encryption state.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program may be stored in a storage medium that is computer-readable. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program. The computer program, when executed by a processor, causes the processor to perform the steps of:
if an authorization request is detected, sending the authorization request to a main intelligent device so that the main intelligent device authorizes a non-main intelligent device;
if a registration request sent by the non-master intelligent device is received, acquiring authorization information of the master intelligent device, and registering the non-master intelligent device;
if the registration of the non-master intelligent device is finished, requesting a non-owner public key from the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state;
if the non-owner public key in the first encryption state is received, decrypting the non-owner public key to obtain the non-owner public key;
encrypting the intelligent lock public key according to the non-owner public key to obtain an intelligent lock public key in a second encryption state and sending the intelligent lock public key to the non-master intelligent equipment so that the non-master intelligent equipment decrypts and verifies the intelligent lock public key and sends a vehicle key certificate in a first encryption state;
and sending authorization success information to the non-master intelligent device according to the vehicle key certificate in the first encryption state.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing an intelligent device to perform all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, while the invention has been described with respect to the above-described embodiments, it will be understood that the invention is not limited thereto but may be embodied with various modifications and changes.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method for sharing digital car keys is applied to an intelligent lock, and is characterized by comprising the following steps:
if an authorization request is detected, sending the authorization request to a main intelligent device so that the main intelligent device authorizes a non-main intelligent device;
if a registration request sent by the non-master intelligent device is received, acquiring authorization information of the master intelligent device, and registering the non-master intelligent device;
if the registration of the non-master intelligent device is finished, requesting a non-owner public key from the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state;
if the non-owner public key in the first encryption state is received, decrypting the non-owner public key to obtain the non-owner public key;
encrypting the intelligent lock public key according to the non-owner public key to obtain an intelligent lock public key in a second encryption state, and sending the intelligent lock public key to the non-main intelligent equipment so that the non-main intelligent equipment executes the following steps: decrypting the intelligent lock public key in the first encryption state according to a non-owner private key to obtain the intelligent lock public key; verifying the public key of the intelligent lock; if the verification is successful, generating a security code; encrypting the vehicle key certificate and the security code according to the intelligent lock public key to obtain a vehicle key certificate in a first encryption state and a security code in the first encryption state and sending the vehicle key certificate in the first encryption state and the security code in the first encryption state;
the intelligent lock executes the following steps:
decrypting the vehicle key certificate in the first encryption state and the security code in the first encryption state according to the private key of the intelligent lock to obtain the vehicle key certificate and the security code;
verifying the vehicle key certificate;
if the verification is successful, the security code is encrypted according to the non-vehicle owner public key to obtain a security code in a first encryption state and the security code is sent to the non-main intelligent device so that the non-main intelligent device verifies the security code to complete authorization of the non-main intelligent device;
generating a first random verification code, encrypting the first random verification code according to the intelligent lock public key to obtain first verification information, and sending the first verification information to the non-master intelligent device so that the non-master intelligent device obtains the first random verification code through the first verification information, encrypts the first random verification code to obtain intermediate verification information, and sends the intermediate verification information;
decrypting the intermediate authentication information to authenticate the first random authentication code and generating a second random authentication code;
encrypting the second random verification code according to the intelligent lock public key to obtain second verification information and sending the second verification information to the non-master intelligent device so that the non-master intelligent device can obtain the second random verification code through the second verification information, encrypt the second random verification code and the vehicle key certificate and send the encrypted second random verification code and the encrypted vehicle key certificate;
verifying the vehicle key certificate;
and if the verification is successful, the intelligent lock is opened.
2. The method of claim 1, wherein the step of unlocking the smart lock if the verification is successful comprises:
judging whether the distance between the non-main intelligent equipment and the non-main intelligent equipment is smaller than a preset distance or not;
and if the distance is smaller than the preset distance, the intelligent lock is unlocked.
3. The method of claim 1, wherein the step of enabling the master smart device to authorize the non-master smart device comprises:
if a sharing authorization request sent by the non-main intelligent device is detected, sending information of the non-main intelligent device to a vehicle owner to acquire authorization information, wherein the authorization information comprises an authorizer and an authorization mode;
and sending the authorization information, the intelligent lock public key and the vehicle key certificate encrypted by the vehicle owner public key to the non-master intelligent device to complete authorization of the non-master intelligent device.
4. A shared digital car key device, the device comprising:
the first request unit is used for sending an authorization request to a main intelligent device to enable the main intelligent device to authorize non-main intelligent devices if the authorization request is detected;
the first registration unit is used for acquiring the authorization information of the main intelligent device and registering the non-main intelligent device if a registration request sent by the non-main intelligent device is received;
the second request unit is used for requesting a non-owner public key to the non-master intelligent device so that the non-master intelligent device sends the non-owner public key in a first encryption state if the registration of the non-master intelligent device is completed;
the first decryption unit is used for decrypting the non-owner public key in the first encryption state to obtain the non-owner public key if the non-owner public key in the first encryption state is received;
the first encryption unit is used for encrypting the intelligent lock public key according to the non-owner public key to obtain an intelligent lock public key in a second encryption state and sending the intelligent lock public key to the non-main intelligent device so that the non-main intelligent device can execute the following steps: decrypting the intelligent lock public key in the first encryption state according to a non-owner private key to obtain the intelligent lock public key; verifying the public key of the intelligent lock; if the verification is successful, generating a security code; encrypting the vehicle key certificate and the security code according to the intelligent lock public key to obtain a vehicle key certificate in a first encryption state and a security code in the first encryption state and sending the vehicle key certificate in the first encryption state and the security code in the first encryption state;
the third decryption unit is used for decrypting the vehicle key certificate in the first encryption state and the security code in the first encryption state according to the private key of the intelligent lock to obtain the vehicle key certificate and the security code;
the second verification unit is used for verifying the vehicle key certificate;
and if the verification is successful, encrypting the security code according to the non-vehicle owner public key to obtain the security code in the first encryption state, and sending the security code to the non-main intelligent device so that the non-main intelligent device verifies the security code to complete the authorization of the non-main intelligent device.
5. A computer device, comprising a memory and a processor coupled to the memory; the memory is used for storing a computer program; the processor is adapted to execute a computer program stored in the memory to perform the steps of the method according to any of claims 1-3.
6. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1-3 on a smart device having a capacitive touch screen.
CN202110777616.XA 2021-07-09 2021-07-09 Method and device for sharing digital vehicle key, computer equipment and storage medium Active CN113404390B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110777616.XA CN113404390B (en) 2021-07-09 2021-07-09 Method and device for sharing digital vehicle key, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110777616.XA CN113404390B (en) 2021-07-09 2021-07-09 Method and device for sharing digital vehicle key, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113404390A CN113404390A (en) 2021-09-17
CN113404390B true CN113404390B (en) 2022-12-16

Family

ID=77685727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110777616.XA Active CN113404390B (en) 2021-07-09 2021-07-09 Method and device for sharing digital vehicle key, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113404390B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2392201A (en) * 2002-08-20 2004-02-25 Michael Weir Drink-drivers key safe
US8196823B2 (en) * 2010-08-10 2012-06-12 Toyota Motor Engineering & Manufacturing North America, Inc. Optical lock systems and methods
AU2010224455B8 (en) * 2010-09-28 2011-05-26 Mu Hua Investments Limited Biometric key
CN107165499A (en) * 2017-06-25 2017-09-15 谭灵强 A kind of lockset can constantly update the electronic cipher locking method of password without networking
CN110148239A (en) * 2019-05-16 2019-08-20 东风小康汽车有限公司重庆分公司 A kind of authorization method and system of Intelligent key

Also Published As

Publication number Publication date
CN113404390A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
US11888594B2 (en) System access using a mobile device
CN109895734B (en) Authorized Bluetooth key activation method and system, storage medium and T-BOX
CN110637328B (en) Vehicle access method based on portable equipment
US10708062B2 (en) In-vehicle information communication system and authentication method
CN111194028B (en) Safety control method based on vehicle
CN108809659B (en) Dynamic password generation method, dynamic password verification method, dynamic password system and dynamic password verification system
CN108122311B (en) Vehicle virtual key implementation method and system
US9479329B2 (en) Motor vehicle control unit having a cryptographic device
US20210070252A1 (en) Method and device for authenticating a user to a transportation vehicle
CN109076090B (en) Updating biometric data templates
CN109639644B (en) Authorization verification method and device, storage medium and electronic equipment
US8699706B2 (en) Method for generating rights object and device to perform the method, method for transmitting rights object and device to perform the method, and method for receiving rights object and device to perform the method
JP2006262184A (en) Authority possession apparatus, authority borrowing apparatus, control unit, authority delegation system, authority possession program and authority possession method
CN115527292B (en) Mobile phone terminal remote vehicle unlocking method of security chip and security chip device
CN113404390B (en) Method and device for sharing digital vehicle key, computer equipment and storage medium
CN113099457A (en) Method and system for binding vehicle and mobile terminal
KR102521936B1 (en) Method of secured sharing of vehicle key
CN115915131A (en) Vehicle key bidirectional encryption authentication method and system, vehicle binding device and NFC card
EP1879321A1 (en) Electronic signature with a trusted platform
JP2020004044A (en) Authentication system and authentication method
CN112037382A (en) Door lock control system and method and intelligent door lock
CN115987636B (en) Information security implementation method, device and storage medium
JP6850314B2 (en) User authentication device and user authentication method
JP2017133286A (en) Electronic lock system
CN115865460A (en) Data transmission method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant