CN107995690B - Master-slave working mode control method and device - Google Patents
Master-slave working mode control method and device Download PDFInfo
- Publication number
- CN107995690B CN107995690B CN201711025090.XA CN201711025090A CN107995690B CN 107995690 B CN107995690 B CN 107995690B CN 201711025090 A CN201711025090 A CN 201711025090A CN 107995690 B CN107995690 B CN 107995690B
- Authority
- CN
- China
- Prior art keywords
- input
- mode
- input equipment
- mesh network
- input device
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
- H04W84/20—Master-slave selection or change arrangements
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/175—Controlling the light source by remote control
- H05B47/19—Controlling the light source by remote control via wireless transmission
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Circuit Arrangement For Electric Light Sources In General (AREA)
- Selective Calling Equipment (AREA)
Abstract
The invention provides a master-slave working mode control method and a device, wherein the method is applied to a wireless Mesh network comprising at least two input devices and a plurality of Mesh lighting nodes, and the method comprises the following steps: the method comprises the steps that input equipment in a wireless Mesh network receives communication packets which are sent by other input equipment in the same wireless Mesh network and carry identification information, and the communication packets which carry identification information of the input equipment are sent to other input equipment; and analyzing the received communication packet to acquire identification information of other input equipment, and controlling the input equipment to work in a master mode or a slave mode based on the identification information of the input equipment and the identification information of the other input equipment. Based on the method provided by the invention, a plurality of input devices can automatically negotiate to determine the working mode of each input device, and then the input devices working in the main mode control the illumination state of the Mesh illumination node, and when a control event occurs, ambiguity cannot be generated.
Description
Technical Field
The invention relates to the technical field of intelligent control, in particular to a master-slave working mode control method and a master-slave working mode control device.
Background
With the rapid development of the internet of things and cloud computing technology, digitization, networking and informatization are increasingly integrated into the lives of people. People put forward higher requirements on the quality of life on the basis of continuously improving the living standard and living conditions, and at the moment, the intelligent products are accompanied by the intelligent cloud and appear like spring shoots after rain.
At present, an intelligent working system is often applied to management and control of a plurality of devices, such as an intelligent home system, an intelligent lamp control system and the like. In practical applications, a same working system will usually have multiple application scenarios to meet different application requirements, and each application scenario requires multiple input device controls to cooperatively process information. However, for a work system lacking a work center, an information ambiguity may arise when the intelligent work system is working.
Disclosure of Invention
The present invention provides a master-slave mode control method and apparatus to overcome the above problems or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a master-slave operation mode control method applied to a wireless Mesh network including at least two input devices and a plurality of Mesh lighting nodes, the method including:
the method comprises the steps that input equipment in a wireless Mesh network receives communication packets which are sent by other input equipment in the same wireless Mesh network and carry identification information, and the communication packets which carry identification information of the input equipment are sent to other input equipment;
analyzing the received communication packet to acquire identification information of other input equipment, and controlling the input equipment to work in a master mode or a slave mode based on the identification information of the input equipment and the identification information of the other input equipment; the input device confirmed to be the master mode controls the lighting states of the Mesh lighting nodes, and the input device confirmed to be the slave mode transmits the input information to the input device working in the master mode for unified processing.
Optionally, the analyzing the received communication packet to obtain the identification information of the other input device, and controlling the working mode of the input device based on the identification information of the working device itself and the identification information of the other input device includes:
analyzing the received communication packet to obtain machine codes of other input equipment in the wireless Mesh network;
acquiring a machine code of the input device;
and controlling the working mode of the input equipment through an arbitration algorithm based on the machine code of each input equipment in the wireless Mesh network.
Optionally, the controlling, by an arbitration algorithm, an operating mode of each input device based on a machine code of the input device in the wireless Mesh network includes:
performing hash calculation by using machine codes of all input devices in the wireless Mesh network to obtain hash values of all input devices in the wireless Mesh network, and sequentially arranging the hash values of all input devices to generate a hash value sequence;
judging whether the hash value of the input device is the maximum value in the hash value sequence;
if yes, controlling the input equipment to work in a main mode;
and after the working modes of all the input devices in the wireless Mesh network are determined, only one input device works in the master mode.
Optionally, the controlling the input device to operate after the main mode further includes:
collecting input information of input equipment working in a slave mode, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic;
wherein the lighting state of the Mesh lighting node comprises: brightness, color temperature and/or color of the Mesh lighting node.
Optionally, after the determining whether the hash value of the input device itself is the maximum value in the hash value sequence, the method further includes:
if not, controlling the input equipment to work in a slave mode;
and transmitting the input information of the input equipment to the input equipment working in the master mode in the wireless Mesh network, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic after the input information is collected by the input equipment working in the master mode.
According to another aspect of the present invention, there is also provided a master-slave working mode control apparatus, comprising:
the communication module is configured to receive the communication packets carrying the identification information sent by other input devices in the same wireless Mesh network by the input devices in the wireless Mesh network, and send the communication packets carrying the identification information of the communication module to other input devices;
the mode control module is configured to analyze the received communication packet to acquire identification information of other input equipment, and control the working mode of the input equipment based on the identification information of the input equipment and the identification information of the other input equipment; the working modes comprise a master mode and a slave mode; the input device confirmed to be the master mode controls the lighting states of the Mesh lighting nodes, and the input device confirmed to be the slave mode transmits the input information to the input device working in the master mode for unified processing.
Optionally, the mode control module comprises:
the analysis unit is configured to analyze the received communication packet and acquire machine codes of other input devices in the wireless Mesh network;
an acquisition unit configured to acquire a machine code of the input device itself;
and the control unit is configured to control the working mode of each input device in the wireless Mesh network through an arbitration algorithm based on the machine code of the input device.
Optionally, the control unit is further configured to:
performing hash calculation by using machine codes of all input devices in the wireless Mesh network to obtain hash values of all input devices in the wireless Mesh network, and sequentially arranging the hash values of all input devices to generate a hash value sequence;
judging whether the hash value of the input device is the maximum value in the hash value sequence;
if yes, controlling the input equipment to work in a main mode;
and after the working modes of all the input devices in the wireless Mesh network are determined, only one input device works in the master mode.
Optionally, the control unit is further configured to:
collecting input information of input equipment working in a slave mode, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic;
wherein the lighting state of the Mesh lighting node comprises: brightness, color temperature and/or color of the Mesh lighting node.
Optionally, the control unit is further configured to:
when the hash value of the input device is not the maximum value in the hash value sequence, controlling the input device to work in a slave mode;
and transmitting the input information of the input equipment to the input equipment working in the master mode in the wireless Mesh network, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic after the input information is collected by the input equipment working in the master mode.
According to still another aspect of the present invention, there is also provided a wireless Mesh network, including a plurality of input devices provided with any one of the master-slave mode control apparatuses described above, and a plurality of Mesh lighting nodes.
The invention provides a master-slave working mode control method and a master-slave working mode control device applied to a wireless Mesh network comprising at least two input devices and a plurality of Mesh lighting nodes. Furthermore, the master-slave working mode control method provided by the invention can be realized based on ad hoc network without adding a gateway or other third-party network equipment. The master-slave working mode control device provided by the invention has a simple structure and is easy to realize.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart of a master-slave operation mode control method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a wireless Mesh network according to a preferred embodiment of the present invention;
FIG. 3 is a flow chart illustrating a master-slave mode of operation control method according to a preferred embodiment of the present invention;
fig. 4 is a schematic diagram of a wireless Mesh network according to another preferred embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a master-slave operation mode control device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a master-slave operation mode control device according to a preferred embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a schematic flow chart of a master-slave working mode control method according to an embodiment of the present invention, and as shown in fig. 1, the master-slave working mode control method according to the embodiment of the present invention includes:
step S102, an input device in the wireless Mesh network receives communication packets carrying identification information sent by other input devices in the same wireless Mesh network, and sends the communication packets carrying identification information of the input device to other input devices;
step S104, analyzing the received communication packet to obtain identification information of other input equipment, and controlling the input equipment to work in a master mode or a slave mode based on the identification information of the input equipment and the identification information of the other input equipment; the input device confirmed as the master mode controls the lighting states of the Mesh lighting nodes in the wireless Mesh network, and the input device confirmed as the slave mode transmits the input information to the input device working in the master mode for unified processing.
Based on the master-slave working mode control method provided by the embodiment of the invention, the working mode of each input device can be determined through automatic negotiation in a wireless Mesh network comprising at least two input devices and a plurality of Mesh lighting nodes, and then the master input device and the slave input device are determined in the whole wireless Mesh network. The input device confirmed as the master mode controls the lighting states of the Mesh lighting nodes in the wireless Mesh network, and the input device confirmed as the slave mode transmits the input information to the input device working in the master mode for unified processing. The slave input equipment sends various input information detected by the slave input equipment to the master input equipment, and the master input equipment performs overall processing so as to control the working state of each lighting Mesh node in order without ambiguity. Further, the master-slave working mode control method provided by this embodiment can be implemented based on ad hoc network without adding a gateway or other third-party network devices.
The input device in the wireless Mesh network may be preferably a sensor, and the Mesh lighting node may be preferably a bluetooth Mesh lighting node, and certainly, in practical applications, the input device may also select other devices, and the Mesh lighting node may also be other Mesh nodes having a wireless connection function, which is not limited in the present invention.
In the embodiment of the invention, a plurality of input devices in the same wireless Mesh network can communicate with each other, and when any input device receives a communication packet carrying identification information and sent by other input devices, the communication packet carrying the identification information of the input device can also be sent to other input devices.
Optionally, in the above embodiment, the identification information of the input device in the wireless Mesh network may be machine code, internet address, or other identification information that can uniquely identify the input device. When the identification information of the input device is a machine code, the step S104 may include: analyzing the received communication packet to obtain machine codes of other input equipment in the wireless Mesh network; acquiring a machine code of the input device; and controlling the working mode of each input device through an arbitration algorithm based on the machine code of each input device in the wireless Mesh network.
The machine code is a series of sequences formed by a series of encryption and hashing of hardware serial numbers. In the above embodiment, each input device in the wireless Mesh network carries a unique machine code, so that other devices recognize information of each input device according to different machine codes. And the corresponding input equipment can be more accurately determined based on the unique machine code of each input equipment, so that the master equipment and the slave equipment in the wireless Mesh network can be effectively distinguished and determined.
Further, when the operating mode of one input device in the wireless Mesh system is controlled through the arbitration algorithm, the machine codes of all the input devices in the wireless Mesh network can be used for carrying out hash calculation, and the hash value of all the input devices in the wireless Mesh network is obtained through the hash algorithm. Since the machine code of the input device is unique, the hash value calculated based on the machine code is also unique. And sorting the hash values of the input devices obtained by calculation, then sequentially arranging the hash values to generate a hash value sequence, comparing other hash values in the hash value sequence of each input device, and judging the working mode of the input device according to the comparison result.
A hash algorithm is an algorithm that generates a hash value of some piece of data (e.g., a message or a session item). A good hashing algorithm has the property of altering the hash value result in accordance with variations in the input data. Thus, hashing works well to detect any changes in a large information object, such as a message. A good hashing algorithm makes it computationally infeasible to construct two independent inputs with identical hashes. Typical hashing algorithms include MD2, MD4, MD5, and SHA-1. And the hashing algorithm may also be referred to as a hashing function.
Calculating the hash value of the input device and the hash values of other input devices, and comparing the calculated hash values, wherein when the input device is the input device with the largest hash value in the wireless Mesh network, the input device can be controlled to work in a master mode, namely, the input device is used as the master input device in the wireless Mesh network; and when the input device is not the input device with the largest hash value in the wireless Mesh network, controlling the input device to work in a slave mode, namely, as the slave input device in the wireless Mesh network. After the working modes of all the input devices in the wireless Mesh network are determined, only one input device works in a master mode, and other input devices all work in slave modes. That is to say, after the operating mode of the input device is determined, the whole wireless Mesh network only has one main input device, so that when a control event occurs subsequently, the main input device and the slave device perform information synchronization, and ambiguity cannot occur.
After the operation mode of the input device is determined, if the input device operates in the master mode, the input device may be used as a master input device to control the lighting states of the multiple Mesh lighting nodes in the wireless Mesh system, such as the brightness, the color temperature, the color and the power-on state of the Mesh lighting nodes. Optionally, the master input device in the wireless Mesh system may collect input information of the slave input device, and control the lighting state of each Mesh lighting node in the wireless Mesh network according to a preset application logic. The input information from the input device may be user information detected by a sensor, environmental data information, and the like. The preset application logic may be a preset lighting instruction executed based on a triggering action of a user, for example, after someone triggers the infrared sensor, the lighting lamp needs to be turned on; the present invention may also be a preset combined lighting control for different application scenes, such as controlling the combined brightness of one or more Mesh lighting nodes, combining color matching, and the like, which is not limited in the present invention.
And if the input device works in the slave mode, the input device serves as the slave input device to transmit the input information of the input device to the input device working in the master mode, and the preset application logic controls the illumination state of each Mesh illumination node after the input information is collected by the input device working in the master mode.
In the embodiment of the invention, the master-slave input equipment in the wireless Mesh network does not need to be fixed, has strong adjustability, can be replaced by other modules or components, and has higher practicability. It should be noted that, in the foregoing embodiment, the communication between the input nodes may be a bluetooth chip with a wireless communication function, zigbee, or the like, and the specific logic operation may be processed by a logic device with a calculation function or other integrated chips with corresponding functions, which is not limited in the present invention.
The above embodiment is explained below by way of a preferred embodiment.
Fig. 2 shows a schematic diagram of a wireless Mesh network according to a preferred embodiment of the present invention. As shown in fig. 2, the wireless Mesh network has two sensors as an input device a and an input device B for inputting information, and seven lighting apparatuses as Mesh lighting nodes adjust lighting states according to input data of the input device a and the input device B, wherein each Mesh lighting node may further have a control module to respond to the input device controlling the states of the lighting nodes. As shown in fig. 3, the master-slave operation mode control method according to the preferred embodiment of the present invention includes:
1. after an input device in the wireless Mesh network is powered on, the input device A and the input device B mutually send and receive communication packets of the other side for negotiation, wherein the communication packets sent by the input device A and the input device B respectively carry machine codes of the input device A and the input device B as unique identification information;
2. the negotiation is only needed once, the communication back and forth is not needed, each input device can analyze the information in the packet after receiving the communication packets of other input devices, and then the input device arbitrates whether the input device needs to work in a slave mode or not through an algorithm;
3. when the negotiation is completed, only one input device in the network works in the master mode, and the other input devices work in the slave mode; the input device working in the slave mode needs to transmit the state to the input device working in the master mode, so that the subsequent master-slave synchronization is facilitated;
4. and judging the working mode of the input equipment, and if the input equipment works in the master mode, uniformly informing the collected transmission messages of the slave equipment to other Mesh nodes in the network by the input equipment working in the master mode according to preset application logic so as to realize the control of the illumination state of the Mesh nodes.
For example, a large conference room is divided into two small areas for use according to requirements, the two areas are respectively provided with a Bluetooth module with an infrared presence sensor and a plurality of Bluetooth illuminating lamps, people in any area are required to enter, only the illuminating lamp in the area is lighted, and the illuminating lamp is allowed to be turned off when the people cannot be detected in the two small areas. The input equipment is set as an infrared sensor, after the master-slave mode of each equipment is determined, the slave equipment informs the master equipment of the event when sensing that the area controlled by the slave equipment is unmanned, the master equipment performs overall logic processing on transmission messages of all other slave equipment, and then sends control commands to lamps in all areas to perform control actions. The method provided based on the preferred embodiment can realize effective control of the Mesh lighting node on the premise of not influencing the performance of the whole network so as to meet the lighting requirements of users under different conditions.
In addition, another preferred embodiment of the present invention further provides a wireless Mesh network, as shown in fig. 4, the wireless Mesh network includes an input device A, B, C, D in which four sensors are used as information inputs, and eight lighting apparatuses are used as Mesh lighting nodes to adjust lighting states according to input data of the input device A, B, C, D.
When the wireless Mesh network starts to work, input equipment A, B, C, D negotiates with each other, and then the master equipment and the slave equipment are determined. Taking the input device a as an example, the master-slave working mode control flow of the input device a may be as follows:
1. for the input device a, not only the communication packet carrying the identification information of the input device a is sent, but also the communication packet sent by the input device B, C, D is received;
2. after receiving the communication packet of the input device B, C, D, the input device a analyzes the communication packet respectively to obtain identification information, such as a machine code, of the input device B, C, D, and also obtains the machine code of the input device a;
3. respectively carrying out hash calculation according to the machine code of the input device A, B, C, D in the wireless Mesh network to obtain a hash value of the input device A, B, C, D;
4. after the calculated hash values of the input device A, B, C, D are sequentially sorted and a hash value sequence is generated, whether the hash value of the input device a is the largest in the hash value sequence is judged; and if the hash value of the input device A is maximum, controlling the input device A to work in a master mode, and if the hash value of the input device A is judged not to be maximum, controlling the input device A to work in a slave mode. Alternatively, the hash value sequence may be ordered from large to small, or from small to large.
The judgment process of the input equipment A is automatically executed when the wireless Mesh network starts to work for the input equipment B, C, D, so that the judgment of the working mode of each input equipment in the wireless Mesh network is realized. Based on the method provided by the above embodiment, only one negotiation is needed between the input devices A, B, C, D, and the respective working modes can be determined. The judgment of the working mode can be completed while the communication time is saved without repeated back-and-forth communication, and the main equipment in the wireless Mesh network can be judged quickly and effectively, so that the Mesh lighting node can be effectively controlled, and the user experience is improved.
Based on the same inventive concept, an embodiment of the present invention further provides a master-slave working mode control device, as shown in fig. 5, the master-slave working mode control device according to the embodiment of the present invention includes:
the communication module 10 is configured to be configured to receive, by an input device in the wireless Mesh network, a communication packet carrying identification information sent by each other input device in the same wireless Mesh network, and send the communication packet carrying identification information of the communication module to each other input device;
the mode control module 20 is configured to analyze the received communication packet to obtain identification information of other input devices, and control the operating mode of the input device based on the identification information of the input device and the identification information of the other input devices; the working modes comprise a master mode and a slave mode; the input device confirmed to be the master mode controls the lighting states of the Mesh lighting nodes, and the input device confirmed to be the slave mode transmits the input information to the input device working in the master mode for unified processing.
In a preferred embodiment of the present invention, as shown in fig. 6, the mode control module 20 may include:
the analysis unit 21 is configured to analyze the received communication packet and acquire machine codes of other input devices in the wireless Mesh network;
an acquisition unit 22 configured to acquire a machine code of the input apparatus itself;
and the control unit 23 is configured to control the working mode of each input device in the wireless Mesh network through an arbitration algorithm based on the machine code of the input device.
In a preferred embodiment of the present invention, the control unit 23 may be further configured to:
performing hash calculation by using machine codes of all input devices in the wireless Mesh network to obtain hash values of all input devices in the wireless Mesh network, and sequentially arranging the hash values of all input devices to generate a hash value sequence;
judging whether the hash value of the input device is the maximum value in the hash value sequence;
if yes, controlling the input equipment to work in a main mode;
and after the working modes of all the input devices in the wireless Mesh network are determined, only one input device works in the master mode.
In a preferred embodiment of the present invention, the control unit 23 may be further configured to:
collecting input information of input equipment working in a slave mode, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic;
wherein the illumination state of the Mesh illumination node comprises: brightness, color temperature and/or color of the Mesh lighting node.
In a preferred embodiment of the present invention, the control unit 23 may be further configured to:
when the hash value of the input device is not the maximum value in the hash value sequence, controlling the input device to work in a slave mode;
and transmitting the input information of the input equipment to the input equipment working in the master mode in the wireless Mesh network, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic after the input information is collected by the input equipment working in the master mode.
The preferred embodiment of the invention also provides a wireless Mesh network, which comprises a plurality of input devices provided with any one of the master-slave mode control devices and a plurality of Mesh lighting nodes.
Based on the master-slave working mode control method and device provided by the embodiment of the invention, the working mode of each input device can be determined through automatic negotiation in a wireless Mesh network comprising at least two input devices and a plurality of Mesh lighting nodes, so that the master input device and the slave input device are determined in the whole wireless Mesh network, the slave input device can send various detected information to the master input device, and the master input device carries out overall processing so as to control the working states of the lighting Mesh nodes in order without ambiguity. Further, the master-slave working mode control method provided by this embodiment can be implemented based on ad hoc network without adding a gateway or other third-party network devices. The master-slave working mode control device provided by the embodiment of the invention has a simple structure and is easy to realize.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the devices in an embodiment may be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the master-slave mode of operation control apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Thus, it should be appreciated by those skilled in the art that while various exemplary embodiments of the invention have been shown and described in detail herein, many other variations or modifications which are consistent with the principles of this invention may be determined or derived directly from the disclosure of the present invention without departing from the spirit and scope of the invention. Accordingly, the scope of the invention should be understood and interpreted to cover all such other variations or modifications.
Claims (11)
1. A master-slave working mode control method is applied to a wireless Mesh network comprising at least two input devices and a plurality of Mesh lighting nodes, and comprises the following steps:
the method comprises the steps that input equipment in the wireless Mesh network receives communication packets which are sent by other input equipment in the same wireless Mesh network and carry identification information, and the communication packets which carry identification information of the input equipment are sent to other input equipment;
analyzing the received communication packet to acquire identification information of other input equipment, and controlling the input equipment to work in a master mode or a slave mode based on the identification information of the input equipment and the identification information of the other input equipment; the input equipment confirmed to be the master mode controls the lighting states of the Mesh lighting nodes, and the input equipment confirmed to be the slave mode transmits the input information to the input equipment working in the master mode for unified processing;
wherein controlling the operating mode of the input device based on the identification information of the input device and the identification information of the other input devices comprises:
performing hash calculation by using the identification information of each input device in the wireless Mesh network to obtain the hash value of each input device in the wireless Mesh network, and sequentially arranging the hash values of each input device to generate a hash value sequence;
and controlling the working mode of the input equipment according to the comparison result of the hash value of the input equipment and other hash values in the hash value sequence.
2. The method of claim 1, wherein the identification information is a machine code of the corresponding input device in the Mesh network.
3. The method of claim 1, wherein controlling the operating mode of the input device based on the comparison of its own hash value to other hash values in the sequence of hash values comprises:
judging whether the hash value of the input device is the maximum value in the hash value sequence;
if yes, controlling the input equipment to work in a main mode;
and after the working modes of all the input devices in the wireless Mesh network are determined, only one input device works in the master mode.
4. The method of claim 3, wherein the controlling the input device to operate after the primary mode further comprises:
collecting input information of input equipment working in a slave mode, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic;
wherein the lighting state of the Mesh lighting node comprises: brightness, color temperature and/or color of the Mesh lighting node;
the preset application logic executes corresponding lighting instructions or preset combined lighting control aiming at different application scenes for preset trigger actions based on a user.
5. The method of claim 3, wherein the determining whether the hash value of the input device itself is the maximum value in the hash value sequence further comprises:
if not, controlling the input equipment to work in a slave mode;
and transmitting the input information of the input equipment to the input equipment working in the master mode in the wireless Mesh network, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic after the input information is collected by the input equipment working in the master mode.
6. A master-slave mode of operation control apparatus comprising:
the communication module is configured to receive the communication packets carrying the identification information sent by other input devices in the same wireless Mesh network by the input devices in the wireless Mesh network, and send the communication packets carrying the identification information of the communication module to other input devices;
the mode control module is configured to analyze the received communication packet to acquire identification information of other input equipment, and control the working mode of the input equipment based on the identification information of the input equipment and the identification information of the other input equipment; the working modes comprise a master mode and a slave mode; the input equipment confirmed to be the master mode controls the illumination state of the Mesh illumination node, and the input equipment confirmed to be the slave mode transmits the input information to the input equipment working in the master mode for unified processing;
wherein the mode control module comprises a control unit configured to:
and carrying out hash calculation by using the machine codes of all input devices in the wireless Mesh network to obtain hash values of all input devices in the wireless Mesh network, sequentially arranging the hash values of all input devices to generate a hash value sequence, and controlling the working mode of the input devices according to whether the hash values of the input devices are the maximum values in the hash value sequence.
7. The apparatus of claim 6, wherein,
the identification information is a machine code of the corresponding input equipment in the Mesh network.
8. The apparatus of claim 7, wherein the control unit is further configured to:
judging whether the hash value of the input device is the maximum value in the hash value sequence;
if yes, controlling the input equipment to work in a main mode;
and after the working modes of all the input devices in the wireless Mesh network are determined, only one input device works in the master mode.
9. The apparatus of claim 8, wherein the control unit is further configured to:
collecting input information of input equipment working in a slave mode, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic;
wherein the lighting state of the Mesh lighting node comprises: brightness, color temperature and/or color of the Mesh lighting node;
the preset application logic executes corresponding lighting instructions or preset combined lighting control aiming at different application scenes for preset trigger actions based on a user.
10. The apparatus of claim 8, wherein the control unit is further configured to:
when the hash value of the input device is not the maximum value in the hash value sequence, controlling the input device to work in a slave mode;
and transmitting the input information of the input equipment to the input equipment working in the master mode in the wireless Mesh network, and controlling the illumination state of each Mesh illumination node in the wireless Mesh network according to preset application logic after the input information is collected by the input equipment working in the master mode.
11. A wireless Mesh network comprising a plurality of input devices provided with a master-slave mode of operation control apparatus as claimed in any one of claims 6 to 10 and a plurality of Mesh lighting nodes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711025090.XA CN107995690B (en) | 2017-10-27 | 2017-10-27 | Master-slave working mode control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711025090.XA CN107995690B (en) | 2017-10-27 | 2017-10-27 | Master-slave working mode control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107995690A CN107995690A (en) | 2018-05-04 |
CN107995690B true CN107995690B (en) | 2023-04-18 |
Family
ID=62030049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711025090.XA Active CN107995690B (en) | 2017-10-27 | 2017-10-27 | Master-slave working mode control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107995690B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112333058B (en) * | 2020-09-15 | 2023-06-30 | 深圳Tcl新技术有限公司 | Device monitoring method, device, system and computer readable storage medium |
CN113791693A (en) * | 2021-09-29 | 2021-12-14 | 江西麦特微电子有限公司 | Multi-cooperation Bluetooth input system |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008097316A1 (en) * | 2007-02-05 | 2008-08-14 | Medtronic Minimed, Inc. | Wireless data communication protocols and techniques for a wireless medical device network |
CN102547871A (en) * | 2012-02-07 | 2012-07-04 | 华为技术有限公司 | Method and device for consulting resource in D2D (Device To Device) communication |
CN103716281A (en) * | 2012-09-28 | 2014-04-09 | 联想(北京)有限公司 | Control method, electronic device and server |
CN105191505A (en) * | 2013-03-18 | 2015-12-23 | 皇家飞利浦有限公司 | Methods and apparatus for information management and control of outdoor lighting networks |
WO2016038032A1 (en) * | 2014-09-12 | 2016-03-17 | Gemalto Sa | Method for allocating an operating mode to a communication device |
CN105451290A (en) * | 2014-08-20 | 2016-03-30 | 北京南瑞智芯微电子科技有限公司 | Micropower wireless network self-organizing method and micropower wireless network |
CN106793409A (en) * | 2016-12-30 | 2017-05-31 | 欧普照明股份有限公司 | Lighting device, terminal device and illuminator |
CN107072008A (en) * | 2017-04-28 | 2017-08-18 | 欧普照明股份有限公司 | Intelligent illuminating system based on wireless control technology |
WO2017155144A1 (en) * | 2016-03-10 | 2017-09-14 | 주식회사 삼진엘앤디 | Wireless mesh network-based lighting device control method using mobile communication terminal, and computer readable recording medium storing program for implementing same |
CN107197424A (en) * | 2017-06-06 | 2017-09-22 | 欧普照明股份有限公司 | Bluetooth connecting method, bluetooth equipment and bluetooth connection system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080170511A1 (en) * | 2006-01-31 | 2008-07-17 | Peter Shorty | Home electrical device control within a wireless mesh network |
-
2017
- 2017-10-27 CN CN201711025090.XA patent/CN107995690B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008097316A1 (en) * | 2007-02-05 | 2008-08-14 | Medtronic Minimed, Inc. | Wireless data communication protocols and techniques for a wireless medical device network |
CN102547871A (en) * | 2012-02-07 | 2012-07-04 | 华为技术有限公司 | Method and device for consulting resource in D2D (Device To Device) communication |
CN103716281A (en) * | 2012-09-28 | 2014-04-09 | 联想(北京)有限公司 | Control method, electronic device and server |
CN105191505A (en) * | 2013-03-18 | 2015-12-23 | 皇家飞利浦有限公司 | Methods and apparatus for information management and control of outdoor lighting networks |
CN105451290A (en) * | 2014-08-20 | 2016-03-30 | 北京南瑞智芯微电子科技有限公司 | Micropower wireless network self-organizing method and micropower wireless network |
WO2016038032A1 (en) * | 2014-09-12 | 2016-03-17 | Gemalto Sa | Method for allocating an operating mode to a communication device |
WO2017155144A1 (en) * | 2016-03-10 | 2017-09-14 | 주식회사 삼진엘앤디 | Wireless mesh network-based lighting device control method using mobile communication terminal, and computer readable recording medium storing program for implementing same |
CN106793409A (en) * | 2016-12-30 | 2017-05-31 | 欧普照明股份有限公司 | Lighting device, terminal device and illuminator |
CN107072008A (en) * | 2017-04-28 | 2017-08-18 | 欧普照明股份有限公司 | Intelligent illuminating system based on wireless control technology |
CN107197424A (en) * | 2017-06-06 | 2017-09-22 | 欧普照明股份有限公司 | Bluetooth connecting method, bluetooth equipment and bluetooth connection system |
Non-Patent Citations (2)
Title |
---|
杨国政.基于无线通信的智能照明控制系统设计.《电工文摘》.2017,2017年(第02期),全文. * |
黄祖成.基于6LoWPAN的无线传感网在智慧路灯中的应用.《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》.2016,全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN107995690A (en) | 2018-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11782590B2 (en) | Scene-operation method, electronic device, and non-transitory computer readable medium | |
US9887854B2 (en) | Method and apparatus for dynamically changing group control mode by using user intervention information | |
CN107370644B (en) | Linkage control method and device, computer readable storage medium and computer equipment | |
WO2020223854A1 (en) | Device network configuration method and apparatus, electronic device and storage medium | |
CN105306318B (en) | intelligent scene configuration method, device and server | |
EP4044040B1 (en) | Peripheral device pairing | |
CN105629947B (en) | Home equipment monitoring method, home equipment monitoring device and terminal | |
CN109753034B (en) | Control method, control device, electronic equipment and storage medium | |
CN107995690B (en) | Master-slave working mode control method and device | |
EP3075206B1 (en) | Zigbee light link network commissioning | |
WO2019033476A1 (en) | Device grouping-based data transmission control method and related product | |
CN110278135B (en) | Equipment position searching method, device, gateway and storage medium | |
CN105744593A (en) | Node networking method and device | |
CN112908321A (en) | Device control method, device, storage medium, and electronic apparatus | |
WO2015180241A1 (en) | Service data processing method and apparatus, terminal device and computer storage medium | |
CN112486105A (en) | Equipment control method and device | |
US8990428B2 (en) | System and method for facilitating communication between different protocol stacks via virtual communication devices | |
CN105279873A (en) | Prompt method and device | |
CN114302536A (en) | Lighting scene generation method and device, intelligent equipment, server and storage medium | |
CN115524985A (en) | Method, device and system for controlling intelligent household system and storage medium | |
WO2024051708A1 (en) | Control method, system and apparatus, electronic device, storage medium, and program product | |
JP2019220893A (en) | Illumination control system | |
WO2017093559A1 (en) | Intelligent lighting and sensing system and method thereof | |
CN105590085A (en) | Information processing method, apparatus and system, and electronic device | |
EP4158921A1 (en) | Executing control command in dependence on presence being detected |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |