CN115081562A - Method and device for judging equipment state, storage medium and electronic device - Google Patents

Method and device for judging equipment state, storage medium and electronic device Download PDF

Info

Publication number
CN115081562A
CN115081562A CN202210178529.7A CN202210178529A CN115081562A CN 115081562 A CN115081562 A CN 115081562A CN 202210178529 A CN202210178529 A CN 202210178529A CN 115081562 A CN115081562 A CN 115081562A
Authority
CN
China
Prior art keywords
state
target data
determining
preset
timer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210178529.7A
Other languages
Chinese (zh)
Inventor
王赟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Shaoxing Supor Domestic Electrical Appliance Co Ltd
Original Assignee
Zhejiang Shaoxing Supor Domestic Electrical Appliance 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 Zhejiang Shaoxing Supor Domestic Electrical Appliance Co Ltd filed Critical Zhejiang Shaoxing Supor Domestic Electrical Appliance Co Ltd
Priority to CN202210178529.7A priority Critical patent/CN115081562A/en
Publication of CN115081562A publication Critical patent/CN115081562A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • G06K17/0029Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device the arrangement being specially adapted for wireless interrogation of grouped or bundled articles tagged with wireless record carriers
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47JKITCHEN EQUIPMENT; COFFEE MILLS; SPICE MILLS; APPARATUS FOR MAKING BEVERAGES
    • A47J36/00Parts, details or accessories of cooking-vessels
    • A47J36/06Lids or covers for cooking-vessels
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G15/00Time-pieces comprising means to be operated at preselected times or after preselected time intervals
    • G04G15/003Time-pieces comprising means to be operated at preselected times or after preselected time intervals acting only at one preselected time or during one adjustable time interval
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Food Science & Technology (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The application discloses a method and a device for judging equipment states, a storage medium and an electronic device. The method comprises the following steps: acquiring target data sent by the first wireless module through the second wireless module; determining a time interval between the acquisition time of the previous frame of target data and the acquisition time of the next frame of target data, judging whether the time interval is greater than or equal to a preset time length, and obtaining a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length; and counting the acquisition times of the target data according to a first preset time period, judging whether the acquisition times of the target data are greater than or equal to preset times, and obtaining a second state of the cover body when the acquisition times of the target data are greater than or equal to the preset times. Through the application, the problem that a complex opening and closing cover detection mechanism needs to be arranged to detect the cover body state of the cooking equipment in the related art, and the detection result of the cover body state of the cooking equipment is inaccurate is solved.

Description

Method and device for judging equipment state, storage medium and electronic device
Technical Field
The present disclosure relates to the field of device status determination, and in particular, to a method and an apparatus for determining a device status, a storage medium, and an electronic apparatus.
Background
In the cooking process by using the cooking equipment, whether the cooking equipment can keep a normal operation state or not is related to whether a cooking task can be smoothly completed or not, so that it is very important to accurately judge the operation state of the cooking equipment, and the judgment on the operation state of the cooking equipment comprises the judgment on the cover body state of the cooking equipment, such as whether an upper cover is tightly covered or not, whether a side door is tightly closed or not, and the judgment on the cover body state of the cooking equipment is untimely and inaccurate, so that the execution of the cooking task can be influenced, and even an accident can be caused.
In the related art, the judgment method of the state of the cover body of the cooking device is as follows: detect through special opening and shutting lid detection mechanism, for example, detect through the opening and shutting lid detection mechanism who contains the magnetic reed switch, but opening and shutting lid detection mechanism structure is complicated, and equipment live time can lead to the connection structure ageing for a long time moreover, influences the accuracy that the opening and shutting lid detected, and simultaneously, traditional detection mode can't judge that the lid current state is motion state or quiescent condition, for example, the lid is closing the lid action at present to produce equipment lid state judgement mistake.
Aiming at the problems that a complex cover opening and closing detection mechanism needs to be arranged to detect the state of the cover body of the cooking equipment and the detection result of the state of the cover body of the cooking equipment is inaccurate in the related art, an effective solution is not provided at present.
Disclosure of Invention
The application provides a method and a device for judging equipment state, a storage medium and an electronic device, which are used for solving the problems that a complex cover opening and closing detection mechanism needs to be arranged to detect the cover body state of cooking equipment and the detection result of the cover body state of the cooking equipment is inaccurate in the related art.
According to one aspect of the application, a method for determining a device state is provided. The method comprises the following steps: acquiring target data sent by a first wireless module through a second wireless module, wherein the second wireless module is arranged on a main body of target equipment, and the first wireless module is arranged on a cover body of the target equipment; determining a time interval between the acquisition time of the last frame of target data and the acquisition time of the next frame of target data, judging whether the time interval is greater than or equal to a preset time length, and obtaining a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length, wherein the first state is used for representing the uncovering state; counting the acquisition times of the target data according to a first preset time period, judging whether the acquisition times of the target data are greater than or equal to preset times, and obtaining a second state of the cover body when the acquisition times of the target data are greater than or equal to the preset times, wherein the second state is used for representing the cover closing state; and determining the current state of the cover body according to the first state and the second state. And determining the opening and closing state of the cover body of the equipment by combining the time required for acquiring the target data and the times of acquiring the target data in the preset time.
Optionally, the determining the time interval between the acquisition time of the target data of the previous frame and the acquisition time of the target data of the next frame comprises: starting a first timer, and judging whether target data is acquired before the first timer times to a preset time length; when the target data is acquired, determining the current timing time of the first timer as a time interval, and controlling the first timer to count again; and under the condition that the target data is not acquired, determining the preset duration as a time interval, and controlling the first timer to count again. The time interval between two frames of data is determined and obtained through the first timer, a determination mode of the time interval under the condition that the first timer is started for the first time and a determination mode of the time interval under the condition that the target data cannot be obtained after the preset time length is exceeded are given, and therefore the efficiency of determining the cover body state of the equipment through obtaining the time interval between two adjacent frames of target data is improved.
Optionally, the counting the number of times of acquiring the target data according to the first preset time period includes: starting a second timer, controlling the second timer to time according to the first preset time period, and controlling the second timer to zero after finishing the timing of each first preset time period and to count again; under the condition of starting the second timer for timing, starting a counter to count the acquisition times of the target data, and controlling the counter to count, clear and recount after the second timer finishes timing of each first preset actual period; in the timing process of the second timer, judging whether the timing of the first timer reaches the preset duration or not; and when the condition that the timing of the first timer reaches the preset time length does not exist, acquiring the counting result of the counter under the condition that the timing of the second timer reaches the time length corresponding to the first preset time period, and determining the counting result as the acquisition frequency of the target data. The timing result of the first timer is used as the precondition for determining the state of the cover body, so that invalid work of the second timer and the counter under the condition of uncovering is avoided, and the accuracy and the efficiency for determining the state of the cover body of the equipment are improved.
Optionally, in the process of counting by the second timer, after determining whether the counted time of the first timer reaches the preset time length, the method further includes: and when the condition that the timing of the first timer reaches the preset duration exists, controlling the second timer to zero and count again, and controlling the counter to zero and count again. The second timer and the counter are cleared simultaneously under the condition that the timing of the first timer reaches the preset duration within the first preset time period, so that the effect of reducing invalid work of the second timer and the counter is achieved.
Optionally, in the process of counting by the second timer, after determining whether the counted time of the first timer reaches the preset time length, the method further includes: and when the condition that the timing of the first timer reaches the preset duration exists, controlling the counter to stop counting or clear the counting until the second timer counts again. Under the condition that the timing of the first timer reaches the preset duration within the first preset time period, the counter is stopped and data is cleared, so that the effect of reducing invalid work of the counter is achieved.
Optionally, determining the current state of the cover according to the first state and the second state includes: judging whether the first state and the second state appear in a second preset time period according to the second preset time period, wherein the second preset time period is more than or equal to the first preset time period; and under the condition that the first state and the second state both appear in a second preset time period, determining the first state as the current state of the cover body. The uncapping state is determined as the cover state of the equipment under the condition that different states occur simultaneously, so that the working safety of the target equipment is ensured.
Optionally, determining the current state of the cover according to the first state and the second state includes: judging the appearance sequence of the first state and the second state in a third preset time period according to the third preset time period, wherein the time length corresponding to the third preset time period is more than or equal to the preset time length; determining the first state as the current state of the cover body under the condition that the appearance sequence of the first state is prior; in the case where the appearance order of the second state is prior, the second state is determined as the current state of the cover. The current state of the equipment cover body is determined according to the sequence of the states under the condition that different states occur, so that the efficiency of determining the state of the equipment cover body is improved.
Optionally, before counting the number of times of acquiring the target data according to a first preset time period and determining whether the number of times of acquiring the target data is greater than or equal to a preset number of times, the method further includes: when the cover body is in a cover closing state, counting the acquisition times of corresponding target data in a plurality of first preset time periods to obtain a plurality of acquisition times; a minimum acquisition number of the plurality of acquisition numbers is determined, and a preset number is determined based on the minimum acquisition number. The preset times are determined through the minimum acquisition times in the first preset time periods in the cover closing state, and therefore the accuracy of judging the state of the cover body of the equipment is guaranteed.
Optionally, the determining the preset number of times based on the minimum number of times of acquisition includes: and calculating the difference value of the minimum acquisition times and the error times, and determining the difference value as the preset times. By considering the error times when the preset times are determined, the cover closing state is prevented from being mistakenly judged as the cover opening state, and therefore the accuracy of judging the state of the cover body of the equipment is improved.
Optionally, in a case that the target data is acquired each time, before determining a time interval between an acquisition time of the target data of the previous frame and an acquisition time of the target data of the next frame, and determining whether the time interval is greater than or equal to a preset time length, the method further includes: counting the corresponding time intervals of the obtained multi-frame target data to obtain a plurality of time intervals when the cover body is in an uncovering state; a maximum time interval of the plurality of time intervals is determined, and a preset duration is determined based on the maximum time interval. The preset duration is determined through the maximum time interval in the plurality of time intervals in the uncapping state, so that the accuracy of judging the state of the cover body of the equipment is ensured.
Optionally, the determining the preset duration based on the maximum time interval includes: and calculating the sum of the maximum time interval and the error time interval, and determining the sum as the preset duration. By adding the error duration when the preset duration is determined, the condition that the cover opening state is mistakenly judged as the cover closing state is avoided, and therefore the accuracy of judging the state of the cover body of the equipment is improved.
According to another aspect of the present application, an apparatus for determining a device status is provided. The device includes: the acquisition unit is used for acquiring target data sent by the first wireless module through the second wireless module, wherein the second wireless module is arranged on the main body of the target equipment, and the first wireless module is arranged on the cover body of the target equipment; the first determining unit is used for determining a time interval between the acquisition time of the target data of the previous frame and the acquisition time of the target data of the next frame, judging whether the time interval is greater than or equal to a preset time length, and obtaining a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length, wherein the first state is used for representing the uncovering state; the second determining unit is used for counting the acquisition times of the target data according to the first preset time period, judging whether the acquisition times of the target data are greater than or equal to the preset times or not, and obtaining a second state of the cover body when the acquisition times of the target data are greater than or equal to the preset times, wherein the second state is used for representing the cover closing state; and the third determining unit is used for determining the current state of the cover body according to the first state and the second state.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium for storing a program, wherein the program controls a device in which the non-volatile storage medium is located to execute a method for determining a device status when the program is running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a processor and a memory; the memory stores computer readable instructions, and the processor is used for executing the computer readable instructions, wherein the computer readable instructions execute a method for judging the state of the equipment when running.
Through the application, the following steps are adopted: acquiring target data sent by a first wireless module through a second wireless module, wherein the second wireless module is arranged on a main body of target equipment, and the first wireless module is arranged on a cover body of the target equipment; determining a time interval between the acquisition time of the target data of the previous frame and the acquisition time of the target data of the next frame, judging whether the time interval is greater than or equal to a preset time length, and obtaining a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length, wherein the first state is used for representing the uncovering state; counting the acquisition times of the target data according to a first preset time period, judging whether the acquisition times of the target data are greater than or equal to preset times, and obtaining a second state of the cover body when the acquisition times of the target data are greater than or equal to the preset times, wherein the second state is used for representing the cover closing state; and determining the current state of the cover body according to the first state and the second state. The problem of need set up complicated lid detection mechanism that opens and shuts and detect cooking equipment lid state among the prior art to inaccurate to the testing result of cooking equipment lid state is solved. The opening and closing state of the cover body of the cooking equipment is determined by combining the time required for obtaining the target data and the times of obtaining the target data in the preset time, and therefore the effect of accurately detecting the state of the cover body of the cooking equipment is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart of a method for determining a device status according to an embodiment of the present application;
fig. 2 is a first flowchart of an alternative method for determining a device status according to an embodiment of the present disclosure;
fig. 3 is a second flowchart of an alternative method for determining a device status according to an embodiment of the present disclosure;
fig. 4 is a flowchart three of an alternative method for determining a device status according to an embodiment of the present application;
fig. 5 is a fourth flowchart of an alternative method for determining a device status according to an embodiment of the present application;
fig. 6 is a fifth flowchart of an alternative method for determining a device status according to an embodiment of the present disclosure;
fig. 7 is a sixth flowchart of an alternative method for determining a device status according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of a device state determination apparatus according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
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 should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. 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.
According to an embodiment of the application, a method for judging the state of equipment is provided.
Fig. 1 is a flowchart of a method for determining a device status according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S102, obtaining target data sent by a first wireless module through a second wireless module, where the second wireless module is disposed on a main body of a target device, and the first wireless module is disposed on a cover of the target device.
Specifically, the first wireless module and the second wireless module may be communication devices, and the second wireless module may acquire data in the first wireless module, so that the main body of the target device may receive target data sent by the cover of the target device, and determine the state of the cover according to the frequency of the received data.
For example, the second wireless module may be a swept-frequency oscillator and may be mounted on the body of the target device, and the first wireless module may be a transponder whose resonant frequency is a preset fixed value and may be mounted on the cover of the target device. The Frequency sweep oscillator and the transponder can communicate by adopting a Radio Frequency Identification (RFID) technology, the Frequency sweep oscillator can send a Radio Frequency signal with a Frequency within a certain range to the transponder through the inductance coil according to a preset Frequency (for example, sending the Radio Frequency signal every 200 ms), and the Frequency sweep oscillator receives a target data signal sent by the transponder when the resonant Frequency of the Radio Frequency signal sent by the Frequency sweep oscillator is the same as the preset resonant Frequency in the transponder, so as to obtain target data.
And step S104, determining a time interval between the acquisition time of the target data of the previous frame and the acquisition time of the target data of the next frame, judging whether the time interval is greater than or equal to a preset time length, and obtaining a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length, wherein the first state is used for representing the uncovering state.
Specifically, the time interval between the acquisition time of the previous frame of target data and the acquisition time of the next frame of target data may be recorded by a timer, the timer starts timing after the second wireless module receives the one frame of target data, re-times when the next frame of target data is received, and records the time interval between the previous frame and the current frame (i.e., the next frame of data of the previous frame) before re-timing, compares the time interval with a preset time length, and determines whether the target device is in an uncapped state according to the comparison result, where the preset time length may be determined by the time interval between the second wireless module and the second wireless module in the uncapped state, where the second wireless module receives the two adjacent frames of target data.
For example, fig. 2 is a first flowchart of a method for determining an optional device state according to an embodiment of the present application, as shown in fig. 2, the timer may be a T1 timer, a preset duration may be 800ms, the T1 timer performs zero clearing and re-timing every time when target data is acquired, records a timing duration of the T1 timer, determines the timing duration as a time interval between an acquisition time of previous frame target data and an acquisition time of next frame target data, and determines that a lid state of a target device is an uncapped state when the time interval is greater than or equal to 800 ms.
In order to accurately determine the time interval between the acquisition time of the target data of the previous frame and the acquisition time of the target data of the next frame, optionally, in the method for determining a device status provided in the embodiment of the present application, determining the time interval between the acquisition time of the target data of the previous frame and the acquisition time of the target data of the next frame includes: starting a first timer, and judging whether target data is acquired before the first timer times to a preset time length; when the target data is acquired, determining the current timing time of the first timer as a time interval, and controlling the first timer to count again; and under the condition that the target data is not acquired, determining the preset duration as a time interval, and controlling the first timer to count again.
Specifically, the time interval between the acquisition time of the previous frame of target data and the acquisition time of the next frame of target data may be recorded by the first timer, when the second wireless module acquires the target data, the first timer is cleared in time, and when the second wireless module acquires the target data again, the time counted by the first timer before the first timer is cleared in time is the time interval between two frames of data.
In addition, when the first timer is started for the first time, since the previous frame of data does not exist, the time counted by the first acquisition of the target data by the timer may be determined as the time interval between two frames of data.
It should be further noted that, when the device is in an uncapped state and the target data cannot be received by the second wireless module, in order to avoid that the continuous timing of the first timer cannot be cleared, the preset time duration may be determined as the time interval between two frames of data and the first timer is controlled to restart when the target data is not acquired before the first timer is timed to the preset time duration.
In this embodiment, the time interval between two frames of data is determined and obtained through the first timer, and a determination manner of the time interval when the first timer is started for the first time and a determination manner of the time interval when the target data cannot be obtained after the preset time length is exceeded are provided, so that the efficiency of determining the cover state of the device through obtaining the time interval between two adjacent frames of target data is improved.
And step S106, counting the acquisition times of the target data according to a first preset time period, judging whether the acquisition times of the target data are more than or equal to preset times, and obtaining a second state of the cover body when the acquisition times of the target data are more than or equal to the preset times, wherein the second state is used for representing the cover closing state.
Specifically, the number of times of acquiring the target data in a first preset time period may be recorded by a timer and the timer, where the preset number of times may be determined by the number of times of acquiring the target data in the first preset time period by the second wireless module in the closed state.
For example, fig. 3 is a second flowchart of a method for determining an optional device state according to an embodiment of the present application, as shown in fig. 3, a first preset time period may be 2s, and a preset number of times may be 3, timing of 2s may be performed by a T2 timer, and counting the number of times of acquiring target data within 2s by a counter, where when the number of times of acquiring is greater than or equal to 3 times, the cover state of the target device may be determined to be a cover closing state.
And step S108, determining the current state of the cover body according to the first state and the second state.
Specifically, when only the first state or the second state occurs within a period of time, the occurring state is determined as the current state of the cover body, and when both the first state and the second state occur within a period of time, the current state of the cover body may be determined according to the occurrence sequence of the first state and the second state within a period of time, the state occurring first may be determined as the current state of the cover body, and the first state may also be determined as the current state of the cover body.
According to the method for judging the equipment state provided by the embodiment of the application, target data sent by a first wireless module is obtained through a second wireless module, wherein the second wireless module is arranged on a main body of target equipment, and the first wireless module is arranged on a cover body of the target equipment; determining a time interval between the acquisition time of the last frame of target data and the acquisition time of the next frame of target data, judging whether the time interval is greater than or equal to a preset time length, and obtaining a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length, wherein the first state is used for representing the uncovering state; counting the acquisition times of the target data according to a first preset time period, judging whether the acquisition times of the target data are greater than or equal to preset times, and obtaining a second state of the cover body when the acquisition times of the target data are greater than or equal to the preset times, wherein the second state is used for representing the cover closing state; and determining the current state of the cover body according to the first state and the second state. The problem of need set up complicated lid detection mechanism that opens and shuts and detect cooking equipment lid state among the prior art to inaccurate to the testing result of cooking equipment lid state is solved. The opening and closing state of the cover body of the cooking equipment is determined by combining the time required for obtaining the target data and the times of obtaining the target data in the preset time, and therefore the effect of accurately detecting the state of the cover body of the cooking equipment is achieved.
Fig. 4 is a flow chart of a third alternative method for determining a device status according to an embodiment of the present application, as shown in fig. 4:
after the target device starts to start, the first timer T1, the second timer T2 and the counter start at the same time, on one hand, the first timer T1 may be cleared and record a timing duration, that is, a time interval between previous frame data and next frame data, after receiving the target data, and at the same time, determine whether the duration of the first timer T1 is greater than 800ms, and determine the state of the device cover as the first state when the duration of the first timer T1 is greater than 800 ms.
On the other hand, the second timer T2 is cleared and re-counted when 2s is counted up each time continuously, and meanwhile, the counter records the number of times of receiving the target data within 2s, and determines whether the number of times of receiving the target data is greater than 3, and if the number of times of receiving the target data is greater than 3, the state of the device cover may be determined as the second state.
Optionally, in the method for determining a device state provided in the embodiment of the present application, counting, according to a first preset time period, the number of times of obtaining the target data includes: starting a second timer, controlling the second timer to time according to the first preset time period, and controlling the second timer to zero after finishing the timing of each first preset time period and to count again; under the condition of starting the second timer for timing, starting a counter to count the acquisition times of the target data, and controlling the counter to count, clear and recount after the second timer finishes timing of each first preset actual period; in the process of timing by the second timer, judging whether the condition that the timing of the first timer reaches the preset time length exists; and when the condition that the timing of the first timer reaches the preset time length does not exist, acquiring the counting result of the counter under the condition that the timing of the second timer reaches the time length corresponding to the first preset time period, and determining the counting result as the acquisition frequency of the target data.
For example, fig. 5 is a fourth flowchart of an alternative method for determining a device status according to an embodiment of the present application, as shown in fig. 5, when the first timer T1 is started, the second timer T2 and the counter may be started at the same time, where the second timer T2 is configured to count according to a first preset time period, the first preset time period is a statistical period for counting the number of times of obtaining the target data, and may be, for example, 2s, and when the second timer T2 is started, the counter starts to count the number of times of receiving the target data within the first preset time period.
Further, after the second timer T2 finishes timing for each first preset time period, the second timer T2 and the counter are simultaneously cleared and restart the timing and counting operations, for example, the second timer T2 and the counter start running simultaneously, and are simultaneously cleared and restart after 2s, and the number of times of receiving the target data acquired by the counter in the second preset time period is recorded.
It should be noted that, in order to avoid invalid operations of the second timer T2 and the counter under the condition of uncovering, in each second preset time period counted by the second timer T2, it is necessary to determine whether there is a case that the timing of the first timer reaches the preset duration in real time, and in the case that the timing of the first timer T1 does not reach the preset duration, the counting result of the counter in the period is determined as the number of times of acquiring the target data.
For example, if the preset time length is 800ms, the counter acquires the target data 5 times within 2s, and the maximum time recorded by the first timer within 2s is 500ms, and the maximum time does not reach 800ms, the number of times of acquiring the target data is determined to be 5 times, and for example, if the time counted by the first timer T1 within 2s reaches 800ms, the lid state of the target device may be directly determined to be the first state, and the timing of the second timer T2 and the counter in the period may be stopped. In the embodiment, the timing result of the first timer is used as the precondition for determining the state of the cover body, so that the invalid work of the second timer and the counter under the condition of uncovering is avoided, and the accuracy and the efficiency for determining the state of the cover body of the equipment are improved.
Optionally, in the method for determining a device state provided in this embodiment of the present application, after determining whether there is a situation that the timing of the first timer reaches a preset duration in a process of timing by the second timer, the method further includes: and when the timing of the first timer reaches the preset duration, controlling the second timer to zero and count again, and controlling the counter to zero and count again.
Specifically, under the condition that the timing of the first timer reaches the preset duration within a certain first preset time period, since it can be determined that the current device cover body state is the uncovering state through the timing result of the first timer, the second timer and the counter can be simultaneously cleared, and the timing and counting can be restarted to judge the device cover body state of the next time period. In the embodiment, the second timer and the counter are simultaneously cleared when the first timer reaches the preset duration within the first preset time period, so that the effect of reducing invalid work of the second timer and the counter is achieved.
Optionally, in the method for determining a device state provided in this embodiment of the present application, after determining whether there is a situation that the timing of the first timer reaches a preset duration in a process of timing by the second timer, the method further includes: and when the condition that the timing of the first timer reaches the preset duration exists, controlling the counter to stop counting or clear the counting until the second timer counts again.
Specifically, when the timing of the first timer reaches the preset duration within a certain first preset time period, since it can be determined that the current device cover state is the uncovering state through the timing result of the first timer, the operation of the counter can be stopped only, or the count of the counter is cleared only, the second timer continues to count according to the original period until the timing period is ended, and the counter is restarted in the next period, so that the counter starts to count again from zero. In the embodiment, the counter is stopped and data is cleared when the first timer counts for a preset time period within a first preset time period, so that the effect of reducing invalid work of the counter is achieved.
Optionally, in the method for determining a device state provided in the embodiment of the present application, determining a current state of the cover according to the first state and the second state includes: judging whether the first state and the second state appear in a second preset time period according to the second preset time period, wherein the second preset time period is more than or equal to the first preset time period; and under the condition that the first state and the second state both appear in a second preset time period, determining the first state as the current state of the cover body.
Specifically, the second preset time period may be any time longer than the first preset time period, for example, the first preset time period may be 2s, the second preset time period may be 4s, and in a certain second preset time period, if the first state and the second state occur simultaneously, the result according to the first state is dominant, that is, the device cover state is uncapped.
For example, fig. 6 is a flowchart of a fifth alternative method for determining a device status according to an embodiment of the present application, as shown in fig. 6, if there is no signal received by the second wireless module lasting 800ms within 5s, it may be determined that the current status of the cover is the first status, but in the timing period of 2s-4s, the timing result of the first timer is not greater than or equal to 800ms, and in the timing period of 2s-4s, the statistical result of the counter is 4 times, it may be determined that the current status is the second status.
It should be noted that two states simultaneously occur within the 5s determination period, the target device operates in the lid-closed state, and in order to ensure the safe operation of the target device, the current state of the device lid may be the first state, that is, the lid-open state. In the embodiment, the uncovering state is determined as the cover body state of the device under the condition that different states occur, so that the working safety of the target device is ensured.
Optionally, in the method for determining a device state provided in the embodiment of the present application, determining a current state of the cover according to the first state and the second state includes: judging the appearance sequence of the first state and the second state in a third preset time period according to the third preset time period, wherein the time length corresponding to the third preset time period is more than or equal to the preset time length; determining the first state as the current state of the cover body under the condition that the appearance sequence of the first state is prior; in the case where the appearance order of the second state is prior, the second state is determined as the current state of the cover.
Specifically, the third preset time period may be any time period longer than or equal to the preset time period, for example, the preset time period may be 800ms, the third preset time period may be 4s, and in a certain third preset time period, if the first state and the second state occur at the same time, the device state may be determined according to the order of occurrence of the two states.
For example, fig. 7 is a sixth flowchart of an optional method for determining a device status according to an embodiment of the present application, and as shown in fig. 7, if no signal is received within any 4s of the device operation, it may be determined that the cover of the target device is currently in the first state. However, in the timing period of 2s to 4s, the case where the timing result of the first timer is not equal to or greater than 800ms does not occur, and the statistical result of the counter is 5 times in the timing period of 2s to 4s, it can be determined that the lid body of the target device is currently in the second state.
It should be noted that, because two states occur simultaneously in the judgment period of 4s, since the first state occurs first, the state of the device cover in the third preset time period may be determined as the first state, that is, the uncapping state. The embodiment of the invention improves the efficiency of determining the state of the cover body of the equipment by determining the current state of the cover body of the equipment according to the occurrence sequence of the states under the condition that different states occur.
In order to accurately acquire the preset number of times corresponding to the counter, optionally, in the method for determining the device state provided in this embodiment of the application, before counting the acquisition number of times of the target data according to the first preset time period and determining whether the acquisition number of times of the target data is greater than or equal to the preset number of times, the method further includes: when the cover body is in a cover closing state, counting the acquisition times of corresponding target data in a plurality of first preset time periods to obtain a plurality of acquisition times; the minimum acquisition number of the plurality of acquisition numbers is determined, and a preset number is determined based on the minimum acquisition number.
Specifically, before counting the number of times of acquiring the target data, the number of times of acquiring the target data of the device in the cover closing state in a first preset time period needs to be determined, and the number of times of acquiring is set to a preset number of times. The method can acquire a plurality of acquisition times within a plurality of first preset time periods, select the minimum acquisition time from the acquisition times, and determine the preset times according to the minimum acquisition time, thereby ensuring the accuracy of state judgment of the cover body of the equipment.
For example, 10 sample data are acquired, each sample data is the number of times of target data which can be acquired within 2s when the cover body of the device is in a cover closing state, so that 10 sample data are acquired, the minimum acquisition number of times 4 is selected from the 10 sample data, and the preset number of times is determined according to the minimum acquisition number of times 4.
In order to improve the accuracy of setting the preset times, optionally, in the method for determining the device state provided in the embodiment of the present application, determining the preset times based on the minimum acquisition times includes: and calculating the difference value of the minimum acquisition times and the error times, and determining the difference value as the preset times.
Specifically, the number of times of error may be an error value of a preset number of times of acquisition, and after the minimum number of times of acquisition is obtained, in order to avoid that the number of times of receiving the target data is still smaller than the preset number of times when the device is in a closed state due to an excessively large number of preset times, so as to cause an error in determining a state of the device cover, the minimum number of times of acquisition and the number of times of error may be subtracted from each other, and the difference is used as the preset number of times. For example, if the minimum number of acquisition times is 4 and the number of errors is 1, the preset number of times may be 3. In the embodiment, the error times are considered when the preset times are determined, and the cover closing state is prevented from being mistakenly judged as the cover opening state, so that the accuracy of judging the cover body state of the equipment is improved.
In order to accurately obtain the preset time length corresponding to the first timer, optionally, in the method for determining a device status provided in this embodiment of the present application, in a case that the target data is obtained each time, a time interval between obtaining time of the target data of the previous frame and obtaining time of the target data of the next frame is determined, and before determining whether the time interval is greater than or equal to the preset time length, the method further includes: counting the corresponding time intervals of the obtained multi-frame target data to obtain a plurality of time intervals when the cover body is in an uncovering state; a maximum time interval of the plurality of time intervals is determined, and a preset duration is determined based on the maximum time interval.
Specifically, before counting the acquisition times of the target data, it is necessary to determine a time interval between two adjacent times of acquiring the target data by the device in the uncapped state, and determine a preset duration corresponding to the first timer according to the time interval. The plurality of time intervals can be obtained, and the maximum time interval is selected from the plurality of time intervals to serve as the preset duration corresponding to the first timer, so that the accuracy of state judgment of the cover body of the equipment is guaranteed. For example, 11 times of target data are continuously acquired when the device is in an uncapped state, so that 10 time intervals are obtained, the maximum time interval 700ms is selected from 10 standard interval times, and the preset time length is determined according to the maximum time interval 700 ms.
In order to improve the accuracy of setting the preset time duration, optionally, in the method for determining the device state provided in the embodiment of the present application, determining the preset time duration based on the maximum time interval includes: and calculating the sum of the maximum time interval and the error time interval, and determining the sum as the preset duration.
Specifically, the error time interval may be an error value of the preset acquisition time, and after the maximum time interval is obtained, in order to avoid that the set preset duration is too small, and the time interval between two times of receiving the target data is smaller than the preset duration under the condition that the device is in the uncapped state, so as to cause a wrong determination of the state of the device cover, the maximum time interval and the error time interval may be added, and the sum is used as the preset number of times. For example, if the maximum time interval is 700ms and the error time interval is 100ms, the preset time duration may be 800 ms. The embodiment adds the error time length when confirming the preset time length, avoids misinterpreting the uncovering state as the covering state, thereby improving the accuracy of judging the state of the cover body of the equipment.
It should be noted that the steps illustrated in the flowcharts 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 flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a device for determining a device state, and it should be noted that the device for determining a device state of the embodiment of the present application may be used to execute the method for determining a device state provided in the embodiment of the present application. The following describes an apparatus for determining a device status according to an embodiment of the present application.
Fig. 8 is a schematic diagram of a device state determination apparatus according to an embodiment of the present application. As shown in fig. 8, the apparatus includes: an acquisition unit 81, a first determination unit 82, a second determination unit 83, and a third determination unit 84.
The obtaining unit 81 is configured to obtain target data sent by a first wireless module through a second wireless module, where the second wireless module is disposed on a main body of the target device, and the first wireless module is disposed on a cover of the target device.
The first determining unit 82 is configured to determine a time interval between the acquisition time of the previous frame of target data and the acquisition time of the next frame of target data, determine whether the time interval is greater than or equal to a preset time length, and obtain a first state of the cover body when the time interval is greater than or equal to the preset time length, where the first state is used to represent an uncapping state.
The second determining unit 83 is configured to count the acquisition times of the target data according to the first preset time period, determine whether the acquisition times of the target data is greater than or equal to a preset time, and obtain a second state of the cover body when the acquisition times of the target data is greater than or equal to the preset time, where the second state is used to represent a cover closing state.
A third determining unit 84, configured to determine a current state of the cover according to the first state and the second state.
In the device status determining apparatus provided in the embodiment of the present application, the obtaining unit 81 obtains target data sent by the first wireless module through the second wireless module, where the second wireless module is disposed on the main body of the target device, and the first wireless module is disposed on the cover body of the target device; the first determining unit 82 determines a time interval between the acquisition time of the previous frame of target data and the acquisition time of the next frame of target data, and determines whether the time interval is greater than or equal to a preset time length, and obtains a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length, wherein the first state is used for representing an uncovering state; the second determining unit 83 counts the acquisition times of the target data according to the first preset time period, determines whether the acquisition times of the target data are greater than or equal to the preset times, and obtains a second state of the cover body when the acquisition times of the target data are greater than or equal to the preset times, wherein the second state is used for representing the cover closing state; the third determination unit 84 determines the current state of the cover from the first state and the second state. The problem of need set up complicated lid detection mechanism that opens and shuts and detect cooking equipment lid state among the prior art to inaccurate to the testing result of cooking equipment lid state is solved. The opening and closing state of the cover body of the cooking equipment is determined by combining the time required for obtaining the target data and the times of obtaining the target data in the preset time, and therefore the effect of accurately detecting the state of the cover body of the cooking equipment is achieved.
Optionally, in the apparatus for determining a device status provided in the embodiment of the present application, the first determining unit 82 includes: the first judgment module is used for starting the first timer and judging whether the target data is acquired before the first timer times to a preset time length; the first determining module is used for determining the current timing time of the first timer as a time interval when the target data is acquired, and controlling the first timer to count again; and the second determining module is used for determining the preset duration as a time interval and controlling the first timer to count again under the condition that the target data is not acquired.
Optionally, in the apparatus for determining a device status provided in this embodiment of the present application, the second determining unit 83 includes: the first control module is used for starting the second timer, controlling the second timer to time according to the first preset time period, and controlling the second timer to zero after finishing the timing of each first preset time period and to count again; the second control module is used for starting the counter to count the acquisition times of the target data under the condition of starting the second timer to time, and controlling the counter to count, clear and recount after the second timer finishes the time counting of each first preset actual period; the second judging module is used for judging whether the situation that the timing of the first timer reaches the preset duration exists in the timing process of the second timer; and the obtaining module is used for obtaining the counting result of the counter when the timing of the second timer reaches the duration corresponding to the first preset time period when the timing of the first timer does not reach the preset duration, and determining the counting result as the obtaining times of the target data.
Optionally, in the apparatus for determining a device state provided in this embodiment of the present application, the apparatus further includes: and the first control unit is used for controlling the second timer to zero and count again when the timing of the first timer reaches the preset duration, and controlling the counter to zero and count again.
Optionally, in the apparatus for determining a device state provided in this embodiment of the present application, the apparatus further includes: and the second control unit is used for controlling the counter to stop counting or clear counting until the second timer counts again when the counting of the first timer reaches the preset duration.
Optionally, in the apparatus for determining a device status provided in the embodiment of the present application, the third determining unit 84 includes: the third judging module is used for judging whether the first state and the second state appear in a second preset time period according to the second preset time period, wherein the second preset time period is more than or equal to the first preset time period; and the third determining module is used for determining the first state as the current state of the cover body under the condition that the first state and the second state both appear in a second preset time period.
Optionally, in the apparatus for determining a device status provided in the embodiment of the present application, the third determining unit 84 includes: the fourth judging module is used for judging the appearance sequence of the first state and the second state in a third preset time period according to the third preset time period, wherein the time length corresponding to the third preset time period is more than or equal to the preset time length; the fourth determining module is used for determining the first state as the current state of the cover body under the condition that the appearance sequence of the first state is prior; and the fifth determining module is used for determining the second state as the current state of the cover body under the condition that the appearance sequence of the second state is prior.
Optionally, in the apparatus for determining a device state provided in this embodiment of the present application, the apparatus further includes: the first counting unit is used for counting the acquisition times of the corresponding target data in a plurality of first preset time periods to obtain a plurality of acquisition times when the cover body is in a cover closing state; a fourth determination unit configured to determine a minimum acquisition number of the plurality of acquisition numbers, and determine a preset number based on the minimum acquisition number.
Optionally, in the apparatus for determining a device status provided in this embodiment of the present application, the fourth determining unit includes: and the first calculating module is used for calculating the difference value between the minimum acquisition times and the error times and determining the difference value as the preset times.
Optionally, in the apparatus for determining a device state provided in this embodiment of the present application, the apparatus further includes: the second counting unit is used for counting the corresponding time intervals of the obtained multi-frame target data to obtain a plurality of time intervals when the cover body is in the uncovering state; and a fifth determining unit, configured to determine a maximum time interval of the plurality of time intervals, and determine the preset duration based on the maximum time interval.
Optionally, in the apparatus for determining a device status provided in this embodiment of the present application, the fifth determining unit includes: and the second calculation module is used for calculating the sum of the maximum time interval and the error time interval and determining the sum as the preset time length.
The device state judging device comprises a processor and a memory, wherein the acquiring unit 81, the first determining unit 82, the second determining unit 83, the third determining unit 84 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and a complex cover opening and closing detection mechanism needs to be set to detect the state of the cover body of the cooking equipment in the related technology by adjusting the kernel parameters, and the detection result of the state of the cover body of the cooking equipment is inaccurate.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the application also provides a computer storage medium, wherein the computer storage medium is used for storing the program, and the program controls the equipment where the nonvolatile storage medium is located to execute the method for judging the equipment state when running.
The embodiment of the application also provides an electronic device, which comprises a processor and a memory; the memory stores computer readable instructions, and the processor is used for executing the computer readable instructions, wherein the computer readable instructions execute a method for judging the state of the equipment when running. The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (14)

1. A method for judging the state of equipment is characterized by comprising the following steps:
acquiring target data sent by a first wireless module through a second wireless module, wherein the second wireless module is arranged on a main body of target equipment, and the first wireless module is arranged on a cover body of the target equipment;
determining a time interval between the acquisition time of the target data of the previous frame and the acquisition time of the target data of the next frame, judging whether the time interval is greater than or equal to a preset time length, and obtaining a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length, wherein the first state is used for representing an uncovering state;
counting the acquisition times of the target data according to a first preset time period, judging whether the acquisition times of the target data are greater than or equal to preset times, and obtaining a second state of the cover body when the acquisition times of the target data are greater than or equal to the preset times, wherein the second state is used for representing the cover closing state;
and determining the current state of the cover body according to the first state and the second state.
2. The method of claim 1, wherein determining a time interval between an acquisition time of the target data of a previous frame and an acquisition time of the target data of a next frame comprises:
starting a first timer, and judging whether the target data is acquired before the first timer times to the preset time length;
when the target data is acquired, determining the current timing time of the first timer as the time interval, and controlling the first timer to count again;
and under the condition that the target data is not acquired, determining the preset duration as the time interval, and controlling the first timer to count again.
3. The method of claim 2, wherein counting the number of times of acquiring the target data according to a first preset time period comprises:
starting a second timer, controlling the second timer to time according to the first preset time period, and controlling the second timer to zero after finishing the timing of each first preset time period and to count again;
under the condition that the second timer is started for timing, starting a counter to count the acquisition times of the target data, and controlling the counter to count, clear and recount after the second timer finishes timing of each first preset actual period;
in the process of timing by the second timer, judging whether the condition that the timing of the first timer reaches the preset time length exists;
and when the condition that the timing of the first timer reaches the preset time length does not exist, acquiring the counting result of the counter under the condition that the timing of the second timer reaches the time length corresponding to the first preset time period, and determining the counting result as the acquisition frequency of the target data.
4. The method according to claim 3, wherein after determining whether there is a case that the timing of the first timer reaches the preset duration in the process of timing by the second timer, the method further comprises:
and when the condition that the timing of the first timer reaches the preset duration exists, controlling the second timer to zero and count again, and controlling the counter to zero and count again.
5. The method according to claim 3, wherein after determining whether there is a case that the timing of the first timer reaches the preset time length in the process of timing by the second timer, the method further comprises:
and when the counting time of the first timer reaches the preset time length, controlling the counter to stop counting or clear the counting until the second timer counts again.
6. The method of claim 1, wherein determining the current state of the cover from the first state and the second state comprises:
judging whether the first state and the second state appear in a second preset time period or not according to the second preset time period, wherein the second preset time period is more than or equal to the first preset time period;
and under the condition that the first state and the second state both appear in the second preset time period, determining the first state as the current state of the cover body.
7. The method of claim 1, wherein determining the current state of the cover from the first state and the second state comprises:
judging the appearance sequence of the first state and the second state in a third preset time period according to the third preset time period, wherein the time length corresponding to the third preset time period is more than or equal to the preset time length;
determining the first state as the current state of the cover body under the condition that the appearance sequence of the first state is prior;
and determining the second state as the current state of the cover body under the condition that the appearance sequence of the second state is prior.
8. The method according to claim 1, wherein before counting the number of times of acquiring the target data according to a first preset time period and determining whether the number of times of acquiring the target data is greater than or equal to a preset number of times, the method further comprises:
when the cover body is in a cover closing state, counting the acquisition times of the target data corresponding to a plurality of first preset time periods to obtain a plurality of acquisition times;
determining a minimum acquisition number of the plurality of acquisition numbers, and determining the preset number based on the minimum acquisition number.
9. The method of claim 8, wherein determining the preset number of times based on the minimum number of acquisitions comprises:
and calculating the difference value between the minimum acquisition times and the error times, and determining the difference value as the preset times.
10. The method according to claim 1, wherein before determining a time interval between an acquisition time of the target data of a previous frame and an acquisition time of the target data of a next frame and determining whether the time interval is greater than or equal to a preset time length each time the target data is acquired, the method further comprises:
counting time intervals corresponding to the obtained multiple frames of target data to obtain multiple time intervals when the cover body is in an uncovering state;
determining a maximum time interval of the plurality of time intervals, and determining the preset duration based on the maximum time interval.
11. The method of claim 10, wherein determining the preset duration based on the maximum time interval comprises:
and calculating the sum of the maximum time interval and the error time interval, and determining the sum as the preset time length.
12. An apparatus for determining a device status, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring target data sent by a first wireless module through a second wireless module, the second wireless module is arranged on a main body of target equipment, and the first wireless module is arranged on a cover body of the target equipment;
the first determining unit is used for determining a time interval between the acquisition time of the target data of the previous frame and the acquisition time of the target data of the next frame, judging whether the time interval is greater than or equal to a preset time length, and obtaining a first state of the cover body under the condition that the time interval is greater than or equal to the preset time length, wherein the first state is used for representing an uncovering state;
a second determining unit, configured to count the number of times of acquiring the target data according to a first preset time period, determine whether the number of times of acquiring the target data is greater than or equal to a preset number, and obtain a second state of the cover body when the number of times of acquiring the target data is greater than or equal to the preset number, where the second state is used to represent a cover closing state;
a third determining unit, configured to determine a current state of the cover according to the first state and the second state.
13. A non-volatile storage medium, characterized in that the non-volatile storage medium comprises a stored program, wherein the program controls a device in which the non-volatile storage medium is located to execute the method for determining the device status according to any one of claims 1 to 11 when the program runs.
14. An electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions are executed to perform the method for determining the device status according to any one of claims 1 to 11.
CN202210178529.7A 2022-02-24 2022-02-24 Method and device for judging equipment state, storage medium and electronic device Pending CN115081562A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210178529.7A CN115081562A (en) 2022-02-24 2022-02-24 Method and device for judging equipment state, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210178529.7A CN115081562A (en) 2022-02-24 2022-02-24 Method and device for judging equipment state, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115081562A true CN115081562A (en) 2022-09-20

Family

ID=83246303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210178529.7A Pending CN115081562A (en) 2022-02-24 2022-02-24 Method and device for judging equipment state, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115081562A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4209783A (en) * 1977-03-30 1980-06-24 Tokyo Shibaura Electric Co., Ltd. Object identification system
DE102011016089A1 (en) * 2011-04-05 2012-10-11 Sciknowtec Gmbh Method for detecting spatial approximation or separation of movable objects and/or system components, involves utilizing base units that determine transponder functions, and utilizing combinations of passive components for forming markings
CN110811289A (en) * 2018-08-10 2020-02-21 佛山市爱米吧科技有限公司 Rice cooking method and device, electric cooker, computer equipment and storage medium
CN111134525A (en) * 2018-11-06 2020-05-12 佛山市顺德区美的电热电器制造有限公司 Detection method and device for opening and closing cover of cooking appliance and cooking appliance
WO2020186723A1 (en) * 2019-03-21 2020-09-24 珠海格力电器股份有限公司 Lid opening and closing assembly, control method thereof, and electric cooking appliance
CN215383272U (en) * 2021-03-25 2022-01-04 九阳股份有限公司 Food processing appliance

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4209783A (en) * 1977-03-30 1980-06-24 Tokyo Shibaura Electric Co., Ltd. Object identification system
DE102011016089A1 (en) * 2011-04-05 2012-10-11 Sciknowtec Gmbh Method for detecting spatial approximation or separation of movable objects and/or system components, involves utilizing base units that determine transponder functions, and utilizing combinations of passive components for forming markings
CN110811289A (en) * 2018-08-10 2020-02-21 佛山市爱米吧科技有限公司 Rice cooking method and device, electric cooker, computer equipment and storage medium
CN111134525A (en) * 2018-11-06 2020-05-12 佛山市顺德区美的电热电器制造有限公司 Detection method and device for opening and closing cover of cooking appliance and cooking appliance
WO2020186723A1 (en) * 2019-03-21 2020-09-24 珠海格力电器股份有限公司 Lid opening and closing assembly, control method thereof, and electric cooking appliance
CN215383272U (en) * 2021-03-25 2022-01-04 九阳股份有限公司 Food processing appliance

Similar Documents

Publication Publication Date Title
CN109947079A (en) Region method for detecting abnormality and edge calculations equipment based on edge calculations
CN105045713A (en) Data processing method and mobile terminal
CN104503912A (en) Monitoring method and device for service responding process
CN108282490A (en) Processing method, device, computer equipment and the storage medium of abnormal registration user
US9569646B2 (en) Smart card reader
CN115713284A (en) Cargo access system and cargo access method
CN111163073A (en) Flow data processing method and device
CN110007857A (en) A kind of life-span prediction method and device of flash chip
CN111710151A (en) Infrared emission intensity detection system, method and device, storage medium and processor
CN110010224A (en) User movement data processing method, device, wearable device and storage medium
CN108093275B (en) Data processing method and device
CN115081562A (en) Method and device for judging equipment state, storage medium and electronic device
CN109061585B (en) Radar data storage method and device
CN109634822A (en) A kind of function time-consuming statistical method, device, storage medium and terminal device
CN110245046B (en) Data statistics method and device for Android App without buried points
CN107888457B (en) Port packet loss detection method and device and communication equipment
CN109996203A (en) Method, apparatus, electronic equipment and the computer readable storage medium of sensors configured
CN107623526B (en) A kind of method and communication terminal adjusting antenna receiving sensitivity
CN109729427A (en) The statistical method and device of rating duration
CN111651309B (en) Reliability test method and system for computer system
CN114747948B (en) Method and system for judging equipment state, storage medium and electronic device
CN116406953A (en) Equipment state judging method and device, storage medium and electronic device
CN109490788B (en) Method and device for predicting capacity of storage battery pack
CN113785327A (en) Image processing method, image processing device, edge calculation device and computer storage medium
CN107730780B (en) Information detection method and device based on smart antenna

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