CN112712612A - Method, device, computer readable medium and equipment for controlling intelligent door lock - Google Patents

Method, device, computer readable medium and equipment for controlling intelligent door lock Download PDF

Info

Publication number
CN112712612A
CN112712612A CN201910954205.6A CN201910954205A CN112712612A CN 112712612 A CN112712612 A CN 112712612A CN 201910954205 A CN201910954205 A CN 201910954205A CN 112712612 A CN112712612 A CN 112712612A
Authority
CN
China
Prior art keywords
door lock
code
information
intelligent door
function code
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.)
Pending
Application number
CN201910954205.6A
Other languages
Chinese (zh)
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.)
Yunding Network Technology Beijing Co Ltd
Original Assignee
Yunding Network Technology Beijing 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 Yunding Network Technology Beijing Co Ltd filed Critical Yunding Network Technology Beijing Co Ltd
Priority to CN201910954205.6A priority Critical patent/CN112712612A/en
Publication of CN112712612A publication Critical patent/CN112712612A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00571Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated by interacting with a central unit
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00817Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C2009/00753Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated by active electrical keys
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00817Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed
    • G07C2009/00825Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed remotely by lines or wireless communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Lock And Its Accessories (AREA)

Abstract

The application provides a method, a device, a computer readable medium and equipment for controlling an intelligent door lock, wherein the specific implementation mode of the method comprises the following steps: the method comprises the steps that a server receives a function code acquisition request which is sent by a client and carries an identification code and operation information of an operation to be executed; the server generates a function code according to the function code acquisition request and the current time, wherein the function code comprises first check information and an operation code determined according to the operation information, and the first check information is determined according to the current time, the operation code and the identification code; the server sends the function code to the client side, so that the intelligent door lock can acquire the function code sent to the client side, the first verification information is verified, and after the verification is passed, the operation corresponding to the operation code is executed. The first checking information can only pass through the checking in the corresponding effective time, and even if the first checking information is leaked after the corresponding effective time, the potential safety hazard can not be brought to the user of the intelligent door lock.

Description

