CN114422559A - Device control method and device, electronic device and storage medium - Google Patents

Device control method and device, electronic device and storage medium Download PDF

Info

Publication number
CN114422559A
CN114422559A CN202111682832.2A CN202111682832A CN114422559A CN 114422559 A CN114422559 A CN 114422559A CN 202111682832 A CN202111682832 A CN 202111682832A CN 114422559 A CN114422559 A CN 114422559A
Authority
CN
China
Prior art keywords
control instruction
target
information
target device
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111682832.2A
Other languages
Chinese (zh)
Inventor
焦志民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Haiyi Zhixin Technology Co Ltd
Original Assignee
Shenzhen Haiyi Zhixin Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Haiyi Zhixin Technology Co Ltd filed Critical Shenzhen Haiyi Zhixin Technology Co Ltd
Priority to CN202111682832.2A priority Critical patent/CN114422559A/en
Publication of CN114422559A publication Critical patent/CN114422559A/en
Priority to PCT/CN2022/113942 priority patent/WO2023124136A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/80Homes; Buildings
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/30Control
    • G16Y40/35Management of things, i.e. controlling in accordance with a policy or in order to achieve specified objectives
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72415User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories for remote control of appliances

Abstract

The embodiment of the invention relates to a method and a device for controlling equipment, electronic equipment and a storage medium, wherein the method comprises the following steps: generating a control instruction of a target device set in a device cluster, wherein the target device set comprises a first device and a second device; sending the control instruction to the first device in the target device set, so that when the first device receives the control instruction, the control instruction is sent to the second device in the target device set in a unicast and multicast manner; by adopting two modes for simultaneous transmission, the second equipment in the equipment set can be ensured to quickly receive the control instruction, and the omission of the control instruction is avoided, so that the quick response among multiple equipment is realized.

Description

Device control method and device, electronic device and storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for controlling a device, an electronic device, and a storage medium.
Background
With the increasingly wide application of the technology of the internet of things, the cloud platform of the internet of things can realize the access, control and management of equipment. The equipment is accessed to the Internet of things cloud platform, so that remote control and data acquisition of the equipment are realized.
In the related art, linkage is lacked among the devices, and when a plurality of devices need to be controlled simultaneously, response delay among the devices is large, so that synchronous control effect among the devices is poor.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a device control method and apparatus, an electronic device, and a storage medium to solve the above technical problems or some of the technical problems.
In a first aspect, an embodiment of the present invention provides a method for controlling a device, including:
generating a control instruction of a target device set in a device cluster, wherein the target device set comprises a first device and a second device;
and sending the control instruction to the first device in the target device set, so that when the first device receives the control instruction, the control instruction is sent to the second device in the target device set in a unicast and multicast mode.
In one possible embodiment, the method further comprises:
in the network state detection process between the first device and the second device, judging whether the second device receives a network detection message sent by the first device;
and when determining that the second device does not receive the network detection message, re-determining the first device from the second device to update the first device in the target device set.
In one possible embodiment, the method further comprises:
and updating the equipment state of the second equipment which does not return the response message when the first equipment is determined not to receive the response message of the network detection message returned by the second equipment.
In one possible embodiment, the method further comprises:
grouping the devices in the device cluster according to a preset rule to obtain a plurality of device sets;
determining a corresponding first device and second device in each of the device sets.
In one possible embodiment, the method further comprises:
and aiming at any one device set in the device cluster, sending target device information to the first device and the second device in the device set so that the first device and the second device store the target device information, wherein the target device information comprises information of all devices in the device set.
In a possible embodiment, the sending the control instruction to the second device in the target device set simultaneously in a unicast manner and a multicast manner includes:
the first equipment inquires the target equipment information;
and sending the control instruction to a second device in the target device set in a unicast and multicast mode based on the target device information.
In one possible embodiment, the method further comprises:
after the first device executes the control instruction, receiving a first execution result returned by the first device and used for indicating the execution of the control instruction;
after the second device executes the control instruction, receiving a second execution result returned by the second device and used for indicating the execution of the control instruction;
updating the current state information of the set of target devices based on the first execution result and the second execution result.
In a second aspect, an embodiment of the present invention provides a device control apparatus, including:
a generating module, configured to generate a control instruction of a target device set in a device cluster, where the target device set includes a first device and a second device;
a sending module, configured to send the control instruction to the first device in the target device set, so that when receiving the control instruction, the first device sends the control instruction to the second device in the target device set in a unicast and multicast manner.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory, the processor being configured to execute a control program of an apparatus stored in the memory to implement the control method of the apparatus of any one of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the control method of the apparatus according to any one of the first aspects.
According to the device control method provided by the embodiment of the invention, a control instruction of a target device set is generated by aiming at the target device set in a device cluster, wherein the target device set comprises a first device and a second device; sending the control instruction to the first device in the target device set, so that when the first device receives the control instruction, the control instruction is sent to the second device in the target device set in a unicast and multicast manner; by adopting two modes for simultaneous transmission, the second equipment in the equipment set can be ensured to quickly receive the control instruction, and the omission of the control instruction is avoided, so that the quick response among multiple equipment is realized.
Drawings
Fig. 1 is an application scenario diagram of a device control method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for controlling a device according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another method for controlling a device according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a control method of another apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a control device of an apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is an application scenario diagram of a device control method according to an embodiment of the present invention, as shown in fig. 1, specifically including:
the device cluster comprises a plurality of device sets, each device set comprises a plurality of devices, each device set comprises a first device and a second device, the first device can be understood as a master device in the device set, and the second device can be understood as a slave device in the device set; the number of slave devices may include one or more for the number of master devices in each device set being one.
Further, the device cluster is controlled by an external electronic device, which controls one or more device sets in the device cluster simultaneously, when a certain target device set is needed, sending a control instruction to a first device in the target device set, when receiving the control instruction, the first device in the target device set sends the control instruction to the second device in the same device set in a unicast and multicast manner, the control instruction sent in the unicast manner can enable the second device to quickly receive the control instruction, the second device in the same device set can enable all the second devices to receive the control instruction in the multicast manner, that is, the control instruction covers all the second devices, and the two manners are simultaneously sent to ensure that the second devices in the device set quickly receive the control instruction and avoid omission of the control instruction.
Further, when the second device receives the control instruction for the first time (the control instruction may be sent by the first device in a unicast manner), executing the control instruction; when the second device receives the control instruction for the second time (the first device sends the control instruction in a multicast mode), judging whether the executed or executing control instruction comprises the control instruction received for the second time, and if so, ignoring the control instruction; if not, the control instruction is executed.
In an alternative of the embodiment of the present invention, for the division of the device set in the device cluster, the division may be performed by an external device, or the division may be performed when the devices in the device cluster are deployed, and the division of the device set is completed when the device deployment is completed.
In an example, an Application (APP) is installed on an external device, deployed devices are added in the APP, grouping of the devices is completed, devices of each group are collectively called a device set, a device cluster is formed in a plurality of device sets, and a master device (a first device) and a slave device (a second device) are determined in each device set.
Further, the devices in the device cluster are grouped according to a preset rule to obtain a plurality of device sets, where the preset rule may be: the grouping may be based on the deployment location of the devices, the identification of the devices (e.g., device ID, device type), and so forth.
In an example, in a device deployment process, the device sets are constructed, and a first device and a second device in each set are determined, the first device in the device set sends device information in the device set to an electronic device, and the electronic device stores information of a device cluster, so that the device cluster can be controlled by the electronic device in the following process.
In an alternative of the embodiment of the present invention, after each device set is determined, each device (the first device or the second device) in the device set stores other device information except for itself in the device set, and the device information may include: IP address, MAC address, device ID, serial number, and response action rule.
For example, the device set a includes: device 1 (first device), device 2 (second device), device 3 (second device), and device 4 (second device); device 1 locally stores device information for devices 2-4, device 2 locally stores device information for devices 1, 3-4, device 3 locally stores device information for devices 1-2, 4, and device 4 locally stores device information for devices 1-3.
In an alternative of the embodiment of the present invention, when a device (a first device or a second device) in a device set obtains device information and changes (for example, an IP address changes), the device sends the changed device information to other devices in the device set in a unicast or multicast manner, so that the other devices update locally stored device information after receiving the changed device information.
In an alternative of the embodiment of the present invention, the electronic device further stores device information corresponding to each device set in the device cluster, so that when the device set is controlled by the electronic device, the device information is queried to accurately find the target device cluster to be controlled.
In this embodiment, the related electronic devices may be devices such as an intelligent remote controller, a smart phone, and an intelligent bracelet, the devices in the device cluster may be devices such as a lamp and a camera, and the devices in the device cluster may include one or more types.
In an example, all luminaires and all cameras installed in a certain building area may be used as an equipment cluster.
Fig. 2 is a schematic flowchart of a method for controlling a device according to an embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
s21, aiming at a target device set in the device cluster, generating a control instruction of the target device set, wherein the target device set comprises a first device and a second device.
In this embodiment, when a target device set in a device cluster needs to be controlled, a corresponding target device set is queried through device information locally stored in an electronic device, and a corresponding control instruction is generated for the target device set.
The target device set includes a first device and a second device, the first device may be understood as a master device in the target device set and is used for performing data interaction with the electronic device, and the second device may be understood as a slave device, that is, may receive the control instruction forwarded by the first device.
S22, sending the control instruction to the first device in the target device set, so that when receiving the control instruction, the first device sends the control instruction to the second device in the target device set in a unicast and multicast manner.
In this embodiment, the electronic device sends the control instruction to a first device in the target device set, and the first device sends the control instruction to a second device in the target device set simultaneously in a unicast and multicast manner according to the device information corresponding to the locally stored target device set.
Further, after the first device completes sending the control instruction, the first device executes the control instruction, and when the second device receives the second control instruction, the second device executes the control instruction, so that the electronic device performs linkage control on the first device and the second device in the target device set.
The control instruction is sent in a unicast mode, so that the second device can quickly receive the control instruction, and the control instructions are all received by the second devices in the same device set in a multicast mode, namely the control instructions all cover the second devices.
According to the device control method provided by the embodiment of the invention, a control instruction of a target device set is generated by aiming at the target device set in a device cluster, wherein the target device set comprises a first device and a second device; sending the control instruction to the first device in the target device set, so that when the first device receives the control instruction, the control instruction is sent to the second device in the target device set in a unicast and multicast manner; by adopting two modes for simultaneous transmission, the second equipment in the equipment set can be ensured to quickly receive the control instruction, and the omission of the control instruction is avoided, so that the quick response among multiple equipment is realized.
The following describes the control method of the device in this embodiment by taking an electronic device as a smart phone and an electronic device as a smart lamp as an example.
The intelligent lamp is deployed in a building area, the deployment position can be the door front position, the garage position, the enclosing wall position, the rear door position and the like of the building area, the intelligent lamp is provided with a WI-FI module, and the intelligent lamp can be connected to a wireless Access Point (AP) through the WI-FI module.
After an intelligent lamp is connected with a wireless access point, the intelligent lamp is added through an APP installed on a smart phone, the intelligent lamp is bound in the APP, all the bound intelligent lamps are displayed on a display interface of the APP, the intelligent lamps are grouped, the grouped preset rules can be that the intelligent lamps are grouped according to the deployment positions of the intelligent lamps (for example, the intelligent lamps in a door position area are divided into a device set 1, the intelligent lamps in a garage position area are divided into a device set 2, and the like), after the grouping is completed, one device is selected from each group as a main device (a first device), and the rest devices in the group are slave devices (second devices); the preset rule for grouping may also be to group according to the device types of the intelligent luminaires (e.g., divide a plurality of intelligent luminaires of 20W installed at a certain location into a device set 1, a plurality of intelligent luminaires of 10W installed at another location into a device set 2, etc.).
In an alternative of the embodiment of the present invention, for any one device set in the device cluster, target device information is sent to the first device and the second device in the device set, so that the first device and the second device store the target device information, where the target device information includes information of all devices in the device set.
Further, target equipment information in the same group is synchronized to each intelligent lamp through the APP, so that each intelligent lamp stores equipment information of other intelligent lamps in the group.
Accordingly, the target device information may be: the device IP address, the MAC address, the device ID, the serial number, and the response action rule, where the response action rule may be a rule when the device executes a control instruction, for example, when the intelligent lamp receives a turn-on instruction, the response action rule may be that the intelligent lamps in the group sequentially turn on in an order of 1-N.
Fig. 3 is a schematic flowchart of another method for controlling a device according to an embodiment of the present invention, and as shown in fig. 3, the method specifically includes:
s31, aiming at any device set in the device cluster, a first device in the device set sends a network detection message to a second device in the device set so as to execute network state detection between the first device and the second device.
S32, when it is determined that the second device receives the network detection message, and the second device returns a response message of the network detection message to the first device, it is determined that the network state between the first device and the second device is normal.
S33, when it is determined that the first device does not receive the response message of the network detection message returned by the second device, updating the device status of the second device which does not return the response message.
S34, when it is determined that the second device does not receive the network detection message, re-determining the first device from the second device, so as to update the first device in the target device set.
In this embodiment, to ensure the accuracy and timeliness of device response, the first device in each device set performs the step of detecting the network state, a time threshold (e.g., 2min) is predetermined, and at every interval of the time threshold, the first device performs network state detection, and the specific process of detection may be: the first device periodically sends a network detection message to a second device in the device set, so that the second device returns a response message in response to the network detection message, thereby judging the network reachability between the first device and the second device.
Further, when it is determined that the second device receives the network detection message, the second device determines that the network state between the first device and the second device is normal, that is, the network between the first device and the second device is normal, if it is determined that the second device returns a response message of the network detection message to the first device.
When it is determined that the first device does not receive a response message of the network detection message returned by the second device, that is, the network between the first device and the second device is not reachable (the network between the first device and the second device is abnormal), the device state of the second device that does not return the response message is updated (the device state table stored locally by the first device and used for characterizing the second device is updated), for example, the device state of the second device is changed from online to offline.
Accordingly, when the network between the first device and the second device is not reachable, it may be understood that the second device is in an offline state at this time, and when the second device is online again (i.e., a response message is returned to the first device within the next network state detection period), the device state of the second device is updated again, for example, the device state of the second device is changed from being offline to being online.
When it is determined that the second device does not receive the network detection message within a preset time (which may be greater than or equal to a time threshold), determining that the first device is offline, and re-determining the first device from the second device to update the first device in the target device set.
In an alternative of the embodiment of the present invention, when none of the plurality of second devices receives the network detection message within the preset time, it is determined that the first device is offline, and the plurality of second devices are determined, so that the accuracy of determining the network state of the first device can be improved, and the occurrence of erroneous determination is avoided.
Further, after the first device is re-determined from the second device, the re-determined first device updates the locally stored device information, and synchronizes the updated device information to the second device in the same device set and the electronic device.
In an alternative of the embodiment of the present invention, when the offline first device is online again, the offline first device may be determined as the first device in the device set again, or the offline first device may be set as the second device, and after the above operations are performed, the device information is updated synchronously.
In an alternative of the embodiment of the present invention, when the device information of the first device or the second device in the device set changes, the first device or the second device whose device information changes synchronizes the latest device information to other devices in the device set, so that the other devices update the locally stored device information.
Fig. 4 is a schematic flowchart of a control method for another device according to an embodiment of the present invention, and as shown in fig. 4, the method specifically includes:
s41, aiming at the target device set in the device cluster, generating a control instruction of the target device set.
S42, the first device inquires the target device information.
S43, based on the target device information, sending the control instruction to a second device in the target device set in a unicast and multicast mode.
In this embodiment, the target device information is device information of all devices (the first device and the second device) in the target device set, and S41-S43 are similar to S21-S22 in fig. 2, and are not described herein again for brevity.
In an alternative of the embodiment of the present invention, the control instruction may be a control instruction for controlling all devices in the target device set, or may be a control instruction for controlling sub-devices in the target device set.
When the control instruction is a sub-device within the control target device set, the control instruction carries a device identifier (e.g., device ID) for executing the control instruction, and when receiving the first control instruction, the first device parses the first control instruction to obtain the device identifier, selects a second device corresponding to the device identifier from the target device information, and sends the second device corresponding to the device identifier in a unicast and multicast manner.
And S44, after the first device executes the control instruction, receiving a first execution result returned by the first device and used for indicating the execution of the control instruction.
And S45, after the second device executes the control instruction, receiving a second execution result returned by the second device and used for instructing to execute the control instruction.
S46, updating the current state information of the target device set based on the first execution result and the second execution result.
In this embodiment, when the first device and the second device receive the control instruction, the control instruction is executed, and a corresponding execution result is sent to the electronic device, so that the electronic device updates the state information corresponding to the target device set.
In one example, a turn-on command for controlling the garage-smart luminaire is generated on the APP of the smart phone (the operation may be voice input or manually triggered), the smart phone sends the control command to the master device in the garage-smart luminaire set, and the master device sends the control command to the slave device in the garage-smart luminaire set in a unicast or multicast manner. And when the master equipment and the slave equipment finish executing the control instruction, sending an opened execution result message to the smart phone, and updating the state information corresponding to the garage-smart lamp set from closed to opened after the smart phone receives the execution result message.
According to the device control method provided by the embodiment of the invention, a control instruction of a target device set is generated by aiming at the target device set in a device cluster, wherein the target device set comprises a first device and a second device; sending the control instruction to the first device in the target device set, so that when the first device receives the control instruction, the control instruction is sent to the second device in the target device set in a unicast and multicast manner; by adopting two modes for simultaneous transmission, the second equipment in the equipment set can be ensured to quickly receive the control instruction, and the omission of the control instruction is avoided, so that the quick response among multiple equipment is realized.
Fig. 5 is a schematic structural diagram of a control device of an apparatus according to an embodiment of the present invention, as shown in fig. 5, specifically including:
a generating module 51, configured to generate a control instruction of a target device set in a device cluster, where the target device set includes a first device and a second device;
a sending module 52, configured to send the control instruction to the first device in the target device set, so that when receiving the control instruction, the first device sends the control instruction to the second device in the target device set in a unicast and multicast manner simultaneously.
The control apparatus of the device provided in this embodiment may be the control apparatus of the device shown in fig. 5, and may perform all the steps of the control method of the device shown in fig. 2 to 4, so as to achieve the technical effect of the control method of the device shown in fig. 2 to 4, and please refer to the related description of fig. 2 to 4 for brevity, which is not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 600 shown in fig. 6 includes: at least one processor 601, memory 602, at least one network interface 604, and other user interfaces 603. The various components in the electronic device 600 are coupled together by a bus system 605. It is understood that the bus system 605 is used to enable communications among the components. The bus system 605 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 605 in fig. 6.
The user interface 603 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that the memory 602 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 602 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 602 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 6021 and application programs 6022.
The operating system 6021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program 6022 includes various application programs such as a Media Player (Media Player), a Browser (Browser), and the like, and is used to implement various application services. A program implementing the method of an embodiment of the invention can be included in the application program 6022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 602, specifically, a program or an instruction stored in the application program 6022, the processor 601 is configured to execute the method steps provided by the method embodiments, for example, including:
generating a control instruction of a target device set in a device cluster, wherein the target device set comprises a first device and a second device; and sending the control instruction to the first device in the target device set, so that when the first device receives the control instruction, the control instruction is sent to the second device in the target device set in a unicast and multicast mode.
In a possible implementation manner, in a network state detection process between the first device and the second device, it is determined whether the second device receives a network detection message sent by the first device; and when determining that the second device does not receive the network detection message, re-determining the first device from the second device to update the first device in the target device set.
In one possible implementation manner, when it is determined that the first device does not receive a response message of the network detection message returned by the second device, the device status of the second device that does not return the response message is updated.
In a possible implementation manner, the devices in the device cluster are grouped according to a preset rule to obtain a plurality of device sets; determining a corresponding first device and second device in each of the device sets.
In one possible implementation, for any one device set in the device cluster, target device information is sent to the first device and the second device in the device set, so that the first device and the second device store the target device information, where the target device information includes information of all devices in the device set.
In one possible embodiment, the first device queries the target device information; and sending the control instruction to a second device in the target device set in a unicast and multicast mode based on the target device information.
In one possible embodiment, after the first device executes the control instruction, a first execution result returned by the first device and used for indicating the execution of the control instruction is received; after the second device executes the control instruction, receiving a second execution result returned by the second device and used for indicating the execution of the control instruction; updating the current state information of the set of target devices based on the first execution result and the second execution result.
The method disclosed by the above-mentioned embodiment of the present invention can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 601. The Processor 601 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be the electronic device shown in fig. 6, and may execute all the steps of the control method of the device shown in fig. 2 to 4, so as to achieve the technical effect of the control method of the device shown in fig. 2 to 4, and for brevity, please refer to the description related to fig. 2 to 4, which is not described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors to implement the above-described method of controlling a device performed on the control device side of the device.
The processor is configured to execute a control program of the device stored in the memory to implement the following steps of a control method of the device performed on a control device side of the device:
generating a control instruction of a target device set in a device cluster, wherein the target device set comprises a first device and a second device; and sending the control instruction to the first device in the target device set, so that when the first device receives the control instruction, the control instruction is sent to the second device in the target device set in a unicast and multicast mode.
In a possible implementation manner, in a network state detection process between the first device and the second device, it is determined whether the second device receives a network detection message sent by the first device; and when determining that the second device does not receive the network detection message, re-determining the first device from the second device to update the first device in the target device set.
In one possible implementation manner, when it is determined that the first device does not receive a response message of the network detection message returned by the second device, the device status of the second device that does not return the response message is updated.
In a possible implementation manner, the devices in the device cluster are grouped according to a preset rule to obtain a plurality of device sets; determining a corresponding first device and second device in each of the device sets.
In one possible implementation, for any one device set in the device cluster, target device information is sent to the first device and the second device in the device set, so that the first device and the second device store the target device information, where the target device information includes information of all devices in the device set.
In one possible embodiment, the first device queries the target device information; and sending the control instruction to a second device in the target device set in a unicast and multicast mode based on the target device information.
In one possible embodiment, after the first device executes the control instruction, a first execution result returned by the first device and used for indicating the execution of the control instruction is received; after the second device executes the control instruction, receiving a second execution result returned by the second device and used for indicating the execution of the control instruction; updating the current state information of the set of target devices based on the first execution result and the second execution result.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of controlling a device, comprising:
generating a control instruction of a target device set in a device cluster, wherein the target device set comprises a first device and a second device;
and sending the control instruction to the first device in the target device set, so that when the first device receives the control instruction, the control instruction is sent to the second device in the target device set in a unicast and multicast mode.
2. The method of claim 1, further comprising:
in the network state detection process between the first device and the second device, judging whether the second device receives a network detection message sent by the first device;
and when determining that the second device does not receive the network detection message, re-determining the first device from the second device to update the first device in the target device set.
3. The method of claim 2, further comprising:
and updating the equipment state of the second equipment which does not return the response message when the first equipment is determined not to receive the response message of the network detection message returned by the second equipment.
4. The method of claim 1, further comprising:
grouping the devices in the device cluster according to a preset rule to obtain a plurality of device sets;
determining a corresponding first device and second device in each of the device sets.
5. The method of claim 4, further comprising:
and aiming at any one device set in the device cluster, sending target device information to the first device and the second device in the device set so that the first device and the second device store the target device information, wherein the target device information comprises information of all devices in the device set.
6. The method of claim 5, wherein the sending the control instruction to the second device in the set of target devices simultaneously in a unicast manner and a multicast manner comprises:
the first equipment inquires the target equipment information;
and sending the control instruction to a second device in the target device set in a unicast and multicast mode based on the target device information.
7. The method according to any one of claims 1-6, further comprising:
after the first device executes the control instruction, receiving a first execution result returned by the first device and used for indicating the execution of the control instruction;
after the second device executes the control instruction, receiving a second execution result returned by the second device and used for indicating the execution of the control instruction;
updating the current state information of the set of target devices based on the first execution result and the second execution result.
8. A control apparatus of a device, characterized by comprising:
a generating module, configured to generate a control instruction of a target device set in a device cluster, where the target device set includes a first device and a second device;
a sending module, configured to send the control instruction to the first device in the target device set, so that when receiving the control instruction, the first device sends the control instruction to the second device in the target device set in a unicast and multicast manner.
9. An electronic device, comprising: a processor and a memory, the processor being configured to execute a control program of the apparatus stored in the memory to implement the control method of the apparatus of any one of claims 1 to 7.
10. A storage medium storing one or more programs executable by one or more processors to implement a method of controlling an apparatus according to any one of claims 1 to 7.
CN202111682832.2A 2021-12-31 2021-12-31 Device control method and device, electronic device and storage medium Pending CN114422559A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111682832.2A CN114422559A (en) 2021-12-31 2021-12-31 Device control method and device, electronic device and storage medium
PCT/CN2022/113942 WO2023124136A1 (en) 2021-12-31 2022-08-22 Device control method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111682832.2A CN114422559A (en) 2021-12-31 2021-12-31 Device control method and device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114422559A true CN114422559A (en) 2022-04-29

Family

ID=81271536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111682832.2A Pending CN114422559A (en) 2021-12-31 2021-12-31 Device control method and device, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN114422559A (en)
WO (1) WO2023124136A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023124136A1 (en) * 2021-12-31 2023-07-06 深圳海翼智新科技有限公司 Device control method and apparatus, electronic device, and storage medium

Citations (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080089268A1 (en) * 2006-10-17 2008-04-17 Kinder Richard D Media distribution in a wireless network
CN101426286A (en) * 2007-11-02 2009-05-06 瑞乐普(北京)科技有限公司 Method and device for supporting user's multimedia information browse in wireless network
US20130246527A1 (en) * 2012-03-16 2013-09-19 Research In Motion Limited System and Method for Managing Data Using Tree Structures
CN103595768A (en) * 2013-10-28 2014-02-19 国家电网公司 Method for realizing configuration synchronization between virtualized devices
US20140181270A1 (en) * 2003-07-28 2014-06-26 Sonos, Inc. System and Method for Synchronizing Operations Among a Plurality of Independently Clocked Digital Data Processing Devices
CN103955195A (en) * 2014-05-05 2014-07-30 中国安全生产科学研究院 Sending and responding method and device of control instruction
CN104267811A (en) * 2014-09-22 2015-01-07 联想(北京)有限公司 Terminal device and method for controlling terminal device
US20150026229A1 (en) * 2013-07-17 2015-01-22 Samsung Electronics Co., Ltd. Method in an electronic device for controlling functions in another electronic device and electronic device thereof
US20150334488A1 (en) * 2014-05-14 2015-11-19 Samsung Electronics Co., Ltd. Method and apparatus for communicating audio data
US20160041859A1 (en) * 2014-08-11 2016-02-11 Sas Institute Inc. Synchronization testing of active clustered servers
CN105429883A (en) * 2015-10-22 2016-03-23 上海斐讯数据通信技术有限公司 Long connection method of multiple intelligent devices and server equipment and intelligent device
CN107071189A (en) * 2016-11-28 2017-08-18 深圳市潮流网络技术有限公司 A kind of connection method of communication apparatus physical interface
US20170336769A1 (en) * 2016-05-17 2017-11-23 Ryoh ARUGA Electric apparatus, electric apparatus controlling method, and recording medium
CN108037675A (en) * 2018-02-01 2018-05-15 苏州创爵智能科技有限公司 A kind of Intelligent household scene control method based on ZigBee Group
CN109462794A (en) * 2018-12-11 2019-03-12 Oppo广东移动通信有限公司 Intelligent sound box and voice interactive method for intelligent sound box
US10341792B1 (en) * 2016-11-21 2019-07-02 Amazon Technologies, Inc. System for distributing audio output using multiple devices
CN110687809A (en) * 2019-10-17 2020-01-14 珠海格力电器股份有限公司 Method and device for selecting master control equipment and equipment linkage system
CN110708222A (en) * 2019-10-14 2020-01-17 珠海格力电器股份有限公司 Control method, control device, gateway and storage medium
CN110831246A (en) * 2019-11-11 2020-02-21 展讯通信(上海)有限公司 Data transmission method and device
CN111885151A (en) * 2020-07-21 2020-11-03 深圳市讯方技术股份有限公司 Intelligent equipment communication method based on zigbee protocol and main intelligent equipment
CN111913397A (en) * 2020-07-10 2020-11-10 青岛易来智能科技股份有限公司 Device control method, device, storage medium, and electronic apparatus
US20200367279A1 (en) * 2018-03-06 2020-11-19 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Response message processing method, apparatus, and storage medium
US20210006903A1 (en) * 2019-07-02 2021-01-07 Beijing Xiaoniao Tingting Technology Co., LTD. Playing control method and apparatus for device group, and playing system
CN112235370A (en) * 2020-09-29 2021-01-15 卧安科技(深圳)有限公司 Equipment information synchronization method, synchronization device, main equipment and storage medium
CN113241068A (en) * 2021-03-26 2021-08-10 青岛海尔科技有限公司 Voice signal response method and device, storage medium and electronic device
WO2021179174A1 (en) * 2020-03-10 2021-09-16 Oppo广东移动通信有限公司 Data transmission method and apparatus, and network device, and terminal device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110972103B (en) * 2018-09-28 2021-06-15 华为技术有限公司 Communication method and device
CN110769033A (en) * 2019-09-18 2020-02-07 珠海格力电器股份有限公司 Intelligent networking method and system
CN111930020B (en) * 2020-08-10 2024-04-05 广东沐光智能照明有限公司 Equipment control system, method, device, terminal and readable storage medium
CN113810860B (en) * 2021-09-24 2023-05-02 生迪智慧科技有限公司 Wireless control method and device for intelligent lighting system
CN114422559A (en) * 2021-12-31 2022-04-29 深圳海翼智新科技有限公司 Device control method and device, electronic device and storage medium

Patent Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181270A1 (en) * 2003-07-28 2014-06-26 Sonos, Inc. System and Method for Synchronizing Operations Among a Plurality of Independently Clocked Digital Data Processing Devices
US20080089268A1 (en) * 2006-10-17 2008-04-17 Kinder Richard D Media distribution in a wireless network
CN101426286A (en) * 2007-11-02 2009-05-06 瑞乐普(北京)科技有限公司 Method and device for supporting user's multimedia information browse in wireless network
US20130246527A1 (en) * 2012-03-16 2013-09-19 Research In Motion Limited System and Method for Managing Data Using Tree Structures
CA2873103A1 (en) * 2012-03-16 2013-09-19 Blackberry Limited System and method for managing data using tree structures
US20150026229A1 (en) * 2013-07-17 2015-01-22 Samsung Electronics Co., Ltd. Method in an electronic device for controlling functions in another electronic device and electronic device thereof
CN103595768A (en) * 2013-10-28 2014-02-19 国家电网公司 Method for realizing configuration synchronization between virtualized devices
CN103955195A (en) * 2014-05-05 2014-07-30 中国安全生产科学研究院 Sending and responding method and device of control instruction
US20150334488A1 (en) * 2014-05-14 2015-11-19 Samsung Electronics Co., Ltd. Method and apparatus for communicating audio data
US20160041859A1 (en) * 2014-08-11 2016-02-11 Sas Institute Inc. Synchronization testing of active clustered servers
CN104267811A (en) * 2014-09-22 2015-01-07 联想(北京)有限公司 Terminal device and method for controlling terminal device
CN105429883A (en) * 2015-10-22 2016-03-23 上海斐讯数据通信技术有限公司 Long connection method of multiple intelligent devices and server equipment and intelligent device
US20170336769A1 (en) * 2016-05-17 2017-11-23 Ryoh ARUGA Electric apparatus, electric apparatus controlling method, and recording medium
US10341792B1 (en) * 2016-11-21 2019-07-02 Amazon Technologies, Inc. System for distributing audio output using multiple devices
CN107071189A (en) * 2016-11-28 2017-08-18 深圳市潮流网络技术有限公司 A kind of connection method of communication apparatus physical interface
CN108037675A (en) * 2018-02-01 2018-05-15 苏州创爵智能科技有限公司 A kind of Intelligent household scene control method based on ZigBee Group
US20200367279A1 (en) * 2018-03-06 2020-11-19 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Response message processing method, apparatus, and storage medium
CN109462794A (en) * 2018-12-11 2019-03-12 Oppo广东移动通信有限公司 Intelligent sound box and voice interactive method for intelligent sound box
US20210006903A1 (en) * 2019-07-02 2021-01-07 Beijing Xiaoniao Tingting Technology Co., LTD. Playing control method and apparatus for device group, and playing system
CN110708222A (en) * 2019-10-14 2020-01-17 珠海格力电器股份有限公司 Control method, control device, gateway and storage medium
CN110687809A (en) * 2019-10-17 2020-01-14 珠海格力电器股份有限公司 Method and device for selecting master control equipment and equipment linkage system
CN110831246A (en) * 2019-11-11 2020-02-21 展讯通信(上海)有限公司 Data transmission method and device
WO2021179174A1 (en) * 2020-03-10 2021-09-16 Oppo广东移动通信有限公司 Data transmission method and apparatus, and network device, and terminal device
CN111913397A (en) * 2020-07-10 2020-11-10 青岛易来智能科技股份有限公司 Device control method, device, storage medium, and electronic apparatus
CN111885151A (en) * 2020-07-21 2020-11-03 深圳市讯方技术股份有限公司 Intelligent equipment communication method based on zigbee protocol and main intelligent equipment
CN112235370A (en) * 2020-09-29 2021-01-15 卧安科技(深圳)有限公司 Equipment information synchronization method, synchronization device, main equipment and storage medium
CN113241068A (en) * 2021-03-26 2021-08-10 青岛海尔科技有限公司 Voice signal response method and device, storage medium and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐迪宇;杨立志;: "环形工业以太网交换机的实时性设计", 工业控制计算机, no. 05 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023124136A1 (en) * 2021-12-31 2023-07-06 深圳海翼智新科技有限公司 Device control method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
WO2023124136A1 (en) 2023-07-06

Similar Documents

Publication Publication Date Title
CN108074177B (en) Data reconciliation method, system and computer-readable storage medium
CN110673941B (en) Migration method of micro-services in multiple computer rooms, electronic equipment and storage medium
CN110515871B (en) Interrupt method, interrupt device, FPGA (field programmable Gate array) and storage medium
CN107506309B (en) Terminal, flash memory data writing method and computer readable storage medium
KR102274178B1 (en) Emulating test distributed application on server
CN106020905B (en) Method and system for developing and updating microcontroller firmware
CN114422559A (en) Device control method and device, electronic device and storage medium
CN109618315A (en) A kind of control method of lighting apparatus, device, storage medium and intelligent terminal
EP4130896A1 (en) Display scene switching method, intelligent display screen and readable storage medium
JP7391004B2 (en) Road network data update method, device, electronic device and storage medium
CN104965730A (en) Version upgrading method and system
EP3260987A1 (en) Data reading method, equipment and system
CN113259476B (en) Message pushing method and system
JP2012208680A (en) Parallel processing system and method of operating parallel processing system
CN113454586A (en) Method and device for generating shadow device and storage medium
CN105373005A (en) Universal control method, apparatus and system of Internet of things
CN105100136A (en) Method for accessing logic storage in storage cluster and device thereof
CN114047689B (en) Lighting equipment control method and device, lighting equipment and storage medium
US11063870B2 (en) Selective route download traffic sampling
CN114967485A (en) Device control method, device, electronic device and storage medium
CN111090362B (en) Scene processing method and device and electronic equipment
US11188468B2 (en) Processor and way prediction method thereof
CN110780905B (en) BMC software updating method and device based on USB interface
CN114513492A (en) Method and device for configuring IP address
CN114756271B (en) Interface updating 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