CN111274319A - State information query method and device - Google Patents

State information query method and device Download PDF

Info

Publication number
CN111274319A
CN111274319A CN202010054573.8A CN202010054573A CN111274319A CN 111274319 A CN111274319 A CN 111274319A CN 202010054573 A CN202010054573 A CN 202010054573A CN 111274319 A CN111274319 A CN 111274319A
Authority
CN
China
Prior art keywords
state
state information
equipment
smart home
intelligent
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
CN202010054573.8A
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202010054573.8A priority Critical patent/CN111274319A/en
Publication of CN111274319A publication Critical patent/CN111274319A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to a method and a device for inquiring state information, relating to the field of intelligent home furnishing, wherein the method is applied to a first intelligent home furnishing in a wireless mesh network, and comprises the following steps: receiving first state synchronization messages sent by other intelligent homes in the wireless mesh network, wherein the first state synchronization messages comprise state information of the other intelligent homes; updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, wherein the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network; and when a state query request sent by the upper computer is received, sending the stored equipment state table to the upper computer. By adopting the method and the device, the network delay and the required network bandwidth during the query of the upper computer can be reduced.

Description

State information query method and device
Technical Field
The application relates to the field of smart homes, in particular to a method and a device for inquiring state information.
Background
With the development of internet technology, smart homes are more and more in variety and more widely applied. The intelligent home and the management equipment (which can be called as an upper computer) communicate in a point-to-point mode. That is, the host computer can communicate with every intelligent house respectively.
In order to manage each smart home, people generally need to acquire the device state information of each smart home through an upper computer, so as to obtain the states of all smart homes. At this time, the upper computer needs to send a status query request to each smart home, and each smart home replies its own status information after receiving the status query request. In order to ensure the real-time performance of the acquired state information, the upper computer needs to frequently send a state query request. Therefore, in a local area network, if there are more smart homes, the number of times of interaction between the upper computer and the smart homes is very large, and network congestion is caused.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for querying status information, so as to solve a problem of network congestion caused by a large number of interactions between an upper computer and an intelligent home.
The specific technical scheme is as follows:
in a first aspect, a method for querying status information is provided, where the method is applied to a first smart home in a wireless mesh network, and the method includes:
receiving first state synchronization messages sent by other intelligent homes in the wireless mesh network, wherein the first state synchronization messages comprise state information of the other intelligent homes;
updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, wherein the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network;
and when a state query request sent by the upper computer is received, sending the stored equipment state table to the upper computer.
Optionally, after receiving the first status synchronization message sent by other smart homes in the wireless mesh network, the method further includes:
inquiring whether a first linkage control instruction corresponding to the state information in the first state synchronization message exists in a corresponding relation between the pre-stored state information and the linkage control instruction;
and if so, executing the first linkage control instruction.
Optionally, the method further includes:
when the equipment is on line, acquiring the state information of the equipment, and sending a second state synchronization message to other intelligent homes in the wireless mesh network, wherein the second state synchronization message contains the state information of the equipment, so that the other intelligent homes update own equipment state tables.
Optionally, the method further includes:
after the device is online, if the device state of the device is detected to change, a third state synchronization message is sent to other intelligent homes in the wireless mesh network, wherein the third state synchronization message contains the state information of the device, so that the other intelligent homes update the device state tables of the other intelligent homes.
Optionally, the method further includes:
detecting the signal intensity of other intelligent homes, and determining a second intelligent home with the maximum signal intensity;
sending a first comparison request containing the equipment state table to the second smart home, so that the second smart home determines whether the equipment state table of the first smart home contains state information to be updated according to the equipment state table stored by the second smart home, and if the equipment state table of the first smart home contains the state information to be updated, sending an update message to the first smart home, wherein the update message contains content information corresponding to the state information to be updated in the second smart home;
and receiving an update message sent by the second smart home, and updating the state information to be updated according to the content information in the update message.
Optionally, the state information includes a device state and a state log, where the state log at least includes a change time when the device state changes, a device identifier, and a changed device state.
In a second aspect, an apparatus for querying status information is provided, where the apparatus is applied to a first smart home in a wireless mesh network, and the apparatus includes:
the receiving module is used for receiving first state synchronization messages sent by other intelligent homes in the wireless mesh network, wherein the first state synchronization messages comprise state information of the other intelligent homes;
the first updating module is used for updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, and the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network;
and the first sending module is used for sending the stored equipment state table to the upper computer when receiving a state query request sent by the upper computer.
Optionally, the apparatus further comprises:
the query module is used for querying whether a first linkage control instruction corresponding to the state information in the first state synchronization message exists in the corresponding relation between the prestored state information and the linkage control instruction;
and if so, executing the first linkage control instruction.
Optionally, the apparatus further comprises:
and the second sending module is used for acquiring the state information of the equipment when the equipment is on line, and sending a second state synchronization message to other intelligent homes in the wireless mesh network, wherein the second state synchronization message contains the state information of the equipment, so that the other intelligent homes update the equipment state tables of the other intelligent homes.
Optionally, the apparatus further comprises:
and the third sending module is configured to send a third state synchronization message to other smart homes in the wireless mesh network after the device is online and if it is detected that the device state of the device changes, where the third state synchronization message includes state information of the device, so that the other smart homes update their device state tables.
Optionally, the apparatus further comprises:
the determining module is used for detecting the signal intensity of other intelligent homes and determining a second intelligent home with the maximum signal intensity;
a fourth sending module, configured to send a first comparison request including the device state table to the second smart home, so that the second smart home determines, according to a device state table stored by the second smart home, whether state information to be updated exists in the device state table of the first smart home, and if so, sends an update message to the first smart home, where the update message includes content information corresponding to the state information to be updated in the second smart home;
and the second updating module is used for receiving the updating message sent by the second smart home and updating the state information to be updated according to the content information in the updating message.
Optionally, the state information includes a device state and a state log, where the state log at least includes a change time when the device state changes, a device identifier, and a changed device state.
In a third aspect, an intelligent home is provided, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for completing mutual communication through the communication bus by the memory;
a memory for storing a computer program;
a processor for implementing the method steps of any of the first aspect when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when being executed by a processor, carries out the method steps of any of the first aspects.
The present invention also provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the above-mentioned methods for querying status information.
The embodiment of the application has the following beneficial effects:
the method for querying the state information is applied to a first smart home in a wireless mesh network, the first smart home can receive first state synchronization messages sent by other smart homes in the wireless mesh network, and the first state synchronization messages contain state information of the other smart homes. And then, updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, wherein the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network. And when a state query request sent by the upper computer is received, sending the stored equipment state table to the upper computer. Therefore, all the intelligent home state information in the wireless mesh network can be stored in each intelligent home, so that when the upper computer queries the device state, the upper computer does not need to request the state of each intelligent home, only the device state table of one intelligent home needs to be queried, the network delay encountered during the query of the upper computer is reduced, and the required network bandwidth is also reduced.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a method for querying status information according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a wireless mesh network according to an embodiment of the present application;
fig. 3 is a flowchart of a method for synchronizing status information according to an embodiment of the present application;
fig. 4 is a flowchart of a linkage method for smart home provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an apparatus for querying status information according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an intelligent home provided by the embodiment of the application.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
The embodiment of the application provides a method for inquiring state information, which can be applied to any intelligent home (which can be called as a first intelligent home) in a wireless mesh network. The intelligent home can be an intelligent refrigerator, an intelligent fan, an intelligent lamp and the like, and the embodiment of the application is not limited. In the embodiment of the application, each smart home in the preset area can form a wireless mesh network. For example, smart homes in a user's home may form a wireless mesh network. Specifically, each smart home can be provided with a communication module, and the communication module can carry a mesh protocol stack. After each intelligent home is started, each intelligent home can establish a wireless mesh network based on a communication module carrying a mesh protocol stack. Any strategy for establishing a wireless mesh network in the prior art may be applied to the embodiment of the present application, and the embodiment of the present application does not limit this.
In an example, node role assignment may be performed first, where a smart home (such as a smart router) capable of directly connecting to the internet is assigned as a root node, and the root node scans the signal strength and the node device type of a node to be assigned, and a device with higher signal strength, which can meet the requirement of forwarding data and is not low in power consumption is assigned as an intermediate node, otherwise, it is assigned as a leaf node. The distributed intermediate nodes scan the rest nodes to be distributed, and the node types are distributed according to the signal intensity and the equipment types, so that the establishment of the wireless mesh network is completed after all the node types are distributed layer by layer.
The following describes in detail a method for querying status information provided in an embodiment of the present application with reference to a specific implementation manner, and as shown in fig. 1, the specific steps are as follows:
step 101, receiving a first state synchronization message sent by other smart homes in a wireless mesh network.
The first state synchronization message contains state information of other intelligent homes.
In the embodiment of the application, each smart home can form a wireless mesh network. Fig. 2 shows a wireless mesh network provided in an embodiment of the present application. Each smart home in the wireless mesh network may communicate with any other smart home, for example, a certain intermediate node in the wireless mesh network may communicate with other nodes connected thereto, and the leaf nodes may communicate with the intermediate node and may communicate with a node at a further remote end through the intermediate node.
The intelligent home in the wireless mesh network can send own state information to other intelligent homes. In one case, when each smart home comes online, each smart home may acquire its own status information and broadcast the status information to other smart homes in the wireless mesh network, so that each smart home stores the status information of all smart homes in the wireless mesh network. In another case, when the device status of a certain smart home in the wireless mesh network changes, the smart home may also broadcast the status information to other smart homes in the wireless mesh network, so that each smart home updates the status information of the smart home.
In the embodiment of the application, each smart home can send the state information through the state synchronization message. The protocol used by the status synchronization message may be determined by a skilled person, and the embodiment of the present application is not limited. After receiving the state synchronization message (i.e., the first state synchronization message) sent by other smart homes, the first smart home may analyze the first state synchronization message to obtain the state information included in the first state synchronization message.
And step 102, updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes.
In the embodiment of the application, the first smart home can update the local device state table according to the state information of the device and the received state information of other smart homes, so that the local device state table is consistent with the device state tables of other smart homes.
The equipment state table can be established in each intelligent home, and the equipment state table is used for storing state information of each intelligent home in the wireless mesh network. As shown in the first table,
watch 1
Figure BDA0002372374680000071
Figure BDA0002372374680000081
Referring to table one, the device status table may contain a device status table and a status log table. And each behavior of the equipment state table is state information of the intelligent home. That is, the status information may specifically include a device status and a status log.
The device state may specifically include an intelligent home device identifier and all states of the intelligent home from the start to the current time, and the state log may include a change time when the device state changes, the device identifier, and the changed device state.
The device identification may be a device identifier, a physical address, etc. The device state may include device switches, device functions, and the like. For example, a smart home is an appliance, and the device status may include an on/off status, an operation mode, a fault condition, and the like. If the smart home is a sensor, the device state may be an event detection result of the sensor; if the smart home is a gateway device, the device status may be a network connection status, a network speed, etc.
Taking the intelligent lamp as an example, the device states of the intelligent lamp 1 are as follows in sequence: closing, opening and closing; the corresponding log entry may be: 20: 00 smart lamp 1 off, 20: 10 smart lamp 1 on, 22: 00 smart lamp 1 is off.
Optionally, the updating of the device status table may be specifically divided into the following two cases.
In the first situation, each smart home is in an initialization state, and in this situation, the first smart home directly stores the state information of the device and the received state information of other smart homes in a local device state table.
In the embodiment of the application, the initial equipment state table in the smart home is empty, and when each smart home is online, initialization is performed, for example, a wireless mesh network is established, and then the equipment state table is initialized. Each smart home acquires its own state information, stores the current state information of the device in a local device state table, and broadcasts the state information to other smart homes in the wireless mesh network. After receiving the state information sent by other smart homes, the first smart home can store the received state information of other smart homes in a local device state table. The process of broadcasting the status information will be described in detail later.
And in the second situation, each intelligent home is in an operating state, and at the moment, the first state synchronization message is a state synchronization message sent by other intelligent homes after the state is changed. In this case, the first smart home updates the state information corresponding to the other smart homes in the device state table to the state information in the first state synchronization message. And the first smart home can judge whether the equipment state of the first smart home changes, and if the equipment state of the first smart home changes, the state information corresponding to the equipment in the equipment state table is updated according to the changed equipment state.
In the embodiment of the application, when each smart home is in an operating state, the equipment state may be changed, for example, the smart refrigerator is changed from a power saving mode to a quick-freezing mode. When the device state of a certain smart home in the wireless mesh network changes, the smart home may also broadcast the state information to other smart homes in the wireless mesh network. After receiving the state information sent by other intelligent homes, the first intelligent home updates the state information corresponding to the intelligent home in the equipment state table into the state information in the first state synchronization message. The process of broadcasting the status information will be described in detail later.
Meanwhile, the first smart home can also monitor the state of the device in real time, and can judge whether the state information of the device changes, and if so, the state information corresponding to the device in the device state table is updated according to the changed state of the device. Specifically, the changed device status may be added to the device status table, and the change time when the device status is changed is recorded, so as to generate a status log for the device status and add the status log to the status log table.
Based on the above processing procedure, each smart home may store state information of all smart homes in the wireless mesh network.
And 103, sending the stored equipment state table to the upper computer when receiving a state query request sent by the upper computer.
In this embodiment, the upper computer may be a terminal having data processing and communication functions, for example, may be a terminal device of a user or a terminal device used by a technician. When the upper computer needs to perform state query, the queried target smart home can be determined firstly. The target intelligent home can be randomly selected by the upper computer or can be intelligent equipment with the maximum signal intensity detected by the upper computer. And then, the upper computer sends a query request to the target smart home. And the target intelligent home sends the stored equipment state table to the upper computer.
Therefore, the state information of all the intelligent homes in the wireless mesh network is stored in each intelligent home, so that when the upper computer queries the equipment state, the upper computer does not need to request the state of each intelligent home, only the equipment state table of one intelligent home needs to be queried, the network delay encountered during the query of the upper computer is reduced, and the required network bandwidth is also reduced.
Optionally, taking the first smart home as an example, the embodiment of the present application further provides a process of broadcasting the status information by the smart home, which is specifically as follows.
In view of the first situation, when the first smart home is online, the state information of the device is acquired, and a second state synchronization message is sent to other smart homes in the wireless mesh network, where the second state synchronization message includes the state information of the device, so that the other smart homes update their own device state tables.
In the embodiment of the application, after the wireless mesh network is established, the communication module of each smart home acquires the current equipment state, generates the state log aiming at the equipment state, and stores the equipment state and the state log into the corresponding table entry of the equipment. At this time, the device state table of each smart home only contains its own state information.
To complete the device status table, each smart home in the wireless mesh network broadcasts its own status information. Therefore, each smart home broadcasts its own state information after delaying for a random period of time.
In view of the second situation, after the first smart home is on line, if it is detected that the device state of the device changes, a third state synchronization message is sent to other smart homes in the wireless mesh network, where the third state synchronization message includes state information of the device, so that the other smart homes update their device state tables.
In the embodiment of the application, when the equipment state of the first smart home is changed, the smart home updates the state information of the first smart home and broadcasts the updated state information. After receiving the update message, other smart homes update the local device state table according to the state information in the update message, so that all the device state tables locally stored in the devices in the network are synchronized. Thus, each device will have a real-time status of the other devices.
Optionally, due to the existence of network delay, the arrival times of the messages may be inconsistent, and even in the case of poor wireless conditions or network environments, there may be a possibility of packet loss. Therefore, the device state table of each smart home may be inconsistent. In order to avoid asynchronization of the equipment state table caused by packet loss, the communication module of each intelligent home can regularly request other intelligent homes to compare the equipment state table, and therefore synchronization of the equipment state table is achieved. As shown in fig. 3, the specific process includes the following steps.
Step 301, detecting signal intensity of other smart homes, and determining a second smart home with the largest signal intensity.
In the embodiment of the application, first intelligent house can detect the signal strength of other intelligent houses, wherein, this signal strength can be wifi signal strength, bluetooth signal strength etc.. Then, the first smart home may determine the smart home (second smart home) with the greatest signal strength.
Step 302, a first comparison request containing a device state table is sent to a target home device, so that a second smart home determines whether state information to be updated exists in the device state table of the first smart home according to the device state table stored in the second smart home, and if so, an update message is sent to the first smart home, wherein the update message contains content information corresponding to the state information to be updated in the second smart home.
In this embodiment of the application, the first smart home may send a comparison request to the target home device, where the comparison request includes a device state table (for convenience of distinguishing, it may be referred to as a first device state table) stored by the first smart home device. After receiving the comparison request, the second smart home determines whether the state information to be updated exists in the device state table of the first smart home according to a device state table (which may be referred to as a second device state table for convenience of distinction) stored in the second smart home, and if so, sends an update message to the first smart home, wherein the update message includes content information corresponding to the state information to be updated in the second smart home. If not, no processing is required,
and 303, receiving an update message sent by the second smart home, and updating the state information to be updated according to the content information in the update message.
In the embodiment of the application, the first smart home may receive the update message sent by the second smart home, then obtain the content information in the update message, and modify the entry corresponding to the state information to be updated in the first device state table into the content information in the update message.
Optionally, the manner of determining whether the state information to be updated exists may be various, and the embodiment of the present application provides two possible implementation manners.
The first mode can be judged through the state log. Specifically, for each smart home, a first state log corresponding to the smart home in a first device state table is compared with a second state log corresponding to the smart home in a second device state table. Then, the update time of the status log is obtained, wherein the update time is the change time closest to the current time in the status log.
And if the updating time of the first state log is before the updating time of the second state log, the first equipment state table is not updated in time, and the second intelligent home determines the state information corresponding to the intelligent home as the state information to be updated. And the second smart home sends an update message to the first smart home, wherein the update message contains content information corresponding to the state information to be updated in the second smart home, so that the first smart home can update the state information.
And if the updating time of the first state log is later than that of the second state log, the second equipment state table is not updated in time, and the second intelligent home updates the state information of the intelligent home in the second equipment state table into the state information of the intelligent home in the first equipment state table.
If the update time of the first status log is the same as the update time of the second status log, no processing is performed.
For example, the smart home a stores a device state table a, the smart home B stores a device state table B, and the smart home a sends a comparison request to the smart home B. In the equipment state table a, the equipment states of the intelligent lamp 1 are as follows in sequence: closing and opening; the corresponding log entry may be: 20: 00 smart lamp 1 off, 20: 10 the smart lamp 1 is switched on. In the equipment state table B, the equipment states of the intelligent lamp 1 are as follows in sequence: closing, opening and closing; the corresponding log entry may be: 20: 00 smart lamp 1 off, 20: 10 smart lamp 1 on, 22: 00 smart lamp 1 is off. Determining that the state information to be updated exists in the equipment state table a, and then sending the state information of the intelligent lamp 1 to the intelligent home A.
And in the second mode, the judgment can be carried out according to the equipment state. Specifically, for each smart home, a first device state sequence corresponding to the smart home in a first device state table is compared with a second device state sequence corresponding to the smart home in a second device state table. Then, the update time of the status log is obtained, wherein the update time is the change time closest to the current time in the status log.
If the number of the equipment states contained in the first equipment state sequence is smaller than the number of the equipment states contained in the second equipment state sequence, it is indicated that the first equipment state table is not updated in time, and the second intelligent home determines the state information corresponding to the intelligent home as the state information to be updated. And the second smart home sends an update message to the first smart home, wherein the update message contains content information corresponding to the state information to be updated in the second smart home, so that the first smart home can update the state information.
If the number of the equipment states contained in the first equipment state sequence is larger than the number of the equipment states contained in the second equipment state sequence, it is indicated that the second equipment state table is not updated in time, and the second intelligent home updates the state information of the intelligent home in the second equipment state table into the state information of the intelligent home in the first equipment state table.
If the number of device states included in the first device state sequence is equal to the number of device states included in the second device state sequence, no processing is performed.
For example, the smart home a stores a device state table a, the smart home B stores a device state table B, and the smart home a sends a comparison request to the smart home B. In the equipment state table a, the equipment states of the intelligent lamp 1 are as follows in sequence: closing and opening. In the equipment state table B, the equipment states of the intelligent lamp 1 are as follows in sequence: closing, opening and closing. Determining that the state information to be updated exists in the equipment state table a, and then sending the state information of the intelligent lamp 1 to the intelligent home A.
Similarly, the first smart home may also receive a comparison request sent by another smart home, and then perform comparison, where the specific comparison process is similar to the above process, and is not described herein again.
It should be noted that, in a wireless mesh network with more than two nodes, a pair of nodes may not be compared with each other, that is, the smart home a requests the smart home B to compare, the smart home B may select the smart home with the highest signal strength except the smart home a, and request the comparison device state value table, so as to avoid local synchronization and global non-synchronization.
Optionally, in this embodiment of the application, each smart home may also implement linkage based on a wireless mesh network, as shown in fig. 4, the specific process includes the following steps.
Step 401, receiving a first state synchronization message sent by other smart homes in the wireless mesh network.
The first state synchronization message contains state information of other intelligent homes.
For a detailed explanation of this step, reference may be made to step 101 above, which is not described herein again.
Step 402, in the pre-stored corresponding relation between the state information and the linkage control command, inquiring whether a first linkage control command corresponding to the state information in the first state synchronization message exists.
In the embodiment of the application, the corresponding relation between the state information and the linkage control instruction can be stored in each smart home. Wherein the correspondence stored in different smarthomes is different. For example, for the intelligent lamp, the state of the intelligent door lock is open, the corresponding linkage control command is open, the state of the intelligent door lock is closed, and the corresponding linkage control command is closed. The corresponding relation can be set by an upper computer or can be set by technicians when leaving a factory.
The first smart home can inquire whether a first linkage control instruction corresponding to the state information in the first state synchronization message exists in a corresponding relation between the pre-stored state information and the linkage control instruction.
In step 403, if yes, a first linkage control command is executed.
In the embodiment of the application, if the first linkage control instruction exists, the first smart home executes the first linkage control instruction. Therefore, the linkage logic of the smart home can be set in the equipment, and centralized master control is not needed. Similarly, the requirement of the user on privacy can be met without the assistance of a cloud. In addition, if not present, no processing may be performed.
In the embodiment of the application, a first smart home may receive a first state synchronization message sent by other smart homes in a wireless mesh network, where the first state synchronization message includes state information of the other smart homes. And then, updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, wherein the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network. And when a state query request sent by the upper computer is received, sending the stored equipment state table to the upper computer. Therefore, all the intelligent home state information in the wireless mesh network can be stored in each intelligent home, so that when the upper computer queries the device state, the upper computer does not need to request the state of each intelligent home, only the device state table of one intelligent home needs to be queried, the network delay encountered during the query of the upper computer is reduced, and the required network bandwidth is also reduced.
An embodiment of the present application further provides an apparatus for querying status information, where the apparatus is applied to a first smart home in a wireless mesh network, and as shown in fig. 5, the apparatus includes:
a receiving module 510, configured to receive a first state synchronization message sent by another smart home in the wireless mesh network, where the first state synchronization message includes state information of the other smart home;
a first updating module 520, configured to update a local device state table according to the state information of the device and the received state information of other smart homes, where the device state table is used to store state information of each smart home in the wireless mesh network;
the first sending module 530 is configured to send the stored device status table to the upper computer when receiving a status query request sent by the upper computer.
Optionally, the apparatus further comprises:
the query module is used for querying whether a first linkage control instruction corresponding to the state information in the first state synchronization message exists in the corresponding relation between the prestored state information and the linkage control instruction;
if so, executing the first linkage control instruction.
Optionally, the apparatus further comprises:
and the second sending module is used for acquiring the state information of the equipment when the equipment is on line, and sending a second state synchronization message to other intelligent homes in the wireless mesh network, wherein the second state synchronization message contains the state information of the equipment, so that the other intelligent homes update the equipment state tables of the other intelligent homes.
Optionally, the apparatus further comprises:
and the third sending module is used for sending a third state synchronization message to other intelligent homes in the wireless mesh network after the equipment is online and if the equipment state of the equipment is detected to be changed, wherein the third state synchronization message contains the state information of the equipment, so that the other intelligent homes update the equipment state table of the equipment.
Optionally, the apparatus further comprises:
the determining module is used for detecting the signal intensity of other intelligent homes and determining a second intelligent home with the maximum signal intensity;
the fourth sending module is used for sending a first comparison request containing the equipment state table to the second smart home so that the second smart home determines whether the equipment state table of the first smart home contains the state information to be updated according to the equipment state table stored by the second smart home, and if the equipment state table of the first smart home contains the state information to be updated, the fourth sending module sends an update message to the first smart home, wherein the update message contains content information corresponding to the state information to be updated in the second smart home;
and the second updating module is used for receiving the updating message sent by the second smart home and updating the state information to be updated according to the content information in the updating message.
Optionally, the status information includes a device status and a status log, where the status log at least includes a change time when the device status changes, a device identifier, and a changed device status.
In the embodiment of the application, a first smart home may receive a first state synchronization message sent by other smart homes in a wireless mesh network, where the first state synchronization message includes state information of the other smart homes. And then, updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, wherein the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network. And when a state query request sent by the upper computer is received, sending the stored equipment state table to the upper computer. Therefore, all the intelligent home state information in the wireless mesh network can be stored in each intelligent home, so that when the upper computer queries the device state, the upper computer does not need to request the state of each intelligent home, only the device state table of one intelligent home needs to be queried, the network delay encountered during the query of the upper computer is reduced, and the required network bandwidth is also reduced.
The embodiment of the present invention further provides an intelligent home, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603 and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
receiving first state synchronization messages sent by other intelligent homes in the wireless mesh network, wherein the first state synchronization messages comprise state information of the other intelligent homes;
updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, wherein the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network;
and when a state query request sent by the upper computer is received, sending the stored equipment state table to the upper computer.
Optionally, after receiving the first status synchronization message sent by other smart homes in the wireless mesh network, the method further includes:
inquiring whether a first linkage control instruction corresponding to the state information in the first state synchronization message exists in a corresponding relation between the pre-stored state information and the linkage control instruction;
and if so, executing the first linkage control instruction.
Optionally, the method further includes:
when the equipment is on line, acquiring the state information of the equipment, and sending a second state synchronization message to other intelligent homes in the wireless mesh network, wherein the second state synchronization message contains the state information of the equipment, so that the other intelligent homes update own equipment state tables.
Optionally, the method further includes:
after the device is online, if the device state of the device is detected to change, a third state synchronization message is sent to other intelligent homes in the wireless mesh network, wherein the third state synchronization message contains the state information of the device, so that the other intelligent homes update the device state tables of the other intelligent homes.
Optionally, the method further includes:
detecting the signal intensity of other intelligent homes, and determining a second intelligent home with the maximum signal intensity;
sending a first comparison request containing the equipment state table to the second smart home, so that the second smart home determines whether the equipment state table of the first smart home contains state information to be updated according to the equipment state table stored by the second smart home, and if the equipment state table of the first smart home contains the state information to be updated, sending an update message to the first smart home, wherein the update message contains content information corresponding to the state information to be updated in the second smart home;
and receiving an update message sent by the second smart home, and updating the state information to be updated according to the content information in the update message.
Optionally, the state information includes a device state and a state log, where the state log at least includes a change time when the device state changes, a device identifier, and a changed device state.
The communication bus mentioned in the smart home may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the intelligent home and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the above methods for querying state information.
In another embodiment, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for querying any one of the above-mentioned state information.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (14)

1. A method for querying status information, the method being applied to a first smart home in a wireless mesh network, the method comprising:
receiving first state synchronization messages sent by other intelligent homes in the wireless mesh network, wherein the first state synchronization messages comprise state information of the other intelligent homes;
updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, wherein the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network;
and when a state query request sent by the upper computer is received, sending the stored equipment state table to the upper computer.
2. The method of claim 1, wherein after receiving the first status synchronization message sent by other smart homes in the wireless mesh network, further comprising:
inquiring whether a first linkage control instruction corresponding to the state information in the first state synchronization message exists in a corresponding relation between the pre-stored state information and the linkage control instruction;
and if so, executing the first linkage control instruction.
3. The method of claim 1, further comprising:
when the equipment is on line, acquiring the state information of the equipment, and sending a second state synchronization message to other intelligent homes in the wireless mesh network, wherein the second state synchronization message contains the state information of the equipment, so that the other intelligent homes update own equipment state tables.
4. The method of claim 1, further comprising:
after the device is online, if the device state of the device is detected to change, a third state synchronization message is sent to other intelligent homes in the wireless mesh network, wherein the third state synchronization message contains the state information of the device, so that the other intelligent homes update the device state tables of the other intelligent homes.
5. The method of claim 1, further comprising:
detecting the signal intensity of other intelligent homes, and determining a second intelligent home with the maximum signal intensity;
sending a first comparison request containing the equipment state table to the second smart home, so that the second smart home determines whether the equipment state table of the first smart home contains state information to be updated according to the equipment state table stored by the second smart home, and if the equipment state table of the first smart home contains the state information to be updated, sending an update message to the first smart home, wherein the update message contains content information corresponding to the state information to be updated in the second smart home;
and receiving an update message sent by the second smart home, and updating the state information to be updated according to the content information in the update message.
6. The method of any of claims 1-5, wherein the status information comprises a device status and a status log, wherein the status log comprises at least a change time when the device status has changed, a device identification, and a changed device status.
7. An apparatus for querying status information, the apparatus being applied to a first smart home in a wireless mesh network, the apparatus comprising:
the receiving module is used for receiving first state synchronization messages sent by other intelligent homes in the wireless mesh network, wherein the first state synchronization messages comprise state information of the other intelligent homes;
the first updating module is used for updating a local equipment state table according to the state information of the equipment and the received state information of other intelligent homes, and the equipment state table is used for storing the state information of each intelligent home in the wireless mesh network;
and the first sending module is used for sending the stored equipment state table to the upper computer when receiving a state query request sent by the upper computer.
8. The apparatus of claim 7, further comprising:
the query module is used for querying whether a first linkage control instruction corresponding to the state information in the first state synchronization message exists in the corresponding relation between the prestored state information and the linkage control instruction;
and if so, executing the first linkage control instruction.
9. The apparatus of claim 7, further comprising:
and the second sending module is used for acquiring the state information of the equipment when the equipment is on line, and sending a second state synchronization message to other intelligent homes in the wireless mesh network, wherein the second state synchronization message contains the state information of the equipment, so that the other intelligent homes update the equipment state tables of the other intelligent homes.
10. The apparatus of claim 7, further comprising:
and the third sending module is configured to send a third state synchronization message to other smart homes in the wireless mesh network after the device is online and if it is detected that the device state of the device changes, where the third state synchronization message includes state information of the device, so that the other smart homes update their device state tables.
11. The apparatus of claim 7, further comprising:
the determining module is used for detecting the signal intensity of other intelligent homes and determining a second intelligent home with the maximum signal intensity;
a fourth sending module, configured to send a first comparison request including the device state table to the second smart home, so that the second smart home determines, according to a device state table stored by the second smart home, whether state information to be updated exists in the device state table of the first smart home, and if so, sends an update message to the first smart home, where the update message includes content information corresponding to the state information to be updated in the second smart home;
and the second updating module is used for receiving the updating message sent by the second smart home and updating the state information to be updated according to the content information in the updating message.
12. The apparatus of any of claims 7-11, wherein the status information comprises a device status and a status log, the status log comprising at least a change time when the device status changed, a device identification, and a changed device status.
13. The smart home is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are communicated with each other through the communication bus by the memory;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202010054573.8A 2020-01-17 2020-01-17 State information query method and device Pending CN111274319A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010054573.8A CN111274319A (en) 2020-01-17 2020-01-17 State information query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010054573.8A CN111274319A (en) 2020-01-17 2020-01-17 State information query method and device

