CN115643046A - Authorization method of smart device and computer-readable storage medium - Google Patents

Authorization method of smart device and computer-readable storage medium Download PDF

Info

Publication number
CN115643046A
CN115643046A CN202211122586.XA CN202211122586A CN115643046A CN 115643046 A CN115643046 A CN 115643046A CN 202211122586 A CN202211122586 A CN 202211122586A CN 115643046 A CN115643046 A CN 115643046A
Authority
CN
China
Prior art keywords
authorization
authorization code
controlled device
master
controlled
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211122586.XA
Other languages
Chinese (zh)
Inventor
刘美玉
张娜
马晓燕
庞秀娟
宋子全
肖成创
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN202211122586.XA priority Critical patent/CN115643046A/en
Publication of CN115643046A publication Critical patent/CN115643046A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention relates to an authorization method of intelligent equipment, wherein a controlled device receives a first authorization connection request sent by a main control device, the first authorization connection request comprises first device information, first user identification information and a first authorization code, the first authorization code is generated and sent to the main control device according to second device information and first effective authorization duration after a controlled device receives an authorization code acquisition instruction sent by the main control device, the first effective authorization duration is the effective permission duration of the main control device for controlling the controlled device, the main controlled device carries out verification based on the first device information, the first user identification information and the first authorization code, and after the verification is confirmed to be passed, a first verification success instruction is sent to the main control device to indicate that the main control device and the controlled device are successfully authorized to connect. By adopting the method, the resource occupation can be reduced, and the security is improved by a mode of carrying out authorized connection verification through the decryption authorization code.

Description

智能设备的授权方法和计算机可读存储介质Authorization method for smart device and computer-readable storage medium

技术领域technical field

本公开涉及计算机技术领域,尤其涉及一种智能设备的授权方法和计算机可读存储介质。The present disclosure relates to the field of computer technology, and in particular to an authorization method for a smart device and a computer-readable storage medium.

背景技术Background technique

随着智能家居系统的不断发展,各种各样的智能设备进入用户的生活和工作中,给用户生活和工作带来了极大的智能性和方便性,目前在使用智能设备时,需要建立智能设备之间控制与被控制的关系,并进行智能设备之间的信息交互。With the continuous development of smart home systems, various smart devices have entered the life and work of users, bringing great intelligence and convenience to users' life and work. At present, when using smart devices, it is necessary to establish The relationship between the control and the controlled of smart devices, and the information interaction between smart devices.

现有技术中,可以采用消息队列遥测传输协议(Message Queuing TelemetryTransport,MQTT)实现智能设备之间的信息交互,MQTT协议是一种基于客户端-服务器的消息发布/订阅传输协议,通过主控设备发送用户标识信息、设备信息以及用户密码至被控设备,使得被控设备并基于用户标识信息和用户密码进行第一次连接,在第一次连接成功之后,响应于主控设备发送的授权请求,在弹出的界面上让用户选择是否对该主控设备授权,若同意授权,则将设备信息存储至白名单中,并发送授权成功消息给主控设备,以指示对主控设备授权成功。In the prior art, the message queuing telemetry transport protocol (Message Queuing Telemetry Transport, MQTT) can be used to realize the information interaction between smart devices. Send user identification information, device information, and user password to the controlled device, so that the controlled device performs the first connection based on the user identification information and user password, and responds to the authorization request sent by the master device after the first connection is successful , on the pop-up interface, let the user choose whether to authorize the master device. If the authorization is agreed, the device information will be stored in the white list, and an authorization success message will be sent to the master device to indicate that the master device is authorized successfully.

但是,采用现有技术,存在浪费存储资源的问题,且由于白名单存在丢失的情况,导致需要重新对被控设备进行授权,操作繁琐,安全性较低。However, using the existing technology, there is a problem of wasting storage resources, and due to the loss of the white list, it is necessary to re-authorize the controlled device, which is cumbersome to operate and has low security.

发明内容Contents of the invention

为了解决上述技术问题或者至少部分地解决上述技术问题,本公开提供了一种智能设备的授权方法和计算机可读存储介质,通过第一授权连接请求包括的第一设备信息、第一用户标识信息以及第一授权码进行校验,确定主控设备的第一授权连接请求是否通过,避免了现有技术中在白名单中查询,确定主控设备是否被授权的信任设备的操作,即,无需将被授权的主控设备存储至白名单中,减少了资源占用,且通过解密授权码进行授权连接校验的方式,提高了安全性。为了实现上述目的,本公开实施例提供的技术方案如下:In order to solve the above-mentioned technical problems or at least partly solve the above-mentioned technical problems, the present disclosure provides an authorization method for a smart device and a computer-readable storage medium, through which the first device information and the first user identification information included in the first authorization connection request And the first authorization code is checked to determine whether the first authorized connection request of the main control device is passed, avoiding the operation of querying in the white list in the prior art to determine whether the main control device is an authorized trusted device, that is, no need The authorized master device is stored in the white list, which reduces the resource occupation, and the authorized connection verification is performed by decrypting the authorization code, which improves the security. In order to achieve the above purpose, the technical solutions provided by the embodiments of the present disclosure are as follows:

第一方面,本公开提供了一种智能设备的授权方法,应用于被控设备,包括:In a first aspect, the present disclosure provides an authorization method for a smart device, which is applied to a controlled device, including:

接收主控设备发送的第一授权连接请求,其中,所述第一授权连接请求包括第一设备信息、第一用户标识信息以及第一授权码,所述第一授权码是由所述被控设备在接收到所述主控设备发送的授权码获取指令之后,根据第二设备信息和第一有效授权时长生成并发送给所述主控设备的,所述第一有效授权时长为所述主控设备控制所述被控设备的有效权限时长;Receive a first authorized connection request sent by the master device, where the first authorized connection request includes first device information, first user identification information, and a first authorization code, and the first authorization code is issued by the controlled After receiving the authorization code acquisition instruction sent by the master device, the device generates and sends it to the master device according to the information of the second device and the first valid authorization duration, the first valid authorization duration being the The period of effective authority for the controlled device to control the controlled device;

基于所述第一设备信息、所述第一用户标识信息以及所述第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至所述主控设备,以指示所述主控设备与所述被控设备授权连接成功。Perform a check based on the first device information, the first user identification information, and the first authorization code, and after the check is determined to pass, send a first check success instruction to the master device to instruct the master The authorized connection between the controlled device and the controlled device is successful.

第二方面,本公开提供一种智能设备的授权方法,应用于主控设备,包括:In a second aspect, the present disclosure provides an authorization method for a smart device, which is applied to a master control device, including:

发送第一授权连接请求至被控设备,以使得所述被控设备基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至所述主控设备,其中,所述第一授权请求包括第一设备信息、第一用户标识信息以及第一授权码;Sending a first authorized connection request to the controlled device, so that the controlled device performs a check based on the first device information, the first user identification information, and the first authorization code, and after the check is determined to pass, send the first check success instruction To the master control device, wherein the first authorization request includes first device information, first user identification information, and a first authorization code;

接收所述被控设备发送的所述第一检验成功指令,以指示所述主控设备与所述被控设备授权连接成功。The first verification success instruction sent by the controlled device is received to indicate that the master control device and the controlled device are authorized to connect successfully.

第三方面,本公开提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面任一项所述的方法或第二方面任一项所述的方法。In a third aspect, the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any one of the first aspect or any one of the second aspect is implemented Methods.

本公开实施例提供的技术方案与现有技术相比具有如下优点:首先通过主控设备向被控设备发送第一授权连接请求,被控设备接收主控设备发送的第一授权连接请求,其中,第一授权连接请求包括第一设备信息、第一用户标识信息以及第一授权码,第一授权码是由被控设备在接收到主控设备发送的授权码获取指令之后,根据第二设备信息和第一有效授权时长生成并发送给主控设备的,第一有效授权时长为主控设备控制被控设备的有效权限时长,被控设备基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至主控设备,以指示主控设备与被控设备授权连接成功。在上述过程中,通过第一授权连接请求包括的第一设备信息、第一用户标识信息以及第一授权码进行校验,确定主控设备的第一授权连接请求是否通过,避免了现有技术中在白名单中查询,确定主控设备是否被授权的信任设备的操作,即,无需将被授权的主控设备存储至白名单中,减少了资源占用,且通过解密授权码进行授权连接校验的方式,提高了安全性。Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages: firstly, the master device sends the first authorized connection request to the controlled device, and the controlled device receives the first authorized connection request sent by the master device, wherein , the first authorized connection request includes the first device information, the first user identification information and the first authorization code, the first authorization code is obtained by the controlled device according to the second device after receiving the authorization code acquisition instruction sent by the master device If the information and the first effective authorization period are generated and sent to the master control device, the first effective authorization period is the effective authority period for the master control device to control the controlled device, and the controlled device is based on the first device information, the first user identification information and the second An authorization code is verified, and after the verification is determined to be successful, a first verification success instruction is sent to the master device to indicate that the master device and the controlled device are authorized to connect successfully. In the above process, the first device information, the first user identification information and the first authorization code included in the first authorized connection request are checked to determine whether the first authorized connection request of the master device is passed, avoiding the prior art Inquiry in the white list to determine whether the master device is an authorized trusted device operation, that is, there is no need to store the authorized master device in the white list, reducing resource occupation, and the authorized connection is verified by decrypting the authorization code. The method of verification improves the security.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.

图1A为本公开实施例提供的一种智能设备的授权方法的应用场景示意图;FIG. 1A is a schematic diagram of an application scenario of an authorization method for a smart device provided by an embodiment of the present disclosure;

图1B为现有技术中提供的一种智能设备的授权方法的示意图;FIG. 1B is a schematic diagram of an authorization method for a smart device provided in the prior art;

图1C为现有技术中提供的另一种显性授权方法的示意图;FIG. 1C is a schematic diagram of another explicit authorization method provided in the prior art;

图2A为根据本公开一个或多个实施例的电子设备的硬件配置框图;FIG. 2A is a block diagram of a hardware configuration of an electronic device according to one or more embodiments of the present disclosure;

图2B为根据本公开一个或多个实施例的电子设备的软件配置示意图;FIG. 2B is a schematic diagram of software configuration of an electronic device according to one or more embodiments of the present disclosure;

图2C为根据本公开一个或多个实施例的被控设备中包含的应用程序的图标控件界面显示示意图;FIG. 2C is a schematic diagram of displaying an icon control interface of an application included in a controlled device according to one or more embodiments of the present disclosure;

图3A为本公开实施例提供的一种智能设备的授权方法的流程示意图;FIG. 3A is a schematic flowchart of an authorization method for a smart device provided by an embodiment of the present disclosure;

图3B为本公开实施例提供的一种智能设备的授权方法的交互过程示意图;FIG. 3B is a schematic diagram of an interaction process of an authorization method for a smart device provided by an embodiment of the present disclosure;

图4A为本公开实施例提供的另一种智能设备的授权方法的流程示意图;FIG. 4A is a schematic flowchart of another smart device authorization method provided by an embodiment of the present disclosure;

图4B为本公开实施例提供的另一种智能设备的授权方法的交互示意图;FIG. 4B is an interactive schematic diagram of another smart device authorization method provided by an embodiment of the present disclosure;

图5A为本公开实施例提供的再一种智能设备的授权方法的流程示意图;FIG. 5A is a schematic flowchart of another smart device authorization method provided by an embodiment of the present disclosure;

图5B为本公开实施例提供的再一种智能设备的授权方法的交互示意图;FIG. 5B is an interactive schematic diagram of yet another smart device authorization method provided by an embodiment of the present disclosure;

图6A为本公开实施例提供的又一种智能设备的授权方法的流程示意图;FIG. 6A is a schematic flowchart of another smart device authorization method provided by an embodiment of the present disclosure;

图6B为本公开实施例提供的又一种智能设备的授权方法的交互示意图;FIG. 6B is an interactive schematic diagram of another smart device authorization method provided by an embodiment of the present disclosure;

图7为本公开实施例提供的又一种智能设备的授权方法的流程示意图;FIG. 7 is a schematic flowchart of another smart device authorization method provided by an embodiment of the present disclosure;

图8为本公开实施例提供的一种智能设备的授权方法装置的结构示意图;FIG. 8 is a schematic structural diagram of an authorization method device for a smart device provided by an embodiment of the present disclosure;

图9是本公开实施例提供的另一种智能设备的授权方法装置的结构示意图;Fig. 9 is a schematic structural diagram of another smart device authorization method device provided by an embodiment of the present disclosure;

图10是本公开实施例提供的一种电子设备的结构示意图。Fig. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。In order to more clearly understand the above objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, in the case of no conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.

在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways than described here; obviously, the embodiments in the description are only some of the embodiments of the present disclosure, and Not all examples.

本公开中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一处理结果和第二处理结果等是用于区别不同的处理结果,而不是用于描述处理结果的特定顺序。The terms "first" and "second", etc. in the present disclosure are used to distinguish different objects, not to describe a specific order of objects. For example, the first processing result and the second processing result are used to distinguish different processing results, not to describe a specific order of the processing results.

随着智能家居系统的不断发展,各种各样的智能设备进入用户的生活和工作中,给用户生活和工作带来了极大的智能性和方便性,用户在使用智能设备时,需要建立智能设备之间控制与被控制的关系,并进行智能设备之间的信息交互。目前,可以采用消息队列遥测传输协议(Message Queuing Telemetry Transport,MQTT)实现智能设备之间的信息交互,MQTT协议是一种基于客户端-服务器的消息发布/订阅传输协议,对于需要进行消息交互的智能设备作为客户端连接到MQTT服务器,MQTT服务器根据发布或者是订阅将消息转发给对应的客户端(智能设备)。示例性的,用户生活中经常使用移动终端设备如手机作为控制智能设备如电视的模拟遥控器,以此控制智能设备如电视,那么,移动终端设备如手机即为MQTT的客户端,将移动终端设备如手机连接至智能设备如电视的MQTT服务端,即可实现移动终端设备如手机和智能设备如电视之间的信息交互。With the continuous development of smart home systems, various smart devices have entered users' lives and work, bringing great intelligence and convenience to users' life and work. When users use smart devices, they need to establish The relationship between the control and the controlled of smart devices, and the information interaction between smart devices. Currently, Message Queuing Telemetry Transport (MQTT) can be used to realize information interaction between smart devices. The MQTT protocol is a client-server based message publishing/subscribing transport protocol. The smart device connects to the MQTT server as a client, and the MQTT server forwards the message to the corresponding client (smart device) according to publishing or subscription. Exemplarily, users often use mobile terminal devices such as mobile phones as analog remote controls to control smart devices such as TVs in their lives, so as to control smart devices such as TVs. Then, mobile terminal devices such as mobile phones are MQTT clients, and the mobile terminal Devices such as mobile phones are connected to the MQTT server of smart devices such as TVs to realize information interaction between mobile terminal devices such as mobile phones and smart devices such as TVs.

但是,在采用MQTT协议实现智能设备之间的信息交互时,为了保证智能设备之间进行消息交互的安全性,需要客户端即移动终端设备如手机提供用户标识信息和用户密码,基于用户标识信息和用户密码进行连接,但是通过该方式无法显征式得获取用户意愿,对连接的智能设备进行授权,现有技术中,通常会在MQTT根据用户标识信息和用户密码第一次连接成功之后,客户端即移动终端设备如手机向服务端即智能设备如电视发送授权请求,智能设备如电视响应于该授权请求,主动弹出界面让用户进行授权,如弹出“设备1正试图连接您的电视,您是否同意”的提示,用户可根据需求确定是否令智能设备如电视接收客户端即移动终端设备如手机的接入,若同意,则将该移动终端设备如手机作为信任设备,并存储至白名单中,该白名单可以保存在数据库中,或者是存储在物理文件中,以此便于后续移动终端设备如手机需要控制智能设备如电视时,能够通过查阅自身存储的白名单,确定当前移动终端设备如手机是否为已经授权的信任设备。However, when using the MQTT protocol to realize information interaction between smart devices, in order to ensure the security of message interaction between smart devices, it is necessary for the client, that is, a mobile terminal device such as a mobile phone, to provide user identification information and user password, based on user identification information Connect with the user password, but this method cannot explicitly obtain the user's will and authorize the connected smart device. In the prior art, usually after the first successful connection of MQTT according to the user identification information and user password, The client, that is, a mobile terminal device such as a mobile phone, sends an authorization request to the server, that is, a smart device such as a TV. In response to the authorization request, the smart device such as a TV actively pops up an interface for the user to authorize, such as popping up "Device 1 is trying to connect to your TV. Do you agree" prompt, the user can determine whether to allow smart devices such as TVs to receive access from clients, such as mobile terminals, such as mobile phones, and if yes, the mobile terminal such as mobile phones will be used as trusted devices and stored in the white box. In the list, the white list can be saved in a database or stored in a physical file, so that when a subsequent mobile terminal device such as a mobile phone needs to control a smart device such as a TV, it can determine the current mobile terminal by consulting the white list stored in itself. Whether a device such as a mobile phone is an authorized trusted device.

但是,采用现有技术,由于对被控设备的授权期限为系统规定的永久期限,或者是系统预设固定值,用户无法改变被控设备的授权期限,且将设备信息存储至白名单,即浪费存储资源,又存在白名单丢失的情况,导致需要重新对被控设备进行授权,操作繁琐,且安全性低。However, with the existing technology, since the authorization period for the controlled device is a permanent period stipulated by the system, or a fixed value preset by the system, the user cannot change the authorization period for the controlled device and store the device information in the white list, that is, Storage resources are wasted, and the white list is lost, resulting in the need to re-authorize the controlled device, which is cumbersome to operate and has low security.

图1A为本公开实施例提供的一种智能设备的授权方法的应用场景示意图。图1A中的移动智能设备即手机201作为主控设备,显示设备即电视200作为被控设备,当手机201想要控制显示设备200时,显示设备200需要对手机201进行授权连接认证,从而确定是否允许手机201控制显示设备200。FIG. 1A is a schematic diagram of an application scenario of an authorization method for a smart device provided by an embodiment of the present disclosure. In Figure 1A, the mobile smart device, i.e. mobile phone 201, is used as the main control device, and the display device, i.e. TV 200, is used as the controlled device. Whether to allow the mobile phone 201 to control the display device 200 .

图1B为现有技术中提供的一种智能设备的授权方法的示意图。主控设备发送授权连接请求至被控设备,被控设备响应主控设备发送的授权连接请求,查阅存储的白名单,在白名单中查找是否存在该主控设备的信息如设备的标识,以此确定主控设备是否为被控设备已经授权的信任设备,当在白名单中确定存在主控设备的信息,则确定主控设备为被控设备已经授权的信任设备,发送授权连接通过的消息至主控设备,并将主控设备信息存储至白名单,此时主控设备在接收到授权连接通过的消息之后,可对被控设备进行控制。但是,由于将被授权的主控设备信息存储至白名单中,浪费存储资源,且虽然能够让用户对主控设备进行显性授权,确定是否同意主控设备为被控设备授权的信任设备,也只有首次可以对主控设备进行授权,且授权的有效期限为系统规定的永久期限,或者是系统预设固定值,用户无法改变被控设备的授权期限,当主控设备一旦被黑客攻击时,黑客则一直控制被控设备,用户无法解决该问题,同时,当被控设备出现类似恢复出厂设置等清除操作,白名单会被清除,导致白名单丢失,只能重新对主控设备进行显性授权的操作,操作繁琐。FIG. 1B is a schematic diagram of an authorization method for a smart device provided in the prior art. The master device sends an authorized connection request to the controlled device, and the controlled device responds to the authorized connection request sent by the master device, consults the stored white list, and checks whether there is information about the master device in the white list, such as the device's identification, to This determines whether the master device is a trusted device that has been authorized by the controlled device. When it is determined that there is information about the master device in the whitelist, it is determined that the master device is a trusted device that has been authorized by the controlled device, and sends a message that the authorized connection has passed to the master control device, and store the master control device information in the white list. At this time, the master control device can control the controlled device after receiving the message that the authorized connection is passed. However, since the authorized master device information is stored in the white list, storage resources are wasted, and although the user can explicitly authorize the master device to determine whether to agree to the master device as a trusted device authorized by the controlled device, Only for the first time can the master device be authorized, and the validity period of the authorization is the permanent period stipulated by the system, or a fixed value preset by the system. The user cannot change the authorization period of the controlled device. Once the master device is hacked , the hacker has been controlling the controlled device, and the user cannot solve this problem. At the same time, when the controlled device undergoes a clear operation such as restoring factory settings, the white list will be cleared, resulting in the loss of the white list, and the main control device can only be displayed again. The operation of sexual authorization is cumbersome.

图1C为现有技术中提供的另一种显性授权方法的示意图。如图1C所示,主控设备向被控设备发送授权连接请求,被控设备响应于该授权连接请求,在被控设备中主动弹出界面让用户进行授权,该界面包含“移动终端设备1正试图连接您的电视,您是否同意授权吗?”,用户可在界面右下角的虚拟按键“拒绝”和“同意”中,根据用户需求确定是否同意主控设备为被控设备授权的信任设备,当用户择“同意”时,被控设备电视向移动终端设备1发送授权连接通过的消息,并将移动终端设备1作为信任设备存储至白名单中,当用户选择“拒绝”时,被控设备电视向移动终端设备1发送授权连接失败的消息。Fig. 1C is a schematic diagram of another explicit authorization method provided in the prior art. As shown in Figure 1C, the master control device sends an authorization connection request to the controlled device, and the controlled device responds to the authorization connection request, and actively pops up an interface in the controlled device to allow the user to authorize. The interface contains "Mobile terminal device 1 is Trying to connect to your TV, do you agree to authorize?", the user can determine whether to agree to the master device as the trusted device authorized by the controlled device according to the user's needs in the virtual buttons "Reject" and "Agree" in the lower right corner of the interface. When the user selects "Agree", the TV of the controlled device sends a message to the mobile terminal device 1 to authorize the connection, and stores the mobile terminal device 1 as a trusted device in the white list. When the user selects "Reject", the controlled device The television sends a message to the mobile terminal device 1 that the authorization connection fails.

为了解决现有技术中存在的问题,本实施例提出了一种智能设备的授权方法,首先通过主控设备向被控设备发送第一授权连接请求,被控设备接收主控设备发送的第一授权连接请求,其中,第一授权连接请求包括第一设备信息、第一用户标识信息以及第一授权码,第一授权码是由被控设备在接收到主控设备发送的授权码获取指令之后,根据第二设备信息和第一有效授权时长生成并发送给主控设备的,第一有效授权时长为主控设备控制被控设备的有效权限时长,被控设备基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至主控设备,以指示主控设备与被控设备授权连接成功。在上述过程中,通过第一授权连接请求包括的第一设备信息、第一用户标识信息以及第一授权码进行校验,确定主控设备的第一授权连接请求是否通过,避免了现有技术中在白名单中查询,确定主控设备是否被授权的信任设备的操作,即,无需将被授权的主控设备存储至白名单中,减少了资源占用,且通过解密授权码进行授权连接校验的方式,提高了安全性。In order to solve the problems existing in the prior art, this embodiment proposes an authorization method for smart devices. Firstly, the master device sends the first authorized connection request to the controlled device, and the controlled device receives the first authorized connection request sent by the master device. An authorized connection request, wherein the first authorized connection request includes first device information, first user identification information and a first authorization code, and the first authorization code is obtained by the controlled device after receiving the authorization code acquisition instruction sent by the master device , generated and sent to the master device according to the second device information and the first effective authorization duration, the first effective authorization duration is the effective authorization duration for the master device to control the controlled device, and the controlled device is based on the first device information, the first The user identification information and the first authorization code are verified, and after the verification is determined to be successful, a first verification success instruction is sent to the master device to indicate that the master device and the controlled device are authorized to connect successfully. In the above process, the first device information, the first user identification information and the first authorization code included in the first authorized connection request are checked to determine whether the first authorized connection request of the master device is passed, avoiding the prior art Inquiry in the white list to determine whether the master device is an authorized trusted device operation, that is, there is no need to store the authorized master device in the white list, reducing resource occupation, and the authorized connection is verified by decrypting the authorization code. The method of verification improves the security.

本公开实施例提供的智能设备的授权方法,可以基于电子设备,或者电子设备中的功能模块或者功能实体实现。The authorization method for a smart device provided in the embodiments of the present disclosure may be implemented based on an electronic device, or a functional module or a functional entity in the electronic device.

其中,电子设备可以为个人计算机(personal computer,PC)、服务器、手机、平板电脑、笔记本电脑、大型计算机等,本公开实施例对此不作具体限定。Wherein, the electronic device may be a personal computer (personal computer, PC), a server, a mobile phone, a tablet computer, a notebook computer, a mainframe computer, etc., which are not specifically limited in this embodiment of the present disclosure.

示例性的,图2A为根据本公开一个或多个实施例的电子设备的硬件配置框图。如图2A所示,电子设备包括:调谐解调器210、通信器220、检测器230、外部装置接口240、控制器250、显示器260、音频输出接口270、存储器、供电电源、用户接口280中的至少一种。其中,控制器250包括中央处理器,视频处理器,音频处理器,图形处理器,RAM,ROM,用于输入/输出的第一接口至第n接口。显示器260可为液晶显示器、OLED显示器、触控显示器以及投影显示器中的至少一种,还可以为一种投影装置和投影屏幕。调谐解调器210通过有线或无线接收方式接收广播电视信号,以及从多个无线或有线广播电视信号中解调出音视频信号,如以及EPG音视频数据信号。通信器220是用于根据各种通信协议类型与外部设备或服务器进行通信的组件。例如:通信器可以包括Wifi模块,蓝牙模块,有线以太网模块等其他网络通信协议芯片或近场通信协议芯片,以及红外接收器中的至少一种。电子设备可以通过通信器220与服务器203或者本地控制设备205建立控制信号和数据信号的发送和接收。检测器230用于采集外部环境或与外部交互的信号。控制器250和调谐解调器210可以位于不同的分体设备中,即调谐解调器210也可在控制器250所在的主体设备的外置设备中,如外置机顶盒等。用户接口280可用于接收控制装置(如:红外遥控器等)的控制信号。Exemplarily, FIG. 2A is a hardware configuration block diagram of an electronic device according to one or more embodiments of the present disclosure. As shown in Figure 2A, the electronic equipment includes: a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280 at least one of . Wherein, the controller 250 includes a central processing unit, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input/output. The display 260 may be at least one of a liquid crystal display, an OLED display, a touch display, and a projection display, and may also be a projection device and a projection screen. The tuner demodulator 210 receives broadcast TV signals through wired or wireless reception, and demodulates audio and video signals, such as EPG audio and video data signals, from multiple wireless or cable broadcast TV signals. The communicator 220 is a component for communicating with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The electronic device can establish sending and receiving of control signals and data signals with the server 203 or the local control device 205 through the communicator 220 . The detector 230 is used to collect signals of the external environment or interaction with the outside. The controller 250 and the tuner-demodulator 210 may be located in different split devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box. The user interface 280 can be used to receive a control signal from a control device (such as an infrared remote controller, etc.).

在一些实施例中,控制器250,通过存储在存储器上中各种软件控制程序,来控制电子设备的工作和响应用户的操作。控制器250控制电子设备的整体操作。用户可在显示器260上显示的图形用户界面(GUI)输入用户命令,则用户输入接口通过图形用户界面(GUI)接收用户输入命令。或者,用户可通过输入特定的声音或手势进行输入用户命令,则用户输入接口通过传感器识别出声音或手势,来接收用户输入命令。In some embodiments, the controller 250 controls the operation of the electronic device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operations of the electronic device. The user can input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command by inputting a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.

在一些实施例中,“用户界面”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面常用的表现形式是图形用户界面(Graphic User Interface,简称GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的一个图标、窗口和控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素中的至少一种。In some embodiments, "user interface" is a medium interface for interaction and information exchange between an application program or an operating system and a user, and it realizes the conversion between the internal form of information and the form acceptable to the user. A commonly used form of user interface is a graphical user interface (Graphic User Interface, GUI for short), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be an interface element such as an icon, window, and control displayed on the display screen of an electronic device, where the control can include an icon, button, menu, tab, text box, dialog box, status bar, navigation bar, Widget, etc. At least one of the view's interface elements.

图2B为根据本公开一个或多个实施例的电子设备的软件配置示意图,如图2B所示,将系统分为四层,从上至下分别为应用程序(Applications)层(简称“应用层”),应用程序框架(Application Framework)层(简称“框架层”),安卓运行时(Android runtime)和系统库层(简称“系统运行库层”),以及内核层。2B is a schematic diagram of software configuration of an electronic device according to one or more embodiments of the present disclosure. As shown in FIG. 2B , the system is divided into four layers, from top to bottom are respectively the application program (Applications) layer (abbreviated as "application layer") "), application framework (Application Framework) layer (referred to as "framework layer"), Android runtime (Android runtime) and system library layer (referred to as "system runtime layer"), and the kernel layer.

在一些实施例中,应用程序层中运行有至少一个应用程序,这些应用程序可以是操作系统自带的窗口(Window)程序、系统设置程序或时钟程序等;也可以是第三方开发者所开发的应用程序。在具体实施时,应用程序层中的应用程序包括但不限于以上举例。In some embodiments, there is at least one application program running in the application program layer, and these application programs can be window (Window) program, system setting program or clock program etc. that come with the operating system; they can also be developed by third-party developers. s application. During specific implementation, the applications in the application layer include but are not limited to the above examples.

在一些实施例中,系统运行库层为上层即框架层提供支撑,当框架层被使用时,安卓操作系统会运行系统运行库层中包含的C/C++库以实现框架层要实现的功能。In some embodiments, the system runtime layer provides support for the upper layer, that is, the framework layer. When the framework layer is used, the Android operating system will run the C/C++ library contained in the system runtime layer to realize the functions to be realized by the framework layer.

在一些实施例中,内核层是硬件和软件之间的层,至少包含以下驱动中的至少一种:音频驱动、显示驱动、蓝牙驱动、摄像头驱动、WIFI驱动、USB驱动、HDMI驱动、传感器驱动(如指纹传感器,温度传感器,压力传感器等)、以及电源驱动等。In some embodiments, the kernel layer is a layer between hardware and software, at least including at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power drive, etc.

图2C为根据本公开一个或多个实施例的被控设备(主要为智能播放设备,例如智能电视、数字影院系统或者影音服务器等)中包含的应用程序的图标控件界面显示示意图,如图2C中所示,应用程序层包含至少一个应用程序可以在显示器中显示对应的图标控件,如:直播电视应用程序图标控件、视频点播VOD应用程序图标控件、媒体中心应用程序图标控件、应用程序中心图标控件、游戏应用图标控件等。直播电视应用程序,可以通过不同的信号源提供直播电视。视频点播VOD应用程序,可以提供来自不同存储源的视频。不同于直播电视应用程序,视频点播提供来自某些存储源的视频显示。媒体中心应用程序,可以提供各种多媒体内容播放的应用程序。应用程序中心,可以提供储存各种应用程序。FIG. 2C is a schematic diagram of the icon control interface display of the application program contained in the controlled device (mainly a smart playback device, such as a smart TV, a digital theater system or an audio-visual server, etc.) according to one or more embodiments of the present disclosure, as shown in FIG. 2C As shown in , the application layer includes at least one application that can display corresponding icon controls on the display, such as: live TV application icon control, video on demand VOD application icon control, media center application icon control, application center icon controls, game app icon controls, etc. Live TV app that provides live TV from different sources. Video on demand VOD application that can provide videos from different storage sources. Unlike live TV applications, video on demand provides video displays from some stored source. The media center application program can provide an application program for playing various multimedia contents. The application program center can provide and store various application programs.

本申请实施例提供的智能设备的授权方法,可以基于上述电子设备实现。The authorization method for the smart device provided in the embodiment of the present application may be implemented based on the above-mentioned electronic device.

为了更加详细的说明本方案,以下将以示例性的方式结合图3A进行说明,可以理解的是,图3A中所涉及的步骤在实际实现时可以包括更多的步骤,或者更少的步骤,并且这些步骤之间的顺序也可以不同,以能够实现本申请实施例中提供的应用于被控设备侧的智能设备的授权方法为准。In order to describe this solution in more detail, the following will be described in conjunction with FIG. 3A in an exemplary manner. It can be understood that the steps involved in FIG. 3A may include more steps or fewer steps in actual implementation, And the order of these steps may also be different, as long as the authorization method applied to the smart device on the controlled device side provided in the embodiment of the present application can be implemented.

图3A为本公开实施例提供的一种智能设备的授权方法的流程示意图。图3B为本公开实施例提供的一种智能设备的授权方法的交互示意图,本实施例应用于被控设备。本实施例方法由应用于被控设备侧的智能设备的授权方法装置来执行,该装置可采用硬件/或软件的方式来实现,并可配置于电子设备中。如图3A所示,该智能设备的授权方法具体包括如下步骤:Fig. 3A is a schematic flowchart of an authorization method for a smart device provided by an embodiment of the present disclosure. FIG. 3B is an interactive schematic diagram of an authorization method for a smart device provided by an embodiment of the present disclosure, and this embodiment is applied to a controlled device. The method in this embodiment is executed by an authorization method device applied to a smart device on the controlled device side, and the device can be implemented in hardware/software, and can be configured in an electronic device. As shown in Figure 3A, the authorization method of the smart device specifically includes the following steps:

S310,接收主控设备发送的第一授权连接请求。S310. Receive a first authorized connection request sent by the master control device.

其中,第一授权连接请求包括第一设备信息、第一用户标识信息以及第一授权码,第一授权码是由被控设备在接收到主控设备发送的授权码获取指令之后,根据第二设备信息和第一有效授权时长生成并发送给主控设备的,第一有效授权时长为主控设备控制被控设备的有效权限时长,即,根据用户需求设置的主控设备控制被控设备的授权有效时长,示例性的,该第一有效授权时长例如可以是10天,但不限于此,本公开不具体限制,本领域技术人员可根据实际情况设置。Wherein, the first authorized connection request includes the first device information, the first user identification information and the first authorization code, and the first authorization code is obtained by the controlled device after receiving the authorization code acquisition instruction sent by the master device according to the second If the device information and the first effective authorization period are generated and sent to the master device, the first effective authorization period is the effective authorization period for the master device to control the controlled device, that is, the master device controls the controlled device according to the user's needs. Authorization validity period. Exemplarily, the first valid authorization period may be 10 days, but it is not limited thereto. This disclosure does not specifically limit it, and those skilled in the art can set it according to actual conditions.

上述主控设备为在具有多个智能设备的场景中,控制被控设备的设备,该主控设备例如可以是移动手机、平板电脑、智能中控屏等,但不限于此,本公开不具体限制。被控设备为具有多个智能设备的场景中,被主控设备控制的智能设备,该智能设备例如可以是电视、个人计算机、影音服务器等,但不限于此,本公开不具体限制。The above-mentioned main control device is a device that controls the controlled device in a scene with multiple smart devices. The main control device can be, for example, a mobile phone, a tablet computer, a smart central control screen, etc. limit. A controlled device is a smart device controlled by a master device in a scene with multiple smart devices. The smart device may be, for example, a TV, a personal computer, an audio-visual server, etc., but is not limited thereto, and the present disclosure is not specifically limited thereto.

上述第一设备信息是指主控设备对应的信息,该设备信息可以是主控设备的标识信息,用来表征主控设备的唯一信息,例如可以是主控设备的名称、主控设备的序列号,但不限于此,本公开不具体限制,本领域技术人员可根据实际情况设置。第一用户标识信息是指使用主控设备的用户对应的信息,该第一用户标识信息可以是用户名称、手机号、邮箱等,但不限于此,本公开不具体限制,本领域技术人员可根据实际情况设置。第一授权码包含了主控设备的设备信息、有效授权时长,该第一授权码可以为进行加密的字符串,还可以是由阿拉伯数字构成的被加密的数字串,但不限于此,本公开不具体限制,本领域技术人员可根据实际情况设置。The above-mentioned first device information refers to the information corresponding to the master control device. The device information can be the identification information of the master control device, which is used to represent the unique information of the master control device, for example, it can be the name of the master control device, the sequence of the master control device No., but not limited thereto, the present disclosure does not specifically limit it, and those skilled in the art can set it according to the actual situation. The first user identification information refers to the information corresponding to the user who uses the main control device. The first user identification information may be a user name, mobile phone number, email address, etc., but is not limited thereto. This disclosure is not specifically limited, and those skilled in the art can Set according to the actual situation. The first authorization code includes the device information of the main control device and the valid authorization period. The first authorization code can be an encrypted string or an encrypted number string composed of Arabic numerals, but not limited to this. The disclosure is not specifically limited, and those skilled in the art can set it according to actual conditions.

具体的,主控设备向被控设备发送包括第一设备信息、第一用户标识信息以及第一授权码的第一授权连接请求,被控设备接收该第一授权连接请求。Specifically, the controlling device sends a first authorized connection request including first device information, first user identification information, and a first authorization code to the controlled device, and the controlled device receives the first authorized connection request.

需要说明的是,主控设备向被控设备第一授权连接请求是基于MQTT协议发送的,但不限于此,本公开不具体限制。It should be noted that the first authorization connection request from the master device to the controlled device is sent based on the MQTT protocol, but it is not limited thereto, and the present disclosure does not specifically limit it.

S320,基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至主控设备。S320. Perform a check based on the first device information, the first user identification information, and the first authorization code, and send a first check success instruction to the master control device after it is determined that the check is passed.

其中,第一检验成功指令指示主控设备与被控设备授权连接成功。Wherein, the first verification success instruction indicates that the authorized connection between the controlling device and the controlled device is successful.

具体的,被控设备在接收到主控设备发送的第一授权连接请求之后,响应于该第一授权连接请求,根据第一设备信息、第一用户标识信息以及第一授权码进行校验,并在确定校验通过之后,被控设备向主控设备发送第一检验成功指令,指示主控设备与被控设备授权连接成功,此时,主控设备在接收到被控设备发送的第一检验成功指令之后,主控设备能够对被控设备进行控制操作。Specifically, after receiving the first authorized connection request sent by the master device, the controlled device performs verification according to the first device information, the first user identification information and the first authorization code in response to the first authorized connection request, And after confirming that the verification is passed, the controlled device sends the first verification success instruction to the master device, instructing the master device to successfully authorize the connection with the controlled device. At this time, the master device receives the first After verifying the successful command, the master control device can perform control operations on the controlled device.

这样,本实施例中提供的智能设备的授权方法,首先通过主控设备向被控设备发送第一授权连接请求,被控设备接收主控设备发送的第一授权连接请求,其中,第一授权连接请求包括第一设备信息、第一用户标识信息以及第一授权码,第一授权码是由被控设备在接收到主控设备发送的授权码获取指令之后,根据第二设备信息和第一有效授权时长生成并发送给主控设备的,第一有效授权时长为主控设备控制被控设备的有效权限时长,被控设备基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至主控设备,以指示主控设备与被控设备授权连接成功。在上述过程中,通过第一授权连接请求包括的第一设备信息、第一用户标识信息以及第一授权码进行校验,确定主控设备的第一授权连接请求是否通过,避免了现有技术中在白名单中查询,确定主控设备是否被授权的信任设备的操作,即,无需将被授权的主控设备存储至白名单中,减少了资源占用,且通过解密授权码进行授权连接校验的方式,提高了安全性。In this way, the smart device authorization method provided in this embodiment first sends a first authorized connection request to the controlled device through the master device, and the controlled device receives the first authorized connection request sent by the master device, wherein the first authorization The connection request includes the first device information, the first user identification information and the first authorization code. The first authorization code is obtained by the controlled device according to the second device information and the first authorization code after receiving the authorization code acquisition instruction sent by the master device. If the effective authorization period is generated and sent to the master control device, the first effective authorization period is the effective authority period for the master control device to control the controlled device, and the controlled device is based on the first device information, the first user identification information and the first authorization code. Checking, after it is determined that the check is passed, sending a first check success instruction to the master control device to indicate that the master control device and the controlled device are authorized to connect successfully. In the above process, the first device information, the first user identification information and the first authorization code included in the first authorized connection request are checked to determine whether the first authorized connection request of the master device is passed, avoiding the prior art Inquiry in the white list to determine whether the master device is an authorized trusted device operation, that is, there is no need to store the authorized master device in the white list, reducing resource occupation, and the authorized connection is verified by decrypting the authorization code. The method of verification improves the security.

图4A为本公开实施例提供的另一种智能设备的授权方法的流程示意图。图4B为本公开实施例提供的另一种智能设备的授权方法的交互示意图,可选的,本实施例应用于被控设备侧,如图4A所示,在执行接收主控设备发送的第一授权连接请求之前,还包括如下步骤:FIG. 4A is a schematic flowchart of another method for authorization of a smart device provided by an embodiment of the present disclosure. FIG. 4B is an interactive schematic diagram of another smart device authorization method provided by an embodiment of the present disclosure. Optionally, this embodiment is applied to the controlled device side. As shown in FIG. Before authorizing the connection request, the following steps are also included:

S410,接收主控设备发送的第一连接请求。S410. Receive a first connection request sent by the master control device.

其中,第一连接请求包括第二设备信息、第二用户标识信息以及用户密码。需要说明的是,当主控设备第一次连接被控设备,获取对被控设备的授权权限之前,还需基于MQTT协议进行连接,并在连接成功之后,进一步经过S430-S440的显性授权,以得到第一授权码,以此使得主控设备在下一次连接被控设备时,能够直接基于授权码、设备信息、用户标识信息进行授权连接。Wherein, the first connection request includes the second device information, the second user identification information and the user password. It should be noted that when the master device connects to the controlled device for the first time, before obtaining the authorization authority for the controlled device, it needs to connect based on the MQTT protocol, and after the connection is successful, further go through the explicit authorization of S430-S440 , to obtain the first authorization code, so that when the master device connects to the controlled device next time, it can directly perform authorized connection based on the authorization code, device information, and user identification information.

具体的,在主控设备向被控设备发送第一授权连接请求之前,主控设备采用MQTT协议向被控设备发送包含第二设备信息、第二用户标识信息以及用户密码的第一连接请求。Specifically, before the controlling device sends the first authorized connection request to the controlled device, the controlling device uses the MQTT protocol to send the first connection request including the second device information, the second user identification information and the user password to the controlled device.

S420,根据第二用户标识信息以及用户密码进行校验,在确定校验通过之后,发送第二检验成功指令至主控设备。S420. Perform verification according to the second user identification information and the user password, and send a second verification success instruction to the main control device after it is determined that the verification is passed.

其中,第二检验成功指令指示主控设备与被控设备连接成功,并发送第一授权请求至被控设备。Wherein, the second verification success instruction indicates that the master device is successfully connected with the controlled device, and sends the first authorization request to the controlled device.

具体的,被控设备接收到主控设备发送的包括第二设备信息、第二用户标识信息以及用户密码的第一连接请求之后,根据第二用户标识信息以及用户密码进行校验,当确定第二用户标识信息以及用户密码正确时,说明此时校验通过,被控设备向主控设备发送第二检验成功指令,以指示主控设备与被控设备连接成功。此时,主控设备在接收到被控设备发送的第二检验成功指令之后,确定主控设备与被控设备连接成功,并发送第一授权请求给被控设备,以此进行对被控设备的显性授权过程。Specifically, after the controlled device receives the first connection request including the second device information, the second user identification information, and the user password sent by the master device, it performs verification according to the second user identification information and the user password. 2. When the user identification information and the user password are correct, it means that the verification is passed at this time, and the controlled device sends a second verification success instruction to the master device to indicate that the master device and the controlled device are successfully connected. At this time, after receiving the second verification success instruction sent by the controlled device, the master control device determines that the connection between the master control device and the controlled device is successful, and sends the first authorization request to the controlled device, so as to complete the verification of the controlled device. explicit authorization process.

S430,响应于主控设备发送的第一授权请求,根据第二设备信息、第一有效授权时长进行授权,在确定授权成功时,发送第一授权成功指令至主控设备。S430. In response to the first authorization request sent by the main control device, perform authorization according to the second device information and the first valid authorization duration, and when it is determined that the authorization is successful, send a first authorization success instruction to the main control device.

其中,第一授权成功指令指示主控设备与被控设备授权成功,并发送授权码获取指令至被控设备。Wherein, the first authorization success instruction indicates that the master device and the controlled device are authorized successfully, and sends an authorization code acquisition instruction to the controlled device.

具体的,主控设备在接收到被控设备发送的第二检验成功指令之后,确定与被控设备连接成功,主控设备向被控设备发送第一授权请求,被控设备接收主控设备发送的第一授权请求,并响应于该第一授权请求,根据第二设备信息、第一有效授权时长进行显性授权,且当在确定授权成功之后,被控设备向主控设备发送第一授权成功指令,此时,主控设备在接收到被控设备发送的第一授权成功指令,确定主控设备控制被控设备被成功授权,此时主控设备向被控设备发送授权码获取指令。Specifically, after receiving the second verification success instruction sent by the controlled device, the master device determines that the connection with the controlled device is successful, the master device sends the first authorization request to the controlled device, and the controlled device receives the authorization request sent by the master device. The first authorization request, and in response to the first authorization request, perform explicit authorization according to the second device information and the first valid authorization duration, and after determining that the authorization is successful, the controlled device sends the first authorization to the master device Success instruction. At this time, the master control device receives the first authorization success instruction sent by the controlled device and determines that the master control device is successfully authorized to control the controlled device. At this time, the master control device sends an authorization code acquisition instruction to the controlled device.

S440,响应于主控设备发送的授权码获取指令,基于第二设备信息和第一有效授权时长,生成第一授权码并发送至主控设备。S440, in response to the authorization code acquisition instruction sent by the main control device, generate a first authorization code based on the second device information and the first valid authorization duration, and send it to the main control device.

具体的,被控设备接收主控设备发送的授权码获取指令,并响应于该授权码获取指令,根据第二设备信息和第一有效授权时长,利用加密算法生成第一授权码,并将该第一授权码发送至主控设备。Specifically, the controlled device receives the authorization code acquisition instruction sent by the master device, and in response to the authorization code acquisition instruction, generates a first authorization code using an encryption algorithm according to the second device information and the first valid authorization duration, and sends the authorization code to the The first authorization code is sent to the master control device.

这样,本实施例中提供的智能设备的授权方法,在上述过程中,先基于MQTT协议进行主控设备与被控设备之间的连接,在连接成功之后,进一步对主控设备进行授权,并在授权成功后,获取第一授权码,以此使得后续用户能够直接基于第一授权码进行授权连接,保证MQTT连接的安全性,避免了在白名单中进行查询,确定主控设备是否被授权的信任设备的操作,即,无需将被授权的主控设备存储至白名单中,减少了资源占用,且通过解密授权码进行授权连接校验的方式,提高了安全性。In this way, in the authorization method for smart devices provided in this embodiment, in the above process, the connection between the master device and the controlled device is first performed based on the MQTT protocol, and after the connection is successful, the master device is further authorized, and After the authorization is successful, obtain the first authorization code, so that subsequent users can directly authorize the connection based on the first authorization code, ensure the security of the MQTT connection, avoid querying in the white list, and determine whether the master device is authorized The operation of the trusted device, that is, there is no need to store the authorized master device in the white list, which reduces resource occupation, and the method of verifying the authorized connection by decrypting the authorization code improves security.

图5A为本公开实施例提供的再一种智能设备的授权方法的流程示意图,图5B为本公开实施例提供的再一种智能设备的授权方法的交互示意图;图5A是在图4A的基础上,对基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至主控设备,以指示主控设备与被控设备授权连接成功的一种实现的方式可以是:Fig. 5A is a schematic flowchart of another smart device authorization method provided by an embodiment of the present disclosure, and Fig. 5B is an interactive schematic diagram of another smart device authorization method provided by an embodiment of the present disclosure; Fig. 5A is based on Fig. 4A On the basis of the first device information, the first user identification information and the first authorization code are verified, and after the verification is determined to pass, the first verification success instruction is sent to the master device to instruct the master device and the controlled device to authorize One way to achieve a successful connection can be:

S510,对第一授权码进行解密处理,得到第二设备信息和第一有效授权时长。S510. Decrypt the first authorization code to obtain the second device information and the first valid authorization duration.

上述第一授权码由于是进行加密的字符串或数字串,因此为了获取授权码中包含的信息,需要对授权码进行解密处理,以此得到授权码中包括的第二设备信息和第一有效授权时长。其中,第二设备信息是指向被控设备发送授权码获取指令的主控设备的设备信息,该设备信息例如可以是主控设备的标识信息,用来表征主控设备的唯一信息,例如可以是主控设备的名称、主控设备的序列号,但不限于此,本公开不具体限制,本领域技术人员可根据实际情况设置。Since the above-mentioned first authorization code is an encrypted character string or number string, in order to obtain the information contained in the authorization code, it is necessary to decrypt the authorization code to obtain the second device information and the first effective device information included in the authorization code. Authorization duration. Wherein, the second device information is the device information of the master device that sends the authorization code acquisition instruction to the controlled device. The device information can be, for example, the identification information of the master device, which is used to represent the unique information of the master device. For example, it can be The name of the main control device and the serial number of the main control device, but not limited thereto, this disclosure does not specifically limit, those skilled in the art can set according to the actual situation.

S520,根据被控设备生成第一授权码的第一时刻、被控设备解密第一授权码的第二时刻计算第一时长。S520. Calculate the first duration according to the first moment when the controlled device generates the first authorization code and the second moment when the controlled device decrypts the first authorization code.

其中,第一时刻是指主控设备在向被控设备发送授权码获取指令,被控设备接收到该授权码获取指令,并响应该授权码获取指令,生成第一授权码的时刻,该第一时刻可根据被控设备中的内置时钟确定,第二时刻是指在被控设备在接收到主控设备发送的第一授权连接请求,需要对该第一授权连接请求进行校验,即,需要通过解密第一授权码以获取第一授权码包含的信息,以此进一步进行校验的时刻。Among them, the first moment refers to the moment when the master device sends an authorization code acquisition instruction to the controlled device, and the controlled device receives the authorization code acquisition instruction and generates the first authorization code in response to the authorization code acquisition instruction. The first moment can be determined according to the built-in clock in the controlled device, and the second moment refers to when the controlled device receives the first authorized connection request sent by the master device, the first authorized connection request needs to be verified, that is, It is necessary to decrypt the first authorization code to obtain the information contained in the first authorization code, so as to further verify the moment.

具体的,对被控设备生成第一授权码的第一时刻与被控设备解密第一授权码的第二时刻进行计算,以得到第一时长。Specifically, a calculation is performed on the first time when the controlled device generates the first authorization code and the second time when the controlled device decrypts the first authorization code, so as to obtain the first duration.

示例性的,承接上述实施例,已知第一有效授权时长为10天,即240小时,若被控设备生成第一授权码的第一时刻为2022年1月1日上午10点,被控设备解密第一授权码的第二时刻2022年1月5日上午10点,则将第一时刻与第二时刻进行计算,得到第一时长为96小时,但不限于此,本公开不具体限制,本领域技术人员可根据实际情况进行计算。Exemplarily, following the above-mentioned embodiment, it is known that the first valid authorization period is 10 days, that is, 240 hours. The second time when the device decrypts the first authorization code is 10 am on January 5, 2022, then the first time and the second time are calculated, and the first time length is 96 hours, but it is not limited to this, and this disclosure does not specifically limit it , those skilled in the art can calculate according to the actual situation.

S530,若第一时长小于或等于第一有效授权时长,且第一设备信息和第二设备信息相一致、第一用户标识信息与第二用户标识信息相一致时,则校验通过,发送第一检验成功指令至主控设备。S530, if the first duration is less than or equal to the first valid authorization duration, and the first device information is consistent with the second device information, and the first user identification information is consistent with the second user identification information, the verification is passed, and the first A successful verification command is sent to the master control device.

具体的,将通过被控设备生成第一授权码的第一时刻、被控设备解密第一授权码的第二时刻计算得到的第一时长与第一有效授权时长进行比较,将第一设备信息和第二设备信息进行比较,将第一用户标识信息与第二用户标识信息进行比较,在确定在第一时长小于或等于第一有效授权时长,且同时满足第一设备信息和第二设备信息相一致、第一用户标识信息与第二用户标识信息相一致时,确定对第一授权连接请求检验通过,发送第一检验成功指令至主控设备,以指示主控设备与被控设备授权连接成功,此时,主控设备在接收到被控设备发送的第一检验成功指令之后,主控设备能够对被控设备进行控制操作。Specifically, compare the first duration calculated by the first moment when the controlled device generates the first authorization code and the second moment when the controlled device decrypts the first authorization code with the first effective authorization duration, and compare the first device information Compare with the second device information, compare the first user identification information with the second user identification information, and determine that the first time length is less than or equal to the first valid authorization time length, and satisfy both the first device information and the second device information When the first user identification information is consistent with the second user identification information, it is determined that the first authorized connection request is verified, and the first verification success instruction is sent to the master device to instruct the master device to authorize the connection with the controlled device Success, at this time, after the master control device receives the first verification success instruction sent by the controlled device, the master control device can perform control operations on the controlled device.

这样,本实施例提供的智能设备的授权方法,在上述过程中,对第一授权连接请求进行校验的过程中,避免了在白名单中进行查询,确定主控设备是否被授权的信任设备的操作,即,无需将被授权的主控设备存储至白名单中,减少了资源占用,且通过解密授权码进行授权连接校验的方式,提高了安全性。In this way, the smart device authorization method provided by this embodiment, in the process of verifying the first authorized connection request, avoids querying the white list to determine whether the master device is an authorized trusted device operation, that is, there is no need to store the authorized master device in the white list, which reduces resource occupation, and the method of verifying the authorized connection by decrypting the authorization code improves security.

可选的,在上述实施例的基础上,在本公开一些实施例中,所述方法还包括:Optionally, on the basis of the above embodiments, in some embodiments of the present disclosure, the method further includes:

步骤A,在第一时长大于第一有效授权时长时,发送第一验证失败指令至主控设备。Step A, when the first duration is longer than the first valid authorization duration, send a first verification failure instruction to the master control device.

具体的,被控设备在将第一时长与第一有效授权时长进行比较时,在确定第一时长大于第一有效授权时长时,认为此时主控设备对被控设备的授权控制已失效,则被控设备发送第一验证失败指令给主控设备,相应的,主控设备在接收到被控设备发送的第一验证失败指令之后,确定此时主控设备无法被控设备进行控制操作。Specifically, when the controlled device compares the first duration with the first valid authorization duration, and determines that the first duration is greater than the first valid authorization duration, it considers that the authorization control of the controlled device by the master device is invalid at this time, Then the controlled device sends the first verification failure instruction to the master control device. Correspondingly, after receiving the first verification failure instruction sent by the controlled device, the master control device determines that the master control device cannot perform control operations on the controlled device at this time.

步骤B,响应于主控设备发送的第一更新授权码指令,基于第二有效授权时长更新第一授权码,得到第二授权码,并将第二授权码发送至主控设备。Step B, in response to the first update authorization code instruction sent by the main control device, update the first authorization code based on the second valid authorization time length, obtain a second authorization code, and send the second authorization code to the main control device.

其中,第一更新授权码指令是指主控设备重新向被控设备发送重新授权,以获取授权码的指令。Wherein, the first update authorization code instruction refers to an instruction for the master control device to re-send re-authorization to the controlled device to obtain the authorization code.

具体的,主控设备在确定此时对被控设备的授权控制已失效,发送第一更新授权码指令给被控设备,被控设备接收并响应于该第一更新授权码指令,对主控设备根据第二有效授权时长重新进行显性授权,得到第二授权码,并在接收到被控设备发送的授权码获取指令时,将第二授权码发送给主控设备。Specifically, when the master control device determines that the authorization control of the controlled device is invalid at this time, it sends a first update authorization code instruction to the controlled device, and the controlled device receives and responds to the first update authorization code instruction, and updates the master control device. The device re-performs explicit authorization according to the second valid authorization time length, obtains the second authorization code, and sends the second authorization code to the master device when receiving the authorization code acquisition instruction sent by the controlled device.

可选的,对于上述基于第一更新授权码指令对主控设备重新进行授权获取第二授权码的过程参考上述实施例中的S410-S440,此处不在过多赘述。Optionally, for the above-mentioned process of re-authorizing the master device to obtain the second authorization code based on the first update authorization code instruction, refer to S410-S440 in the above embodiment, and details are not repeated here.

这样,本实施例提供的智能设备的授权方法,在上述过程中,当主控设备接收到被控设备发送的第一验证失败指令,确定授权码失效,即主控设备无法对被控设备进行控制时,需进一步的重新对主控设备进行授权,保证主控设备能够在后续使用中仍基于授权码实现对被控设备的授权连接,提升了用户的使用体验。In this way, in the authorization method for smart devices provided by this embodiment, in the above process, when the master device receives the first verification failure instruction sent by the controlled device, it determines that the authorization code is invalid, that is, the master device cannot perform authentication on the controlled device. When controlling, it is necessary to further re-authorize the master control device to ensure that the master control device can still realize the authorized connection to the controlled device based on the authorization code in subsequent use, which improves the user experience.

可选的,在上述实施例的基础上,在本公开一些实施例中,所述方法还包括:Optionally, on the basis of the above embodiments, in some embodiments of the present disclosure, the method further includes:

步骤C,响应于主控设备发送的第二更新授权码指令,基于第三有效授权时长更新第一授权码,得到第三授权码,并将第三授权码发送至主控设备。Step C, in response to the second update authorization code instruction sent by the main control device, update the first authorization code based on the third valid authorization period to obtain a third authorization code, and send the third authorization code to the main control device.

其中,第二更新授权码指令是在第一有效授权时长为永久有效时生成的,即,当确定主控设备对被控设备的有效授权时长为永久有效时,为了避免主控设备一旦被黑客攻击,使得黑客能够一直控制被控设备,主控设备发送第二更新授权码指令,使得被控设备删除对主控设备的永久有效的授权控制,基于第三有效授权时长重新对主控设备进行授权,以此解决上述问题。Wherein, the second update authorization code instruction is generated when the first valid authorization duration is permanently valid, that is, when it is determined that the valid authorization duration of the master device to the controlled device is permanently valid, in order to prevent the master device from being hacked once Attack, so that the hacker can always control the controlled device, the main control device sends the second update authorization code command, so that the controlled device deletes the permanent and effective authorization control of the main control device, and re-executes the main control device based on the third valid authorization period. Authorization, in order to solve the above problems.

具体的,主控设备在确定此时对被控设备的有效授权时长为永久有效,则向被控设备发送第二更新授权码指令,被控设备接收并响应于该第二更新授权码指令,对主控设备根据第三有效授权时长重新进行显性授权,得到第三授权码,并在接收到被控设备发送的授权码获取指令时,将第三授权码发送给主控设备。Specifically, when the master control device determines that the valid authorization period for the controlled device is permanently valid at this time, it sends a second update authorization code instruction to the controlled device, and the controlled device receives and responds to the second update authorization code instruction, Re-perform explicit authorization on the master control device according to the third effective authorization time length to obtain a third authorization code, and send the third authorization code to the master control device when receiving an authorization code acquisition instruction sent by the controlled device.

可选的,对于上述基于第二更新授权码指令对主控设备重新进行授权获取第三授权码的过程参考上述实施例中的S410-S440,此处不在过多赘述。Optionally, for the above-mentioned process of re-authorizing the master device to obtain the third authorization code based on the second update authorization code instruction, refer to S410-S440 in the above embodiment, and details are not repeated here.

这样,本实施例提供的智能设备的授权方法,在上述过程中,当主控设备确定对被控设备的有效授权时长为永久有效时,为了避免主控设备一旦被黑客攻击,使得黑客能够一直控制被控设备,主控设备发送第二更新授权码指令,进一步的,被控设备在接收第二更新授权码指令之后,重新对主控设备进行授权,提高安全性,且提升了用户的使用体验。In this way, in the authorization method for smart devices provided by this embodiment, in the above process, when the master control device determines that the valid authorization period for the controlled device is permanently valid, in order to prevent the master control device from being attacked by hackers, the hacker can always To control the controlled device, the master device sends a second update authorization code command. Further, after receiving the second update authorization code command, the controlled device re-authorizes the master device to improve security and improve user experience. experience.

图6A为本公开实施例提供的又一种智能设备的授权方法的流程示意图。图6B为本公开实施例提供的又一种智能设备的授权方法的交互示意图,本实施例应用于主控设备侧。本实施例方法可由应用于智能设备的授权方法装置来执行,该装置可采用硬件/或软件的方式来实现,并可配置于电子设备中。如图6A所示,该方法具体包括如下步骤:FIG. 6A is a schematic flowchart of another method for authorization of a smart device provided by an embodiment of the present disclosure. FIG. 6B is an interactive schematic diagram of yet another authorization method for a smart device provided by an embodiment of the present disclosure, and this embodiment is applied to a main control device side. The method of this embodiment can be executed by an authorization method device applied to a smart device, and the device can be implemented in hardware/or software, and can be configured in an electronic device. As shown in Figure 6A, the method specifically includes the following steps:

S610,发送第一授权连接请求至被控设备。S610. Send a first authorized connection request to the controlled device.

其中,第一授权连接请求以使得被控设备基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至主控设备,其中,第一授权请求包括第一设备信息、第一用户标识信息以及第一授权码。Wherein, the first authorization connection request enables the controlled device to perform verification based on the first device information, the first user identification information, and the first authorization code, and after the verification is determined to pass, send the first verification success instruction to the master device, wherein , the first authorization request includes first device information, first user identification information, and a first authorization code.

S620,接收被控设备发送的第一检验成功指令。S620. Receive a first verification success instruction sent by the controlled device.

其中,第一检验成功指令以指示主控设备与被控设备授权连接成功。Wherein, the first verification success instruction indicates that the authorized connection between the controlling device and the controlled device is successful.

本实施例中从主控设备执行上述S610-S620,具体实现过程参考S310-S320,此处不在过多赘述。In this embodiment, the slave master device executes the above S610-S620, and reference is made to S310-S320 for the specific implementation process, which will not be repeated here.

本实施例中提供的智能设备的授权方法,首先通过主控设备向被控设备发送第一授权连接请求,被控设备接收主控设备发送的第一授权连接请求,其中,第一授权连接请求包括第一设备信息、第一用户标识信息以及第一授权码,第一授权码是由被控设备在接收到主控设备发送的授权码获取指令之后,根据第二设备信息和第一有效授权时长生成并发送给主控设备的,第一有效授权时长为主控设备控制被控设备的有效权限时长,主被控设备基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至主控设备,以指示主控设备与被控设备授权连接成功。在上述过程中,通过第一授权连接请求包括的第一设备信息、第一用户标识信息以及第一授权码进行校验,确定主控设备的第一授权连接请求是否通过,避免了现有技术中在白名单中查询,确定主控设备是否被授权的信任设备的操作,即,无需将被授权的主控设备存储至白名单中,减少了资源占用,且通过解密授权码进行授权连接校验的方式,提高了安全性。In the authorization method for smart devices provided in this embodiment, first, the master device sends a first authorized connection request to the controlled device, and the controlled device receives the first authorized connection request sent by the master device, wherein the first authorized connection request Including the first device information, the first user identification information and the first authorization code, the first authorization code is obtained by the controlled device according to the second device information and the first effective authorization after receiving the authorization code acquisition instruction sent by the master device If the duration is generated and sent to the master control device, the first effective authorization duration is the effective authorization duration for the master control device to control the controlled device, and the master and controlled device performs verification based on the first device information, the first user identification information and the first authorization code After it is determined that the verification is passed, a first verification success instruction is sent to the master device to indicate that the master device and the controlled device are authorized to connect successfully. In the above process, the first device information, the first user identification information and the first authorization code included in the first authorized connection request are checked to determine whether the first authorized connection request of the master device is passed, avoiding the prior art Inquiry in the white list to determine whether the master device is an authorized trusted device operation, that is, there is no need to store the authorized master device in the white list, reducing resource occupation, and the authorized connection is verified by decrypting the authorization code. The method of verification improves the security.

图7为本公开实施例提供的又一种智能设备的授权方法的流程示意图。图7是在图6A的基础上,在执行发送第一授权连接请求至被控设备之前的具体过程进行说明。如图7所示,该方法具体包括如下步骤:Fig. 7 is a schematic flowchart of another method for authorization of a smart device provided by an embodiment of the present disclosure. FIG. 7 is based on FIG. 6A and illustrates the specific process before sending the first authorized connection request to the controlled device. As shown in Figure 7, the method specifically includes the following steps:

S710,发送第一连接请求至被控设备。S710. Send a first connection request to the controlled device.

其中,第一连接请求以使得被控设备基于第二用户标识信息以及用户密码进行校验,在确定校验通过之后,发送第二检验成功指令至主控设备,第二检验成功指令以指示主控设备与被控设备连接成功,并发送第一授权请求至被控设备,第一连接请求至少包括第二设备信息、第二用户标识信息以及用户密码。Wherein, the first connection request enables the controlled device to perform verification based on the second user identification information and user password, and sends the second verification success instruction to the master control device after the verification is determined to be successful, and the second verification success instruction is to instruct the master The controlled device is successfully connected with the controlled device, and sends a first authorization request to the controlled device, where the first connection request includes at least the second device information, the second user identification information, and the user password.

S720,响应于被控设备发送的第二检验成功指令,以确定主控设备与被控设备连接成功,并发送第一授权请求至被控设备。S720. In response to the second verification success instruction sent by the controlled device, determine that the connection between the master device and the controlled device is successful, and send a first authorization request to the controlled device.

S730,响应于被控设备发送的第一授权成功指令,以确定主控设备与被控设备授权成功,并发送授权码获取指令至被控设备。S730. In response to the first authorization success instruction sent by the controlled device, determine that the master device and the controlled device are authorized successfully, and send an authorization code acquisition instruction to the controlled device.

其中,授权码获取指令用来指示被控设备基于第二设备信息和第一有效授权时长,生成第一授权码并发送至主控设备。Wherein, the authorization code acquisition instruction is used to instruct the controlled device to generate a first authorization code based on the second device information and the first valid authorization duration and send it to the master device.

S740,接收被控设备发送的第一授权码。S740. Receive a first authorization code sent by the controlled device.

本实施例中从主控设备执行上述S710-S740,具体实现过程参考S410-S440,此处不在过多赘述。In this embodiment, the slave master device executes the above S710-S740, and reference is made to S410-S440 for the specific implementation process, which will not be repeated here.

本实施例中提供的智能设备的授权方法,在上述过程中,先基于MQTT协议进行主控设备与被控设备之间的连接,在连接成功之后,进一步对主控设备进行授权,并在授权成功后,获取第一授权码,以此使得后续用户能够直接基于第一授权码进行授权连接,保证MQTT连接的安全性,避免了在白名单中进行查询,确定主控设备是否被授权的信任设备的操作,即,无需将被授权的主控设备存储至白名单中,减少了资源占用,且通过解密授权码的方式,进一步提高了安全性。In the authorization method of the smart device provided in this embodiment, in the above process, the connection between the master device and the controlled device is first based on the MQTT protocol. After the connection is successful, the master device is further authorized, and the authorized After success, obtain the first authorization code, so that subsequent users can directly authorize the connection based on the first authorization code, ensuring the security of the MQTT connection, avoiding the need to query in the whitelist and determine whether the master device is authorized. The operation of the device, that is, there is no need to store the authorized master device in the white list, which reduces resource occupation, and further improves security by decrypting the authorization code.

可选的,在上述实施例的基础上,在本公开一些实施例中,所述方法还包括:Optionally, on the basis of the above embodiments, in some embodiments of the present disclosure, the method further includes:

步骤D,响应于被控设备发送的第一验证失败指令,以指示第一时长大于第一有效授权时长,并发送第一更新授权码指令至被控设备,以指示被控设备基于第二有效授权时长更新第一授权码,得到第二授权码,并将第二授权码发送至主控设备。Step D, in response to the first authentication failure instruction sent by the controlled device, to indicate that the first duration is longer than the first valid authorization duration, and send the first update authorization code instruction to the controlled device, to instruct the controlled device to The authorization duration updates the first authorization code, obtains the second authorization code, and sends the second authorization code to the master control device.

步骤E,接收被控设备发送的第二授权码。Step E, receiving the second authorization code sent by the controlled device.

本实施例中从主控设备执行上述步骤D-步骤E,具体实现过程参考步骤A-步骤B,此处不在过多赘述。In this embodiment, the slave master device executes the above step D-step E. For the specific implementation process, refer to step A-step B, which will not be repeated here.

这样,本实施例提供的智能设备的授权方法,在上述过程中,当主控设备接收到被控设备发送的第一验证失败指令,确定授权码失效,即主控设备无法对被控设备进行控制时,需进一步的重新对主控设备进行授权,保证主控设备能够在后续使用中仍基于授权码实现对被控设备的授权连接,提升了用户的使用体验。In this way, in the authorization method for smart devices provided by this embodiment, in the above process, when the master device receives the first verification failure instruction sent by the controlled device, it determines that the authorization code is invalid, that is, the master device cannot perform authentication on the controlled device. When controlling, it is necessary to further re-authorize the master control device to ensure that the master control device can still realize the authorized connection to the controlled device based on the authorization code in subsequent use, which improves the user experience.

可选的,在上述实施例的基础上,在本公开一些实施例中,所述方法还包括:Optionally, on the basis of the above embodiments, in some embodiments of the present disclosure, the method further includes:

步骤F,在确定第一有效授权时长为永久有效时,发送第二更新授权码指令至被控设备,以指示被控设备基于第三有效授权时长更新第一授权码,得到第三授权码,并将第三授权码发送至主控设备。Step F, when it is determined that the first valid authorization duration is permanently valid, send a second update authorization code instruction to the controlled device to instruct the controlled device to update the first authorization code based on the third valid authorization duration to obtain a third authorization code, And send the third authorization code to the master control device.

步骤G,接收被控设备发送的第三授权码。Step G, receiving the third authorization code sent by the controlled device.

本实施例中从主控设备执行上述步骤F-步骤G,具体实现过程参考步骤C,此处不在过多赘述。In this embodiment, the slave master device executes the above step F-step G. For the specific implementation process, refer to step C, which will not be repeated here.

这样,本实施例提供的智能设备的授权方法,在上述过程中,当主控设备确定对被控设备的有效授权时长为永久有效时,为了避免主控设备一旦被黑客攻击,使得黑客能够一直控制被控设备,主控设备发送第二更新授权码指令,进一步的,被控设备在接收第二更新授权码指令之后,重新对主控设备进行授权,提高安全性,且提升了用户的使用体验。In this way, in the authorization method for smart devices provided by this embodiment, in the above process, when the master control device determines that the valid authorization period for the controlled device is permanently valid, in order to prevent the master control device from being attacked by hackers, the hacker can always To control the controlled device, the master device sends a second update authorization code command. Further, after receiving the second update authorization code command, the controlled device re-authorizes the master device to improve security and improve user experience. experience.

图8为本公开实施例提供的一种智能设备的授权方法装置的结构示意图。应用于被控设备,该装置配置于电子设备中,可实现本申请任意实施例所述的应用于被控设备侧的智能设备的授权方法。该装置具体包括如下:FIG. 8 is a schematic structural diagram of an apparatus for an authorization method for a smart device provided by an embodiment of the present disclosure. Applied to a controlled device, the device is configured in an electronic device, and can implement the authorization method applied to a smart device on the controlled device side described in any embodiment of the present application. The device specifically includes the following:

第一授权连接请求接收模块11,用于接收主控设备发送的第一授权连接请求,其中,所述第一授权连接请求包括第一设备信息、第一用户标识信息以及第一授权码,所述第一授权码是由所述被控设备在接收到所述主控设备发送的授权码获取指令之后,根据第二设备信息和第一有效授权时长生成并发送给所述主控设备的,所述第一有效授权时长为所述主控设备控制所述被控设备的有效权限时长;The first authorized connection request receiving module 11 is configured to receive the first authorized connection request sent by the master device, wherein the first authorized connection request includes first device information, first user identification information, and a first authorization code, so The first authorization code is generated by the controlled device according to the second device information and the first valid authorization duration after receiving the authorization code acquisition instruction sent by the master device, and sent to the master device, The first effective authorization duration is the effective authorization duration for the controlling device to control the controlled device;

校验模块12,用于基于所述第一设备信息、所述第一用户标识信息以及所述第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至所述主控设备,以指示所述主控设备与所述被控设备授权连接成功。The verification module 12 is configured to perform a verification based on the first device information, the first user identification information, and the first authorization code, and send a first verification success instruction to the master after it is determined that the verification is passed. device, to indicate that the authorized connection between the controlling device and the controlled device is successful.

作为本公开实施例一种可选的实施方式,所述装置还包括:第一连接请求接收模块,用于接收所述主控设备发送的第一连接请求,其中,所述第一连接请求包括所述第二设备信息、第二用户标识信息以及用户密码;As an optional implementation manner of this embodiment of the present disclosure, the apparatus further includes: a first connection request receiving module, configured to receive a first connection request sent by the master device, where the first connection request includes The second device information, second user identification information and user password;

校验模块12,还用于根据所述第二用户标识信息以及所述用户密码进行校验,在确定校验通过之后,发送第二检验成功指令至所述主控设备,以指示所述主控设备与所述被控设备连接成功,并发送第一授权请求至所述被控设备;The verification module 12 is further configured to perform verification according to the second user identification information and the user password, and send a second verification success instruction to the master control device after it is determined that the verification is passed, to instruct the master The controlled device is successfully connected with the controlled device, and sends a first authorization request to the controlled device;

授权模块,用于响应于所述主控设备发送的所述第一授权请求,在根据所述第二设备信息、所述第一有效授权时长进行授权,在确定授权成功时,发送第一授权成功指令至所述主控设备,以指示所述主控设备与所述被控设备授权成功,并发送所述授权码获取指令至所述被控设备;An authorization module, configured to respond to the first authorization request sent by the master device, perform authorization according to the second device information and the first valid authorization duration, and send the first authorization when it is determined that the authorization is successful Sending a success instruction to the master device to indicate that the master device and the controlled device are successfully authorized, and sending the authorization code acquisition instruction to the controlled device;

第一授权码生成模块,用于响应于所述主控设备发送的所述授权码获取指令,基于所述第二设备信息和所述第一有效授权时长,生成所述第一授权码并发送至所述主控设备。A first authorization code generating module, configured to generate and send the first authorization code based on the second device information and the first valid authorization duration in response to the authorization code acquisition instruction sent by the master control device to the master device.

作为本公开实施例一种可选的实施方式,校验模块12,具体用于对所述第一授权码进行解密处理,得到所述第二设备信息和所述第一有效授权时长;As an optional implementation of the embodiment of the present disclosure, the verification module 12 is specifically configured to decrypt the first authorization code to obtain the second device information and the first valid authorization duration;

根据所述被控设备生成所述第一授权码的第一时刻、所述被控设备解密所述第一授权码的第二时刻计算第一时长;calculating the first duration according to the first moment when the controlled device generates the first authorization code and the second moment when the controlled device decrypts the first authorization code;

若所述第一时长小于或等于所述第一有效授权时长,且所述第一设备信息和所述第二设备信息相一致、所述第一用户标识信息与第二用户标识信息相一致时,则校验通过,发送第一检验成功指令至所述主控设备。If the first duration is less than or equal to the first valid authorization duration, and the first device information is consistent with the second device information, and the first user identification information is consistent with the second user identification information , then the verification is passed, and a first verification success instruction is sent to the main control device.

作为本公开实施例一种可选的实施方式,所述装置还包括:As an optional implementation manner of the embodiment of the present disclosure, the device further includes:

第一更新模块,用于在所述第一时长大于所述第一有效授权时长时,发送第一验证失败指令至所述主控设备;A first update module, configured to send a first verification failure instruction to the main control device when the first time period is greater than the first valid authorization time period;

响应于所述主控设备发送的第一更新授权码指令,基于第二有效授权时长更新所述第一授权码,得到第二授权码,并将所述第二授权码发送至所述主控设备。In response to the first update authorization code instruction sent by the main control device, update the first authorization code based on the second valid authorization time length, obtain a second authorization code, and send the second authorization code to the main control device equipment.

作为本公开实施例一种可选的实施方式,第一更新模块,还用于响应于所述主控设备发送的第二更新授权码指令,基于第三有效授权时长更新所述第一授权码,得到第三授权码,并将所述第三授权码发送至所述主控设备,其中,第二更新授权码指令是在所述第一有效授权时长为永久有效时生成的。As an optional implementation manner of this embodiment of the present disclosure, the first update module is further configured to update the first authorization code based on the third valid authorization time length in response to the second update authorization code instruction sent by the master control device , obtain a third authorization code, and send the third authorization code to the master control device, wherein the second update authorization code instruction is generated when the first valid authorization period is permanently valid.

本公开实施例所提供的智能设备的授权方法装置可执行本公开任意实施例所提供的应用于被控设备侧的智能设备的授权方法,具备执行方法相应的功能模块和有益效果,为避免重复,这里不再赘述。The smart device authorization method device provided by the embodiment of the present disclosure can execute the authorization method applied to the controlled device side provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method, in order to avoid duplication , which will not be repeated here.

图9是本公开实施例提供的另一种智能设备的授权方法装置的结构示意图。应用于主控设备,该装置配置于电子设备中,可实现本申请任意实施例所述的应用于主控设备侧的智能设备的授权方法。该装置具体包括如下:Fig. 9 is a schematic structural diagram of an apparatus for another authorization method for a smart device provided by an embodiment of the present disclosure. Applied to a master control device, the device is configured in an electronic device, and can implement the authorization method applied to a smart device on the master control device side described in any embodiment of the present application. The device specifically includes the following:

第一授权连接请求发送模块21,用于发送第一授权连接请求至被控设备,以使得所述被控设备基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至所述主控设备,其中,所述第一授权请求包括第一设备信息、第一用户标识信息以及第一授权码;The first authorized connection request sending module 21 is configured to send the first authorized connection request to the controlled device, so that the controlled device performs a check based on the first device information, the first user identification information and the first authorization code, and determines that After the verification is passed, send a first verification success instruction to the master device, wherein the first authorization request includes first device information, first user identification information, and a first authorization code;

第一检验成功指令接收模块22,用于接收所述被控设备发送的所述第一检验成功指令,以指示所述主控设备与所述被控设备授权连接成功。The first verification success instruction receiving module 22 is configured to receive the first verification success instruction sent by the controlled device to indicate that the master control device and the controlled device are authorized to connect successfully.

作为本公开实施例一种可选的实施方式,所述装置还包括:As an optional implementation manner of the embodiment of the present disclosure, the device further includes:

第一连接请求发送模块,用于发送第一连接请求至所述被控设备,以使得所述被控设备基于第二用户标识信息以及用户密码进行校验,在确定校验通过之后,发送第二检验成功指令至所述主控设备,以指示所述主控设备与所述被控设备连接成功,并发送第一授权请求至所述被控设备,其中,所述第一连接请求至少包括第二设备信息、所述第二用户标识信息以及用户密码;A first connection request sending module, configured to send a first connection request to the controlled device, so that the controlled device performs verification based on the second user identification information and the user password, and sends the first connection request after the verification is determined to pass 2. A successful verification instruction is sent to the master device to indicate that the master device is successfully connected to the controlled device, and a first authorization request is sent to the controlled device, wherein the first connection request includes at least second device information, the second user identification information, and a user password;

第一授权请求发送模块,用于响应于所述被控设备发送的所述第二检验成功指令,以确定主控设备与被控设备连接成功,并发送第一授权请求至所述被控设备;A first authorization request sending module, configured to respond to the second verification success instruction sent by the controlled device to determine that the connection between the master device and the controlled device is successful, and send a first authorization request to the controlled device ;

授权码获取指令发送模块,用于响应于所述被控设备发送的第一授权成功指令,以确定所述主控设备与所述被控设备授权成功,并发送授权码获取指令至所述被控设备,以指示所述被控设备基于所述第二设备信息和第一有效授权时长,生成第一授权码并发送至所述主控设备;An authorization code acquisition instruction sending module, configured to respond to the first authorization success instruction sent by the controlled device to determine that the master device and the controlled device are authorized successfully, and send an authorization code acquisition instruction to the controlled device. The controlling device, to instruct the controlled device to generate a first authorization code based on the second device information and the first valid authorization duration and send it to the controlling device;

授权码接收模块,用于接收所述被控设备发送的所述第一授权码。An authorization code receiving module, configured to receive the first authorization code sent by the controlled device.

作为本公开实施例一种可选的实施方式,所述装置还包括:As an optional implementation manner of the embodiment of the present disclosure, the device further includes:

第二更新模块,用于响应于所述被控设备发送的第一验证失败指令,以指示第一时长大于第一有效授权时长,并发送第一更新授权码指令至所述被控设备,以指示所述被控设备基于第二有效授权时长更新所述第一授权码,得到第二授权码,并将所述第二授权码发送至所述主控设备;The second update module is configured to respond to the first verification failure instruction sent by the controlled device to indicate that the first duration is longer than the first valid authorization duration, and send a first update authorization code instruction to the controlled device to Instructing the controlled device to update the first authorization code based on the second valid authorization duration, obtain a second authorization code, and send the second authorization code to the master device;

授权码接收模块,还用于接收所述被控设备发送的所述第二授权码。The authorization code receiving module is further configured to receive the second authorization code sent by the controlled device.

作为本公开实施例一种可选的实施方式,第二更新模块,还用于在确定第一有效授权时长为永久有效时,发送第二更新授权码指令至所述被控设备,以指示所述被控设备基于第三有效授权时长更新所述第一授权码,得到第三授权码,并将所述第三授权码发送至所述主控设备;As an optional implementation of this embodiment of the present disclosure, the second update module is further configured to send a second update authorization code instruction to the controlled device when it is determined that the first valid authorization period is permanently valid, so as to indicate that the The controlled device updates the first authorization code based on the third valid authorization time length, obtains a third authorization code, and sends the third authorization code to the master control device;

授权码接收模块,还用于接收所述被控设备发送的所述第三授权码。The authorization code receiving module is further configured to receive the third authorization code sent by the controlled device.

本公开实施例所提供的智能设备的授权方法装置可执行本公开任意实施例所提供的智能设备的授权方法,具备执行方法相应的功能模块和有益效果,为避免重复,这里不再赘述。The smart device authorization method device provided in the embodiments of the present disclosure can execute the smart device authorization method provided in any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the method. To avoid repetition, details are not repeated here.

本公开实施例提供一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本公开实施例中的任一种所述的智能设备的授权方法。An embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, The one or more processors are made to implement any one of the smart device authorization methods in the embodiments of the present disclosure.

图10是本公开实施例提供的一种电子设备的结构示意图。如图10所示,该电子设备包括处理器1010和存储装置1020;电子设备中处理器1010的数量可以是一个或多个,图10中以一个处理器1010为例;电子设备中的处理器1010和存储装置1020可以通过总线或其他方式连接,图10中以通过总线连接为例。Fig. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. As shown in Figure 10, the electronic device includes a processor 1010 and a storage device 1020; the number of processors 1010 in the electronic device can be one or more, and one processor 1010 is taken as an example in Figure 10; the processor in the electronic device 1010 and the storage device 1020 may be connected through a bus or in other ways, and connection through a bus is taken as an example in FIG. 10 .

存储装置1020作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本公开实施例中的智能设备的授权方法对应的程序指令/模块。处理器1010通过运行存储在存储装置1020中的软件程序、指令以及模块,从而执行电子设备的各种功能应用以及数据处理,即实现本公开实施例所提供的智能设备的授权方法。The storage device 1020, as a computer-readable storage medium, can be used to store software programs, computer-executable programs and modules, such as program instructions/modules corresponding to the smart device authorization method in the embodiments of the present disclosure. The processor 1010 executes various functional applications and data processing of the electronic device by running software programs, instructions and modules stored in the storage device 1020 , that is, realizes the authorization method of the smart device provided by the embodiments of the present disclosure.

存储装置1020可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储装置1020可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储装置1020可进一步包括相对于处理器1010远程设置的存储器,这些远程存储器可以通过网络连接至电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The storage device 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, and the like. In addition, the storage device 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices. In some examples, the storage device 1020 may further include memories that are remotely located relative to the processor 1010, and these remote memories may be connected to electronic devices through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

本实施例提供的一种电子设备可用于执行上述任意实施例提供的智能设备的授权方法,具备相应的功能和有益效果。An electronic device provided in this embodiment can be used to execute the authorization method for a smart device provided in any of the above embodiments, and has corresponding functions and beneficial effects.

本公开实施例提供一种计算机可读存储介质,该计算机可读存储介质上存储计算机程序,该计算机程序被处理器执行时实现上述智能设备的授权方法执行的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes performed by the authorization method of the above-mentioned smart device are implemented, and the same technology can be achieved. Effect, in order to avoid repetition, will not repeat them here.

其中,该计算机可读存储介质可以为只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the computer-readable storage medium may be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

为了方便解释,已经结合具体的实施方式进行了上述说明。但是,上述在一些实施例中讨论不是意图穷尽或者将实施方式限定到上述公开的具体形式。根据上述的教导,可以得到多种修改和变形。上述实施方式的选择和描述是为了更好的解释原理以及实际的应用,从而使得本领域技术人员更好的使用实施方式以及适于具体使用考虑的各种不同的变形的实施方式。For convenience of explanation, the above description has been made in conjunction with specific implementation manners. However, the above discussion of some embodiments is not intended to be exhaustive or to limit implementations to the specific forms disclosed above. Many modifications and variations are possible in light of the above teachings. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various modified embodiments suitable for specific use considerations.

Claims (10)

1.一种智能设备的授权方法,其特征在于,应用于被控设备,包括:1. An authorization method for a smart device, characterized in that it is applied to a controlled device, including: 接收主控设备发送的第一授权连接请求,其中,所述第一授权连接请求包括第一设备信息、第一用户标识信息以及第一授权码,所述第一授权码是由所述被控设备在接收到所述主控设备发送的授权码获取指令之后,根据第二设备信息和第一有效授权时长生成并发送给所述主控设备的,所述第一有效授权时长为所述主控设备控制所述被控设备的有效权限时长;Receive a first authorized connection request sent by the master device, where the first authorized connection request includes first device information, first user identification information, and a first authorization code, and the first authorization code is issued by the controlled After receiving the authorization code acquisition instruction sent by the master device, the device generates and sends it to the master device according to the information of the second device and the first valid authorization duration, the first valid authorization duration being the The period of effective authority for the controlled device to control the controlled device; 基于所述第一设备信息、所述第一用户标识信息以及所述第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至所述主控设备,以指示所述主控设备与所述被控设备授权连接成功。Perform a check based on the first device information, the first user identification information, and the first authorization code, and after the check is determined to pass, send a first check success instruction to the master device to instruct the master The authorized connection between the controlled device and the controlled device is successful. 2.根据权利要求1所述的智能设备的授权方法,其特征在于,所述方法还包括:2. The authorization method for smart devices according to claim 1, wherein the method further comprises: 接收所述主控设备发送的第一连接请求,其中,所述第一连接请求包括所述第二设备信息、第二用户标识信息以及用户密码;Receive a first connection request sent by the master device, where the first connection request includes the second device information, second user identification information, and user password; 根据所述第二用户标识信息以及所述用户密码进行校验,在确定校验通过之后,发送第二检验成功指令至所述主控设备,以指示所述主控设备与所述被控设备连接成功,并发送第一授权请求至所述被控设备;Perform verification according to the second user identification information and the user password, and send a second verification success instruction to the master device after confirming that the verification is passed, to instruct the master device and the controlled device The connection is successful, and a first authorization request is sent to the controlled device; 响应于所述主控设备发送的所述第一授权请求,在根据所述第二设备信息、所述第一有效授权时长进行授权,在确定授权成功时,发送第一授权成功指令至所述主控设备,以指示所述主控设备与所述被控设备授权成功,并发送所述授权码获取指令至所述被控设备;In response to the first authorization request sent by the main control device, authorize according to the second device information and the first valid authorization duration, and when it is determined that the authorization is successful, send a first authorization success instruction to the The controlling device is configured to indicate that the controlling device and the controlled device are successfully authorized, and send the authorization code acquisition instruction to the controlled device; 响应于所述主控设备发送的所述授权码获取指令,基于所述第二设备信息和所述第一有效授权时长,生成所述第一授权码并发送至所述主控设备。In response to the authorization code acquisition instruction sent by the master control device, based on the second device information and the first valid authorization duration, the first authorization code is generated and sent to the master control device. 3.根据权利要求1所述的智能设备的授权方法,其特征在于,所述基于所述第一设备信息、所述第一用户标识信息以及所述第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至所述主控设备,包括:3. The authorization method for smart devices according to claim 1, wherein the verification is performed based on the first device information, the first user identification information and the first authorization code, and the verification is determined After passing, send the first verification success instruction to the main control device, including: 对所述第一授权码进行解密处理,得到所述第二设备信息和所述第一有效授权时长;Decrypting the first authorization code to obtain the second device information and the first valid authorization duration; 根据所述被控设备生成所述第一授权码的第一时刻、所述被控设备解密所述第一授权码的第二时刻计算第一时长;calculating the first duration according to the first moment when the controlled device generates the first authorization code and the second moment when the controlled device decrypts the first authorization code; 若所述第一时长小于或等于所述第一有效授权时长,且所述第一设备信息和所述第二设备信息相一致、所述第一用户标识信息与第二用户标识信息相一致时,则校验通过,发送第一检验成功指令至所述主控设备。If the first duration is less than or equal to the first valid authorization duration, and the first device information is consistent with the second device information, and the first user identification information is consistent with the second user identification information , then the verification is passed, and a first verification success instruction is sent to the master control device. 4.根据权利要求3所述的智能设备的授权方法,其特征在于,所述方法还包括:4. The authorization method for smart devices according to claim 3, wherein the method further comprises: 在所述第一时长大于所述第一有效授权时长时,发送第一验证失败指令至所述主控设备;When the first duration is longer than the first valid authorization duration, sending a first verification failure instruction to the master device; 响应于所述主控设备发送的第一更新授权码指令,基于第二有效授权时长更新所述第一授权码,得到第二授权码,并将所述第二授权码发送至所述主控设备。In response to the first update authorization code instruction sent by the main control device, update the first authorization code based on the second valid authorization time length, obtain a second authorization code, and send the second authorization code to the main control device equipment. 5.根据权利要求1所述的智能设备的授权方法,其特征在于,所述方法还包括:5. The authorization method for smart devices according to claim 1, wherein the method further comprises: 响应于所述主控设备发送的第二更新授权码指令,基于第三有效授权时长更新所述第一授权码,得到第三授权码,并将所述第三授权码发送至所述主控设备,其中,第二更新授权码指令是在所述第一有效授权时长为永久有效时生成的。In response to the second update authorization code instruction sent by the main control device, update the first authorization code based on the third valid authorization time length, obtain a third authorization code, and send the third authorization code to the main control device The device, wherein the second update authorization code instruction is generated when the first valid authorization period is permanently valid. 6.一种智能设备的授权方法,其特征在于,应用于主控设备,包括:6. An authorization method for a smart device, characterized in that it is applied to a master control device, comprising: 发送第一授权连接请求至被控设备,以使得所述被控设备基于第一设备信息、第一用户标识信息以及第一授权码进行检验,在确定校验通过之后,发送第一检验成功指令至所述主控设备,其中,所述第一授权请求包括第一设备信息、第一用户标识信息以及第一授权码;Sending a first authorized connection request to the controlled device, so that the controlled device performs a check based on the first device information, the first user identification information, and the first authorization code, and after the check is determined to pass, send the first check success instruction To the master control device, wherein the first authorization request includes first device information, first user identification information, and a first authorization code; 接收所述被控设备发送的所述第一检验成功指令,以指示所述主控设备与所述被控设备授权连接成功。The first verification success instruction sent by the controlled device is received to indicate that the master control device and the controlled device are authorized to connect successfully. 7.根据权利要求6所述的智能设备的授权方法,其特征在于,所述方法还包括:7. The authorization method for smart devices according to claim 6, characterized in that the method further comprises: 发送第一连接请求至所述被控设备,以使得所述被控设备基于第二用户标识信息以及用户密码进行校验,在确定校验通过之后,发送第二检验成功指令至所述主控设备,以指示所述主控设备与所述被控设备连接成功,并发送第一授权请求至所述被控设备,其中,所述第一连接请求至少包括第二设备信息、所述第二用户标识信息以及用户密码;Sending a first connection request to the controlled device, so that the controlled device performs verification based on the second user identification information and user password, and after confirming that the verification is passed, sending a second verification success instruction to the master device, to indicate that the master device is successfully connected to the controlled device, and send a first authorization request to the controlled device, wherein the first connection request includes at least the second device information, the second User identification information and user passwords; 响应于所述被控设备发送的所述第二检验成功指令,以确定主控设备与被控设备连接成功,并发送第一授权请求至所述被控设备;In response to the second verification success instruction sent by the controlled device, it is determined that the connection between the master device and the controlled device is successful, and sending a first authorization request to the controlled device; 响应于所述被控设备发送的第一授权成功指令,以确定所述主控设备与所述被控设备授权成功,并发送授权码获取指令至所述被控设备,以指示所述被控设备基于所述第二设备信息和第一有效授权时长,生成第一授权码并发送至所述主控设备;In response to the first authorization success instruction sent by the controlled device, it is determined that the authorization between the master device and the controlled device is successful, and an authorization code acquisition instruction is sent to the controlled device to instruct the controlled device to The device generates a first authorization code based on the second device information and the first valid authorization duration and sends it to the master device; 接收所述被控设备发送的所述第一授权码。Receive the first authorization code sent by the controlled device. 8.根据权利要求7所述的智能设备的授权方法,其特征在于,所述方法还包括:8. The authorization method for smart devices according to claim 7, characterized in that the method further comprises: 响应于所述被控设备发送的第一验证失败指令,以指示第一时长大于第一有效授权时长,并发送第一更新授权码指令至所述被控设备,以指示所述被控设备基于第二有效授权时长更新所述第一授权码,得到第二授权码,并将所述第二授权码发送至所述主控设备;Responding to the first authentication failure instruction sent by the controlled device to indicate that the first duration is longer than the first valid authorization duration, and sending a first update authorization code instruction to the controlled device to indicate that the controlled device is based on updating the first authorization code with the second valid authorization duration to obtain a second authorization code, and sending the second authorization code to the main control device; 接收所述被控设备发送的所述第二授权码。Receive the second authorization code sent by the controlled device. 9.根据权利要求6所述的智能设备的授权方法,其特征在于,所述方法还包括:9. The authorization method for smart devices according to claim 6, wherein the method further comprises: 在确定第一有效授权时长为永久有效时,发送第二更新授权码指令至所述被控设备,以指示所述被控设备基于第三有效授权时长更新所述第一授权码,得到第三授权码,并将所述第三授权码发送至所述主控设备;When it is determined that the first valid authorization duration is permanently valid, send a second update authorization code instruction to the controlled device to instruct the controlled device to update the first authorization code based on the third valid authorization duration to obtain the third an authorization code, and send the third authorization code to the master control device; 接收所述被控设备发送的所述第三授权码。Receive the third authorization code sent by the controlled device. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-5任一项所述的方法或权利要求6-9任一项所述的方法。10. A computer-readable storage medium on which a computer program is stored, wherein when the program is executed by a processor, the method according to any one of claims 1-5 or any one of claims 6-9 is implemented method described in the item.
CN202211122586.XA 2022-09-15 2022-09-15 Authorization method of smart device and computer-readable storage medium Pending CN115643046A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211122586.XA CN115643046A (en) 2022-09-15 2022-09-15 Authorization method of smart device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211122586.XA CN115643046A (en) 2022-09-15 2022-09-15 Authorization method of smart device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN115643046A true CN115643046A (en) 2023-01-24

Family

ID=84942871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211122586.XA Pending CN115643046A (en) 2022-09-15 2022-09-15 Authorization method of smart device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN115643046A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170019396A1 (en) * 2009-02-03 2017-01-19 Inbay Technologies Inc. Method and system for establishing trusted communication using a security device
CN111836085A (en) * 2020-07-15 2020-10-27 北京奇艺世纪科技有限公司 Television screen projection method and device, cloud server and terminal equipment
CN113630656A (en) * 2021-08-05 2021-11-09 Vidaa美国公司 Display device, terminal device and communication connection method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170019396A1 (en) * 2009-02-03 2017-01-19 Inbay Technologies Inc. Method and system for establishing trusted communication using a security device
CN111836085A (en) * 2020-07-15 2020-10-27 北京奇艺世纪科技有限公司 Television screen projection method and device, cloud server and terminal equipment
CN113630656A (en) * 2021-08-05 2021-11-09 Vidaa美国公司 Display device, terminal device and communication connection method

Similar Documents

Publication Publication Date Title
US9813428B2 (en) Apparatus and method for securely managing the accessibility to content and applications
CN111542822B (en) Electronic device and method for sharing screen data
CN102695084B (en) Device affiliation process from second display
CN112380511B (en) Account control method, device, equipment and computer readable storage medium
CN110138749A (en) Data security protection method and related equipment
CN110115014B (en) Electronic device, control authority authentication method for electronic device, and user terminal device
JP2014526744A (en) Granting resource access
JP2023516973A (en) Browser login session via unextractable asymmetric key
CN112585981B (en) Method for content playback with continuity and electronic device thereof
WO2022143130A1 (en) Application program login method and system
EP3101904B1 (en) Distributed white list for security renewability
CN104813334A (en) Network terminal system, display device, terminal device, information processing method in display device, and program
CN115459903A (en) Access authentication method and device of equipment and electronic equipment
CN105791359A (en) IoT system and data interaction method
US20250130755A1 (en) Display device, and control method for display device
CN105391673A (en) Safe access method and device
CN115643046A (en) Authorization method of smart device and computer-readable storage medium
WO2024001257A1 (en) Display device and processing method for display device
JP2002369266A (en) Control apparatus and method, record medium, and program
JP5019213B2 (en) Information processing apparatus and authentication control method
CN113569220B (en) A CAM card automatic identification method, identification device and display device
CN112134855A (en) Cookie encryption method and display device
CN114465835A (en) Household appliance equipment, application terminal, Bluetooth network distribution method and system
CN117650903A (en) Controlled device, device authorization management method, and storage medium
CN113347501B (en) Video playing method and device

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