[go: up one dir, main page]

CN112053477B - Control system, method, device and readable storage medium for smart door lock - Google Patents

Control system, method, device and readable storage medium for smart door lock Download PDF

Info

Publication number
CN112053477B
CN112053477B CN202010969525.1A CN202010969525A CN112053477B CN 112053477 B CN112053477 B CN 112053477B CN 202010969525 A CN202010969525 A CN 202010969525A CN 112053477 B CN112053477 B CN 112053477B
Authority
CN
China
Prior art keywords
door lock
client
token
server
smart door
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010969525.1A
Other languages
Chinese (zh)
Other versions
CN112053477A (en
Inventor
钱宗进
李爽
曾令威
王琪辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Bull Intelligent Technology Co ltd
Original Assignee
Gongniu Group 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 Gongniu Group Co Ltd filed Critical Gongniu Group Co Ltd
Priority to CN202010969525.1A priority Critical patent/CN112053477B/en
Publication of CN112053477A publication Critical patent/CN112053477A/en
Application granted granted Critical
Publication of CN112053477B publication Critical patent/CN112053477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/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/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/321Cryptographic 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 a third party or a trusted authority
    • H04L9/3213Cryptographic 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 a third party or a trusted authority using tickets or tokens, e.g. Kerberos

Landscapes

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

Abstract

The application relates to the field of smart homes, and relates to a control system of a smart door lock. The system comprises a client, an intelligent door lock and a server; the client is used for sending a binding request to the server; the server is used for receiving the binding request sent by the client and generating a client token according to the binding request; sending a client token to the client; the client is also used for sending a client token to the intelligent door lock; the intelligent door lock is used for receiving the client token; encrypting the client token to obtain a door lock token; sending a door lock token to a server; the server is also used for receiving the door lock token; matching verification of the client and the intelligent door lock is carried out; and determining the control binding relationship between the client and the intelligent door lock. The door lock token is obtained by receiving the client token indicating the matching verification between the client and the intelligent door lock and forwarding the token to the intelligent door lock, so that the security of the binding between the client and the intelligent door lock is improved.

Description

智能门锁的控制系统、方法、装置及可读存储介质Control system, method, device and readable storage medium for smart door lock

技术领域technical field

本申请涉及智能家居领域,特别涉及一种智能门锁的控制系统、方法、装 置及可读存储介质。The present application relates to the field of smart home, and in particular, to a control system, method, device and readable storage medium for a smart door lock.

背景技术Background technique

智能家居技术是在互联网影响下的物联化的体现。智能门锁作为智能家居 技术的一种体现,因其较好的安全性以及使用的便捷性,被越来越广泛地使用。Smart home technology is the embodiment of IoT under the influence of the Internet. As an embodiment of smart home technology, smart door locks are more and more widely used because of their better security and ease of use.

相关技术中,当用户需要对智能门锁进行控制时,用户控制客户端与服务 器进行验证,验证方法包括在客户端中输入密码或输入验证码。当验证通过后, 服务器即确定客户端与智能门锁之间建立控制绑定关系,用户即可以通过客户 端对智能门锁进行控制。In the related art, when the user needs to control the smart door lock, the user controls the client to verify with the server, and the verification method includes inputting a password or inputting a verification code in the client. When the verification is passed, the server determines that a control binding relationship is established between the client and the smart door lock, and the user can control the smart door lock through the client.

然而,在上述过程中,客户端与智能门锁直接通过客户端与服务器之间的 认证即进行绑定,致使客户端与智能门锁之间绑定的安全性较低。However, in the above process, the client and the smart door lock are bound directly through the authentication between the client and the server, resulting in low security for the binding between the client and the smart door lock.

发明内容SUMMARY OF THE INVENTION

本申请关于一种智能门锁的控制系统、方法、装置及可读存储介质,可以 提高客户端与智能门锁之间进行绑定时的安全性。The present application relates to a control system, method, device and readable storage medium for an intelligent door lock, which can improve the security when binding between a client and an intelligent door lock.

一方面,提供了一种智能门锁的控制系统,该智能门锁的控制系统包括客 户端、智能门锁和服务器;On the one hand, a control system of a smart door lock is provided, and the control system of the smart door lock includes a client, a smart door lock and a server;

客户端,用于向服务器发送绑定请求,绑定请求用于请求建立客户端与智 能门锁之间的控制绑定关系;The client is used to send a binding request to the server, and the binding request is used to request the establishment of a control binding relationship between the client and the smart door lock;

服务器,用于接收客户端发送的绑定请求,根据绑定请求生成客户端令牌; 向客户端发送客户端令牌;The server is used to receive the binding request sent by the client, and generate the client token according to the binding request; send the client token to the client;

客户端,还用于接收客户端令牌;向智能门锁发送客户端令牌;The client is also used to receive the client token; send the client token to the smart door lock;

智能门锁,用于接收客户端令牌;对客户端令牌进行加密,得到门锁令牌; 向服务器发送门锁令牌;The smart door lock is used to receive the client token; encrypt the client token to obtain the door lock token; send the door lock token to the server;

服务器,还用于接收门锁令牌;通过门锁令牌进行客户端和智能门锁的匹 配验证;响应于匹配验证通过,确定客户端与智能门锁之间的控制绑定关系。The server is also used to receive the door lock token; perform matching verification between the client and the smart door lock through the door lock token; in response to passing the matching verification, determine the control binding relationship between the client and the smart door lock.

另一方面,提供了一种智能门锁的控制方法,该方法包括:In another aspect, a method for controlling a smart door lock is provided, the method comprising:

向服务器发送绑定请求,绑定请求用于请求建立客户端与智能门锁之间的 控制绑定关系;Send a binding request to the server, and the binding request is used to request the establishment of a control binding relationship between the client and the smart door lock;

接收服务器发送的客户端令牌;Receive the client token sent by the server;

向智能门锁发送客户端令牌,智能门锁用于加密客户端令牌,并通过服务 器进行客户端和智能门锁的匹配验证;Send the client token to the smart door lock, the smart door lock is used to encrypt the client token, and the client and the smart door lock are matched and verified through the server;

响应于匹配验证通过,建立与智能门锁之间的控制绑定关系。In response to passing the matching verification, a control binding relationship with the smart door lock is established.

另一方面,提供了一种智能门锁的控制方法,该方法包括:In another aspect, a method for controlling a smart door lock is provided, the method comprising:

接收客户端发送的客户端令牌;Receive the client token sent by the client;

对客户端令牌进行加密,得到门锁令牌;Encrypt the client token to get the door lock token;

向服务器发送门锁令牌,服务器用于通过门锁令牌进行客户端和智能门锁 的匹配验证;Send the door lock token to the server, and the server uses the door lock token to perform matching verification between the client and the smart door lock;

响应于匹配验证通过,建立与客户端之间的控制绑定关系。In response to passing the matching verification, a control binding relationship with the client is established.

另一方面,提供了一种智能门锁的控制装置,该装置包括:In another aspect, a control device for a smart door lock is provided, the device comprising:

发送模块,用于向服务器发送绑定请求,绑定请求用于请求建立客户端与 智能门锁之间的控制绑定关系;The sending module is used to send a binding request to the server, and the binding request is used to request to establish a control binding relationship between the client and the smart door lock;

接收模块,用于接收服务器发送的客户端令牌;The receiving module is used to receive the client token sent by the server;

发送模块,还用于向智能门锁发送客户端令牌,智能门锁用于加密客户端 令牌,并通过服务器进行客户端和智能门锁的匹配验证;The sending module is also used to send the client token to the smart door lock, and the smart door lock is used to encrypt the client token, and perform matching verification between the client and the smart door lock through the server;

建立模块,用于响应于匹配验证通过,建立与智能门锁之间的控制绑定关 系。The establishment module is used to establish a control binding relationship with the smart door lock in response to the matching verification passing.

另一方面,提供了一种智能门锁的控制装置,该装置包括:In another aspect, a control device for a smart door lock is provided, the device comprising:

接收模块,用于接收客户端发送的客户端令牌;The receiving module is used to receive the client token sent by the client;

加密模块,用于对客户端令牌进行加密,得到门锁令牌;The encryption module is used to encrypt the client token to obtain the door lock token;

发送模块,用于向服务器发送门锁令牌,服务器用于通过门锁令牌进行客 户端和智能门锁的匹配验证;The sending module is used to send the door lock token to the server, and the server is used to perform matching verification between the client and the smart door lock through the door lock token;

建立模块,用于响应于匹配验证通过,建立与客户端之间的控制绑定关系。The establishment module is used to establish a control binding relationship with the client in response to the matching verification being passed.

另一方面,提供了一种计算机设备,计算机设备包括处理器和存储器,存 储器中存储有至少一条指令、至少一段程序、代码集或指令集,至少一条指令、 至少一段程序、代码集或指令集由处理器加载并执行以实现如上述本申请实施 例中提供的智能门锁的控制方法。In another aspect, a computer device is provided, the computer device includes a processor and a memory, and the memory stores at least one instruction, at least one program, code set or instruction set, at least one instruction, at least one program, code set or instruction set Loaded and executed by the processor to implement the control method of the smart door lock provided in the above embodiments of the present application.

另一方面,提供了一种计算机可读存储介质,计算机可读存储介质中存储 有至少一条指令、至少一段程序、代码集或指令集,至少一条指令、至少一段 程序、代码集或指令集由处理器加载并执行以实现上述任一所述的智能门锁的 控制方法。In another aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores at least one instruction, at least one piece of program, code set or instruction set, and at least one instruction, at least one piece of program, code set or instruction set consists of The processor loads and executes to implement any one of the above-mentioned control methods for smart door locks.

另一方面,提供了一种计算机程序产品,当计算机程序产品在计算机上运 行时,使得计算机执行如上述本申请实施例中任一所述的智能门锁的控制方法。On the other hand, a computer program product is provided, when the computer program product is run on a computer, the computer is made to execute the control method for a smart door lock as described in any one of the above embodiments of the present application.

本申请提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solution provided by this application include at least:

通过接收到指示客户端与智能门锁之间进行匹配验证的客户端令牌,并将 该令牌通过转发至智能门锁的方式得到门锁令牌,进而根据服务器的匹配结果 确定客户端与智能门锁之间的控制绑定关系,实现了在以客户端令牌作为凭证 的基础上,客户端、服务器与智能门锁对于绑定过程信息的知悉与验证确认, 提高了客户端与智能门锁之间进行绑定时的安全性。By receiving the client token indicating the matching verification between the client and the smart door lock, and forwarding the token to the smart door lock, the door lock token is obtained, and then the client is determined according to the matching result of the server. The control binding relationship between the smart door locks realizes the knowledge and verification of the binding process information between the client, the server and the smart door lock on the basis of the client token as the certificate, which improves the client and smart door locks. Security when binding between door locks.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1示出了本申请一个示例性实施例提供的实施环境示意图;FIG. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

图2示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的流 程图;Fig. 2 shows a flow chart of a control method of a smart door lock provided by an exemplary embodiment of the present application;

图3示出了本申请一个示例性实施例提供的一种控制界面的示意图;FIG. 3 shows a schematic diagram of a control interface provided by an exemplary embodiment of the present application;

图4示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的流 程图;Fig. 4 shows a flow chart of a control method of a smart door lock provided by an exemplary embodiment of the present application;

图5示出了本申请一个示意性实施例提供的一种配网过程的示意图;FIG. 5 shows a schematic diagram of a network distribution process provided by an exemplary embodiment of the present application;

图6示出了本申请一个示例性实施例提供的一种对智能门锁进行控制的控 制界面的示意图;6 shows a schematic diagram of a control interface for controlling a smart door lock provided by an exemplary embodiment of the present application;

图7示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的流 程示意图;Fig. 7 shows a schematic flowchart of a control method for a smart door lock provided by an exemplary embodiment of the present application;

图8示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的流 程示意图;Fig. 8 shows a schematic flowchart of a control method for a smart door lock provided by an exemplary embodiment of the present application;

图9示出了本申请一个示例性实施例提供的一种控制界面的示意图;FIG. 9 shows a schematic diagram of a control interface provided by an exemplary embodiment of the present application;

图10示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的过 程示意图;Figure 10 shows a schematic process diagram of a control method for a smart door lock provided by an exemplary embodiment of the present application;

图11示出了本申请一个示意性实施例提供的一种智能门锁的控制装置的结 构框图;Figure 11 shows a structural block diagram of a control device for an intelligent door lock provided by an exemplary embodiment of the present application;

图12示出了本申请一个示例性实施例提供的另一种智能门锁的控制装置的 结构框图;Figure 12 shows a structural block diagram of a control device for another smart door lock provided by an exemplary embodiment of the present application;

图13示出了本申请一个示例性实施例提供一种执行智能门锁的控制方法的 终端的结构示意图;13 shows a schematic structural diagram of a terminal for implementing a control method for a smart door lock provided by an exemplary embodiment of the present application;

图14示出了本申请一个示例性实施例提供的服务器的结构示意图。FIG. 14 shows a schematic structural diagram of a server provided by an exemplary embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请 实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

首先,对本申请实施例中涉及的名词进行简单的介绍:First, briefly introduce the terms involved in the embodiments of this application:

智能门锁,智能门锁是指由传统机械锁改进的,在用户安全性、识别、管 理型方面更加智能化的锁具。在本申请实施例中,智能门锁为可以通过终端设 备上对应的客户端,进行远程控制的门锁,在客户端中输入预设密码之后,智 能门锁即会自动解锁。Smart door locks, smart door locks refer to locks that are improved from traditional mechanical locks and are more intelligent in terms of user security, identification, and management. In the embodiment of the present application, the smart door lock is a door lock that can be remotely controlled through the corresponding client terminal on the terminal device, and the smart door lock will be automatically unlocked after the preset password is input in the client terminal.

令牌,是一种动态口令技术,每隔预设的时间,服务器即会生成一串字符 密码,将该字符密码进行加工后,即得到令牌,该令牌会被发送至需要进行验 证的终端当中,以进行身份认证。终端可以对接收到的令牌进行诸如加密、分 割、插入字符段的加工,以形成新的令牌。在一个示例中,令牌为客户端令牌, 该客户端令牌用于指示客户端与智能门锁,且用于进行客户端与智能门锁的匹 配验证。Token is a kind of dynamic password technology. Every preset time, the server will generate a string of character passwords. After processing the character passwords, the token will be obtained, and the token will be sent to the authentication server. terminal for identity authentication. The terminal can perform processing such as encryption, segmentation, and insertion of character fields on the received token to form a new token. In one example, the token is a client token, and the client token is used to indicate the client and the smart door lock and to perform matching verification between the client and the smart door lock.

首先,对本申请实施例中设计的实施环境进行介绍,如图1所示,智能门 锁的控制系统100中包括客户端110、服务器120以及智能门锁130。First, the implementation environment designed in the embodiment of the present application is introduced. As shown in FIG. 1 , the control system 100 of a smart door lock includes a client 110, a server 120, and a smart door lock 130.

客户端110和服务器120之间建立有通信网络连接。为保证智能门锁130 的安全性,当智能门锁130不处于与客户端110建立控制绑定关系的情况下, 智能门锁130不与服务器120通过通信网络进行连接,且,即使在智能门锁130 与客户端110建立控制绑定关系的情况下,服务器120发送至智能门锁130的 数据也需要通过客户端110进行透传,服务器120与智能门锁130之间不建立 有通信网络连接。A communication network connection is established between the client 110 and the server 120 . In order to ensure the security of the smart door lock 130, when the smart door lock 130 is not in a control binding relationship with the client 110, the smart door lock 130 is not connected with the server 120 through the communication network, and even in the smart door lock 130 When the lock 130 establishes a control binding relationship with the client 110, the data sent by the server 120 to the smart door lock 130 also needs to be transparently transmitted through the client 110, and no communication network connection is established between the server 120 and the smart door lock 130. .

在本申请实施例中,客户端在与智能门锁建立控制绑定关系的过程中,客 户端110向服务器120发送绑定请求,该绑定请求用于请求建立客户端110与 智能门锁130之间的控制绑定关系。服务器120用于接收客户端110发送的绑 定请求,根据绑定请求生成用于进行控制绑定关系的客户端令牌,并向客户端 110发送该客户端令牌。客户端110接收并向智能门锁130发送该客户端令牌。 在智能门锁130接收到该客户端令牌后,对该客户端令牌进行加密,得到门锁 令牌,并向服务器120发送该门锁令牌。服务器120在接收到该令牌后,进行 客户端110与智能门锁130之间的匹配验证。响应于匹配验证通过,客户端110 与智能门锁130分别建立与对方的控制绑定关系。In the embodiment of the present application, in the process of establishing a control binding relationship with the smart door lock, the client 110 sends a binding request to the server 120, and the binding request is used to request the establishment of the client 110 and the smart door lock 130. The control binding relationship between them. The server 120 is configured to receive the binding request sent by the client 110, generate a client token for controlling the binding relationship according to the binding request, and send the client token to the client 110. Client 110 receives and sends the client token to smart door lock 130 . After the smart door lock 130 receives the client token, it encrypts the client token to obtain a door lock token, and sends the door lock token to the server 120. After receiving the token, the server 120 performs matching verification between the client 110 and the smart door lock 130. In response to passing the matching verification, the client 110 and the smart door lock 130 respectively establish a control binding relationship with each other.

在本实施环境中,客户端通过接收到指示客户端与智能门锁之间进行匹配 验证的客户端令牌,并将该令牌通过转发至智能门锁的方式得到门锁令牌,进 而根据服务器的匹配结果确定客户端与智能门锁之间的控制绑定关系的方式, 实现了在以客户端令牌作为凭证的基础上,客户端、服务器与智能门锁对于绑 定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进行绑定时的安 全性。In this implementation environment, the client obtains the door lock token by receiving the client token indicating matching verification between the client and the smart door lock, and forwards the token to the smart door lock, and then according to the The matching result of the server determines the control binding relationship between the client and the smart door lock, which realizes that the client, the server and the smart door lock know the binding process information on the basis of the client token as the credential. With verification confirmation, the security of the binding between the client and the smart door lock is improved.

可选地,在上述申请实施例提供的智能门锁的控制系统中,客户端与服务 器的通信连接为第一通信连接。客户端与智能门锁之间的通信连接为第二通信 连接。可选地,第一通信连接和第二通信连接包括:近场通信(Near Field Communication,NFC)、无线保真(Wireless-Fidelity,Wi-Fi)通信、蓝牙通信 以及蜂窝移动数据网络通信中的至少一种。可选地,第一通信连接与第二通信 连接相同;或,第一通信连接与第二通信连接不同。Optionally, in the control system for the smart door lock provided in the above application embodiment, the communication connection between the client and the server is the first communication connection. The communication connection between the client and the smart door lock is the second communication connection. Optionally, the first communication connection and the second communication connection include: Near Field Communication (Near Field Communication, NFC), Wireless-Fidelity (Wireless-Fidelity, Wi-Fi) communication, Bluetooth communication, and cellular mobile data network communication. at least one. Optionally, the first communication connection is the same as the second communication connection; or, the first communication connection and the second communication connection are different.

图2示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的流 程图,以该方法应用于客户端中为例进行说明,该方法包括:Fig. 2 shows a flow chart of a control method of a smart door lock provided by an exemplary embodiment of the present application, and is described by taking the method applied to a client as an example, and the method includes:

步骤201,向服务器发送绑定请求,绑定请求用于请求建立客户端与智能门 锁之间的控制绑定关系。Step 201: Send a binding request to the server, where the binding request is used to request to establish a control binding relationship between the client and the smart door lock.

可选地,客户端实现为具有通信功能的终端或计算机设备中的应用程序。 在本实施例中,客户端实现为包括对智能门锁进行远程控制的应用程序。Optionally, the client is implemented as an application program in a terminal or computer device with a communication function. In this embodiment, the client is implemented as an application including remote control of the smart door lock.

在本申请中,客户端设置有进行网络通信的实体接口,或,虚拟接口。通 过对于该接口的配置,客户端可以实现与其他设备的通信连接。该通信连接的 通信形式包括:近场通信、Wi-Fi通信、蓝牙通信以及蜂窝移动数据网络通信中 的至少一种。In this application, the client is provided with a physical interface or a virtual interface for network communication. Through the configuration of this interface, the client can realize the communication connection with other devices. The communication form of the communication connection includes at least one of near field communication, Wi-Fi communication, Bluetooth communication and cellular mobile data network communication.

绑定请求是客户端向服务器发送的,指示客户端与智能门锁之间建立控制 绑定关系的请求。一个绑定请求用于请求客户端与一个智能门锁之间建立控制 绑定关系;或,一个绑定请求用于请求客户端与至少两个智能门锁之间建立控 制绑定关系,本申请实施例对于绑定请求中客户端与智能门锁的数量不作限制, 并以绑定请求用于指示一个客户端与一个智能门锁进行绑定为例进行说明。The binding request is sent by the client to the server, indicating the request to establish a control binding relationship between the client and the smart door lock. A binding request is used to request the establishment of a control binding relationship between the client and one smart door lock; or, a binding request is used to request the establishment of a control binding relationship between the client and at least two smart door locks. This application The embodiment does not limit the number of clients and smart door locks in the binding request, and the binding request is used to instruct one client to bind with one smart door lock as an example for description.

客户端中显示有控制界面,控制界面中包括与智能门锁对应的虚拟控件, 绑定请求是根据对控制界面上的,与门锁对应的虚拟控件上的操作生成的;或, 客户端所对应的终端上设置有实体按键,绑定请求是通过对于实体按键进行按 压生成的;或,当客户端显示该控制界面时,则自动发送绑定请求。本申请实 施例对于绑定请求的生成方式不作限定。A control interface is displayed in the client, and the control interface includes a virtual control corresponding to the smart door lock, and the binding request is generated according to an operation on the virtual control corresponding to the door lock on the control interface; The corresponding terminal is provided with a physical button, and the binding request is generated by pressing the physical button; or, when the client terminal displays the control interface, the binding request is automatically sent. This embodiment of the present application does not limit the generation manner of the binding request.

请参考图3,在控制界面300中,以列表形式体现出可以与客户端301建立 控制绑定关系的智能门锁,包括智能门锁311、智能门锁312、智能门锁313以 及智能门锁314。在与每个智能门锁对应的位置,分别设置有绑定控件321、绑 定控件322、绑定控件323和绑定控件324,以及解除绑定控件331、解除绑定 控件332、解除绑定控件333以及解除绑定控件334。通过对于绑定控件的按压 操作,客户端可以向服务器发送绑定请求,而通过对于解除绑定控件的按压操 作,客户端可以向服务器发送解除绑定请求。Please refer to FIG. 3 , in the control interface 300 , the smart door locks that can establish a control binding relationship with the client 301 are represented in the form of a list, including the smart door lock 311 , the smart door lock 312 , the smart door lock 313 and the smart door lock 314. At the position corresponding to each smart door lock, a binding control 321, a binding control 322, a binding control 323 and a binding control 324, as well as an unbinding control 331, an unbinding control 332, and an unbinding control are respectively provided. control 333 and unbind control 334. By pressing the bound control, the client can send a binding request to the server, and by pressing the unbound control, the client can send an unbinding request to the server.

此外,在控制界面中,还可以进行客户端与智能门锁之间的配网设置。In addition, in the control interface, the distribution network settings between the client and the smart door lock can also be performed.

步骤202,接收服务器发送的客户端令牌。Step 202: Receive the client token sent by the server.

在接收到客户端发送的绑定请求后,服务器会根据该绑定请求生成客户端 令牌。客户端令牌用于指示绑定请求中所包括的客户端与智能门锁,且用于进 行客户端与智能门锁之间的匹配验证。After receiving the binding request sent by the client, the server will generate a client token according to the binding request. The client token is used to indicate the client and the smart door lock included in the binding request, and is used for matching verification between the client and the smart door lock.

在一个示例中,客户端令牌中包括客户端对应的客户端标识以及智能门锁 对应的门锁标识,通过该客户端标识以及门锁标识,即可确定建立控制绑定关 系的客户端以及智能门锁。In one example, the client token includes the client identifier corresponding to the client and the door lock identifier corresponding to the smart door lock. Through the client identifier and the door lock identifier, the client that establishes the control binding relationship and the Smart door lock.

客户端令牌具有使用时限。在一个示例中,客户端令牌的使用时限为24小 时。Client tokens have a time limit. In one example, the client token is valid for 24 hours.

步骤203,向智能门锁发送客户端令牌,智能门锁用于加密客户端令牌,并 通过服务器进行客户端与智能门锁之间的匹配验证。In step 203, the client token is sent to the smart door lock, and the smart door lock is used to encrypt the client token, and the server performs matching verification between the client and the smart door lock.

在本申请实施例中,智能门锁与客户端通过第二通信连接进行通信连接。 可选地,智能门锁与客户端直接连接,或,智能门锁与客户端首先进行配网验 证,再通过第一通信连接进行通信连接。在一个示例中,客户端与智能门锁之 间通过蓝牙网络进行连接。In the embodiment of the present application, the smart door lock and the client are communicatively connected through the second communication connection. Optionally, the smart door lock is directly connected to the client, or the smart door lock and the client first perform network distribution verification, and then communicate through the first communication connection. In one example, the connection between the client and the smart door lock is via a Bluetooth network.

智能门锁在接收到客户端发送的客户端令牌后,对客户端令牌进行加密, 得到门锁令牌。After receiving the client token sent by the client, the smart door lock encrypts the client token to obtain the door lock token.

为保证智能门锁的安全性,在得到门锁令牌后,智能门锁通过客户端将门 锁令牌透传至服务器。具体地,智能门锁首先通过与客户端之间的第二通信连 接,将门锁令牌发送至客户端,再由客户端通过自身与服务器之间的第一通信 连接,将门锁令牌发送至服务器中。To ensure the security of the smart door lock, after obtaining the door lock token, the smart door lock transparently transmits the door lock token to the server through the client. Specifically, the smart door lock first sends the door lock token to the client through the second communication connection with the client, and then the client sends the door lock token to the client through the first communication connection between itself and the server. in the server.

在接收到门锁令牌后,服务器即对门锁令牌进行解密,以确定建立控制绑 定关系的客户端与智能门锁。该过程即为匹配验证的过程。After receiving the door lock token, the server decrypts the door lock token to determine the client and the smart door lock that have established a control binding relationship. This process is the process of matching verification.

步骤204,响应于匹配验证通过,建立与智能门锁之间的控制绑定关系。Step 204, in response to passing the matching verification, establish a control binding relationship with the smart door lock.

在匹配验证通过后,服务器即确定客户端与智能门锁之间建立有控制绑定 关系。在一个示例中,服务器中将客户端与智能门锁之间的控制绑定关系进行 记录,并向客户端以及智能门锁发送指示建立控制绑定关系成功的信息。客户 端与智能门锁接收到该信息后,建立控制绑定关系。After the matching verification is passed, the server determines that a control binding relationship is established between the client and the smart door lock. In one example, the server records the control binding relationship between the client and the smart door lock, and sends information indicating that the control binding relationship is established successfully to the client and the smart door lock. After receiving the information, the client and the smart door lock establish a control binding relationship.

综上所述,本实施例提供的方法,通过接收到指示客户端与智能门锁之间 进行匹配验证的客户端令牌,并将该令牌通过转发至智能门锁的方式得到门锁 令牌,进而根据服务器的匹配结果确定客户端与智能门锁之间的控制绑定关系, 实现了在以客户端令牌作为凭证的基础上,客户端、服务器与智能门锁对于绑 定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进行绑定时的安 全性。To sum up, the method provided in this embodiment obtains the door lock order by receiving the client token indicating matching verification between the client and the smart door lock, and forwarding the token to the smart door lock Then, according to the matching result of the server, the control binding relationship between the client and the smart door lock is determined, which realizes that on the basis of using the client token as the certificate, the client, the server and the smart door lock are used for the binding process information. The knowledge and verification of the smart door lock improve the security of the binding between the client and the smart door lock.

图4示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的流 程图,以该方法应用于智能门锁的控制系统中为进行说明,该方法包括:Fig. 4 shows the flow chart of the control method of a kind of smart door lock provided by an exemplary embodiment of the present application, with the method being applied to the control system of the smart door lock for illustration, the method includes:

步骤401,客户端向服务器发送绑定请求。Step 401, the client sends a binding request to the server.

该步骤与步骤201相同,在此不作赘述。This step is the same as step 201 and will not be repeated here.

可选地,在发送绑定请求之前,客户端与智能门锁之间进行配网验证。请 参考图5,智能门锁上501包括一个实体按键5011作为配网按键,通过按压该 配网按键5011,智能门锁发送配网信号5012。而客户端的控制界面502上包括 虚拟配网按键5021,通过对于配网按键5021的按压操作,客户端进入配网状态, 当配网状态下的客户端接收到配网信号5012时,即与智能门锁501进行完成配 网过程。可选地,上述配网过程通过客户端与智能门锁之间的蓝牙连接完成。Optionally, before sending the binding request, a network distribution verification is performed between the client and the smart door lock. Please refer to Fig. 5, the smart door lock 501 includes a physical button 5011 as a network distribution button, and by pressing the network distribution button 5011, the smart door lock sends a network distribution signal 5012. The control interface 502 of the client includes a virtual network distribution button 5021. By pressing the network distribution button 5021, the client enters the network distribution state. When the client in the network distribution state receives the network distribution signal 5012, it will communicate with the intelligent The door lock 501 completes the network distribution process. Optionally, the above-mentioned network distribution process is completed through a Bluetooth connection between the client and the smart door lock.

在本申请的其他实施例中,智能门锁上的配网按键实现为显示在智能门锁 的显示屏上的虚拟按键。客户端的配网状态为客户端进入控制界面时自动切换 的,本申请对于上述情况不作限制。In other embodiments of the present application, the network distribution button on the smart door lock is implemented as a virtual button displayed on the display screen of the smart door lock. The distribution network state of the client is automatically switched when the client enters the control interface, and this application does not limit the above situation.

步骤402,服务器接收客户端发送的绑定请求。Step 402, the server receives the binding request sent by the client.

在本实施例中,服务器实现为云端服务器。服务器中存储有客户端对应的 客户端标识、与客户端标识对应的历史信息、门锁标识以及与门锁标识对应的 历史信息。In this embodiment, the server is implemented as a cloud server. The server stores the client identification corresponding to the client, the historical information corresponding to the client identification, the door lock identification and the historical information corresponding to the door lock identification.

步骤403,服务器根据绑定请求生成客户端令牌。Step 403, the server generates a client token according to the binding request.

可选地,在接收到服务器的绑定请求后,根据服务器中存储的信息生成客 户端令牌。在一个示例中,该客户端令牌为被加密后的字符串,该字符串中具 有与客户端对应的客户端标识以及与智能门锁对应的门锁标识。Optionally, after receiving the binding request from the server, the client token is generated according to the information stored in the server. In an example, the client token is an encrypted character string, and the character string has a client identification corresponding to the client and a door lock identification corresponding to the smart door lock.

步骤404,服务器向客户端发送客户端令牌。Step 404, the server sends the client token to the client.

可选地,服务器在发送客户端令牌时开始计时,以确定客户端令牌的可使 用时限,只有在可使用时限中,客户端与智能门锁才可以通过客户端令牌进行 身份验证,以及后续的控制绑定关系的确定。Optionally, the server starts timing when sending the client token to determine the usable time limit of the client token. Only in the usable time limit, the client and the smart door lock can be authenticated by the client token, and the subsequent determination of the control binding relationship.

步骤405,客户端接收客户端令牌。Step 405, the client receives the client token.

步骤406,客户端向智能门锁发送客户端令牌。Step 406, the client sends the client token to the smart door lock.

如上实施例所述,客户端向智能门锁进行客户端令牌的转发。As described in the above embodiment, the client forwards the client token to the smart door lock.

可选地,若客户端与智能门锁未进行配网连接,则客户端以广播的形式发 送信号,智能门锁在接收到信号后进行验证,通过验证即可直接获取客户端令 牌。Optionally, if the client and the smart door lock are not connected to the network, the client sends a signal in the form of a broadcast, and the smart door lock verifies after receiving the signal, and the client token can be directly obtained through the verification.

步骤407,智能门锁接收客户端令牌。Step 407, the smart door lock receives the client token.

智能门锁通过第二通信连接接受来自客户端的客户端令牌。The smart door lock accepts the client token from the client through the second communication connection.

在本申请的其他实施例中,当客户端向智能门锁发送令牌时,客户端还向 智能门锁进行客户端标识的发送,使智能门锁可以知悉客户端令牌来自于何客 户端。In other embodiments of the present application, when the client sends the token to the smart door lock, the client also sends the client identification to the smart door lock, so that the smart door lock can know from which client the client token comes from .

步骤408,智能门锁对客户端令牌进行加密,得到门锁令牌。Step 408, the smart door lock encrypts the client token to obtain a door lock token.

在本申请实施例中,加密方法包括高级加密标准(Advanced EncryptionStandard,AES)加密算法,智能门锁通过该加密方法对客户端令牌进行加密, 得到门锁令牌。In this embodiment of the present application, the encryption method includes an Advanced Encryption Standard (Advanced Encryption Standard, AES) encryption algorithm, and the smart door lock encrypts the client token through the encryption method to obtain the door lock token.

步骤409,智能门锁向服务器发送门锁令牌。Step 409, the smart door lock sends a door lock token to the server.

可选地,智能门锁通过客户端对服务器进行门锁令牌的转发,在该过程中, 门锁令牌首先通过第二通信连接由智能门锁发送至客户端,再通过第一通信连 接由客户端发送至服务器。Optionally, the smart door lock forwards the door lock token to the server through the client. In this process, the door lock token is first sent to the client by the smart door lock through the second communication connection, and then the first communication connection is used. Sent by the client to the server.

步骤410,服务器接收门锁令牌。Step 410, the server receives the door lock token.

该过程即为服务器通过第一通信连接从客户端处接收到门锁令牌的过程。This process is the process in which the server receives the door lock token from the client through the first communication connection.

步骤411,服务器通过门锁令牌进行客户端和智能门锁的匹配验证。Step 411, the server performs matching verification between the client and the smart door lock through the door lock token.

可选地,服务器对门锁令牌进行对应解密,并从解密得到的,门锁令牌中 包含的信息中确定客户端与智能门锁的对应关系,以进行客户端与智能门锁的 匹配验证。Optionally, the server decrypts the door lock token correspondingly, and determines the correspondence between the client and the smart door lock from the decrypted information contained in the door lock token, so as to perform matching verification between the client and the smart door lock. .

步骤412,服务器响应于匹配验证通过,确定客户端与智能门锁之间的控制 绑定关系。Step 412, the server determines the control binding relationship between the client and the smart door lock in response to the matching verification being passed.

在一个示例中,服务器将门锁令牌中的客户端标识与门锁标识与自身预存 的客户端标识与门锁标识进行验证,确认其正确性,在确认正确性后,即确定 客户端与智能门锁之间的控制绑定关系。In one example, the server verifies the client identification and the door lock identification in the door lock token with the client identification and the door lock identification pre-stored by itself, and confirms their correctness. The control binding relationship between door locks.

在建立控制绑定关系后,客户端即可通过控制界面对智能门锁进行控制。 请参考图6,控制界面600为客户端与智能门锁610建立有控制绑定关系后,对 智能门锁610进行控制的界面。在控制区域611内,包括了开锁控件6111、闭 锁控件6112以及解绑控件6113。通过开锁控件6111,客户端可以使智能门锁切 换为开锁状态;通过闭锁控件6112,客户端可以使智能门锁切换为闭锁状态; 通过解绑控件6113,客户端可以解除对于智能门锁的绑定。After the control binding relationship is established, the client can control the smart door lock through the control interface. Referring to FIG. 6 , the control interface 600 is an interface for controlling the smart door lock 610 after the client and the smart door lock 610 have established a control binding relationship. In the control area 611, an unlocking control 6111, a locking control 6112 and an unbinding control 6113 are included. Through the unlocking control 6111, the client can switch the smart door lock to the unlocked state; through the locking control 6112, the client can switch the smart door lock to the locked state; through the unbinding control 6113, the client can unbind the smart door lock Certainly.

综上所述,本实施例提供的方法,于客户端,通过接收到指示客户端与智 能门锁之间进行匹配验证的客户端令牌,并将该令牌通过转发至智能门锁的方 式得到门锁令牌,进而根据服务器的匹配结果确定客户端与智能门锁之间的控 制绑定关系,实现了在以客户端令牌作为凭证的基础上,客户端、服务器与智 能门锁对于绑定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进 行绑定时的安全性。To sum up, in the method provided in this embodiment, the client receives a client token that indicates matching verification between the client and the smart door lock, and forwards the token to the smart door lock. The door lock token is obtained, and then the control binding relationship between the client and the smart door lock is determined according to the matching result of the server, which realizes that on the basis of the client token as the credential, the client, the server and the smart door lock can The knowledge and verification of the binding process information improves the security of the binding between the client and the smart door lock.

于智能门锁,通过在自身接收到客户端令牌,并知悉与客户端建立控制绑 定关系的条件后,由客户端转发门锁令牌至服务器,使服务器以门锁令牌为凭 证,确认客户端与智能门锁之间已完成验证,进而实现客户端、服务器与智能 门锁对于绑定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进行 绑定时的安全性。For smart door locks, after receiving the client token and knowing the conditions for establishing a control and binding relationship with the client, the client forwards the door lock token to the server, so that the server uses the door lock token as the certificate, Confirm that the verification between the client and the smart door lock has been completed, so as to realize the knowledge and verification of the binding process information between the client, the server and the smart door lock, and improve the security of the binding between the client and the smart door lock. sex.

也即,本实施例提供的方法,使客户端、服务器与智能门锁对于绑定过程 信息均知悉,且通过门锁令牌进行了确认,提高了客户端与智能门锁之间进行 绑定时的安全性。That is, the method provided in this embodiment enables the client, the server and the smart door lock to know the binding process information, and confirms it through the door lock token, which improves the binding between the client and the smart door lock. time security.

在客户端与智能门锁之间的控制绑定关系的建立过程中,可以通过标识与 密钥的匹配,对于客户端以及智能门锁的身份进行进一步地验证。图7示出了 本申请一个示例性实施例提供的一种智能门锁的控制方法的流程示意图,该过 程可以替换实现于如图4所示的步骤408之后,该方法包括:During the establishment of the control binding relationship between the client and the smart door lock, the identity of the client and the smart door lock can be further verified by matching the identifier and the key. Fig. 7 shows the schematic flow chart of the control method of a kind of intelligent door lock provided by an exemplary embodiment of the present application, and this process can replace after step 408 as shown in Fig. 4, this method comprises:

步骤701,智能门锁向服务器发送第一门锁密钥和门锁标识。Step 701, the smart door lock sends the first door lock key and the door lock identifier to the server.

本实施例中,门锁对应有门锁密钥以及门锁标识。门锁密钥包括第一门锁 密钥以及第二门锁密钥。其中,第一门锁密钥为智能门锁的原生标识,即在智 能门锁生产时烧录至智能门锁,并在服务器中存储的门锁标识。第二门锁密钥 是服务器为客户端生成的临时密钥。在一个示例中,该临时密钥室服务器接收 到门锁标识时,为智能门锁生成的密钥;在另一个示例中,该临时密钥是服务 器接收到客户端与智能门锁的配网信息后生成的密钥。本申请对于第二门锁密 钥的生成时间不做限制,且以第二门锁密钥是服务器接收到客户端与智能门锁 的配网信息后生成的密钥为例进行说明。In this embodiment, the door lock corresponds to a door lock key and a door lock identifier. The door lock key includes a first door lock key and a second door lock key. Among them, the first door lock key is the original identifier of the smart door lock, that is, the door lock identifier that is burned into the smart door lock when the smart door lock is produced and stored in the server. The second door lock key is a temporary key generated by the server for the client. In one example, when the temporary key room server receives the door lock identification, it generates a key for the smart door lock; in another example, the temporary key is the distribution network between the client and the smart door lock received by the server. The key generated after the information. This application does not limit the generation time of the second door lock key, and the second door lock key is the key generated after the server receives the network distribution information between the client and the smart door lock as an example for description.

可选地,步骤701实现于如图4所示的步骤408之后;或,步骤701实现 于如图4所示的步骤401之前。Optionally, step 701 is implemented after step 408 as shown in FIG. 4 ; or, step 701 is implemented before step 401 as shown in FIG. 4 .

步骤702,服务器接收第一门锁密钥和门锁标识。Step 702, the server receives the first door lock key and the door lock identifier.

可选地,门锁以广播的形式进行第一门锁密钥以及门锁标识的广播,并在 广播的协议头中设置密钥,使服务器在接收到该广播时,需要对密钥进行解密, 方可获取第一门锁密钥和门锁标识。Optionally, the door lock broadcasts the first door lock key and the door lock identification in the form of broadcast, and sets the key in the protocol header of the broadcast, so that the server needs to decrypt the key when receiving the broadcast. , to obtain the first door lock key and door lock ID.

步骤703,服务器根据门锁标识确定第二门锁密钥。Step 703, the server determines the second door lock key according to the door lock identifier.

服务器在接收到门锁标识后,生成第二门锁密钥;或,服务器在接收到门 锁标识后,从服务器所存储的列表中获取第二门锁密钥。After receiving the door lock identification, the server generates a second door lock key; or, after receiving the door lock identification, the server obtains the second door lock key from a list stored by the server.

步骤704,客户端将第一客户端标识和门锁令牌发送至服务器。Step 704, the client sends the first client identifier and the door lock token to the server.

在本申请实施例中,客户端在转发门锁令牌的过程中,还将唯一指示客户 端的客户端标识进行同步转发。In the embodiment of the present application, in the process of forwarding the door lock token, the client also synchronously forwards the client identifier that uniquely indicates the client.

第一客户端标识为唯一指示客户端的标识。绑定请求中也包括第一客户端 标识。门锁令牌中还包括第二客户端标识,第二客户端标识为客户端令牌中包 括的客户端标识,也即,第二客户端标识是服务器根据发送绑定请求的客户端 确定的客户端标识。在正常的验证流程中,第一客户端标识与第二客户端标识 应相同。The first client identifier is an identifier that uniquely indicates the client. The binding request also includes the first client identifier. The door lock token also includes a second client identifier, and the second client identifier is the client identifier included in the client token, that is, the second client identifier is determined by the server according to the client that sent the binding request Client ID. In a normal verification process, the first client identification and the second client identification should be the same.

智能门锁对于客户端令牌的加密是通过第一门锁密钥进行加密的。在得到 门锁令牌后,智能门锁将第一客户端标识、门锁令牌一同转发至服务器中。The encryption of the client token by the smart door lock is encrypted by the first door lock key. After obtaining the door lock token, the smart door lock forwards the first client identification and the door lock token to the server together.

在一个示例中,智能门锁还同步发送门锁标识。In one example, the smart door lock also transmits the door lock identification synchronously.

步骤705,服务接收第一客户端标识和门锁令牌。Step 705, the service receives the first client identification and the door lock token.

在一个示例中,智能门锁还同步接收门锁标识。In one example, the smart door lock also receives the door lock identification synchronously.

步骤706,服务器通过门锁标识确定第二门锁密钥。Step 706, the server determines the second door lock key by using the door lock identifier.

在一个示例中,门锁令牌中包括明文显示的门锁标识,服务器可以直接通 过该门锁标识确定对应的第二门锁密钥;在另一个示例中,服务器同步接收到 智能门锁发送的门锁标识,并根据该门锁标识确定第二门锁密钥。In one example, the door lock token includes a door lock identifier displayed in plain text, and the server can directly determine the corresponding second door lock key through the door lock identifier; in another example, the server receives the transmission from the smart door lock synchronously. the door lock identification, and determine the second door lock key according to the door lock identification.

步骤707,服务器通过第二门锁密钥对门锁令牌进行解密,得到第二客户端 标识。Step 707, the server decrypts the door lock token through the second door lock key to obtain the second client identification.

在本申请实施例中,智能门锁的第二门锁密钥可以用于解密第一门锁密钥 加密的数据,由于第二门锁密钥仅由服务器进行存储,智能门锁无法对第二门 锁密钥进行知悉,故智能门锁智能通过第一门锁密钥对客户端令牌进行加密。 而在解密过程中,服务器可以通过指示统一智能门锁的,也即,通过同一门锁 标识对应的第二门锁密钥,对门锁令牌解密,得到第二客户端标识。In this embodiment of the present application, the second door lock key of the smart door lock can be used to decrypt the data encrypted by the first door lock key. Since the second door lock key is only stored by the server, the smart door lock cannot The second door lock key is known, so the smart door lock intelligently encrypts the client token through the first door lock key. And in the decryption process, the server can decrypt the door lock token by instructing the unified intelligent door lock, that is, through the second door lock key corresponding to the same door lock identification, to obtain the second client identification.

步骤708,服务器将第一客户端标识与第二客户端标识进行比对。Step 708: The server compares the first client identifier with the second client identifier.

由于通过验证时,要求服务器确定第一客户端标识与第二客户端标识指示 的客户端相同,故在一个示例中,服务器将第一客户端标识中的字符与第二客 户端标识中的字符进行逐个比对。When passing the verification, the server is required to determine that the first client identifier is the same as the client indicated by the second client identifier. Therefore, in an example, the server compares the characters in the first client identifier with the characters in the second client identifier. Compare one by one.

步骤709,服务器响应于第一客户端标识与第二客户端标识匹配,确定匹配 验证通过。Step 709, the server determines that the matching verification is passed in response to the first client identifier matching the second client identifier.

如上步骤708中所示,当服务器确定第一客户端标识中的每个字符与第二 客户端标识中的每个字符均相同时,即可确定匹配验证通过。As shown in the above step 708, when the server determines that each character in the first client identifier is the same as each character in the second client identifier, it can determine that the matching verification is passed.

综上所述,本实施例提供的方法,于客户端,通过接收到指示客户端与智 能门锁之间进行匹配验证的客户端令牌,并将该令牌通过转发至智能门锁的方 式得到门锁令牌,进而根据服务器的匹配结果确定客户端与智能门锁之间的控 制绑定关系,实现了在以客户端令牌作为凭证的基础上,客户端、服务器与智 能门锁对于绑定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进 行绑定时的安全性。To sum up, in the method provided in this embodiment, the client receives a client token that indicates matching verification between the client and the smart door lock, and forwards the token to the smart door lock. The door lock token is obtained, and then the control binding relationship between the client and the smart door lock is determined according to the matching result of the server, which realizes that on the basis of the client token as the credential, the client, the server and the smart door lock can The knowledge and verification of the binding process information improves the security of the binding between the client and the smart door lock.

于智能门锁,通过在自身接收到客户端令牌,并知悉与客户端建立控制绑 定关系的条件后,由客户端转发门锁令牌至服务器,使服务器以门锁令牌为凭 证,确认客户端与智能门锁之间已完成验证,进而实现客户端、服务器与智能 门锁对于绑定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进行 绑定时的安全性。For smart door locks, after receiving the client token and knowing the conditions for establishing a control and binding relationship with the client, the client forwards the door lock token to the server, so that the server uses the door lock token as the certificate, Confirm that the verification between the client and the smart door lock has been completed, so as to realize the knowledge and verification of the binding process information between the client, the server and the smart door lock, and improve the security of the binding between the client and the smart door lock. sex.

通过客户端发送的第一客户端标识与客户端令牌中包括的第二客户端标识 之间的匹配,对服务器与客户端之间的连接进行验证,即使服务器确定发送绑 定请求的客户端与实际需要绑定的客户端是否为同一客户端,提高了客户端与 智能门锁之间进行绑定时的安全性。The connection between the server and the client is verified by a match between the first client identifier sent by the client and the second client identifier included in the client token, even if the server determines the client that sent the binding request Whether the client that actually needs to be bound is the same client, improves the security when binding between the client and the smart door lock.

通过第一门锁密钥与第二门锁密钥的设置,使服务器可以在获取第二客户 端标识的过程中,同步确认智能门锁的身份,以完成智能门锁与服务器之间的 双向验证,进一步提高了客户端与智能门锁之间进行绑定时的安全性。Through the setting of the first door lock key and the second door lock key, the server can synchronously confirm the identity of the smart door lock in the process of obtaining the second client identification, so as to complete the two-way communication between the smart door lock and the server. The verification further improves the security of the binding between the client and the smart door lock.

在本申请的一个实施例中,与智能门锁建立有控制绑定关系的客户端具有 权限区分,高权限的客户端可以在其控制界面上对低权限的客户端进行控制。 图8示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的流程示 意图,以该方法应用于智能门锁的控制系统中为例进行说明,该方法包括:In an embodiment of the present application, the client that has established a control binding relationship with the smart door lock has authority distinction, and the client with high authority can control the client with low authority on its control interface. Fig. 8 shows the schematic flow chart of the control method of a kind of smart door lock provided by an exemplary embodiment of the present application, and is described by taking the method applied to the control system of the smart door lock as an example, and the method includes:

步骤801,智能门锁向服务器发送第一门锁密钥和门锁标识。Step 801, the smart door lock sends the first door lock key and the door lock identifier to the server.

在步骤801执行之前,客户端与智能门锁之间建立配网连接。Before step 801 is executed, a distribution network connection is established between the client and the smart door lock.

在智能门锁与客户端之间建立配网连接后,智能门锁将第一门锁密钥和门 锁标识通过客户端的透传发送至服务器中。After the distribution network connection is established between the smart door lock and the client, the smart door lock sends the first door lock key and the door lock ID to the server through the transparent transmission of the client.

步骤802,服务器接收第一门锁密钥和门锁标识。Step 802, the server receives the first door lock key and the door lock identifier.

该步骤与步骤702相同,在此不作赘述。且此时,服务器根据第一门锁密 钥以及门锁标识生成第二门锁密钥。This step is the same as step 702 and will not be repeated here. And at this time, the server generates the second door lock key according to the first door lock key and the door lock identifier.

在本实施例中,步骤801至步骤802执行于配网过程完成之后,服务器接 收到绑定请求之前。In this embodiment, steps 801 to 802 are performed after the network configuration process is completed and before the server receives the binding request.

步骤803,客户端向服务器发送绑定请求。Step 803, the client sends a binding request to the server.

绑定请求用于在客户单与智能门锁已建立配网连接的情况下,请求建立客 户端与该智能门锁之间的控制绑定关系。在本实施例中,单个绑定请求用于请 求一个客户端与一个智能门锁之间建立控制绑定关系。The binding request is used to request the establishment of a control binding relationship between the client and the smart door lock when the customer order and the smart door lock have established a distribution network connection. In this embodiment, a single binding request is used to request to establish a control binding relationship between a client and a smart door lock.

步骤804,服务器接收客户端发送的绑定请求。Step 804, the server receives the binding request sent by the client.

在本实施例中,服务器实现为云端服务器,且服务器中已保存有客户端与 智能门锁之间的配网设置。In this embodiment, the server is implemented as a cloud server, and the server has saved the network distribution settings between the client and the smart door lock.

步骤805,服务器确定智能门锁的当前状态。Step 805, the server determines the current state of the smart door lock.

智能门锁的当前状态包括未绑定状态与绑定状态。未绑定状态即为智能门 锁未与客户端建立有控制绑定关系的状态,可选地,此时,智能门锁与客户端 之间也未建立有配网连接;绑定状态即为智能门锁与客户单进行配网连接,和/ 或,与客户端建立有控制绑定关系的状态。服务器根据自身存储的关于智能门 锁的数据,判断智能门锁的当前状态:在智能门锁的当前状态为未绑定状态时, 服务器中仅存储有智能门锁的门锁标识以及第一门锁密钥;或,服务器中为存 储有任何关于智能门锁的数据。本实施例中,以智能门锁的当前状态为未绑定 状态时,服务器中存储有智能门锁的门锁标识以及第一门锁密钥为例进行说明。The current state of the smart door lock includes the unbound state and the bound state. The unbound state is the state in which the smart door lock has not established a control binding relationship with the client. Optionally, at this time, no distribution network connection has been established between the smart door lock and the client; the binding state is The smart door lock is connected to the customer list for distribution network, and/or, the state of a control binding relationship is established with the client. The server judges the current state of the smart door lock according to the data about the smart door lock stored by itself: when the current state of the smart door lock is an unbound state, the server only stores the door lock identifier of the smart door lock and the first door lock. lock key; or, any data about the smart door lock stored in the server. In this embodiment, when the current state of the smart door lock is an unbound state, the server stores the door lock identifier and the first door lock key of the smart door lock as an example for description.

在一个示例中,智能门锁上包括恢复出厂按键,该恢复出厂按键实现为一 个实体按键。通过对于该恢复出厂按键的操作,可以时智能门锁恢复未绑定状 态。此时,智能门锁向服务器发送恢复未绑定状态指令,服务器根据该指令将 服务器内存储的与该智能门锁的绑定关系相关的数据进行删除。在删除过后, 服务器中仅存有智能门锁的门锁标识以及第一门锁密钥。In one example, the smart door lock includes a factory reset button, and the factory reset button is implemented as a physical button. Through the operation of the reset button, the smart door lock can be restored to the unbound state. At this time, the smart door lock sends an instruction to restore the unbound state to the server, and the server deletes the data related to the binding relationship of the smart door lock stored in the server according to the instruction. After deletion, only the door lock ID of the smart door lock and the first door lock key are stored in the server.

在上述示例中,具体地,智能门锁通过客户端进行历史绑定信息的发送, 历史绑定信息用于指示在客户端与智能门锁进行绑定之前,与智能门锁进行绑 定的历史客户端的信息。在接收到历史绑定信息后,当客户端具有管理员权限 时,可以向服务器发送绑定解除指令,绑定解除指令用于指示服务器解除历史 客户端与智能门锁之间的控制绑定关系,服务器在接收到该绑定解除指令时, 即对对应的控制绑定关系进行解除,以此时智能门锁恢复未绑定状态。In the above example, specifically, the smart door lock sends historical binding information through the client, and the historical binding information is used to indicate the history of binding with the smart door lock before the client is bound with the smart door lock client information. After receiving the historical binding information, when the client has administrator authority, it can send a binding release instruction to the server, and the binding release instruction is used to instruct the server to release the control binding relationship between the historical client and the smart door lock. , when the server receives the binding release instruction, it releases the corresponding control binding relationship, so that the smart door lock is restored to the unbound state at this time.

步骤806,服务器响应于当前状态为未绑定状态,且接收到绑定请求,确定 客户端具有智能门锁的管理员权限。Step 806, the server determines that the client has the administrator authority of the smart door lock in response to the current state being the unbound state and receiving the binding request.

与智能门锁建立有控制绑定关系的客户端具有不同的权限,包括管理员权 限以及普通权限。在所有与智能门锁建立有控制绑定关系的客户端中,仅有一 个客户端具有管理员权限,其余客户端均为普通权限。具有管理员权限的客户 端可以对具有普通权限的客户端进行管理,包括保存具有普通权限的客户端所 对应的客户端标识。Clients that establish a control binding relationship with the smart door lock have different permissions, including administrator permissions and ordinary permissions. Among all the clients that have established a control binding relationship with the smart door lock, only one client has administrator rights, and the rest have ordinary rights. Clients with administrator privileges can manage clients with common privileges, including saving the client IDs corresponding to clients with common privileges.

请参考图9,具有管理员权限的控制界面900中,除了对于智能门锁进行控 制的开锁控件911、闭锁控件912以及解绑控件913之外,还包括对于普通权限 客户端显示区域914,在该显示区域中,可以显示与智能门锁建立有控制绑定关 系的普通权限客户端标识9141、普通权限客户端标识9142、普通权限客户端标 识9143以及普通权限客户端标识9144,通过对上述普通权限客户端标识的操作, 可以进一步对普通权限客户端进行控制。而在具有普通权限的控制界面中,仅 包括开锁控件、闭锁控件以及解绑控件。Referring to FIG. 9, in the control interface 900 with administrator authority, in addition to the unlocking control 911, the locking control 912 and the unbinding control 913 for controlling the smart door lock, it also includes a client display area 914 for ordinary authority, in In this display area, the common authority client identification 9141, the common authority client identification 9142, the common authority client identification 9143 and the common authority client identification 9144 that have a control binding relationship with the smart door lock can be displayed. The operation of the authorization client identification can further control the ordinary authorization client. In the control interface with ordinary permissions, only the unlocking control, the locking control and the unbinding control are included.

此外,在本申请实施例中,当服务器的当前状态为绑定状态,且接收到绑 定请求时,即确定客户端具有普通用户的管理权限;或,当服务器的当前状态 为绑定状态,且接收到绑定请求时,拒绝该客户端的绑定请求。In addition, in the embodiment of the present application, when the current state of the server is a bound state and a binding request is received, it is determined that the client has the management authority of an ordinary user; or, when the current state of the server is a bound state, And when a binding request is received, the client's binding request is rejected.

步骤807,服务器保存客户端所对应的第一客户端标识。Step 807, the server saves the first client identifier corresponding to the client.

在确定该客户端具有管理员权限后,服务器将该客户端对应的第一客户端 标识进行保存。当接收到后续发送的绑定请求时,服务器根据第一客户端标识 将绑定请求发送至该客户端,由该客户端进行是否通过绑定请求的判断。After determining that the client has administrator authority, the server saves the first client identifier corresponding to the client. When receiving a subsequently sent binding request, the server sends the binding request to the client according to the first client identifier, and the client determines whether the binding request is passed.

步骤808,服务器根据绑定请求生成客户端令牌。Step 808, the server generates a client token according to the binding request.

服务器在根据该绑定请求生成客户端令牌时,将获取的第一客户端标识存 储入客户端令牌中,作为第二客户端标识。When generating the client token according to the binding request, the server stores the acquired first client identifier in the client token as the second client identifier.

步骤809,服务器向客户端发送客户端令牌以及计时器。Step 809, the server sends the client token and the timer to the client.

计时器为服务器响应于发送客户端令牌而生成的,其用于限制客户端令牌 的有效时长。在实现服务器与智能门锁同步计时的过程中,服务器通过客户端 向智能门锁进行计时器的发送,以对客户端令牌的有效性进行验证。A timer is generated by the server in response to sending a client token and is used to limit how long the client token is valid. In the process of realizing the synchronous timing between the server and the smart door lock, the server sends the timer to the smart door lock through the client to verify the validity of the client token.

步骤810,客户端接收客户端令牌以及计时器。Step 810, the client receives the client token and the timer.

在一个示例中,计时器被打包于客户端令牌内,由服务器发送至客户端中。In one example, the timer is packaged in the client token and sent by the server to the client.

步骤811,客户端向智能门锁发送客户端令牌以及计时器。Step 811, the client sends the client token and the timer to the smart door lock.

在本实施例中,客户端与智能门锁已进行配网连接,故客户端可以直接通 过与智能门锁之间的第二通信连接向智能门锁发送客户端令牌。In this embodiment, the client and the smart door lock have already been connected to the network distribution network, so the client can directly send the client token to the smart door lock through the second communication connection with the smart door lock.

步骤812,智能门锁接收客户端令牌以及计时器。Step 812, the smart door lock receives the client token and the timer.

在智能门锁接收计时器之后,智能门锁即通过计时器进行与服务器的同步 即时,以验证客户端令牌是否过期。After the smart door lock receives the timer, the smart door lock synchronizes with the server through the timer instantly to verify whether the client token has expired.

步骤813,智能门锁通过第一门锁密钥对客户端令牌进行加密,得到门锁令 牌。Step 813, the smart door lock encrypts the client token with the first door lock key to obtain a door lock token.

当计时器被打包于客户端令牌内时,智能门锁首先需要从客户端令牌中获 取计时器,再将客户端令牌中的其他部分进行加密,得到门锁令牌。When the timer is packaged in the client token, the smart door lock first needs to obtain the timer from the client token, and then encrypt other parts of the client token to obtain the door lock token.

步骤814,智能门锁将门锁令牌发送至客户端。Step 814, the smart door lock sends the door lock token to the client.

该过程即为智能门锁通过客户端向服务器进行门锁令牌的转发的过程。This process is the process in which the smart door lock forwards the door lock token to the server through the client.

步骤815,客户端接收门锁令牌。Step 815, the client receives the door lock token.

客户端在接收到门锁令牌后,还会额外获取自身对应的第一客户端标识。After the client receives the door lock token, it will additionally obtain the first client identifier corresponding to itself.

步骤816,客户端将第一客户端标识和门锁令牌发送至服务器。Step 816, the client sends the first client identifier and the door lock token to the server.

步骤817,服务器接收第一客户端标识和门锁令牌。Step 817, the server receives the first client identifier and the door lock token.

在一个示例中,当服务器确认第一客户端标识指示该客户端具有管理员权 限时,可以跳过验证步骤。In one example, the verification step may be skipped when the server confirms that the first client identification indicates that the client has administrator rights.

步骤818,服务器通过第二门锁密钥对门锁令牌进行解密,得到第二客户端 标识。Step 818, the server decrypts the door lock token through the second door lock key to obtain the second client identification.

第二门锁密钥与第一门锁密钥对应,均可以对门锁令牌进行解密。The second door lock key corresponds to the first door lock key, and both can decrypt the door lock token.

步骤819,服务器将第一客户端标识与第二客户端标识进行比对。Step 819, the server compares the first client identifier with the second client identifier.

如步骤707中所示,服务器确定第一客户端标识与第二客户单标识完全一 致,即每个字符均相同。As shown in step 707, the server determines that the first client identification and the second client identification are identical, i.e., each character is the same.

步骤820,服务器响应于第一客户端标识与第二客户端标识相同,确定匹配 验证通过。Step 820, the server determines that the matching verification is passed in response to the first client identification being the same as the second client identification.

在服务器与智能门锁中存储有计时器时,需要在计时器所限定的时间内确 定第一客户端标识与第二客户端标识相同,方确定匹配验证通过。When a timer is stored in the server and the smart door lock, it is necessary to determine that the first client identification and the second client identification are the same within the time limited by the timer, so as to determine that the matching verification is passed.

步骤821,服务器确定客户端与智能门锁之间的所述控制绑定关系。Step 821, the server determines the control binding relationship between the client and the smart door lock.

在客户端与智能门锁之间建立控制绑定关系后,可选地,客户端的控制界 面上显示控制绑定关系建立成功,智能门锁通过提示音的方式提示控制绑定关 系建立成功。After the control binding relationship is established between the client and the smart door lock, optionally, the control interface of the client displays that the control binding relationship is established successfully, and the smart door lock prompts the control binding relationship to be established successfully by means of a prompt sound.

综上所述,本实施例提供的方法,于客户端,通过接收到指示客户端与智 能门锁之间进行匹配验证的客户端令牌,并将该令牌通过转发至智能门锁的方 式得到门锁令牌,进而根据服务器的匹配结果确定客户端与智能门锁之间的控 制绑定关系,实现了在以客户端令牌作为凭证的基础上,客户端、服务器与智 能门锁对于绑定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进 行绑定时的安全性。To sum up, in the method provided in this embodiment, the client receives a client token that indicates matching verification between the client and the smart door lock, and forwards the token to the smart door lock. The door lock token is obtained, and then the control binding relationship between the client and the smart door lock is determined according to the matching result of the server, which realizes that on the basis of the client token as the credential, the client, the server and the smart door lock can The knowledge and verification of the binding process information improves the security of the binding between the client and the smart door lock.

于智能门锁,通过在自身接收到客户端令牌,并知悉与客户端建立控制绑 定关系的条件后,由客户端转发门锁令牌至服务器,使服务器以门锁令牌为凭 证,确认客户端与智能门锁之间已完成验证,进而实现客户端、服务器与智能 门锁对于绑定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进行 绑定时的安全性。For smart door locks, after receiving the client token and knowing the conditions for establishing a control and binding relationship with the client, the client forwards the door lock token to the server, so that the server uses the door lock token as the certificate, Confirm that the verification between the client and the smart door lock has been completed, so as to realize the knowledge and verification of the binding process information between the client, the server and the smart door lock, and improve the security of the binding between the client and the smart door lock. sex.

通过客户端与智能门锁在验证环节之前首先进行配网验证,建立配网连接 的方法,使连接过程中的数据无需以广播的形式进行发送,提高了连接过程的 保密性以及安全性。Before the verification process between the client and the smart door lock, the distribution network is verified first, and the distribution network connection is established, so that the data in the connection process does not need to be sent in the form of broadcast, which improves the confidentiality and security of the connection process.

通过进行管理员权限和普通权限的设置,使具有管理员权限的客户端可以 主动对其他客户端进行管理,且验证方式便捷,操作方法简单,进一步提高了 连接效率。By setting the administrator authority and common authority, the client with administrator authority can actively manage other clients, and the authentication method is convenient and the operation method is simple, which further improves the connection efficiency.

通过计时器的设置,使验证过程具有时效性,进一步提高了连接过程的保 密性以及安全性。By setting the timer, the verification process is time-sensitive, which further improves the confidentiality and security of the connection process.

通过智能门锁对于历史绑定信息的发送,使具有管理员权限的客户端接收 智能门锁的信息,进而由客户端确定是否保留历史绑定信息,防止智能门锁内 的信息冗余。Through the sending of historical binding information by the smart door lock, the client with administrator authority can receive the information of the smart door lock, and then the client can determine whether to retain the historical binding information to prevent information redundancy in the smart door lock.

图10示出了本申请一个示例性实施例提供的一种智能门锁的控制方法的过 程示意图,以该方法应用于智能门锁的控制系统中为例进行说明,该过程包括:Fig. 10 shows the process schematic diagram of the control method of a kind of smart door lock provided by an exemplary embodiment of the present application, and the method is applied to the control system of the smart door lock as an example to illustrate, the process includes:

步骤1001,用户按下智能门锁上的配网键。Step 1001, the user presses the network distribution key on the smart door lock.

在本实施例中,配网按键为智能门锁上的实体按键。In this embodiment, the network distribution button is a physical button on the smart door lock.

步骤1002,智能门锁进行广播。Step 1002, the smart door lock broadcasts.

可选地,该广播包括智能门锁是否正在配网以及智能门锁已重置标志位, 也即,智能门锁处于出厂状态,智能门锁可以进行配网。Optionally, the broadcast includes whether the smart door lock is being distributed to the network and the flag bit of the smart door lock has been reset, that is, the smart door lock is in a factory state, and the smart door lock can be configured to the network.

步骤1003,客户端向智能门锁发送获取设备名称请求。Step 1003, the client sends a request for obtaining the device name to the smart door lock.

该过程即为客户端在进行配网连接之前,向智能门锁发起的获取该智能门 锁的信息的请求。This process is that the client sends a request to the smart door lock to obtain the information of the smart door lock before connecting to the distribution network.

步骤1004,智能门锁向客户端发送门锁标识以及第一门锁密钥。Step 1004, the smart door lock sends the door lock identifier and the first door lock key to the client.

通过发送门锁标识以及第一门锁密钥的方式,智能门锁与客户端之间确认 身份,客户端确认智能门锁的身份。By sending the door lock ID and the first door lock key, the identity of the smart door lock and the client is confirmed, and the client confirms the identity of the smart door lock.

步骤1005,客户端向服务器发送第一客户端标识、智能门锁的当前状态、 门锁标识以及第一门锁密钥。Step 1005, the client sends the first client identifier, the current state of the smart door lock, the door lock identifier and the first door lock key to the server.

其中,门锁标识以及第一门锁密钥为智能门锁发送至服务器,由客户端进 行转发的数据。Among them, the door lock identification and the first door lock key are the data sent by the smart door lock to the server and forwarded by the client.

步骤1006,服务器生成第二门锁密钥、计数器以及客户端令牌。Step 1006, the server generates a second door lock key, a counter and a client token.

其中,客户端令牌中包括第二客户端标识、随机数据以及计数器。随机数 据为客户端令牌中的主体内容,用于进行后续的验证。The client token includes a second client identifier, random data and a counter. The random data is the main content in the client token, which is used for subsequent verification.

步骤1007,服务器向客户端发送计时器和客户端令牌。Step 1007, the server sends the timer and the client token to the client.

可选地,在发送计时器和客户端令牌时,服务器还一并进行临时数据的发 送。Optionally, when sending the timer and the client token, the server also sends temporary data together.

步骤1008,客户端向智能门锁发送第一客户端标识和客户端令牌。Step 1008, the client sends the first client identifier and the client token to the smart door lock.

该过程即为客户端向服务器进行客户端令牌的转发的过程。This process is the process of forwarding the client token from the client to the server.

步骤1009,智能门锁向客户端发送门锁令牌和加密后的客户端标识。Step 1009, the smart door lock sends the door lock token and the encrypted client identifier to the client.

在该过程中,智能门锁通过第一门锁密钥,对第一门锁令牌以及客户端标 识进行加密后,发送至客户端。In this process, the smart door lock encrypts the first door lock token and the client ID through the first door lock key, and sends it to the client.

步骤1010,客户端向服务器进行门锁令牌和第一客户端标识的转发。Step 1010, the client forwards the door lock token and the first client identifier to the server.

客户端作为中继,向服务器进行门锁令牌和第一客户端标识的透传。The client acts as a relay to transparently transmit the door lock token and the first client identifier to the server.

步骤1011,服务器用门锁标识对应的第一门锁密钥解密门锁令牌得到客户 端令牌,再用门锁标识对应的第二门锁密钥解密客户端令牌得到第二客户端标 识。Step 1011, the server decrypts the door lock token with the first door lock key corresponding to the door lock identification to obtain the client token, and then decrypts the client token with the second door lock key corresponding to the door lock identification to obtain the second client logo.

在本实施例中,服务器需通过第一客户端标识与第二客户端标识之间的比 对,进行客户端与智能门锁之间的认证。In this embodiment, the server needs to perform authentication between the client and the smart door lock through the comparison between the first client identification and the second client identification.

步骤1012,计时器开始计时。Step 1012, the timer starts counting.

可选地,在本实施例中,计时器用于对客户端与智能门锁之间的控制绑定 关系进行计时。Optionally, in this embodiment, the timer is used to time the control binding relationship between the client and the smart door lock.

步骤1013,智能门锁向客户端进行绑定成功通知。Step 1013, the smart door lock notifies the client that the binding is successful.

该过程即为客户端与智能门锁之间确认建立控制绑定关系的过程。This process is the process of confirming the establishment of a control binding relationship between the client and the smart door lock.

在建立控制绑定关系的情况下,客户端将会读取智能门锁的固件版本号, 并上传至服务器,以便后续的硬件固件更新升级。In the case of establishing a control binding relationship, the client will read the firmware version number of the smart door lock and upload it to the server for subsequent hardware firmware updates.

图11示出了本申请一个示意性实施例提供的一种智能门锁的控制装置的结 构框图。该装置包括:Fig. 11 shows a structural block diagram of a control device for a smart door lock provided by an exemplary embodiment of the present application. The device includes:

发送模块1101,用于向服务器发送绑定请求,绑定请求用于请求建立客户 端与智能门锁之间的控制绑定关系;The sending module 1101 is used to send a binding request to the server, and the binding request is used to request to establish a control binding relationship between the client and the smart door lock;

接收模块1102,用于接收服务器发送的客户端令牌;a receiving module 1102, configured to receive the client token sent by the server;

发送模块1101,还用于向智能门锁发送客户端令牌,智能门锁用于加密客 户端令牌,并通过服务器进行客户端和智能门锁的匹配验证;The sending module 1101 is also used to send the client token to the smart door lock, the smart door lock is used to encrypt the client token, and the matching verification between the client and the smart door lock is performed by the server;

建立模块1103,用于响应于匹配验证通过,建立与智能门锁之间的控制绑 定关系。The establishment module 1103 is configured to establish a control binding relationship with the smart door lock in response to the matching verification passing.

综上所述,本实施例提供的装置,通过接收到指示客户端与智能门锁之间 进行匹配验证的客户端令牌,并将该令牌通过转发至智能门锁的方式得到门锁 令牌,进而根据服务器的匹配结果确定客户端与智能门锁之间的控制绑定关系, 实现了在以客户端令牌作为凭证的基础上,客户端、服务器与智能门锁对于绑 定过程信息的知悉与验证确认,提高了客户端与智能门锁之间进行绑定时的安 全性。To sum up, the device provided in this embodiment obtains the door lock order by receiving the client token indicating matching verification between the client and the smart door lock, and forwarding the token to the smart door lock Then, according to the matching result of the server, the control binding relationship between the client and the smart door lock is determined, which realizes that on the basis of using the client token as the certificate, the client, the server and the smart door lock are used for the binding process information. The knowledge and verification of the smart door lock improve the security of the binding between the client and the smart door lock.

图12示出了本申请一个示例性实施例提供的另一种智能门锁的控制装置的 结构框图,该装置包括:Fig. 12 shows the structural block diagram of the control device of another smart door lock provided by an exemplary embodiment of the present application, and the device includes:

接收模块1201,用于接收客户端发送的客户端令牌;a receiving module 1201, configured to receive the client token sent by the client;

加密模块1202,用于对客户端令牌进行加密,得到门锁令牌;An encryption module 1202, configured to encrypt the client token to obtain a door lock token;

发送模块1203,用于向服务器发送门锁令牌,服务器用于通过门锁令牌进 行客户端和智能门锁的匹配验证;The sending module 1203 is used to send the door lock token to the server, and the server is used to perform matching verification between the client and the smart door lock through the door lock token;

建立模块1204,用于响应于匹配验证通过,建立与客户端之间的控制绑定 关系。The establishment module 1204 is configured to establish a control binding relationship with the client in response to passing the matching verification.

综上所述,本实施例提供的装置,通过在自身接收到客户端令牌,并知悉 与客户端建立控制绑定关系的条件后,由客户端转发门锁令牌至服务器,使服 务器以门锁令牌为凭证,确认客户端与智能门锁之间已完成验证,进而实现客 户端、服务器与智能门锁对于绑定过程信息的知悉与验证确认,提高了客户端 与智能门锁之间进行绑定时的安全性。To sum up, in the device provided in this embodiment, after receiving the client token and knowing the conditions for establishing a control binding relationship with the client, the client forwards the door lock token to the server, so that the server can use The door lock token is a certificate to confirm that the verification between the client and the smart door lock has been completed, so as to realize the knowledge and verification of the binding process information between the client, the server and the smart door lock, and improve the relationship between the client and the smart door lock. security when binding between.

需要说明的是:上述实施例提供的智能门锁的控制装置仅以上述各功能模 块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同 的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描 述的全部或者部分内容。It should be noted that: the control device of the smart door lock provided by the above embodiment is only illustrated by the division of the above functional modules. The internal structure is divided into different functional modules to complete all or part of the content described above.

图13示出了本申请一个示例性实施例提供一种执行智能门锁的控制方法的 终端的结构示意图,该终端包括:13 shows a schematic structural diagram of a terminal for implementing a control method for a smart door lock provided by an exemplary embodiment of the present application, and the terminal includes:

处理器1301包括一个或者一个以上处理核心,处理器1301通过运行软件 程序以及模块,从而执行各种功能应用以及数据处理。The processor 1301 includes one or more processing cores, and the processor 1301 executes various functional applications and data processing by running software programs and modules.

接收器1302和发射器1303可以实现为一个通信组件,该通信组件可以是 一块通信芯片。可选地,该通信组件可以实现智能门锁的控制系统中的任意两 个计算机设备之间的通信连接。也即,发射器1303可以用于发射通信网络信号, 接收器1302可以用于接收通信网络信号。The receiver 1302 and the transmitter 1303 may be implemented as a communication component, which may be a communication chip. Optionally, the communication component can realize the communication connection between any two computer devices in the control system of the smart door lock. That is, the transmitter 1303 may be used to transmit communication network signals, and the receiver 1302 may be used to receive communication network signals.

存储器1304通过总线1305与处理器1301相连。The memory 1304 is connected to the processor 1301 through the bus 1305 .

存储器1304可用于存储至少一个指令,处理器1301用于执行该至少一个 指令,以实现上述方法实施例中的各个步骤。The memory 1304 can be used to store at least one instruction, and the processor 1301 is used to execute the at least one instruction to implement the various steps in the above method embodiments.

本申请还提供了一种服务器,该服务器包括处理器和存储器,存储器中存 储有至少一条指令,至少一条指令由处理器加载并执行以实现上述各个方法实 施例提供的智能门锁的控制方法。需要说明的是,该服务器可以是如下图14所 提供的服务器。The present application also provides a server, the server includes a processor and a memory, the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the control methods for smart door locks provided by the above method embodiments. It should be noted that the server may be the server provided in Figure 14 below.

请参考图14,其示出了本申请一个示例性实施例提供的服务器的结构示意 图。具体来讲:服务器1400包括中央处理单元(Central Processing Unit,CPU) 1401、包括随机存取存储器(Random Access Memory,RAM)1402和只读存储 器(Read-Only Memory,ROM)1403的系统存储器1404,以及连接系统存储器 1404和中央处理单元1401的系统总线1405。服务器1400还包括帮助计算机内 的各个器件之间传输信息的基本输入/输出(InputOutput System,I/O)系统1406, 和用于存储操作系统1413、应用程序1414和其他程序模块1415的大容量存储 设备1407。Please refer to FIG. 14, which shows a schematic structural diagram of a server provided by an exemplary embodiment of the present application. Specifically: the server 1400 includes a central processing unit (Central Processing Unit, CPU) 1401, a system memory 1404 including a random access memory (Random Access Memory, RAM) 1402 and a read-only memory (Read-Only Memory, ROM) 1403, And a system bus 1405 connecting the system memory 1404 and the central processing unit 1401 . Server 1400 also includes a basic input/output (I/O) system 1406 that facilitates the transfer of information between various devices within the computer, and mass storage for storing operating system 1413, application programs 1414, and other program modules 1415 Device 1407.

基本输入/输出系统1406包括有用于显示信息的显示器1408和用于用户输 入信息的诸如鼠标、键盘之类的输入设备1409。其中显示器1408和输入设备 1409都通过连接到系统总线1405的输入输出控制器1410连接到中央处理单元 1401。基本输入/输出系统1406还可以包括输入输出控制器1410以用于接收和 处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输 出控制器1410还提供输出到显示屏、打印机或其他类型的输出设备。Basic input/output system 1406 includes a display 1408 for displaying information and input devices 1409 such as a mouse, keyboard, etc., for user input of information. Wherein the display 1408 and the input device 1409 are connected to the central processing unit 1401 through the input and output controller 1410 connected to the system bus 1405. The basic input/output system 1406 may also include an input output controller 1410 for receiving and processing input from a number of other devices such as a keyboard, mouse, or electronic stylus. Similarly, input output controller 1410 also provides output to a display screen, printer, or other type of output device.

大容量存储设备1407通过连接到系统总线1405的大容量存储控制器(未 示出)连接到中央处理单元1401。大容量存储设备1407及其相关联的计算机可 读介质为服务器1400提供非易失性存储。也就是说,大容量存储设备1407可 以包括诸如硬盘或者CD-ROM驱动器之类的计算机可读介质(未示出)。Mass storage device 1407 is connected to central processing unit 1401 through a mass storage controller (not shown) connected to system bus 1405. Mass storage device 1407 and its associated computer-readable media provide non-volatile storage for server 1400. That is, mass storage device 1407 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.

不失一般性,计算机可读介质可以包括计算机存储介质和通信介质。计算 机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他 数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介 质。计算机存储介质包括RAM、ROM、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、带电可擦可编程只读存储器 (Electrically Erasable Programmable Read-Only Memory,EEPROM)、闪存或其 他固态存储其技术,CD-ROM、数字多功能光盘(Digital Video Disc,DVD)或 其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域 技术人员可知计算机存储介质不局限于上述几种。上述的系统存储器1404和大 容量存储设备1407可以统称为存储器。Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid state Storage technology, CD-ROM, Digital Video Disc (DVD) or other optical storage, cassette, magnetic tape, disk storage or other magnetic storage device. Of course, those skilled in the art know that the computer storage medium is not limited to the above-mentioned ones. The system memory 1404 and mass storage device 1407 described above may be collectively referred to as memory.

存储器存储有一个或多个程序,一个或多个程序被配置成由一个或多个中 央处理单元1401执行,一个或多个程序包含用于实现上述智能门锁的控制方法 的指令,中央处理单元1401执行该一个或多个程序实现上述各个方法实施例提 供的智能门锁的控制方法。The memory stores one or more programs, the one or more programs are configured to be executed by one or more central processing units 1401, and the one or more programs contain instructions for implementing the above-mentioned control method of the smart door lock, the central processing unit 1401 Execute the one or more programs to implement the control methods for the smart door locks provided by the foregoing method embodiments.

根据本申请的各种实施例,服务器1400还可以通过诸如因特网等网络连接 到网络上的远程计算机运行。也即服务器1400可以通过连接在系统总线1405 上的网络接口单元1411连接到网络1412,或者说,也可以使用网络接口单元 1411来连接到其他类型的网络或远程计算机系统(未示出)。可选地,本申请 实施例中,服务器1400可以通过网络接口单元1411连接到通信网络,可选地, 服务器1400还可以通过无线网络与其他设备建立连接。According to various embodiments of the present application, the server 1400 may also operate by connecting to a remote computer on the network through a network such as the Internet. That is, the server 1400 may be connected to the network 1412 through the network interface unit 1411 connected to the system bus 1405, or may also use the network interface unit 1411 to connect to other types of networks or remote computer systems (not shown). Optionally, in this embodiment of the present application, the server 1400 may be connected to a communication network through the network interface unit 1411, and optionally, the server 1400 may also establish a connection with other devices through a wireless network.

存储器还包括一个或者一个以上的程序,一个或者一个以上程序存储于存 储器中,一个或者一个以上程序包含用于进行本申请实施例提供的智能门锁的 控制方法中由服务器所执行的步骤。The memory also includes one or more programs, the one or more programs are stored in the memory, and the one or more programs include steps performed by the server in the control method for the smart door lock provided by the embodiment of the present application.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤 是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存 储介质中,该计算机可读存储介质可以是上述实施例中的存储器中所包含的计 算机可读存储介质;也可以是单独存在,未装配入终端中的计算机可读存储介 质。该计算机可读存储介质中存储有至少一条指令、至少一段程序、代码集或 指令集,至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行 以实现上述智能门锁的控制方法。Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the computer-readable storage medium can be stored in a computer-readable storage medium. The medium may be a computer-readable storage medium included in the memory in the above-mentioned embodiments; it may also be a computer-readable storage medium that exists independently and is not assembled into the terminal. The computer-readable storage medium stores at least one instruction, at least one segment of program, code set or instruction set, and at least one instruction, at least one segment of program, code set or instruction set is loaded and executed by the processor to realize the control of the above-mentioned smart door lock method.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过 硬件来完成,也可以通过程序来指令相关的硬件完成,的程序可以存储于一种 计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘 等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium can be read-only memory, magnetic disk or optical disk, etc.

以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的 精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的 保护范围之内。The above descriptions are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.

Claims (14)

1.一种智能门锁的控制系统,其特征在于,所述系统中包括客户端、智能门锁和服务器;1. a control system for an intelligent door lock, characterized in that the system comprises a client, an intelligent door lock and a server; 所述客户端,用于向服务器发送绑定请求,所述绑定请求用于请求建立所述客户端与所述智能门锁之间的控制绑定关系;The client is used to send a binding request to the server, where the binding request is used to request to establish a control binding relationship between the client and the smart door lock; 所述服务器,用于接收所述客户端发送的所述绑定请求,根据所述绑定请求生成客户端令牌;向所述客户端发送所述客户端令牌;the server, configured to receive the binding request sent by the client, generate a client token according to the binding request; send the client token to the client; 所述客户端,还用于接收所述客户端令牌;向所述智能门锁发送所述客户端令牌;The client is further configured to receive the client token; send the client token to the smart door lock; 所述智能门锁,用于接收所述客户端令牌;对所述客户端令牌进行加密,得到门锁令牌;向所述服务器发送所述门锁令牌;The smart door lock is used for receiving the client token; encrypting the client token to obtain a door lock token; sending the door lock token to the server; 所述服务器,还用于接收所述客户端发送的所述门锁令牌;通过所述门锁令牌进行所述客户端和所述智能门锁的匹配验证,所述匹配验证用于指示所述智能门锁和所述客户端之间是否建立所述控制绑定关系,所述控制绑定关系用于指示所述门锁令牌中的客户端标识与自身预存的客户端标识对应,以及所述门锁令牌中的门锁标识与自身预存的门锁标识对应;响应于所述匹配验证通过,确定所述客户端与所述智能门锁之间的所述控制绑定关系。The server is further configured to receive the door lock token sent by the client; perform matching verification between the client and the smart door lock through the door lock token, and the matching verification is used to indicate Whether the control binding relationship is established between the smart door lock and the client, the control binding relationship is used to indicate that the client identifier in the door lock token corresponds to the client identifier pre-stored by itself, And the door lock identifier in the door lock token corresponds to the door lock identifier pre-stored by itself; in response to the matching verification passing, the control binding relationship between the client and the smart door lock is determined. 2.根据权利要求1所述的系统,其特征在于,所述客户端对应有第一客户端标识,所述第一客户端标识用于唯一指示所述客户端,所述绑定请求中包括所述第一客户端标识;2. The system according to claim 1, wherein the client corresponds to a first client identifier, the first client identifier is used to uniquely indicate the client, and the binding request includes the first client identifier; 所述智能门锁,还用于将所述门锁令牌发送至所述客户端;The smart door lock is also used to send the door lock token to the client; 所述客户端,还用于接收所述门锁令牌;将所述第一客户端标识和所述门锁令牌发送至所述服务器;the client is further configured to receive the door lock token; send the first client identifier and the door lock token to the server; 所述服务器,还用于接收所述第一客户端标识和所述门锁令牌;从所述门锁令牌中获取第二客户端标识,所述第二客户端标识为所述智能门锁接收到的所述客户端令牌中所包含的客户端标识;将所述第一客户端标识与所述第二客户端标识进行比对;响应于所述第一客户端标识与所述第二客户端标识匹配,确定所述匹配验证通过。The server is further configured to receive the first client identifier and the door lock token; obtain a second client identifier from the door lock token, and the second client identifier is the smart door lock the client identification contained in the received client token; compare the first client identification with the second client identification; in response to the first client identification and the The second client identifier matches, and it is determined that the matching verification is passed. 3.根据权利要求2所述的系统,其特征在于,所述智能门锁对应有第一门锁密钥以及第二门锁密钥,所述第一门锁密钥为所述智能门锁的原生密钥,所述第二门锁密钥为所述服务器为所述智能门锁生成的临时密钥;3. The system according to claim 2, wherein the smart door lock corresponds to a first door lock key and a second door lock key, and the first door lock key is the smart door lock , the second door lock key is a temporary key generated by the server for the smart door lock; 所述智能门锁,还用于向所述服务器发送所述第一门锁密钥和门锁标识,所述门锁标识用于唯一指示所述智能门锁;通过所述第一门锁密钥对所述门锁令牌进行加密;The smart door lock is also used to send the first door lock key and the door lock identifier to the server, and the door lock identifier is used to uniquely indicate the smart door lock; the key to encrypt the door lock token; 所述服务器,还用于接收所述第一门锁密钥和所述门锁标识;根据所述门锁标识确定所述第二门锁密钥;通过第二所述门锁密钥对所述门锁令牌进行解密,得到所述第二客户端标识。The server is further configured to receive the first door lock key and the door lock identification; determine the second door lock key according to the door lock identification; The door lock token is decrypted to obtain the second client identifier. 4.根据权利要求1至3任一所述的系统,其特征在于,4. The system according to any one of claims 1 to 3, characterized in that: 所述服务器,还用于响应于接收到所述客户端发送的所述绑定请求,确定所述智能门锁的当前状态;响应于所述当前状态为未绑定状态,生成所述客户端令牌,所述未绑定状态为所述智能门锁未与客户端建立有所述控制绑定关系的状态。The server is further configured to, in response to receiving the binding request sent by the client, determine the current state of the smart door lock; and generate the client in response to the current state being an unbound state token, and the unbound state is a state in which the smart door lock has not established the control binding relationship with the client. 5.根据所述权利要求4所述的系统,其特征在于,5. The system of claim 4, wherein: 所述服务器,还用于响应于所述当前状态为未绑定状态,且接收到所述绑定请求,确定所述客户端具有所述智能门锁的管理员权限,所述管理员权限为对具有普通权限的客户端进行管理的权限,所述管理员权限的优先级高于所述普通权限。The server is further configured to, in response to the current state being an unbound state and receiving the binding request, determine that the client has an administrator authority for the smart door lock, where the administrator authority is: For the authority to manage clients with ordinary authority, the priority of the administrator authority is higher than that of the ordinary authority. 6.根据权利要求5所述的系统,其特征在于,6. The system of claim 5, wherein: 所述客户端,还用于响应于具有所述智能门锁的所述管理员权限,保存具有所述普通权限的客户端所对应的客户端标识。The client is further configured to, in response to the administrator authority having the smart door lock, save the client identifier corresponding to the client having the common authority. 7.根据权利要求1至3任一所述的系统,其特征在于,7. The system according to any one of claims 1 to 3, characterized in that: 所述服务器,还用于响应于发送所述客户端令牌,生成计时器,所述计时器用于限制所述客户端令牌的有效时长;将所述计时器发送至所述智能门锁;The server is further configured to, in response to sending the client token, generate a timer, where the timer is used to limit the valid duration of the client token; send the timer to the smart door lock; 所述智能门锁,还用于接收所述计时器;通过所述计时器对所述客户端令牌的有效性进行验证。The smart door lock is further configured to receive the timer; and verify the validity of the client token through the timer. 8.根据权利要求1至3任一所述的系统,其特征在于,8. The system according to any one of claims 1 to 3, characterized in that: 所述智能门锁,还用于向所述客户端发送历史绑定信息,所述历史绑定信息用于指示在所述客户端与所述智能门锁进行绑定之前,与所述智能门锁进行绑定的历史客户端的信息;The smart door lock is also used to send historical binding information to the client, where the historical binding information is used to indicate that before the client is bound with the smart door The information of the historical client to which the lock is bound; 所述客户端,还用于接收所述历史绑定信息;根据所述历史绑定信息向所述服务器发送绑定解除指令,所述绑定解除指令用于指示所述服务器解除所述历史客户端与所述智能门锁之间的控制绑定关系;The client is further configured to receive the historical binding information; send a binding unbinding instruction to the server according to the historical binding information, where the binding unbinding instruction is used to instruct the server to unblock the historical client The control binding relationship between the terminal and the smart door lock; 所述服务器,还用于接收所述绑定解除指令,根据所述绑定解除指令解除所述历史客户端与所述智能门锁之间的控制绑定关系。The server is further configured to receive the binding release instruction, and release the control binding relationship between the historical client and the smart door lock according to the binding release instruction. 9.一种智能门锁的控制方法,其特征在于,所述方法应用于客户端中,所述方法包括:9. A control method for an intelligent door lock, wherein the method is applied in a client, and the method comprises: 向服务器发送绑定请求,所述绑定请求用于请求建立所述客户端与智能门锁之间的控制绑定关系;Send a binding request to the server, where the binding request is used to request to establish a control binding relationship between the client and the smart door lock; 接收所述服务器发送的客户端令牌,所述客户端令牌为所述服务器根据所述绑定请求生成的;receiving a client token sent by the server, where the client token is generated by the server according to the binding request; 向所述智能门锁发送所述客户端令牌,所述智能门锁用于加密所述客户端令牌,并通过服务器进行所述客户端和所述智能门锁的匹配验证,所述匹配验证用于指示所述智能门锁和所述客户端之间是否建立控制绑定关系,所述控制绑定关系用于指示所述门锁令牌中的客户端标识与自身预存的客户端标识对应,以及所述门锁令牌中的门锁标识与自身预存的门锁标识对应;Send the client token to the smart door lock, the smart door lock is used to encrypt the client token, and the server performs matching verification between the client and the smart door lock, and the matching Verification is used to indicate whether a control binding relationship is established between the smart door lock and the client, and the control binding relationship is used to indicate the client identification in the door lock token and the client identification pre-stored by itself corresponding, and the door lock identification in the door lock token corresponds to its own pre-stored door lock identification; 响应于匹配验证通过,建立与所述智能门锁之间的控制绑定关系。In response to passing the matching verification, a control binding relationship with the smart door lock is established. 10.一种智能门锁的控制方法,其特征在于,所述方法应用于智能门锁中,所述方法包括:10. A control method for an intelligent door lock, wherein the method is applied in the intelligent door lock, and the method comprises: 接收客户端发送的客户端令牌,所述客户端令牌为服务器根据所述客户端发送的绑定请求生成的;receiving a client token sent by the client, where the client token is generated by the server according to the binding request sent by the client; 对所述客户端令牌进行加密,得到门锁令牌;Encrypting the client token to obtain a door lock token; 通过所述客户端向所述服务器发送所述门锁令牌,所述服务器用于通过所述门锁令牌进行所述客户端和所述智能门锁的匹配验证,所述匹配验证用于指示所述智能门锁和所述客户端之间是否建立所述控制绑定关系,所述控制绑定关系用于指示所述门锁令牌中的客户端标识与自身预存的客户端标识对应,以及所述门锁令牌中的门锁标识与自身预存的门锁标识对应;Send the door lock token to the server through the client, and the server is configured to perform matching verification between the client and the smart door lock through the door lock token, and the matching verification is used for Indicates whether the control binding relationship is established between the smart door lock and the client, and the control binding relationship is used to indicate that the client identifier in the door lock token corresponds to the client identifier pre-stored by itself , and the door lock identification in the door lock token corresponds to its own pre-stored door lock identification; 响应于匹配验证通过,建立与所述客户端之间的控制绑定关系。In response to passing the matching verification, a control binding relationship with the client is established. 11.一种智能门锁的控制装置,其特征在于,所述装置包括:11. A control device for an intelligent door lock, wherein the device comprises: 发送模块,用于向服务器发送绑定请求,所述绑定请求用于请求建立客户端与智能门锁之间的控制绑定关系;a sending module, configured to send a binding request to the server, where the binding request is used to request to establish a control binding relationship between the client and the smart door lock; 接收模块,用于接收所述服务器发送的客户端令牌,所述客户端令牌为所述服务器根据所述绑定请求生成的;a receiving module, configured to receive a client token sent by the server, where the client token is generated by the server according to the binding request; 发送模块,还用于向所述智能门锁发送所述客户端令牌,所述智能门锁用于加密所述客户端令牌,并通过服务器进行所述客户端和所述智能门锁的匹配验证,所述匹配验证用于指示所述智能门锁和所述客户端之间是否建立所述控制绑定关系,所述控制绑定关系用于指示所述门锁令牌中的客户端标识与自身预存的客户端标识对应,以及所述门锁令牌中的门锁标识与自身预存的门锁标识对应;The sending module is further configured to send the client token to the smart door lock, and the smart door lock is used to encrypt the client token, and perform the communication between the client and the smart door lock through the server. Matching verification, the matching verification is used to indicate whether the control binding relationship is established between the smart door lock and the client, and the control binding relationship is used to indicate the client in the door lock token. The identifier corresponds to the client identifier pre-stored by itself, and the door lock identifier in the door lock token corresponds to the door lock identifier pre-stored by itself; 建立模块,用于响应于匹配验证通过,建立与所述智能门锁之间的控制绑定关系。The establishment module is used for establishing a control binding relationship with the smart door lock in response to the matching verification passing. 12.一种智能门锁的控制装置,其特征在于,所述装置包括:12. A control device for an intelligent door lock, wherein the device comprises: 接收模块,用于接收客户端发送的客户端令牌,所述客户端令牌为服务器根据所述客户端发送的绑定请求生成的;a receiving module, configured to receive a client token sent by the client, where the client token is generated by the server according to the binding request sent by the client; 加密模块,用于对所述客户端令牌进行加密,得到门锁令牌;an encryption module for encrypting the client token to obtain a door lock token; 发送模块,用于通过所述客户端向服务器发送所述门锁令牌,所述服务器用于通过所述门锁令牌进行所述客户端和所述智能门锁的匹配验证,所述匹配验证用于指示所述智能门锁和所述客户端之间是否建立所述控制绑定关系,所述控制绑定关系用于指示所述门锁令牌中的客户端标识与自身预存的客户端标识对应,以及所述门锁令牌中的门锁标识与自身预存的门锁标识对应;A sending module, configured to send the door lock token to a server through the client, and the server is configured to perform matching verification between the client and the smart door lock through the door lock token, and the matching Verification is used to indicate whether the control binding relationship is established between the smart door lock and the client, and the control binding relationship is used to indicate the client ID in the door lock token and the client pre-stored by itself The terminal identification corresponds, and the door lock identification in the door lock token corresponds to the door lock identification pre-stored by itself; 建立模块,用于响应于匹配验证通过,建立与所述客户端之间的控制绑定关系。The establishment module is configured to establish a control binding relationship with the client in response to passing the matching verification. 13.一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一段程序,所述至少一段程序由所述处理器加载并执行以实现如权利要求9或10所述的智能门锁的控制方法。13. A computer device, characterized in that the computer device comprises a processor and a memory, and the memory stores at least a section of a program, the at least a section of the program is loaded and executed by the processor to implement the method as claimed in claim 9 Or the control method of the smart door lock described in 10. 14.一种计算机可读存储介质,其特征在于,所述可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行以实现如权利要求9或10所述的智能门锁的控制方法。14. A computer-readable storage medium, wherein the readable storage medium stores at least a piece of program, and the at least one piece of program is loaded and executed by a processor to realize the intelligence according to claim 9 or 10 Door lock control method.
CN202010969525.1A 2020-09-15 2020-09-15 Control system, method, device and readable storage medium for smart door lock Active CN112053477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010969525.1A CN112053477B (en) 2020-09-15 2020-09-15 Control system, method, device and readable storage medium for smart door lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010969525.1A CN112053477B (en) 2020-09-15 2020-09-15 Control system, method, device and readable storage medium for smart door lock

Publications (2)

Publication Number Publication Date
CN112053477A CN112053477A (en) 2020-12-08
CN112053477B true CN112053477B (en) 2022-07-15

Family

ID=73604210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010969525.1A Active CN112053477B (en) 2020-09-15 2020-09-15 Control system, method, device and readable storage medium for smart door lock

Country Status (1)

Country Link
CN (1) CN112053477B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114694279A (en) * 2020-12-28 2022-07-01 深圳Tcl新技术有限公司 Method for acquiring offline password, computer readable storage medium and terminal device
CN114189863B (en) * 2021-12-16 2024-03-22 青岛海尔科技有限公司 Binding method and device of intelligent door lock, storage medium and electronic device
CN117729050B (en) * 2024-01-23 2024-11-26 深圳技威时代科技有限公司 A system and method for securely binding a device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961501A (en) * 2018-06-28 2018-12-07 云丁网络技术(北京)有限公司 A kind of intelligent door lock control method, relevant device and system
CN109035500A (en) * 2018-07-02 2018-12-18 深圳市沃特沃德股份有限公司 Open the method and APP client of intelligent door lock
CN110992532A (en) * 2019-11-29 2020-04-10 深圳市云天智能终端有限公司 Temporary authorized unlocking method and system for intelligent door lock

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262793B (en) * 2010-05-26 2013-08-21 中兴通讯股份有限公司 Entrance guard control method and entrance guard control system
CN103886661B (en) * 2014-03-26 2016-06-08 广东安居宝数码科技股份有限公司 Access control management method and system
CN105069876B (en) * 2015-08-04 2018-06-22 珠海格力电器股份有限公司 Intelligent access control method and system
US10475264B2 (en) * 2017-08-14 2019-11-12 Q & K International Group Limited Application method of Bluetooth low-energy electronic lock based on built-in offline pairing passwords, interactive unlocking method of a Bluetooth electronic lock and electronic lock system
CN108765655A (en) * 2018-05-17 2018-11-06 胡泽民 A kind of application method of smart bluetooth lock
CN110021087B (en) * 2018-10-29 2021-09-28 深圳市微开互联科技有限公司 Method for quickly binding rooms based on WeChat door opening
CN109410405A (en) * 2018-11-13 2019-03-01 香港中文大学(深圳) Access control management method, gate inhibition's unlocking method and entrance guard management system for unlocking
CN110335373A (en) * 2019-05-22 2019-10-15 河北简已网络信息技术有限公司 Intelligent door lock and intelligent access control system
CN111383368A (en) * 2020-03-13 2020-07-07 巴江物联技术(东莞)有限公司 Configuration method for intelligent door lock, display terminal, intelligent door lock and server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961501A (en) * 2018-06-28 2018-12-07 云丁网络技术(北京)有限公司 A kind of intelligent door lock control method, relevant device and system
CN109035500A (en) * 2018-07-02 2018-12-18 深圳市沃特沃德股份有限公司 Open the method and APP client of intelligent door lock
CN110992532A (en) * 2019-11-29 2020-04-10 深圳市云天智能终端有限公司 Temporary authorized unlocking method and system for intelligent door lock

Also Published As

Publication number Publication date
CN112053477A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
US10826704B2 (en) Blockchain key storage on SIM devices
US9847882B2 (en) Multiple factor authentication in an identity certificate service
US10547605B2 (en) Communication device, communication method, communication system, and non-transitory computer readable medium
US10567370B2 (en) Certificate authority
US11750395B2 (en) System and method for blockchain-based multi-factor security authentication between mobile terminal and IoT device
JP4851767B2 (en) Method for mutual authentication between certificate authorities using portable security token and computer system
CN105472192B (en) Smart device, terminal device and method for realizing control security authorization and sharing
US20180183587A1 (en) Blockchain-Assisted Public Key Infrastructure for Internet of Things Applications
KR101686167B1 (en) Apparatus and Method for Certificate Distribution of the Internet of Things Equipment
US20140196134A1 (en) Verification method for verifying validity of program, and verification system
CN102577454B (en) A method for communicating data between a secure element and a network access point and a corresponding secure element
CN101523801A (en) UPnP authentication and authorization
CN112053477B (en) Control system, method, device and readable storage medium for smart door lock
CN110716441B (en) Method for controlling intelligent equipment, intelligent home system, equipment and medium
JP2017216596A (en) Communication system, communication device, communication method, and program
US11070537B2 (en) Stateless method for securing and authenticating a telecommunication
JP2017152880A (en) Authentication system, key processing linkage method, and key processing linkage program
US9280645B1 (en) Local and remote verification
CN112512048A (en) Mobile network access system, method, storage medium and electronic device
CN106465107A (en) Authorization method and apparatus for management of embedded universal integrated circuit card
CN106411884A (en) Method and device for data storage and encryption
JP2024501326A (en) Access control methods, devices, network equipment, terminals and blockchain nodes
CN112202770A (en) Equipment networking method and device, equipment and storage medium
KR20240045162A (en) Secure root of trust registration and identity management for embedded devices
KR101810904B1 (en) Video protection system

Legal Events

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

Effective date of registration: 20220819

Address after: 315300 No.88 rixian North Road, Cixi Binhai Economic Development Zone, Ningbo City, Zhejiang Province

Patentee after: Ningbo bull Intelligent Technology Co.,Ltd.

Address before: 315300 East District of Industrial Park, Cixi, Ningbo, Zhejiang

Patentee before: GONGNIU GROUP Co.,Ltd.

TR01 Transfer of patent right