Dumping state detection method and device for garbage canTechnical Field
The application relates to the technical field of inclination angle detection, in particular to a method and a device for detecting the dumping state of a garbage can.
Background
Along with the continuous development of internet of things, the intelligent degree of urban facilities is gradually improved, and more garbage cans are thrown into all corners of a city.
The garbage cans arranged in all places can be often influenced by external factors to dump, so that sanitation workers can regularly patrol the working state of each garbage can in a working area to ensure that the garbage cans can work normally all the time. However, the method of regularly patrolling cannot effectively solve many problems caused by the fact that the garbage can cannot be found to be toppled in time, and can occupy more working time of sanitation workers and reduce working efficiency.
In the related art, the tilt switch or the tilt sensor is used for acquiring the tilt state, but the tilt switch after leaving the factory cannot set the tilt angle, the tilt switch is not suitable for the garbage can arranged on a high slope, the failure rate is high, and the tilt sensor cannot realize real-time detection in a low power consumption state.
Disclosure of Invention
In view of the above, the present application provides a method and an apparatus for detecting a dumping status of a trash can to overcome the shortcomings of the prior art.
In order to achieve the purpose, the following technical scheme is adopted in the application:
the first aspect of the application provides a method for detecting the dumping state of a garbage can, the garbage can is provided with an acceleration detection module and an inclination angle detection module, the acceleration detection module can be awakened periodically, and the method comprises the following steps:
when receiving the acceleration detected by the acceleration detection module in real time in a wake-up period, judging whether the acceleration reaches a first threshold value;
if the acceleration reaching the first threshold value occurs twice in the current awakening period, and the time interval of the two occurrences is within a preset time range, acquiring the inclination angle detected by the inclination angle detection module;
judging whether the inclination angle reaches a second threshold value;
and if the inclination angle reaches the second threshold value, determining that the garbage can is in a dumping state currently.
Optionally, when receiving the acceleration detected by the acceleration detection module in real time within the wake-up period, determining whether the acceleration reaches a first threshold, specifically including:
receiving a first acceleration detected by the acceleration detection module, and judging whether the first acceleration reaches the first threshold value;
if the first acceleration reaches the first threshold, detecting whether a second acceleration detected by the acceleration detection module is received within the preset time range;
and if the second acceleration detected by the acceleration detection module is received, judging whether the second acceleration reaches the first threshold value.
Optionally, after receiving the first acceleration detected by the acceleration detection module and determining whether the first acceleration reaches the first threshold, the method further includes:
and if the first acceleration does not reach the first threshold value, triggering the acceleration detection module to enter a dormant state until the acceleration is detected again in real time in the next awakening period.
Optionally, after detecting whether the second acceleration detected by the acceleration detection module is received within the preset time range, the method further includes:
and if the second acceleration detected by the acceleration detection module is not received, triggering the acceleration detection module to enter a dormant state until the acceleration is detected again in real time in the next awakening period.
Optionally, after determining whether the second acceleration reaches the first threshold, the method further includes:
and if the second acceleration does not reach the first threshold value, triggering the acceleration detection module to enter a dormant state until the acceleration is detected again in real time in the next awakening period.
Optionally, the method further includes:
and if the inclination angle does not reach the second threshold value, determining that the garbage can is not in a dumping state currently.
Optionally, the first threshold is 18 mg.
Optionally, the preset time range is [25ms,500ms ].
A second aspect of the present application provides a dumping state detection device of a trash can, comprising:
a device main body;
the detection module is arranged on the device main body and used for providing detection data; the detection module comprises an acceleration detection module and an inclination angle detection module;
a main control chip disposed on the device main body, connected to the detection module, and configured to perform the method according to the first aspect of the present application.
Optionally, the detection module comprises a six-axis sensor.
The technical scheme provided by the application can comprise the following beneficial effects:
according to the scheme, the garbage can is provided with an acceleration detection module and an inclination angle detection module so as to obtain the acceleration of the garbage can in the dumping process and the inclination angle of the garbage can after dumping; the acceleration detection module is awakened periodically, so that the acceleration of the garbage can be detected regularly in a low-power-consumption state; by setting the first threshold value, whether the garbage can topples over under the action of external force and generates corresponding acceleration can be judged; whether the garbage can has second acceleration in the dumping process can be judged by setting a preset time range; when the acceleration reaching the first threshold value appears twice in the current awakening period, and the time interval appearing twice is in the preset time range, the situation that the garbage can topples over can be determined, but whether the situation that the garbage can topple over can influence the normal work of the garbage can cannot be determined, at this moment, the interference of the external environment can be eliminated through the setting of the second threshold value, and then whether the dumping of the garbage can occurs or not is judged, and whether the dumping degree enables the garbage can not continue to work normally or not is judged. Therefore, the real-time detection of the dumping state of each garbage can in the low-power consumption state can be realized without regularly patrolling the working state of each garbage can in the working area by a sanitation worker, the power utilization resource is effectively saved, and the working efficiency of the sanitation worker is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for detecting a dumping status of a trash can according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a dumping status detecting device of a trash can according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.
Examples
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for detecting a dumping status of a trash can according to an embodiment of the present disclosure.
As shown in fig. 1, in this embodiment, an acceleration detection module and an inclination detection module are disposed on a trash can using the method, and the acceleration detection module can be awakened periodically, and the method for detecting the dumping status of the trash can in this embodiment at least includes the following steps:
step 11, when receiving the acceleration detected by the acceleration detection module in real time in the wake-up period, judging whether the acceleration reaches a first threshold value;
step 12, if acceleration reaching a first threshold value occurs twice in the current wake-up period, and the time interval of the two occurrences is within a preset time range, acquiring the inclination angle detected by the inclination angle detection module;
specifically, the process that the garbage bin takes place to empty because of the exogenic action includes two parts: receive the exogenic action to begin to move and contact ground or other barrier stop motion, this in-process can produce twice acceleration, produce acceleration when first receiving exogenic action and leaving the quiescent condition, the second time can produce acceleration when just leaving the motion state, when detecting out twice acceleration that reaches first threshold value in presetting time span, can judge that the garbage bin has taken place the situation of empting, so, can further analyze the state of empting of garbage bin through the inclination that obtains inclination detection module detection.
Step 13, judging whether the inclination angle reaches a second threshold value;
and 14, if the inclination angle reaches a second threshold value, determining that the garbage can is in a dumping state currently.
In the scheme of the embodiment, the garbage can is provided with an acceleration detection module and an inclination angle detection module so as to obtain the acceleration and the inclination angle of the garbage can after dumping in the dumping process; the acceleration detection module is awakened periodically, so that the acceleration of the garbage can be detected regularly in a low-power-consumption state; by setting the first threshold value, whether the garbage can topples over under the action of external force and generates corresponding acceleration can be judged; whether the garbage can has second acceleration in the dumping process can be judged by setting a preset time range; when the acceleration reaching the first threshold value appears twice in the current awakening period, and the time interval appearing twice is in the preset time range, the situation that the garbage can topples over can be determined, but whether the situation that the garbage can topple over can influence the normal work of the garbage can cannot be determined, at this moment, the interference of the external environment can be eliminated through the setting of the second threshold value, and then whether the dumping of the garbage can occurs or not is judged, and whether the dumping degree enables the garbage can not continue to work normally or not is judged. Therefore, the real-time detection of the dumping state of each garbage can in the low-power consumption state can be realized without regularly patrolling the working state of each garbage can in the working area by a sanitation worker, the power utilization resource is effectively saved, and the working efficiency of the sanitation worker is improved.
The second threshold may be set according to actual requirements, and is not limited herein.
The acceleration detection module may include a gyro sensor, and the tilt detection module may include an acceleration sensor.
During specific implementation, the acceleration detection module and the inclination detection module can be arranged at the position on the upper side of the dustbin body of the dustbin, for example, the inner side of the dustbin cover above the dustbin is arranged, so that detection data can be collected more accurately.
It can be experimentally determined that the acceleration value in the range of less than 18mg during the dumping process is similar to the acceleration value generated by the equipment due to the environmental factors, and in order to avoid the disturbance of the environment, the first threshold value may be set to 18mg in some embodiments.
Because the garbage bin emptys and can produce the acceleration of two times within the time range of predetermineeing, for obtaining the maximum movement time, can empty the garbage bin and approximately consider into the free fall motion, the motion process approximately satisfies:
the height h is in the range of [0.5m,1.2m ]]From this, it can be derived that the time range is [316ms,489ms ]]Considering the detection delay and the reception delay, the preset time range under the free fall model can be determined as 300ms,500ms](ii) a To obtain the minimum motion time, the detection delay and the reception delay may be considered first, and the average is about 20ms, and the preset time minimum may be set to 25ms, so that, in some embodiments, the preset time range may be [25ms,500ms ]]。
In some embodiments, the determining whether the acceleration reaches the first threshold when receiving the acceleration detected by the acceleration detection module in real time in the wake-up period may specifically include:
receiving a first acceleration detected by an acceleration detection module, and judging whether the first acceleration reaches a first threshold value;
if the first acceleration reaches a first threshold value, whether a second acceleration detected by the acceleration detection module is received or not is detected within a preset time range;
and if the second acceleration detected by the acceleration detection module is received, judging whether the second acceleration reaches a first threshold value.
In specific implementation, the acceleration detection module in the dormant state is awakened at regular time, the awakened acceleration detection module detects the acceleration of the garbage can in real time, when the first acceleration sent by the acceleration detection module is received, whether the first acceleration reaches a first threshold value is judged firstly, whether the generated first acceleration is the acceleration generated due to the action of external force is judged, if the first acceleration is determined to be generated under the action of external force, the first acceleration is stored, whether the second acceleration sent by the acceleration detection module is received continuously within a preset time range, and if the second acceleration is received within the preset time range, whether the second acceleration reaches the first threshold value is judged continuously, so that whether the garbage can topples or not is known, and therefore, the low-power-consumption real-time detection is realized, and meanwhile, the phenomenon that the garbage can shakes due to environmental factors is effectively avoided, The interference of the conditions such as state change and the like during the cleaning of the garbage can on the detection of the dumping state.
In order to further save power consumption, in some embodiments, after receiving the first acceleration detected by the acceleration detection module and determining whether the first acceleration reaches the first threshold, the method for detecting the dumping status of the trash can may further include:
and if the first acceleration does not reach the first threshold value, triggering the acceleration detection module to enter a dormant state until the acceleration is detected again in real time in the next awakening period.
If the first acceleration does not reach the first threshold, the first acceleration generated under the current condition is not in accordance with the condition of toppling under the action of external force, the acceleration detection module can be triggered to enter the dormant state without storing the first acceleration or continuously detecting whether the second acceleration is received within the preset time range, so that the real-time detection under the low-power consumption state is realized, invalid data is also cleared in real time, and the memory is saved.
Correspondingly, after detecting whether the second acceleration detected by the acceleration detection module is received within the preset time range, the method for detecting the dumping state of the trash can further includes:
and if the second acceleration detected by the acceleration detection module is not received, triggering the acceleration detection module to enter a dormant state until the acceleration is detected again in real time in the next awakening period.
In specific implementation, if the second acceleration detected by the acceleration detection module is not received within the preset time range, it is indicated that the garbage can is possibly influenced by other factors and does not finish dumping under the action of external force, that is, the dumping of the current garbage can is not established, the storage of the first acceleration is cleared, and the acceleration detection module is triggered to continue to enter the sleep mode.
Similarly, after determining whether the second acceleration reaches the first threshold, the method for detecting the dumping status of the trash can may further include:
and if the second acceleration does not reach the first threshold value, clearing the storage of the first acceleration, and triggering the acceleration detection module to enter a dormant state until the acceleration is detected again in real time in the next awakening period.
In some embodiments, the method for detecting the dumping state of the trash can further includes:
and if the inclination angle does not reach the second threshold value, determining that the garbage can is not in the dumping state currently.
During specific implementation, even if the garbage can is dumped, if the inclination angle does not reach the second threshold value, the situation that the dumping of the garbage can is very small can be determined, the normal work of the garbage can is not influenced, at the moment, the garbage can is not in the dumping state currently, and meanwhile, the storage of the first acceleration and the second acceleration is eliminated. Therefore, the accuracy and effectiveness of the detection result are ensured, the interference brought by error information to sanitation workers is avoided, and the memory space is saved. For example, a trash can leaning against a wall may tilt such that the trash can rests against the wall, but the trash can still be used properly, and such dumping may occur without the need for a sanitation worker to go ahead.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a dumping status detecting device of a trash can according to another embodiment of the present application.
As shown in fig. 2, the present embodiment provides a dumping status detecting device for a trash can, including:
a devicemain body 201;
adetection module 202 provided on the apparatusmain body 201 for providing detection data; the detection module comprises an acceleration detection module and an inclination angle detection module;
themain control chip 203 disposed on the devicemain body 201 is connected to thedetection module 202, and is configured to perform the method according to any of the above embodiments.
For a specific implementation of the device for detecting a dumping state of a trash can provided by the embodiment of the present application, reference may be made to the implementation of the method for detecting a dumping state of a trash can described in any of the above embodiments, and details are not repeated here.
In some embodiments, the detection module may include a six-axis sensor.
When the garbage can dumping detection device is specifically implemented, the dumping state detection device of the garbage can be arranged at the position, on the upper side, of the garbage can body, so that the detection module can acquire detection data more accurately.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.