Method, device, computer readable medium and equipment for controlling intelligent door lock
Technical Field
The present application relates to the field of automatic control technologies, and in particular, to a method, an apparatus, a computer-readable medium, and a device for controlling an intelligent door lock.
Background
With the widespread use of internet technology, smart door locks are being used by more and more users. The intelligent door lock can be unlocked according to the unlocking password or the biological characteristics set by the user on the one hand, and on the other hand, the intelligent door lock can be communicated with the server in a wireless transmission mode, so that the user can control the intelligent door lock through the client. Wherein, the control of the intelligent door lock by the user comprises the password for managing the intelligent door lock.
However, in the actual use process of the intelligent door lock, an offline state, that is, a state in which communication with the server is not possible, sometimes occurs. In the prior art, if a user needs to control the intelligent door lock in an off-line state, a preset administrator password can be input into the intelligent door lock, and the intelligent door lock can be controlled after the administrator password passes verification. For an intelligent door lock, the password of the administrator has high control authority, so that once the password of the administrator is leaked, huge potential safety hazards can be caused to users of the intelligent door lock.
Disclosure of Invention
Based on the defects of the prior art, the application provides a method, a device, a computer readable medium and equipment for controlling an intelligent door lock, so that the potential safety hazard caused by leakage of a password of an administrator in the prior art is solved.
To solve the above problems, the following solutions are proposed:
in a first aspect, an embodiment of the present application provides a method for controlling an intelligent door lock, where the method includes:
the server receives a function code acquisition request sent by a client; the function code acquisition request carries an identification code of the intelligent door lock and operation information of an operation to be executed;
the server generates a corresponding function code according to the function code acquisition request and the current time; the function code comprises an operation code and first check information, the operation code is determined according to the operation information, and the first check information is determined according to the operation code, the current time and the identification code;
the server sends the function code to the client; after the first verification information passes through the verification of the intelligent door lock, the function code is used for controlling the intelligent door lock to execute the operation corresponding to the operation code.
In some embodiments, the server determines the first verification information by a first determination:
and performing hash operation on the operation code, the current time and the identification code by adopting a preset hash algorithm, and determining the obtained hash value as first check information.
In some embodiments, the server determines the first verification information by a second determination:
acquiring an equipment key of the intelligent door lock according to the identification code;
and performing hash operation on the operation code, the current time and the equipment key by adopting a preset hash algorithm, and determining the obtained hash value as the first check information.
In some embodiments, after the server generates the corresponding function code according to the function code acquisition request and the current time, the method further includes:
the server encrypts the function code according to the encryption information of the intelligent door lock to obtain an encrypted function code;
wherein, the server sends the function code to the client, including:
and the server sends the encrypted function code to the client.
In some embodiments, the function code acquisition request further carries user information of a user to which the client belongs;
before the server generates the corresponding function code according to the function code acquisition request and the current time, the method further comprises the following steps:
judging whether the user of the client has the authority corresponding to the operation to be executed or not according to the user information and the operation information;
if the authority corresponding to the operation to be executed of the user of the client is judged, executing to generate a corresponding function code according to the function code acquisition request and the current time;
if the user of the client does not have the authority corresponding to the operation to be executed, response information is sent to the client; the response information is used for indicating that the function code acquisition request of the client is rejected by the server.
In a second aspect, an embodiment of the present application provides a method for controlling an intelligent door lock, where the method includes:
the intelligent door lock acquires a function code; the method comprises the steps that a server responds to a received function code acquisition request which is sent by a client and related to a function code, and the function code acquisition request is generated based on the function code acquisition request and receiving time corresponding to the function code acquisition request, the function code acquisition request carries an identification code of an intelligent door lock and operation information of an operation to be executed, the function code comprises an operation code and first verification information, the operation code is determined according to the operation information, and the first verification information is determined according to the operation code, the receiving time and the identification code;
the intelligent door lock checks the first checking information;
and if the first verification information passes the verification, the intelligent door lock executes the operation corresponding to the operation code.
In some embodiments, the first verification information is determined by the server in a first determination manner as follows: performing hash operation on the operation code, the receiving time and the identification code by adopting a preset hash algorithm, and determining an obtained hash value as first check information; and
the intelligence lock carries out the check-up to first check-up information, includes:
the intelligent door lock adopts a Hash algorithm to perform Hash operation on the operation code, the current time and the identification code, and the obtained Hash value is determined as second check information;
the intelligent door lock judges whether the first check information is consistent with the second check information;
if the first verification information is consistent with the second verification information, the intelligent door lock determines that the first verification information passes the verification;
and if the first verification information is inconsistent with the second verification information, the intelligent door lock determines that the first verification information is not verified.
In some embodiments, the first verification information is determined by the server in a second determination manner as follows: acquiring an equipment key of the intelligent door lock according to the identification code; performing hash operation on the operation code, the receiving time and the equipment key by adopting a preset hash algorithm, and determining an obtained hash value as the first check information; and
the intelligence lock carries out the check-up to first check-up information, includes:
the intelligent door lock adopts a Hash algorithm, Hash operation is carried out on the operation code, the equipment key of the intelligent door lock and the current time, and the obtained Hash value is determined as second check information;
the intelligent door lock judges whether the first check information is consistent with the second check information;
if the first verification information is consistent with the second verification information, the intelligent door lock determines that the first verification information passes the verification;
and if the first verification information is inconsistent with the second verification information, the intelligent door lock determines that the first verification information is not verified.
In some embodiments, if the first verification information passes the verification, after the intelligent door lock executes the operation corresponding to the operation code, the method further includes:
the intelligent door lock records the function code in a historical database of the intelligent door lock.
In some embodiments, if the first verification information passes the verification, the intelligent door lock executes an operation corresponding to the operation code, including:
if the first verification information passes the verification, the intelligent door lock judges whether the function code is stored in the intelligent door lock;
and if the intelligent door lock judges that the function code is not stored in the intelligent door lock, the intelligent door lock executes the operation corresponding to the operation code.
In a third aspect, an embodiment of the present application provides an apparatus for controlling an intelligent door lock, which is applied to a server, and the apparatus includes:
the receiving unit is used for receiving a function code acquisition request sent by a client; the function code acquisition request carries an identification code of the intelligent door lock and operation information of an operation to be executed;
the generating unit is used for generating a corresponding function code according to the function code acquisition request and the current time; the function code comprises an operation code and first check information, the operation code is determined according to the operation information, and the first check information is determined according to the operation code, the current time and the identification code;
a sending unit, configured to send the function code to the client; after the first verification information passes through the verification of the intelligent door lock, the function code is used for controlling the intelligent door lock to execute the operation corresponding to the operation code.
In some embodiments, the above apparatus further comprises:
a first determining unit, configured to determine the first check information in a first determining manner as follows:
and performing hash operation on the operation code, the current time and the identification code by adopting a preset hash algorithm, and determining the obtained hash value as first check information.
In some embodiments, the above apparatus further comprises:
a second determining unit, configured to determine the first verification information in a second determining manner as follows:
acquiring an equipment key of the intelligent door lock according to the identification code; and performing hash operation on the operation code, the current time and the equipment key by adopting a preset hash algorithm, and determining the obtained hash value as first check information.
In some embodiments, the above apparatus further comprises:
the encryption unit is used for encrypting the function code according to the encryption information of the intelligent door lock to obtain the encrypted function code;
wherein the sending unit is further configured to: and sending the encrypted function code to the intelligent door lock.
In some embodiments, the function code acquisition request further carries user information of a user to which the client belongs; and the generating unit is further configured to: judging whether the user of the client has the authority corresponding to the operation to be executed or not according to the user information and the operation information; if the authority corresponding to the operation to be executed of the user of the client is judged, generating a corresponding function code according to the function code acquisition request and the current time; and if the user of the client does not have the permission corresponding to the operation to be executed, sending response information to the client, wherein the response information is used for indicating that the function code acquisition request of the client is rejected by the server.
In a fourth aspect, an embodiment of the present application provides a device for controlling an intelligent door lock, which is applied to the intelligent door lock, and the device includes:
an acquisition unit for acquiring the function code; the method comprises the steps that a server responds to a received function code acquisition request which is sent by a client and related to a function code, and the function code acquisition request is generated based on the function code acquisition request and receiving time corresponding to the function code acquisition request, the function code acquisition request carries an identification code of an intelligent door lock and operation information of an operation to be executed, the function code comprises an operation code and first verification information, the operation code is determined according to the operation information, and the first verification information is determined according to the operation code, the receiving time and the identification code;
the checking unit is used for checking the first checking information;
and the execution unit is used for executing the operation corresponding to the operation code if the first verification information passes the verification.
In some embodiments, if the first verification information is determined by the server in the following first determination manner: and performing hash operation on the operation code, the receiving time and the identification code by adopting a preset hash algorithm, determining the obtained hash value as first check information, and when the check unit checks the first check information, the check unit is used for:
performing hash operation on the operation code, the current time and the identification code by adopting a hash algorithm, and determining an obtained hash value as second check information; judging whether the first check information is consistent with the second check information; if the first check information is consistent with the second check information, determining that the first check information passes the check; and if the first check information is inconsistent with the second check information, determining that the first check information is not checked.
In some embodiments, if the first verification information is determined by the server in the following second determination manner: acquiring an equipment key of the intelligent door lock according to the identification code; and performing hash operation on the operation code, the receiving time and the equipment key by adopting a preset hash algorithm, determining the obtained hash value as first check information, and when the check unit checks the first check information, the check unit is used for:
performing hash operation on the operation code, the equipment key of the intelligent door lock and the current time by adopting a hash algorithm, and determining the obtained hash value as second check information; judging whether the first check information is consistent with the second check information; if the first check information is consistent with the second check information, determining that the first check information passes the check; and if the first check information is inconsistent with the second check information, determining that the first check information is not checked.
In some embodiments, the above apparatus further comprises:
and the recording unit is used for recording the executed function codes in the history database.
In some embodiments, the above apparatus further comprises:
the judging unit is used for judging whether the acquired function codes are stored in the historical database after the verifying unit determines that the first verifying information passes the verification;
the execution unit is further used for executing the operation corresponding to the operation code after the judgment unit judges that the acquired function code is not stored in the history database.
In a fifth aspect, the present application provides a computer readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method as described in any implementation manner of the first aspect or implements the method as described in any implementation manner of the second aspect.
In a sixth aspect, the present application provides a processor, where the processor is configured to execute a program, where the program executes to perform the method described in any implementation manner of the first aspect or to implement the method described in any implementation manner of the second aspect.
In a seventh aspect, an embodiment of the present application provides an apparatus, including: one or more processors; a storage device having one or more programs stored thereon; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method as described in any of the implementations of the first aspect or to implement a method as described in any of the implementations of the second aspect.
According to the scheme provided by the embodiment of the application, the server receives the function code acquisition request carrying the identification code and the operation information to be executed, the function code is generated according to the function code acquisition request and the current time, the function code comprises the first check information and the operation code determined according to the operation information, the first check information is determined according to the current time, the operation code and the identification code, the function code is sent to the client, so that the intelligent door lock can acquire the function code sent to the client, the first check information is checked, and after the check is passed, the operation corresponding to the operation code is executed. The first checking information can only pass through the checking in the corresponding effective time, and even if the first checking information is leaked after the corresponding effective time, the potential safety hazard can not be brought to the user of the intelligent door lock. In addition, when the intelligent door lock is not in communication connection with the client and the server, the scheme provided by the application can enable the intelligent door lock to acquire the function code manually input by the user, so that the offline safety control of the intelligent door lock can be realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for controlling an intelligent door lock according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for controlling an intelligent door lock according to another embodiment of the present application;
fig. 3 is a schematic flowchart of a method for verifying verification information according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a method for acquiring a function code by an intelligent door lock according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an apparatus for controlling an intelligent door lock according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an apparatus for controlling an intelligent door lock according to another embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. The described embodiments are only some embodiments of the present application and not all embodiments. 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 application.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be understood that "system", "apparatus", "unit" and/or "module" as used herein is a method for distinguishing different components, elements, parts or assemblies at different levels. However, other words may be substituted by other expressions if they accomplish the same purpose.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements. An element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
Flow charts are used herein to illustrate operations performed by systems according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, the various steps may be processed in reverse order or simultaneously. Meanwhile, other operations may be added to the processes, or a certain step or several steps of operations may be removed from the processes.
The intelligent door lock has a communication function and is a novel door lock which is unlocked by identifying a password input by a user. The user can preset at least one password in the intelligent door lock through the related website and the application program. During operation, if the intelligent door lock identifies any one of the self-stored passwords, the unlocking action is executed.
The password of the intelligent door lock is not limited to a specific character string, but may also be a biometric feature of the user, for example, a fingerprint, a voiceprint, or the like of the user.
Generally, a user may control an intelligent door lock by sending a request to a server and sending an instruction to the intelligent door lock by the server. For example, the intelligent door lock can be controlled to perform any one of the following operations: deleting the designated password, freezing the designated password (meaning that the designated password is not deleted but is temporarily disabled), unfreezing the designated password, opening the electronic counter lock, closing the electronic counter lock, modifying the time of the intelligent door lock and generating a new password.
The electronic counter lock is a function of the intelligent door lock, and after the electronic counter lock is unlocked, the intelligent door lock cannot be opened in a correct password input mode until the electronic counter lock is closed.
However, in actual use, the intelligent door lock may be in an off-line state, that is, a state in which communication with the server through the network is not possible, and in this case, an off-line state control method is required to control the intelligent door lock to perform the above operation.
To sum up, the embodiment of the present application provides a method for controlling an intelligent door lock, which is used to control the intelligent door lock in an offline state, and please refer to fig. 1, the method provided by the embodiment includes the following steps:
s101, the server receives a function code acquisition request sent by the client.
The function code obtaining request carries an identification code of the intelligent door lock to be controlled and operation information of operation to be executed.
The identification code of the intelligent door lock is stored in the client.
Each intelligence lock all corresponds an identification code, and two arbitrary different intelligence locks, and its identification code that corresponds is also different.
The client in step S101 may be a program running on a mobile phone or a computer, or may be a website accessed through these devices.
The operation to be performed refers to an operation that a user needs to perform on the intelligent door lock, and may specifically be any one of the multiple operations related to the foregoing description of the intelligent door lock.
It should be noted that, when the operation to be performed is to delete, freeze or unfreeze a specified password, the operation information of the operation to be performed should indicate what operation is performed (i.e., to delete, freeze or unfreeze), that is, to carry the code corresponding to the above-mentioned action, and should indicate which password is to be operated, that is, to carry the password identifier uniquely used for determining the password currently stored in the smart door lock.
Further, when generating a new password, the operation information should include the code of the action "generate new password", and should also carry the new password. For example, if the new password to be generated is "123", the operation information should carry information "123". Of course, the client may encrypt the new password and send the encrypted password to the server.
The operation information to be executed may be directly input by the user, or an operation information list may be displayed at the client, and the user selects the corresponding operation information from the list.
The operation information received by the server may be information in text form, or may be a string of digital codes used to refer to the operation to be performed.
And S102, the server generates a corresponding function code according to the function code acquisition request and the current time.
The implementation process of step S102 is as follows:
the server generates a corresponding operation code according to the operation information carried in the function code acquisition request, generates first verification information according to the identification code of the intelligent door lock carried in the function code acquisition request, the current time and the operation code, and finally combines the first verification information and the operation code to obtain the function code.
Optionally, the server may process the identification code, the current time, and the operation code of the intelligent door lock by using a specific algorithm to obtain the first verification information. Or, the server may obtain the device key of the smart door lock according to the identification code of the smart door lock, and then process the device key, the current time, and the operation code of the smart door lock by using a specific algorithm to obtain the first verification information. The specific algorithm may be one of various encryption algorithms developed in the present or future, such as a hash algorithm, and is not limited in this regard.
In this embodiment, when the operation information is in a text form, the server determines an operation to be executed by identifying the operation information, and then determines a digital code corresponding to the operation to be executed as the operation code according to a preset coding mode.
The encoding mode of the operation to be executed can be stored in the client. Therefore, the client can directly determine the operation code corresponding to the operation to be executed, and the operation code is used as the operation information to be sent to the server, and at the moment, the server directly uses the operation information as the operation code.
The device key of the intelligent door lock is only stored in the corresponding intelligent door lock and the server, and is not transmitted outside through the network in any case. Each intelligent door lock corresponds to one equipment secret key, and the corresponding equipment secret keys are different between any two intelligent door locks.
The precision of the current time for generating the first check information can be preset according to safety requirements and can be accurate to day, hour or minute. For example, assuming that the time when the first check information is generated is 8/3/2017 and 18/24 minutes, the current time for generating the first check information is 20180803 if it is accurate to the day, 2018080318 if it is accurate to the hour, and 201808031824 if it is accurate to the minute. The precise degree to which the function code is generated can be determined according to the safety requirement and the frequency of generating the function code.
The function code may be represented as a character string in which the meaning of each character representation may be set in advance. A brief description of one way of expressing function codes follows. As an example, in the implementation process of the control method provided in any embodiment of the present application, the function code may also be expressed in a manner different from that in the following example.
Figure BDA0002226764380000111
TABLE 1
Referring to table 1, the function code in this example may be considered to be divided into a plurality of sections as shown in table 1, each section including a plurality of characters, the first line of table 1 indicating the meaning of each section of the function code, and the second line indicating the number of bits, or the number of characters, of each section of the function code.
The first segment of the function code (i.e., the first two bits of the function code), referred to as the start bit, is two pre-configured fixed characters, which may be configured as "#", for example, with reference to table 1, for indicating the start of an operation instruction. The function code is equivalent to one operation instruction of the intelligent door lock, a plurality of operation instructions are received during the operation of the intelligent door lock, and two adjacent operation instructions can be distinguished by setting the first two bits of each operation instruction as two fixed characters for indicating the start of the operation instruction.
Bits 3 to 7 of the function code constitute a second section of the function code, which section represents basic information of the function code. As shown in table 1, the basic information can be further divided into a command prompt (CMD) with 1 bit, a function code ID with two bits, and an operation type with two bits.
Wherein, the 1 st bit of the basic information, namely CMD, is used for indicating the intelligent door lock that the operation instruction is a function code after the function code is taken by the intelligent door lock as an operation instruction. Therefore, for any function code, the CMD is set as a character which is pre-agreed between the intelligent door lock and the server and is used for representing the function code. The predetermined character may be any number, such as "3", or "7", or a symbol, such as "#", or "#", as long as the smart door lock can distinguish the function code from other operation commands according to the predetermined character.
The 4 th bit and the 5 th bit of the function code represent the ID of the function code, the value range is 0 to 99, and the function code is used for representing that the function code is the several function codes generated aiming at the currently controlled intelligent door lock at the current date. For example, the 46 th function code generated by the server for an intelligent door lock on a certain day has a function code ID of "45".
Further, if the server finds that 100 function codes have been generated on the current day, that is, a function code with a function code ID of 99 has been generated on the current date, the server determines that the number of function codes that can be generated on the current date has reached the upper limit. Therefore, the server rejects the current function code acquisition request, and does not generate the corresponding function code until the next day.
Of course, the number of bits of the function code ID can be adjusted by the manufacturer of the intelligent door lock according to the need.
The 6 th bit and the 7 th bit of the function code represent operation types for representing various operations of the intelligent door lock, for example, 01 represents a delete password, 02 represents a freeze password, 04 represents unlocking of the electronic counter lock, and the like. Each operation is specifically represented by which two characters, and can be preset by an intelligent door lock producer.
The operation type is followed by N bits of control information, that is, the third segment of the function code, where N may be determined according to the operation type or may be a preset positive integer, and generally, N is set to be greater than or equal to 4. The control information is used to indicate the operation object of the aforementioned operation type, for example, when the operation type is delete password, the control information may be a four-digit number, such as 0031, indicating that the password marked 0031 needs to be deleted. If the current operation type does not need to specify an operation object, for example, the operation type is to unlock an electronic lock, the control information may be a four-digit random number generated by the server in order to improve security and avoid repetition of function codes.
Further, the control information may further include at least one bit of random number to reduce the probability that the server generates the identical function code. For example, for the above-mentioned password id 0031, a 6-bit control message including this password id and a two-bit random number may be generated, for example, the generated control message may be "610031", where 61 is the random number generated by the server and 0031 is the password id.
The combination of the operation types in the control information and the basic information is the operation code generated in step S102.
The last 6 bits of the function code constitute the fourth segment of the function code, which is the first check information generated in step S102.
S103, the server sends the function code to the client.
The intelligent door lock in the off-line state cannot directly communicate with the server through the network, and therefore the server sends the function code to the client.
It should be noted that the server may issue the function code to the client in any manner. For example, the client may have an intelligent door lock control type application installed thereon, and the application may communicate with the server, and the server may transmit the function code to the application. Optionally, the client may have a short message sending and receiving function, and the server may issue the function code to the client in a form of a short message.
And S104, the intelligent door lock acquires the function code.
The function code can be read by a user of the client, namely the user who uses the client at present, and is input to the intelligent door lock by the user, so that when the intelligent door lock is not in communication connection with the client, the offline safety control of the intelligent door lock can be realized; on the other hand, a communication connection can be established between the intelligent door lock and the client, for example, through a bluetooth connection, and then the client directly sends the function code to the intelligent door lock.
S105, the intelligent door lock verifies the first verification information.
And verifying the first verification information according to the operation code carried by the function code, the equipment key or the identification code of the intelligent door lock and the current time.
The equipment key and the identification code of the intelligent door lock are stored in the intelligent door lock. The current time in step S105 is the time for verifying the first verification information, and the accuracy of the current time is consistent with the accuracy of the time used by the server to generate the first verification information.
And S106, if the first verification information passes the verification, the intelligent door lock executes the operation corresponding to the operation code.
The first check information is checked, which indicates that the function code to which the first check information belongs is sent by the server and is used for controlling the current function code of the intelligent door lock, and the function code is still valid until the current time, that is, the function code to which the first check information belongs is a legal function code, so that the intelligent door lock executes the operation corresponding to the operation code carried by the function code.
And S107, if the first verification information is not verified, the intelligent door lock refuses to execute the operation corresponding to the operation code.
In contrast, the first check information is not checked, which indicates that at least one of the above conditions is not satisfied for the function code to which the first check information belongs. That is to say, the function code is an illegal function code, so the intelligent door lock does not execute the operation corresponding to the operation code.
According to the method for controlling the intelligent door lock, the server receives a function code acquisition request carrying an identification code and operation information of an operation to be executed from the client, then the function code acquisition request and current time are generated according to the function code, the function code comprises first check information and an operation code determined according to the operation information, the first check information is determined according to the current time, the operation code and the identification code, then the function code is sent to the client, so that the intelligent door lock can acquire the function code sent to the client, the first check information is checked, and after the check is passed, the operation corresponding to the operation code is executed. The first checking information can only pass through the checking in the corresponding effective time, and even if the first checking information is leaked after the corresponding effective time, the potential safety hazard can not be brought to the user of the intelligent door lock. In addition, when the intelligent door lock is not in communication connection with the client and the server, the scheme provided by the application can enable the intelligent door lock to acquire the function code manually input by the user, so that the offline safety control of the intelligent door lock can be realized.
In combination with the foregoing embodiments, another embodiment of the present application further provides a method for controlling an intelligent door lock, please refer to fig. 2, the method includes the following steps:
s201, the server receives a function code acquisition request.
The function code acquisition request is sent by the client.
Wherein, the function code acquisition request carries: the system comprises operation information of the operation to be executed, user information of a user of the client and an identification code of the intelligent door lock. The server can obtain the user information in the request according to the function code and determine the identity of the user.
The user to which the client belongs refers to a user who currently uses the client. User information is input by a user to a client.
S202, the server judges whether the current user has the authority corresponding to the operation to be executed.
The current user refers to a user to which the client belongs, that is, a user who is currently using the client.
The judgment is carried out according to the user information and the operation information carried by the function code acquisition request.
In step S201, the server may determine the identity of the user to which the client belongs according to the user information, and further determine the authority that the user to which the client belongs has. Furthermore, the server can acquire the authority required by the operation to be executed from the database of the server, and can judge whether the user to which the client belongs has the authority to execute the operation to be executed corresponding to the operation information by comparing the authority required by the operation to be executed with the authority of the user to which the client belongs.
If it is determined that the user of the client does not have the authority corresponding to the operation to be performed, step S203 is performed, and if it is determined that the user of the client has the authority corresponding to the operation to be performed, step S204 is performed.
S203, the server sends response information to the client.
The response information is used for indicating that the function code acquisition request of the client is rejected by the server.
And S204, the server generates a corresponding function code according to the function code acquisition request and the current time.
The function code includes first check information and an operation code. Here, for the explanation of step S204, reference may be made to the related explanation of step S102 in the embodiment shown in fig. 1, and details are not repeated here.
S205, the server encrypts the function code to obtain the encrypted function code.
And the encryption of the function code is carried out according to the encryption information of the intelligent door lock stored by the server.
The encrypted information of the intelligent door lock can be a preset character string. The encrypted information of an intelligent door lock is respectively stored in the intelligent door lock and the server. For a function code, the combination of the function code and the encryption information is processed by using the existing algorithm, and the obtained result can be used as the encrypted function code.
Through encrypting the function code and sending the function code after encrypting, can prevent that the function code from being stolen in transmission process, further improved the security of intelligent lock.
S206, the server sends the encrypted function code to the client.
And S207, the intelligent door lock acquires the encrypted function code from the client.
S208, the intelligent door lock decrypts the encrypted function code according to the encrypted information of the intelligent door lock, and the function code is obtained.
And processing the encrypted function code and the encrypted information by using a decryption algorithm corresponding to the encryption algorithm of the server, so as to decrypt and obtain the function code.
S209, the intelligent door lock verifies the first verification information.
If the first verification information does not pass the verification, step S210 is executed, and if the first verification information passes the verification, step S211 is executed.
And S210, the intelligent door lock refuses to execute the operation corresponding to the operation code.
S211, the intelligent door lock judges whether the same function code is stored or not.
The same function code refers to the same function code as the function code decrypted in step S208. If the intelligent door lock judges that the function code is stored per se, the intelligent door lock executes the step S210; if the smart door lock determines that the function code is not stored, step S212 is executed.
The intelligent door lock may store each function code acquired in the past in its own history database, and when step S211 is executed, the intelligent door lock may determine whether or not it stores a function code equivalent to the acquired function code by comparing the acquired function code with all the function codes stored in its own history database one by one.
And S212, the intelligent door lock executes the operation corresponding to the operation code.
And S213, the intelligent door lock records the acquired function code in a self history database.
Optionally, after network communication with the server is recovered, the intelligent door lock may send the function code stored in its own history database to the server, so that after the server generates the function code, the function code in the history database is used to compare with the function code that has just been generated in advance, and if the function code that has the same value as the function code that has just been generated exists in the history database, the function code that has just been generated is not sent.
Further, after the server generates the function code, it may be determined whether the number of the function codes generated in the current date for the current intelligent door lock to be controlled reaches a preset threshold value of the number of times of acquisition per day according to the ID of the generated function code, and if the number of the function codes generated in the current date reaches the threshold value of the number of times of acquisition per day, the function code that is just generated is not sent, but one function code is generated and sent after the current date.
For example, if the number of digits of the ID of the function code is set to 2, only 99 function codes can be acquired by one smart door lock per day, that is, the threshold of the number of times of acquisition per day is 99. If the server generates 99 function codes for one intelligent door lock within one day, the server does not send or generate the function codes of the intelligent door lock until the next day.
In the method provided by this embodiment, on one hand, before the function code is generated, whether the user to which the client belongs has the operation right corresponding to the operation to be executed is determined according to the user information and the operation information, and the function code is generated only after the user to which the client belongs is determined to have the corresponding operation right, so that the management can be respectively performed on one intelligent door lock according to different rights of different users, and meanwhile, the embezzlement of the client can be prevented. On the other hand, the intelligent door lock compares the acquired function codes with the function codes which are stored in the historical database of the intelligent door lock and received in the past, and records the acquired function codes in the historical database of the intelligent door lock after the acquired function codes take effect, so that each function code can only take effect once for one intelligent door lock, and further loss of users of the intelligent door lock due to leakage of the function codes is avoided.
In combination with the method for controlling the intelligent door lock provided in the foregoing embodiment, a method for verifying the first verification information by the intelligent door lock is described below as a reference, please refer to fig. 3, and the method includes the following steps:
s301, the intelligent door lock generates second check information according to the operation code, the equipment key of the intelligent door lock and the current time.
The foregoing embodiment has indicated that the device key of any one smart door lock is stored in the smart door lock and the server, so that, in step S301, the smart door lock can directly read the device key stored in itself for generating the second check-up information.
The current time is a time when the second check information is to be generated. The current time for generating the second check information in step S301 has the same accuracy as the current time for generating the first check information by the server, that is, if the current time used when the server generates the first check information is accurate to an hour, the current time used when the intelligent door lock generates the second check information is also accurate to an hour.
It should be noted that, the generation process of the second check information is the same as that of the first check information, and the second check information is obtained by processing the current time, the operation code and the device key by using a specific algorithm. In addition, in the verification method provided in this embodiment, the algorithm used for generating the second verification information is the same algorithm as the algorithm used for generating the first verification information by the server.
It should be noted that, in the case that the first verification information is determined by the server according to the operation code, the device key of the smart door lock, and the receiving time corresponding to the received function code acquiring request, the smart door lock may execute step S301 to generate the second verification information. In the case that the first check information is determined by the server according to the operation code, the identification code of the intelligent door lock, and the receiving time corresponding to the received function code acquiring request, the intelligent door lock may generate second check information according to the operation code, the current time, and the identification code.
Optionally, if the first verification information is determined by the server through the following first determination method: and performing hash operation on the operation code, the receiving time and the identification code by adopting a preset hash algorithm, and determining the obtained hash value as first check information, so that the intelligent door lock can perform hash operation on the operation code, the current time and the identification code by adopting the hash algorithm, and determining the obtained hash value as second check information. If the first verification information is determined by the server through the following second determination mode: acquiring an equipment key of the intelligent door lock according to the identification code; and performing hash operation on the operation code, the receiving time and the equipment key by adopting a preset hash algorithm, and determining the obtained hash value as first check information, so that the intelligent door lock can perform hash operation on the operation code, the equipment key of the intelligent door lock and the current time by adopting the hash algorithm, and determining the obtained hash value as second check information.
S302, the intelligent door lock judges whether the first check information is consistent with the second check information.
If the first check information is not consistent with the second check information, step S303 is executed, and if the first check information is consistent with the second check information, step S304 is executed.
S303, the intelligent door lock determines that the first verification information is not verified.
S304, the intelligent door lock determines that the first verification information passes verification.
The encryption algorithm used by the intelligent door lock and the server is the same, so that the situation that the first check information is inconsistent with the second check information can only occur when at least one of the three types of data, namely the operation code, the equipment key and the current time, of the intelligent door lock used for generating the second check information is inconsistent with the corresponding type of data used by the server. When the situation that any one of the three types of data is inconsistent occurs between the server and the intelligent door lock, the first verification information is failed to verify, and the function code acquired by the current intelligent door lock is not a legal function code.
Considering the situation that the network delay and the user input speed are slow, it is generally desirable that the function code can be validated within a certain validity period after being generated, and therefore, the first verification information needs to be generated and then can be verified within the validity period. The length of the validity period can be set and adjusted according to the actual use condition of the intelligent door lock, and the validity period can be set in units of hours, such as 1 hour and 2 hours, and can also be set in units of minutes, such as 5 minutes and 10 minutes. A verification method that can satisfy the above requirement is briefly described below, taking as an example a case where the validity period is set to 5 minutes:
first, the time for the server to generate the first verification information and the time for the intelligent door lock to generate the second verification information need to be accurate to minutes. Referring to the foregoing example, assuming that the time when the first check information is generated is 8/3/2017 and 18 hours/24 minutes, the current time used by the server should be represented as 201708031824. Furthermore, when the intelligent door lock generates the second check information according to the current time, the current time can be backed for 5 minutes, and a corresponding second check information is generated every time the current time is backed for one minute. For example, if the time for generating the second check information by the intelligent door lock is 18 hours and 26 minutes, 5 time points, namely 201708031822, 201708031823, 201708031824, 201708031825, and 201708031826, can be obtained after 5 minutes of delay, and correspondingly, 5 second check information are generated. Then, in the judgment of step S302, the 5 pieces of second check information are compared with the first check information one by one, if one piece of second check information is consistent with the first check information, it is determined that the first check information passes the check, and if none of the 5 pieces of second check information is consistent with the first check information, it is determined that the first check information does not pass the check.
Based on the method, even if the first check information is generated in 18 hours and 22 minutes, the user only needs to input the function code received by the client end before 18 hours and 26 minutes are finished, namely within 5 minutes after the first check information is generated.
Of course, the above is only an example in the case where the validity period is set to 5 minutes, and the above method can be applied to a validity period of an arbitrary length set according to the actual use situation by adjusting the degree of accuracy of the time taken to generate the first check information and the second check information, and the time of the back-off when generating the second check information.
According to the method, on one hand, enough time is reserved for the user to input the function code, on the other hand, verification failure caused by network delay, time error between the server and the intelligent door lock and the like is avoided, and user experience is effectively improved.
In the method for controlling the intelligent door lock provided by the above embodiment of the application, the function code generally needs to be manually input to the intelligent door lock by a user, and the function code generally contains a plurality of characters, and once a certain character is input incorrectly, the user needs to input the whole function code again, which affects the user experience and causes the process efficiency of controlling the intelligent door lock to be low. Therefore, another embodiment of the present application provides a method for acquiring a function code, which is suitable for an intelligent door lock, and the method includes recording the function code input by a user in a segmented manner, and sending a response signal to the user for each segment of the input function code, so as to achieve the purposes of improving user experience and improving execution efficiency of a control method of the intelligent door lock.
Referring to fig. 4, in combination with the representation of the function code described in the foregoing embodiment, the method for acquiring the function code by the intelligent door lock provided in this embodiment includes the following steps:
s401, acquiring the start bit and basic information of the function code.
In this embodiment, the intelligent door lock acquires information, which is equivalent to that a user inputs information to the intelligent door lock.
S402, outputting a first prompt tone after the acquisition is successful.
In this embodiment, whether the information is successfully acquired may be determined by determining the number of characters input by the user at the input stage. For example, in the above-mentioned representation of the function code, the start bit and the basic information of the function code are 7 characters in total, so that when the user inputs 7 characters in step S401, the user determines that the input of the start bit and the basic information is successful, and then step S402 is executed. The principle of the subsequent steps is similar.
The first alert tone is used to indicate to the user that the start bit and the basic information have been successfully entered.
And S403, acquiring control information of the function code.
The intelligent door lock judges the digit of the control information carried by the currently input function code according to the operation type in the already input basic information, and then executes step S404 when the number of characters input by the user this time reaches the digit of the control information.
For example, if it is determined that the control information of the currently input function code is 6-bit control information, the user determines that the control information acquisition is successful after inputting 6 characters in step S403, and then executes step S404.
And S404, outputting a second prompt tone after the acquisition is successful.
The second alert tone is used to indicate to the user that the control information input was successful.
S405, first checking information carried by the function codes is obtained.
And S406, outputting a third prompt tone after the acquisition is successful.
The third prompt tone is used to indicate to the user that the first verification information was successfully entered.
And S407, verifying the first verification information.
And S408, outputting a fourth prompt tone if the first verification information passes the verification.
The fourth prompt tone is used for indicating that the first verification information of the currently input function code passes verification to the user, and the currently input function code is a legal function code.
In combination with the control method of the intelligent door lock provided in any embodiment of the present application, another embodiment of the present application further provides a device for controlling the intelligent door lock, and the device can be applied to a server. Referring to fig. 5, the apparatus includes:
the receiving unit 501 is configured to receive a function code obtaining request sent by a client.
The function code obtaining request carries an identification code of the intelligent door lock and operation information of an operation to be executed.
The generating unit 502 is configured to generate a corresponding function code according to the function code obtaining request and the current time.
The function code comprises an operation code and first check information, the operation code is determined according to the operation information, and the first check information is determined according to the operation code, the current time and the identification code.
And an encrypting unit 503, configured to encrypt the function code according to the encryption information of the smart door lock, to obtain an encrypted function code.
A sending unit 504, configured to send the encrypted function code to the client.
After the first verification information passes through the verification of the intelligent door lock, the function code is used for controlling the intelligent door lock to execute the operation corresponding to the operation code.
Alternatively, the function code may be directly transmitted by the transmitting unit 504 without being encrypted by the encrypting unit 503.
Optionally, the function code obtaining request received by the receiving unit 501 also carries user information of a user to which the client belongs.
The generating unit 502 is further configured to determine whether the user to which the client belongs has the right corresponding to the operation to be executed according to the user information and the operation information, generate the function code if it is determined that the user to which the client belongs has the right corresponding to the operation to be executed, and send response information to the client if it is determined that the user to which the client belongs does not have the right corresponding to the operation to be executed.
The response information is used for indicating that the function code acquisition request of the client is rejected by the server.
Optionally, the apparatus further comprises:
a first determining unit, configured to determine the first check information in a first determining manner as follows:
and performing hash operation on the operation code, the current time and the identification code by adopting a preset hash algorithm, and determining the obtained hash value as first check information.
Optionally, the apparatus further comprises:
a second determining unit, configured to determine the first verification information in a second determining manner as follows:
acquiring an equipment key of the intelligent door lock according to the identification code; and performing hash operation on the operation code, the current time and the equipment key by adopting a preset hash algorithm, and determining an obtained hash value as the first check information.
In combination with the method for controlling an intelligent door lock provided in any embodiment of the present application, another embodiment of the present application further provides a device for controlling an intelligent door lock, the device is disposed on the intelligent door lock, the intelligent door lock further includes a door lock main body disposed on a door panel, where, referring to fig. 6, the device includes:
an obtaining unit 601, configured to obtain the function code.
The method for acquiring the function code may be that after the client receives the function code, the user of the client inputs the function code to the acquiring unit 601; alternatively, the obtaining unit 601 may establish a communication connection with the client, and the client directly transmits the function code received by the client to the obtaining unit 601.
And the function code is generated by the server in response to the reception of a function code acquisition request which is sent by the client and related to the function code, based on the function code acquisition request and the receiving time corresponding to the function code acquisition request, wherein the function code acquisition request carries an identification code of the intelligent door lock and operation information of an operation to be executed, the function code comprises an operation code and first verification information, the operation code is determined according to the operation information, and the first verification information is determined according to the operation code, the receiving time and the identification code.
A checking unit 602, configured to check the first checking information.
The executing unit 603 is configured to execute an operation corresponding to the operation code if the first verification information passes the verification.
Optionally, if the first verification information is determined by the server through the following first determination method: performing hash operation on the operation code, the receiving time, and the identification code by using a preset hash algorithm, determining an obtained hash value as the first check information, and when the checking unit 602 checks the first check information, configured to:
performing hash operation on the operation code, the current time and the identification code by adopting the hash algorithm, and determining the obtained hash value as second check information; judging whether the first check information is consistent with the second check information; if the first check information is consistent with the second check information, determining that the first check information passes the check; and if the first check information is inconsistent with the second check information, determining that the first check information is not checked.
Optionally, if the first verification information is determined by the server through the following second determination method: acquiring an equipment key of the intelligent door lock according to the identification code; performing hash operation on the operation code, the receiving time and the equipment key by adopting a preset hash algorithm, and determining an obtained hash value as first check information; when the checking unit 602 checks the first checking information, it is configured to:
performing hash operation on the operation code, the equipment key of the intelligent door lock and the current time by adopting the hash algorithm, and determining the obtained hash value as second check information; judging whether the first check information is consistent with the second check information; if the first check information is consistent with the second check information, determining that the first check information passes the check; and if the first check information is inconsistent with the second check information, determining that the first check information is not checked.
Optionally, the apparatus further comprises:
a recording unit 604, configured to record the executed function codes in a history database.
Optionally, the apparatus further comprises:
a determining unit, configured to determine whether the acquired function code is stored in the history database after the verifying unit 602 determines that the first verification information passes the verification.
The executing unit 603 is further configured to execute an operation corresponding to the operation code after the determining unit determines that the acquired function code is not stored in the history database.
It should be noted that the device for controlling the intelligent door lock may be a chip, a component or a module, and the device may include a processor and a memory, a receiving unit, a generating unit and a sending unit, and an obtaining unit, a verifying unit and an executing unit, which are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor may include a kernel, which calls the corresponding program unit from the memory. The kernel can be set to be one or more, and potential safety hazards caused by leakage of the administrator password in the prior art are solved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
According to the device for controlling the intelligent door lock, after the receiving unit receives the function code obtaining request carrying the identification code and the operation information of the operation to be executed, the generating unit generates the function code according to the function code obtaining request and the current time, the function code comprises the first checking information and the operation code determined according to the operation information, the first checking information is determined according to the current time, the operation code and the identification code, and then the sending unit sends the function code to the client. In addition, after the acquisition unit acquires the function code, the verification unit verifies the first verification information, and after the verification is passed, the execution unit executes the operation corresponding to the operation code. The first checking information can only pass through the checking in the corresponding effective time, and even if the first checking information is leaked after the corresponding effective time, the potential safety hazard can not be brought to the user of the intelligent door lock. In addition, when the intelligent door lock is not in communication connection with the client and the server, the scheme provided by the application can enable the acquisition unit in the intelligent door lock to acquire the function code manually input by the user, so that offline safety control of the intelligent door lock can be realized.
The present application provides a computer readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method for controlling an intelligent door lock described in the above method embodiments.
The embodiment of the application provides a processor, which is used for running a program, wherein the program runs to implement the method for controlling the intelligent door lock described in the above method embodiments.
The embodiment of the application provides equipment, which comprises a processor, a memory and a program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the method for controlling the intelligent door lock described in the method embodiments.
The present application further provides a computer program product, which when executed on a data processing device, causes the data processing device to implement the method for controlling an intelligent door lock described in the above method embodiments.
In this case, the apparatus, the computer readable medium, or the computer program product provided in the foregoing embodiments of the present application may all be used to execute the corresponding method provided above, and therefore, the beneficial effects achieved by the apparatus, the computer readable medium, or the computer program product may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only for the purpose of illustrating the preferred embodiments of the present application and the technical principles applied, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. The scope of the invention according to the present application is not limited to the specific combinations of the above-described features, and may also cover other embodiments in which the above-described features or their equivalents are arbitrarily combined without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (15)

1. A method for controlling an intelligent door lock, comprising:
the server receives a function code acquisition request sent by a client; the function code acquisition request carries an identification code of the intelligent door lock and operation information of an operation to be executed;
the server generates a corresponding function code according to the function code acquisition request and the current time; the function code comprises an operation code and first check information, the operation code is determined according to the operation information, and the first check information is determined according to the operation code, the current time and the identification code;
the server sends the function code to the client; after the first verification information passes through the verification of the intelligent door lock, the function code is used for controlling the intelligent door lock to execute the operation corresponding to the operation code.
2. The method according to claim 1, wherein the server determines the first verification information by a first determination method of:
and performing hash operation on the operation code, the current time and the identification code by adopting a preset hash algorithm, and determining an obtained hash value as the first check information.
3. The method according to claim 1, wherein the server determines the first verification information by a second determination method comprising:
acquiring an equipment key of the intelligent door lock according to the identification code;
and performing hash operation on the operation code, the current time and the equipment key by adopting a preset hash algorithm, and determining an obtained hash value as the first check information.
4. The method according to one of claims 1 to 3, wherein after the server generates the corresponding function code according to the function code acquisition request and the current time, the method further comprises:
the server encrypts the function code according to the encryption information of the intelligent door lock to obtain an encrypted function code;
wherein the server sends the function code to the client, including:
and the server sends the encrypted function code to the client.
5. The method according to one of claims 1 to 3, wherein the function code acquisition request further carries user information of a user to which the client belongs;
before the server generates the corresponding function code according to the function code acquisition request and the current time, the method further includes:
judging whether the user of the client has the authority corresponding to the operation to be executed or not according to the user information and the operation information;
if the user of the client side is judged to have the authority corresponding to the operation to be executed, executing the function code acquisition request and generating a corresponding function code according to the current time;
if the user of the client does not have the authority corresponding to the operation to be executed, response information is sent to the client; wherein the response information is used for indicating that the function code acquisition request of the client is rejected by the server.
6. A method for controlling an intelligent door lock, comprising:
the intelligent door lock acquires a function code; the method comprises the steps that a server responds to a received function code acquisition request which is sent by a client and related to a function code, and the function code acquisition request is generated based on the function code acquisition request and receiving time corresponding to the function code acquisition request, the function code acquisition request carries an identification code of an intelligent door lock and operation information of operation to be executed, the function code comprises an operation code and first verification information, the operation code is determined according to the operation information, and the first verification information is determined according to the operation code, the receiving time and the identification code;
the intelligent door lock verifies the first verification information;
and if the first verification information passes the verification, the intelligent door lock executes the operation corresponding to the operation code.
7. The method according to claim 6, wherein the first verification information is determined by the server in a first determination manner as follows: performing hash operation on the operation code, the receiving time and the identification code by adopting a preset hash algorithm, and determining an obtained hash value as the first check information; and
the intelligence lock is right first check-up information carries out the check-up, includes:
the intelligent door lock adopts the Hash algorithm to perform Hash operation on the operation code, the current time and the identification code, and an obtained Hash value is determined as second check information;
the intelligent door lock judges whether the first check information is consistent with the second check information;
if the first verification information is consistent with the second verification information, the intelligent door lock determines that the first verification information passes verification;
and if the first verification information is inconsistent with the second verification information, the intelligent door lock determines that the first verification information is not verified.
8. The method according to claim 6, wherein the first verification information is determined by the server in a second determination manner as follows: acquiring an equipment key of the intelligent door lock according to the identification code; performing hash operation on the operation code, the receiving time and the device key by using a preset hash algorithm, and determining an obtained hash value as the first check information; and
the intelligence lock is right first check-up information carries out the check-up, includes:
the intelligent door lock adopts the Hash algorithm to perform Hash operation on the operation code, the equipment key of the intelligent door lock and the current time, and an obtained Hash value is determined as second check information;
the intelligent door lock judges whether the first check information is consistent with the second check information;
if the first verification information is consistent with the second verification information, the intelligent door lock determines that the first verification information passes verification;
and if the first verification information is inconsistent with the second verification information, the intelligent door lock determines that the first verification information is not verified.
9. The method according to any one of claims 6 to 8, wherein if the first verification information passes verification, after the intelligent door lock performs an operation corresponding to the operation code, the method further includes:
and the intelligent door lock records the function code in a self historical database.
10. The method of claim 9, wherein if the first verification information passes verification, the smart door lock performs an operation corresponding to the operation code, and the operation includes:
if the first verification information passes the verification, the intelligent door lock judges whether the function code is stored in the intelligent door lock;
and if the intelligent door lock judges that the function code is not stored in the intelligent door lock, the intelligent door lock executes the operation corresponding to the operation code.
11. A device for controlling intelligent door lock is applied to a server and is characterized by comprising:
the receiving unit is used for receiving a function code acquisition request sent by a client; the function code acquisition request carries an identification code of the intelligent door lock and operation information of an operation to be executed;
the generating unit is used for generating a corresponding function code according to the function code acquisition request and the current time; the function code comprises an operation code and first check information, the operation code is determined according to the operation information, and the first check information is determined according to the operation code, the current time and the identification code;
a sending unit, configured to send the function code to the client; after the first verification information passes through the verification of the intelligent door lock, the function code is used for controlling the intelligent door lock to execute the operation corresponding to the operation code.
12. The utility model provides a device for controlling intelligent lock, is applied to intelligent lock, its characterized in that includes:
an acquisition unit configured to acquire a function code; the method comprises the steps that a server responds to a received function code acquisition request which is sent by a client and related to a function code, and the function code acquisition request is generated based on the function code acquisition request and receiving time corresponding to the function code acquisition request, the function code acquisition request carries an identification code of an intelligent door lock and operation information of operation to be executed, the function code comprises an operation code and first verification information, the operation code is determined according to the operation information, and the first verification information is determined according to the operation code, the receiving time and the identification code;
the checking unit is used for checking the first checking information;
and the execution unit is used for executing the operation corresponding to the operation code if the first verification information passes the verification.
13. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5, or implements the method of any one of claims 6-10.
14. A processor, characterized in that the processor is configured to run a program, wherein the program when running implements the method according to any of claims 1-5 or implements the method according to any of claims 6-10.
15. An apparatus, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-5 or the method of any of claims 6-10.
CN201910954205.6A 2019-10-09 2019-10-09 Method, device, computer readable medium and equipment for controlling intelligent door lock Pending CN112712612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910954205.6A CN112712612A (en) 2019-10-09 2019-10-09 Method, device, computer readable medium and equipment for controlling intelligent door lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910954205.6A CN112712612A (en) 2019-10-09 2019-10-09 Method, device, computer readable medium and equipment for controlling intelligent door lock

