CN114337896A - Equipment state processing method and device, storage medium and electronic device - Google Patents

Equipment state processing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN114337896A
CN114337896A CN202111664400.9A CN202111664400A CN114337896A CN 114337896 A CN114337896 A CN 114337896A CN 202111664400 A CN202111664400 A CN 202111664400A CN 114337896 A CN114337896 A CN 114337896A
Authority
CN
China
Prior art keywords
state
timestamp
equipment
target
target device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111664400.9A
Other languages
Chinese (zh)
Other versions
CN114337896B (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.)
Shanghai Mxchip Information Technology Co Ltd
Original Assignee
Shanghai Mxchip Information 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 Shanghai Mxchip Information Technology Co Ltd filed Critical Shanghai Mxchip Information Technology Co Ltd
Priority to CN202111664400.9A priority Critical patent/CN114337896B/en
Publication of CN114337896A publication Critical patent/CN114337896A/en
Application granted granted Critical
Publication of CN114337896B publication Critical patent/CN114337896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and a device for processing equipment states, a storage medium and an electronic device. Wherein, the method comprises the following steps: responding to a first control operation executed on target equipment, and acquiring a first timestamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first timestamp is a recording timestamp corresponding to the adjustment of the first equipment state; responding to a second device state reported by the target device, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used for adjusting the second device state of the target device; and determining the equipment state updating opportunity of the target equipment based on the first time stamp and the second time stamp. The invention solves the technical problem of low synchronization accuracy of equipment states in the related technology.

Description

