CN116938546A - Control method, device, equipment and medium of intelligent household Internet of things equipment - Google Patents

Control method, device, equipment and medium of intelligent household Internet of things equipment Download PDF

Info

Publication number
CN116938546A
CN116938546A CN202310854950.XA CN202310854950A CN116938546A CN 116938546 A CN116938546 A CN 116938546A CN 202310854950 A CN202310854950 A CN 202310854950A CN 116938546 A CN116938546 A CN 116938546A
Authority
CN
China
Prior art keywords
home
target
access token
tag
identifier
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
CN202310854950.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.)
Hangzhou Lifesmart Technology Co ltd
Original Assignee
Hangzhou Lifesmart 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 Hangzhou Lifesmart Technology Co ltd filed Critical Hangzhou Lifesmart Technology Co ltd
Priority to CN202310854950.XA priority Critical patent/CN116938546A/en
Publication of CN116938546A publication Critical patent/CN116938546A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • H04L12/282Controlling appliance services of a home automation network by calling their functionalities based on user interaction within the home
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Automation & Control Theory (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The application relates to the technical field of Internet of things and discloses a control method, a device, equipment and a medium of intelligent home Internet of things equipment, wherein the method comprises the steps of receiving an access token sent by the control equipment and verifying authority information in the access token; when the authority information passes the verification, acquiring target access token information associated with a target home tag; inquiring a target home equipment list corresponding to the target home tag from a preset intelligent home Internet of things equipment list according to the target access token information; the method comprises the steps that a preset intelligent home Internet of things equipment list comprises a plurality of home equipment lists corresponding to target user identifiers, wherein the target home equipment list is one of the plurality of home equipment lists; and sending the target home equipment list to the control equipment so that the control equipment controls the intelligent home Internet of things equipment in the target home equipment list based on the voice of the user. When one user identifier is associated with a plurality of families, only one or a plurality of intelligent home IOT devices in the families can be controlled.

Description

Control method, device, equipment and medium of intelligent household Internet of things equipment
Technical Field
The application relates to the technical field of Internet of things, in particular to a control method, a device, equipment and a medium of intelligent home Internet of things equipment.
Background
With the development of internet of things (Internet of Things, IOT) technology, more and more families will introduce intelligent home IOT devices to facilitate life. And with the development and perfection of intelligent voice services, more and more users can control intelligent home IOT devices in a home through control devices (e.g., intelligent speakers) with intelligent voice services.
For some control devices that require user identification authorization to control smart home IOT devices based on user voice, an authorization mechanism of the open authorization protocol (Open Authorization, OAuth 2) is mostly adopted to work. Specifically, when the intelligent application program verifies and passes the user identification and the password of the user based on the authorization request input by the user, an access token is sent to the control device. After receiving the access token, the control device invokes a discovery device (discovery device) interface of the intelligent application program, so that the intelligent application program returns an intelligent home IOT device list of a certain IOT manufacturer that can be accessed by the access token to the control device, and further controls the intelligent home IOT device of the IOT manufacturer based on user voice.
However, in the above scheme, most of the smart home IOT device list returned by the smart application program to the control device includes all the smart home IOT devices belonging to the IOT manufacturer under the user identifier corresponding to the access token, when the user identifier is associated with a plurality of families and at least two families have smart home IOT devices of the same IOT manufacturer, the control device cannot well distinguish the smart home IOT devices of different families under the same user identifier, and most of the smart home IOT devices in the plurality of families can be simultaneously controlled based on the user voice, so that the smart home IOT devices of different families cannot be controlled correctly under the same user identifier. Therefore, how to properly control the intelligent home IOT devices in each home when one user identifier associates multiple households has become an urgent problem to be solved.
Disclosure of Invention
In view of the above, the application provides a control method, a device, equipment and a medium for intelligent home internet of things equipment, so as to solve the problem of how to accurately control intelligent home IOT equipment in each home when a user identifier is associated with a plurality of households.
In a first aspect, the present application provides a control method for an intelligent home internet of things device, where the method is executed by an intelligent application program, and the method includes:
Receiving an access token sent by control equipment, and verifying authority information in the access token; the access token includes a target home tag; the target home tag is one of a plurality of home tags associated with the control equipment corresponding to the target user identifier;
when the authority information passes the verification, acquiring target access token information associated with a target home tag;
inquiring a target home equipment list corresponding to the target home tag from a preset intelligent home Internet of things equipment list according to the target access token information; the method comprises the steps that a preset intelligent home Internet of things equipment list comprises a plurality of home equipment lists corresponding to target user identifiers, wherein the target home equipment list is one of the plurality of home equipment lists;
and sending the target home equipment list to the control equipment so that the control equipment controls the intelligent home Internet of things equipment in the target home equipment list based on the voice of the user.
In the technical scheme, when the intelligent application program receives the access token sent by the control equipment, the authority information in the access token is verified a priori. And when the authority information passes the verification, acquiring target access token information associated with the target home tag in the access token. Because the target home tag is one of a plurality of home tags associated with the user identifier corresponding to the control device, the preset intelligent home Internet of things device list comprises a plurality of home device lists corresponding to the user identifier. Then, according to the target access token information associated with one target home tag person in the plurality of home tags associated with the user identification, a target home device list inquired from the preset intelligent home internet of things device list also corresponds to the target home tag only. When the target home device list is sent to the control device, the control device only receives the home device list corresponding to one home tag in the plurality of home tags associated with the user identifier. Rather than a list of all intelligent home internet of things devices to which the user identification is associated. The control device can control the intelligent home IOT device under the condition that only the target home label corresponds to the home based on the user voice, so that when one user identifier is associated with a plurality of households, the control device can accurately control one or a plurality of intelligent home IOT devices in the households.
In some optional embodiments, the target access token information includes a target home identifier, a target user identifier, and a target home tag, and according to the target access token information, querying a target home device list corresponding to the target home tag from a preset smart home internet of things device list includes:
acquiring a target user identifier in target access token information and a target family identifier corresponding to a target family tag;
inquiring a plurality of home equipment lists corresponding to the target user identification from a preset intelligent home Internet of things equipment list;
and querying a target home equipment list corresponding to the target home identification from a plurality of home equipment lists corresponding to the target user identification.
In the technical scheme, the mapping relation is added between the target home identifier and the target home identifier, so that when the target home device list corresponding to the target home identifier needs to be queried, the target home identifier corresponding to the target home identifier and the target user identifier are acquired from the target access token information, and then the multiple home device lists corresponding to the target user identifier are queried, thereby realizing the purpose of using the target home identifier as a transit to search the target device list corresponding to the target home identifier, avoiding the direct use of the target home identifier, and preventing the leakage of the home identifier of the user. And further, the control equipment can be prevented from controlling the intelligent home IOT equipment in the home by using the home identification of the user, so that the privacy of the user is protected.
In some alternative embodiments, when the rights information verification passes, obtaining the target access token information associated with the target home tag includes:
and querying access token information comprising the target home tag from at least one piece of prestored access token information, and determining the access token information comprising the target home tag as target access token information.
In the technical scheme, the target access token information comprising the target home tag is queried from at least one piece of prestored access token information, so that a target home device list corresponding to the target home tag is conveniently queried from a plurality of home device lists associated with the target user identifier based on the target access token information, and the purpose that the control device correctly controls the intelligent home IOT devices in each home is realized.
In some alternative embodiments, before receiving the access token sent by the control device and verifying the rights information in the access token, the method further comprises:
receiving an authorization request input by a user, and verifying a target user identification in the authorization request;
inquiring a target home identifier and control equipment associated with the target user identifier when the target user identifier passes verification;
When the target home identifier associated with the target user identifier is queried, generating an access token comprising a target home tag according to the target home identifier;
the access token including the target home tag is sent to the control device for subsequent invocation of the access token by the control device to communicate with the intelligent application.
In the technical scheme, when the target user identifier in the authorization request input by the user is verified, the target home identifier associated with the target user identifier and the control device are inquired. And when the target home identifier associated with the target user identifier is queried, generating an access token comprising the target home tag according to the target home identifier, and then sending the access token comprising the target home tag to the control equipment. The authorization process of the control device is improved, so that the access token returned to the control device can comprise the target home tag, and the situation that only the access token which does not comprise the target home tag is returned in the traditional authorization process of the control device is avoided. The access token is conveniently and subsequently called by the subsequent control equipment to communicate with the intelligent application program, so that the target home equipment list corresponding to the target home label is obtained based on the access token, and the purpose that the control equipment correctly controls the intelligent home IOT equipment in each home when one user identifier is associated with a plurality of households is achieved.
In some optional embodiments, when the target home identifier associated with the user identifier is queried, generating the access token including the target home tag according to the target home identifier includes:
inquiring access token information with a target home identifier from at least one piece of prestored access token information;
when first access token information with a target home identifier is queried, deleting an original access token in the first access token information to generate a first universal unique identifier;
and adding the target home tag in the first access token information into the first universal unique identification code to obtain an access token comprising the target home tag, and storing the access token comprising the target home tag into the first access token information.
In the above technical solution, when the first access token information with the target home identifier is queried, it means that the home indicated by the target home identifier has been recorded, and the control device is re-authorized, and the old and expired record is cleared, that is, the original access token in the first access token information is deleted. And further generating a first universal unique identification code and adding the target home tag in the first access token information to the second universal unique identification code to obtain the access token comprising the target home tag. And for the re-authorization of the control equipment, generating a new access token on the premise of not damaging the target home tag in the first access token information, and ensuring that the access token generated by re-authorization can still only control the intelligent home IOT equipment in the existing home of the user indicated by the target home identifier.
In some alternative embodiments, the method further comprises:
when the access token information with the target home identifier is not found, creating second access token information comprising the target home identifier;
generating a second universal unique identification code and a target home tag corresponding to the target home identifier;
and adding the target home tag into the second universal unique identification code to obtain an access token comprising the target home tag, and storing the access token comprising the target home tag and the target home tag into second access token information.
In the above technical solution, when access token information for storing the target home identifier is not found, which means that the home indicated by the target home identifier has not been recorded yet, a new authorization is given to the control device, and first, second access token information including the target home identifier is created. And further adding the target home tag corresponding to the newly generated target home identifier into the newly generated second universal unique identification code to obtain the access token comprising the target home tag. And storing the target home tag and the access token comprising the target home tag into the second access token information, so that the subsequent search of the access token information is facilitated, and the control equipment can accurately control the intelligent home IOT equipment in the home.
In some alternative embodiments, the authorization request includes control device attribute information and first timestamp information; when the target user identification passes the verification, inquiring the target home identification and the control equipment associated with the target user identification, wherein the method comprises the following steps:
inquiring the target home mark record with the control equipment attribute information and the target user identification from at least one pre-stored home mark record;
when the attribute information of the control equipment and the target home mark record of the target user identification are inquired, verifying whether the time difference between the second time stamp information and the first time stamp information recorded in the target home record is within a preset threshold range or not;
when the time difference between the second time stamp information and the first time stamp information is within a preset threshold value range, determining the home identifier recorded in the target home mark record as a target home identifier associated with the target user identifier;
and determining the control equipment associated with the target user identification according to the authorization request.
In the above technical solution, when the target user identifier passes the verification, and when the target home tag record with the control device attribute information and the target user identifier is queried from at least one prestored home tag record, whether the time difference between the second timestamp information and the first timestamp information recorded in the target home record is within a preset threshold value range is verified. When the time difference between the second time stamp information and the first time stamp information is within a preset threshold value range, the home identifier recorded in the target home mark record is determined to be a target home identifier associated with the user identifier, so that the control device indicated by the control device attribute information is determined to be a control device associated with the target user identifier. Determining whether the time difference between the second time stamp information and the first time stamp information is within a preset threshold value range or not can prevent the user from forgetting a previously set home mark record, so that the influence of the forgotten home mark on a subsequent access token is caused, further, the control behavior of the control device on the intelligent home IOT device based on the access token is influenced, and the conditions of inconsistent control on the intelligent home IOT device and user expectation are avoided.
In a second aspect, the present application provides a control device for an intelligent home internet of things device, where the device includes:
the receiving module is used for receiving the access token sent by the control equipment and verifying the authority information in the access token; the access token includes a target home tag; the target home tag is one of a plurality of home tags associated with the control equipment corresponding to the target user identifier;
the acquisition module is used for acquiring target access token information associated with the target home tag when the authority information verification passes;
the query module is used for querying a target home equipment list corresponding to the target home tag from a preset intelligent home Internet of things equipment list according to the target access token information; the method comprises the steps that a preset intelligent home Internet of things equipment list comprises a plurality of home equipment lists corresponding to target user identifiers, wherein the target home equipment list is one of the plurality of home equipment lists;
and the sending module is used for sending the target home equipment list to the control equipment so that the control equipment controls the intelligent home Internet of things equipment in the target home equipment list based on the voice of the user.
In a third aspect, the present application provides a computer device comprising: the intelligent household internet of things device comprises a memory and a processor, wherein the memory is in communication connection with the processor, computer instructions are stored in the memory, and the processor executes the computer instructions, so that the control method of the intelligent household internet of things device is executed.
In a fourth aspect, the present application provides a computer readable storage medium, where computer instructions are stored on the computer readable storage medium, where the computer instructions are configured to cause a computer to execute the control method of the intelligent home internet of things device.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a control system of an intelligent home internet of things device according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a control method of an intelligent home internet of things device according to an embodiment of the application;
fig. 3 is a flow chart of a control method of an intelligent home internet of things device according to an embodiment of the present application;
fig. 4 is a flow chart of a control method of an intelligent home internet of things device according to an embodiment of the present application;
Fig. 5 is a block diagram of a control device of an intelligent home internet of things device according to an embodiment of the present application;
fig. 6 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the "indication" mentioned in the embodiments of the present application may be a direct indication, an indirect indication, or an indication having an association relationship. For example, a indicates B, which may mean that a indicates B directly, e.g., B may be obtained by a; it may also indicate that a indicates B indirectly, e.g. a indicates C, B may be obtained by C; it may also be indicated that there is an association between a and B.
In the description of the embodiments of the present application, the term "corresponding" may indicate that there is a direct correspondence or an indirect correspondence between the two, or may indicate that there is an association between the two, or may indicate a relationship between the two and the indicated, configured, etc.
In the embodiment of the present application, the "predefining" may be implemented by pre-storing corresponding codes, tables or other manners that may be used to indicate relevant information in devices (including, for example, terminal devices and network devices), and the present application is not limited to the specific implementation manner thereof.
Fig. 1 is a schematic structural diagram of a control system of an intelligent home internet of things device according to an embodiment of the present application. The control system of the intelligent home internet of things device includes a processing device 110 for executing an intelligent application program, and a plurality of households (shown as households 1 to household n in the figure) belonging to the same user. Each family includes a control device 120 and at least one smart home IOT device 130, at least two families include smart home IOT devices belonging to the same IOT manufacturer (in the figure, smart home IOT devices belonging to the same IOT manufacturer are shown in gray oval shapes), and each family has a family tag corresponding to the smart home IOT device.
Specific number of control devices 120 embodiments of the present application are not particularly limited. The control device 120 may be any product that provides intelligent voice service and controls an intelligent home IOT device, and in the embodiment of the present application, the control device 120 is exemplified as an intelligent speaker. Control device 120 is used to control smart home IOT devices 130 in a particular home based on user speech.
The processing device 110 executes the intelligent application program to receive the access token sent by the control device 120, and verifies the authority information in the access token; the access token includes a target home tag; the target home tag is one of a plurality of home tags associated with the control equipment corresponding to the target user identifier; when the authority information passes the verification, acquiring target access token information associated with a target home tag; inquiring a target home equipment list corresponding to the target home tag from a preset intelligent home Internet of things equipment list according to the target access token information; the method comprises the steps that a preset intelligent home Internet of things equipment list comprises a plurality of home equipment lists corresponding to target user identifiers, wherein the target home equipment list is one of the plurality of home equipment lists; and sending the target home equipment list to the control equipment so that the control equipment controls the intelligent home Internet of things equipment in the target home equipment list based on the voice of the user.
Optionally, the processing device 110 may verify the target user identifier in the authorization request after receiving the authorization request input by the user through the intelligent application; querying the target home identity associated with the target user identity and the control device 120 when the target user identity verification is passed; when the target home identifier associated with the target user identifier is queried, generating an access token comprising a target home tag according to the target home identifier; the access token including the target home tag is sent to the control device 120 for subsequent invocation of the access token by the control device 120 to communicate with the smart application.
Optionally, the processing device 110 may be an intelligent terminal such as a mobile phone, a computer, a tablet, or an intelligent watch, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and technical computing services such as big data and artificial intelligent platforms.
Optionally, the processing device 110 and the control device 120 are in communication connection through a transmission network (such as a wireless communication network), and the control device 120 and the smart home IOT device 130 are also in communication connection through the transmission network.
Optionally, the control system of the intelligent home internet of things device may further include a management device, where the management device is configured to manage the system (e.g. manage a connection state between each module and the server, etc.), and the management device is connected to the server through a communication network. Optionally, the communication network is a wired network or a wireless network.
Alternatively, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the internet, but may be any other network including, but not limited to, a local area network, a metropolitan area network, a wide area network, a mobile, a limited or wireless network, a private network, or any combination of virtual private networks. In some embodiments, techniques and/or formats including hypertext markup language, extensible markup language, and the like are used to represent data exchanged over a network. All or some of the links may also be encrypted using conventional encryption techniques such as secure socket layer, transport layer security, virtual private network, internet protocol security, etc. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of or in addition to the data communication techniques described above.
In the following description of the control method of the intelligent home internet of things device according to the present application, fig. 2 is first a control method of the intelligent home internet of things device according to an embodiment of the present application, where the method is executed by an intelligent application program, and the intelligent application program may be executed by the processing device 110 shown in fig. 1. The control method of the intelligent home internet of things device as shown in fig. 2 may include the following steps:
step 201, receiving an access token sent by a control device, and verifying authority information in the access token.
The access token comprises a target home tag, wherein the target home tag is one of a plurality of home tags associated with the control device corresponding to the target user identification. The rights information is used to indicate IOT vendors that the control device can access. The control device invokes a discoverdevice interface of the intelligent application program based on the access token, and at this time, the intelligent application program receives the access token sent by the control device, and further verifies authority information in the access token based on OAuth2 protocol to determine access authority of the control device. It should be noted that, in the embodiment of the present application, the control device is an intelligent sound box.
And 202, when the right information verification is passed, acquiring target access token information associated with the target home tag.
When the authority information passes the verification, the intelligent application program can inquire target access token information associated with the target home label identified from the access token from a database according to the corresponding relation between the home label and the access token information.
Step 203, according to the target access token information, inquiring a target home device list corresponding to the target home tag from a preset intelligent home internet of things device list.
The preset intelligent home Internet of things equipment list comprises a plurality of home equipment lists corresponding to target user identifiers, and the target home equipment list is one of the home equipment lists. The intelligent application program can query a home equipment list corresponding to the target home tag from the corresponding home equipment list corresponding to the target user identifier according to the target home tag information in the target access token information in the preset intelligent home internet of things equipment list, so that the target home list is obtained.
And step 204, transmitting the target home equipment list to the control equipment so that the control equipment controls the intelligent home Internet of things equipment in the target home equipment list based on the voice of the user.
The intelligent application program sends a target home device list corresponding to the target home tag to the control device through the discovery devices interface, so that the control device can only control the intelligent home IOT devices contained in the target home device list based on user voice.
In the embodiment of the application, when the intelligent application program receives the access token sent by the control equipment, the authority information in the access token is verified a priori. And when the authority information passes the verification, acquiring target access token information associated with the target home tag in the access token. Because the target home tag is one of a plurality of home tags associated with the user identifier corresponding to the control device, the preset intelligent home Internet of things device list comprises a plurality of home device lists corresponding to the user identifier. Then, according to the target access token information associated with one target home tag person in the plurality of home tags associated with the user identification, a target home device list inquired from the preset intelligent home internet of things device list also corresponds to the target home tag only. When the target home device list is sent to the control device, the control device only receives the home device list corresponding to one home tag in the plurality of home tags associated with the user identifier. Rather than a list of all intelligent home internet of things devices to which the user identification is associated. The control device can control the intelligent home IOT device under the condition that only the target home label corresponds to the home based on the user voice, so that when one user identifier is associated with a plurality of households, the control device can accurately control one or a plurality of intelligent home IOT devices in the households.
Before receiving an access token sent by the control device and verifying authority information in the access token, the control device is authorized to be allocated with the access token, which is an unavoidable process for controlling the intelligent home IOT device based on the control device. In order to facilitate the control device to call the access token to communicate with the intelligent application program later, and further obtain a target home device list corresponding to the target home tag based on the access token so as to achieve the purpose that the control device correctly controls the intelligent home IOT devices in each home when one user identifier associates a plurality of households, the authorization process of the control device needs to be improved correspondingly. Fig. 3 is a control method of yet another intelligent home internet of things device according to an embodiment of the present application, which is performed by an intelligent application program, which may be executed by the processing device 110 shown in fig. 1. The control method of the intelligent home internet of things device as shown in fig. 3 may include the following steps:
step 301, receiving an authorization request input by a user, and verifying a target user identification in the authorization request.
The target user identifier may be a user account number when the user logs in to the intelligent application program, where the user account number may be a pure digital Identification (ID), or may be an ID including a number, an english case, a symbol, and/or a chinese character. The authorization request in the embodiment of the application takes an OAuth2 authorization request as an example. Before authorizing the control equipment, the user selects the IOT manufacturer to which the intelligent home IOT equipment to be controlled belongs from the intelligent application program, initiates OAuth2 authorization, and fills in the target user identifier and the password set by the user under the IOT manufacturer from the intelligent application program. The intelligent application program receives the authorization request input by the user, and then verifies whether the target user identification is correct according to the password so as to verify the target user identification in the authorization request.
Step 302, when the target user identification passes the verification, inquiring the target home identification and the control equipment associated with the target user identification.
Before initiating OAuth2 authorization, if a user wants to control an intelligent home IOT device belonging to a IOT vendor in a certain family under a user name by using a certain control device, the control device attribute information of the control device, a family identifier of the certain family which the control device is intended to control, and a user identifier of the user, are input in an intelligent application program, and the intelligent application program stores the control device attribute information of the user identifier control device and the family identifier in an associated manner. And when the target user identification passes the verification, the intelligent application program can inquire the target home identification and the control equipment associated with the target user identification.
Optionally, when the target user id fails to pass the verification, the intelligent application program returns information indicating that the verification fails to remind the user to reinitiate OAuth2 authorization.
Optionally, in order to prevent the user from forgetting the selected home and the control device, the authorization request includes attribute information of the control device and first timestamp information, and step 302, when the target user identifier passes verification, the query of the target home identifier associated with the target user identifier and the control device may include steps 3021 to 3024 as follows:
And 3021, inquiring the target home mark record with the attribute information of the control device and the target user identification from at least one pre-stored home mark record.
The control device attribute information may be a brand of the control device, a machine model of the control device, etc., and the embodiment of the present application is not particularly limited, and in the embodiment of the present application, the brand of the control device attribute information control device is taken as an example. When different users input control device attribute information of the control device, a family identifier of a family to be controlled by the control device and a user identifier to which the family identifier belongs in the intelligent application program, the intelligent application program generates a time stamp information for recording the time of inputting the family identifier, the user identifier and the control device attribute information by the user when each user inputs the family identifier, the user identifier and the control device attribute information, and sorts the family identifier, the user identifier and the control device attribute information input by the user and the generated time stamp information into family mark records corresponding to the user identifiers one by one to be stored. The content recorded in each home mark record is as follows:
smart_speaker_brand:String;
user_id:String;
want_use_home_id:String;
Long, wherein String and Long represent storage types of data, smart_speak_brand represents brands to which control devices belong, user_id represents user identification, WAnt_use_home_id represents family identification, and Long_ts represents timestamp information.
Thus, when a certain target user identification passes verification, the intelligent application program can inquire the target home mark record with the attribute information of the control equipment and the target user identification from at least one pre-stored home mark record.
It should be noted that, in the embodiment of the present application, in order to achieve the purpose that when one user identifier associates a plurality of families, the control device can correctly control the intelligent home IOT device in each family, one user identifier can only have one family mark record stored by the intelligent application program, and one family mark record can only have one family mark recorded therein. Therefore, each access token comprising the home tag can be guaranteed to correspond to one home tag, and the control device with the access token can only control the intelligent home IOT device in the home device list corresponding to one home tag.
It will be appreciated that when the user wants to change the home identification, the user needs to re-enter the control device attribute information, his own user identification, and a new home identification in the smart application. When the intelligent application program receives the control equipment attribute information input by the user again, the user identification and the new family identification, the original family identification in the family record list corresponding to the user identification is covered by the new family identification. The operation process of the user to change the attribute information of the control device is similar to that of changing the home identifier, and will not be described herein.
Optionally, in order to facilitate user operation, when the user inputs the attribute information of the control device, the user identifier of the user and the home identifier, the intelligent application program may display a target list to the user, where the target list includes the user identifier that the user has input, and the attribute information of the control device and the home identifier that are input together with the user identifier. The user can conveniently select the attribute information of the control equipment and the family identification which are required to be input from the target list directly, and the user does not need to reenter the control equipment every time, so that the operation of the user is convenient.
In step 3022, when it is queried that there is a target home mark record of the control device attribute information and the target user identifier, it is verified whether a time difference between the second timestamp information and the first timestamp information recorded in the target home record is within a preset threshold range.
The first timestamp information is used for indicating the initiation time of the authorization request, the second timestamp information is used for indicating the creation time of the target home mark record, and the preset threshold range can be set by oneself, and the embodiment of the application takes 24 hours as an example. When the intelligent application program can query the target home mark record with the attribute information of the control device and the target user identification from at least one pre-stored home mark record, the intelligent application program means that a user has a requirement of only controlling the intelligent home IOT device in a certain home by a certain control device. At this time, the intelligent application program may read the second timestamp information from the target home tag record, further calculate a time difference between the second timestamp information and the first timestamp information, and enter step 3023 if the time difference is within a preset threshold range. If the time difference is not within the preset threshold, the conventional OAuth2 authorization mechanism is entered (which is described later).
And 3023, determining the home identifier recorded in the target home mark record as a target home identifier associated with the target user identifier when the time difference between the second time stamp information and the first time stamp information is within a preset threshold value range.
Step 3024, determining, according to the authorization request, a control device associated with the target user identification.
The authorization request input by the user often includes the control device desiring to be authorized, so the intelligent application program can determine the control device desiring to be authorized in the authorization request as the control device associated with the target user identification when receiving the authorization request.
When the target user identification passes the verification, inquiring whether the time difference between the second timestamp information and the first timestamp information recorded in the target home record is within a preset threshold value range or not when the target home mark record with the control equipment attribute information and the target user identification is found from at least one pre-stored home mark record. When the time difference between the second time stamp information and the first time stamp information is within a preset threshold value range, the home identifier recorded in the target home mark record is determined to be a target home identifier associated with the user identifier, so that the control device indicated by the control device attribute information is determined to be a control device associated with the target user identifier. Determining whether the time difference between the second time stamp information and the first time stamp information is within a preset threshold value range or not can prevent the user from forgetting a previously set home mark record, so that the influence of the forgotten home mark on a subsequent access token is caused, further, the control behavior of the control device on the intelligent home IOT device based on the access token is influenced, and the conditions of inconsistent control on the intelligent home IOT device and user expectation are avoided.
Step 303, when the target home identifier associated with the target user identifier is queried, generating an access token comprising the target home tag according to the target home identifier.
When the target home identifier associated with the target user identifier is queried, the intelligent application program adds the target home tag corresponding to the target home identifier into the access token, and further obtains the access token comprising the target home tag.
Optionally, in step 303, when the target home identifier associated with the target user identifier is queried, generating, according to the target home identifier, an access token including a target home tag may include the following steps:
step 3031, query the access token information with the target home identifier from at least one piece of pre-stored access token information.
The access token information comprises a home identifier, a user identifier, a home tag, control device attribute information and an access token, so that the intelligent application program can compare the home identifier in all the pre-stored access token information with a target home identifier so as to inquire the access token information with the target home identifier. The content stored in each piece of pre-stored access token information is as follows:
smart_speaker_brand:String;
user_id:String;
home_id:String;
alias_home_id:String;
access_token: string; wherein String represents the storage type of the data, smart_maker_brand represents the brand to which the control device belongs, user_id represents the user identifier, home_id represents the home identifier (substantially consistent with the content of the WAnt_use_home_id in the home tag record), created_ts represents the timestamp information, and alias_home_id represents the home tag, which is a unique ID randomly generated by the intelligent application and corresponding to the home identifier, so as to protect the home privacy of the user. Length of home tag the embodiment of the present application is not particularly limited, and the preferred home tag has a length of 21 characters. The access token represents an access token granted to the control device, and the access token may be a UUID or a UUID including a home tag. Taking the home tag length of 21 characters as an example, when the home tag is included in the access token, the length of the access token is 57 characters; when the access token is only a UUID, then the length of the access token is 36 characters long.
Step 303A1, when the first access token information with the target home identifier is queried, deleting the original access token in the first access token information, and generating a first universal unique identifier.
When the first access token information with the target home identifier is queried, the current authorization request is the re-authorization of the control equipment, the old expired record needs to be cleared, and a new access token is regenerated. The intelligent application will delete the original access token in the first access token information and generate a UUID of 36 characters in length.
In step 303A2, the target home tag in the first access token information is added to the first universal unique identification code, so as to obtain an access token including the target home tag, and the access token including the target home tag is stored in the first access token information.
And the intelligent application program stores the access token comprising the target home tag into the first access token information by adding the UUID newly generated by the target home tag in the first access token information to obtain the access token comprising the target home tag.
When the first access token information with the target home identifier is queried, the fact that the home indicated by the target home identifier is recorded is re-authorized to the control equipment, and the old and expired record is cleared, namely the original access token in the first access token information is deleted. And further generating a first universal unique identification code and adding the target home tag in the first access token information to the second universal unique identification code to obtain the access token comprising the target home tag. And for the re-authorization of the control equipment, generating a new access token on the premise of not damaging the target home tag in the first access token information, and ensuring that the access token generated by re-authorization can still only control the intelligent home IOT equipment in the existing home of the user indicated by the target home identifier.
Step 303B1, when access token information having the target home identification is not found, creating second access token information including the target home identification.
When the access token information storing the target home identification is not found, it means that the home indicated by the target home identification has not been recorded yet, and is a new authorization for the control device. The smart application may then create a second access token including the target home identification, the target user identification, and the control device attribute information.
Step 303B2, generating a second universal unique identification code and a target home tag corresponding to the target home identifier.
The smart application will generate a unique target home tag that is not present in all pre-stored access token information and a UUID that is not present in all pre-stored access token information access tokens.
In step 303B3, the target home tag is added to the second universal unique identification code, an access token including the target home tag is obtained, and the access token including the target home tag and the target home tag are stored in the second access token information.
And adding the generated target home tag to the generated UUID to obtain an access token comprising the target home tag, and storing the target home tag and the access token comprising the target home tag in the second access token information.
When the access token information for storing the target home identification is not found, which means that the home indicated by the target home identification has not been recorded yet, the control device is newly authorized, and the second access token information including the target home identification is created first. And further adding the target home tag corresponding to the newly generated target home identifier into the newly generated second universal unique identification code to obtain the access token comprising the target home tag. And storing the target home tag and the access token comprising the target home tag into the second access token information, so that the subsequent search of the access token information is facilitated, and the control equipment can accurately control the intelligent home IOT equipment in the home.
Step 304, the access token including the target home tag is sent to the control device, and the control device subsequently invokes the access token to communicate with the intelligent application.
The intelligent application program sends an access token comprising a target home tag to control equipment expected to be authorized in the authorization request, the control equipment stores the access token comprising the target home tag, and calls the access token to communicate with the intelligent application program when the intelligent home IOT equipment needs to be controlled, so that the intelligent home IOT equipment in a certain home can be accurately controlled.
Optionally, when the intelligent application program does not query the target home mark record with the attribute information of the control device and the target user identifier from at least one pre-stored home mark record, or the time difference between the second time stamp information and the first time stamp information is not within a preset threshold value, the intelligent application program enters a traditional OAuth2 authorization mechanism, that is, the intelligent application program can firstly input the target user identifier in the authorization request by the user, and when the target user identifier passes verification, a third unique universal identification code (Universally Unique Identifier, UUID) with 36 characters is generated and used as an access token, and is returned to the control device requesting authorization in the authorization request. Therefore, on one hand, the user can be prevented from forgetting the previously set home mark record, so that the forgotten home mark influences a subsequent access token, and further the control behavior of the control device on the intelligent home IOT device based on the access token is influenced, and the conditions of inconsistent control on the intelligent home IOT device and user expectation are avoided. And on the other hand, the control equipment can be normally authorized to ensure that the user can control the intelligent home IOT equipment in the home based on the control equipment.
It can be appreciated that when the access token is only a UUID with a length of 36 characters, the authorization mechanism of the intelligent application based on conventional OAuth2 will return, to the control device, an intelligent home IOT device belonging to a certain IOT vendor (the vendor to which the user selects the intelligent home IOT device before teaching the control device) in all families under the target user identifier when the control device invokes the discover device interface.
The conventional OAuth2 authorization mechanism only verifies the user identifier in the authorization request input by the user, but cannot distinguish between different families associated with the same user identifier, which results in that when the user has a plurality of control devices belonging to the same brand, for example, when the control device 1 and the control device 2 are used, if the user first authorizes the control device 1, then the access token obtained by the control device 1 will be invalid (i.e. the access token of the control device 1 will be cleared) when the user authorizes the control device 2 next time, which results in that the user cannot use a plurality of control devices belonging to the same brand in a plurality of families at the same time.
However, when receiving the access token including the target home tag sent by the intelligent application, the control device in this embodiment stores the access token including the target home tag, so as to communicate with the intelligent application when the access token is subsequently invoked. This means that the control device may call the access token to communicate with the smart application immediately upon completion of the authorization, or may call the access token to communicate with the smart application after a period of time after the authorization is completed, during which the user does not enter an authorization request into the smart application for re-authorization of the control device. When the same user has a plurality of control devices of the same manufacturer, each control device is placed in a different family of the same user, and family labels in the access tokens stored by each control device are different, after authorization of each control device is completed, each control device can call the respective access token to communicate with the intelligent application program at the same time (for example, xx year x month x day 9:00) before the user is re-authorized, so as to acquire a family label corresponding family device table in the respective access token. And further, the intelligent home IOT equipment in the respective home equipment tables is controlled to be realized in families corresponding to different home tags under the same time. The conventional control devices of the same manufacturer for the same user cannot appear, and if the control devices belonging to the same manufacturer and placed in different families are required to control the intelligent home IOT device, only one of the control devices of the same manufacturer for the same user can be authorized for reuse.
That is to say, in the control method of the intelligent home internet of things device provided by the embodiment of the application, when the target user identifier in the authorization request input by the user is verified to pass, the target home identifier associated with the target user identifier is queried first. When first access token information with a target home identifier is queried in at least one piece of preset stored access token information, deleting an original access token in the first access token information, and further regenerating an access token comprising the target home tag; when the access token information with the target home identifier is not queried, generating second access token information comprising the target home identifier, and further storing the generated target home identifier and the access token comprising the target home identifier into the second access token information, so that the processing of the authorization request input by the user is not the operation of only verifying the user identifier in the traditional authorization mechanism of OAuth2, but the processing of different home identifiers associated with the user identifier is carried out, the authorization behavior of the user to the control device is distinguished by the home identifier, and the access token comprising different home identifiers is returned to the control device, thereby avoiding the situation that the same user can only authorize a plurality of control devices belonging to the same brand. So that a user can use a plurality of control devices belonging to the same brand in a plurality of households at the same time.
In an application scenario, taking a control device as an intelligent sound box, an intelligent application program as an IOT manufacturer APP and an intelligent sound box APP as an example, a user U uses an intelligent sound box a of a product name card M in a family a, the user U needs to create a family mark record by using an APP of an IOT manufacturer N before initiating OAuth2 authorization on the intelligent sound box APP, the mark indicates which family he wants to authorize using an intelligent voice service, and the creation is that: { smart_spin_brand } "brand M", user_id: "user U", WAnt_use_home_id: "family A", created_ts };
user U selects an IoT vendor N on intelligent sound box APP of brand M, initiates OAuth2 user authorization;
user U fills in user account number and password of the IoT manufacturer N on the intelligent sound box APP of brand M;
after the user account number is correctly input, the APP of the IOT manufacturer N checks that the user account number is in the correct state, and queries the home mark record of the user U in at least one prestored home mark record (the time difference between the time stamp information in the home mark record of the user U and the time stamp information when the user U initiates OAuth2 user authorization on the intelligent sound box APP is within 24 hours), if the user account number is found to set the mark of the want_use_home_id= "home A", all the prestored access token information is checked to have no access token information of the user_id= "user U", the smart_maker_brand= "brand M" and the home_id= "home A", and then access token information with the user_id of "user U" is generated. And generating new alias_home_id1, generating new access token information containing alias_home_id1, adding { smart_space_brand: "brand M" to the access containing information, adding alias_home_id1, and returning the access token information containing alias_home_id1 to the intelligent sound box A.
Then, user U uses intelligent speaker B of brand M in family B, user U needs to create a family tag record using the APP of IOT vendor N before initiating OAuth2 authorization on intelligent speaker APP, the tag indicating which family he wants to authorize use of intelligent voice services, created by: { smart_spin_brand } "brand M", user_id: "user U", WAnt_use_home_id: "family B", created_ts: created timestamp }; at this time, the home mark record of the user U home B will overwrite the home mark record of the original user U home a.
User U selects an IoT vendor N on intelligent sound box APP of brand M, initiates OAuth2 user authorization;
user U fills in user account number and password of the IoT manufacturer N on the intelligent sound box APP of brand M;
after the user account number is correctly input, the APP of the IOT manufacturer N checks that the home mark record of the user U is queried in at least one prestored home mark record (the time difference between the time stamp information in the home mark record of the user U and the time stamp information when the user U initiates OAuth2 user authorization on the intelligent sound box APP is within 24 hours), and if the mark of the wall_use_home_id= "home B" is found, whether all the prestored access token information has access token information corresponding to the home mark record of the user U home B or not is checked. If it is checked that the user_id= "user U", the smart_space_brand= "brand M" and the home_id= "family B" in a certain access token information, the user U is considered to re-authorize the smart speaker B in the family B, (the access token information is { the smart_space_brand: "brand M", the home_id: "family a", the user_id: "user U", the name_home_id: the name_home_id 2, the name_token }, the name_token: the name_token 1 including the name_home_id 1) deletes the access token information or the original name_token 1, and then regenerates a UUID, adds the name_home_id recorded in the access token information to the newly generated UUID to obtain the name_token 2 including the name_token 2, and then obtains the new access token information including the name_token 2 to the new access token information including the name_2: { smart_space_brand } "brand M", home_id: "family A", user_id: "user U", alias_home_id: alias_home_id2, access_token: access token2 containing alias_home_id1 }, and then return the access token2 containing alias_home_id2 to the smart speaker B.
When the user U grants the smart sound box B, since the want_use_home_id= "family a" in the home tag record is replaced by the want_use_home_id= "family B", the APP of the IOT manufacturer N can distinguish the grant behavior of the user U for the smart sound box a of the brand M in the family a and the grant behavior of the user U for the smart sound box B in the family B, and the situation that if the user U uses the smart sound box B of the brand M in the family B, the access token previously granted to the smart sound box a is cleared can not occur, so that the subsequent user U can use the smart sound box a and the smart sound box B in the family a and the family B at the same time.
In the embodiment of the application, when the target user identifier in the authorization request is input through the user in verification, the target home identifier associated with the target user identifier and the control equipment are inquired. And when the target home identifier associated with the target user identifier is queried, generating an access token comprising the target home tag according to the target home identifier, and then sending the access token comprising the target home tag to the control equipment. The authorization process of the control device is improved, so that the access token returned to the control device can comprise the target home tag, and the situation that only the access token which does not comprise the target home tag is returned in the traditional authorization process of the control device is avoided. The access token is conveniently and subsequently called by the subsequent control equipment to communicate with the intelligent application program, so that the target home equipment list corresponding to the target home label is obtained based on the access token, and the purpose that the control equipment correctly controls the intelligent home IOT equipment in each home when one user identifier is associated with a plurality of households is achieved.
In order to protect the privacy of a family and achieve the purpose that when one user identifier associates a plurality of families, the control device correctly controls the intelligent home IOT device in each family, another control method of the intelligent home internet of things device is proposed, as shown in fig. 4, and the method is executed by an intelligent application program, where the intelligent application program can be executed by the processing device 110 shown in fig. 1. The control method of the intelligent home internet of things device as shown in fig. 4 may include the following steps:
step 401, receiving an authorization request input by a user, and verifying a target user identification in the authorization request.
Referring to step 301 in the embodiment shown in fig. 3 in detail, a detailed description is omitted here.
Step 402, when the target user identification passes the verification, inquiring the target home identification and the control device associated with the target user identification.
Referring to step 302 in the embodiment shown in fig. 3, details are not repeated here.
Step 403, when the target home identifier associated with the target user identifier is queried, generating an access token including the target home tag according to the target home identifier.
Referring to step 303 in the embodiment shown in fig. 3, details are not repeated here.
Step 404, the access token including the target home tag is sent to the control device for the control device to subsequently invoke the access token to communicate with the intelligent application.
Referring to step 304 in the embodiment shown in fig. 3, details are not repeated here.
And step 405, receiving an access token sent by the control device, and verifying authority information in the access token.
Referring to step 201 in the embodiment shown in fig. 2, details are not repeated here.
The home tag is a unique Identification (ID) code that is randomly generated by the intelligent application program in the pre-stored access token information and corresponds to a home identifier in the pre-stored access token information, so as to protect the home privacy of the user. Length of home tag the embodiment of the present application is not particularly limited, and the preferred home tag has a length of 21 characters.
And step 406, when the right information verification is passed, acquiring the target access token information associated with the target home tag.
Referring to step 202 in the embodiment shown in fig. 2, details are not repeated here.
Optionally, step 406, when the authority information passes the verification, obtaining the target access token information associated with the target home tag may include querying access token information including the target home tag from at least one piece of pre-stored access token information, and determining the access token information including the target home tag as the target access token information.
When verifying the authority information passing through the access token, the intelligent application program compares the home tag in each piece of pre-stored access token information with the target home tag identified from the access token until a home tag consistent with the target home tag is found, so that the access token information where the home tag is located is determined as target access token information associated with the target home tag.
And inquiring target access token information comprising target home labels from at least one piece of prestored access token information, so that a target home device list corresponding to the target home labels can be inquired from a plurality of home device lists associated with target user identifiers based on the target access token information conveniently, and the purpose that the control device correctly controls intelligent home IOT devices in each home is achieved.
Step 407, inquiring a target home device list corresponding to the target home tag from a preset intelligent home internet of things device list according to the target access token information.
Referring to step 203 in the embodiment shown in fig. 2, details are not repeated here.
Optionally, the target access token information includes a target home identifier, a target user identifier, and a target home tag. Step 407, according to the target access token information, the target home device list corresponding to the target home tag is queried from the preset smart home internet of things device list, which may include the following steps 4071 to 4073:
Step 4071, obtaining the target user identifier in the target access token information and the target home identifier corresponding to the target home tag.
The target access token information includes a target user identification, control device attribute information, a target home identification, a target home tag, and an access token, and the recording format of each information is consistent with the recording format of each piece of pre-stored access token information in the embodiment shown in fig. 3. The intelligent application program can read the target user identification and the target family identification from the target access token information, so that the target user identification and the target family identification corresponding to the target family label are obtained.
Step 4072, a plurality of home equipment lists corresponding to the target user identification are queried from the preset intelligent home internet of things equipment list.
And recording intelligent home IOT equipment belonging to each IOT manufacturer under each user identifier by taking the user identifier as a reference in a preset intelligent home IOT equipment list. And further, under each user identification, recording intelligent home IOT equipment belonging to each IOT manufacturer in families corresponding to different home identifications under each user identification by taking the home identification as a reference. The intelligent application program can find a sub-table with the user identifier being the target user identifier from the preset intelligent home internet of things device list, and a plurality of home device lists under the target user identifier are recorded in the sub-table.
Step 4073, querying a target home device list corresponding to the target home identifier from a plurality of home device lists corresponding to the target user identifier.
The intelligent application program compares the home identifier of each home device list corresponding to the target user identifier with the target home identifier, and determines the home device list with the home identifier consistent with the target home identifier as a target home device list corresponding to the target home identifier.
And adding a mapping relation between the target home identifier and the target home identifier so as to acquire the target home identifier corresponding to the target home identifier and the target user identifier from the target access token information when the target home device list corresponding to the target home identifier needs to be queried, and further querying a plurality of home device lists corresponding to the target user identifier, thereby realizing the purpose of searching the target device list corresponding to the target home identifier by taking the target home identifier as a transfer, avoiding directly using the target home identifier, and preventing the leakage of the home identifier of the user. And further, the control equipment can be prevented from controlling the intelligent home IOT equipment in the home by using the home identification of the user, so that the privacy of the user is protected.
Step 408, the target home device list is sent to the control device, so that the control device controls the intelligent home internet of things device in the target home device list based on the user voice.
Referring to step 204 in the embodiment shown in fig. 2, details are not repeated here.
Continuing to combine the application scenario, the user U uses the intelligent sound box a of the brand M in the family a, and when the intelligent sound box a obtains the access token containing the alias_home_id1 returned by the intelligent application program, the access token containing the alias_home_id1 is stored. Then, when the user U wants to control the intelligent home IOT device in the family a, which is produced by the IOT vendor N, using the intelligent loudspeaker a, the intelligent loudspeaker a invokes the discovery device interface of the APP of the IOT vendor N to obtain an available family device list, the APP of the IOT vendor N parses the alias_home_id1 in the access token, finds the target access token information of the alias_home_id= "alias_home_id1" from all the pre-stored access token information, and further finds the home_id corresponding to the access token as "family a", and then returns the intelligent loudspeaker a to the family device list of the family a; because the intelligent sound box A only acquires the equipment list of the family A, the intelligent sound box A can only control the intelligent home IOT equipment produced by the IOT manufacturer N in the family A.
The workflow of the user U using the smart speaker B of brand M in family B is identical to the workflow of the user U using the smart speaker a of brand M in family a, and will not be described here again.
Optionally, when the access token sent by the control device does not include the target home tag, the intelligent application program enters a traditional workflow based on an OAuth2 authorization mechanism, specifically, when the intelligent application program verifies that the authority information in the access token passes, the intelligent application program queries all intelligent home IOT devices associated with the target user identifier from a preset intelligent home internet of things device list, and sorts all intelligent home IOT devices associated with the target user identifier into a list and returns the list to the control device.
In the embodiment of the application, after receiving the authorization request input by the user and sending the access token comprising the target home tag to the control equipment, the access token sent by the control equipment can be received, after the authorization information in the access token passes the verification, the target access token information comprising the target home tag is inquired from at least one piece of prestored access token information, the target home identifier corresponding to the target home tag and the target user identifier are obtained from the target access token information through the mapping relation between the target home identifier and the target home tag, and then a plurality of home equipment lists corresponding to the target user identifier are inquired, so that the target home identifier is used as a transfer to find the target equipment list corresponding to the target home identifier, the target home identifier is prevented from being directly used, and the leakage of the home identifier of the user can be prevented. And further, the control equipment can be prevented from controlling the intelligent home IOT equipment in the home by using the home identification of the user, so that the privacy of the user is protected. And then, inquiring a target home equipment list corresponding to the target home identification from a plurality of home equipment lists corresponding to the target user identification, so that the target home equipment list is returned to the control equipment, and the control equipment can only control the intelligent home IOT equipment in the target home equipment list corresponding to the target home identification based on the user voice, so that when one user identification is associated with a plurality of families, the control equipment can correctly control one or more intelligent home IOT equipment in the families.
In this embodiment, a control device for an intelligent home internet of things device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, which have been described and will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment provides a control device for an intelligent home internet of things device, as shown in fig. 5, including:
a receiving module 510, configured to receive an access token sent by a control device, and verify rights information in the access token; the access token includes a target home tag; the target home tag is one of a plurality of home tags associated with the control equipment corresponding to the target user identifier;
an obtaining module 520, configured to obtain target access token information associated with a target home tag when the authority information passes verification;
the query module 530 is configured to query, according to the target access token information, a target home device list corresponding to the target home tag from a preset smart home internet of things device list; the method comprises the steps that a preset intelligent home Internet of things equipment list comprises a plurality of home equipment lists corresponding to target user identifiers, wherein the target home equipment list is one of the plurality of home equipment lists;
And the sending module 540 is configured to send the target home device list to the control device, so that the control device controls the intelligent home internet of things device in the target home device list based on the user voice.
In some alternative embodiments, the query module 530 includes:
the acquisition unit is used for acquiring the target user identification in the target access token information and the target family identification corresponding to the target family label;
the first query unit is used for querying a plurality of home equipment lists corresponding to the target user identification from preset intelligent home internet of things equipment lists;
the first query unit is further configured to query a target home device list corresponding to the target home identifier from a plurality of home device lists corresponding to the target user identifier.
In some alternative embodiments, the acquisition module 520 includes:
and a second query unit configured to query access token information including a target home tag from at least one piece of pre-stored access token information, and determine the access token information including the target home tag as target access token information.
In some optional embodiments, the control device of the intelligent home internet of things device further includes:
the receiving module is also used for receiving an authorization request input by a user and verifying a target user identification in the authorization request;
The inquiry module is also used for inquiring the target home identifier and the control equipment associated with the target user identifier when the target user identifier passes the verification;
the generation module is used for generating an access token comprising a target home tag according to the target home identifier when the target home identifier associated with the target user identifier is queried;
and the sending module is also used for sending the access token comprising the target home tag to the control equipment and used for the control equipment to call the access token to communicate with the intelligent application program.
In some alternative embodiments, the generating module includes:
a third query unit, configured to query access token information with a target home identifier from at least one piece of pre-stored access token information;
the deleting unit is used for deleting the original access token in the first access token information when the first access token information with the target home identifier is queried, and generating a first universal unique identifier;
and the adding unit is used for adding the target home tag in the first access token information into the first universal unique identification code to obtain an access token comprising the target home tag, and storing the access token comprising the target home tag into the first access token information.
In some optional embodiments, the control device of the intelligent home internet of things device further includes
The generation module is also used for generating a second universal unique identification code and a target family label corresponding to the target family identifier;
the adding module is further configured to add the target home tag to the second universal unique identification code, obtain an access token including the target home tag, and store the access token including the target home tag and the target home tag in the second access token information.
In some alternative embodiments, the authorization request includes control device attribute information and first timestamp information, and the query module includes:
a fourth query unit, configured to query, from at least one pre-stored home tag record, a target home tag record in which control device attribute information and a target user identifier exist;
the verification unit is used for verifying whether the time difference between the second timestamp information and the first timestamp information recorded in the target home record is within a preset threshold value range or not when the target home mark record with the control equipment attribute information and the target user identifier is inquired;
a determining unit, configured to determine, when a time difference between the second timestamp information and the first timestamp information is within a preset threshold range, a home identifier recorded in the target home mark record as a target home identifier associated with the target user identifier;
And the determining unit is also used for determining the control equipment associated with the target user identification according to the authorization request.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The control device of the intelligent home internet of things device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (APPlication Specific Integrated Circuit ) circuit, a processor and a memory that execute one or more software or fixed programs, and/or other devices that can provide the above functions.
The embodiment of the application also provides computer equipment, which is provided with the XXX device shown in the figure 6.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an alternative embodiment of the present application, as shown in fig. 6, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 6.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present application also provide a computer readable storage medium, and the method according to the embodiments of the present application described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present application have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the application, and such modifications and variations fall within the scope of the application as defined by the appended claims.

