CN115883287A - Method and device for determining scene operation gateway, storage medium and electronic device - Google Patents

Method and device for determining scene operation gateway, storage medium and electronic device Download PDF

Info

Publication number
CN115883287A
CN115883287A CN202111155897.1A CN202111155897A CN115883287A CN 115883287 A CN115883287 A CN 115883287A CN 202111155897 A CN202111155897 A CN 202111155897A CN 115883287 A CN115883287 A CN 115883287A
Authority
CN
China
Prior art keywords
gateway
target
scene
determining
script
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111155897.1A
Other languages
Chinese (zh)
Other versions
CN115883287B (en
Inventor
马健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202111155897.1A priority Critical patent/CN115883287B/en
Publication of CN115883287A publication Critical patent/CN115883287A/en
Application granted granted Critical
Publication of CN115883287B publication Critical patent/CN115883287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method, a device, a storage medium and an electronic device for determining a scene operation gateway, wherein the method comprises the following steps: receiving a gateway selection instruction sent by a target application, wherein the gateway selection instruction is used for indicating a target gateway executing a target scene; determining a gateway type of a target gateway; under the condition that the gateway type indicates that the target gateway is a local gateway, sending a script pulling instruction to the target gateway to indicate the target gateway to pull a scene script of a target scene; the control target gateway executes the target scene based on the scene script. According to the invention, the problem that the running gateway of the scene cannot be customized in the related technology is solved, the effect of customizing the running gateway of the scene is achieved, and the user experience is improved.

Description

Method and device for determining scene operation gateway, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a method and a device for determining a scene operation gateway, a storage medium and an electronic device.
Background
In the related technology, in the middle of the year, the operation positions of the edge scene and the cloud scene are determined by the cloud computing logic, the intention of a user is not considered, the user cannot determine the operation positions of the scene, and only passive acceptance is achieved. The user does not have a sense of participation and the user experience is poor.
Therefore, the problem that the running gateway of the scene cannot be customized exists in the related technology.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining a scene running gateway, a storage medium and an electronic device, which are used for at least solving the problem that the running gateway of a scene cannot be customized in the related art.
According to an embodiment of the present invention, there is provided a method for determining a scene operation gateway, including: receiving a gateway selection instruction sent by a target application, wherein the gateway selection instruction is used for indicating a target gateway executing a target scene; determining a gateway type of the target gateway; under the condition that the gateway type indicates that the target gateway is a local gateway, sending a script pulling instruction to the target gateway to indicate the target gateway to pull the scene script of the target scene; controlling the target gateway to execute the target scene based on the scene script.
According to another embodiment of the present invention, there is provided a determining apparatus for a scene running gateway, including: the gateway selection module is used for receiving a gateway selection instruction sent by a target application, wherein the gateway selection instruction is used for indicating a target gateway executing a target scene; the determining module is used for determining the gateway type of the target gateway; a sending module, configured to send a script pulling instruction to the target gateway to instruct the target gateway to pull the scene script of the target scene when the gateway type indicates that the target gateway is a local gateway; and the execution module is used for controlling the target gateway to execute the target scene based on the scene script.
According to yet another embodiment of the invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the method and the device, the selection instruction of the target gateway for indicating the execution of the target scene, which is sent by the target application, is received, the gateway type of the target gateway is determined, and under the condition that the gateway type indicates that the target gateway is the local gateway, the script pulling instruction is sent to the target gateway so as to indicate the target gateway to pull the scene script of the target scene, and the target gateway is controlled to execute the target scene according to the scene script. The user can select the target gateway through the target application and send a selection instruction for selecting the target gateway to indicate that the target gateway is selected as the execution gateway of the target scene. Therefore, the problem that the running gateway of the scene cannot be customized in the related technology can be solved, the effect of the running gateway of the scene can be customized is achieved, and the user experience is improved.
Drawings
Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a method for determining a scene running gateway according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for determining a scene operation gateway according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for determining a scenario operation gateway according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for determining a scene operation gateway according to a specific embodiment of the present invention;
fig. 5 is a flowchart of a method for determining a scene operation gateway according to a specific embodiment of the present invention;
fig. 6 is a block diagram of a configuration of a determination apparatus of a scene operation gateway according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an operation on a mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a method for determining a scene operation gateway according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the determination method of the scene operation gateway in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by executing the computer program stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices via a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet via wireless.
In this embodiment, a method for determining a scenario running gateway is provided, and fig. 2 is a flowchart of a method for determining a scenario running gateway according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, receiving a gateway selection instruction sent by a target application, wherein the gateway selection instruction is used for indicating a target gateway executing a target scene;
step S204, determining the gateway type of the target gateway;
step S206, under the condition that the gateway type indicates that the target gateway is a local gateway, sending a script pulling instruction to the target gateway to indicate the target gateway to pull the scene script of the target scene;
and step S208, controlling the target gateway to execute the target scene based on the scene script.
In the above embodiment, the target scene may be an intelligent home scene, and operations to be executed, an operation sequence, and trigger conditions for executing the operations of each intelligent device may be predetermined in the intelligent home scene. For example, a go home scenario may be defined. In a home-return scenario, the triggering condition may be opening a door, with sequentially executed devices being lights, curtains, air conditioners, and water heaters. The operations performed by the various devices may include turning on lights, closing curtains, turning on the air conditioner and adjusting the temperature to 26 c, and adjusting the water heater to a heating state. When the user returns home and opens the door, the home returning scene is triggered, and the home returning scene is executed in sequence.
In the above embodiment, the target scenario may be an automatically executed scenario, that is, a scenario in which execution is triggered by a trigger condition, or may be a scenario in which execution is manually triggered. I.e. the scene is edited, the auto-trigger condition may not be set. Instead, the user clicks the execution instruction through the APP and then starts the execution scenario. When clicking the execution instruction, the user can select the gateway of the operation scene at the same time.
In the above embodiment, the target scenario may be executed by different gateways, and the target gateway for executing the target scenario may be selected by the target application, that is, the gateway selection instruction is triggered by selecting the target gateway in the target application, the scenario center determines the gateway type of the target gateway after receiving the gateway selection instruction, and sends the scenario pull instruction to the target gateway to instruct the target gateway to pull the scenario of the target scenario when the gateway type indicates that the target gateway is the local gateway. And controlling the target gateway to execute the target scene according to the scene script. The scene script is an execution instruction of the scene, and includes a trigger condition, an execution sequence and the like of the scene.
In the above embodiment, the gateway type may include a local type and a cloud type, and when the gateway is the cloud type, the target scene may be executed only when the gateway is connected to the network. If the home network is interrupted, the target scene cannot be executed. The local type is a local gateway, and the local gateway can execute a target scene under the condition of network disconnection.
Optionally, the main body of the above steps may be a scene center, a background processor, or other devices with similar processing capabilities, and may also be a machine integrated with at least a data processing device, where the data processing device may include a terminal such as a computer, a mobile phone, and the like, but is not limited thereto.
According to the method and the device, the selection instruction of the target gateway used for indicating the execution of the target scene and sent by the target application is received, the gateway type of the target gateway is determined, and under the condition that the gateway type indicates that the target gateway is the local gateway, the script pulling instruction is sent to the target gateway so as to indicate the target gateway to pull the scene script of the target scene and control the target gateway to execute the target scene according to the scene script. The user can select the target gateway through the target application and send a selection instruction for selecting the target gateway to indicate that the target gateway is selected as the execution gateway of the target scene. Therefore, the problem that the running gateway of the scene cannot be customized in the related technology can be solved, the effect of the running gateway of the scene can be customized is achieved, and the user experience is improved.
In one exemplary embodiment, sending a script pull instruction to the target gateway comprises: determining state information of the target gateway; and sending a script pulling instruction to the target gateway under the condition that the state information indicates that the target gateway meets a preset condition. In this embodiment, when sending the script pull instruction to the target gateway, it is necessary to determine the state information of the target gateway, and when the state information indicates that the target gateway meets the predetermined condition, the script pull instruction is sent to the target gateway. That is, when sending the script pull instruction to the target gateway, the script pull instruction needs to be sent again when it is determined that the target gateway can execute the target scene. The state information may include network state information, identification information, controllable relationship information, and a remaining number of configurable scenarios.
In the above embodiment, when the target gateway is a local gateway, the target gateway may execute the target scenario without connecting to a network generated by a device such as another router. The target gateway is connected with the scene center, and the scene center can determine the network state information of the target gateway, namely, the scene center can determine whether the target gateway is in an online state. The identification information of the target gateway is used for identifying whether the target gateway has the capability of executing the target scene. The controllable relationship information is used for indicating whether the target gateway can control the device in the scene.
In the above embodiment, the maximum number of configurable scenes allowed by the target gateway may be determined, and therefore, when determining the state information, the number of configurable scenes remaining in the target gateway also needs to be determined. I.e., determine whether the target gateway is still configured with the execution scenario. When determining the remaining number, the maximum configurable scene number configured for the target gateway in advance and the current number of scenes currently executed by the target gateway may be first determined, and a difference between the maximum configurable scene number and the current number may be determined as the remaining number.
In the above embodiment, the maximum configurable number of scenarios may be a predetermined number, or may be a number that can be borne by the target gateway. For example, the target gateway may execute 5 scenes simultaneously, and the maximum configurable number of scenes may be 5, but due to the performance of the target gateway, the running speed may be slower when the 5 scenes are executed simultaneously, and therefore, the maximum configurable number of scenes of the target gateway may be set to 3.
In one exemplary embodiment, determining the state information of the target gateway comprises: determining target equipment corresponding to the target scene; determining a controllable relationship between the target gateway and the target device; determining identification information of the target gateway, the residual quantity of the configurable scenes of the target gateway and the network state of the target gateway; determining the status information based on the controllable relationship, the identification information, the remaining number, and the network status. In this embodiment, when determining the state information of the target gateway, the target device corresponding to the target scenario may be determined. I.e. the target device needed when executing the target scene. For example, in the home-returning scenario, the target device may include a lamp, a curtain, an air conditioner, and a water heater, and after the target device is determined, the controllable relationship between the target device and the target gateway may be determined, that is, it is determined whether the target gateway can control the target device.
In the above embodiment, when determining the state information, identification information of the target gateway needs to be determined. The identification information is used for identifying whether the target gateway has the capability of executing the target scene. For example, the version type of the target gateway is identified, and when the version type of the target gateway is a predetermined version type, the target gateway is determined to have the capability of executing the target scenario. And when the target gateway is a version except the preset version type, determining that the target gateway does not have the capability of executing the target scene. The predetermined version type may be a predetermined version type, and in a case that the target gateway does not have a capability of executing the target scenario, the update request may be sent to a manufacturer of the target gateway or other devices that may update the version of the target gateway. And upgrading the version of the target gateway if the upgrading is allowed.
In the above embodiment, when determining the state information, the remaining number of configurable scenarios of the target gateway and the network state also need to be determined. And determining the state information of the target gateway according to the controllable relation, the identification information, the residual quantity and the network state.
In the above embodiment, when determining the state information of the target gateway, the scenario center may send a query request to the equipment center, and determine the state information according to a result returned by the equipment center. The device center may be a background processor, and is configured to manage all devices in an application scenario (i.e., a scenario applied by the present application), such as devices and gateways in a target scenario.
In an exemplary embodiment, determining the status information based on the controllable relationship, the identification information, the remaining number, and the network status comprises: determining that the state information satisfies the predetermined condition when the controllable relationship indicates that the target gateway is allowed to control all devices included in the target device, the identification information indicates that the target gateway supports execution of the target scenario, the remaining number is greater than a predetermined threshold, and the network state is an online state; determining that the state information does not satisfy the predetermined condition in a case where at least one of the following states exists: the controllable relationship indicates that the target gateway is not allowed to control any device included in the target device, the identification information indicates that the target gateway does not support execution of the target scenario, the remaining number is less than or equal to a predetermined threshold, and the network status is an offline status. In this embodiment, when the determined controllable relationship, the identification information, the remaining number, and the network state all satisfy the requirements, it is determined that the state information satisfies the predetermined condition. And when the controllable relation indicates that the target gateway is allowed to control all the devices in the target device, determining that the controllable relation meets the requirement. And when the identification information indicates that the target gateway supports the local scene type, namely the target gateway supports the execution of the target scene, determining that the identification information meets the requirement. And determining that the residual quantity meets the requirement under the condition that the residual quantity is greater than a preset threshold value. The predetermined threshold may be 0,1, etc., and it should be noted that the predetermined threshold is a value that can be self-defined, which is not limited in the present invention. And when the network state is an online state, namely under the condition that the target gateway is connected with the line in the scene, determining that the network state meets the requirement.
In the above embodiment, the controllable relationship indicates that the target gateway is not allowed to control at least one of the target devices. For example, in a home-return scenario, the target devices include lights, curtains, air conditioners, and water heaters. And when the target gateway cannot control the curtain, the controllable relation is not considered to meet the preset condition. When the identification information indicates that the target gateway does not support executing the target scenario, that is, the type of the target gateway does not support the local scenario type, it may be determined that the state information does not satisfy the predetermined condition. When the remaining number is less than or equal to the predetermined threshold, it may also be determined that the state information does not satisfy the predetermined condition. When the network state is not in the line state, it may also be determined that the state information does not satisfy the predetermined condition.
In the above embodiment, when the state information does not satisfy the predetermined condition, it is described that the target gateway does not support execution of the target scenario, so that a selection failure prompt may be fed back to the target application, an alternative gateway may be determined according to the target scenario and the type of the target gateway, identification information of the alternative gateway is sent to the target application, and the identification information of the alternative gateway is displayed in the target application. To prompt the user that an alternative gateway may be selected to execute the target scenario. Wherein, the gateway type of the alternative gateway is the same as the gateway type of the target gateway. The alternative gateway is a gateway capable of executing the target scenario. That is, when it is determined that the target gateway selected by the user cannot execute the target scenario, the gateway type of the target gateway may be determined, and when the gateway type is a local gateway, an alternative gateway capable of executing the target scenario may be searched in the local gateway.
In an exemplary embodiment, after sending the script pull instruction to the target gateway, the method further comprises: determining a current gateway executing the target scenario; and under the condition that the current gateway is other local gateways except the target gateway, controlling the other local gateways to delete the scene script. In this embodiment, after sending the script pull instruction to the target gateway, the current gateway that executes the target scene at present may be determined, and in a case that the current gateway is a local gateway other than the target gateway, the other local gateways may be controlled to delete the scene script. That is, when the current gateway and the target gateway are both local gateways, the function of switching from the local gateway to the local gateway is realized when the target gateway is selected. In the process of switching the local gateway, after the control target gateway pulls the scene script, the current gateway can be controlled to delete the stored scene script.
In the above embodiment, when the current gateway is the cloud, the target gateway only needs to pull the scene script from the operation. The scene script can be stored in the cloud, the gateway can pull the scene script from the cloud, the scene script is stored locally, and the scene script is executed according to the scene script when the target scene is executed.
In the above embodiment, when the current gateway is the local gateway, and the scene is switched to the target gateway for execution, the current gateway may delete the locally stored scene script without executing the scene script, so as to achieve the effect of saving the storage space.
In one exemplary embodiment, after determining the gateway type of the target gateway, the method further comprises: and under the condition that the gateway type indicates that the target gateway is a cloud end, indicating the cloud end to execute the target scene. In this embodiment, when the target gateway is the cloud, the target scene can be directly executed by the cloud. If the current gateway is the local gateway, the current gateway can be controlled to delete the locally stored scene script.
In one exemplary embodiment, prior to receiving the gateway selection instruction, the method further comprises: receiving a gateway query instruction; inquiring the network state of a gateway based on the gateway inquiry instruction; and sending the gateway and the network state corresponding to the gateway to the target application to indicate the target application to display the gateway and the network state corresponding to the gateway. In this embodiment, before receiving the gateway selection instruction, a gateway query instruction may also be received. That is, before selecting a gateway, the system can send a query instruction to the scenario center, and after receiving the query instruction, the scenario center can query the network states of all gateways and send the gateway and the corresponding network state to the target application, so as to display the gateway and the network state in the target application. The user may select a target gateway based on the network status. I.e. the user may select a target gateway among the gateways that are online.
The following describes a method for determining a scene operation gateway with reference to a specific embodiment:
fig. 3 is a first flowchart of a method for determining a scene operation gateway according to an embodiment of the present invention, where the flowchart is a case of transferring a gateway of an operation scene from a cloud to a local location, as shown in fig. 3. The user can instruct the scene center to inquire which gateways are available in the family through the APP (corresponding to the target application), the scene center inquires the registered gateways in the family, and the device center inquires whether the gateways in the family are online. The equipment center returns the result. After receiving the result, the scene center forwards the result to the APP, and the user can manually change the cloud scene into the local scene. The scene center can filter all the devices configured in the scene, inquire the controllable relation between the devices and the gateway from the device center, and return the result. The scene center may further determine whether a gateway (corresponding to the target gateway) designated by a user can control devices (corresponding to the target devices) within the entire scene, and determine whether a typeID (corresponding to the identification information) of the gateway is a type that can support a local scene. The scenario center may also query the gateway whether a configurable number of scenarios remain. The scenario center may also query the device center for the gateway status. After the device center returns the result, the scene center can judge whether the gateway is on-line. Under the condition that the state of the scene center meets the preset condition, the scene center can modify the scene operation position to be the gateway and update the scene to be the local scene. And informs the device center to instruct the gateway to pull the edge scene script (corresponding to the scene script described above). The equipment center sends a command to a terminal module (corresponding to the target gateway) to pull the scene script. The equipment center can return the operation result of the issued command. And after pulling the scene script, the gateway can execute the target scene. The device center may return the result to the scene center, which sends the returned result to the APP.
Fig. 4 is a flowchart of a method for determining a scene operation gateway according to a specific embodiment of the present invention, where the flowchart is a case of switching a gateway for operating a scene from local to local, as shown in fig. 4. The user can instruct the scene center to inquire which gateways are available in the family through the APP (corresponding to the target application), the scene center inquires the registered gateways in the family, and the device center inquires whether the gateways in the family are online. The equipment center returns the result. After receiving the result, the scene center forwards the result to the APP, and the user can manually change the cloud scene into the local scene. The scene center can filter out all the devices configured in the scene, inquire the controllable relation between the devices and the gateway to the device center, and the device center returns the result. The scene center may further determine whether a gateway (corresponding to the target gateway) designated by a user can control devices (corresponding to the target devices) within the entire scene, and determine whether a typeID (corresponding to the identification information) of the gateway is a type that can support a local scene. The scenario center may also query the gateway whether a configurable number of scenarios remain. The scenario center may also query the device center for the gateway status. After the device center returns the result, the scene center can judge whether the gateway is on-line. Under the condition that the state of the scene center meets the preset condition, the scene center can modify the scene operation position to be the gateway and update the scene to be the local scene. And informs the device center to instruct the gateway to pull the edge scene script (corresponding to the scene script described above). And the equipment center issues a command to pull the scene script to the gateway. The equipment center can return the operation result of the issued command. And after pulling the scene script, the gateway can execute the target scene. The scenario center may also notify the device center to instruct the original running gateway (corresponding to the current gateway) to delete the edge script. The equipment center sends a command to the terminal module (corresponding to the target gateway) and returns the result to the scene center, and the scene center sends the returned result to the APP.
Fig. 5 is a flowchart of a method for determining a scene operation gateway according to a specific embodiment of the present invention, where as shown in fig. 5, the flow is a case of transferring a gateway of an operation scene from a local place to a cloud. The user can change the local scene into the cloud scene manually through the APP. And the scene center updates the scene to be a cloud scene and informs the equipment center to instruct the gateway to delete the edge scene script. The device center issues a command to the terminal module (corresponding to the target gateway) to instruct the gateway to delete the edge scene script. The equipment center can issue command operation results to the scene center, and the scene center sends the return results to the APP.
In the foregoing embodiment, the created scene running position may be handed to the user for management from the perspective of the user. The user can operate the scene on the cloud or a gateway appointed by the user according to own will. The experience of the user is improved, and the participation degree of the user is increased.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for determining a scene running gateway is further provided, where the device is used to implement the foregoing embodiment and the preferred embodiment, and details of which have been already described are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a determining apparatus of a scene running gateway according to an embodiment of the present invention, and as shown in fig. 6, the apparatus includes:
a receiving module 62, configured to receive a gateway selection instruction sent by a target application, where the gateway selection instruction is used to indicate a target gateway executing a target scenario;
a determining module 64, configured to determine a gateway type of the target gateway;
a sending module 66, configured to send a script pulling instruction to the target gateway to instruct the target gateway to pull the scene script of the target scene when the gateway type indicates that the target gateway is a local gateway;
an execution module 68, configured to control the target gateway to execute the target scenario based on the scenario script.
According to the method and the device, the selection instruction of the target gateway used for indicating the execution of the target scene and sent by the target application is received, the gateway type of the target gateway is determined, and under the condition that the gateway type indicates that the target gateway is the local gateway, the script pulling instruction is sent to the target gateway so as to indicate the target gateway to pull the scene script of the target scene and control the target gateway to execute the target scene according to the scene script. The user can select the target gateway through the target application and send a selection instruction for selecting the target gateway to indicate that the target gateway is selected as the execution gateway of the target scene. Therefore, the problem that the running gateway of the scene cannot be customized in the related technology can be solved, the effect of the running gateway of the scene can be customized is achieved, and the user experience is improved.
In an exemplary embodiment, the sending module 66 may implement sending the script pull instruction to the target gateway by: determining state information of the target gateway; and sending a script pulling instruction to the target gateway under the condition that the state information indicates that the target gateway meets a preset condition.
In an exemplary embodiment, the sending module 66 may determine the status information of the target gateway by: determining target equipment corresponding to the target scene; determining a controllable relationship between the target gateway and the target device; determining identification information of the target gateway, the residual quantity of the configurable scenes of the target gateway and the network state of the target gateway; determining the status information based on the controllable relationship, the identification information, the remaining number, and the network status.
In an exemplary embodiment, the sending module 66 may determine the status information based on the controllable relationship, the identification information, the remaining number, and the network status by: determining that the state information satisfies the predetermined condition when the controllable relationship indicates that the target gateway is allowed to control all devices included in the target device, the identification information indicates that the target gateway supports execution of the target scenario, the remaining number is greater than a predetermined threshold, and the network state is an online state; determining that the state information does not satisfy the predetermined condition in a case where at least one of the following states exists: the controllable relationship indicates that the target gateway is not allowed to control any device included in the target device, the identification information indicates that the target gateway does not support execution of the target scenario, the remaining number is less than or equal to a predetermined threshold, and the network status is an offline status.
In an exemplary embodiment, the apparatus may be configured to determine a current gateway executing the target scenario after sending a script pull instruction to the target gateway; and under the condition that the current gateway is other local gateways except the target gateway, controlling the other local gateways to delete the scene script.
In an example embodiment, the apparatus may be configured to, after determining the gateway type of the target gateway, instruct the cloud to execute the target scenario if the gateway type indicates that the target gateway is a cloud.
In an exemplary embodiment, the apparatus may be further configured to receive a gateway query instruction before receiving a gateway selection instruction; inquiring the network state of the gateway based on the gateway inquiry instruction; and sending the gateway and the network state corresponding to the gateway to the target application to indicate the target application to display the gateway and the network state corresponding to the gateway.
It should be noted that the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention further provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the above.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus 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.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for determining a scene operation gateway is characterized by comprising the following steps:
receiving a gateway selection instruction sent by a target application, wherein the gateway selection instruction is used for indicating a target gateway executing a target scene;
determining a gateway type of the target gateway;
under the condition that the gateway type indicates that the target gateway is a local gateway, sending a script pulling instruction to the target gateway to indicate the target gateway to pull the scene script of the target scene;
controlling the target gateway to execute the target scene based on the scene script.
2. The method of claim 1, wherein sending a script pull instruction to the target gateway comprises:
determining state information of the target gateway;
and sending a script pulling instruction to the target gateway under the condition that the state information indicates that the target gateway meets a preset condition.
3. The method of claim 2, wherein determining the state information of the target gateway comprises:
determining target equipment corresponding to the target scene;
determining a controllable relationship between the target gateway and the target device;
determining identification information of the target gateway, the residual quantity of the configurable scenes of the target gateway and the network state of the target gateway;
determining the status information based on the controllable relationship, the identification information, the remaining number, and the network status.
4. The method of claim 3, wherein determining the status information based on the controllable relationship, the identification information, the remaining number, and the network status comprises:
determining that the state information satisfies the predetermined condition when the controllable relationship indicates that the target gateway is allowed to control all devices included in the target device, the identification information indicates that the target gateway supports execution of the target scenario, the remaining number is greater than a predetermined threshold, and the network state is an online state;
determining that the state information does not satisfy the predetermined condition in a case where at least one of the following states exists: the controllable relationship indicates that the target gateway is not allowed to control any device included in the target device, the identification information indicates that the target gateway does not support execution of the target scenario, the remaining number is less than or equal to a predetermined threshold, and the network status is an offline status.
5. The method of claim 1, wherein after sending the script pull instruction to the target gateway, the method further comprises:
determining a current gateway executing the target scenario;
and under the condition that the current gateway is other local gateways except the target gateway, controlling the other local gateways to delete the scene script.
6. The method of claim 1, wherein after determining the gateway type of the target gateway, the method further comprises:
and under the condition that the gateway type indicates that the target gateway is a cloud end, indicating the cloud end to execute the target scene.
7. The method of claim 1, wherein prior to receiving a gateway selection instruction, the method further comprises:
receiving a gateway query instruction;
inquiring the network state of the gateway based on the gateway inquiry instruction;
and sending the gateway and the network state corresponding to the gateway to the target application to indicate the target application to display the gateway and the network state corresponding to the gateway.
8. An apparatus for determining a scene operation gateway, comprising:
the gateway selection module is used for receiving a gateway selection instruction sent by a target application, wherein the gateway selection instruction is used for indicating a target gateway executing a target scene;
the determining module is used for determining the gateway type of the target gateway;
the sending module is used for sending a script pulling instruction to the target gateway under the condition that the gateway type indicates that the target gateway is a local gateway so as to indicate the target gateway to pull the scene script of the target scene;
and the execution module is used for controlling the target gateway to execute the target scene based on the scene script.
9. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202111155897.1A 2021-09-29 2021-09-29 Determination method and device of scene operation gateway, storage medium and electronic device Active CN115883287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111155897.1A CN115883287B (en) 2021-09-29 2021-09-29 Determination method and device of scene operation gateway, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111155897.1A CN115883287B (en) 2021-09-29 2021-09-29 Determination method and device of scene operation gateway, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115883287A true CN115883287A (en) 2023-03-31
CN115883287B CN115883287B (en) 2024-08-23

Family

ID=85756491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111155897.1A Active CN115883287B (en) 2021-09-29 2021-09-29 Determination method and device of scene operation gateway, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115883287B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104950823A (en) * 2014-03-26 2015-09-30 广州合立正通信息科技有限公司 Method for realizing scene control of a plurality of sets of wireless controlled equipment
WO2018059051A1 (en) * 2016-09-27 2018-04-05 中兴通讯股份有限公司 Method and apparatus for configuring gateway device
CN110190986A (en) * 2019-05-07 2019-08-30 深圳绿米联创科技有限公司 Method, apparatus, system, electronic equipment and the storage medium of device configuration
CN111176133A (en) * 2020-02-11 2020-05-19 青岛海信智慧家居系统股份有限公司 Method and device for determining smart home scene
CN112152892A (en) * 2020-08-12 2020-12-29 青岛海尔智能家电科技有限公司 Method for controlling gateway, intelligent gateway and intelligent home system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104950823A (en) * 2014-03-26 2015-09-30 广州合立正通信息科技有限公司 Method for realizing scene control of a plurality of sets of wireless controlled equipment
WO2018059051A1 (en) * 2016-09-27 2018-04-05 中兴通讯股份有限公司 Method and apparatus for configuring gateway device
CN110190986A (en) * 2019-05-07 2019-08-30 深圳绿米联创科技有限公司 Method, apparatus, system, electronic equipment and the storage medium of device configuration
CN111176133A (en) * 2020-02-11 2020-05-19 青岛海信智慧家居系统股份有限公司 Method and device for determining smart home scene
CN112152892A (en) * 2020-08-12 2020-12-29 青岛海尔智能家电科技有限公司 Method for controlling gateway, intelligent gateway and intelligent home system

Also Published As

Publication number Publication date
CN115883287B (en) 2024-08-23

Similar Documents

Publication Publication Date Title
CN111143061A (en) Multi-device linkage control method and device and storage medium
CN112073471B (en) Control method and device of equipment, storage medium and electronic device
US7747722B2 (en) Device management method for device management system
CN111865736B (en) Equipment control method and device
CN106897086A (en) Method, apparatus and system for upgraded machine people's operating system
CN103380415A (en) Method and device for updating firmware based on device management command
CN111913397B (en) Device control method, device, storage medium, and electronic apparatus
CN104683195A (en) Configuration method of equipment to be configured in intelligent household system
CN107395385A (en) Method for upgrading software and device
CN105005199A (en) Method and apparatus for controlling equipment through gateway
CN111190353B (en) Intelligent household appliance instruction conflict processing method and device, storage medium and electronic device
CN113518125A (en) Offline data uploading method and system, storage medium and electronic device
CN112130458A (en) Target device control method and device, storage medium and electronic device
CN115277280A (en) Control method of intelligent household equipment and control method of server
CN110794773A (en) Click-type scene creating method and device
CN113985743A (en) Equipment control method, device and system, storage medium and electronic device
CN107018177A (en) It is a kind of to manage the terminal management system serviced with multizone concentratedly
CN112671572B (en) Method and device for intelligent equipment network distribution, storage medium and electronic device
CN115883287B (en) Determination method and device of scene operation gateway, storage medium and electronic device
CN111427316A (en) Scene triggering method and device, storage medium and electronic device
CN108134720B (en) Equipment self-adaptive control method and device and server
CN113596235B (en) Operation instruction issuing method and device, storage medium and electronic device
CN113783768B (en) Group control method, group control device and communication system
CN106302046B (en) Control method for remote controller and device
CN115001886A (en) Equipment control method and device and electronic equipment

Legal Events

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