[go: up one dir, main page]

CN114900846B - Device display status updating method, device, electronic device and storage medium - Google Patents

Device display status updating method, device, electronic device and storage medium Download PDF

Info

Publication number
CN114900846B
CN114900846B CN202210358717.8A CN202210358717A CN114900846B CN 114900846 B CN114900846 B CN 114900846B CN 202210358717 A CN202210358717 A CN 202210358717A CN 114900846 B CN114900846 B CN 114900846B
Authority
CN
China
Prior art keywords
target device
time node
historical
state
heartbeat
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
Application number
CN202210358717.8A
Other languages
Chinese (zh)
Other versions
CN114900846A (en
Inventor
傅晓明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United 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 Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN202210358717.8A priority Critical patent/CN114900846B/en
Publication of CN114900846A publication Critical patent/CN114900846A/en
Application granted granted Critical
Publication of CN114900846B publication Critical patent/CN114900846B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)

Abstract

本申请公开了一种设备显示状态更新方法、装置、电子设备及存储介质,涉及网络技术领域,所述方法包括当前网络中有多个设备,从多个设备中确定显示状态为离线状态的设备作为目标设备,为了确定该设备状态是否为上述的假离线,根据历史数据获取目标设备的探询时间节点,在本轮次的探询时间节点时,目标设备具备收发信息的功能,因此,发送状态确认指令至目标设备,在接收到目标设备基于状态确认指令的响应时,确认目标设备处于能够进行通信的在线状态,将目标设备的显示状态更新为在线状态,以准确检测目标设备的真实状态,也便于后期对该设备的控制。

The present application discloses a device display status updating method, apparatus, electronic device and storage medium, and relates to the field of network technology. The method includes that there are multiple devices in the current network, and a device whose display status is offline is determined from the multiple devices as a target device. In order to determine whether the device status is the above-mentioned false offline, the inquiry time node of the target device is obtained according to historical data. At the inquiry time node of this round, the target device has the function of sending and receiving information. Therefore, a status confirmation instruction is sent to the target device. When a response based on the status confirmation instruction is received from the target device, it is confirmed that the target device is in an online state capable of communication, and the display status of the target device is updated to an online state, so as to accurately detect the real state of the target device, and also facilitate the subsequent control of the device.

Description