Claims (10)

1. A method for controlling an intelligent home internet of things device, the method being performed by an intelligent application, the method comprising:
receiving an access token sent by control equipment, and verifying authority information in the access token; the access token includes a target home tag; the target home tag is one of a plurality of home tags associated with the control equipment corresponding to the target user identifier;
when the authority information passes the verification, acquiring target access token information associated with the target home tag;
inquiring a target home equipment list corresponding to the target home tag from a preset intelligent home Internet of things equipment list according to the target access token information; the preset intelligent home Internet of things equipment list comprises a plurality of home equipment lists corresponding to the target user identification, wherein the target home equipment list is one of the home equipment lists;
And sending the target home equipment list to the control equipment so that the control equipment controls the intelligent home Internet of things equipment in the target home equipment list based on user voice.
2. The method according to claim 1, wherein the target access token information includes a target home identifier, the target user identifier, and the target home tag, and the querying, from a preset smart home internet of things device list, a target home device list corresponding to the target home tag according to the target access token information includes:
acquiring the target user identification in the target access token information and the target home identification corresponding to the target home label;
inquiring a plurality of home equipment lists corresponding to the target user identification from a preset intelligent home Internet of things equipment list;
and inquiring the target home equipment list corresponding to the target home identification from a plurality of home equipment lists corresponding to the target user identification.
3. The method according to claim 2, wherein the obtaining the target access token information associated with the target home tag when the rights information passes verification includes:
And inquiring access token information comprising the target home tag from at least one piece of prestored access token information, and determining the access token information comprising the target home tag as the target access token information.
4. The method of claim 1, wherein prior to receiving an access token sent by a control device and verifying rights information in the access token, the method further comprises:
receiving an authorization request input by a user, and verifying the target user identification in the authorization request;
inquiring a target home identifier and control equipment associated with the target user identifier when the target user identifier passes verification;
when the target home identifier associated with the target user identifier is queried, generating an access token comprising a target home tag according to the target home identifier;
and sending the access token comprising the target home tag to the control device for the control device to subsequently call the access token to communicate with the intelligent application program.
5. The method of claim 4, wherein the generating an access token including a target home tag based on the target home identifier when the target home identifier associated with the user identifier is queried, comprises:
Querying access token information with the target home identifier from at least one piece of prestored access token information;
when first access token information with the target home identifier is queried, deleting an original access token in the first access token information to generate a first universal unique identifier code;
and adding the target home tag in the first access token information into the first universal unique identification code to obtain the access token comprising the target home tag, and storing the access token comprising the target home tag into the first access token information.
6. The method of claim 5, wherein the method further comprises:
when the access token information with the target home identifier is not found, creating second access token information comprising the target home identifier;
generating a second universal unique identification code and a target home tag corresponding to the target home identifier;
and adding the target home tag into the second universal unique identification code to obtain the access token comprising the target home tag, and storing the access token comprising the target home tag and the target home tag into the second access token information.
7. The method according to any of claims 4-6, wherein the authorization request includes control device attribute information and first timestamp information; when the target user identification passes the verification, inquiring the target home identification and the control equipment associated with the target user identification, wherein the method comprises the following steps:
inquiring a target home mark record with the control equipment attribute information and the target user identifier from at least one pre-stored home mark record;
when the control equipment attribute information and the target home mark record of the target user identification exist, verifying whether the time difference between the second time stamp information recorded in the target home record and the first time stamp information is within a preset threshold range or not;
when the time difference between the second time stamp information and the first time stamp information is within a preset threshold value range, determining the home identifier recorded in the target home mark record as a target home identifier associated with the target user identifier;
and determining the control equipment associated with the target user identification according to the authorization request.
8. A control device for an intelligent home internet of things device, the device being executed by an intelligent application, the device comprising:
The receiving module is used for receiving the access token sent by the control equipment and verifying the authority information in the access token; the access token includes a target home tag; the target home tag is one of a plurality of home tags associated with the control equipment corresponding to the target user identifier;
the acquisition module is used for acquiring target access token information associated with the target home tag when the authority information passes the verification;
the query module is used for querying a target home equipment list corresponding to the target home tag from a preset intelligent home Internet of things equipment list according to the target access token information; the preset intelligent home Internet of things equipment list comprises a plurality of home equipment lists corresponding to the target user identification, wherein the target home equipment list is one of the home equipment lists;
and the sending module is used for sending the target home equipment list to the control equipment so that the control equipment controls the intelligent home Internet of things equipment in the target home equipment list based on user voice.
9. A computer device, comprising:
The intelligent household internet of things device comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the control method of the intelligent household internet of things device is executed.
10. A computer-readable storage medium, wherein computer instructions for causing a computer to execute the control method of the smart home internet of things device according to any one of claims 1 to 7 are stored on the computer-readable storage medium.
CN202310854950.XA 2023-07-12 2023-07-12 Control method, device, equipment and medium of intelligent household Internet of things equipment Pending CN116938546A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310854950.XA CN116938546A (en) 2023-07-12 2023-07-12 Control method, device, equipment and medium of intelligent household Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310854950.XA CN116938546A (en) 2023-07-12 2023-07-12 Control method, device, equipment and medium of intelligent household Internet of things equipment