Equipment state processing method and device, storage medium and electronic device
Technical Field
The present application relates to the field of wireless communication technologies, and in particular, to a method and an apparatus for processing a device status, a storage medium, and an electronic apparatus.
Background
In the related scheme, in order to realize the synchronization of the equipment state, two modes of real-time state display and delay state display are mainly adopted. However, when two users operate the same device at the same time, the device state synchronization method using the related scheme easily causes a state jump, and thus the device state cannot be accurately displayed.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method and a device for processing equipment states, a storage medium and an electronic device, so as to at least solve the technical problem that the synchronization accuracy of the equipment states in the related technology is low.
According to an embodiment of the present application, a method for processing a device status is provided, including: responding to a first control operation executed on target equipment, and acquiring a first timestamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first timestamp is a recording timestamp corresponding to the adjustment of the first equipment state; responding to a second device state reported by the target device, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used for adjusting the second device state of the target device; and determining the equipment state updating opportunity of the target equipment based on the first time stamp and the second time stamp.
Optionally, the determining the device status update occasion based on the first timestamp and the second timestamp comprises: calculating a first time difference value between the first time stamp and the second time stamp; and determining the equipment state updating time based on the comparison result of the preset time threshold and the first time difference value.
Optionally, the determining the apparatus state update timing based on the comparison result between the preset time threshold and the first time difference includes: and updating the target device state to a second device state when the first time difference value is determined to be greater than or equal to the preset time threshold based on the comparison result.
Optionally, the determining the apparatus state update timing based on the comparison result between the preset time threshold and the first time difference includes: when the first time difference value is smaller than the preset time threshold value based on the comparison result, establishing a delay query task, and determining delay time length by adopting the preset time threshold value and the first time difference value; when the delay duration is over, acquiring a third timestamp, wherein the third timestamp is a current timestamp corresponding to the state of the second device; calculating a second time difference between the first time stamp and the third time stamp; and when the second time difference value is larger than or equal to the preset time threshold value, updating the state of the target equipment to the state of the second equipment.
Optionally, the method for processing the device status further includes: and clearing the first timestamp and the cache space of the terminal equipment, wherein the cache space is used for caching the state of the second equipment.
Optionally, when the target device is a wireless local area network device, obtaining a second device state reported by the target device from the cloud server; and when the target equipment is the Bluetooth mesh network equipment, acquiring the second equipment state reported by the target equipment from the local or acquiring the second equipment state reported by the target equipment from the cloud server through the gateway.
According to an embodiment of the present application, there is also provided an apparatus for processing a device status, including: responding to a first control operation executed on target equipment, and acquiring a first timestamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first timestamp is a recording timestamp corresponding to the adjustment of the first equipment state; responding to a second device state reported by the target device, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used for adjusting the second device state of the target device; and determining the equipment state updating opportunity of the target equipment based on the first time stamp and the second time stamp.
Optionally, the processing module is further configured to: calculating a first time difference value between the first time stamp and the second time stamp; and determining the equipment state updating time based on the comparison result of the preset time threshold and the first time difference value.
Optionally, the processing module is further configured to: and updating the target device state to a second device state when the first time difference value is determined to be greater than or equal to the preset time threshold based on the comparison result.
Optionally, the processing module is further configured to: when the first time difference value is smaller than the preset time threshold value based on the comparison result, establishing a delay query task, and determining delay time length by adopting the preset time threshold value and the first time difference value; when the delay duration is over, acquiring a third timestamp, wherein the third timestamp is a current timestamp corresponding to the state of the second device; calculating a second time difference between the first time stamp and the third time stamp; and when the second time difference value is larger than or equal to the preset time threshold value, updating the state of the target equipment to the state of the second equipment.
Optionally, the processing module is further configured to: and clearing the first timestamp and the cache space of the terminal equipment, wherein the cache space is used for caching the state of the second equipment.
Optionally, the device state processing apparatus further includes: the third obtaining module is used for obtaining the second equipment state reported by the target equipment from the cloud server when the target equipment is the wireless local area network equipment; and when the target equipment is the Bluetooth mesh network equipment, acquiring the second equipment state reported by the target equipment from the local or acquiring the second equipment state reported by the target equipment from the cloud server through the gateway.
According to an embodiment of the present application, there is further provided a non-volatile storage medium having a computer program stored therein, where the computer program is configured to execute the method for processing the device status in any one of the above methods when running.
There is further provided, according to an embodiment of the present application, a processor configured to execute a program, where the program is configured to execute, when running, a method for processing a device state in any one of the above.
According to an embodiment of the present application, there is also provided an electronic apparatus, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the method for processing the device status in any one of the above embodiments.
In the embodiment of the application, a first timestamp is obtained by responding to a first control operation executed on a target device, wherein the first control operation is used for adjusting a first device state of the target device, and the first timestamp is a recording timestamp corresponding to the adjustment of the first device state; responding to a second device state reported by the target device, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used for adjusting the second device state of the target device; the equipment state updating opportunity of the target equipment is determined based on the first time stamp and the second time stamp, and the purpose of timely and accurately updating the equipment state of the target equipment is achieved, so that the technical effect of improving the synchronization accuracy of the equipment state is achieved, and the technical problem that the synchronization accuracy of the equipment state in the related technology is low is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow diagram of a method for processing device status according to one embodiment of the present application;
FIG. 2 is a schematic diagram of a method for processing device states according to one embodiment of the present application;
FIG. 3 is a schematic diagram of yet another method for processing device states according to one embodiment of the present application;
fig. 4 is a block diagram of a device status processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the related scheme, in order to realize the synchronization of the equipment state, two modes of real-time state display and delay state display are mainly adopted.
The real-time state display is realized by the following steps: after a User sets a device state parameter by using an Application (APP), the User needs to wait for a device self response and actively report state information, and after the APP acquires an actual state of the device, the device state in a User Interface (UI) of the APP is refreshed. However, when two users operate simultaneously, the state set by the user B immediately after the user a completes the setting can quickly override the state set by the user a, and the problem of equipment state jump can occur in the client of the user a, which easily causes the user a to mistakenly think of the equipment failure.
The implementation process of the delay state display is as follows: after the user utilized APP to set up equipment state parameter at every turn, APP acquiesces equipment promptly and certainly can respond successfully, and the APP end adopts behind a certain specific time quantum of delay, refreshes the equipment state in the UI interface in the APP. However, when the device state is not successfully set due to some special reasons, the delayed state display mode may cause the state of the APP device to be displayed incorrectly. The correct state is restored only when the device actively reports the current state. The problem of state hopping also occurs when two users are operating simultaneously.
In accordance with one embodiment of the present application, there is provided an embodiment of a method for processing device states, where the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer executable instructions, and where a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that illustrated or described herein.
The method embodiment may be performed in a system for processing device states. The system for processing the state of the equipment comprises: a plurality of terminal devices, wireless local area network devices, bluetooth mesh network devices. The terminal device may also be a Mobile terminal such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID). The wireless local area network device and the Bluetooth mesh network device can be intelligent household devices, such as an intelligent air conditioner, an intelligent washing machine, an intelligent switch, an intelligent lamp bank and the like. The device states of a plurality of wireless local area network devices and Bluetooth mesh network devices can be adjusted through application software of the terminal device.
Based on the method of the embodiment of the application, the terminal device may respond to a first control operation executed on the target device to obtain a first timestamp, where the first control operation is used to adjust a first device state of the target device, and the first timestamp is a recording timestamp corresponding to the adjustment of the first device state; responding to a second device state reported by the target device, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used for adjusting the second device state of the target device; and determining the equipment state updating opportunity of the target equipment based on the first time stamp and the second time stamp.
The target device may be one or more wireless local area network devices or bluetooth mesh devices, and the device state of the target device may be adjusted by a single terminal device, or may be adjusted by a plurality of terminal devices.
The internal main structure of the terminal device will be described as an example, and the internal main structures of the wireless lan device and the bluetooth mesh device will not be described in detail.
The terminal device may include one or more processors (which may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may further include a transmission device, an input/output device, and a display device for a communication function. It will be understood by those skilled in the art that the foregoing structural description is only illustrative and not restrictive of the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than described above, or have a different configuration than described above.
The memory can be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the methods described in the embodiments of the present application, and the processor executes the computer programs stored in the memory so as to execute various functional applications and data processing, i.e., implement the methods described in the embodiments of the present application. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is 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 mobile terminal. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display device may be, for example, a touch screen type Liquid Crystal Display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on a touch-sensitive surface, where the human-machine interaction function optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
Fig. 1 is a flowchart of a method for processing a device status according to an embodiment of the present application, where the flowchart includes the following steps, as shown in fig. 1:
step S11, acquiring a first timestamp in response to a first control operation performed on the target device, where the first control operation is used to adjust a first device state of the target device, and the first timestamp is a recording timestamp corresponding to the adjusted first device state;
the target device comprises a wireless local area network (Wi-Fi) device and a Bluetooth mesh network (mesh) device.
Specifically, the user performs a first control operation on the target device by using the APP in the terminal device to adjust the first device state of the target device, that is, modify the device object model value in the first device state, and in response to the first control operation performed on the target device, the APP of the terminal device may record a recording timestamp corresponding to the adjustment of the first device state, or update the timestamp to the recording timestamp corresponding to the adjustment of the first device state.
Step S12, obtaining a second timestamp in response to a second device status reported by the target device, where the second timestamp is a current timestamp corresponding to the received second device status, the second device status reported by the target device is triggered by a second control operation, and the second control operation is used to adjust the second device status of the target device;
step S13 is to determine a device status update timing of the target device based on the first time stamp and the second time stamp.
Specifically, the implementation process of determining the device status update time of the target device based on the first time stamp and the second time stamp may refer to further description of the embodiment of the present application.
Through the above steps S11 to S13, acquiring a first timestamp by responding to a first control operation performed on the target device, where the first control operation is used to adjust a first device state of the target device, and the first timestamp is a recording timestamp corresponding to the adjustment of the first device state; responding to a second device state reported by the target device, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used for adjusting the second device state of the target device; the equipment state updating opportunity of the target equipment is determined based on the first time stamp and the second time stamp, and the purpose of timely and accurately updating the equipment state of the target equipment is achieved, so that the technical effect of improving the synchronization accuracy of the equipment state is achieved, and the technical problem that the synchronization accuracy of the equipment state in the related technology is low is solved.
The method for processing the device status according to the above embodiment is further described below.
Optionally, in step S13, determining the device status update opportunity based on the first timestamp and the second timestamp includes:
step S131, calculating a first time difference value between the first time stamp and the second time stamp;
step S132, determining an apparatus status update timing based on a comparison result between the preset time threshold and the first time difference.
The preset time threshold is a circulation period of one operation message, for example, the preset time threshold is 3 seconds, and if no new operation is performed after 3 seconds, the current operator is considered to have completed the control operation on the equipment state.
Specifically, based on the comparison result between the preset time threshold and the first time difference, the determination of the device state update timing may refer to further description of the following embodiments, which is not repeated herein.
Based on the above steps S131 to S132, the first time difference between the first time stamp and the second time stamp is calculated, and then based on the comparison result between the preset time threshold and the first time difference, the device state update time can be accurately determined, so that the device state can be accurately synchronized with the actual device state when being displayed.
Optionally, in step S132, determining the apparatus status update timing based on the comparison result between the preset time threshold and the first time difference comprises: and updating the target device state to a second device state when the first time difference value is determined to be greater than or equal to the preset time threshold based on the comparison result.
Optionally, in step S132, determining the apparatus status update timing based on the comparison result between the preset time threshold and the first time difference comprises:
step S1321, when the first time difference value is determined to be smaller than the preset time threshold value based on the comparison result, creating a delay inquiry task, and determining delay time length by adopting the preset time threshold value and the first time difference value;
as an alternative, the delay time duration is determined based on the difference between the first time difference and a preset time threshold.
Step S1322, when the delay duration is over, acquiring a third timestamp, where the third timestamp is a current timestamp corresponding to the state of the second device to be received again;
step S1323, calculating a second time difference between the first time stamp and the third time stamp;
in step S1324, when the second time difference is greater than or equal to the preset time threshold, the target device status is updated to the second device status.
Based on the steps S1321 to S1324, when it is determined that the first time difference is smaller than the preset time threshold based on the comparison result, a delay query task is created, the delay duration is determined by using the preset time threshold and the first time difference, when the delay duration is over, the third time stamp is obtained, a second time difference between the first time stamp and the third time stamp is further calculated, and finally, when the second time difference is greater than or equal to the preset time threshold, the state of the target device is updated to the state of the second device, so that the device state update time can be accurately determined. By setting the delay task, the accurate synchronization of the equipment state and the actual equipment state can be further ensured when the equipment state is displayed.
Optionally, the method for processing the device status further includes: and clearing the first timestamp and the cache space of the terminal equipment, wherein the cache space is used for caching the state of the second equipment.
Based on the optional embodiment, the first timestamp and the cache space of the terminal device are cleared in time, so that the cache space can be allocated in time for the device state to be updated, and the cache space resource is saved.
Optionally, when the target device is a wireless local area network device, obtaining a second device state reported by the target device from the cloud server; and when the target equipment is the Bluetooth mesh network equipment, acquiring the second equipment state reported by the target equipment from the local or acquiring the second equipment state reported by the target equipment from the cloud server through the gateway.
For example, when the target device is a Wi-Fi device, the target device reports the second device status to the cloud server, and forwards the second device status to the terminal device via the cloud server.
For another example, when the target device is a bluetooth mesh device and there is no gateway, the terminal device sends an execution command to the target device through the bluetooth component, and the target device directly reports the state of the second device to the terminal device through the bluetooth component.
For another example, when the target device is a bluetooth mesh device and a gateway exists, the target device may directly report the state of the second device to the terminal device through the bluetooth component, or may report the state of the second device to the terminal device through the cloud server.
Fig. 2 is a schematic diagram of a method for processing a device state according to an embodiment of the present application, in which there is only one user setting a parameter of a target device in an APP of a terminal device to perform a first control operation on the target device. As shown in fig. 2, the process includes the steps of:
step S201, adjusting an equipment object model value of target equipment in a first equipment state;
step S202, recording or updating a corresponding first time stamp when the state of the first device of the target device is adjusted;
step S203, sending an execution command of a first control operation to the target equipment;
optionally, when the target device is a Wi-Fi device, an execution command of the first control operation is sent to the target device via the cloud server.
Optionally, when the target device is a bluetooth mesh device, the execution command of the first control operation is sent to the target device via the cloud server, or the execution command of the first control operation is sent to the target device directly by using the bluetooth component.
Step S204, judging whether the target equipment successfully executes the first control operation;
step S205, when it is determined that the target device does not successfully execute the first control operation, clearing the first timestamp and the cache space of the terminal device;
and step S206, when the target device is determined to successfully execute the first control operation, updating the state of the target device to the state of the second device.
Specifically, the method for processing the device status in the above embodiment is described by taking the target device as an intelligent air conditioner as an example. The intelligent air conditioner is a Bluetooth mesh device, the current working state is a dormant state, and the device object model value of the intelligent air conditioner in the dormant state is adjusted through a mobile phone APP so as to adjust the working state of the intelligent air conditioner to be a refrigerating state; recording a first timestamp when the sleep state of the intelligent air conditioner is adjusted, and directly sending an execution command of a first control operation to the intelligent air conditioner by using a mobile phone Bluetooth assembly; judging whether the intelligent air conditioner successfully executes the first control operation; clearing the first timestamp and the cache space of the mobile phone when the successful execution is determined; and when the successful execution is determined, updating the state of the intelligent air conditioner to a refrigeration state on a display interface of the mobile phone.
Based on the above steps S201 to S206, when a single user performs a control operation on a target device, the device state update time of the target device can be determined accurately in time, and it is ensured that the device state of the target device can be updated in time.
Fig. 3 is a schematic diagram of another device state processing method according to an embodiment of the present application, in which at least two users set parameters of a target device in an APP of a terminal device to perform a first control operation and a second control operation on the target device, respectively. As shown in fig. 3, the process includes the steps of:
step S301, responding to a second device state reported by the target device, and acquiring a second timestamp;
step S302, adding or updating a second device state and a second timestamp to a cache space;
step S303, judging whether a first time stamp exists when a first control operation is executed on the target device;
step S304, when the first time stamp is determined to exist, calculating a first time difference value between the first time stamp and the second time stamp;
step S305, judging whether the first time difference value is smaller than a preset time threshold value;
step S306, when the first time difference value is smaller than the preset time threshold value, a delay inquiry task is established, and delay time is determined by adopting the preset time threshold value and the first time difference value;
step S307, when the delay duration is over, taking a third timestamp obtained after delay as a second timestamp, and repeatedly executing the step S303;
step S308, when the first timestamp does not exist, or when the first time difference value is larger than or equal to the preset time threshold value, the state of the target device is updated to be the state of the second device;
step S309, the first time stamp and the buffer space of the terminal device are cleared.
Specifically, the method for processing the device state in the above embodiment is described by taking the target device as an intelligent lamp group. The current operating condition of intelligence banks is the off-state, and first operator sets up the operating condition of intelligence banks into the on-state through cell-phone APP, records the first time stamp that corresponds. In a message circulation period of 3 seconds, the second operator can set the working state of the intelligent lamp group to be in an open state through the mobile phone APP. When the working state of the intelligent lamp bank is set to be the closed state by the first operator through the mobile phone APP, the open state reported by the target device and set by the second operator is received, the corresponding second timestamp is recorded, and the closed state of the intelligent lamp bank is stored in the cache space. And calculating that a first time difference value between the first time stamp and the second time stamp is less than 3 seconds, creating a delay inquiry task, and determining delay time by using a preset time threshold value and the first time difference value. And when the delay time is over, the first operator updates the working state of the intelligent lamp group in the mobile phone APP by using the closing state in the cache space. At this time, since the off state of the first operator operation has also been reported to the APP, the buffered device switch state has also been updated to the off state. When the first operator updates the working state of the intelligent lamp bank in the APP through the cache, the situation of state jump can be avoided.
Based on the above steps S301 to S309, when a plurality of users perform control operations on the target device, the device state update timing of the target device can be determined accurately in time, and it is ensured that the device state of the target device can be updated in time.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
In this embodiment, a device for processing a device status is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a device state processing apparatus according to an embodiment of the present application, and as shown in fig. 4, the device state processing apparatus 400 includes:
a first obtaining module 401, configured to obtain a first timestamp in response to a first control operation performed on a target device, where the first control operation is used to adjust a first device state of the target device, and the first timestamp is a recording timestamp corresponding to the adjustment of the first device state;
a second obtaining module 402, configured to obtain a second timestamp in response to a second device state reported by the target device, where the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used to adjust the second device state of the target device;
the processing module 403 is configured to determine a device status update timing of the target device based on the first timestamp and the second timestamp.
Optionally, the processing module 403 is further configured to: calculating a first time difference value between the first time stamp and the second time stamp; and determining the equipment state updating time based on the comparison result of the preset time threshold and the first time difference value.
Optionally, the processing module 403 is further configured to: and updating the target device state to a second device state when the first time difference value is determined to be greater than or equal to the preset time threshold based on the comparison result.
Optionally, the processing module 403 is further configured to: when the first time difference value is smaller than the preset time threshold value based on the comparison result, establishing a delay query task, and determining delay time length by adopting the preset time threshold value and the first time difference value; when the delay duration is over, acquiring a third timestamp, wherein the third timestamp is a current timestamp corresponding to the state of the second device; calculating a second time difference between the first time stamp and the third time stamp; and when the second time difference value is larger than or equal to the preset time threshold value, updating the state of the target equipment to the state of the second equipment.
Optionally, the processing module 403 is further configured to: and clearing the first timestamp and the cache space of the terminal equipment, wherein the cache space is used for caching the state of the second equipment.
Optionally, the apparatus 400 for processing device status further includes: a third obtaining module 404, configured to obtain, when the target device is a wireless local area network device, a second device state reported by the target device from the cloud server; and when the target equipment is the Bluetooth mesh network equipment, acquiring the second equipment state reported by the target equipment from the local or acquiring the second equipment state reported by the target equipment from the cloud server through the gateway.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present application further provide a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned nonvolatile storage medium may be configured to store a computer program for executing the steps of:
s1, responding to a first control operation executed on a target device, and acquiring a first timestamp, wherein the first control operation is used for adjusting a first device state of the target device, and the first timestamp is a recording timestamp corresponding to the first device state adjustment;
s2, acquiring a second timestamp in response to a second device status reported by the target device, where the second timestamp is a current timestamp corresponding to a received second device status, the second device status reported by the target device is triggered by a second control operation, and the second control operation is used to adjust the second device status of the target device;
s3, determining a device status update timing of the target device based on the first timestamp and the second timestamp.
Optionally, in this embodiment, the nonvolatile storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present application further provide an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, responding to a first control operation executed on a target device, and acquiring a first timestamp, wherein the first control operation is used for adjusting a first device state of the target device, and the first timestamp is a recording timestamp corresponding to the first device state adjustment;
s2, acquiring a second timestamp in response to a second device status reported by the target device, where the second timestamp is a current timestamp corresponding to a received second device status, the second device status reported by the target device is triggered by a second control operation, and the second control operation is used to adjust the second device status of the target device;
s3, determining a device status update timing of the target device based on the first timestamp and the second timestamp.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for processing a device state, comprising:
responding to a first control operation executed on a target device, and acquiring a first timestamp, wherein the first control operation is used for adjusting a first device state of the target device, and the first timestamp is a recording timestamp corresponding to the adjustment of the first device state;
responding to a second device state reported by the target device, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used for adjusting the second device state of the target device;
determining a device status update opportunity of the target device based on the first timestamp and the second timestamp.
2. The method of processing the device status according to claim 1, wherein determining the device status update opportunity based on the first timestamp and the second timestamp comprises:
calculating a first time difference value between the first time stamp and the second time stamp;
and determining the equipment state updating time based on the comparison result of a preset time threshold and the first time difference value.
3. The method for processing the equipment status according to claim 2, wherein the determining the equipment status update opportunity based on the comparison result between a preset time threshold and the first time difference comprises:
updating the target device state to the second device state when it is determined that the first time difference value is greater than or equal to the preset time threshold based on the comparison result.
4. The method for processing the equipment status according to claim 2, wherein the determining the equipment status update opportunity based on the comparison result between a preset time threshold and the first time difference comprises:
when the first time difference value is determined to be smaller than the preset time threshold value based on the comparison result, a delay inquiry task is established, and delay time is determined by adopting the preset time threshold value and the first time difference value;
when the delay duration is over, acquiring a third timestamp, wherein the third timestamp is a current timestamp corresponding to the state of the second device;
calculating a second time difference between the first time stamp and the third time stamp;
and when the second time difference value is greater than or equal to the preset time threshold value, updating the target equipment state to the second equipment state.
5. The method for processing the device status according to claim 1, further comprising:
and clearing the first timestamp and a cache space of the terminal equipment, wherein the cache space is used for caching the state of the second equipment.
6. The device status processing method according to claim 1, wherein when the target device is a wireless local area network device, the second device status reported by the target device is obtained from a cloud server; and when the target device is a bluetooth mesh network device, acquiring the second device state reported by the target device from a local place or acquiring the second device state reported by the target device from the cloud server through a gateway.
7. An apparatus for processing device status, comprising:
the device comprises a first obtaining module, a first obtaining module and a second obtaining module, wherein the first obtaining module is used for responding to a first control operation executed on a target device and obtaining a first time stamp, the first control operation is used for adjusting a first device state of the target device, and the first time stamp is a recording time stamp corresponding to the adjustment of the first device state;
a second obtaining module, configured to obtain a second timestamp in response to a second device state reported by the target device, where the second timestamp is a current timestamp corresponding to the second device state, the second device state reported by the target device is triggered by a second control operation, and the second control operation is used to adjust the second device state of the target device;
and the processing module is used for determining the equipment state updating opportunity of the target equipment based on the first time stamp and the second time stamp.
8. A non-volatile storage medium, characterized in that a computer program is stored in the storage medium, wherein the computer program is arranged to execute the method of processing the device status as claimed in any one of claims 1 to 6 when running.
9. A processor for running a program, wherein the program is configured to perform the method for processing the device status as claimed in any one of claims 1 to 6 when running.
10. An electronic apparatus comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the method of processing the device state as claimed in any one of claims 1 to 6.
CN202111664400.9A 2021-12-30 2021-12-30 Equipment state processing method and device, storage medium and electronic device Active CN114337896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111664400.9A CN114337896B (en) 2021-12-30 2021-12-30 Equipment state processing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111664400.9A CN114337896B (en) 2021-12-30 2021-12-30 Equipment state processing method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN114337896A true CN114337896A (en) 2022-04-12
CN114337896B CN114337896B (en) 2024-04-23

Family

ID=81020735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111664400.9A Active CN114337896B (en) 2021-12-30 2021-12-30 Equipment state processing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114337896B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117891615A (en) * 2024-03-15 2024-04-16 杭州涂鸦信息技术有限公司 Method and device for determining equipment state

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120019400A1 (en) * 2010-07-23 2012-01-26 Patel Mukesh K Multi-function remote control device
CN105929983A (en) * 2016-04-22 2016-09-07 北京奇艺世纪科技有限公司 Operation method and device of mobile equipment
CN106302055A (en) * 2016-09-26 2017-01-04 Tcl集团股份有限公司 The synchronous updating method of a kind of smart machine state and system
US20180001184A1 (en) * 2016-05-02 2018-01-04 Bao Tran Smart device
CN108650535A (en) * 2018-05-11 2018-10-12 青岛海信宽带多媒体技术有限公司 A kind of smart machine and its control method
CN108828966A (en) * 2018-06-15 2018-11-16 青岛海信智慧家居系统股份有限公司 A kind of method and device that intelligent domestic devices in system information is shown
CN109631256A (en) * 2018-12-12 2019-04-16 珠海格力电器股份有限公司 Exchange method, system and the equipment of equipment state of a control feedback
US10296128B1 (en) * 2015-09-04 2019-05-21 Google Llc Multi-state press and hold user interface
CN110545222A (en) * 2019-08-23 2019-12-06 珠海格力电器股份有限公司 Method and device for controlling equipment, computing equipment and storage medium
CN110805991A (en) * 2019-10-30 2020-02-18 青岛海信智慧家居系统股份有限公司 Method and device for synchronizing states of control terminal and central air conditioner
CN110830579A (en) * 2019-11-12 2020-02-21 上海庆科信息技术有限公司 Equipment state display method, system, device and computer storage medium
CN111143077A (en) * 2019-12-31 2020-05-12 青岛海尔科技有限公司 Intelligent household appliance instruction conflict processing method and device, storage medium and electronic device
CN113225698A (en) * 2021-04-16 2021-08-06 深圳市晨北科技有限公司 State information notification method, related device, system and medium
CN113242105A (en) * 2021-05-11 2021-08-10 广州文远知行科技有限公司 Clock control method, device, equipment and storage medium for mobile equipment
CN113282257A (en) * 2019-11-30 2021-08-20 北京城市网邻信息技术有限公司 Method, terminal device, device and readable storage medium for synchronous display
CN113473194A (en) * 2020-05-09 2021-10-01 海信集团有限公司 Intelligent device and response method

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120019400A1 (en) * 2010-07-23 2012-01-26 Patel Mukesh K Multi-function remote control device
US10296128B1 (en) * 2015-09-04 2019-05-21 Google Llc Multi-state press and hold user interface
CN105929983A (en) * 2016-04-22 2016-09-07 北京奇艺世纪科技有限公司 Operation method and device of mobile equipment
US20180001184A1 (en) * 2016-05-02 2018-01-04 Bao Tran Smart device
CN106302055A (en) * 2016-09-26 2017-01-04 Tcl集团股份有限公司 The synchronous updating method of a kind of smart machine state and system
CN108650535A (en) * 2018-05-11 2018-10-12 青岛海信宽带多媒体技术有限公司 A kind of smart machine and its control method
CN108828966A (en) * 2018-06-15 2018-11-16 青岛海信智慧家居系统股份有限公司 A kind of method and device that intelligent domestic devices in system information is shown
CN109631256A (en) * 2018-12-12 2019-04-16 珠海格力电器股份有限公司 Exchange method, system and the equipment of equipment state of a control feedback
CN110545222A (en) * 2019-08-23 2019-12-06 珠海格力电器股份有限公司 Method and device for controlling equipment, computing equipment and storage medium
CN110805991A (en) * 2019-10-30 2020-02-18 青岛海信智慧家居系统股份有限公司 Method and device for synchronizing states of control terminal and central air conditioner
CN110830579A (en) * 2019-11-12 2020-02-21 上海庆科信息技术有限公司 Equipment state display method, system, device and computer storage medium
CN113282257A (en) * 2019-11-30 2021-08-20 北京城市网邻信息技术有限公司 Method, terminal device, device and readable storage medium for synchronous display
CN111143077A (en) * 2019-12-31 2020-05-12 青岛海尔科技有限公司 Intelligent household appliance instruction conflict processing method and device, storage medium and electronic device
CN113473194A (en) * 2020-05-09 2021-10-01 海信集团有限公司 Intelligent device and response method
CN113225698A (en) * 2021-04-16 2021-08-06 深圳市晨北科技有限公司 State information notification method, related device, system and medium
CN113242105A (en) * 2021-05-11 2021-08-10 广州文远知行科技有限公司 Clock control method, device, equipment and storage medium for mobile equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
M. FAISHAL RIZA: ""Control Home Devices with Voice Commands via a Smartphone"", 《2019 FOURTH INTERNATIONAL CONFERENCE ON INFORMATICS AND COMPUTING (ICIC)》, 10 February 2020 (2020-02-10) *
罗娟;贾亚龙;孔瀚文;: "基于Android的个性化智能家居控制终端", 工业控制计算机, no. 03, 25 March 2018 (2018-03-25) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117891615A (en) * 2024-03-15 2024-04-16 杭州涂鸦信息技术有限公司 Method and device for determining equipment state

Also Published As

Publication number Publication date
CN114337896B (en) 2024-04-23

Similar Documents

Publication Publication Date Title
CN110417859B (en) Equipment control method, device, system, intelligent gateway and storage medium
US11221743B2 (en) Information processing method, terminal, server, and computer storage medium
WO2016078254A1 (en) Display method and terminal, storage medium
TW201805801A (en) Method and device for displaying application information
CN106357808B (en) A kind of method of data synchronization and device
WO2016058322A1 (en) Smart power-saving method and device, and terminal
CN104484378A (en) Method, device and terminal for pushing notification messages
CN114007235A (en) Scene rule writing method and device, storage medium, processor and electronic equipment
CN109343902A (en) Operation method, device, terminal and the storage medium of audio processing components
US11507244B2 (en) Window adjustment method, window adjustment device and mobile terminal
CN107479700B (en) Black screen gesture control method and device, storage medium and mobile terminal
CN106302099B (en) Session processing method and device in instant messaging
CN107748697B (en) Application closing method and device, storage medium and electronic equipment
CN114337896A (en) Equipment state processing method and device, storage medium and electronic device
CN113051493A (en) Application program display method and device, storage medium and terminal
CN110989820A (en) Method and device for controlling power consumption of processor, processor and electronic device
CN105471953A (en) Client-side page dynamic display method, device and system
CN107402626A (en) Using cycle synchronisation management method, device, storage medium and electronic equipment
CN105682115A (en) Information processing method and electronic device
CN111464404A (en) Information processing method, device, storage medium, processor and system
CN108551429A (en) Flow control methods, electronic device and the computer readable storage medium of application program
CN111090362B (en) Scene processing method and device and electronic equipment
CN109766347A (en) A kind of data-updating method, device, system, computer equipment and storage medium
CN114339625B (en) Equipment linkage control method and device, storage medium, processor and electronic device
CN113965915A (en) Data processing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant