Background
With the rapid development of security and protection technology, the intelligent door lock gradually enters thousands of households, occupies an important position in the intelligent home, is a lock different from the traditional mechanical lock, can be opened through instructions such as sound, fingerprints and human faces, is more intelligent, simple and convenient in the aspects of user safety, identification and manageability, and has wide application in the field of intelligent home.
Part of the intelligent door locks have the function of temporary password authorization, for example, sharing the temporary password for guests, aunt cleaning or being unable to return to the home in time for the reason to give food to pets left at home, check water, electricity, gas, doors and windows and other potential safety hazards, thereby really bringing convenience to users. But lack the real-time use to interim password and carry out safety protection, interim password just is the same with ordinary password, inputs and correctly can realize unblanking, does not carry out the safety verification of unblanking real-time environment. Usually, the user shares the temporary password to the visitor through a function of remotely issuing the temporary password provided by the mobile terminal APP.
The generation of the temporary password requires that a user remotely wakes up the lock end, that is, the lock end needs to be kept in a networking state all the time to generate and receive the temporary password issuing request, so that the power consumption is large. And the situation that the temporary password cannot be generated due to unstable network can also cause that visitors need to wait, thereby bringing bad use experience to users.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the invention is to provide a method for generating a temporary password by an intelligent door lock, which is realized by the intelligent door lock, and the method is implemented by autonomously judging whether the temporary password needs to be generated or not in the awakening process of the intelligent door lock, and actively initiating a request for generating the temporary password in advance to a cloud server if the temporary password needs to be generated, so that the generation time is optimized, and the power consumption of equipment is saved.
The invention also aims to provide a method for generating the temporary password by the intelligent door lock, which is realized by the intelligent door lock, the cloud server and the mobile terminal, and the method is implemented by autonomously judging whether the temporary password needs to be generated or not in the awakening process of the intelligent door lock, and actively initiating a request for pre-generating the temporary password to the cloud server if the temporary password needs to be generated, so that the generation time is optimized, and the power consumption of equipment is saved.
The invention also provides an electronic device, which executes the method for generating the temporary password by the intelligent door lock, and actively initiates a request for generating the temporary password to a cloud server according to whether the temporary password needs to be generated or not in the awakening process of the intelligent door lock, so that the generation time is optimized, and the power consumption of the device is saved.
The fourth objective of the present invention is to provide a storage medium, which executes the method for generating a temporary password by an intelligent door lock, and autonomously judges whether a temporary password needs to be generated or not in the process of waking up the intelligent door lock, and actively initiates a request for generating the temporary password in advance to a cloud server, so as to optimize the generation time and save the power consumption of the device.
One of the purposes of the invention is realized by adopting the following technical scheme:
a method for generating a temporary password by an intelligent door lock is realized by the intelligent door lock; the method comprises the following steps:
s1, awakening the intelligent door lock to obtain a temporary password locally stored by the intelligent door lock;
step S2, judging whether the intelligent door lock needs to generate a temporary password; if the intelligent door lock needs to generate a temporary password, initiating a request for generating the temporary password to a cloud server;
and step S3, receiving the temporary password generated by the cloud server, and saving the temporary password to the local intelligent door lock.
The second purpose of the invention is realized by adopting the following technical scheme:
a method for generating a temporary password by an intelligent door lock is realized by the intelligent door lock, a cloud server and a mobile terminal, and comprises the following steps:
s1, awakening the intelligent door lock to obtain a temporary password locally stored by the intelligent door lock; step S2, the intelligent door lock judges whether a temporary password needs to be generated; if the intelligent door lock needs to generate a temporary password, initiating a request for generating the temporary password to a cloud server;
step S3, after receiving the request for generating the temporary password, the cloud server generates the temporary password, pushes the temporary password to the intelligent door lock and stores the temporary password to the local intelligent door lock;
step S4, the mobile terminal sends a request for obtaining the temporary password to the cloud server; and after receiving the request for acquiring the temporary password, the cloud server shares the temporary password with the mobile terminal.
Further, the step S1 of waking up the intelligent door lock includes that the mobile terminal remotely wakes up the intelligent door lock through a network, or the mobile terminal connects to the intelligent door lock through bluetooth to wake up the intelligent door lock, or inputs an unlocking password into the intelligent door lock and verifies the unlocking password successfully.
Further, the step S2 of determining whether the intelligent door lock needs to generate the temporary password specifically includes the following steps:
step S21, judging whether the temporary password meets the effective condition, if so, generating the temporary password is not needed; if the validity condition is not met, a temporary password needs to be generated.
Further, after the intelligent door lock inputs the temporary password, the intelligent door lock verifies whether the temporary password is consistent with the locally stored temporary password, and judges whether the temporary password meets the failure condition; if the failure condition is not satisfied and the password is consistent with the temporary password stored locally, the intelligent door lock is opened and the process goes to step S1.
Further, the valid condition includes that the number of the temporary passwords is not less than a preset value and the temporary passwords are in valid use time; the failure condition is that the using times of the temporary password reach preset times, or the using time of the temporary password exceeds the effective using time.
Further, in the step S3, the cloud server generates a temporary password, encrypts the temporary password, and pushes the encrypted temporary password to the smart door lock or the mobile terminal; and the encryption is that the cloud server generates a temporary password with a fixed format according to the random number and the generation time and a preset rule.
Further, the step S1 further includes: the intelligent door lock is awakened, meanwhile, an unlocking notice is reported to the cloud server, and the cloud server pushes the unlocking notice to the mobile terminal.
The third purpose of the invention is realized by adopting the following technical scheme:
an apparatus comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing a method of generating a temporary passcode for an intelligent door lock as described above when executing the computer program.
The fourth purpose of the invention is realized by adopting the following technical scheme:
a storage medium having stored thereon a computer program which, when executed, implements a method of generating a temporary password for an intelligent door lock as described above.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a method, equipment and a storage medium for generating a temporary password by an intelligent door lock, wherein the temporary password is updated by using the time for awakening the intelligent door lock to actively report the networking, so that the usable temporary password is locally stored in the intelligent door lock. In the process of using the temporary password, the intelligent door lock can be directly input and opened. Need not intelligent lock and keep the networking state all the time and can use interim password, solve because of the unable problem of acquireing or verifying interim password of equipment dormancy, the unreliable circumstances such as network intelligence lock, promote the use reliability of intelligent lock, the intelligent of protection dynamics and lock, bring better experience for the user.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
The invention provides a method for generating a temporary password by an intelligent door lock, which is realized by the intelligent door lock. The method specifically comprises the following steps:
s1, awakening the intelligent door lock to obtain a temporary password locally stored by the intelligent door lock; awakening comprises receiving the awakening of the mobile terminal through network remote awakening or Bluetooth near-field connection, or directly inputting an unlocking password at the lock end of the intelligent door lock and awakening the intelligent door lock after verification is successful. And after the intelligent door lock is awakened, the locally stored temporary password is automatically acquired. And when the lock end of the intelligent door lock directly inputs the unlocking password and the verification is successful, the intelligent door lock is awakened, and the intelligent door lock sends a door opening notice to the cloud or the mobile terminal so as to remind the user.
Step S2, judging whether the intelligent door lock needs to generate a temporary password; if the intelligent door lock needs to generate a temporary password, initiating a request for generating the temporary password to a cloud server; specifically, the intelligent door lock judges whether a temporary password needs to be generated or not, and the method comprises the following steps:
step S21, judging whether the temporary password meets the effective condition, if so, generating the temporary password is not needed; if the validity condition is not met, a temporary password needs to be generated. The valid conditions comprise that the number of the temporary passwords is not less than a preset value and the temporary passwords are in valid use time. Namely, as long as the number of the temporary passwords locally stored in the intelligent door lock is lower than the preset value or the use time of the temporary passwords is invalid, the temporary passwords need to be regenerated. The step is that the temporary password is automatically updated after the intelligent door lock is awakened, and the problem that the temporary password cannot be updated in time under the conditions of equipment dormancy, unreliable network and the like is solved.
And step S3, receiving the temporary password generated by the cloud server, and saving the temporary password to the local intelligent door lock.
The method utilizes the characteristic that the intelligent door lock is actively connected with the network after being awakened, automatically obtains the temporary password stored locally, further determines whether the temporary password needs to be regenerated, and actively initiates a request for generating the temporary password to the cloud server so as to update the temporary password. Need not intelligent lock constantly and cloud server keep being connected, reduce the equipment consumption, solve because of the unstable problem that leads to unable receipt interim password, long-time waiting of network.
Example two
Based on the same inventive concept, as shown in fig. 1, the invention also provides a method for generating the temporary password by the intelligent door lock, which is realized by the intelligent door lock, the cloud server and the mobile terminal, wherein the intelligent door lock is wirelessly connected with the cloud server, and the mobile terminal is wirelessly connected with the cloud server. The method specifically comprises the following steps:
s1, awakening the intelligent door lock to obtain a temporary password locally stored by the intelligent door lock; specifically, the intelligent door lock can be awakened by a mobile terminal through network remote or through Bluetooth connection, or directly awakened after the unlocking password is input into the intelligent door lock and the verification is successful. And when the lock end of the intelligent door lock directly inputs the unlocking password and the verification is successful, the intelligent door lock is awakened, and the intelligent door lock sends a door opening notice to the cloud or the mobile terminal so as to remind the user. And because the intelligent door lock can be automatically connected with the cloud after being awakened, the unlocking notice or the awakened notice is reported, so that the unlocking notice is pushed to the mobile terminal by the cloud to inform the user. Therefore, whether the temporary password needs to be generated or not can be automatically judged at the moment, the intelligent door lock is not required to be always in a networking state, and the power consumption of the equipment is reduced.
Step S2, the intelligent door lock judges whether a temporary password needs to be generated; and if the intelligent door lock needs to generate the temporary password, initiating a request for generating the temporary password to a cloud server.
Specifically, the intelligent door lock judges whether a temporary password needs to be generated or not, and the method comprises the following steps:
step S21, judging whether the temporary password meets the effective condition, if so, generating the temporary password is not needed; if the validity condition is not met, a temporary password needs to be generated. The valid conditions comprise that the number of the temporary passwords is not less than a preset value and the temporary passwords are in valid use time. Namely, as long as the number of the temporary passwords locally stored in the intelligent door lock is lower than the preset value or the use time of the temporary passwords is invalid, the temporary passwords need to be regenerated. The step is that the temporary password is automatically updated after the intelligent door lock is awakened, and the problem that the temporary password cannot be updated in time under the conditions of equipment dormancy, unreliable network and the like is solved.
Step S3, after receiving the request for generating the temporary password, the cloud server generates the temporary password, pushes the temporary password to the intelligent door lock and stores the temporary password to the local intelligent door lock; after the cloud server receives the request of the intelligent door lock for generating the temporary password, the cloud server generates the temporary password and records the temporary password in the cloud end, so that a subsequent user can inquire or track the record conveniently. And in order to improve the transmission safety of the temporary password, the cloud server generates the temporary password with a fixed format according to the random number and the generation time and the preset rule.
And after the cloud server generates the temporary password and pushes the temporary password to the intelligent door lock, the cloud server counts down the effective use time of the temporary password. Only if the temporary password is used within the effective use time, the intelligent door lock can be opened through the temporary password. When the countdown of the effective service life of the temporary password is finished, the temporary password is not over the effective condition and cannot be used, so that other people can be prevented from illegally acquiring the temporary password and trying to open the door.
Step S4, the mobile terminal sends a request for obtaining the temporary password to the cloud server; and after receiving the request for acquiring the temporary password, the cloud server shares the temporary password with the mobile terminal.
And after the temporary password is input through the intelligent door lock, the intelligent door lock verifies whether the temporary password is consistent with the locally stored temporary password. If the temporary password is verified to be failed, the intelligent door lock starts a camera device, the external situation of the intelligent door lock is shot, the intelligent door lock uploads the external situation to the cloud server and the mobile terminal, a user is informed to check and timely process the external situation, and the safety performance of generating the temporary password is improved. Meanwhile, whether the temporary password meets the failure condition or not is judged, if yes, the intelligent door lock sends a command of deleting the temporary password, and the number of the local temporary passwords of the cloud platform and the intelligent door lock is reduced by one; if not, the intelligent door lock is opened and the mobile terminal is informed. The preset failure condition is that the use times of the temporary password reach the preset times, or the use time of the temporary password exceeds the effective use time. The preset times can be set by a user, generally set to be 1 time, and the intelligent door lock can not be opened again by inputting the temporary password after being used. The effective use time can be set to be 1 hour or 1 day, the time for pushing the temporary password to the mobile terminal by the cloud server is used as the starting time of the effective use time of the temporary password, the temporary password is effective in the time of adding the preset time length to the starting time, and the user can open the intelligent lock through the temporary password. And when the effective use time exceeds, the temporary password is invalid, and the intelligent door lock cannot be opened.
After the intelligent door lock is opened by using the temporary password, equivalently, the step S1 is carried out, the intelligent door lock is awakened, the temporary password locally stored in the intelligent door lock is acquired, and the steps S1 to S4 are carried out again to ensure that the intelligent door lock locally stores the usable temporary password. In the process of using the temporary password, the user only needs to remotely obtain the password from the cloud server through the mobile terminal, and then the intelligent door lock can be directly input and opened. Need not intelligent lock and keep the networking state all the time and can use interim password, solve because of the unable problem of acquireing or verifying interim password of equipment dormancy, network unreliable circumstances such as intelligent lock, promote the use reliability of intelligent lock, bring better experience for the user.
In addition, the present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program realizes the steps of the method for generating the temporary password by the intelligent door lock when being executed by the processor.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer-readable medium may contain any suitable combination of elements that may be modified in accordance with the requirements of statutory and patent practice in the jurisdiction, for example, in some jurisdictions, computer-readable media may not contain electrical carrier signals or telecommunications signals in accordance with statutory and patent practice.
The invention is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like, as in embodiment two.
EXAMPLE III
As shown in fig. 2, an electronic device includes a memory, a processor, and a program stored in the memory, the program is configured to be executed by the processor, and the processor executes the program to implement the steps of the method for generating the temporary password by the intelligent door lock.
The invention provides a method, equipment and a storage medium for generating a temporary password by an intelligent door lock, which enable the intelligent door lock to locally store a usable temporary password. In the process of using the temporary password, the intelligent door lock can be directly input and opened. Need not intelligent lock and keep the networking state all the time and can use interim password, solve because of the unable problem of acquireing or verifying interim password of equipment dormancy, the unreliable circumstances such as network intelligence lock, promote the use reliability of intelligent lock, the intelligent of protection dynamics and lock, bring better experience for the user.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.