Device linkage control method, device, electronic device and storage medium
By synchronizing the virtual device status of the second system in the first system and utilizing the linkage relationship of the virtual device, the obstacles of smart home devices are solved, and the automatic linkage control of another system is achieved without increasing hardware costs, which improves the user experience.
Patent Information
- Application Number
- CN202210006993.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-05
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-01-05
AI Technical Summary
In the prior art, due to the differences between different manufacturers and platforms, smart home devices have obstacles to interconnection and linkage control, and it is impossible to realize automated linkage control through one system.
By synchronizing the device status of the target virtual device under the second system in the first system, using the linkage relationship of the virtual device in the two systems, the triggering and execution of the automation scheme is realized, and the hardware cost of the real device is avoided.
It realizes the automatic linkage control of one system to another without increasing hardware costs, improving the user experience.
Smart Images

Figure CN114527668B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home, and more specifically, to a device linkage control method, apparatus, electronic device, and storage medium. Background Art
[0002] With the popularization of smart homes, the number of smart home devices purchased by users will increase, and these devices may not be from the same manufacturer and brand. Due to factors such as platform differences and technical protocol differences, there are certain obstacles to their interconnection and mutual linkage control.
[0003] In the existing technology, only the control of real devices between different platforms can be achieved through third-party authorization and the docking of system platforms, but it is impossible to achieve automatic linkage control of another system through one system. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a device linkage control method, apparatus, electronic device and storage medium, so as to realize automatic linkage control of another system through one system without increasing the hardware cost of the actual device.
[0005] In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:
[0006] In a first aspect, the present application provides a device linkage control method, the method comprising:
[0007] Acquire the current device state of the target virtual device in the first system; the current device state of the target virtual device is obtained by synchronizing the device state of the target virtual device in the second system after executing the control instruction in the second system to the first system;
[0008] Determining an automation solution associated with the target virtual device under the first system;
[0009] If the current device state of the target virtual device meets the triggering condition of the target automation solution in the associated automation solution, the target automation solution under the first system is executed.
[0010] In a second aspect, the present application provides a device linkage control apparatus, the apparatus comprising:
[0011] a data receiving module configured to obtain a current device state of a target virtual device in the first system; the current device state of the target virtual device is obtained by synchronizing the device state of the target virtual device in the second system after executing a control instruction in the second system to the first system;
[0012] an automation solution determining module, configured to determine an automation solution associated with the target virtual device under the first system;
[0013] The automation execution module is configured to execute the target automation solution under the first system if the current device state of the target virtual device meets the triggering condition of the target automation solution in the associated automation solution.
[0014] In an optional embodiment, the control instructions under the second system include automation control instructions; and the current device state of the target virtual device is synchronously obtained by the following steps:
[0015] When the target event in the second system meets the triggering condition of the automation solution in the second system, and the automation action device in the automation solution in the second system is the target virtual device in the second system, generating an automation control instruction for the target virtual device in the second system according to the automation solution in the second system;
[0016] According to the automation control instruction, the target virtual device under the second system is controlled to execute the target action of the automation solution under the second system, and the device state of the target virtual device under the second system after executing the target action is synchronized to the first system.
[0017] In an optional embodiment, the automation execution module is used to determine that the target virtual device is an automation condition device in the target automation scheme if the current device state of the target virtual device meets the trigger condition of the target automation scheme in the associated automation scheme, and control the automation action device in the target automation scheme to execute the target action of the target automation scheme.
[0018] In an optional embodiment, the device further comprises:
[0019] A communication establishment module is used to establish a binding relationship between the first system and the second system, and to establish a communication link between the first system and the second system based on the binding relationship; the current device status of the target virtual device is obtained by synchronizing the device status of the target virtual device in the second system after executing the control instructions in the second system to the first system based on the communication link between the first system and the second system.
[0020] In an optional embodiment, the device further comprises:
[0021] A virtual device creation module is used to receive a virtual device creation request under the first system; the virtual device creation request includes attribute parameters of the virtual device requested to be created; according to the attribute parameters in the virtual device creation request, the corresponding virtual device is created in the first system; after the virtual device is created in the first system, based on the binding relationship between the first system and the second system, the virtual device created in the first system is synchronously created in the second system.
[0022] In an optional embodiment, the virtual device creation module is used to generate a virtual device template corresponding to the virtual device based on the virtual device created in the first system; generate a virtual device creation request under the second system according to the virtual device template; the virtual device creation request under the second system is used to instruct the synchronous creation of the corresponding virtual device based on the virtual device template in the second system.
[0023] In an optional embodiment, the device further comprises:
[0024] The device state adjustment module is used to restore the device state of the target virtual device to the device state before the target virtual device executes the control instruction in the second system, so as to perform the next device linkage control between the first system and the second system.
[0025] In a third aspect, the present application provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the device linkage control method as described in any one of the aforementioned embodiments are implemented.
[0026] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the device linkage control method as described in any one of the aforementioned embodiments.
[0027] The device linkage control method, apparatus, electronic device and storage medium provided in the embodiments of the present application are such that, since both the first system and the second system have a target virtual device, after the target virtual device in the second system executes the control instruction in the second system, the device state of the target virtual device in the second system will be synchronized to the first system, thereby obtaining the current device state of the target virtual device in the first system. In the automation scheme associated with the target virtual device in the first system, when the current device state of the target virtual device meets the triggering condition of a certain target automation scheme, the target automation scheme in the first system will be executed. In this way, by utilizing the synchronization of the device state of the virtual device in the two systems, the user can control the execution of the automation scheme associated with the virtual device in the first system through the second system, that is, without increasing the hardware cost of the real device, the automated linkage control of another system is achieved through one system, thereby improving the user experience.
[0028] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 A schematic diagram showing an application environment of the device linkage control method provided in an embodiment of the present application is shown;
[0031] Figure 2 A schematic diagram showing another application environment of the device linkage control method provided in an embodiment of the present application is shown;
[0032] Figure 3 A schematic diagram of a flow chart of a device linkage control method provided in an embodiment of the present application is shown;
[0033] Figure 4 Another flow chart of the device linkage control method provided in an embodiment of the present application is shown;
[0034] Figure 5 Another flow chart of the device linkage control method provided in the embodiment of the present application is shown;
[0035] Figure 6 Another flow chart of the device linkage control method provided in the embodiment of the present application is shown;
[0036] Figure 7 A schematic diagram of an application scenario applicable to an embodiment of the present application is shown;
[0037] Figure 8 A functional module diagram of a device linkage control device provided in an embodiment of the present application is shown;
[0038] Figure 9 Another functional module diagram of the device linkage control device provided in an embodiment of the present application is shown;
[0039] Figure 10 A hardware structure block diagram of an electronic device provided in an embodiment of the present application is shown.
[0040] Icons: 10-first system; 20-second system; 30-terminal device; 110-first gateway device; 120-first home appliance; 130-first server; 140-first router; 120a-door and window sensor; 120b-smart switch; 120c-light bulb; 210-second server; 220-second home appliance; 230-second router; 240-second gateway device; 800-device linkage control device; 810-data receiving module; 820-automation plan determination module; 830-automation execution module; 840-communication establishment module; 850-virtual device creation module; 860-device status adjustment module; 111-processor; 112-storage medium; 113-memory; 114-input and output interface; 115-wired or wireless network interface; 116-power supply; 1121-operating system; 1122-data; 1123-application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.
[0042] See also Figure 1 , Figure 1 The figure is a schematic diagram of an application environment applicable to embodiments of the present application. The first system 10 and the second system 20 can achieve interconnection and interoperability between the two systems through third-party authorization and system platform-to-system platform docking. For example, when devices in the first system 10 are connected to the second system 20, users can control these devices in the first system 10 through voice control or automated linkage functions in the second system 20.
[0043] Third-party authorization primarily involves granting permissions to third-party accounts, such as the common OAuth2 (Open Authentication) authorization method. This method allows one system to access or control devices or data under a specific account on another system.
[0044] Once permissions are established, system platforms connect and communicate with each other, following a mutually agreed-upon technical protocol (e.g., using HTTPS, MQTT, etc. for transmission, and JSON for application-layer data). This allows for mutual communication by translating one party's interface or data into one recognizable by the other. After this communication is complete, control commands issued from one system, through the intermediate translation and conversion protocol between the two system platforms, are ultimately converted into control commands recognizable by the other system, ultimately controlling certain devices.
[0045] In this embodiment, the first system 10 and the second system 20 may be home systems or other types of intelligent systems, which are not limited here.
[0046] In this embodiment, a home system is used as an example. The first system 10 includes a first gateway device 110, a first home device 120 connected to the first gateway device 110, and a first server 130 connected to the first gateway device 110. There can be at least one first gateway device 110, and at least one first home device 120. Furthermore, when there are multiple first gateway devices 110, different first gateway devices 110 can communicate with each other.
[0047] In this embodiment, the first gateway device 110 may be an intelligent gateway for smart home control, capable of performing functions such as system information collection, information input and output, centralized control, remote control, and coordinated control. The gateway device may be responsible for specific security alarms, home appliance control, and electricity usage information collection. The first gateway device 110 may also wirelessly exchange information with products such as intelligent interactive terminals. The first gateway device 110 also features wireless routing capabilities, excellent wireless performance, network security, and good coverage.
[0048] In this embodiment, the first home device 120 may include a variety of smart home appliances, sensing devices, and detection devices installed in the indoor space, such as smart TVs, smart refrigerators, smart air conditioners, temperature and humidity sensors, pressure sensors, smoke sensors, human body sensors, door and window sensors, smart switches, sockets, electric lights, infrared transmitters, camera devices, etc. The first home device 120 connected to the first gateway device 110 can exchange information and instructions with the first gateway device 110. The first gateway device 110 and the first home device 120 can be connected via Bluetooth, WiFi (Wireless-Fidelity), ZigBee (ZigBee technology), Ethernet, and other communication methods. Of course, the connection method between the first gateway device 110 and the first home device 120 is not limited in this embodiment of the application.
[0049] In this embodiment, the first server 130 can be a local server, a cloud server or other server, and the specific server type may not be limited in the embodiment of this application. The first server 130 connected to the first gateway device 110 can exchange information with the first gateway device 110 wirelessly. The first gateway devices 110 set in different indoor spaces can communicate with the same first server 130 through the network to exchange information between the first server 130 and the first gateway device 110. Among them, the first server 130 can be communicated with the first gateway device 110 through the first router 140, and the first home device 120 can be connected to the first router 140 through WiFi, Ethernet, Thead and other communication methods.
[0050] In this embodiment, the first server 130 is also connected to the second server 210 in the second system 20. The second server 210 can also be a local server, a cloud server, or other server. The specific server type is not limited in this embodiment of the application. In addition, similar to the first system 10, the second system 20 also includes various second home devices 220, a second router 230 connected to the second server 210, a second gateway device 240, and other devices. The specific contents are not described in detail here. By triggering the execution of some voice control or automatic linkage on the first system 10, some devices in the second system 20 can be controlled. Similarly, by triggering the execution of some voice control or automatic linkage on the second system 20, some devices in the first system 10 can also be controlled.
[0051] Furthermore, the terminal device 30 can exchange information with the first server 130 and the second server 210 via wireless methods such as 2G / 3G / 4G / 5G / WiFi. Of course, the connection method between the terminal device 30 and the first server 130 and the second server 210 is not limited in the embodiment of the present application. In some embodiments, the terminal device 30 can also exchange information with the first gateway device 110 and the second gateway device 240 via wireless methods such as 2G / 3G / 4G / 5G / WiFi.
[0052] Taking the first system 10 as an example, the terminal device 30 can also be used to interact with the user, facilitating wireless communication between the user and the first gateway device 110 via the terminal device 30 and the first router 140. Furthermore, the user can add account information to both the first gateway device 110 and the terminal device 30, and synchronize information between the first gateway device 110 and the terminal device 30 using this account information. The terminal device 30 may include a personal computer (PC), a tablet computer, a smartphone, a personal digital assistant (PDA), etc., without limitation herein.
[0053] In some embodiments, the user can set different trigger scenarios or automatic linkages through the application (APP) of the terminal device 30. For example, APP1 on the terminal device 30 can communicate with the first server 130 in the first system 10, thereby setting different trigger scenarios or automatic linkages in the first system 10; APP2 on the terminal device 30 can communicate with the second server 210 in the second system 20, thereby setting different trigger scenarios or automatic linkages in the second system 20.
[0054] Taking the first system 10 as an example, as one approach, the terminal device 30 can upload the scenario configuration information or automation plan to the first server 130. When the triggering condition of the triggering scenario or automation is met, the first server 130 can find the device corresponding to the execution action in the scenario configuration information or automation plan based on the stored scenario configuration information or automation plan, and notify the device to perform the execution action to meet the execution result of the triggering scenario or automation. As another approach, the first server 130 can also send the scenario configuration information or automation plan to the first gateway device 110, and the first gateway device 110 can find the device corresponding to the execution action in the scenario configuration information or automation plan based on the stored scenario configuration information or automation plan. At the same time, the first gateway device 110 can feedback the execution status of the device to the first server 130.
[0055] For example, see Figure 2 When a user sets the automation scheme "Automatically turn on lights when doors and windows are open" through App 1 on terminal device 30, the trigger condition for this automation scheme is "Doors and windows open," and the execution action is "Smart switch controls light bulb to turn on." Based on this automation scheme, the triggering device is the door and window sensor 120a, and the executing device is the smart switch 120b connected to light bulb 120c. The automation scheme can be stored on either the first gateway device 110 or the first server 130, and the path for executing the automation linkage can be through a local area network or a wide area network.
[0056] If automation is performed locally on the first gateway device 110 through a LAN path, the door and window sensor 120a senses that the doors and windows are open, and reports the information event of the doors and windows being opened to the first gateway device 110. After receiving the information event, the first gateway device 110 can find the device corresponding to the execution action in the automation plan according to the stored automation plan, which is the smart switch 120b in this example, and notify the smart switch 120b to control the lights to be turned on, thereby realizing the automated linkage of automatically turning on the lights when the doors and windows are opened.
[0057] If automation is performed on the first server 130 through a wide area network path, the door and window sensor 120a senses that the door and window are open, and reports the information event of the door and window opening to the first gateway device 110. After receiving the event, the first gateway device 110 reports the event to the first server 130. The first server 130 finds the device corresponding to the execution action in the stored automation plan, which is the smart switch 120b in this example, and notifies the smart switch 120b through the first gateway device 110 to control the light to be turned on, thereby realizing the automated linkage of automatically turning on the light when the doors and windows are opened.
[0058] Furthermore, after turning on the light, the successful execution result of turning on the light can be fed back to the first gateway device 110. After receiving this information, the first gateway device 110 can report the current time, the identifier (ID, Identity Document) of the automation solution, and the execution result of the automation solution to the first server 130, which will store it. The ID can be a symbol that uniquely identifies the automation solution, and can be a number, text, etc., which is not limited here.
[0059] The various embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0060] Please refer to Figure 3 , is a flow chart of the device linkage control method provided in the embodiment of the present application. It should be noted that the device linkage control method in the embodiment of the present application is not based on Figure 3The specific order below is for limitation. It should be understood that in other embodiments, the order of some steps in the device linkage control method of the present application can be interchanged according to actual needs, or some steps can be omitted or deleted. The device linkage control method can be applied to an electronic device, which can be a terminal device 30, or a server (first server 130) or a gateway (first gateway device 110) under the first system 10, or a server (second server 210) or a gateway (second gateway device 240) under the second system 20. Below, taking the electronic device as a server or gateway under the first system 10 as an example, Figure 3 The specific process shown is described in detail.
[0061] Step S301, obtaining the current device state of the target virtual device in the first system; the current device state of the target virtual device is obtained by synchronizing the device state of the target virtual device in the second system after executing the control instruction in the second system to the first system.
[0062] The first system and the second system are two different systems, for example, two different smart home systems. Virtual devices are pre-synchronized and created in the first system and the second system. These virtual devices, aside from being virtual, possess the same common characteristics as actual devices (real devices), such as device type identification, device name, on / off state attributes, temperature attributes, brightness attributes, etc.
[0063] In other words, the virtual device in this embodiment has the basic attribute parameters of a real device (such as device type identification, device name, unique ID, etc.), and can also have other device attributes (such as switch status attributes, temperature attributes, brightness attributes, etc.). For example, you can define a "virtual device - socket" with the "switch status" attribute; define a "virtual device - lamp" with the "switch status" attribute and the "brightness" attribute; and define a "virtual device - counter" with the "count value" attribute.
[0064] In this embodiment, the target virtual device can be any virtual device created synchronously in the first system and the second system. Therefore, the target virtual device in the first system and the target virtual device in the second system have the same attribute parameters. In this way, the target virtual device can act as an intermediary to generate a linkage relationship between the two systems. When there is a control instruction for the target virtual device in the second system, the target virtual device in the second system will be controlled to execute the control instruction, and the device state of the target virtual device in the second system after executing the control instruction will be synchronized to the first system, thereby obtaining the current device state of the target virtual device in the first system. Among them, the device state may include information such as the switch state and function state of the virtual device, which can reflect the current working status of the virtual device. For example, for "virtual device - socket", its device state may include the switch state, and for "virtual device - lamp", its device state may include the switch state, brightness, etc.
[0065] Step S302: Determine an automation solution associated with the target virtual device in the first system.
[0066] In this embodiment, after creating a virtual device in the first system, the user can configure one or more automation schemes associated with the virtual device in the first system through the terminal device 30 and store them in the electronic device. The automation schemes in the first system refer to the linkage relationships established between the various devices in the first system. After obtaining the current device status of the target virtual device in the first system, the electronic device can search for the one or more automation schemes associated with the target virtual device.
[0067] Step S303: If the current device state of the target virtual device meets the triggering condition of the target automation solution in the associated automation solution, the target automation solution under the first system is executed.
[0068] In this embodiment, when a virtual device acts as an intermediary to establish a linkage relationship between two systems, it typically serves as an automation trigger device. After obtaining the current device state of the target virtual device, the electronic device can compare the current device state with the trigger conditions of each automation scheme associated with the target virtual device. When the current device state of the target virtual device meets the trigger conditions of a particular automation scheme, the target automation scheme is determined as the target automation scheme among the automation schemes associated with the target virtual device and executed, thereby achieving linkage control between the two systems.
[0069] It can be seen that the device linkage control method provided by the embodiment of the present application has a target virtual device in both the first system and the second system. After the target virtual device in the second system executes the control instruction in the second system, the device state of the target virtual device in the second system will be synchronized to the first system, thereby obtaining the current device state of the target virtual device in the first system. In the automation scheme associated with the target virtual device in the first system, when the current device state of the target virtual device meets the trigger condition of a certain target automation scheme, the target automation scheme in the first system is executed. In this way, by utilizing the synchronization of the device state of the virtual device in the two systems, the user can control the execution of the automation scheme associated with the virtual device in the first system through the second system, that is, without increasing the hardware cost of the real device, the automated linkage control of another system is achieved through one system, thereby improving the user experience.
[0070] In some embodiments, the control instructions under the second system can be triggered and generated by the user. For example, the user can issue a control instruction for the target virtual device through voice of the terminal device 30 or operate APP2 on the terminal device 30 to issue a control instruction for the target virtual device. After the server or gateway in the second system controls the target virtual device to execute the control instruction, the device status of the target virtual device is synchronized to the first system.
[0071] In other embodiments, the control instructions in the second system may also be generated by triggering an automation scenario in the second system. The user configures one or more automation scenarios associated with the target virtual device in the second system via the terminal device 30. The control instructions in the second system may include automation control instructions. The current device state of the target virtual device is synchronized by the following steps:
[0072] When the target event under the second system meets the triggering condition of the automation plan under the second system, and the automation action device in the automation plan under the second system is the target virtual device under the second system, an automation control instruction for the target virtual device under the second system is generated according to the automation plan under the second system; according to the automation control instruction, the target virtual device under the second system is controlled to execute the target action of the automation plan under the second system, and the device state of the target virtual device under the second system after executing the target action is synchronized to the first system.
[0073] In this embodiment, the automation scheme may include trigger conditions and target actions. The devices in the automation scheme may include automation condition devices and automation action devices. When the automation condition devices meet the trigger conditions, the automation action devices perform the corresponding target actions.
[0074] The target event under the second system can be understood as the event currently occurring in the second system. When the event currently occurring in the second system is an event related to the automation condition equipment in a certain automation scheme, and the event meets the triggering conditions of the automation scheme, the server or gateway in the second system finds the automation action equipment in the automation scheme. If the automation action equipment is the target virtual device under the second system, an automation control instruction is generated for the target virtual device. According to the automation control instruction, the target virtual device under the second system is controlled to perform the corresponding target action, and the device status of the target virtual device after performing the target action is synchronized to the first system.
[0075] Optionally, the above step S303 may include: if the current device state of the target virtual device meets the trigger condition of the target automation scheme in the associated automation scheme, then determining the target virtual device as the automation condition device in the target automation scheme, and controlling the automation action device in the target automation scheme to execute the target action of the target automation scheme.
[0076] In other words, a virtual device can participate in the execution of a target automation solution as an automation condition device. For any selected automation solution associated with a target virtual device in the first system, if the target virtual device's device state meets the trigger conditions of the selected automation solution, the selected automation solution is determined as the target automation solution, and the target virtual device is determined as the automation condition device in the target automation solution. After determining the automation action device in the target automation solution, the automation action device is controlled to execute the target action of the target automation solution, thereby achieving execution of the target automation solution in the first system.
[0077] In actual applications, whether it is the virtual device created in the first system or the second system, in addition to acting as an intermediary to generate a linkage relationship between the two system platforms, it can also serve as an automation condition device or an automation action device to participate in the automation linkage control of this system platform, expanding the application scenarios of virtual devices.
[0078] Taking the target virtual device in the first system as an example, assuming that the automation scheme associated with the target virtual device includes the first automation scheme, and the automation action device corresponding to the first automation scheme is the target virtual device, then when the electronic device obtains the first target event in the first system and the first target event meets the triggering conditions of the first automation scheme, it controls the target virtual device to execute the target action of the first automation scheme.
[0079] For example, a user creates a virtual device—a counter—in the first system. One of the automation schemes associated with this virtual device (the first automation scheme) is to execute the target action "increase the counter value by 1" if the human motion sensor at the entrance detects human movement. For the electronic device, when the first target event obtained in the first system is "human motion sensor reports human movement," indicating that the trigger condition for the first automation scheme has been met, the electronic device determines that the automation action device corresponding to the target action in the first automation scheme is the counter, and then controls the counter's count value to increment by 1.
[0080] Assuming that the automation scheme associated with the target virtual device also includes a second automation scheme, and the automation condition device corresponding to the second automation scheme is the target virtual device; then, when the electronic device obtains the second target event associated with the target virtual device in the first system and the second target event meets the triggering condition of the second automation scheme, it determines the automation action device corresponding to the second automation scheme and controls the automation action device to execute the target action of the second automation scheme.
[0081] For example, a user creates a virtual device called a counter. One of the automation schemes associated with this virtual device (the second automation scheme) is to announce "XXX people have passed through the entrance" if the counter's count value is a multiple of 100. For the electronic device, if the second target event acquired in the first system is "counter's count value" and the counter's count value is a multiple of 100, indicating that the trigger condition for the second automation scheme has been met, the device is determined to execute the target action in the second automation scheme as a voice announcer, and the voice announcer is controlled to announce "XXX people have passed through the entrance."
[0082] Through the above two automation solutions, namely Automation 1: if the human motion sensor at the entrance detects human movement, the target action "the counter count value increases by 1" is executed; and Automation 2: if the counter count value is a multiple of 100, the voice broadcast "the number of people passing through the entrance is XXX" is broadcast. The pedestrian flow reporting function in the first system can be realized without adding additional hardware equipment costs.
[0083] It should be noted that in actual applications, virtual devices may not participate in the automated linkage, but may be presented to the user as a status. For example, the virtual device "presence or absence sensor" in the master bedroom can present the status of "occupied" or "unoccupied".
[0084] Alternatively, see Figure 4 Before step S301, the device linkage control method may further include:
[0085] Step S401: Establish a binding relationship between the first system and the second system, and establish a communication link between the first system and the second system according to the binding relationship.
[0086] The first and second systems can establish a binding relationship through account authorization, and then establish a communication link between the first and second systems based on the binding relationship, so as to enable information exchange between the first and second systems through the communication link. For example, the current device state of the target virtual device in the first system can be obtained by synchronizing the device state of the target virtual device in the second system after executing the control instructions of the second system to the first system based on the communication link between the first and second systems.
[0087] In this embodiment, the user can authorize the account permissions of the first system on the APP2 corresponding to the second system. In this way, the second system can obtain the device information of all devices under the account of the first system and store it in the server, gateway and other devices of the second system. Similarly, the user can also authorize the account permissions of the second system on the APP1 corresponding to the first system. In this way, the first system can obtain the device information of all devices under the account of the second system and store it in the server, gateway and other devices of the first system. In this way, by establishing a binding relationship between the first system and the second system, it is conducive to achieving interconnection and mutual linkage control between the two systems.
[0088] In actual applications, users can create corresponding virtual devices in the first system according to application requirements, and synchronize the virtual devices to the second system based on the binding relationship between the first system and the second system. Figure 5 , the device linkage control method may further include:
[0089] Step S501: receiving a virtual device creation request from a first system; the virtual device creation request includes attribute parameters of the virtual device requested to be created.
[0090] For example, a user can use a configuration tool such as a mobile phone APP or SAAS software tool to manually select and create a certain type of virtual device. The configuration tool responds to the user's selection operation and sends a virtual device creation request to the electronic device of the first system. The virtual device creation request may include attribute parameters such as the unique coding ID, device type identifier, device attributes, and device name of the virtual device requested to be created by the user.
[0091] Step S502: Create a corresponding virtual device in the first system according to the attribute parameters in the virtual device creation request.
[0092] In this embodiment, after receiving a virtual device creation request, the electronic device can create a corresponding virtual device in the first system based on the attribute parameters in the virtual device creation request. In addition to being virtual, the created virtual device has various attribute parameters of a real device, such as a device unique code ID, a device type identifier, device attributes, a device name, etc.
[0093] Step S503: After the virtual device is created in the first system, based on the binding relationship between the first system and the second system, the virtual device created in the first system is synchronously created in the second system.
[0094] In this embodiment, after the electronic device creates a virtual device in the first system, it can simultaneously create a corresponding virtual device in the second system based on the binding relationship between the first and second systems. This allows the virtual device created in the first system to be connected to the second system, resulting in both the first and second systems having virtual devices with the same attribute parameters. In this way, the virtual device can act as an intermediary to establish a linkage relationship between the first and second systems. In the second system, by controlling the execution of the virtual device, it can ultimately trigger the execution of the automation solution associated with the virtual device in the first system.
[0095] In one embodiment, the above-mentioned step S503 may include: generating a virtual device template corresponding to the virtual device based on the virtual device created in the first system; generating a virtual device creation request under the second system according to the virtual device template; the virtual device creation request under the second system is used to instruct the synchronous creation of the corresponding virtual device based on the virtual device template in the second system.
[0096] In this embodiment, after the electronic device creates a virtual device in the first system, a virtual device template corresponding to the virtual device can be generated based on the virtual device created in the first system. The virtual device template can be understood as attribute parameters corresponding to the virtual device, such as the unique ID, device type identifier, device attributes, device name, and other attribute parameters of the virtual device.
[0097] After the electronic device generates a virtual device creation request under the second system based on the virtual device template, the virtual device creation request under the second system will include the attribute parameters of the virtual device requested to be created in the second system. Then, through the virtual device creation request under the second system, a virtual device with the same attribute parameters as the first system can be created in the second system.
[0098] It should be noted that in actual applications, in addition to creating virtual devices through mobile apps and SaaS software tools, algorithms can also create and use "virtual devices" as needed. For example, if a user asks the voice assistant "Is anyone home?", the algorithm will be triggered to know that it needs to create a "virtual device" to determine whether "someone is home."
[0099] It can be seen that in the device linkage control method provided in the embodiment of the present application, the electronic device can create the required virtual device by receiving a virtual device creation request under the first system and creating the required virtual device according to the attribute parameters in the virtual device creation request, and then synchronously create the virtual device in the second system. In addition to being virtual, the created virtual device has the same common characteristics as a real device. After the virtual device is connected to other system platforms by docking with the system platform, these virtual devices act as intermediaries to generate a linkage relationship between the two system platforms, thereby achieving automatic linkage control of another system through one system without increasing the hardware cost of the real device, thereby improving the user experience.
[0100] Optionally, considering that the device state of the virtual device has changed after executing the control instruction, in order to ensure the normal operation of the next automatic linkage control between the two systems, the device state of the virtual device needs to be adjusted. Based on this, please refer to Figure 6 After step S303, the device linkage control method may further include:
[0101] Step S601 : Restore the device state of the target virtual device to the device state before the target virtual device executes the control instruction in the second system, so as to facilitate the next device linkage control between the first system and the second system.
[0102] For example, the automation plan corresponding to the virtual device (socket A) is that if socket A is turned on, the smart scene of "I'm home" will be executed. The electronic device determines that the device state of socket A in the second system becomes open after executing the control instruction. Its matching target automation plan is that if socket A is turned on, the smart scene of "I'm home" will be executed, so the smart scene "I'm home" is executed. After the target automation plan is executed, socket A is turned off, thereby restoring the device state of socket A in the two systems to the device state before executing the control instruction (i.e., the closed state), to ensure the normal operation of the next automated linkage control between the two systems.
[0103] This application embodiment also provides an application scenario, please refer to Figure 7 The application of the above device linkage control method in this application scenario is as follows:
[0104] The first system is home system A, and the second system is home system B. The components of home system A and home system B can be the same or similar. For example, both can include IOT cloud, router, smart home gateway, smart home devices, etc. They can also include virtual devices created in the cloud and localized virtual devices created in the smart home gateway, etc. Figure 7 The structure of home system B is not detailed. The devices in home system A (e.g., routers, smart home gateways, smart home appliances, etc.) and the devices in home system B can be from different manufacturers, and the system platforms of home system A and home system B can be application platforms developed by different manufacturers.
[0105] In actual application, the user first creates a virtual device in Home System A. Specifically, a virtual device creation request can be initiated from the user end (such as a mobile app, SAAS software tool, etc.) to the IoT cloud or smart home gateway. The virtual device creation request includes the attribute parameters of the virtual device being created. The IoT cloud or smart home gateway creates the corresponding virtual device in Home System A based on the attribute parameters in the received virtual device creation request. After the virtual device is created, based on the binding relationship between Home System A and Home System B, a corresponding virtual device is simultaneously created in Home System B, thereby connecting the virtual device created by Home System A to Home System B. For the created virtual device, one or more automation schemes associated with the virtual device can also be configured in Home System A. In this way, the zero-cost hardware advantage of virtual devices can be fully utilized to create multiple virtual devices and create automated linkages that meet different scenario requirements on demand. Then, with the help of virtual devices as intermediaries to connect different system platforms, the automated scenario linkage between different system platforms can be realized, improving the user experience.
[0106] Specifically, the user edits the smart scene of "I'm home" in the A home system through APP1 corresponding to the A home system, creates and adds "virtual device - socket C", and also edits an automation plan associated with the virtual device (if socket C is turned on, the smart scene of "I'm home" will be executed). The user authorizes the account in the A home system in APP2 corresponding to the B home system, and simultaneously creates "virtual device - socket C" in the B home system, that is, a corresponding "virtual device - socket C" is also created in the B home system. To facilitate the user's voice control of the virtual device, the user can change the name of the virtual device "Socket C" to "I'm home" in APP2. When the user issues the voice "Turn on I'm home", the "Socket C" in the B home system will execute the control command of "open", and synchronize the device status (open status) of the "virtual device - socket C" after executing the control command to the IOT cloud in the A home system through the IOT cloud in the B home system. If the "virtual device - socket C" " is created in the IOT cloud, the IOT cloud will determine the automation plan associated with the "virtual device - socket C". When it is determined that the opening state of the "virtual device - socket C" meets the triggering conditions of the target automation plan (that is, if the socket C is opened, the smart scene of "I'm home" will be executed), the smart scene "I'm home" will be executed; similarly, if the "virtual device - socket C" is created in the smart home gateway, the smart home gateway will determine the automation plan associated with the "virtual device - socket C". When it is determined that the opening state of the "virtual device - socket C" meets the triggering conditions of the target automation plan (that is, if the socket C is opened, the smart scene of "I'm home" will be executed), the smart scene "I'm home" will be executed.
[0107] Of course, in another scenario, the device status of the "virtual device - socket C" in home system B can also be obtained by triggering the execution of the automation plan in home system B. For example, home system B is configured with an automation plan (doors and windows open, automatically open socket C). Then, when an event (target event) of doors and windows opening occurs in home system B, it can be determined that the event meets the triggering conditions of the automation plan. Then, the automation action device (socket C) in the automation plan is found, and an automation control instruction for socket C is generated. According to the automation control instruction, socket C is controlled to perform the opening action, and the device status (opening status) of socket C after the opening action is performed is synchronized to the IoT cloud in home system A. The IoT cloud or smart home gateway controls the execution of the smart scene "I'm home" in home system A based on the obtained opening status of the "virtual device - socket C".
[0108] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a device linkage control device is given below. Figure 8, which is a functional module diagram of the device linkage control device 800 provided in an embodiment of the present application. It should be noted that the basic principles and technical effects of the device linkage control device 800 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brevity, any details not mentioned in this embodiment can be referred to the corresponding contents of the above-mentioned embodiments. The device linkage control device 800 includes a data receiving module 810, an automation solution determination module 820, and an automation execution module 830.
[0109] The data receiving module 810 is used to obtain the current device status of the target virtual device in the first system; the current device status of the target virtual device is obtained by synchronizing the device status of the target virtual device in the second system after executing the control instructions in the second system to the first system.
[0110] It can be understood that the data receiving module 810 can execute the above step S301.
[0111] The automation solution determination module 820 is configured to determine an automation solution associated with the target virtual device in the first system.
[0112] It can be understood that the automation solution determination module 820 can execute the above step S302.
[0113] The automation execution module 830 is configured to execute the target automation solution under the first system if the current device state of the target virtual device meets the triggering condition of the target automation solution in the associated automation solution.
[0114] It can be understood that the automation execution module 830 can execute the above step S303.
[0115] Optionally, the control instructions under the second system include automation control instructions; the current device state of the target virtual device is obtained by synchronization through the following steps:
[0116] When the target event in the second system meets the triggering condition of the automation solution in the second system, and the automation action device in the automation solution in the second system is the target virtual device in the second system, generating an automation control instruction for the target virtual device in the second system according to the automation solution in the second system;
[0117] According to the automation control instruction, the target virtual device under the second system is controlled to execute the target action of the automation solution under the second system, and the device state of the target virtual device under the second system after executing the target action is synchronized to the first system.
[0118] Optionally, the automation execution module 830 is used to determine that the target virtual device is an automation condition device in the target automation scheme if the current device state of the target virtual device meets the trigger condition of the target automation scheme in the associated automation scheme, and control the automation action device in the target automation scheme to execute the target action of the target automation scheme.
[0119] Alternatively, see Figure 9 The device linkage control apparatus 800 may further include a communication establishment module 840 , a virtual device creation module 850 , and a device state adjustment module 860 .
[0120] The communication establishment module 840 is used to establish a binding relationship between the first system and the second system, and to establish a communication link between the first system and the second system based on the binding relationship; the current device state of the target virtual device is based on the communication link between the first system and the second system, and the device state of the target virtual device in the second system after executing the control instructions in the second system is synchronized to the first system.
[0121] It can be understood that the communication establishing module 840 can execute the above step S401.
[0122] The virtual device creation module 850 is used to receive a virtual device creation request under the first system; the virtual device creation request includes attribute parameters of the virtual device requested to be created; according to the attribute parameters in the virtual device creation request, a corresponding virtual device is created in the first system; after the virtual device is created in the first system, based on the binding relationship between the first system and the second system, the virtual device created in the first system is synchronously created in the second system.
[0123] Among them, the virtual device creation module 850 is specifically used to generate a virtual device template corresponding to the virtual device based on the virtual device created in the first system; generate a virtual device creation request under the second system according to the virtual device template; the virtual device creation request under the second system is used to instruct the synchronous creation of the corresponding virtual device based on the virtual device template in the second system.
[0124] It can be understood that the virtual device creation module 850 can execute the above steps S501 to S503.
[0125] The device state adjustment module 860 is used to restore the device state of the target virtual device to the device state before the target virtual device executes the control instruction in the second system after the automation execution module 830 executes the target automation plan in the first system, so as to perform the next device linkage control between the first system and the second system.
[0126] It can be understood that the device state adjustment module 860 can execute the above step S601.
[0127] In the device linkage control device provided in the embodiment of the present application, the data receiving module is used to obtain the current device status of the target virtual device in the first system. The current device status of the target virtual device is obtained by synchronizing the device status of the target virtual device in the second system after executing the control instructions in the second system to the first system; the automation scheme determination module is used to determine the automation scheme associated with the target virtual device in the first system, and the automation execution module is used to execute the target automation scheme in the first system if the current device status of the target virtual device meets the triggering conditions of the target automation scheme in the associated automation scheme. In this way, by utilizing the synchronization of the device status of the virtual device in the two systems, the user can control the execution of the automation scheme associated with the virtual device in the first system through the second system, that is, without increasing the hardware cost of the real device, the automated linkage control of another system is achieved through one system, thereby improving the user experience.
[0128] The electronic device provided in an embodiment of the present application may include a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the device linkage control method provided in the above method embodiment.
[0129] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0130] Figure 10 This is a hardware structure diagram of the electronic device provided in the embodiment of the present application. Figure 10As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (Processing Units, CPU) 111 (the processor 111 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 113 for storing data, and one or more storage media 112 for storing application programs 1123 or data 1122 (for example, one or more mass storage devices). Among them, the memory 113 and the storage medium 112 can be short-term storage or persistent storage. The program stored in the storage medium 112 may include one or more modules, each module may include a series of instruction operations on the electronic device. Furthermore, the processor 111 can be configured to communicate with the storage medium 112 to execute a series of instruction operations in the storage medium 112 on the electronic device. The electronic device may also include one or more power supplies 116, one or more wired or wireless network interfaces 115, one or more input and output interfaces 114, and / or one or more operating systems 1121, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0131] The input / output interface 114 can be used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communications provider of the electronic device. In one embodiment, the input / output interface 114 includes a network adapter (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one embodiment, the input / output interface 114 can be a radio frequency (RF) module for wirelessly communicating with the Internet.
[0132] It can be understood by those skilled in the art that Figure 10 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 10 More or fewer components than shown, or with Figure 10 Different configurations shown.
[0133] The electronic device provided by the embodiment of the present application has a target virtual device in both the first system and the second system. After the target virtual device in the second system executes the control instruction in the second system, the device state of the target virtual device in the second system will be synchronized to the first system, thereby obtaining the current device state of the target virtual device in the first system. In the automation scheme associated with the target virtual device in the first system, when the current device state of the target virtual device meets the triggering condition of a certain target automation scheme, the target automation scheme in the first system will be executed. In this way, by utilizing the synchronization of the device state of the virtual device in the two systems, the user can control the execution of the automation scheme associated with the virtual device in the first system through the second system, that is, without increasing the hardware cost of the real device, the automated linkage control of another system is achieved through one system, thereby improving the user experience.
[0134] The embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, each process of the embodiment of the device linkage control method described above is implemented, and the same technical effect is achieved. To avoid repetition, it is not described here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0135] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises", "includes" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course 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 (which can be a mobile phone, computer, gateway, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0137] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A device linkage control method, characterized in that: The method comprises: Obtaining a current device state of a target virtual device in a first system; the current device state of the target virtual device is obtained by synchronizing the device state of the target virtual device in a second system after executing a control instruction in the second system to the first system; the first system and the second system are in communication connection; the target virtual device is a virtual device pre-created by the first system and the second system and having the same attribute parameters; Determining an automation solution associated with the target virtual device under the first system; If the current device state of the target virtual device meets the trigger condition of the target automation scheme in the associated automation scheme, the target virtual device is determined to be the automation condition device in the target automation scheme, and the automation action device in the target automation scheme is controlled to execute the target automation scheme under the first system.
2. The method according to claim 1, characterized in that The control instructions under the second system include automation control instructions; the current device state of the target virtual device is obtained by synchronization through the following steps: When the target event in the second system meets the triggering condition of the automation solution in the second system, and the automation action device in the automation solution in the second system is the target virtual device in the second system, generating an automation control instruction for the target virtual device in the second system according to the automation solution in the second system; According to the automation control instruction, the target virtual device under the second system is controlled to execute the target action of the automation solution under the second system, and the device state of the target virtual device under the second system after executing the target action is synchronized to the first system.
3. The method according to claim 1, characterized in that The method further comprises: A binding relationship between the first system and the second system is established, and a communication link between the first system and the second system is established based on the binding relationship; the current device status of the target virtual device is obtained by synchronizing the device status of the target virtual device in the second system after executing the control instructions in the second system to the first system based on the communication link between the first system and the second system.
4. The method according to claim 3, characterized in that The method further comprises: receiving a virtual device creation request from the first system; the virtual device creation request including attribute parameters of the virtual device requested to be created; According to the attribute parameters in the virtual device creation request, the corresponding virtual device is created in the first system; after the virtual device is created in the first system, based on the binding relationship between the first system and the second system, the virtual device created in the first system is synchronously created in the second system.
5. The method according to claim 4, characterized in that The step of synchronously creating a corresponding virtual device in the first system to the second system based on the binding relationship between the first system and the second system includes: generating a virtual device template corresponding to the virtual device based on the virtual device created in the first system; A virtual device creation request in the second system is generated according to the virtual device template; the virtual device creation request in the second system is used to instruct synchronous creation of the corresponding virtual device in the second system based on the virtual device template.
6. The method according to any one of claims 1 to 5, characterized in that After executing the target automation solution under the first system, the method further includes: The device state of the target virtual device is restored to the device state before the target virtual device executes the control instruction in the second system, so as to perform the next device linkage control between the first system and the second system.
7. A device linkage control device, characterized in that: The device comprises: a data receiving module configured to obtain a current device state of a target virtual device in a first system; the current device state of the target virtual device is obtained by synchronizing the device state of the target virtual device in a second system after executing a control instruction in the second system to the first system; the first system and the second system are in communication connection; the target virtual device is a virtual device pre-created by the first system and the second system and having the same attribute parameters; an automation solution determining module, configured to determine an automation solution associated with the target virtual device under the first system; An automation execution module is used to determine that the target virtual device is an automation condition device in the target automation scheme if the current device state of the target virtual device meets the trigger condition of the target automation scheme in the associated automation scheme, and control the automation action device in the target automation scheme to execute the target automation scheme under the first system.
8. An electronic device, characterized in that: The device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the device linkage control method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device linkage control method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Equipment linkage control method, device and system, gateway and storage medium
CN110071855A