Publications (1)

Publication Number Publication Date
CN111274319A true CN111274319A (en) 2020-06-12

Family

ID=70997333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010054573.8A Pending CN111274319A (en) 2020-01-17 2020-01-17 State information query method and device

Country Status (1)

Country Link
CN (1) CN111274319A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113359500A (en) * 2021-07-02 2021-09-07 佛山市淇特科技有限公司 Smart home equipment state synchronization method, device, equipment and storage medium
CN115390465A (en) * 2022-07-22 2022-11-25 青岛海尔科技有限公司 Equipment monitoring method, device, system, storage medium and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105515853A (en) * 2015-12-03 2016-04-20 泰凌微电子(上海)有限公司 Wireless network node and state update method thereof
CN105625861A (en) * 2016-01-13 2016-06-01 徐州大亚智能科技有限公司 Wireless remote-control type window controller system based on mobile phone APP
CN109240100A (en) * 2018-09-14 2019-01-18 无锡小天鹅股份有限公司 Intelligent home furnishing control method, equipment, system and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105515853A (en) * 2015-12-03 2016-04-20 泰凌微电子(上海)有限公司 Wireless network node and state update method thereof
CN105625861A (en) * 2016-01-13 2016-06-01 徐州大亚智能科技有限公司 Wireless remote-control type window controller system based on mobile phone APP
CN109240100A (en) * 2018-09-14 2019-01-18 无锡小天鹅股份有限公司 Intelligent home furnishing control method, equipment, system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113359500A (en) * 2021-07-02 2021-09-07 佛山市淇特科技有限公司 Smart home equipment state synchronization method, device, equipment and storage medium
CN115390465A (en) * 2022-07-22 2022-11-25 青岛海尔科技有限公司 Equipment monitoring method, device, system, storage medium and electronic device

