Device control method, device, electronic device and storage medium
By locally storing and judging scene conditions in smart home devices, the problem of single applicable scenarios for device linkage caused by cloud dependence is solved, and the linkage of devices without cloud connection is realized, which improves the flexibility and reliability of device linkage.
Patent Information
- Application Number
- CN202211566783.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-12-07
AI Technical Summary
In the existing technology, the scene linkage of smart home devices needs to rely on the cloud, which results in the inability to perform scene linkage of devices when the cloud cannot be connected or the network is disconnected, and the applicable scenarios are limited.
By storing the preset scene information broadcast by the target terminal locally on the master device and establishing a communication connection between the master device and the slave device, it is determined whether the scene condition is triggered, and the device is directly controlled to execute the corresponding control instructions, thereby realizing local scene information storage and execution.
It enables scene linkage of devices even without cloud connection, adapts to a wider range of usage scenarios, and improves the flexibility and reliability of device linkage.
Smart Images

Figure CN115941375B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of linkage control, and in particular to a device control method, device, electronic device and storage medium. Background Art
[0002] Scenario linkage for smart home devices is a crucial feature. Related technologies typically design linkage strategies in the cloud. Once the corresponding scenario linkage strategy is triggered, commands are sent to the corresponding devices for execution. However, in some scenarios where devices cannot connect to the cloud or are disconnected from the network, scenario linkage cannot be performed. Therefore, related technologies rely on the cloud to complete scenario linkage for devices, limiting their applicable scenarios.
[0003] Currently, no effective solution has been found for the above-mentioned problems existing in the related technologies. Summary of the Invention
[0004] The present invention provides a device control method, device, electronic device and storage medium to solve the technical problem that related technologies need to rely on the cloud to complete device scene linkage and are applicable to a single scene.
[0005] According to one aspect of an embodiment of the present application, a method for controlling a device is provided, comprising: receiving preset scene information broadcast by a target terminal, storing the preset scene information in a local storage of a master device, wherein the master device is communicatively connected with a plurality of slave devices; determining whether a scene condition in the preset scene information is triggered; if the scene condition in the preset scene information is triggered, controlling the master device and / or the slave device to execute a control instruction corresponding to the scene condition.
[0006] Furthermore, after receiving the preset scene information broadcast by the target terminal, the method also includes: determining whether the first device has storage function and storage conditions, wherein the first device is connected to the target terminal; if the first device has storage function and storage conditions, the first device is determined as the main device.
[0007] Furthermore, after determining whether the first device has the storage function and storage conditions, the method also includes: if the first device does not have the storage function or storage conditions, controlling the first device to continue broadcasting the preset scene information to the second device until the second device is a device with the storage function and storage conditions, wherein the second device is a device other than the first device; and determining the second device as the main device.
[0008] Furthermore, determining whether the scene conditions in the preset scene information are triggered includes: obtaining the operating status parameters of the master device and / or the slave device; determining whether the operating status parameters meet the first scene conditions in the preset scene information; if the operating status parameters meet the first scene conditions in the preset scene information, determining that the first scene conditions in the preset scene information are triggered.
[0009] Furthermore, determining whether the scene conditions in the preset scene information are triggered includes: detecting environmental parameters in the target environment; determining whether the environmental parameters meet the second scene conditions in the preset scene information; if the environmental parameters meet the second scene conditions in the preset scene information, determining that the second scene conditions in the preset scene information are triggered.
[0010] Furthermore, controlling the master device and / or the slave device to execute a control instruction corresponding to the scene condition includes: searching for a target control instruction that matches the scene condition from a preset instruction set, wherein the target control instruction carries instruction content and a control object identifier, and the preset scene information includes the preset instruction set; transmitting the target control instruction to the processor of the master device, and broadcasting the target control instruction to the slave device to control the master device and / or slave device that matches the control object identifier to execute the instruction content.
[0011] Furthermore, receiving the preset scene information broadcast by the target terminal includes one of the following: receiving the preset scene information broadcast by the target terminal through the Bluetooth communication module; receiving the preset scene information broadcast by the target terminal through the NFC near-field communication module; receiving the preset scene information broadcast by the target terminal through the WIFI communication module.
[0012] According to another aspect of an embodiment of the present application, a control device for a device is also provided, including: a receiving module for receiving preset scene information broadcast by a target terminal, and storing the preset scene information in a local storage of a master device, wherein the master device is communicatively connected with a plurality of slave devices; a judgment module for judging whether the scene conditions in the preset scene information are triggered; and a control module for controlling the master device and / or the slave device to execute a control instruction corresponding to the scene condition if the scene condition in the preset scene information is triggered.
[0013] Furthermore, the control device of the device also includes a determination module for determining whether the first device has storage function and storage conditions, wherein the first device is connected to the target terminal; if the first device has storage function and storage conditions, the first device is determined as the main device.
[0014] Furthermore, the determination module is also used to control the first device to continue broadcasting the preset scene information to the second device if the first device does not have the storage function or storage conditions until the second device is a device with the storage function and storage conditions, wherein the second device is a device other than the first device; and determine the second device as the main device.
[0015] Furthermore, the judgment module includes a first judgment unit, which is used to obtain the operating status parameters of the master device and / or the slave device; judge whether the operating status parameters meet the first scene conditions in the preset scene information; if the operating status parameters meet the first scene conditions in the preset scene information, it is determined that the first scene conditions in the preset scene information are triggered.
[0016] Furthermore, the judgment module includes a second judgment unit, which is used to detect environmental parameters in the target environment; judge whether the environmental parameters meet the second scene conditions in the preset scene information; if the environmental parameters meet the second scene conditions in the preset scene information, it is determined that the second scene conditions in the preset scene information are triggered.
[0017] Furthermore, the control module includes a control unit for searching for a target control instruction that matches the scene condition from a preset instruction set, wherein the target control instruction carries instruction content and a control object identifier, and the preset scene information includes the preset instruction set; transmitting the target control instruction to the processor of the master device, and broadcasting the target control instruction to the slave device to control the master device and / or slave device that matches the control object identifier to execute the instruction content.
[0018] Furthermore, the receiving module includes a receiving unit for receiving preset scene information broadcast by the target terminal through the Bluetooth communication module; receiving preset scene information broadcast by the target terminal through the NFC near-field communication module; and receiving preset scene information broadcast by the target terminal through the WIFI communication module.
[0019] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0020] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.
[0021] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.
[0022] The present invention receives preset scene information broadcast by a target terminal and stores the preset scene information in local storage on a master device, wherein the master device is in communication with a plurality of slave devices. A determination is made as to whether a scene condition in the preset scene information is triggered. If so, the master device and / or the slave device are controlled to execute control instructions corresponding to the scene condition. The scene information is stored locally on the master device, and then, when the scene is needed, the synchronized scene information is broadcast to surrounding slave devices. This allows scene information storage and scene content execution to be completed without relying on the cloud, thus adapting to a wider range of usage scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 This is a hardware structure block diagram of a computer according to an embodiment of the present invention;
[0025] Figure 2 is a flow chart of a method for controlling a device according to an embodiment of the present invention;
[0026] Figure 3 This is a flowchart of the storage and execution of localized scenario strategies according to an embodiment of the present invention;
[0027] Figure 4 4 is a structural block diagram of a control device of a device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application. It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Example 1
[0031] The method embodiment provided in the first embodiment of the present application can be executed on a mobile phone, computer, tablet or similar computing device. Taking running on a computer as an example, Figure 1 This is a hardware structure diagram of a computer according to an embodiment of the present invention. Figure 1 As shown, the computer may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data. Optionally, the above computer may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0032] Memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to a method for identifying motion-stillness ratio in a video according to an embodiment of the present invention. Processor 102 executes the computer program stored in memory 104 to perform various functional applications and data processing, thereby implementing the aforementioned method. Memory 104 may include high-speed random access memory (RAM) 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, memory 104 may further include memory remotely located relative to processor 102, and such remote memory may be connected to the computer via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0033] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a computer's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0034] In this embodiment, a method for controlling a device is provided. Figure 2 is a flow chart of a method for controlling a device according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0035] Step S10, receiving preset scene information broadcast by a target terminal, and storing the preset scene information in a local storage of a master device, wherein the master device is communicatively connected with a plurality of slave devices;
[0036] Receive the preset scene information broadcast by the target terminal, and store the preset scene information in the local storage of the master device, wherein the master device is in communication connection with several slave devices. The target terminal can be a mobile phone, tablet computer or other terminal. In this embodiment, a mobile phone is used as an example for explanation. The master device and the slave device are smart home devices. In one example, Bluetooth BLE (Bluetooth Low Energy) can be used to realize any two-to-one networking communication and data interaction between smart home devices, that is, the master device and several slave devices are connected through Bluetooth BLE communication. Among them, Bluetooth BLE is a radio technology that supports short-range communication between devices (generally within 10m), and can exchange wireless information between many devices including mobile phones, PDAs, wireless headphones, laptops, and related peripherals. Reference Figure 3 First, the scene is set through the target terminal (such as a mobile phone), the smart home device is registered and bound to the user account via Bluetooth, all home devices under the user account are displayed through the application software in the target terminal, and preset scene information is established according to actual needs. The preset scene information includes scene conditions and scene instructions, among which the scene conditions are several conditions for triggering the scene, such as whether the current time reaches the specified time point, whether the current environmental factors reach the corresponding preset values, such as whether the current temperature reaches the preset temperature, whether the specified device is started, etc. The scene instructions are the corresponding operations that need to be performed by the specified device after the scene conditions are met, such as when the room temperature reaches 30 degrees, the air conditioner is automatically turned on.
[0037] Furthermore, receiving the preset scene information broadcast by the target terminal includes one of the following: receiving the preset scene information broadcast by the target terminal via a Bluetooth communication module; receiving the preset scene information broadcast by the target terminal via an NFC near-field communication module; receiving the preset scene information broadcast by the target terminal via a WIFI communication module. For example, this embodiment uses BLE (Bluetooth Low Energy), or Bluetooth BLE intelligent networking technology, to achieve any two-way communication and data interaction between smart home devices and mobile phone Bluetooth. That is, the target terminal broadcasts the user-set scene information to the devices under the user account indiscriminately via the Bluetooth communication module. Indiscriminate means that the user does not need to select a specific device or walk to a specific device; it only needs to have the device within the reach of the Bluetooth signal. In this embodiment, the master device and the slave device can be connected via Bluetooth BLE intelligent networking technology, and information can be transmitted between the master device and the slave device via broadcast. In this embodiment, the target terminal can broadcast the preset scene information via the Bluetooth communication module, and can also broadcast the preset scene information via the NFC near-field communication module or the WIFI communication module.
[0038] Step S20, determining whether the scene condition in the preset scene information is triggered;
[0039] Step S30: If the scene condition in the preset scene information is triggered, control the master device and / or the slave device to execute a control instruction corresponding to the scene condition.
[0040] The application scenario of this embodiment can be a scenario in which scene linkage between various devices is realized in an environment where there is no wide area network, such as in the decoration and debugging stage. After the preset scene information is stored in the local storage of the master device, the master device can determine whether the scene conditions in the preset scene information are triggered. If the scene conditions in the preset scene information are triggered, the master device and / or the slave device are controlled to execute control instructions corresponding to the scene conditions.
[0041] Through the above steps, the preset scene information broadcast by the target terminal is received and stored in the local storage of the master device, where the master device is connected to multiple slave devices; a determination is made as to whether the scene conditions in the preset scene information are triggered; and if so, the master device and / or the slave device is controlled to execute control instructions corresponding to the scene conditions. The scene information is stored locally on the master device, and then, when the scene is needed, the synchronized scene information is broadcast to surrounding slave devices via Bluetooth smart networking technology. This allows device scene setting, scene information storage, and scene content execution to be completed without relying on the cloud, adapting to a wider range of usage scenarios.
[0042] In this embodiment, after receiving the preset scenario information broadcast by the target terminal, the method further includes:
[0043] Step A, determining whether a first device has a storage function and storage conditions, wherein the first device is connected to the target terminal;
[0044] Step B: If the first device has the storage function and storage conditions, the first device is determined as the master device.
[0045] The first device is the home appliance currently receiving the target terminal's broadcast. The first device is determined to have storage capabilities and storage conditions. The first device is connected to the target terminal. If the first device has storage capabilities and storage conditions, the first device is determined to be the primary device. Furthermore, the target terminal broadcasts scene information to nearby home appliances. After the nearby home appliances receive the scene information, several of the home appliances can determine whether they have storage capabilities and storage conditions through their own running programs and feedback performance information to the target terminal. This performance information may include parameters such as storage capabilities, storage space, and computing power. Based on the performance information feedback from each device, the target terminal selects a device with storage capabilities, the largest storage space, and the strongest computing power as the primary device. In this embodiment, whether a device itself has storage capabilities can be determined by the device design and is part of the product parameters. Whether a device has storage conditions, such as whether it has storage space, can be self-determined by the device program.
[0046] Furthermore, after determining whether the first device has the storage function and storage conditions, the method further includes:
[0047] Step C: If the first device does not have the storage function or storage conditions, control the first device to continue broadcasting the preset scene information to the second device until the second device has the storage function and storage conditions, wherein the second device is a device other than the first device;
[0048] Step D: Determine the second device as the master device.
[0049] If the first device does not have the storage function or storage conditions, it means that the first device does not have the storage function and cannot store the scene information, or the first device has insufficient storage space and cannot store the scene information, then the first device is controlled to continue broadcasting the preset scene information to the second device until the second device has the storage function and storage conditions. The second device is determined as the main device, and the second device is a device other than the first device. Figure 3After receiving the scene information, the device determines whether the scene information can be stored. If the scene information can be stored, it is stored locally and the broadcast is stopped. If the scene information does not have the storage function or storage conditions, it is not stored and the scene information is forwarded and broadcast to other devices until a master device with storage function and storage conditions is found.
[0050] When the target terminal is far away from the home appliance and cannot broadcast the preset scene information to the distant home appliance, the home appliance that has currently received the preset scene information will forward it to other home appliances through broadcast relay. Furthermore, after the master device stores the preset scene information, the master device can also broadcast the preset scene information to all slave devices in the entire network after determining that the scene conditions in the preset scene information are triggered. Therefore, only one device needs to store the information to notify other devices in the entire network.
[0051] In one implementation of this embodiment, determining whether the scene condition in the preset scene information is triggered includes:
[0052] Step S201, obtaining operating status parameters of the master device and / or the slave device;
[0053] Step S202, determining whether the operating state parameter meets the first scenario condition in the preset scenario information;
[0054] Step S203: If the operating status parameter meets the first scene condition in the preset scene information, it is determined that the first scene condition in the preset scene information is triggered.
[0055] In this embodiment, the operating status parameters of the master device and / or slave device are obtained. The devices can broadcast their own operating status parameters according to the scene strategy through Bluetooth smart networking technology. The master device determines whether the operating status parameters meet the first scene condition in the preset scene information. If the operating status parameters meet the first scene condition in the preset scene information, it is determined that the first scene condition in the preset scene information is triggered. In one example, the first scene condition in the preset scene information is that the air conditioner operating mode is set to sleep mode. The air conditioner broadcasts the operating status parameters setting the air conditioner operating mode to sleep mode to other surrounding devices. The master device receives the operating status parameters of the air conditioner operating mode being set to sleep mode and determines that the operating state meets the first scene condition. It then determines that the first scene condition in the preset scene information is triggered, and then controls the master device and / or slave device to execute the control instructions corresponding to the scene condition.
[0056] In another implementation of this embodiment, determining whether the scene condition in the preset scene information is triggered includes:
[0057] Step S204, detecting environmental parameters in the target environment;
[0058] Step S205, determining whether the environmental parameters meet the second scene condition in the preset scene information;
[0059] Step S206: If the environmental parameter meets the second scene condition in the preset scene information, it is determined that the second scene condition in the preset scene information is triggered.
[0060] In this embodiment, a sensor can detect environmental parameters in a target environment to determine whether the detected environmental parameters meet the second scenario condition in the preset scenario information. If the environmental parameters meet the second scenario condition in the preset scenario information, the second scenario condition in the preset scenario information is determined to be triggered. In one example, the second scenario condition in the preset scenario information is that the indoor temperature exceeds 30 degrees Celsius. A temperature sensor can detect the temperature in the target environment. If the temperature exceeds 30 degrees Celsius, it can be determined that the temperature meets the second scenario condition in the scenario information. The second scenario condition in the preset scenario information is determined to be triggered, and the master device and / or slave device can be controlled to execute a control instruction corresponding to the scenario condition.
[0061] Furthermore, controlling the master device and / or the slave device to execute a control instruction corresponding to the scene condition includes:
[0062] Step S301: searching a target control instruction matching the scenario condition from a preset instruction set, wherein the target control instruction carries instruction content and a control object identifier, and the preset scenario information includes the preset instruction set;
[0063] Step S302: Transmit the target control instruction to the processor of the master device, and broadcast the target control instruction to the slave device, so as to control the master device and / or slave device matching the control object identifier to execute the instruction content.
[0064] In this embodiment, after determining that the scene condition is triggered, the master device searches for a target control instruction that matches the scene condition from a preset instruction set, where the target control instruction carries instruction content and a control object identifier. In one example, the scene condition is that the air-conditioning operation mode is set to sleep mode, and the control instruction corresponding to the scene condition is to turn off all indoor lights and turn on the fan. If the scene condition is triggered, the target control instruction to turn off all indoor lights and turn on the fan is found from the preset instruction set, where the control object identifiers in the target control instruction are lights and fans, and the instruction content is to turn off all indoor lights and turn on the fan. The target control instruction is transmitted to the processor of the master device, and the target control instruction is broadcast to the slave device to control the master device and / or slave device that matches the control object identifier to execute the instruction content. Exemplarily, the master device and the slave device that receive the target control instruction can determine whether the control object identifier in the target control instruction matches themselves through their own programs. If the control object identifier matches themselves, the instruction content is executed.
[0065] like Figure 3 As shown, the scene is set through the mobile phone, and the mobile phone broadcasts the scene setting content, which is the preset scene information. The current device receives the scene content, and the current device determines whether to store the scene content. If not, it is forwarded to other devices. If it is stored, the scene content is stored locally and the broadcast is stopped. In daily use, the device broadcast information or objective conditions are triggered. The objective conditions are environmental parameters. The device that stores the scene content determines whether it meets the scene policy conditions. If it meets the conditions, the scene is executed and the scene action instructions are broadcast to the surrounding devices. If it does not meet the conditions, the linkage is not executed.
[0066] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0067] Example 2
[0068] This embodiment also provides a device control device for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0069] Figure 4 is a structural block diagram of a control device of a device according to an embodiment of the present invention, such as Figure 4 As shown, the device includes: a receiving module 60, a judging module 61, and a control module 62, wherein:
[0070] a receiving module 60, configured to receive preset scene information broadcast by a target terminal and store the preset scene information in a local storage of a master device, wherein the master device is communicatively connected to a plurality of slave devices;
[0071] A judging module 61 is configured to judge whether a scene condition in the preset scene information is triggered;
[0072] The control module 62 is configured to control the master device and / or the slave device to execute a control instruction corresponding to the scene condition if the scene condition in the preset scene information is triggered.
[0073] Optionally, the control device of the device also includes a determination module for determining whether the first device has storage function and storage conditions, wherein the first device is connected to the target terminal; if the first device has storage function and storage conditions, the first device is determined as the main device.
[0074] Optionally, the determination module is also used to control the first device to continue broadcasting the preset scene information to the second device if the first device does not have the storage function or storage conditions until the second device is a device with the storage function and storage conditions, wherein the second device is a device other than the first device; and determine the second device as the main device.
[0075] Optionally, the judgment module includes a first judgment unit, which is used to obtain the operating status parameters of the master device and / or the slave device; judge whether the operating status parameters meet the first scene conditions in the preset scene information; if the operating status parameters meet the first scene conditions in the preset scene information, it is determined that the first scene conditions in the preset scene information are triggered.
[0076] Optionally, the judgment module includes a second judgment unit, which is used to detect environmental parameters in the target environment; judge whether the environmental parameters meet the second scene conditions in the preset scene information; if the environmental parameters meet the second scene conditions in the preset scene information, it is determined that the second scene conditions in the preset scene information are triggered.
[0077] Optionally, the control module includes a control unit for searching for a target control instruction that matches the scene condition from a preset instruction set, wherein the target control instruction carries instruction content and a control object identifier, and the preset scene information includes the preset instruction set; transmitting the target control instruction to the processor of the master device, and broadcasting the target control instruction to the slave device to control the master device and / or slave device that matches the control object identifier to execute the instruction content.
[0078] Optionally, the receiving module includes a receiving unit for receiving preset scene information broadcast by the target terminal through the Bluetooth communication module; receiving preset scene information broadcast by the target terminal through the NFC near-field communication module; and receiving preset scene information broadcast by the target terminal through the WIFI communication module.
[0079] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0080] Example 3
[0081] An embodiment of the present invention further provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0082] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0083] S1, receiving preset scene information broadcast by a target terminal, and storing the preset scene information in a local storage of a master device, wherein the master device is communicatively connected with a plurality of slave devices;
[0084] S2, determining whether the scene condition in the preset scene information is triggered;
[0085] S3. If a scene condition in the preset scene information is triggered, control the master device and / or the slave device to execute a control instruction corresponding to the scene condition.
[0086] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0087] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0088] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0089] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0090] S1, receiving preset scene information broadcast by a target terminal, and storing the preset scene information in a local storage of a master device, wherein the master device is communicatively connected with a plurality of slave devices;
[0091] S2, determining whether the scene condition in the preset scene information is triggered;
[0092] S3. If a scene condition in the preset scene information is triggered, control the master device and / or the slave device to execute a control instruction corresponding to the scene condition.
[0093] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0094] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0095] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0096] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0097] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0098] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0100] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for controlling a device, characterized in that: The method comprises: Receiving preset scene information broadcast by a target terminal, and storing the preset scene information in a local storage of a master device, wherein the master device is communicatively connected with a plurality of slave devices; Determining whether the scene condition in the preset scene information is triggered; If a scene condition in the preset scene information is triggered, controlling the master device and / or the slave device to execute a control instruction corresponding to the scene condition; Controlling the master device and / or the slave device to execute a control instruction corresponding to the scene condition includes: Searching for a target control instruction that matches the scenario condition from a preset instruction set, wherein the target control instruction carries instruction content and a control object identifier, and the preset scenario information includes the preset instruction set; transmitting the target control instruction to the processor of the master device and broadcasting the target control instruction to the slave device, so as to control the master device and / or the slave device that matches the control object identifier to execute the instruction content; the slave device determines whether the control object identifier in the target control instruction matches its own through its own program, and if the control object identifier matches its own, executes the instruction content; After receiving the preset scenario information broadcast by the target terminal, the method further includes: determining whether a first device has a storage function and storage conditions, wherein the first device is connected to the target terminal; If the first device has the storage function and storage conditions, determining the first device as the master device; If the first device does not have a storage function or storage conditions, control the first device to continue broadcasting the preset scene information to the second device until the second device has a storage function and storage conditions, wherein the second device is a device other than the first device; Determine the second device as a primary device; Determining whether the scene condition in the preset scene information is triggered includes: Obtaining operating status parameters of the master device and / or the slave device; Determining whether the operating state parameter meets the first scenario condition in the preset scenario information; If the operating status parameter meets the first scene condition in the preset scene information, it is determined that the first scene condition in the preset scene information is triggered.
2. The method according to claim 1, characterized in that Determining whether the scene condition in the preset scene information is triggered includes: Detect environmental parameters in the target environment; Determining whether the environmental parameters meet the second scene condition in the preset scene information; If the environmental parameter meets the second scene condition in the preset scene information, it is determined that the second scene condition in the preset scene information is triggered.
3. The method according to claim 1, characterized in that The preset scenario information broadcast by the receiving target terminal includes one of the following: Receive preset scene information broadcast by the target terminal through the Bluetooth communication module; Receive preset scene information broadcast by the target terminal through the NFC near-field communication module; Receive preset scene information broadcast by the target terminal through the WIFI communication module.
4. A control device for an equipment, characterized in that: include: a receiving module, configured to receive preset scene information broadcast by a target terminal and store the preset scene information in a local storage of a master device, wherein the master device is communicatively connected to a plurality of slave devices; A judgment module, configured to judge whether a scene condition in the preset scene information is triggered; a control module, configured to control the master device and / or the slave device to execute a control instruction corresponding to the scene condition if the scene condition in the preset scene information is triggered; The control module includes a control unit, configured to search a preset instruction set for a target control instruction that matches the scenario condition, wherein the target control instruction carries instruction content and a control object identifier, and the preset scenario information includes the preset instruction set; transmit the target control instruction to the processor of the master device, and broadcast the target control instruction to the slave device, so as to control the master device and / or the slave device that matches the control object identifier to execute the instruction content; the slave device determines whether the control object identifier in the target control instruction matches its own through its own program, and executes the instruction content if the control object identifier matches its own; After receiving the preset scene information broadcast by the target terminal, the method includes: determining whether a first device has a storage function and storage conditions, wherein the first device is connected to the target terminal; If the first device has the storage function and storage conditions, determining the first device as the master device; If the first device does not have a storage function or storage conditions, control the first device to continue broadcasting the preset scene information to the second device until the second device has a storage function and storage conditions, wherein the second device is a device other than the first device; Determine the second device as a primary device; Determining whether the scene condition in the preset scene information is triggered includes: Obtaining operating status parameters of the master device and / or the slave device; Determining whether the operating state parameter meets the first scenario condition in the preset scenario information; If the operating status parameter meets the first scene condition in the preset scene information, it is determined that the first scene condition in the preset scene information is triggered.
5. An electronic device, characterized in that: The system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: Memory for storing computer programs; A processor, configured to execute the method steps according to any one of claims 1 to 3 by running a program stored in a memory.
6. A storage medium, characterized in that The storage medium includes a stored program, wherein the program executes the method steps of any one of claims 1 to 3 when running.
Citation Information
Patent Citations
Master device selection method, device management method, electronic device and storage medium
CN112398664A
Control method of smart home equipment and control method of server
CN115277280A