Device display state updating method and device, electronic device and storage medium
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and apparatus for updating a device display state, an electronic device, and a storage medium.
Background
With the development of wireless network technology, more and more devices are provided with networking capability, and the devices can be remotely controlled through a network. When the number of controlled devices is large, for convenience in management and control, the cloud end is generally connected with a plurality of sub-devices, and the plurality of sub-devices are controlled through the cloud end. The cloud end cannot accurately monitor the real state of the equipment because of communication faults between the cloud end and part of the sub-equipment caused by factors such as poor network conditions and the like, and the situation that the state displayed by the sub-equipment is inconsistent with the actual real state, such as the false off-line state, occurs.
Disclosure of Invention
In view of the above problems, the present application provides a device display status updating method, device, electronic device, and storage medium, which can solve the above problems.
In a first aspect, an embodiment of the present application provides a device display status updating method, where a device whose display status is in an offline status among a plurality of devices in a current network is used as a target device, historical data of the target device is acquired, an interrogation cycle node of the target device is determined based on the historical data, when the interrogation cycle node of the current round is reached, a status confirmation instruction is sent to the target device to instruct the target device to respond to the status confirmation instruction, and when response information fed back by the target device based on the status confirmation instruction is received, the display status of the target device is updated to an online status.
In a second aspect, an embodiment of the application provides a device display state updating device, which comprises a target device determining module, an acquiring module, a sending module and a confirming module, wherein the target device determining module is used for taking a device with an offline display state in a plurality of devices of a current network as a target device, the acquiring module is used for acquiring historical data of the target device and determining an inquiry time node of the target device based on the historical data, the sending module is used for sending a state confirming instruction to the target device when the inquiry time node of the current round is reached so as to indicate the target device to respond to the state confirming instruction, and the confirming module is used for updating the display state of the target device to be an online state when response information fed back by the target device based on the state confirming instruction is received.
Optionally, the acquisition module comprises a data acquisition module and an inquiry time node acquisition module, wherein the data acquisition module is used for acquiring historical heartbeat data of the target equipment in a preset time period, and the inquiry time node acquisition module is used for acquiring historical heartbeat time nodes in the historical heartbeat data and determining the inquiry time nodes of the target equipment based on the historical heartbeat time nodes.
Optionally, the interrogation time node obtaining module comprises a smoothing module and a first interrogation time node obtaining module. The system comprises a smoothing module, a first inquiry time node acquisition module and a second inquiry time node acquisition module, wherein the smoothing module is used for carrying out smoothing on the historical heartbeat time nodes in the historical heartbeat data to obtain smoothed time nodes, and the first inquiry time node acquisition module is used for determining inquiry period nodes of the target equipment based on the smoothed time nodes.
The acquisition module of the interrogation time node comprises a first adjustment module, a second adjustment module and a second acquisition module of the interrogation time node, wherein the first adjustment module is used for adjusting the historical heartbeat time node in the historical heartbeat data within a preset threshold range to be a first heartbeat time node, the second adjustment module is used for adjusting the historical heartbeat time node in the historical heartbeat data which is not within the preset threshold range to be a second heartbeat time node, and the second acquisition module of the interrogation time node is used for determining the interrogation time node of the target device based on the first heartbeat time node and the second heartbeat time node.
Optionally, the sending module comprises an acquisition module of the interrogation time length and a sending module of the state confirmation instruction, wherein the acquisition module of the interrogation time length is used for acquiring the interrogation time length when the current time meets the interrogation time node, and the sending module of the state confirmation instruction is used for continuously sending the state confirmation instruction to the target equipment in the interrogation time length so as to instruct the target equipment to respond to the state confirmation instruction.
Optionally, the device further comprises a determining module and a continuous sending module, wherein the determining module is used for determining a next round of inquiry time node if response information fed back by the target device is not received within a preset time period, and the continuous sending module is used for sending a state confirmation instruction to the target device when the next round of inquiry time node is reached, so as to instruct the target device to respond to the state confirmation instruction.
Optionally, the device further comprises an updating module and an updating module, wherein the updating module is used for synchronizing the updated online state of the target equipment to a corresponding terminal so as to instruct the terminal to update the state of the target equipment into the online state and display the online state, and the control of the terminal on the target equipment is restored.
Optionally, the target device is a ZigBee device.
In a third aspect, an embodiment of the present application provides an electronic device comprising one or more processors, memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the above-described method.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having program code stored therein, the program code being callable by a processor to perform the above method.
In a fifth aspect, embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium, a processor of a computer device reading the computer instructions from the computer readable storage medium, the processor implementing the steps in the device display status updating method of the embodiments of the present application when executing the computer instructions.
In order to determine whether the state of a device is the false offline, the method, the device and the electronic device for updating the display state of the device, and the storage medium provided by the application acquire the inquiry time node of the target device according to historical data, and the target device has the function of receiving and transmitting information when the inquiry time node of the round is adopted, therefore, a state confirmation instruction is sent to the target device, when the response of the target device based on the state confirmation instruction is received, the target device is confirmed to be in an online state capable of communicating, the display state of the target device is updated to be in the online state, the true state of the target device is accurately detected, and the control of the device in the later period is facilitated.
These and other aspects of the application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a device display status updating method provided in the prior art;
fig. 2 is a schematic diagram of a ZigBee mesh network topology according to an embodiment of the present application;
Fig. 3 is a schematic diagram of an application environment of a device display status updating method according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for updating a display status of a device according to an embodiment of the present application;
FIG. 5 is a flow chart of step S120 of the device display status updating method of FIG. 4 according to the present application;
FIG. 6 is a flow chart of step S122 of the device display status updating method of FIG. 5 according to the present application;
FIG. 7 shows a graphical representation of a historical heartbeat node;
FIG. 8 shows a schematic diagram of a time node curve after smoothing;
FIG. 9 is a schematic flow chart of step S122 of the device display status updating method of FIG. 6 according to the present application;
FIG. 10 shows a graphical representation of a historical heartbeat node;
FIG. 11 shows a graphical representation of an adjusted historical heartbeat node curve;
FIG. 12 is a flowchart of step S130 of the device display status updating method of FIG. 4 according to the present application;
Fig. 13 is a schematic flow chart of a method for updating a display status of a device according to another embodiment of the present application;
FIG. 14 is a flowchart of a method for updating a display status of a device according to another embodiment of the present application;
FIG. 15 is a flowchart of a method for updating a display status of a device according to still another embodiment of the present application;
FIG. 16 is a block diagram showing a device display status updating apparatus according to an embodiment of the present application;
fig. 17 is a block diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
With the development of wireless network technology (e.g., zigBee bees), more and more devices are provided with networking capability, and these sub-devices can be remotely controlled through a network to remotely turn on or off certain functions of the sub-devices. When the number of the sub-devices is large, in order to facilitate management and control of the sub-devices, the cloud end is generally connected with a plurality of sub-devices, and the plurality of sub-devices are controlled through the cloud end. The communication fault between the cloud end and part of the sub-devices caused by factors such as poor network conditions causes the situation that the state displayed by the sub-devices is inconsistent with the actual real state, for example, in the actual application scene, the signals can be weakened by more interference factors (such as disordered home, walls, metal decoration, high-power electrical appliances, long distances and the like) in the environment, the transmitted data are lost, the condition of false offline occurs, the real state of the devices cannot be accurately monitored by the cloud end, and the phenomenon can influence the control of the devices in the later period.
To solve the above-mentioned problems, a method is provided in the prior art, and referring to fig. 1, for example, the method for updating the display status of the device provided in the prior art includes the following steps:
step S10, the gateway obtains that the display state of the target device is an offline state.
The gateway is in communication connection with the target equipment, and the gateway obtains the display state of the target equipment through the connection relation. The target device may be a Zigbee device.
And step S20, the gateway sends an identification message to the target equipment.
And the gateway sends the identification message to the target equipment through the connection relation. Optionally, the gateway may automatically send an identification message to the target device when the display state of the target device is an offline state. Or when the display state of the target equipment is an offline state, the user manually dials a button on the gateway to enable the gateway to send the identification message to the target equipment. And the gateway is connected with the user terminal, and when the display state of the target equipment is in an offline state, the user outputs a request instruction through the user terminal so as to request the gateway to send an identification message to the target equipment.
And step S30, judging whether the target equipment receives the identification message.
In order to determine whether the offline state of the target device is a true offline state or a false offline state caused by the above-mentioned interference factors, it needs to determine whether the target device receives the identification message, if the target device does not receive the identification message, i.e. the gateway does not receive the default response (i.e. default reply) of the target device in response to the identification message, the flow returns to step S20, the gateway resends the identification message to the target device, and if the target device receives the identification message, the flow proceeds to step S40.
And S40, the target equipment replies default response based on the identification message, and controls the indicator lamp to flash.
If the target device replies with an default response based on the identification message, for example, the target device replies with 1, 0 or any other default response based on the corresponding default response of the identification message. And controls the indicator light to flash to indicate to the user that the target device is actually online. The indicator light may be an indicator light on the target device, or may be another separate indicator light.
Step S50, the display state of the target device is updated from the offline state to the online state.
The display state of the target device is updated from an offline state to an online state so that the gateway can control the target device according to the state.
The Zigbee device comprises a communication unit, the working state of the communication unit of the Zigbee device comprises a dormant state and an open state, when the communication unit is in the dormant state, the communication unit can not send and receive data for the Zigbee device, and when the communication unit is in the open state, the communication unit sends and receives data for the Zigbee device. Therefore, when the communication unit of the Zigbee device is in the dormant state, the target device does not receive the identity message of the gateway, and therefore the target device does not respond to the identity message to reply to the default response. In the prior art, if the communication unit of the target device is in a dormant state, the gateway will not receive the default response, and the target device will be mistakenly considered to be in an offline state, in fact, the target device is in an online state, but the communication unit of the target device is in the dormant state and cannot reply to the default response.
In order to solve the above technical problems, the inventor has found and proposed a method, a device, an electronic device and a storage medium for updating a display state of a device, where when a display state corresponding to a target device is an offline state, in order to determine whether the display state of the device is the above pseudo offline state, an interrogation time node of the target device is obtained, and when the target device is at the interrogation time node, the target device has a function of receiving and transmitting information. Therefore, the state confirmation instruction is sent to the target equipment, when the response of the target equipment based on the state confirmation instruction is received, the target equipment is confirmed to be in an online state capable of carrying out communication, and the display state of the target equipment is updated to be in the online state, so that the real state of the target equipment is accurately and rapidly detected, and the control of the equipment in the later period is facilitated.
In order to better understand the method, the device, the electronic device and the storage medium for updating the display state of the device provided by the embodiment of the application, an application environment suitable for the embodiment of the application is described below.
In some scenarios, the device display status updating method is applied to a device display status updating system, and the device display status updating system may be a ZigBee mesh network, and the target device may be a ZigBee device. The Zigbee is a low-power consumption local area network protocol based on the IEEE802.15.4 standard, and according to international standard provision, the Zigbee technology is a wireless communication technology with short distance and low power consumption, and the transmission characteristics of short distance, low power consumption and the like enable the technology to greatly save electric quantity resources, so that the Zigbee technology is widely used in intelligent households.
Referring to fig. 2, in the ZigBee mesh network topology, the cloud may be directly connected to a plurality of ZigBee sub-devices, for example, the cloud is directly connected to ZigBee sub-device a 1. The cloud may be indirectly connected to the ZigBee kids through other ZigBee kids, for example, the cloud is connected to the ZigBee kids a2, a ZigBee kids a3, a ZigBee kids a4, and a ZigBee kids a5 through the ZigBee kids a1, respectively. Alternatively, since the ZigBee sub-Device a1, the ZigBee sub-Device a2, the ZigBee sub-Device a3, the ZigBee sub-Device a4, and the ZigBee sub-Device a5 carry important transmission functions in the network, the ZigBee sub-devices a1 to a5 may be powerful full Function devices (Ful-Function devices, FFD for short). Alternatively, the untagged ZigBee Device in fig. 2 may be an FFD, or may be a Reduced-Function Device (RFD) with a simple Function, for example, a sensor with a communication Function.
The cloud end is connected with the ZigBee equipment, and the ZigBee equipment is controlled, monitored and the like through the cloud end. Optionally, the ZigBee sub-device includes a communication unit, where the communication unit of the ZigBee sub-device is connected to the cloud, and data interaction with the cloud is achieved through the communication unit of the ZigBee sub-device. Because the cloud end and the ZigBee equipment do not always perform data interaction, in order to reduce power consumption and improve the cruising ability of the ZigBee equipment, the communication unit of the ZigBee equipment can be periodically started. For example, when the polling (polling) is performed, the communication unit is in an on state, the power consumption of the ZigBee device is increased, the ZigBee device can occupy a channel to perform data interaction with the cloud or inquire a parent node whether a control instruction of the cloud exists, and when the rest is performed, the communication unit of the ZigBee device is in a dormant state, the power consumption of the ZigBee device is reduced, and the ZigBee device can not perform data interaction with the cloud.
Alternatively, the plurality of ZigBee sub-devices are indoor smart home devices, for example, the smart home devices may be, but are not limited to, wall sockets, wall switches, wireless switches, refrigerators, air conditioners, desk lamps, and the like.
In a scenario that the smart home device includes a wall socket, a wall switch, and a wireless switch, the present application provides another device display status update system applied to a device display status update method, referring to fig. 3, the system includes a cloud, a gateway, a mobile phone, and the smart home devices such as the wall socket, the wall switch, and the wireless switch. Wall socket, wall switch, wireless switch and high in the clouds all with gateway communication connection, high in the clouds and cell-phone communication connection, install the Application (APP) of control intelligent house equipment on the cell-phone, the user is APP and high in the clouds communication through being on the cell-phone, can realize the remote control to wall socket, wall switch and wireless switch through high in the clouds and gateway. And the cloud end can also send the display state of intelligent household equipment such as a wall socket, a wall switch and a wireless switch to the APP of the mobile phone for display, wherein the display state comprises an online state and an offline state.
Fig. 4 is a flowchart illustrating a device display status updating method according to an embodiment of the present application, where the device display status updating method may be applied to the cloud end shown in fig. 2, the device display status updating apparatus 100 shown in fig. 9, and the electronic device 1200 configured with the device display status updating apparatus 100 shown in fig. 10.
The embodiment will take application of the device display status updating method to the electronic device as an example to describe a specific flow of the embodiment, for example, the electronic device may be a server, a cloud, a gateway, etc. The method for updating the display state of the device specifically may include the following steps, which will be described in detail with reference to the flowchart shown in fig. 4:
step S110, a device with an offline state is used as a target device in a plurality of devices of the current network.
The current network is a network for communication connection between the electronic device and each corresponding device. For example, the current network may be a network of communication connections between the cloud and the plurality of ZigBee sub-devices in fig. 1.
The plurality of devices refer to devices in the device display state updating system, and also refer to devices in the current network, the number of the devices in the device display state updating system is not fixed, and when one of the plurality of devices exits the current network, the corresponding device exits from the device display state updating system. When a device is added to the device display status updating system, the number of the plurality of devices in the device display status updating system correspondingly increases.
The display state refers to a network connection state (hereinafter referred to as a display state) of a device displayed on the cloud or the mobile phone, wherein the display states on the cloud and the mobile phone are consistent. It is understood that the display state may include an on-line state and an off-line state.
When the display state of the device in the device display state updating system is an on-line state, the device is still in the current network for the cloud or the mobile phone, and can still be controlled by the cloud or the mobile phone in the device display state updating system. When the display state of the device in the device display state updating system is in an offline state, the fact that the device exits the current network for the cloud or the mobile phone is indicated, which means that the cloud or the mobile phone cannot control the device through the current network.
The electronic device obtains a display state of each device in the plurality of devices in the current network, and takes the device with the display state being an offline state as a target device, and it can be understood that the target device refers to the device with the display state being the offline state in the current network, that is, for a cloud or a mobile phone in a device display state updating system, the target device is in the offline state, and the offline state may be a false offline caused by a network or an obstacle, or may be a true offline, that is, the target device exits the current network, so that verification on the offline state is required.
The electronic device obtains states of a plurality of devices. In one embodiment, each of the plurality of devices has a communication unit thereon, the communication unit is periodically in an on state, and when the communication unit is in each on state, a heartbeat packet of the device is sent to the electronic device, and if the electronic device does not receive the heartbeat packet within a period of time, the display state is in an off-line state, that is, the electronic device considers that the device is in an off-line state.
In another embodiment, the electronic device is connected to a terminal device, where the terminal device may be a mobile phone, an intelligent wearable device, a tablet computer, a notebook computer, or the like in fig. 2. For example, for an air conditioner, a pattern of the air conditioner is displayed on the terminal device as an identifier, and the electronic device obtains the identifier information displayed by the plurality of devices on the mobile terminal, where the identifier information may indicate that the display state of the device is an on-line state or an off-line state, for example, when the identifier information is gray, the device is indicated to be in an off-line state, and when the identifier information is colored, the device is indicated to be in an on-line state. When the display identification information indicates that the device is in the offline state, the offline state may be the above-mentioned false offline state, and the offline state needs to be determined to determine that the device displaying the offline state is the target device.
Step S120, historical data of the target device is obtained, and the interrogation time node of the target device is determined based on the historical data.
After the electronic device confirms the target device, the electronic device considers that the display state of the target device is an offline state, and the target device is false offline due to factors such as a network and an obstacle, and in order to confirm whether the display offline state of the target device is the false offline or the true offline, it is necessary to judge whether the current moment reaches the interrogation time node, and it is understood that when the interrogation time node is reached, the communication unit of the target device is in an on state, and data interaction can be performed. When the current moment does not meet the inquiry time node, the communication unit of the target device is in a dormant state, the target device cannot interact with the electronic device, and if a state confirmation instruction is sent to the target device at the moment, the instruction cannot be received by the target device. That is, the target device does not reply to the status confirmation command, and thus it cannot accurately determine whether the target device is in the true offline or the false offline.
Therefore, when the display state is an offline state, it is necessary to acquire the interrogation time node from the history data in order to determine whether the offline state is a true offline state or a false offline state. The historical data are data which are actively reported to the electronic equipment by the target equipment when the target equipment and the electronic equipment normally communicate. For example, the target device reports data to the electronic device in the form of a heartbeat packet. The data in the heartbeat package comprises time when the target device reports the heartbeat package, and the electronic device stores the data in the heartbeat package as historical data after receiving the heartbeat package. Thus, the electronic device may obtain the historical data from the storage location of the historical data and obtain the interrogation time node from the historical data. The polling time node refers to a time or a time period when the communication unit of the target device is in an on state and can perform data interaction, namely polling time. When the time node is inquired, the communication unit of the target equipment is in an on state, and data interaction is realized through the communication unit.
In one embodiment, for a target device with a variable preset interrogation period, the preset interrogation period may be adjusted according to user settings. For example, when the target device is a smart desk lamp, the preset interrogation period may be one day, and the user may reset the preset interrogation period to 12 hours according to seasonal factors.
As one mode, the electronic device is a cloud end, the cloud end is connected with the terminal device, a user sets a period on the terminal device, the cloud end generates a beacon frame based on the setting, the beacon frame is sent to the target device to set a preset interrogation period of the target device, and the cloud end stores the preset interrogation period set by the user. As another way, the terminal device is connected with the target device and the cloud terminal respectively, the terminal device sends a period setting instruction to the target device, a preset interrogation period of the target device is set, the cloud terminal obtains the period setting instruction from the terminal device, and the preset interrogation period is obtained and stored according to the instruction.
In another embodiment, for a target device with a fixed preset interrogation period, such as a single fire device (e.g., smoke sensor), the electronic device need only acquire the preset interrogation period corresponding to the target device once.
And step S130, when the polling time node of the round is reached, a state confirmation instruction is sent to the target equipment so as to instruct the target equipment to respond to the state confirmation instruction.
The state confirmation instruction is generated by the electronic device, and is used for verifying whether the offline state of the target device is a false offline state or a true offline state. Alternatively, the state validation instruction may be an instruction of the identify attribute. When the communication unit of the target device is in the on state in the interrogation time node, the target device may receive a state confirmation instruction sent by the electronic device. In order to determine the time for sending the state confirmation instruction, whether the current time reaches the current polling time node needs to be determined, and then whether the current time is the polling time can be determined, so that whether the current polling time node reaches the current polling time node is determined.
In one embodiment, the interrogation time node is a time, after the interrogation time node is acquired, it needs to be determined whether the current time is the interrogation time node, and when the current time is different from the interrogation time node, it is determined that the current time is not the interrogation time node, which indicates that the electronic device has missed the interrogation time node of the target device for starting the communication unit. For example, the current time is 10:22, the interrogation time node is 10:20, or the electronic device has not yet waited for the target device to turn on the communication unit, for example, the current time is 10:22, and the interrogation time node is 10:30.
In another embodiment, the polling time node is a time period, and the communication unit of the target device is in an on state for a continuous period of time (i.e., in the polling time node), that is, a polling time period corresponding to the polling time node, and when the current time is not in the polling time period, it is determined that the current time does not satisfy the polling time node. For example, when the acquired interrogation time is 9:00, the communication unit is turned on for 2 minutes, and the interrogation time is between 9:00 and 9:02. When the current time is 8:49, the current time is not considered to be within the interrogation time length, the current time is determined not to meet the interrogation time node, and the electronic device still needs to continue waiting for the interrogation time.
As one approach, to save electronic device costs, the electronic device sends a status confirmation instruction to the target device once within the interrogation time period.
Alternatively, to make the validation result more accurate, the electronic device may continue to send status validation instructions to the target device multiple times during the interrogation period.
And step 140, when receiving response information fed back by the target equipment based on the state confirmation instruction, updating the display state of the target equipment into an on-line state.
The principle that the electronic device verifies whether the offline state is the true offline state or the false offline state through the state confirmation instruction is that when the time node is inquired, the communication unit of the target device is in an on state, and the electronic device sends the state confirmation instruction to the target device. The target equipment receives the state confirmation instruction through the communication unit on the target equipment, then responds to the state confirmation instruction, the electronic equipment judges that the communication connection between the electronic equipment and the target equipment is normal after receiving the response of the target equipment, and the electronic equipment can control the target equipment through the connection relation, namely, the target equipment is in an actually online state. That is, the offline state of the displayed target device is a pseudo offline. And updating the display state of the target equipment from an offline state to an online state, so that the electronic equipment can conveniently control the target equipment.
Otherwise, if the electronic device does not receive the response of the target device, it is determined that the communication connection between the electronic device and the target device is abnormal, the electronic device cannot control the target device, and the target device is actually in an offline state, that is, the offline state of the displayed target device is true offline.
Optionally, due to the fact that interference factors in the environment may cause data loss in transmission between the electronic device and the target device, in order to ensure accuracy of the verification result, the electronic device may send a status confirmation instruction to the target device multiple times, that is, if response information fed back by the target device is not received within a preset duration, determine an interrogation time node of a next round. And when the next round of inquiry time node is reached, sending a state confirmation instruction to the target equipment so as to instruct the target equipment to respond to the state confirmation instruction.
Alternatively, in order to prevent the transient occupation of the processing resources of the electronic device and the communication resources of the current network, the round of re-authentication is limited, and the round of re-authentication may be preset, for example, may be set to 5 times, 6 times, or the like. And if no response returned by the target equipment is received in the preset round, determining that the offline state of the target equipment is a true offline.
In the method for updating the display state of the device provided in the embodiment, a plurality of devices are present in the current network, the device whose display state is the offline state is determined from the plurality of devices as the target device, in order to determine whether the device state is the above-mentioned false offline state, the interrogation time node of the target device is obtained according to the historical data, and the target device has the function of transmitting and receiving information when the interrogation time node of the current round is. Therefore, the state confirmation instruction is sent to the target equipment, when the response of the target equipment based on the state confirmation instruction is received, the target equipment is confirmed to be in an online state capable of carrying out communication, and the display state of the target equipment is updated to be in the online state, so that the real state of the target equipment is accurately and rapidly detected, and the control of the equipment in the later period is facilitated. Compared with the blind sending identification message in the prior art, the embodiment of the application can send the state confirmation instruction after waiting for the inquiry time node, so that the target equipment can quickly respond to the instruction, and the state detection speed is improved.
And before the display state is an offline state, the target device periodically reports the heartbeat package to the electronic device, and the electronic device stores the heartbeat data in the heartbeat package. For example, in a scenario where the historical data includes historical heartbeat data, the heartbeat attributes may be stored into the historical data.
Referring to fig. 5, step S120 includes the following sub-steps:
and step S121, acquiring historical heartbeat data of the target equipment in a preset time period.
And before the display state of the target equipment is an offline state, the target equipment and the electronic equipment maintain normal communication through the current network, and the target equipment periodically reports the heartbeat package to the electronic equipment. The electronic equipment stores the heartbeat data in the heartbeat packet as historical heartbeat data to a preset storage position.
And step S122, acquiring a historical heartbeat time node in the historical heartbeat data, and determining the interrogation time node of the target device based on the historical heartbeat time node.
The historical heartbeat data comprises a historical heartbeat time node, wherein the historical heartbeat time node refers to the moment or the time period when the communication unit of the target device is in the on state before the display state of the target device is in the off-line state. It will be appreciated that the target device may interact with data at the time of the historic heartbeat time node. And presuming the interrogation time node of the target device according to the historical heartbeat node.
In one embodiment, referring to fig. 6, substep S122 includes the substeps of:
and step S122-1, performing smoothing processing on the historical heartbeat time nodes in the historical heartbeat data to obtain smoothed time nodes.
The historical heartbeat data is stored with a historical heartbeat time node actively reported by the target device, and it can be understood that when the historical heartbeat time node is, a communication unit of the target device is in an on state, and the device can perform data interaction.
The electronic device acquires the historical heartbeat data, alternatively, the electronic device may acquire the historical heartbeat data from a location where the electronic device itself stores the historical heartbeat data, and may also acquire the historical heartbeat data from other devices connected to the electronic device. The historical heartbeat data includes a plurality of historical heartbeat time nodes, as shown in fig. 7, the x-axis represents a number of weeks, for example, x represents monday in 1 time and x represents sunday in 7 times, and it is understood that the period of sending the historical heartbeat time nodes by the target device may be 1 day. The y-axis represents clock display time, e.g., a y-axis of 10 represents 10:00. As shown in FIG. 7, points on the x-y coordinate system characterize historical heartbeat time nodes of the target device, e.g., a plurality of historical interrogation moments of the target device are acquired for consecutive one week, 10:35,10:34,10:37,10:35, respectively.
It should be noted that, the historical heartbeat data includes not only the historical heartbeat time node of the target device, but also the historical heartbeat time nodes of the rest devices except the target device. And the interrogation period is not limited to the above 1 day, but may be 6 hours, one day, one week, etc. depending on the actual system result.
Because the historical heartbeat time nodes of different rounds of the target equipment are different, curves formed by the different historical heartbeat time nodes have fluctuation. When estimating the interrogation time node from the historical heartbeat time node, in order to improve the accuracy of the estimation, a curve smoothing process for the historical heartbeat time node is required. Illustratively, the curve shown in FIG. 8 is obtained after smoothing the curve of the historic heartbeat time node of FIG. 7.
The method of smoothing the curve formed by the historical heartbeat time nodes can calculate the average value of a plurality of historical heartbeat time nodes, and the average value is used as the interrogation time node. An average of a plurality of historical heartbeat time nodes is calculated.
Specifically, first, the total number of minutes represented by the plurality of historical heartbeat time nodes, that is, the sum of the number of minutes corresponding to the hours of the plurality of historical heartbeat time nodes and the number of minutes of the plurality of historical heartbeat time nodes, is calculated as the total number of minutes, and continuing to combine the example in fig. 7, the total number of minutes is 10×60×7+35×5+34+37=4446. The average hour is then calculated, calculated by the total number of minutes and days, and if the calculated average hour is a decimal integer, specifically, the total number of minutes/days/60, the average hour is obtained, for example, 4446/7/60=10, and the average hour obtained is 10. The average minutes, specifically the total minutes divided by the number of days, is recalculated and the remainder is taken for 60, for example, (4446/7)% 60=35. Finally, average hours and average minutes are connected to obtain average interrogation time 10:35. The average value may be taken as the interrogation time node for each day of the next week.
Substep S122-2 determines an interrogation cycle node of the target device based on the smoothed time node.
The electronic device determines an interrogation cycle node of the target device based on the smoothed time node. Illustratively, the electronic device obtains a reading on the y-axis corresponding to a point with an x-axis of 1 as the interrogation cycle node, based on the graph shown in FIG. 8, for Monday.
In another embodiment, referring to fig. 9, the substep S122 includes the following substeps:
And step S122-3, adjusting the historical heartbeat time node in the historical heartbeat data within a preset threshold range to be a first heartbeat time node.
Alternatively, a plurality of historical heartbeat time nodes are acquired, and two different time nodes may be taken as the first heartbeat time node and the second heartbeat time node in any one of the plurality of historical heartbeat time nodes, for example, refer to fig. 10, in which an abscissa is a date and an ordinate is the historical heartbeat time node, and the plurality of historical heartbeat time nodes are acquired according to fig. 10 and are respectively 10:15, 10:17, 10:19, 10:13, 10:15, 10:07, 10:23, 10:15 and 10:11. Two different time nodes are arbitrarily selected from the plurality of historical heartbeat time nodes as a first time node and a second time node, for example, 10:18 is selected as the first time node, and 10:05 is selected as the second time node. Or, among the plurality of historical heartbeat time nodes, two historical heartbeat time nodes with higher current frequency are taken out as two time nodes, for example, the first heartbeat time node may be 10:15, and the second heartbeat time node may be 10:17.
Alternatively, a preset threshold range is set in advance, and for example, the preset threshold range may be set to 6 minutes.
And adding a preset threshold range to each of the plurality of historical heartbeat time nodes to obtain added historical heartbeat time nodes, and processing each historical heartbeat time node into a time node which is closer to the added historical heartbeat time node. For example, a certain historical heartbeat time node is added or subtracted from a preset threshold range to obtain a calculation result, and when the calculation result approaches to the first heartbeat time node compared with the second heartbeat time node, the historical heartbeat time node is adjusted to be the first heartbeat time node.
For example, when 10:18 and 10:07 are selected as the first heartbeat time node and the second heartbeat time node, for the historical heartbeat time node 10:12, the historical heartbeat time node 10:12 is added with 6 minutes to obtain a calculation result of 10:18, and the calculation result 10:18 is closer to the first heartbeat time node 10:18 than the second heartbeat time node 10:07, the historical heartbeat time node 10:12 is processed as 10:18, that is, the historical heartbeat time node is adjusted to be the first heartbeat time node.
And step S122-4, adjusting the historical heartbeat time nodes which are not in the preset threshold range in the historical heartbeat data to be second heartbeat time nodes.
And adding a preset threshold range to each of the plurality of historical heartbeat time nodes to obtain added historical heartbeat time nodes, and processing each historical heartbeat time node into a time node which is closer to the added historical heartbeat time node. For example, a certain historical heartbeat time node is added or subtracted from a preset threshold range to obtain a calculation result, and when the calculation result approaches to a second heartbeat time node compared with the first heartbeat time node, the historical heartbeat time node is adjusted to the second heartbeat time node.
For example, continuing with the above example, for the historical heartbeat time node 10:05, the historical heartbeat time node 10:05 is added with 2 minutes to obtain a calculation result of 10:07, the calculation result 10:07 is closer to the second heartbeat time node 10:07 than the first heartbeat time node 10:18, and the historical heartbeat time node 10:05 is processed to the second heartbeat time node.
The historic heartbeat time node curve in fig. 10 is adjusted to the curve shown in fig. 11 according to substep S122-3 and substep S122-4.
Substep S122-5, determining the interrogation time node of the target device based on the first and second heartbeat time nodes.
The interrogation time node of the target device is determined from the graph based on the first and second heartbeat time nodes obtaining the graph as shown in fig. 11. For example, if the current date is number 1, the ordinate 10:18 corresponding to the point with the abscissa of 1 is obtained from fig. 11 as the node of the interrogation time of the target device.
On the basis of the embodiment of fig. 4, this embodiment provides a method for updating a display state of a device, please refer to fig. 13, which includes the following steps:
step S210, a device with an offline state is displayed in a plurality of devices of the current network as a target device.
Step S220, historical data of the target device is obtained, and the interrogation time node of the target device is determined based on the historical data.
And step S230, when the polling time node of the round is reached, a state confirmation instruction is sent to the target equipment so as to instruct the target equipment to respond to the state confirmation instruction.
And step S240, when receiving response information fed back by the target equipment based on the state confirmation instruction, updating the display state of the target equipment into an on-line state.
The specific description of step S210 to step S240 refer to step S110 to step S140, and are not described herein.
And step S250, synchronizing the updated online state of the target equipment to a corresponding terminal so as to instruct the terminal to update the state of the target equipment to the online state and display the online state, thereby restoring the control of the terminal to the target equipment.
The display states of the electronic device and the target device displayed on the terminal are synchronized, so that after the display state of the target device is updated to the online state on the electronic device, in order to keep the synchronization of the display states of the electronic device and the terminal, the electronic device synchronizes the updated online state of the target device to the corresponding terminal, and the control terminal updates the display state of the target device from the original offline state to the online state and displays the updated online state. For example, the identification information representing the status of the target device may be updated from gray to color. After the display state of the target device is displayed on the terminal in the on-line state, the terminal considers that the target device can be controlled, and thus control of the target device is resumed on the terminal.
According to the device display state updating method provided by the embodiment, after the electronic device updates the display state of the target device from the offline state to the online state, the electronic device synchronizes the online state to the terminal, namely, the updated online state of the target device is synchronized to the corresponding terminal, so that the terminal is instructed to update the display state, and a user can conveniently control the target device through the terminal.
For a scenario in which an electronic device is a cloud and a target device is a wireless switch, the present application proposes a device display status updating method, fig. 14 is a flowchart illustrating a device display status updating method according to another embodiment of the present application, and referring to fig. 14, the device display status updating method includes:
in step S310, the display state of the wireless switch is an off-line state.
The cloud end is in communication connection with the wireless switch, and the cloud end obtains that the display state of the wireless switch is an off-line state. It can be understood that when the wireless switch is in an offline state, the cloud considers that the wireless switch is disconnected from the network, and the cloud cannot control the wireless switch.
Step S320, automatic sending of the identification message is set.
Alternatively, the status confirmation instruction may be an identify message. The automatic sending of the identification message is set, and it can be understood that the cloud terminal predicts the interrogation time node according to the historical interrogation time node, and when the current moment reaches the predicted interrogation time node, the cloud terminal automatically sends the identification message to search for the response of the wireless switch.
Step S330, the cloud judges whether the estimated inquiry time node is reached.
If it is determined that the predicted interrogation time node is reached, the flow returns to step S320, and if it is determined that the predicted interrogation time node is not reached, the flow proceeds to step S340.
Step S340, the cloud sends an identification message to the wireless switch.
Based on the automatic setting in step S320, the cloud automatically sends an identification message to the wireless switch.
Step S350, judging whether the wireless switch is on-line or not.
If the cloud determines that the wireless switch is not on-line, that is, the wireless switch does not respond to the identification message, in order to further determine the display state of the wireless gateway, the flow proceeds to step S360, and if the cloud determines that the wireless switch is on-line and the wireless switch responds to the identification message, the flow proceeds to step S370.
Step S360, judging whether the number of times of triggering the identification message is less than a preset number of times.
If the cloud determines that the number of times of triggering the identification message is less than the preset number of times, it is indicated that the cloud may further continue to trigger the identification message, and the flow returns to step S340. If the cloud determines that the number of times of triggering the identification message is not less than the preset number of times, the number of times of triggering the identification message by the cloud is larger than or equal to the preset number of times, and if the number of times of triggering the identification message by the cloud is enough but the wireless switch response is not received, the flow returns to step S310.
In step S370, the display state of the wireless switch is updated from the off-line state to the on-line state.
The cloud updates the display state of the wireless switch from an off-line state to an on-line state. The cloud end can also control the indication lamp indicating the on-line state to be lighted, so that a user can know the working state of the wireless switch conveniently.
According to the equipment display state updating method provided by the embodiment, the cloud determines that the display state of the wireless switch is an off-line state, and in order to determine whether the off-line state of the wireless switch is a false off-line state, the cloud predicts an inquiry time node of the wireless switch according to historical data, and when the wireless switch is in the inquiry time node, the wireless switch has a function of receiving and transmitting information. Therefore, when the time node is inquired, the cloud automatically triggers the identification message, sends the identification message to the wireless switch, confirms that the wireless switch is in an on-line state capable of communicating when receiving a response of the wireless switch based on the identification message, and updates the display state of the wireless switch to the on-line state so as to accurately and rapidly detect the real state of the wireless switch and also facilitate the control of the wireless switch in the later period.
For a scenario that an electronic device is a cloud end and a target device is a wall socket, the present application provides a device display status updating method, fig. 15 is a schematic flow diagram of a device display status updating method provided by a further embodiment of the present application, referring to fig. 15, where the device display status updating method includes:
In step S410, the display state of the wall socket is an off-line state.
The cloud end is in communication connection with the wall socket, and the cloud end obtains that the display state of the wall socket is an off-line state. It can be appreciated that when the wall socket is offline, the cloud considers the wall socket to be disconnected from the network, and the cloud cannot control the wall socket.
Step S420, setting manual or automatic sending of the identification message.
Alternatively, the status confirmation instruction may be an identify message.
The automatic sending of the identification message can be set, and it can be understood that the cloud end predicts the interrogation time node according to the historical interrogation time node, and when the current moment reaches the predicted interrogation time node, the cloud end automatically sends the identification message to seek the response of the wall socket.
The cloud end predicts the interrogation time node according to the historical interrogation time node, and when the current time reaches the predicted interrogation time node, the cloud end sends prompt information to prompt the user to reach the interrogation time node, and after receiving the prompt information, the user manually sends the identification message, wherein the prompt information.
Step S430, the cloud determines whether the estimated inquiry time node is reached.
If the cloud determines that the estimated inquiry time node is not reached, the flow proceeds to step S440, and if the cloud determines that the estimated inquiry time node is reached, the flow proceeds to step S450.
Step S440, manually triggering the identification message.
And receiving an identification message instruction manually triggered by a user, and manually triggering the identification message. Alternatively, the identify message may also be triggered automatically upon reaching the expected interrogation time node.
And S450, the cloud end sends an identification message to the wall socket.
And the cloud sends an identification message to the wall socket.
Step S460, judging whether the wall socket is on line or not.
If the wall outlet is restored to the on-line state, the flow proceeds to step S480, and if the wall outlet is not restored to the on-line state, the flow proceeds to step S470.
Step S470, judging whether the number of times of triggering the identification message is less than the preset number of times.
If the number of times of triggering the identification message is less than the preset number of times, the cloud end can also continue to trigger the identification message, and the flow returns to step S410. If the number of times of triggering the identification message is not less than the preset number of times, it is indicated that the number of times of triggering the identification message by the cloud is greater than or equal to the preset number of times, and if the number of times of triggering the identification message by the cloud is enough but no response of the wall socket is received, the flow returns to step S450.
In step S480, the display state of the wall socket is updated from the offline state to the online state.
The cloud updates the display state of the wall socket from an offline state to an online state. The cloud end can also control the indication lamp indicating the on-line state to be lighted, so that a user can know the working state of the wireless switch conveniently.
In the method for updating the display state of the device provided by the embodiment, if the cloud determines that the display state of the wall socket is an offline state, in order to determine whether the offline state of the wall socket is a false offline state, the cloud predicts an inquiry time node of the wall socket according to the historical data, and when the inquiry time node is detected, the wall socket has a function of receiving and transmitting information. Therefore, when the time node is inquired, the cloud automatically triggers the identification message, the identification message is sent to the wall socket, when the response of the wall socket based on the identification message is received, the wall socket is confirmed to be in an on-line state capable of communicating, the display state of the wall socket is updated to be in an on-line state, the real state of the wall socket is accurately and rapidly detected, and the control of the wall socket in the later period is facilitated.
It should be understood that, although the steps in the flowcharts of fig. 4-6, 9, 12, 13 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps of fig. 4-6, 9, 12, 13 may comprise a plurality of sub-steps or phases, which are not necessarily performed at the same time, but may be performed at different times, nor does the order of execution of the sub-steps or phases necessarily follow one another, but may be performed alternately or alternately with at least some of the other steps or sub-steps of other steps.
In order to implement the above method embodiments, the present embodiment provides a device display status updating apparatus, fig. 16 is a block diagram of the device display status updating apparatus provided in an embodiment of the present application, and referring to fig. 16, the device display status updating apparatus 100 includes a target device determining module 110, an obtaining module 120, a sending module 130, and a confirming module 140.
A target device determining module 110, configured to take, as a target device, a device whose display status is an offline status among a plurality of devices of a current network;
An acquisition module 120, configured to acquire historical data of the target device, and determine an interrogation time node of the target device based on the historical data;
A sending module 130, configured to send a status confirmation instruction to the target device when the current round of inquiry time node is reached, so as to instruct the target device to respond to the status confirmation instruction;
and the confirmation module 140 is used for updating the display state of the target equipment to be an on-line state when receiving response information fed back by the target equipment based on the state confirmation instruction.
Optionally, the acquisition module 120 includes a data acquisition module and an interrogation time node acquisition module.
The data acquisition module is used for acquiring historical heartbeat data of the target equipment in a preset time period;
The inquiry time node acquisition module is used for acquiring a historical heartbeat time node in the historical heartbeat data and determining the inquiry time node of the target device based on the historical heartbeat time node.
Optionally, the interrogation time node obtaining module comprises a smoothing module and a first interrogation time node obtaining module.
The smoothing module is used for carrying out smoothing processing on the historical heartbeat time nodes in the historical heartbeat data to obtain smoothed time nodes;
And the first interrogation time node acquisition module is used for determining an interrogation period node of the target device based on the smoothed time node.
Optionally, the acquisition module of the interrogation time node comprises a first adjustment module, a second adjustment module and a second acquisition module of the interrogation time node.
The first adjusting module is used for adjusting the historical heartbeat time node in the historical heartbeat data within a preset threshold range to be a first heartbeat time node;
The second adjusting module is used for adjusting the historical heartbeat time nodes which are not in the preset threshold range in the historical heartbeat data to be second heartbeat time nodes;
a second interrogation time node obtaining module for determining the interrogation time node of the target device based on the first and second heartbeat time nodes.
Optionally, the sending module 130 includes an interrogation duration obtaining module and a status confirmation instruction sending module.
The interrogation time length acquisition module is used for acquiring interrogation time length when the current moment meets the interrogation time node;
and the state confirmation instruction sending module is used for continuously sending the state confirmation instruction to the target equipment in the interrogation time length so as to instruct the target equipment to respond to the state confirmation instruction.
Optionally, the device further comprises a determining module and a continuous sending module.
The determining module is used for determining a next round of inquiry time node if response information fed back by the target equipment is not received within a preset duration;
And the continuous sending module is used for sending a state confirmation instruction to the target equipment when the next round of inquiry time nodes are reached, so as to instruct the target equipment to respond to the state confirmation instruction.
Optionally, the device further comprises an updating module.
And the updating module is used for synchronizing the updated online state of the target equipment to a corresponding terminal so as to instruct the terminal to update the state of the target equipment into the online state and display the online state, so that the control of the terminal on the target equipment is restored.
Optionally, the target device is a ZigBee device.
It can be clearly understood by those skilled in the art that the motion detection device provided in the embodiment of the present application can implement each process implemented by the electronic device in the method embodiment of fig. 4 to 15, and for convenience and brevity of description, the specific working process of the above description device and module may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In the several embodiments provided by the present application, the illustrated or discussed coupling or direct coupling or communication connection of the modules to each other may be through some interfaces, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other forms. In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The embodiment of the invention provides electronic equipment, which comprises a processor and a memory, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to realize the method for detecting fingerprint foreign matters, which is provided by the embodiment of the method.
The memory may be used to store software programs and modules that the processor executes to perform various functional applications and data processing by executing the software programs and modules stored in the memory. The memory may mainly include a storage program area which may store an operating system, application programs required for functions, and the like, and a storage data area which may store data created according to the use of the device, and the like. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide access to the memory by the processor.
Fig. 17 is a block diagram of a hardware structure of an electronic device according to an embodiment of the present application. As shown in fig. 17, the electronic device 1200 may be configured or configured differently to provide a relatively large variance, and may include one or more Processors (PU) 1210 (the processor 1210 may include, but is not limited to, a microprocessor MCU or a Processing device such as a programmable logic device FPGA), a memory 1230 for storing data, one or more storage media 1220 (e.g., one or more mass storage devices) for storing applications 1223 or data 1222. Wherein memory 1230 and storage medium 1220 can be transitory or persistent. The program stored on the storage medium 1220 may include one or more modules, each of which may include a series of instruction operations on a server. Still further, the processor 1210 may be configured to communicate with a storage medium 1220 and to execute a series of instruction operations in the storage medium 1220 on the electronic device 1200. The electronic device 1200 may also include one or more power supplies 1260, one or more wired or wireless network interfaces 1250, one or more input/output interfaces 1240, and/or one or more operating systems 1221, such as Windows ServerTM, macOSXTM, unixTM, linuxTM, freeBSDTM, and the like.
The input-output interface 1240 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the electronic device 1200. In one example, the input/output interface 1240 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the input/output interface 1240 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 17 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device 1200 may also include more or fewer components than shown in fig. 17, or have a different configuration than shown in fig. 17.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, the computer program is executed by a processor to implement each process of the embodiment of the device display state updating method, and the same technical effects can be achieved, so that repetition is avoided, and no further description is provided here. The computer readable storage medium is, for example, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a magnetic disk or an optical disk.
Embodiments of the present invention provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-described method embodiments.
In summary, the method, the apparatus, the electronic device and the storage medium for updating the device display state provided by the application have a plurality of devices in the current network, and determine, from the plurality of devices, the device whose display state is in an offline state as a target device, in order to determine whether the device state is the above-mentioned false offline, acquire the polling time node of the target device according to the history data, and when the polling time node of the current round is, the target device has a function of transmitting and receiving information, so that a state confirmation instruction is sent to the target device, and when a response of the target device based on the state confirmation instruction is received, the target device is confirmed to be in an online state capable of performing communication, and the display state of the target device is updated to be in the online state, so that the true state of the target device is accurately detected, and further control of the device is facilitated.
It should be noted that, in this document, 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 one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal (which may be a smart gateway, a mobile phone, a computer, a server, an air conditioner or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the scope of the present application.

Claims (11)

1.一种设备显示状态更新方法,其特征在于,所述方法包括:1. A method for updating a device display status, characterized in that the method comprises: 将当前网络的多个设备中显示状态为离线状态的设备作为目标设备;The device that is displayed as offline among multiple devices in the current network is used as the target device; 获取所述目标设备的历史数据,并基于所述历史数据中的历史心跳时间节点确定所述目标设备的探询时间节点;所述探询时间节点是指所述目标设备能够进行数据交互的时刻或时间段;所述历史心跳时间节点是指所述目标设备的显示状态为离线状态之前,所述目标设备能够进行数据交互的时刻或时间段;Acquire historical data of the target device, and determine the inquiry time node of the target device based on the historical heartbeat time node in the historical data; the inquiry time node refers to the moment or time period when the target device can perform data interaction; the historical heartbeat time node refers to the moment or time period when the target device can perform data interaction before the display state of the target device is offline; 当到达本轮的探询时间节点时,则向所述目标设备发送状态确认指令,以指示所述目标设备对所述状态确认指令进行响应;When the polling time node of this round is reached, a status confirmation instruction is sent to the target device to instruct the target device to respond to the status confirmation instruction; 在接收到所述目标设备基于所述状态确认指令反馈的响应信息时,将所述目标设备的显示状态更新为在线状态。When the response information fed back by the target device based on the status confirmation instruction is received, the display status of the target device is updated to an online status. 2.根据权利要求1所述的方法,其特征在于,所述历史数据包括历史心跳数据,所述获取所述目标设备的历史数据,并基于所述历史数据确定所述目标设备的探询时间节点,包括:2. The method according to claim 1, wherein the historical data includes historical heartbeat data, and the acquiring the historical data of the target device and determining the probe time node of the target device based on the historical data comprises: 获取所述目标设备在预设时间段内的历史心跳数据;Obtaining historical heartbeat data of the target device within a preset time period; 获取所述历史心跳数据中历史心跳时间节点,基于所述历史心跳时间节点确定所述目标设备的所述探询时间节点。Acquire historical heartbeat time nodes in the historical heartbeat data, and determine the inquiry time node of the target device based on the historical heartbeat time nodes. 3.根据权利要求2所述的方法,其特征在于,所述获取所述历史心跳数据中历史心跳时间节点,基于所述历史心跳时间节点确定所述目标设备的所述探询时间节点,包括:3. The method according to claim 2, characterized in that the obtaining of the historical heartbeat time node in the historical heartbeat data and determining the inquiry time node of the target device based on the historical heartbeat time node comprises: 对所述历史心跳数据中的历史心跳时间节点进行平滑处理,得到平滑处理后的时间节点;Smoothing the historical heartbeat time nodes in the historical heartbeat data to obtain smoothed time nodes; 基于所述平滑处理后的时间节点确定所述目标设备的探询周期节点。The polling cycle node of the target device is determined based on the smoothed time node. 4.根据权利要求2所述的方法,其特征在于,所述获取所述历史心跳数据中历史心跳时间节点,基于所述历史心跳时间节点确定所述目标设备的所述探询时间节点,包括:4. The method according to claim 2, characterized in that the obtaining of the historical heartbeat time node in the historical heartbeat data and determining the inquiry time node of the target device based on the historical heartbeat time node comprises: 将所述历史心跳数据中在预设阈值范围内的历史心跳时间节点,调整为第一心跳时间节点;Adjusting the historical heartbeat time node within the preset threshold range in the historical heartbeat data to the first heartbeat time node; 将所述历史心跳数据中未在预设阈值范围内的历史心跳时间节点,调整为第二心跳时间节点;Adjusting the historical heartbeat time nodes in the historical heartbeat data that are not within the preset threshold range to the second heartbeat time nodes; 基于所述第一心跳时间节点和所述第二心跳时间节点,确定所述目标设备的所述探询时间节点。The polling time node of the target device is determined based on the first heartbeat time node and the second heartbeat time node. 5.根据权利要求1所述的方法,其特征在于,所述当到达本轮的探询时间节点时,则向所述目标设备发送状态确认指令,以指示所述目标设备对所述状态确认指令进行响应,包括:5. The method according to claim 1, wherein when the polling time node of this round is reached, a status confirmation instruction is sent to the target device to instruct the target device to respond to the status confirmation instruction, comprising: 当当前时刻满足所述探询时间节点时,获取探询时长;When the current moment meets the query time node, the query duration is obtained; 在所述探询时长内,持续发送所述状态确认指令至所述目标设备,以指示所述目标设备对所述状态确认指令进行响应。During the polling time, the status confirmation instruction is continuously sent to the target device to instruct the target device to respond to the status confirmation instruction. 6.根据权利要求1所述的方法,其特征在于,所述方法还包括:6. The method according to claim 1, characterized in that the method further comprises: 若在预设时长内未接收到所述目标设备反馈的响应信息,则确定下一轮的探询时间节点;If no response information fed back by the target device is received within the preset time period, determining the next round of inquiry time node; 当到达所述下一轮的探询时间节点时,则向所述目标设备发送状态确认指令,以指示所述目标设备对所述状态确认指令进行响应。When the next round of polling time node is reached, a status confirmation instruction is sent to the target device to instruct the target device to respond to the status confirmation instruction. 7.根据权利要求1-6任意一项所述的方法,其特征在于,所述在接收到所述目标设备基于所述状态确认指令反馈的响应信息时,将所述目标设备的显示状态更新为在线状态之后,还包括:7. The method according to any one of claims 1 to 6, characterized in that after receiving the response information fed back by the target device based on the status confirmation instruction, updating the display status of the target device to an online status, it further comprises: 将所述目标设备更新后的在线状态同步至对应的终端,以指示所述终端将所述目标设备的状态更新为在线状态并进行显示,以恢复所述终端对所述目标设备的控制。The updated online status of the target device is synchronized to the corresponding terminal to instruct the terminal to update the status of the target device to the online status and display it, so as to restore the control of the terminal over the target device. 8.根据权利要求7所述的方法,其特征在于,所述目标设备为ZigBee设备。8. The method according to claim 7, characterized in that the target device is a ZigBee device. 9.一种设备显示状态更新装置,其特征在于,所述装置包括:9. A device display status updating device, characterized in that the device comprises: 目标设备确定模块,用于将当前网络的多个设备中显示状态为离线状态的设备作为目标设备;A target device determination module, used to select a device whose status is displayed as offline among multiple devices in the current network as a target device; 获取模块,用于获取所述目标设备的历史数据,并基于所述历史数据中的历史心跳时间节点确定所述目标设备的探询时间节点;所述探询时间节点是指所述目标设备能够进行数据交互的时刻或时间段;所述历史心跳时间节点是指所述目标设备的显示状态为离线状态之前,所述目标设备能够进行数据交互的时刻或时间段;An acquisition module, used to acquire the historical data of the target device, and determine the inquiry time node of the target device based on the historical heartbeat time node in the historical data; the inquiry time node refers to the moment or time period when the target device can perform data interaction; the historical heartbeat time node refers to the moment or time period when the target device can perform data interaction before the display state of the target device is offline; 发送模块,用于当到达本轮的探询时间节点时,则向所述目标设备发送状态确认指令,以指示所述目标设备对所述状态确认指令进行响应;A sending module, configured to send a status confirmation instruction to the target device when the polling time node of this round is reached, so as to instruct the target device to respond to the status confirmation instruction; 确认模块,用于在接收到所述目标设备基于所述状态确认指令反馈的响应信息时,将所述目标设备的显示状态更新为在线状态。The confirmation module is used to update the display status of the target device to an online status when receiving the response information fed back by the target device based on the status confirmation instruction. 10.一种电子设备,其特征在于,包括:10. An electronic device, comprising: 一个或多个处理器;one or more processors; 存储器;Memory; 一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行如权利要求1-8任一项所述的方法。One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1-8. 11.一种计算机可读存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-8任一项所述的方法。11. A computer-readable storage medium, characterized in that program codes are stored in the computer-readable storage medium, and the program codes can be called by a processor to execute the method according to any one of claims 1 to 8.
CN202210358717.8A 2022-04-06 2022-04-06 Device display status updating method, device, electronic device and storage medium Active CN114900846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210358717.8A CN114900846B (en) 2022-04-06 2022-04-06 Device display status updating method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210358717.8A CN114900846B (en) 2022-04-06 2022-04-06 Device display status updating method, device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN114900846A CN114900846A (en) 2022-08-12
CN114900846B true CN114900846B (en) 2025-06-24

Family

ID=82716258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210358717.8A Active CN114900846B (en) 2022-04-06 2022-04-06 Device display status updating method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114900846B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115766529B (en) * 2022-11-08 2024-08-06 武汉众智数字技术有限公司 Online detection method and system for video image acquisition equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519360A (en) * 2019-08-20 2019-11-29 深圳市丰润达科技有限公司 ZigBee equipment state scan method, device and readable storage medium storing program for executing
CN111884875A (en) * 2020-07-17 2020-11-03 青岛易来智能科技股份有限公司 Offline device determination method and device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102843250B (en) * 2011-06-21 2018-01-19 中兴通讯股份有限公司 The adaptive approach and device of a kind of heart beat cycle
CN105323102A (en) * 2014-07-31 2016-02-10 中兴通讯股份有限公司 Link polling method, link polling device and link polling system
CN104954371A (en) * 2015-06-09 2015-09-30 小米科技有限责任公司 Equipment information display method and device
US10342052B1 (en) * 2016-01-18 2019-07-02 Quantenna Communications, Inc. Client steering for a wireless local area network
US10469281B2 (en) * 2016-09-24 2019-11-05 Apple Inc. Generating suggestions for scenes and triggers by resident device
CN107197031A (en) * 2017-06-19 2017-09-22 深圳市盛路物联通讯技术有限公司 A kind of terminal unit status detection method and system applied to Internet of Things
CN108900243B (en) * 2018-06-28 2021-06-04 青岛海信宽带多媒体技术有限公司 Method and device for sampling ONU equipment state information and optical line terminal
CN113449207B (en) * 2020-03-24 2024-09-06 花瓣云科技有限公司 Method, device, server, system and storage medium for positioning electronic equipment
CN111698335B (en) * 2020-06-29 2022-06-24 腾讯科技(深圳)有限公司 Equipment state query method and device and server
CN114285892B (en) * 2021-08-26 2023-10-31 海信视像科技股份有限公司 Wake-up methods for servers, smart devices and smart devices with screens

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519360A (en) * 2019-08-20 2019-11-29 深圳市丰润达科技有限公司 ZigBee equipment state scan method, device and readable storage medium storing program for executing
CN111884875A (en) * 2020-07-17 2020-11-03 青岛易来智能科技股份有限公司 Offline device determination method and device

Also Published As

Publication number Publication date
CN114900846A (en) 2022-08-12

Similar Documents

Publication Publication Date Title
CN109753034B (en) Control method, control device, electronic equipment and storage medium
EP3760010B1 (en) Commissioning mesh network-capable devices within a building automation and control system
CN103982985B (en) Air-conditioner operational factor control method and system
CN110278135B (en) Equipment position searching method, device, gateway and storage medium
CN110167043A (en) Apparatus control method, device, Internet of things system, electronic equipment and storage medium
CN110427220B (en) Configuration method and device of device command, electronic device and storage medium
US20160223997A1 (en) Remote control system, in-home device, relay apparatus, device management method, and program
CN110324217A (en) Control method, device, electronic equipment and the storage medium of equipment triggering
WO2019152223A1 (en) Networked lighting system and method
CN114900846B (en) Device display status updating method, device, electronic device and storage medium
CN114518706B (en) Device control method, device and system, intelligent device and storage medium
CN109981424B (en) Method, device, electronic device and storage medium for processing linkage scheme
CN114253143A (en) Load device control method, device and system, electronic device and storage medium
CN113765758B (en) Method, system and device for transmitting scene linkage control instruction and storage medium
CN113940143B (en) System and method for assisting a user in configuring a lighting system
CN116136775A (en) Method, device, storage medium and electronic equipment for issuing control commands
US9979811B2 (en) Controller, control system, and method for controlling control system
CN114553626B (en) Equipment state query method, query device, electronic equipment and storage medium
CN112543413A (en) Networking method and device for single-live-wire Bluetooth intelligent switch, electronic equipment and medium
CN112769658A (en) Terminal control system, method, device, gateway device and storage medium
CN112309096A (en) WiFi intelligent remote controller pairing and control method
AU2016336004B2 (en) Home automation system device power optimization
CN116132301A (en) Method and device for selecting relay for Mesh network, electronic equipment and storage medium
CN114253141B (en) Load device control method, device and system, electronic device and storage medium
CN113965460B (en) Method, device, intelligent device and storage medium for preventing mis-reset

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