Publications (1)

Publication Number Publication Date
CN112712612A true CN112712612A (en) 2021-04-27

Family

ID=75540137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910954205.6A Pending CN112712612A (en) 2019-10-09 2019-10-09 Method, device, computer readable medium and equipment for controlling intelligent door lock

Country Status (1)

Country Link
CN (1) CN112712612A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114694283A (en) * 2022-03-11 2022-07-01 深圳市凯迪仕智能科技有限公司 Method for unlocking intelligent lock and related device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CH705781A1 (en) * 2011-11-17 2013-05-31 Sven Sauter User rights management and access control system with a time limit.
CN105120007A (en) * 2015-09-14 2015-12-02 劳海鹏 Method and system for remotely setting and invalidating temporary password of intelligent lock
CN105730398A (en) * 2014-12-12 2016-07-06 上海修源网络科技有限公司 System and method for controlling automobile in two directions through mobile terminal
CN106780917A (en) * 2017-01-11 2017-05-31 上海共佰克智能科技有限公司 The control method and system of lock
CN106898064A (en) * 2017-01-09 2017-06-27 云丁网络技术(北京)有限公司 A kind of generation method and its system of the off-line verification code based on intelligent door lock system
CN107103676A (en) * 2017-06-06 2017-08-29 张永穆 A kind of shared equipment dynamic puzzle-lock system
CN107748991A (en) * 2017-10-30 2018-03-02 北京小米移动软件有限公司 Account safety management method and device
CN108629177A (en) * 2018-04-24 2018-10-09 上海与德通讯技术有限公司 A kind of unlocking method of intelligent terminal, intelligent terminal and readable storage medium storing program for executing
CN108737394A (en) * 2018-05-08 2018-11-02 腾讯科技(深圳)有限公司 Off-line verification system, barcode scanning equipment and server
CN109389727A (en) * 2018-10-30 2019-02-26 南昌努比亚技术有限公司 Method for unlocking, system and computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CH705781A1 (en) * 2011-11-17 2013-05-31 Sven Sauter User rights management and access control system with a time limit.
CN105730398A (en) * 2014-12-12 2016-07-06 上海修源网络科技有限公司 System and method for controlling automobile in two directions through mobile terminal
CN105120007A (en) * 2015-09-14 2015-12-02 劳海鹏 Method and system for remotely setting and invalidating temporary password of intelligent lock
CN106898064A (en) * 2017-01-09 2017-06-27 云丁网络技术(北京)有限公司 A kind of generation method and its system of the off-line verification code based on intelligent door lock system
CN106780917A (en) * 2017-01-11 2017-05-31 上海共佰克智能科技有限公司 The control method and system of lock
CN107103676A (en) * 2017-06-06 2017-08-29 张永穆 A kind of shared equipment dynamic puzzle-lock system
CN107748991A (en) * 2017-10-30 2018-03-02 北京小米移动软件有限公司 Account safety management method and device
CN108629177A (en) * 2018-04-24 2018-10-09 上海与德通讯技术有限公司 A kind of unlocking method of intelligent terminal, intelligent terminal and readable storage medium storing program for executing
CN108737394A (en) * 2018-05-08 2018-11-02 腾讯科技(深圳)有限公司 Off-line verification system, barcode scanning equipment and server
CN109389727A (en) * 2018-10-30 2019-02-26 南昌努比亚技术有限公司 Method for unlocking, system and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114694283A (en) * 2022-03-11 2022-07-01 深圳市凯迪仕智能科技有限公司 Method for unlocking intelligent lock and related device
CN114694283B (en) * 2022-03-11 2024-04-30 深圳市凯迪仕智能科技股份有限公司 Unlocking method of intelligent lock and related device

Similar Documents

Publication Publication Date Title
RU2620998C2 (en) Method and authentication device for unlocking administrative rights
US9135430B2 (en) Digital rights management system and method
CN106330850B (en) Security verification method based on biological characteristics, client and server
EP3100171B1 (en) Client authentication using social relationship data
CN114553439B (en) Encryption key management based on identity information
US11212283B2 (en) Method for authentication and authorization and authentication server using the same for providing user management mechanism required by multiple applications
CN106952378A (en) Method for unlocking and device, electronic lock
CN110070363B (en) Account management method and verification method in block chain network and terminal equipment
CN110310392B (en) Vehicle unlocking method and device, computer equipment and storage medium
CN111340987A (en) Internet of things door lock communication method, device and system and computer storage medium
CN108768941B (en) Method and device for remotely unlocking safety equipment
TWI724681B (en) Managing cryptographic keys based on identity information
CN111553689A (en) Matching correlation method and system based on quadratic hash
CN112348997A (en) Intelligent door lock control method, device and system
KR102057386B1 (en) Access authentication method and device
CN112712612A (en) Method, device, computer readable medium and equipment for controlling intelligent door lock
KR101339723B1 (en) Text message security system and method for prevention of identity theft and smishing
CN112364323A (en) High-security storage access method and device based on user iris recognition
CN111078649A (en) Block chain-based on-cloud file storage method and device and electronic equipment
CN115834077A (en) Control method, control system, electronic device, and storage medium
KR20190012026A (en) System and method for login authentication processing
CN112364324A (en) High-security-level data access method and device based on voiceprint recognition
CN111199596A (en) Intelligent door lock control method, device and system
CN104134025A (en) Mobile terminal locking method and device based on SIM cards and mobile terminal
CN213780963U (en) High-safety storage access device based on user iris recognition

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210427

RJ01 Rejection of invention patent application after publication