Control instruction sending method, device, storage medium and electronic device
By creating a target space and configuring device permission relationships, the problem of third-party businesses being unable to control devices from different manufacturers is solved, and the interconnection and control of smart devices throughout the house are achieved.
Patent Information
- Application Number
- CN202211202766.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-09-29
AI Technical Summary
In the existing technology, third-party services cannot directly control devices from different manufacturers, and there is a problem of how to control the target device.
By creating a target space, configuring the correspondence between devices and spaces, and determining the permission relationship between devices and objects according to preset rules, control instructions are sent to control the target device.
It enables third-party businesses to control equipment from different manufacturers, solves the problem of equipment interconnection, and provides a solution for whole-house intelligent digital control.
Smart Images

Figure CN115695510B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, and more specifically, to a method, device, storage medium, and electronic device for sending control instructions. Background Art
[0002] Currently, the Internet of Things (IoT) has become a key technology for achieving intelligent control of home appliances, and using IoT to control home appliances has become a major trend in the home appliance industry. Existing IoT technology only allows users to control devices from the same manufacturer. For example, devices from Manufacturer A can be controlled by Manufacturer A. If users purchase Manufacturer A's devices, they can also use the IoT technology provided by Manufacturer A to control Manufacturer A's devices. However, third-party businesses (such as hotels, real estate agencies, and apartment complexes) cannot currently directly control Manufacturer A's devices.
[0003] Therefore, in the related art, for third-party services, there is a problem of how to control the manufacturer's equipment.
[0004] Regarding the problem of how to control the target device in related technologies, no effective solution has been proposed yet. Summary of the Invention
[0005] The embodiments of the present application provide a method, device, storage medium, and electronic device for sending a control instruction, so as to at least solve the problem of how to control a target device in the related art.
[0006] According to an embodiment of the embodiments of the present application, a method for sending a control instruction is provided, including: in response to a creation instruction for creating a space sent by a target object, creating a target space corresponding to a target area, wherein the target area is an area determined by the target object according to a preset rule; when it is determined that the target space has been created, configuring a first correspondence between a first device and the target space according to the configuration instruction of the target object, and determining a second correspondence between the target space, the first device and the target object according to the first correspondence, wherein the first device has pre-opened the permission to be configured to the target space; and sending the control instruction of the target object to the target device in the target space according to the second correspondence, so as to control the target device according to the control instruction.
[0007] In an exemplary embodiment, the permission of the first device to be configured to the target space is activated in the following manner: receiving an approval instruction sent by the target object when agreeing to the authorization request of the first device, wherein the permission requested by the authorization request includes at least one of the following: device control permission, device data subscription service; determining the device data corresponding to the first device, the first authorization information corresponding to the device data, the control permission of the first device and the second authorization information corresponding to the control permission; synchronizing the first authorization information and the second authorization information to the target space according to the approval instruction, thereby activating the permission of the first device to be configured to the target space.
[0008] In an exemplary embodiment, configuring a first correspondence between a first device and the target space according to the configuration instructions of the target object includes: obtaining a first device list corresponding to the target space, wherein the first device list includes devices with permission to be configured to the target space; searching the first device list for the device name of the first device corresponding to the configuration instructions of the target object; and if the search is successful, binding the device name of the first device and the target space to obtain the first correspondence.
[0009] In an exemplary embodiment, after binding the device name of the first device and the target space to obtain the first correspondence, the method also includes: obtaining the device names of other devices in the first device list except the device name of the first device; pushing the device names of the other devices to the target object, and sending an inquiry message to the target object, wherein the inquiry message is used to inquire the target object whether to continue to configure the third correspondence between the other devices and the target object.
[0010] In an exemplary embodiment, determining a second correspondence between the target space, the first device, and the target object based on the first correspondence includes: acquiring first spatial information pre-generated for the target space, wherein the spatial information includes: space name, space type, and space number; determining the designated relationship between the target object and the target area as the designated relationship between the target object and the target space when the second spatial information of the target space in the configuration instruction of the target object is consistent with the first spatial information; and obtaining a second correspondence between the target space, the first device, and the target object based on the first correspondence, the designated relationship between the target object and the target space.
[0011] In an exemplary embodiment, sending the control instruction of the target object to the target device in the target space according to the second correspondence relationship includes: obtaining a space list corresponding to the target object, wherein the space list includes at least a first space; when the target space includes the first space, determining the corresponding device with the same device name as the first device in the second device list corresponding to the first space as the target device, and determining other devices in the second device list except the target device as non-target devices, wherein the devices in the second device list support mutual communication; sending the control instruction of the target object to the target device in the target space according to the second correspondence relationship.
[0012] In an exemplary embodiment, the method also includes: when the space list includes the first space and the second space, respectively determining a second device list corresponding to the first space and a third device list corresponding to the second space, wherein the devices in the second device list and the devices in the third device list do not support mutual communication; determining a second device with the same device name as the first device from the second device list, and determining a third device with the same device name as the first device from the third device list; determining the device with the same device number as the first device among the second device and the third device as the target device; and sending the control instruction of the target object to the target device according to the second correspondence.
[0013] According to another embodiment of the embodiments of the present application, a control instruction sending device is also provided, including: a creation module, used to create a target space corresponding to a target area in response to a creation instruction sent by a target object for creating a space, wherein the target area is an area determined by the target object according to preset rules; a configuration module, used to configure a first correspondence between a first device and the target space according to the configuration instruction of the target object when it is determined that the target space has been created, and to determine a second correspondence between the target space, the first device and the target object according to the first correspondence, wherein the first device has pre-opened the permission to be configured to the target space; a sending module, used to send the control instruction of the target object to the target device in the target space according to the second correspondence, so as to control the target device according to the control instruction.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned method for sending control instructions when running.
[0015] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the control instruction sending method through the computer program.
[0016] In an embodiment of the present application, in response to a creation instruction sent by a target object for creating a space, a target space corresponding to the area determined by the target object according to a preset rule is created; when it is determined that the target space has been created, a first correspondence between a first device that has been pre-enabled to be configured to the target space and the target space is configured according to the configuration instruction of the target object, and a second correspondence between the target space, the first device and the target object is determined according to the first correspondence; according to the second correspondence, a control instruction of the target object is sent to the target device in the target space to control the target device according to the control instruction; the above technical solution solves the problem of how to control the target device, thereby achieving the purpose of controlling the target device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 This is a hardware environment diagram of a method for sending a control instruction according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of a method for sending a control instruction according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of the overall structure of a method for sending a control instruction according to an embodiment of the present application;
[0022] Figure 4 Schematic diagram of the overall functional modules of the method for sending a control instruction according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of an authorization process of a first device according to an embodiment of the present application;
[0024] Figure 6is a schematic diagram of a target space creation process according to an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of obtaining a space list according to an embodiment of the present application;
[0026] Figure 8 is a schematic diagram of a configuration process of a first device according to an embodiment of the present application;
[0027] Figure 9 is a schematic diagram of a control flow of a first device according to an embodiment of the present application;
[0028] Figure 10 is a schematic diagram of a device data push process of a first device according to an embodiment of the present application;
[0029] Figure 11 This is a structural block diagram of a device for sending a control instruction according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] According to one aspect of the embodiment of the present application, a method for sending a control instruction is provided. The method for sending a control instruction is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for sending a control instruction can be applied to Figure 1 In the hardware environment shown in FIG. 1 , which is composed of a terminal device 102 and a server 104. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0033] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth. The terminal device 102 may be, but is not limited to, a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing machine, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, smart curtains, smart audio and video, a smart socket, a smart speaker, a smart fresh air device, smart kitchen and bathroom equipment, smart bathroom equipment, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purifier, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0034] In this embodiment, a method for sending a control instruction is provided, which is applied to the above-mentioned computer terminal. Figure 2 1 is a flow chart of a method for sending a control instruction according to an embodiment of the present application, the flow includes the following steps:
[0035] Step S202: creating a target space corresponding to a target area in response to a creation instruction sent by the target object for creating a space, wherein the target area is an area determined by the target object according to a preset rule;
[0036] Step S204: When it is determined that the target space has been created, a first correspondence between the first device and the target space is configured according to the configuration instruction of the target object, and a second correspondence between the target space, the first device, and the target object is determined according to the first correspondence, wherein the first device has been pre-enabled to be configured in the target space.
[0037] Step S206: Send the control instruction of the target object to the target device in the target space according to the second corresponding relationship, so as to control the target device according to the control instruction.
[0038] Through the above steps, in response to the creation instruction for creating a space sent by the target object, a target space corresponding to the target area is created, wherein the target area is the area determined by the target object according to preset rules; when it is determined that the target space has been created, a first correspondence between the first device and the target space is configured according to the configuration instruction of the target object, and a second correspondence between the target space, the first device and the target object is determined according to the first correspondence, wherein the first device has pre-opened the permission to be configured to the target space; according to the second correspondence, the control instruction of the target object is sent to the target device in the target space to control the target device according to the control instruction, which solves the problem of how to control the target device in the related art, thereby achieving the purpose of controlling the target device.
[0039] Optionally, in one embodiment, creating a target space corresponding to a target area may include: obtaining the area type in which the target area is located; creating a corresponding target space according to the area type in which the target area is located, wherein the area type in which the target area is located includes at least one of the following: residential area, hotel residence, and apartment residence.
[0040] In an exemplary embodiment, the process of enabling the first device to be configured to the target space in step S204 is implemented in the following manner: receiving an approval instruction sent by the target object when agreeing to the authorization request of the first device, wherein the permission requested by the authorization request includes at least one of the following: device control permission, device data subscription service; determining the device data corresponding to the first device, the first authorization information corresponding to the device data, the control permission of the first device and the second authorization information corresponding to the control permission; synchronizing the first authorization information and the second authorization information to the target space according to the approval instruction, thereby enabling the first device to be configured to the target space.
[0041] The above-mentioned device data may include device type, device number, device instance, etc., but is not limited thereto.
[0042] Furthermore, after synchronizing the first authorization information and the second authorization information to the target space according to the approval instruction, thereby enabling the first device to be configured in the target space, the authorization information of the device management service can also be enabled to allow operations such as adding, deleting, and modifying device data in the target space.
[0043] In an exemplary embodiment, in order to better understand the process of how to configure the first correspondence between the first device and the target space according to the configuration instructions of the target object in the above step S204, the following implementation steps are proposed: obtain a first device list corresponding to the target space, wherein the first device list includes devices with permission to be configured to the target space; search for the device name of the first device corresponding to the configuration instructions of the target object in the first device list; if the search is successful, bind the device name of the first device and the target space to obtain the first correspondence.
[0044] In other embodiments, if the search fails, it means that the device name of the first device does not exist in the first device list. The device name of the first device is directly added to the first device list, and the device name of the first device is bound to the target space to obtain the first corresponding relationship.
[0045] In an exemplary embodiment, after binding the device name of the first device and the target space to obtain the first correspondence, further, the device names of other devices in the first device list except the device name of the first device can be obtained; the device names of the other devices are pushed to the target object, and an inquiry message is sent to the target object, and the inquiry message is used to inquire the target object whether to continue to configure the third correspondence between the other devices and the target object.
[0046] In an exemplary embodiment, for the technical solution of implementing the second correspondence between the target space, the first device and the target object based on the first correspondence in the above-mentioned step S204, the specific steps include: obtaining the first spatial information pre-generated for the target space, wherein the spatial information includes: space name, space type and space number; when it is determined that the second spatial information of the target space in the configuration instruction of the target object is consistent with the first spatial information, determining the designated relationship between the target object and the target area as the designated relationship between the target object and the target space; obtaining the second correspondence between the target space, the first device and the target object based on the first correspondence, the designated relationship between the target object and the target space.
[0047] In an exemplary embodiment, the process of sending the control instruction of the target object to the target device in the target space according to the second correspondence in the above step S206 can be implemented by the following steps, specifically including: obtaining a space list corresponding to the target object, wherein the space list includes at least the first space; when the target space includes the first space, determining the corresponding device with the same device name as the first device in the second device list corresponding to the first space as the target device, and determining other devices in the second device list except the target device as non-target devices, wherein the devices in the second device list support mutual communication; sending the control instruction of the target object to the target device in the target space according to the second correspondence.
[0048] In an exemplary embodiment, the case where the space list includes the first space and the second space is further described, and the specific steps include: when the space list includes the first space and the second space, respectively determining the second device list corresponding to the first space and the third device list corresponding to the second space, wherein the devices in the second device list and the devices in the third device list do not support mutual communication; determining a second device with the same device name as the first device from the second device list, and determining a third device with the same device name as the first device from the third device list; determining the device with the same device number as the first device among the second device and the third device as the target device; and sending the control instruction of the target object to the target device according to the second correspondence.
[0049] For example, if the device name of the first device is a washing machine and the device number of the first device is 1, and a washing machine is identified in both the second device list and the third device list, the washing machine in the second device list is numbered 1 and the washing machine in the third device list is numbered 2, then the washing machine in the second device list is determined to be the target device.
[0050] In this embodiment, for devices with the same device name in different spaces, the device number can be further used for screening, and the device with the same device number as the first device is determined as the target device, which can improve the accuracy of determining the target device.
[0051] In order to better understand the process of the above-mentioned method for sending the control instruction, the implementation method flow of sending the above-mentioned control instruction is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of this application.
[0052] In this embodiment, a method for sending a control instruction is provided. Figure 3Schematic diagram of the overall structure of the method for sending a control instruction according to an embodiment of the present application. Figure 3 As shown, it includes the third-party cloud and Haier Cloud. Among them, the third-party cloud corresponds to the third-party APP and the three-way panel, and the Haier Cloud corresponds to the Tob configuration tool, including the device space.
[0053] In one embodiment, the third-party administrator uses Figure 4 Log in to the ToB configuration tool using the Haiji.com developer account shown. First, select a smart application (system ID), create a space, and enter it before configuring, binding, and controlling devices. Upon entering a space, a dark account corresponding to the space is automatically created. A relationship between the third-party cloud system ID, client ID, and user ID is generated, and a dark account token is issued. The ToB configuration tool / third-party app initializes the uSDK based on the token and configures and binds the device.
[0054] Depend on Figure 4 The device center shown subscribes to device binding messages, automatically registers the device, checks the device authorization information in the ToB tool, generates device permissions for the systemId + deviceId (device number), and automatically adds the device to the space where the dark account resides. After successful device registration, the device registration message is published and automatically pushed to the third-party cloud, which maintains the device's user binding / ownership within the third-party. Use the third-party app to control the device.
[0055] Third-party cloud through Figure 4 The message platform shown subscribes to device data. The device data pushed by the message platform represents the data of devices that have the permission to be configured in the target space. Alternatively, the third-party cloud can also choose to query the device status through the third-party APP.
[0056] Based on the structure provided in this embodiment and the method for sending control instructions of this application, a home appliance control and data subscription solution dedicated to third-party businesses (such as hotels, real estate, apartments, etc.) is provided.
[0057] In one embodiment, Figure 4 FIG. 1 is a schematic diagram of the overall functional modules of the method for sending a control instruction according to an embodiment of the present application. Figure 4 As shown, IoT cloud (i.e. Figure 3 Haier Cloud includes account services, space center, device center, message platform, permission system, device access gateway and user access gateway.
[0058] Use the configuration tool (corresponding to Figure 3The process of completing the pre-installation stage (i.e. configuring the device) based on the ToB configuration tool includes: space maintenance, obtaining tokens, binding devices and controlling devices (debugging stage), while the user use of the device stage based on the third-party APP / third-party panel includes: obtaining tokens, controlling devices, pushing device attribute status and binding devices.
[0059] In one embodiment, third-party developers create smart applications on Haiji.com, apply for device authorization (enterprise registration is required), and activate services (device control, data subscription, etc.). Figure 5 As shown, Figure 5 : is a schematic diagram of an authorization process of a first device according to an embodiment of the present application. The authorization process includes:
[0060] Step 1. Register an account and become a developer (enterprise).
[0061] Step 2: Create a smart application: Haiji.com issues the systemId and systemKey; create the device code and device type of the device on Haiji.com; authorize data subscription on Haiji.com based on the device code, device type, instance and other dimensions.
[0062] Step 3. Enable device management service: Manage devices on Haiji.com based on device code, device type, instance, and other dimensions.
[0063] Furthermore, the process for the third-party administrator to use the ToB configuration tool to configure, bind, and debug devices in Haier Cloud includes:
[0064] STEP 1: Create a space.
[0065] STEP 2: Enter the space and obtain the dark account token of the target space.
[0066] STEP 3: Initialize the uSDK of the ToB configuration tool, configure, and bind the device.
[0067] STEP 4: Use the uSDK corresponding to the three-party panel or the uSDK corresponding to the third-party APP to control the device.
[0068] Among them, STEP4 can also be implemented through the following solutions:
[0069] Solution 1: A third-party user uses a third-party app to control the device. Prerequisite: The third-party cloud has already maintained the relationship between the third-party user and the space.
[0070] STEP4-1-1: After the third-party user logs in to the third-party APP, the third-party APP obtains the user's space from the third-party cloud.
[0071] STEP4-1-2: Enter the space and obtain a token.
[0072] STEP4-1-3: Initialize uSDK.
[0073] STEP 4-1-4: Use uSDK to control the device.
[0074] Solution 2: Third-party users use the three-way panel to control devices. Prerequisite: The three-party cloud has already maintained the relationship between the three-way panel and the space.
[0075] STEP4-2-1: When initializing the three-way panel, obtain the panel space from the three-way cloud.
[0076] STEP 4-2-2: Enter the space and obtain a token.
[0077] STEP4-2-3: Initialize uSDK.
[0078] STEP4-2-4: Use uSDK to control the device.
[0079] STEP 5: After the device is bound, it will be automatically registered and added to the space where the dark account is located.
[0080] It should be noted that device registration may indicate the establishment of a relationship among systemId (third-party cloud, equivalent to the target object) + deviceId (device code, equivalent to the first device) + spaceId (equivalent to the target space).
[0081] In one embodiment, Figure 6 is a schematic diagram of the process of creating a target space according to an embodiment of the present application, such as Figure 6 As shown, the following steps are included:
[0082] Step A1: The third-party operator sends a creation instruction to the configuration tool to instruct the configuration tool to create a space and obtain the space name, that is, the token mentioned above.
[0083] Step A2: Use the configuration tool to create a space and obtain the space name, which is the token mentioned above.
[0084] Step A3: Create a space in the space center of the IoT cloud and generate a space number.
[0085] Optionally, in one embodiment, Figure 7 As shown, you can also query the space list in the space center and determine the target space from the space list. The space list includes all created spaces, and each space corresponds to a bound device.
[0086] Step A4: Publish the new space message on the IoT Cloud messaging platform.
[0087] Step A5: Push the newly added space message to the third-party cloud or subscribe to the newly added space message via the third-party cloud.
[0088] In one embodiment, a third-party operator logs in to the configuration tool, selects a smart application, and when configuring a device for the smart application for the first time, a space needs to be created because no space existed before. When the third-party operator creates a space, it is necessary to enter a space name. In order to facilitate the association of the IoT cloud with the third party (i.e., the target object), the room name can be determined as the space name. Add new devices to the space, and save the relationship between the smart application, space, and the three parties in the space center. Figure 8 As shown, Figure 8 This is a schematic diagram of the configuration process of the first device according to an embodiment of the present application. The device can be bound to the space so that the space has the authority to interact with the device.
[0089] After a space is successfully created, the space center publishes a new space information to a new topic on the messaging platform. After the third-party cloud subscribes to this topic, it will receive new space information in a timely manner.
[0090] Among them, space can be understood as the authority unit of devices authorized by manufacturers to three parties. Multiple devices in the same space can communicate with each other; devices in different spaces are independent of each other and cannot communicate.
[0091] In one embodiment, Figure 9 is a schematic diagram of the control process of the first device according to an embodiment of the present application, such as Figure 9 As shown in the figure, when a user uses a third-party APP to control a Haier device, the uSDK control interface is called to check whether the device exists in the local cache. If so, the local key localKey is retrieved from the cache and the user's control command is sent to the device. If not, a search failure message is returned.
[0092] When the localKey becomes invalid and device control fails, the local key localKey saved in the cloud is obtained through uSDK, and the localKey in the cloud is updated to the local cache to continue sending control commands.
[0093] In one embodiment, Figure 10 is a schematic diagram of a device data push process of a first device according to an embodiment of the present application, such as Figure 10 As shown, including:
[0094] Step B0: The Haier device sends device attributes to the device access gateway;
[0095] Step B1: The device access gateway publishes the device attributes to the message platform;
[0096] Step B2: Obtain a device list in the device center;
[0097] Step B3: Query device permissions in the device list;
[0098] Step B4: Push device data to the third-party cloud.
[0099] Through the above embodiment, a solution based on space control devices can be provided based on the user information and device information that needs to be authorized input by three users, so that third-party services can be carried out according to the space information.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0101] Figure 11 is a structural block diagram of a device for sending a control instruction according to an embodiment of the present application; Figure 11 As shown, including:
[0102] A creation module 1120 is configured to create a target space corresponding to a target area in response to a creation instruction for creating a space sent by a target object, wherein the target area is an area determined by the target object according to a preset rule;
[0103] a configuration module 1140 configured to, upon determining that the target space has been created, configure a first correspondence between a first device and the target space according to a configuration instruction of the target object, and determine a second correspondence between the target space, the first device, and the target object according to the first correspondence, wherein the first device has been pre-enabled for permission to be configured in the target space;
[0104] The sending module 1160 is configured to send the control instruction of the target object to the target device in the target space according to the second corresponding relationship, so as to control the target device according to the control instruction.
[0105] Through the above-mentioned device, in response to the creation instruction for creating a space sent by the target object, a target space corresponding to the target area is created, wherein the target area is the area determined by the target object according to preset rules; when it is determined that the target space has been created, the first correspondence between the first device and the target space is configured according to the configuration instruction of the target object, and the second correspondence between the target space, the first device and the target object is determined according to the first correspondence, wherein the first device has pre-opened the permission to be configured to the target space; according to the second correspondence, the control instruction of the target object is sent to the target device in the target space to control the target device according to the control instruction, which solves the problem of how to control the target device in the related art, thereby achieving the purpose of controlling the target device.
[0106] Optionally, in one embodiment, creating a target space corresponding to a target area may include: obtaining the area type in which the target area is located; creating a corresponding target space according to the area type in which the target area is located, wherein the area type in which the target area is located includes at least one of the following: residential area, hotel residence, and apartment residence.
[0107] In an exemplary embodiment, the above-mentioned configuration module 1140 is also used to receive an approval instruction sent when the target object agrees to the authorization request of the first device, wherein the permissions requested by the authorization request include at least one of the following: device control permissions, device data subscription services; determining the device data corresponding to the first device, the first authorization information corresponding to the device data, the control permissions of the first device and the second authorization information corresponding to the control permissions; synchronizing the first authorization information and the second authorization information to the target space according to the approval instruction, thereby enabling the first device to be configured to the target space.
[0108] The above-mentioned device data may include device type, device number, device instance, etc., but is not limited thereto.
[0109] Furthermore, after synchronizing the first authorization information and the second authorization information to the target space according to the approval instruction, thereby enabling the first device to be configured in the target space, the authorization information of the device management service can also be enabled to allow operations such as adding, deleting, and modifying device data in the target space.
[0110] In an exemplary embodiment, the above-mentioned configuration module 1140 is also used to obtain a first device list corresponding to the target space, wherein the first device list includes devices that have permission to be configured to the target space; searching for the device name of the first device corresponding to the configuration instruction of the target object in the first device list; if the search is successful, binding the device name of the first device and the target space to obtain the first correspondence.
[0111] In other embodiments, if the search fails, it means that the device name of the first device does not exist in the first device list. The device name of the first device is directly added to the first device list, and the device name of the first device is bound to the target space to obtain the first corresponding relationship.
[0112] In an exemplary embodiment, the above-mentioned configuration module 1140 is also used to obtain the device names of other devices in the first device list except the device name of the first device; push the device names of the other devices to the target object, and send an inquiry message to the target object, wherein the inquiry message is used to inquire the target object whether to continue to configure the third correspondence between the other devices and the target object.
[0113] In an exemplary embodiment, the above-mentioned configuration module 1140 is also used to obtain first spatial information pre-generated for the target space, wherein the spatial information includes: space name, space type and space number; when it is determined that the second spatial information of the target space in the configuration instruction of the target object is consistent with the first spatial information, the specified relationship between the target object and the target area is determined as the specified relationship between the target object and the target space; and the second corresponding relationship between the target space, the first device and the target object is obtained according to the first corresponding relationship and the specified relationship between the target object and the target space.
[0114] In an exemplary embodiment, the above-mentioned sending module 1160 is also used to obtain a space list corresponding to the target object, wherein the space list includes at least a first space; when the target space includes the first space, the corresponding device with the same device name as the first device in the second device list corresponding to the first space is determined as the target device, and other devices in the second device list except the target device are determined as non-target devices, wherein the devices in the second device list support mutual communication; and the control instruction of the target object is sent to the target device in the target space according to the second corresponding relationship.
[0115] In an exemplary embodiment, the above-mentioned sending module 1160 is also used to, when the space list includes the first space and the second space, respectively determine the second device list corresponding to the first space and the third device list corresponding to the second space, wherein the devices in the second device list and the devices in the third device list do not support mutual communication; determine the second device with the same device name as the first device from the second device list, and determine the third device with the same device name as the first device from the third device list; determine the device with the same device number as the first device among the second device and the third device as the target device; and send the control instruction of the target object to the target device according to the second correspondence.
[0116] For example, if the device name of the first device is a washing machine and the device number of the first device is 1, and a washing machine is identified in both the second device list and the third device list, the washing machine in the second device list is numbered 1 and the washing machine in the third device list is numbered 2, then the washing machine in the second device list is determined to be the target device.
[0117] In this embodiment, for devices with the same device name in different spaces, the device number can be further used for screening, and the device with the same device number as the first device is determined as the target device, which can improve the accuracy of determining the target device.
[0118] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0119] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0120] S1, in response to a creation instruction for creating a space sent by a target object, creating a target space corresponding to a target area, wherein the target area is an area determined by the target object according to a preset rule;
[0121] S2, when it is determined that the target space has been created, configuring a first correspondence between a first device and the target space according to a configuration instruction of the target object, and determining a second correspondence between the target space, the first device, and the target object according to the first correspondence, wherein the first device has pre-activated permission to be configured in the target space;
[0122] S3: Send the control instruction of the target object to the target device in the target space according to the second corresponding relationship, so as to control the target device according to the control instruction.
[0123] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0124] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0125] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0126] S1, in response to a creation instruction for creating a space sent by a target object, creating a target space corresponding to a target area, wherein the target area is an area determined by the target object according to a preset rule;
[0127] S2, when it is determined that the target space has been created, configuring a first correspondence between a first device and the target space according to a configuration instruction of the target object, and determining a second correspondence between the target space, the first device, and the target object according to the first correspondence, wherein the first device has pre-activated permission to be configured in the target space;
[0128] S3: Send the control instruction of the target object to the target device in the target space according to the second corresponding relationship, so as to control the target device according to the control instruction.
[0129] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0130] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0131] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0132] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for sending a control instruction, characterized in that: include: In response to a creation instruction for creating a space sent by a target object, creating a target space corresponding to a target area, wherein the target area is an area determined by the target object according to a preset rule; When it is determined that the target space has been created, configuring a first correspondence between a first device and the target space according to a configuration instruction of the target object, and determining a second correspondence between the target space, the first device, and the target object according to the first correspondence, wherein the first device has been pre-enabled for permission to be configured in the target space; The control instruction of the target object is sent to the target device in the target space according to the second corresponding relationship, so as to control the target device according to the control instruction.
2. The method for sending a control instruction according to claim 1, wherein: The permission for the first device to be configured in the target space is enabled in the following manner: receiving an approval instruction sent by the target object when agreeing to the authorization request of the first device, wherein the permission requested in the authorization request includes at least one of the following: device control permission and device data subscription service; Determining device data corresponding to the first device, first authorization information corresponding to the device data, control authority of the first device, and second authorization information corresponding to the control authority; The first authorization information and the second authorization information are synchronized into the target space according to the approval instruction, thereby activating the permission for the first device to be configured into the target space.
3. The method for sending a control instruction according to claim 1, wherein: Configuring a first correspondence between a first device and the target space according to a configuration instruction of the target object includes: Obtaining a first device list corresponding to the target space, wherein the first device list includes devices that have permission to be configured in the target space; Searching the first device list for a device name of a first device corresponding to the configuration instruction of the target object; If the search is successful, the device name of the first device and the target space are bound to obtain the first corresponding relationship.
4. The method for sending a control instruction according to claim 3, wherein: After binding the device name of the first device and the target space to obtain the first corresponding relationship, the method further includes: Obtaining device names of other devices in the first device list except the device name of the first device; The device name of the other device is pushed to the target object, and a query message is sent to the target object, where the query message is used to inquire the target object whether to continue configuring the third correspondence between the other device and the target object.
5. The method for sending a control instruction according to claim 1, wherein: Determining a second corresponding relationship between the target space, the first device, and the target object according to the first corresponding relationship includes: Acquire first space information pre-generated for the target space, wherein the space information includes: a space name, a space type, and a space number; When it is determined that the second spatial information of the target space in the configuration instruction of the target object is consistent with the first spatial information, determining the designated relationship between the target object and the target area as the designated relationship between the target object and the target space; A second corresponding relationship between the target space, the first device, and the target object is obtained according to the first corresponding relationship, the specified relationship between the target object, and the target space.
6. The method for sending a control instruction according to claim 1, wherein: Sending the control instruction of the target object to the target device in the target space according to the second corresponding relationship includes: Obtaining a space list corresponding to the target object, wherein the space list includes at least a first space; In a case where the target space includes the first space, determining a corresponding device in a second device list corresponding to the first space having the same device name as the first device as the target device, and determining other devices in the second device list except the target device as non-target devices, wherein the devices in the second device list support communication with each other; The control instruction of the target object is sent to the target device in the target space according to the second corresponding relationship.
7. The method for sending a control instruction according to claim 6, wherein: The method further comprises: In a case where the space list includes the first space and the second space, respectively determining a second device list corresponding to the first space and a third device list corresponding to the second space, wherein the devices in the second device list and the devices in the third device list do not support mutual communication; Determine a second device with the same device name as the first device from the second device list, and determine a third device with the same device name as the first device from the third device list; Determine the device with the same device number as the first device among the second device and the third device as the target device; The control instruction of the target object is sent to the target device according to the second corresponding relationship.
8. A device for sending a control instruction, characterized in that: include: a creation module, configured to create a target space corresponding to a target area in response to a creation instruction for creating a space sent by a target object, wherein the target area is an area determined by the target object according to a preset rule; a configuration module for, upon determining that the target space has been created, configuring a first correspondence between a first device and the target space according to a configuration instruction of the target object, and determining a second correspondence between the target space, the first device, and the target object according to the first correspondence, wherein the first device has been pre-enabled for permission to be configured in the target space; A sending module is used to send the control instruction of the target object to the target device in the target space according to the second corresponding relationship, so as to control the target device according to the control instruction.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.