CN114337896B - 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
CN114337896B
CN114337896B CN202111664400.9A CN202111664400A CN114337896B CN 114337896 B CN114337896 B CN 114337896B CN 202111664400 A CN202111664400 A CN 202111664400A CN 114337896 B CN114337896 B CN 114337896B
Authority
CN
China
Prior art keywords
state
equipment
timestamp
target
control operation
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
CN202111664400.9A
Other languages
Chinese (zh)
Other versions
CN114337896A (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

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 time stamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first time stamp is a record time stamp corresponding to the adjusted first equipment state; responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment; and determining the device state update occasion of the target device based on the first timestamp and the second timestamp. The invention solves the technical problem of low synchronization accuracy of the equipment state 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 communications technologies, and in particular, to a method and an apparatus for processing a device state, a storage medium, and an electronic device.
Background
In the related scheme, in order to realize the synchronization of the device states, 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 state transitions, so that the device state cannot be accurately displayed.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides a processing method and device for equipment states, a storage medium and an electronic device, which are used for at least solving the technical problem of low synchronization accuracy of equipment states in the related technology.
According to one embodiment of the present application, there is provided a method for processing a device state, including: responding to a first control operation executed on target equipment, and acquiring a first time stamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first time stamp is a record time stamp corresponding to the adjusted first equipment state; responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment; and determining the device state update occasion of the target device based on the first timestamp and the second timestamp.
Optionally, determining the device state update occasion based on the first timestamp and the second timestamp comprises: calculating a first time difference between the first time stamp and the second time stamp; and determining the equipment state updating time based on a comparison result of the preset time threshold value and the first time difference value.
Optionally, determining the device state update opportunity based on a comparison of the preset time threshold and the first time difference value includes: and updating the target device state to the second device state when the first time difference value is determined to be greater than or equal to the preset time threshold value based on the comparison result.
Optionally, determining the device state update opportunity based on a comparison of the preset time threshold and the first time difference value includes: when the first time difference value is smaller than the preset time threshold value based on the comparison result, creating a delay inquiry task, and determining delay time by adopting the preset time threshold value and the first time difference value; when the delay time is over, a third time stamp is obtained, wherein the third time stamp is the current time stamp corresponding to the state of the second equipment received again; 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 into the second equipment state.
Optionally, the method for processing the device state further includes: and clearing the first timestamp and a buffer space of the terminal equipment, wherein the buffer space is used for buffering the second equipment state.
Optionally, when the target device is a wireless local area network device, acquiring a second device state reported by the target device from the cloud server; and when the target device is a Bluetooth mesh network device, acquiring the second device state reported by the target device from the local or acquiring the second device state reported by the target device from a cloud server through a gateway.
According to one embodiment of the present application, there is also provided an apparatus for processing a device state, including: responding to a first control operation executed on target equipment, and acquiring a first time stamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first time stamp is a record time stamp corresponding to the adjusted first equipment state; responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment; and determining the device state update occasion of the target device based on the first timestamp and the second timestamp.
Optionally, the processing module is further configured to: calculating a first time difference between the first time stamp and the second time stamp; and determining the equipment state updating time based on a comparison result of the preset time threshold value and the first time difference value.
Optionally, the processing module is further configured to: and updating the target device state to the second device state when the first time difference value is determined to be greater than or equal to the preset time threshold value 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, creating a delay inquiry task, and determining delay time by adopting the preset time threshold value and the first time difference value; when the delay time is over, a third time stamp is obtained, wherein the third time stamp is the current time stamp corresponding to the state of the second equipment received again; 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 into the second equipment state.
Optionally, the processing module is further configured to: and clearing the first timestamp and a buffer space of the terminal equipment, wherein the buffer space is used for buffering the second equipment state.
Optionally, the processing apparatus of the device state further includes: the third acquisition module is used for acquiring a second equipment state reported by the target equipment from the cloud server when the target equipment is wireless local area network equipment; and when the target device is a Bluetooth mesh network device, acquiring the second device state reported by the target device from the local or acquiring the second device state reported by the target device from a cloud server through a gateway.
According to an embodiment of the present application, there is also provided a nonvolatile storage medium in which a computer program is stored, wherein the computer program is configured to execute the processing method of the device state in any one of the above-mentioned aspects when running.
According to an embodiment of the present application, there is further provided a processor for running a program, wherein the program is configured to execute the processing method of the device state in any one of the above-mentioned claims at run time.
According to one embodiment of the present application, there is also provided an electronic apparatus including a memory, a processor, the memory storing a computer program, the processor being configured to run the computer program to perform a method of processing a device state in any of the above.
In the embodiment of the application, a first timestamp is obtained by responding to a first control operation executed on target equipment, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first timestamp is a record timestamp corresponding to the adjusted first equipment state; responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment; based on the first timestamp and the second timestamp, the device state updating time of the target device is determined, and the purpose of timely and accurately updating the device state of the target device is achieved, so that the technical effect of improving the synchronization accuracy of the device state is achieved, and the technical problem of low synchronization accuracy of the device state in the related technology 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 specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a method of handling device status according to one embodiment of the application;
FIG. 2 is a schematic diagram of a method of handling device status according to one embodiment of the application;
FIG. 3 is a schematic diagram of a method of processing a device state according to yet another embodiment of the present application;
fig. 4 is a block diagram of a device state processing apparatus according to one embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise 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 device states, 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 each time the User sets the device state parameter by using Application (APP), the User needs to wait for the response of the device itself and actively report the state information, and after the APP obtains the actual state of the device, the User Interface (UI) of the APP is refreshed. However, when two users operate simultaneously, the state set by the user B immediately after the setting of the user a is completed can rapidly cover 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 misuse as equipment failure.
The realization process of the delay state display is as follows: after the user sets the equipment state parameters by using the APP, namely the default equipment, can certainly respond successfully, and after the APP end adopts a certain specific time period, the equipment state in the UI interface in the APP is refreshed. However, when the device is not successfully set for some special reasons, the delay state display mode can cause incorrect display of the device state at the APP end. Only when the device actively reports the current state, the correct state is restored. When two users operate simultaneously, the problem of state jump also occurs.
According to one embodiment of the present application, there is provided an embodiment of a method for processing a device state, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The method embodiment may be performed in a processing system in a device state. The processing system of the equipment state comprises: a plurality of terminal devices, a wireless local area network device, a bluetooth mesh network device. The terminal device may also be a Mobile terminal such as a smart phone (e.g. Android phone, iOS phone, etc.), a tablet computer, a palm computer, and a Mobile internet device (Mobile INTERNET DEVICES, MID). The wireless local area network device and the Bluetooth mesh network device can be intelligent home devices, such as intelligent air conditioners, intelligent washing machines, intelligent switches, intelligent lamp sets and the like. The application software of the terminal device can adjust the device states of a plurality of wireless local area network devices and Bluetooth mesh network devices.
Based on the method of the embodiment of the application, the terminal equipment can respond to the first control operation executed on the target equipment to acquire the first timestamp, wherein the first control operation is used for adjusting the first equipment state of the target equipment, and the first timestamp is a record timestamp corresponding to the adjusted first equipment state; responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment; and determining the device state update occasion of the target device based on the first timestamp and the second timestamp.
The target device may be one or more wireless local area network devices or bluetooth mesh network devices, and the device state of the target device may be adjusted by a single terminal device, or the device states of the target device may be simultaneously adjusted by multiple 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 Processor (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 appreciated by those of ordinary skill in the art that the foregoing structural descriptions are merely illustrative and are not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than the above structural description, or have a different configuration than the above structural description.
The memory may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to the method described in the embodiments of the present application, and the processor executes the computer program stored in the memory, thereby performing various functional applications and data processing, that is, implementing the method 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 remotely located with respect to the processor, the remote memory being connectable 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 for receiving or transmitting 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 (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through the base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
Display devices may be, for example, touch screen type Liquid Crystal Displays (LCDs) and touch displays (also referred to as "touch screens" or "touch display screens"). 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), and the user may interact with the GUI by touching finger contacts and/or gestures on the touch-sensitive surface, where the man-machine interaction functions optionally include the following interactions: executable instructions for performing the above-described human-machine interaction functions, such as creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving electronic mail, talking interfaces, playing digital video, playing digital music, and/or web browsing, are configured/stored in a computer program product or readable storage medium executable by one or more processors.
Fig. 1 is a flowchart of a method for processing a device status according to one embodiment of the present application, as shown in fig. 1, the flowchart includes the following steps:
step S11, a first time stamp is obtained in response to a first control operation executed on the target equipment, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first time stamp is a record time stamp corresponding to the adjusted first equipment state;
the target device includes a wireless local area network (Wi-Fi) device and a bluetooth mesh device.
Specifically, the user executes a first control operation on the target device by using the APP in the terminal device to adjust a first device state of the target device, that is, modify a device object model value in the first device state, and in response to the first control operation executed on the target device, the APP of the terminal device may record a record timestamp corresponding to the adjusted first device state, or update the timestamp to a record timestamp corresponding to the adjusted first device state.
Step S12, a second timestamp is obtained in response to a second equipment state reported by the target equipment, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment;
Step S13, determining the device state update time of the target device based on the first timestamp and the second timestamp.
Specifically, the implementation process of determining the device status update opportunity of the target device based on the first timestamp and the second timestamp may refer to further description of the embodiments of the present application.
Through the steps S11 to S13, a first timestamp is obtained 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 record timestamp corresponding to the adjusted first device state; responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment; based on the first timestamp and the second timestamp, the device state updating time of the target device is determined, and the purpose of timely and accurately updating the device state of the target device is achieved, so that the technical effect of improving the synchronization accuracy of the device state is achieved, and the technical problem of low synchronization accuracy of the device state in the related technology is solved.
The method for processing the status of the apparatus described in the above embodiment is further described below.
Optionally, in step S13, determining the device state update occasion based on the first timestamp and the second timestamp includes:
step S131, calculating a first time difference between the first time stamp and the second time stamp;
step S132, determining the device status update opportunity based on the comparison result of the preset time threshold and the first time difference value.
The preset time threshold is a circulation period of an operation message, for example, the preset time threshold is 3 seconds, and no new operation is performed beyond 3 seconds, so that the current operator can be considered to complete the control operation on the equipment state.
Specifically, the determining the device state update opportunity based on the comparison result between the preset time threshold and the first time difference may be further described with reference to the following embodiments, which will not be described in detail.
Based on the steps S131 to S132, the device state update timing can be accurately determined by calculating the first time difference between the first time stamp and the second time stamp and further based on the comparison result of the preset time threshold and the first time difference, so as to ensure that the device state can be accurately synchronized with the actual device state when displayed.
Optionally, in step S132, determining the device state update opportunity based on a comparison result of the preset time threshold and the first time difference value includes: and updating the target device state to the second device state when the first time difference value is determined to be greater than or equal to the preset time threshold value based on the comparison result.
Optionally, in step S132, determining the device state update opportunity based on a comparison result of the preset time threshold and the first time difference value includes:
Step S1321, when the first time difference value is 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 embodiment, the delay time is determined based on a difference between the first time difference and a preset time threshold.
Step S1322, when the delay time is over, acquiring a third timestamp, wherein the third timestamp is the current timestamp corresponding to the state of the second device 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 value is greater than or equal to the preset time threshold, the target device state is updated to the second device state.
Based on the above steps S1321 to S1324, when the first time difference value is determined to be smaller than the preset time threshold based on the comparison result, a delay inquiry task is created, the delay duration is determined by adopting the preset time threshold and the first time difference value, when the delay duration is over, a third time stamp is obtained, and further, a second time difference value between the first time stamp and the third time stamp is calculated, and finally, when the second time difference value is greater than or equal to the preset time threshold, the target device state is updated to the second device state, so that the device state updating time can be accurately determined. By setting the time delay task, the equipment state can be further ensured to be accurately synchronous with the actual equipment state during display.
Optionally, the method for processing the device state further includes: and clearing the first timestamp and a buffer space of the terminal equipment, wherein the buffer space is used for buffering the second equipment state.
Based on the above optional embodiment, by timely clearing the first timestamp and the buffer space of the terminal device, the buffer space can be timely allocated for the device state to be updated, and the buffer space resource is saved.
Optionally, when the target device is a wireless local area network device, acquiring a second device state reported by the target device from the cloud server; and when the target device is a Bluetooth mesh network device, acquiring the second device state reported by the target device from the local or acquiring the second device state reported by the target device from a cloud server through a gateway.
For example, when the target device is a Wi-Fi device, the target device reports the second device state to the cloud server, and forwards the second device state to the terminal device via the cloud server.
For another example, when the target device is a bluetooth mesh device and no gateway exists, the terminal device sends an execution command to the target device through the bluetooth module, and the target device directly reports the second device state to the terminal device through the bluetooth module.
For another example, when the target device is a bluetooth mesh device and a gateway exists, the target device may directly report the second device state to the terminal device through the bluetooth module, or may report the second device state 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 only one user sets parameters 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 a device object model value of a target device in a first device state;
Step S202, recording or updating a first timestamp corresponding to the first device state of the target device;
step S203, transmitting an execution command of the first control operation to the target device;
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.
Alternatively, when the target device is a bluetooth mesh device, an execution command of the first control operation is transmitted to the target device via the cloud server, or the execution command of the first control operation is directly transmitted to the target device by using the bluetooth module.
Step S204, judging whether the target equipment successfully executes the first control operation;
Step S205, when the target equipment is determined to not successfully execute the first control operation, a first timestamp and a buffer space of the terminal equipment are cleared;
Step S206, when it is determined that the target device successfully performs the first control operation, updating the target device state to the second device state.
Specifically, the method for processing the device state in the above embodiment is described by taking the target device as an intelligent air conditioner as an example. The intelligent air conditioner is Bluetooth mesh equipment, the current working state is a dormant state, and the equipment model value of the intelligent air conditioner in the dormant state is adjusted through the mobile phone APP so as to adjust the working state of the intelligent air conditioner into 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 utilizing the mobile phone Bluetooth module; judging whether the intelligent air conditioner successfully executes a first control operation or not; when the unsuccessful execution is determined, the first timestamp and the cache space of the mobile phone are cleared; and when successful execution is determined, updating the state of the intelligent air conditioner to a refrigerating 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 the target device, the device state update opportunity of the target device can be timely and accurately determined, so as to ensure that the device state of the target device can be timely updated.
Fig. 3 is a schematic diagram of a method for processing a device status according to yet another embodiment of the present application, in which there are at least two users setting 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, a second timestamp is obtained in response to a second device state reported by target devices;
Step S302, adding or updating the second equipment state and the second timestamp to the cache space;
step S303, judging whether a first timestamp exists when a first control operation is executed on the target equipment;
Step S304, when the existence of the first time stamp is determined, 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;
Step S306, when the first time difference value is smaller than the preset time threshold value, creating a delay inquiry task, and determining delay time by adopting the preset time threshold value and the first time difference value;
Step S307, when the delay time is over, the third time stamp obtained after the delay is taken as the second time stamp, and the step S303 is repeatedly executed;
Step S308, when it is determined that the first time stamp does not exist, or when it is determined that the first time difference value is greater than or equal to a preset time threshold value, updating the target device state to a second device state;
Step S309, the first timestamp and the buffer space of the terminal device are cleared.
Specifically, the method for processing the device state in the above embodiment is described with the target device as the intelligent light group. The current working state of the intelligent lamp set is a closing state, a first operator sets the working state of the intelligent lamp set to an opening state through a mobile phone APP, and a corresponding first time stamp is recorded. In a message circulation period of 3 seconds, the second operator can set the working state of the intelligent lamp set to an on state through the mobile phone APP. When the first operator sets the working state of the intelligent lamp set to be the off state through the mobile phone APP, the on state set by the second operator and reported by the target equipment is received, the corresponding second time stamp is recorded, and the off state of the intelligent lamp set is stored in the buffer space. And calculating a first time difference value between the first time stamp and the second time stamp to be 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 set in the mobile phone APP by using the closing state in the buffer space. At this time, since the off state of the first operator operation has also been reported to the APP, the cached device switch state has also been updated to the off state. When the first operator updates the working state of the intelligent lamp set in the APP through the cache, the condition 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 timely and accurately determined, so as to ensure that the device state of the target device can be timely updated.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also 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 instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiment also provides a device state processing apparatus, which is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, 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, a 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 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 record timestamp corresponding to the adjusted 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 received second device state, and the second device state reported by the target device is triggered by a second control operation, where the second control operation is used to adjust the second device state of the target device;
a processing module 403, configured to determine a device status update occasion 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 between the first time stamp and the second time stamp; and determining the equipment state updating time based on a comparison result of the preset time threshold value and the first time difference value.
Optionally, the processing module 403 is further configured to: and updating the target device state to the second device state when the first time difference value is determined to be greater than or equal to the preset time threshold value 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, creating a delay inquiry task, and determining delay time by adopting the preset time threshold value and the first time difference value; when the delay time is over, a third time stamp is obtained, wherein the third time stamp is the current time stamp corresponding to the state of the second equipment received again; 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 into the second equipment state.
Optionally, the processing module 403 is further configured to: and clearing the first timestamp and a buffer space of the terminal equipment, wherein the buffer space is used for buffering the second equipment state.
Optionally, the processing apparatus 400 of the device state further includes: a third obtaining module 404, configured to obtain, when the target device is a wireless lan device, a second device state reported by the target device from the cloud server; and when the target device is a Bluetooth mesh network device, acquiring the second device state reported by the target device from the local or acquiring the second device state reported by the target device from a cloud server through a gateway.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; or the above modules may be located in different processors in any combination.
Embodiments of the present application also provide a non-volatile storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described nonvolatile storage medium may be configured to store a computer program for performing the steps of:
S1, responding to a first control operation executed on target equipment, and acquiring a first time stamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first time stamp is a record time stamp corresponding to the adjusted first equipment state;
S2, responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment;
And S3, determining the device state updating time of the target device based on the first time stamp and the second time stamp.
Alternatively, in the present embodiment, the above-described nonvolatile storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the application also provides an electronic device comprising a memory, a processor, the memory having stored therein a computer program, the processor being arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, responding to a first control operation executed on target equipment, and acquiring a first time stamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, and the first time stamp is a record time stamp corresponding to the adjusted first equipment state;
S2, responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, and the second control operation is used for adjusting the second equipment state of the target equipment;
And S3, determining the device state updating time of the target device based on the first time stamp and the second time stamp.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (8)

1. A method for processing a device state, comprising:
responding to a first control operation executed on target equipment, and acquiring a first time stamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, the first time stamp is a record time stamp corresponding to the first equipment state, and the first control operation is used for representing a control operation executed by a first operator on the target equipment;
Responding to a second equipment state reported by the target equipment, and acquiring a second timestamp, wherein the second timestamp is a current timestamp corresponding to the received second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, the second control operation is used for adjusting the second equipment state of the target equipment, and the second control operation is used for indicating a control operation executed by a second operator on the target equipment;
determining a device status update occasion of the target device based on the first timestamp and the second timestamp;
Wherein determining the device state update occasion based on the first timestamp and the second timestamp comprises: calculating a first time difference between the first time stamp and the second time stamp; determining the equipment state updating time based on a comparison result of a preset time threshold value and the first time difference value;
wherein determining the device state update opportunity based on a comparison of a preset time threshold and the first time difference value comprises:
when the first time difference value is smaller than the preset time threshold value based on the comparison result, creating a delay inquiry task, and determining delay time by adopting the preset time threshold value and the first time difference value;
When the delay time is over, a third time stamp is obtained, wherein the third time stamp is a current time stamp corresponding to the second equipment state received again;
Determining a device status update occasion of the target device based on the first timestamp and the third timestamp;
Wherein determining the device state update occasion of the target device based on the first timestamp and the third timestamp comprises: 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.
2. The method of processing the device state of claim 1, wherein determining the device state update opportunity based on the comparison of a preset time threshold and the first time difference value comprises:
And updating the target equipment state to the second equipment state when the first time difference value is determined to be greater than or equal to the preset time threshold value based on the comparison result.
3. The method for processing a device state according to claim 1, wherein the method for processing a device state further comprises:
and clearing the first timestamp and a buffer space of the terminal equipment, wherein the buffer space is used for buffering the second equipment state.
4. The method for processing a device state according to claim 1, wherein when the target device is a wireless lan device, the second device state reported by the target device is obtained from a cloud server; and when the target equipment is 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 a gateway.
5. A device state processing apparatus, comprising:
the first acquisition module is used for responding to a first control operation executed on target equipment, and acquiring a first time stamp, wherein the first control operation is used for adjusting a first equipment state of the target equipment, the first time stamp is a record time stamp corresponding to the first equipment state, and the first control operation is used for representing a control operation executed on the target equipment by a first operator;
The second obtaining module is used for responding to a second equipment state reported by the target equipment to obtain a second timestamp, wherein the second timestamp is a current timestamp corresponding to the second equipment state, the second equipment state reported by the target equipment is triggered by a second control operation, the second control operation is used for adjusting the second equipment state of the target equipment, and the second control operation is used for representing a control operation executed by a second operator on the target equipment;
a processing module, configured to determine an equipment status update occasion of the target equipment based on the first timestamp and the second timestamp;
Wherein the processing module is further configured to: calculating a first time difference between the first time stamp and the second time stamp; determining the equipment state updating time based on a comparison result of a preset time threshold value and the first time difference value;
wherein 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, creating a delay inquiry task, and determining delay time by adopting the preset time threshold value and the first time difference value;
When the delay time is over, a third time stamp is obtained, wherein the third time stamp is a current time stamp corresponding to the second equipment state received again;
Determining a device status update occasion of the target device based on the first timestamp and the third timestamp;
wherein the processing module is further configured to:
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.
6. A non-volatile storage medium, characterized in that the storage medium has stored therein a computer program, wherein the computer program is arranged to execute the method of processing a device state as claimed in any of the claims 1 to 4 at run-time.
7. A processor, characterized in that the processor is arranged to run a program, wherein the program is arranged to execute the method of handling the status of the device as claimed in any of the claims 1 to 4 at run time.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of processing the device state as claimed in any of the claims 1 to 4.
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 CN114337896A (en) 2022-04-12
CN114337896B true 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)

Families Citing this family (1)

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

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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 珠海格力电器股份有限公司 Interactive method, system and equipment for equipment control state 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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9786159B2 (en) * 2010-07-23 2017-10-10 Tivo Solutions Inc. Multi-function remote control device
US10252145B2 (en) * 2016-05-02 2019-04-09 Bao Tran Smart device

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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 珠海格力电器股份有限公司 Interactive method, system and equipment for equipment control state 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
"Control Home Devices with Voice Commands via a Smartphone";M. Faishal Riza;《2019 Fourth International Conference on Informatics and Computing (ICIC)》;20200210;全文 *
基于Android的个性化智能家居控制终端;罗娟;贾亚龙;孔瀚文;;工业控制计算机;20180325(第03期);全文 *

Also Published As

Publication number Publication date
CN114337896A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN108491275B (en) Program optimization method, device, terminal and storage medium
CN110417859B (en) Equipment control method, device, system, intelligent gateway and storage medium
US11221743B2 (en) Information processing method, terminal, server, and computer storage medium
TW201805801A (en) Method and device for displaying application information
CN110639207A (en) Game data synchronization method, device, storage medium and processor
CN109343902A (en) Operation method, device, terminal and the storage medium of audio processing components
CN104980898A (en) Information pushing method, system and equipment
CN114007235A (en) Scene rule writing method and device, storage medium, processor and electronic equipment
JP2018528497A (en) Data processing method and apparatus for mobile games
CN111095221A (en) Method and terminal for processing refresh display exception
CN114337896B (en) Equipment state processing method and device, storage medium and electronic device
CN111669717A (en) Cloud mobile phone data sending method, computer device and storage medium
CN112131015B (en) Information processing method and device, cloud server and storage medium
KR102020358B1 (en) Terminal and method for synchronizing application thereof
CN115079680A (en) Vehicle control state processing method and device, storage medium and electronic equipment
CN104615531A (en) Statistical method for accumulated terminal using duration time and network system
CN108011860B (en) Method, device and terminal for processing broadcast message
CN110989820A (en) Method and device for controlling power consumption of processor, processor and electronic device
CN104618138A (en) Server and terminals
CN106209601B (en) State update message pushing method and device
CN108536540B (en) Method and device for acquiring mouse message of desktop icon
CN113691628A (en) Task switching method and device, system, electronic equipment and computer medium
CN114339625B (en) Equipment linkage control method and device, storage medium, processor and electronic device
CN115766436A (en) Equipment state updating method and device, storage medium and electronic device
CN110908934A (en) Physical network platform module, physical network platform equipment and control instruction processing system

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