Publications (1)

Publication Number Publication Date
CN116938546A true CN116938546A (en) 2023-10-24

Family

ID=88382002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310854950.XA Pending CN116938546A (en) 2023-07-12 2023-07-12 Control method, device, equipment and medium of intelligent household Internet of things equipment

Country Status (1)

Country Link
CN (1) CN116938546A (en)

Similar Documents

Publication Publication Date Title
JP7222036B2 (en) Model training system and method and storage medium
US9578027B1 (en) Multiple data store authentication
US8064583B1 (en) Multiple data store authentication
US8813243B2 (en) Reducing a size of a security-related data object stored on a token
CN109361550B (en) Method, device and equipment for network equipment configuration management
EP3694175B1 (en) System and method for delegating authority through coupled devices
CN108337677B (en) Network authentication method and device
RU2575987C2 (en) Data management in directory database
CN101425893B (en) Network management apparatus and method
CN107015996A (en) A kind of resource access method, apparatus and system
US20080301143A1 (en) Automatic Update System and Method for Using a Meta Mib
WO2015101320A1 (en) Account number generation method, terminal and background server
CN109033857B (en) Method, device and equipment for accessing data and readable storage medium
CN106685949A (en) Container access method, container access device and container access system
CN110086813A (en) Access right control method and device
US20150020167A1 (en) System and method for managing files
CN109033804A (en) A kind of software virtual machine authorization method and device
CN112804377A (en) Data query method, electronic equipment, server, storage equipment and gateway equipment
CN116938546A (en) Control method, device, equipment and medium of intelligent household Internet of things equipment
WO2022006825A1 (en) Device access method in internet of things, apparatus, computer device, and storage medium
US20090192993A1 (en) Method and system for setting domain name and network device thereof
EP1569405A1 (en) Technique for creation and linking of communications network user accounts
CN111277595B (en) User and data management method suitable for multiple users and multiple terminals
JP6455178B2 (en) Information processing apparatus and information processing program
KR102379098B1 (en) Database login information management system using virtual driver and control method thereof

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