Similar Documents

Publication Publication Date Title
JP4882036B1 (en) Information processing apparatus, method, and server for determining type of electrical appliance
US10320932B2 (en) Conveying state changes using connectionless messaging and a store-and-forward cache
US9258137B2 (en) Bridge apparatus and bridge system with a virtual device for protocol conversion
US7693934B2 (en) Network device, system and method for providing list of controlled devices
WO2018039814A1 (en) Smart household control method, apparatus and system
WO2018077018A1 (en) Networking method and device, network connection method and device, router, and smart home appliance
US20150006296A1 (en) NOTIFICATION DISMISSAL IN AN INTERNET OF THINGS (IoT) ENVIRONMENT
KR20050014628A (en) Home network system and its configuration system
WO2022142623A1 (en) Smart device control method and apparatus, electronic device, and computer readable medium
CN107113892A (en) A kind of method and device of gateway device automatic network-building
US11909840B2 (en) Resource subscription method, device, and storage medium
CN113905050A (en) Method, device and system for detecting internet access information
CN115486038B (en) Internet of things configuration method, internet of things configuration device, computer equipment and storage medium
JP6085962B2 (en) Management apparatus and address management method
CN111274319A (en) State information query method and device
CN108322557B (en) Application equipment discovery method and device, computer equipment and storage medium
WO2024183449A1 (en) Building protocol data processing method, apparatus, and system
WO2024017260A1 (en) Household appliance pairing method and pairing apparatus, server and storage medium
JP5394704B2 (en) Information communication system and software update method
US11171868B2 (en) Systems and methods for centrally-assisted distributed hash table
TW201006191A (en) UPnP/DLNA device support apparatus, system, and method
CN104702711A (en) Intelligent network system for adaptively controlling inner network conflict and optimization method
WO2024011367A1 (en) Device discovery methods and apparatuses, and device, storage medium and program product
CN117857416A (en) Data packet sending method and device, storage medium and electronic device
WO2021189207A1 (en) Information sending method, apparatus and device, and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200612

RJ01 Rejection of invention patent application after publication