Dirt detection method and device, cleaning equipment and computer readable storage medium

By detecting multiple dirty values ​​in the cleaning equipment and judging the concentration of their distribution, the problem of bubbles in the cleaning products affecting the detection results is solved, and the detection accuracy is improved.

CN119423632APending Publication Date: 2025-02-14YUNJING INTELLIGENCE (SHENZHEN) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310963612.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-01
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When existing cleaning equipment detects the dirt level of cleaning products, air exists in the suction pipe, resulting in bubbles in the cleaning products, which in turn affects the accuracy of the detection results.

Method used

By obtaining multiple dirt values ​​detected by the dirt detector, we can determine whether there is a dirt value in the target group with a concentration of distribution that meets the preset requirements, determine the actual dirt level of the cleaning product, or determine whether there are bubbles in the cleaning product.

Benefits of technology

Eliminate the impact of air bubbles in cleaning products on the detection results, improve the accuracy of dirty detection results, and ensure the effectiveness of cleaning equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119423632A_ABST
    Figure CN119423632A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a dirt detection method and device, cleaning equipment and a computer readable storage medium. The smudginess detection method is applied to the cleaning equipment, the cleaning equipment comprises a blow-off pipeline and a smudginess detector, the blow-off pipeline is used for conveying cleaning products, and the smudginess detector is used for detecting the smudginess degree of the cleaning products in the blow-off pipeline; the method comprises the following steps: acquiring a plurality of smudginess values detected by a smudginess detector; based on the sizes of the multiple smudginess values, judging whether a target group smudginess value of which the distribution concentration degree meets a first preset requirement exists in the multiple smudginess values or not; when the target group of smudginess values exist in the plurality of smudginess values, determining the actual smudginess degree of the cleaning product in the blow-off pipeline based on at least part of the smudginess values in the plurality of smudginess values; and / or when the target group of smudginess values do not exist in the plurality of smudginess values, determining that bubbles exist in the cleaning product. According to the scheme, the influence of bubbles in the cleaning product on the detection result can be eliminated, and the accuracy of the detection result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cleaning equipment, and more specifically to a dirt detection method and device, cleaning equipment and a computer-readable storage medium. Background Art

[0002] At present, cleaning equipment has been widely used in daily life, and commonly used cleaning equipment include sweeping robots, handheld floor scrubbers, etc. During the cleaning process of the area to be cleaned and / or the self-cleaning process of the cleaning parts, it is usually necessary to perform contamination detection on the cleaning products (mainly including sewage) in the sewage pipe of the cleaning equipment.

[0003] In the related art, dirt detection can judge the clarity and turbidity of the cleaning product by the transmittance of light after passing through the cleaning product. The higher the transmittance, the cleaner the cleaning product; conversely, the more turbid the cleaning product. However, during the process of the cleaning equipment sucking the cleaning product, due to the presence of air in the suction pipe, the cleaning product may contain bubbles. This results in a low measured transmittance, which cannot truly reflect the degree of dirtiness of the cleaning product, thus affecting the use effect of the cleaning equipment. Summary of the invention

[0004] The present invention is proposed in view of the above problems. According to one aspect of the present invention, a dirt detection method is provided, which is applied to a cleaning device, wherein the cleaning device includes a sewage pipe and a dirt detector, the sewage pipe is used to transport cleaning products, and the dirt detector is used to detect the degree of dirtiness of the cleaning products in the sewage pipe; the method includes: obtaining multiple dirt values ​​detected by the dirt detector; based on the sizes of the multiple dirt values, judging whether there is a target group of dirt values ​​whose distribution concentration meets the first preset requirement among the multiple dirt values; when there is a target group of dirt values ​​among the multiple dirt values, determining the actual degree of dirtiness of the cleaning products in the sewage pipe based on at least some of the multiple dirt values; and / or, when there is no target group of dirt values ​​among the multiple dirt values, determining that there are bubbles in the cleaning products.

[0005] Exemplarily, based on the sizes of multiple dirt values, it is determined whether there is a target group dirt value whose distribution concentration meets the first preset requirement among the multiple dirt values, including: generating a histogram of multiple dirt values ​​based on the sizes of the multiple dirt values; searching for a first target segment that meets the second preset requirement from the histogram, the lower limit of the first target segment being the lower limit of a non-empty interval in the histogram, and the upper limit of the first target segment being the upper limit of a non-empty interval in the histogram, wherein the second preset requirement includes: the total number of dirt values ​​contained in the first target segment is greater than or equal to the first number threshold, and the number of intervals contained in the first target segment is less than or equal to the second number threshold; if there is a first target segment that meets the second preset requirement, it is determined that there is a target group dirt value among the multiple dirt values, otherwise it is determined that there is no target group dirt value among the multiple dirt values; wherein the non-empty interval is an interval in which the number of dirt values ​​contained is not 0; wherein, in the case that there is a first target segment that meets the second preset requirement, the dirt value contained in the first target segment is the target group dirt value

[0006] Exemplarily, the second preset requirement also includes: when the first target segment includes at least one non-empty interval, the number of consecutive empty intervals in the first target segment is less than or equal to a third quantity threshold; and / or the lower limit of the first target segment is greater than or equal to the target lower limit threshold; wherein the empty interval is an interval containing 0 dirtiness values.

[0007] Exemplarily, searching for the first target segment that meets the second preset requirement from the histogram includes: traversing the intervals of the histogram in order from large to small interval ranges, accumulating the number of intervals and the total number of dirt values ​​contained in the intervals, until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold, or until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold or the accumulated number of intervals is equal to the second number threshold, so as to obtain a cumulative result; if the cumulative result meets the second preset requirement when the accumulation is stopped, it is determined that there is a first target segment that meets the second preset requirement, and if the cumulative result does not meet the second preset requirement when the accumulation is stopped, it is determined that there is no first target segment that meets the second preset requirement; wherein, when the cumulative result meets the second preset requirement when the accumulation is stopped, the interval counted in the cumulative result is the interval included in the first target segment.

[0008] Exemplarily, the intervals of the histogram are traversed in order from large to small interval ranges, and the number of intervals and the total number of dirt values ​​contained in the intervals are accumulated until the total number of dirt values ​​accumulated is greater than or equal to a first number threshold, or until the total number of dirt values ​​accumulated is greater than or equal to the first number threshold or the number of intervals accumulated is equal to a second number threshold, to obtain a cumulative result, including: when the current accumulated number of intervals is equal to the second number threshold and the current accumulated total number of dirt values ​​is less than the first number threshold, resetting the accumulated number of intervals and the total number of dirt values ​​accumulated or deleting the number of dirt values ​​contained in the second target segment and the number of intervals contained in the second target segment from the current cumulative result, and continuing to traverse the intervals of the histogram, wherein the second target segment is one or more intervals traversed first among the intervals counted in the current cumulative result.

[0009] Exemplarily, the second preset requirement also includes: the number of consecutive empty intervals in the first target segment is less than or equal to a third quantity threshold; traversing the intervals of the histogram in order from large to small interval ranges, accumulating the number of intervals of the intervals and the total number of dirt values ​​contained in the intervals, until the total number of accumulated dirt values ​​is greater than or equal to the first quantity threshold, or until the total number of accumulated dirt values ​​is greater than or equal to the first quantity threshold or the accumulated number of intervals is equal to the second quantity threshold, to obtain a cumulative result, including: when the number of consecutive empty intervals in the corresponding cumulative result when traversing to the next interval reaches the third quantity threshold, stopping the accumulation, or resetting the accumulated The number of intervals and the total number of dirt values ​​accumulated and continue to traverse the intervals of the histogram; and / or, the second preset requirement also includes: the lower limit of the first target segment is greater than or equal to the target lower limit threshold; traverse the intervals of the histogram in order from large to small interval range, accumulate the number of intervals and the total number of dirt values ​​contained in the intervals, until the total number of dirt values ​​accumulated is greater than or equal to the first number threshold, or until the total number of dirt values ​​accumulated is greater than or equal to the first number threshold or the accumulated number of intervals is equal to the second number threshold, to obtain the accumulation result, including: stopping the accumulation when the lowest lower limit of the currently traversed interval is equal to the target lower limit threshold.

[0010] Exemplarily, before searching the histogram for the first target segment that meets the second preset requirement, the method also includes: obtaining the number of empty intervals and the number of non-empty intervals in the histogram; wherein the empty interval is an interval containing 0 dirt values; calculating the ratio of the number of empty intervals to the number of non-empty intervals; determining whether the ratio is greater than a ratio threshold; and the operation of searching the histogram for the first target segment that meets the second preset requirement is performed when the ratio is greater than the ratio threshold.

[0011] Exemplarily, based on the sizes of multiple dirt values, determining whether there is a target group dirt value whose distribution concentration meets the first preset requirement among the multiple dirt values ​​includes: clustering the multiple dirt values ​​based on the sizes of the multiple dirt values ​​to obtain at least one cluster; determining the cluster with the largest cluster center among the at least one cluster as the target cluster; based on the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster, determining whether the distribution concentration of the target cluster meets the first preset requirement, wherein the distribution concentration of the target cluster meets the first preset requirement. The degree is expressed by a ratio or a parameter value positively correlated with the ratio; when the distribution concentration degree of the target cluster cluster meets the first preset requirement, it is determined that there is a target group dirtiness value among the multiple dirtiness values; when the distribution concentration degree of the target cluster cluster does not meet the first preset requirement, it is determined that there is no target group dirtiness value among the multiple dirtiness values; wherein, the span of the target cluster cluster is the difference between the maximum dirtiness value and the minimum dirtiness value in the target cluster cluster; wherein, when the distribution concentration degree of the target cluster cluster meets the first preset requirement, the dirtiness value contained in the target cluster cluster is the target group dirtiness value.

[0012] Exemplarily, based on the ratio between the number of dirt values ​​in the target clustering cluster and the span of the target clustering cluster, judging whether the distribution concentration degree of the target clustering cluster meets the first preset requirement, including: based on the ratio between the number of dirt values ​​in the target clustering cluster and the span of the target clustering cluster, judging whether the distribution concentration degree of the target clustering cluster is greater than the degree threshold; if the distribution concentration degree of the target clustering cluster is greater than the degree threshold, determining that the distribution concentration degree of the target clustering cluster meets the first preset requirement.

[0013] Exemplarily, based on at least some of the multiple dirtiness values, determining the actual dirtiness of the cleaning product in the sewage pipe includes: determining the cluster center of the target cluster as the target dirtiness value, and the actual dirtiness is represented by the target dirtiness value.

[0014] Exemplarily, based on at least some of the multiple dirtiness values, the actual dirtiness level of the cleaning product in the sewage pipe is determined, including: calculating the average of multiple dirtiness values ​​in the target group of dirtiness values ​​as the target dirtiness value, or determining any dirtiness value in the target group of dirtiness values ​​as the target dirtiness value; wherein the actual dirtiness level is represented by the target dirtiness value.

[0015] Exemplarily, before calculating the average of multiple dirt values ​​in the target group of dirt values ​​as the target dirt value, the method also includes: selecting multiple dirt values ​​that are located at the front in descending order from the target group of dirt values ​​as multiple dirt values ​​for calculating the target dirt value.

[0016] Exemplarily, the cleaning device also includes a cleaning piece, which is used to clean the dirt in the area to be cleaned to obtain a cleaning product, obtain multiple dirt values ​​detected by the dirt detector, and based on the sizes of the multiple dirt values, determine whether there is a target group of dirt values ​​whose distribution concentration meets the first preset requirement among the multiple dirt values. The operation is performed during the self-cleaning process for the cleaning piece, wherein the method also includes: when bubbles are detected in the cleaning product during the current self-cleaning process, a debubble operation is performed during the next self-cleaning process.

[0017] Exemplarily, the cleaning equipment also includes a suction component, which is used to provide power to allow the cleaning product to pass through the sewage pipe, and the debubbling operation includes increasing the water pumping capacity of the suction component, and / or the cleaning equipment also includes a clean water tank, which is used to store clean water, and the clean water is used to provide it to the cleaning parts or to the area to be cleaned for cleaning, and the debubbling operation includes increasing the water supply of the clean water tank.

[0018] According to a second aspect of the present invention, there is also provided a dirt detection device, which is applied to a cleaning device, the cleaning device comprising a sewage pipe and a dirt detector, the sewage pipe is used to transport cleaning products, and the dirt detector is used to detect the degree of dirtiness of the cleaning products in the sewage pipe; the dirt detection device comprises a processor and a memory, wherein a computer program / instructions are stored in the memory, and the computer program / instructions are used to execute the above-mentioned dirt detection method when the processor is running.

[0019] According to a third aspect of the present invention, a cleaning device is also provided, comprising: a sewage pipe and a dirt detector, the sewage pipe is used to transport cleaning products, and the dirt detector is used to detect the degree of dirtiness of the cleaning products in the sewage pipe; wherein the cleaning device also includes the above-mentioned dirt detection device.

[0020] According to a fourth aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program / instruction, which implements the above-mentioned dirt detection method when executed by a processor.

[0021] According to the above scheme, by judging whether there is a target group dirtiness value whose distribution concentration meets the first preset requirement among the multiple dirtiness values, and when there is a target group dirtiness value among the multiple dirtiness values, using at least part of the multiple dirtiness values ​​to determine the actual dirtiness of the cleaning product, and / or, when there is no target group dirtiness value among the multiple dirtiness values, determining that there are bubbles in the cleaning product. This helps to eliminate the influence of bubbles in the cleaning product on the detection results and improve the accuracy of the detection results.

[0022] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0024] Figure 1 An exemplary flow chart of a dirt detection method according to an embodiment of the present application is shown;

[0025] Figure 2 shows a histogram according to one embodiment of the present application; and

[0026] Figure 3 An exemplary flow chart of a dirt detection method according to a specific embodiment of the present application is shown. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical scheme and advantages of the present invention more obvious, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present invention.

[0028] Cleaning equipment is widely used in daily life, and commonly used cleaning equipment includes sweeping robots, handheld floor scrubbers, etc. The cleaning operation of the cleaning equipment may include cleaning the area to be cleaned (which may be referred to as area cleaning) and / or self-cleaning the cleaning parts. In the cleaning equipment, the area to be cleaned is cleaned, and / or, the cleaning equipment performs self-cleaning after completing the cleaning of at least part of the area to be cleaned, and it is usually necessary to detect the dirtiness of the cleaning products (mainly including sewage) in the sewage pipe of the cleaning equipment. The dirtiness detection result can be used as a basis for whether repeated cleaning is required during the cleaning process of the area to be cleaned, and / or, whether repeated self-cleaning is required during the self-cleaning process. That is, in the cleaning process of the cleaning equipment for the area to be cleaned, if the dirtiness detection result shows that the current dirtiness is high, it can be determined that the current area to be cleaned needs to be cleaned again. In the self-cleaning process after the cleaning equipment completes the cleaning of at least part of the area to be cleaned, if the dirtiness detection result shows that the current dirtiness is high, it can be determined that the cleaning parts of the cleaning equipment need to be self-cleaned again, and / or, it is necessary to clean at least part of the current area to be cleaned again. The cleaning parts described herein may include but are not limited to one or more of a roller brush, a roller, a mop, etc. The cleaning products described herein may include sewage and / or solid waste, among other things.

[0029] Taking a sweeping robot as an example, after the sweeping robot has finished cleaning the area to be cleaned or during the cleaning process, in order to ensure the cleaning effect, it may return to the corresponding base station for self-cleaning. A cleaning area corresponding to the cleaning parts of the sweeping robot is provided in the base station. The cleaning parts are cleaned in the cleaning area, and the cleaning products (such as sewage and other dirt) after cleaning are discharged through the sewage pipe. By detecting the dirtiness of the cleaning products in the sewage pipe, the degree of dirtiness of the self-cleaning effect of the sweeping robot can be judged, so as to determine whether repeated self-cleaning is needed; and / or, by detecting the dirtiness of the cleaning products in the sewage pipe, the amount of dirt brought back by the cleaning parts after cleaning the area to be cleaned this time can be determined, and the amount of dirt can correspond to the degree of dirtiness of the area to be cleaned, and then it can be determined whether the area to be cleaned needs to be cleaned repeatedly according to the degree of dirtiness of the area to be cleaned.

[0030] In order to detect the dirtiness of the cleaning product, a detection scheme based on the transmittance of light after passing through the cleaning product can be used to judge the degree of dirtiness of the cleaning product. The higher the transmittance, the cleaner the cleaning product; conversely, the more turbid the cleaning product. However, in the process of the cleaning equipment sucking the cleaning product, bubbles may be contained in the cleaning product due to the presence of air in the suction pipe and / or the large suction force during the suction process. When bubbles are present in the cleaning product, the transmittance of the detected cleaning product decreases. The detection result cannot accurately reflect the degree of dirtiness of the cleaning product, thereby affecting the judgment of the regional cleaning effect and / or self-cleaning effect of the cleaning equipment, and further resulting in a meaningless increase in the number of regional cleaning times and / or self-cleaning times.

[0031] Based on the above situation, the present application provides a dirt detection method and device, a cleaning device and a computer-readable storage medium. The method can eliminate the influence of bubbles in the cleaning product on the dirt detection result and improve the accuracy of the dirt detection result.

[0032] According to one aspect of an embodiment of the present application, a dirt detection method is provided. The dirt detection method is applied to a cleaning device. The cleaning device includes a sewage pipe and a dirt detector, the sewage pipe is used to transport cleaning products, and the dirt detector is used to detect the degree of dirtiness of the cleaning products in the sewage pipe.

[0033] Optionally, the dirt detector can be any existing or future developed photoelectric liquid transmittance sensor that uses light transmittance to detect the degree of dirtiness of the cleaning product. In a specific embodiment, the dirt detector can be an infrared detection device. The infrared detection device includes an infrared transmitting tube and an infrared receiving tube. The infrared transmitting tube emits quantifiable infrared light, and the infrared receiving tube receives the infrared light. When the infrared light passes through the sewage in the sewage pipe, physical phenomena such as reflection, refraction, and transmission will occur, causing the infrared light on the path to be attenuated and blocked. Finally, the degree of dirtiness of the cleaning product is determined based on the signal strength received by the infrared receiving tube.

[0034] The dirt detector can be set in any suitable position, as long as its detection range can cover the area to be tested in the sewage pipe. Optionally, the dirt detector can be set outside the sewage pipe. For example, the dirt detector can be set on the inner wall of the shell of the cleaning equipment. This embodiment is convenient for replacing the dirt detector when it fails. When the dirt detector is set outside the sewage pipe, the sewage pipe can be made of transparent material to avoid the color of the sewage pipe itself affecting the detection results. Alternatively, the dirt detector can be set inside the sewage pipe. Compared with setting the dirt detector outside the sewage pipe, setting the dirt detector inside the sewage pipe can avoid the introduction of uncontrollable variable factors as much as possible, and can also avoid missed detection, which is conducive to improving the accuracy of the detection results.

[0035] Figure 1 FIG. 1 is an exemplary flow chart of a dirt detection method according to an embodiment of the present application. Figure 1 As shown, the dirt detection method 100 may include step S110 , step S120 and step S130 .

[0036] Step S110, obtaining a plurality of dirt values ​​detected by the dirt detector.

[0037] Optionally, the multiple dirt values ​​may be obtained by the dirt detector according to the preset frequency within the preset time. The preset frequency can be set according to actual needs. The larger the preset frequency, the more times the dirt values ​​are obtained per unit time, the more computing resources are occupied, and the more accurate the judgment result of the distribution concentration degree such as described below based on the multiple dirt values. The smaller the preset frequency, the fewer times the dirt values ​​are obtained per unit time, the fewer computing resources are occupied, but the judgment result of the distribution concentration degree such as described below based on the multiple dirt values ​​may be less accurate. In a specific embodiment, the preset time may be 3s. The preset frequency can be set to 2Hz. The number of samples per frame can be 10 groups. That is, the dirt values ​​are collected twice per second, and 10 dirt values ​​are collected each time. In this way, the number of dirt values ​​obtained in step S110 can be 60. The dirt value can be information that can represent the degree of dirtiness of the cleaning product. The dirt value can be the light intensity detected by the above-mentioned photoelectric liquid transmittance sensor, or it can be information further determined based on the light intensity, such as the transmittance value.

[0038] Optionally, the preset time can be set according to the type of cleaning device. As described above, the cleaning device can be a sweeping robot, a handheld floor scrubber, etc. It is understandable that the working process of different cleaning devices is different. Therefore, different preset time lengths can be set according to the type of cleaning device. This ensures that sufficient dirtiness values ​​can be obtained for each type of cleaning device.

[0039] Exemplarily, the cleaning device is a floor scrubber. When the floor scrubber performs a cleaning task on the area to be cleaned, the preset time may be greater than or equal to the first time threshold, and the preset time may be less than or equal to the second time threshold. When the floor scrubber performs a self-cleaning task, the preset time may be the time corresponding to the last self-cleaning operation in the self-cleaning process.

[0040] In some embodiments, the floor scrubber may include a clean water tank, a liquid supply pipe, a cleaning part, a suction pipe, a sewage tank, etc. Taking a floor scrubber whose cleaning part is a roller brush as an example, when the floor scrubber performs a cleaning task for the area to be cleaned, the clean water in the clean water tank is transported to the roller brush and / or the ground via the liquid supply pipe. The roller brush rotates and contacts the area to be cleaned to clean the area to be cleaned. The sewage on the roller brush is transported to the sewage tank via the suction pipe. When the floor scrubber performs a self-cleaning task, the roller brush rotates, and the clean water in the clean water tank is transported to the roller brush via the liquid supply pipe. The sewage on the roller brush is transported to the sewage tank via the suction pipe. When the floor scrubber performs a cleaning task for the area to be cleaned, by setting the preset time to be greater than or equal to the first duration threshold, and the preset time to be less than or equal to the second duration threshold, the accuracy of the judgment result of the obtained dirtiness value such as the distribution concentration degree described below can be guaranteed, and the dirtiness value data can be prevented from occupying more computing resources. In a specific embodiment, the first duration threshold can be 1s, and the second duration threshold can be 5s. When the floor scrubber performs a self-cleaning task, the self-cleaning mode corresponding to the self-cleaning task may include one or more self-cleaning operations. The preset time is set to the time corresponding to the last self-cleaning operation in the self-cleaning process, so that the dirtiness value obtained can represent the dirtiness of the dirt product after the last self-cleaning operation, and the dirtiness can more accurately reflect the dirtiness of the floor scrubber after performing the self-cleaning task. In a specific embodiment, if the time required for the last self-cleaning operation when the cleaning device performs self-cleaning is 10 seconds, then the preset time can be set to 10s.

[0041] Exemplarily, the cleaning device is a sweeping robot. The preset time can be determined according to the sewage discharge time when the sweeping robot performs the self-cleaning task. As described above, a cleaning area corresponding to the cleaning parts of the sweeping robot is provided in the base station corresponding to the sweeping robot. The cleaning parts are cleaned in the cleaning area, and the cleaned cleaning products (such as sewage and other dirt) are discharged through the sewage pipe. In the process of the cleaning products being discharged, the degree of dirtiness of the cleaning products can be detected by the dirtiness detector. In some embodiments, the preset time may be equal to the sewage discharge time. Alternatively, the preset time may also be the first time after the sewage discharge speed stabilizes. The first time may be 3s. It can be understood that when sewage discharge starts, the sewage discharge speed fluctuates greatly and the possibility of generating bubbles is high. The dirtiness value obtained at this time itself has poor accuracy. After the sewage discharge speed stabilizes, the possibility of bubbles appearing in the cleaning product is small, and the dirtiness value itself has high accuracy, thereby more accurately reflecting the degree of dirtiness of the cleaning product.

[0042] Optionally, the dirtiness value obtained may be positively correlated with the degree of dirtiness of the cleaning product, or may be negatively correlated with the degree of cleanliness of the cleaning product. When a photoelectric liquid transmittance sensor such as an infrared detection device is used to detect the degree of dirtiness of the cleaning product, the received signal represents light intensity (i.e., light intensity), and its magnitude is in the range of [0,255]. In one embodiment, a corresponding conversion relationship between the dirtiness value and the signal intensity may be established to convert the received signal intensity into a corresponding dirtiness value. The corresponding conversion relationship between the dirtiness value and the signal intensity may be dirtiness value = 255-signal intensity. At this point, the dirtiness value obtained may be positively correlated with the degree of dirtiness of the cleaning product. The larger the dirtiness value, the dirtier the cleaning product. Alternatively, the signal intensity received by the dirtiness detector may be directly used as the dirtiness value. In other words, the received light intensity may be directly used as the dirtiness value. In this embodiment, the dirtiness value is negatively correlated with the degree of dirtiness of the cleaning product. The larger the dirtiness value, the cleaner the cleaning product.

[0043] Step S120 , based on the magnitudes of the plurality of contamination values, determining whether there is a target group of contamination values ​​whose distribution concentration degree meets a first preset requirement among the plurality of contamination values.

[0044] The first preset requirement may represent the distribution concentration of the dirtiness value when there are no bubbles in the cleaning product or there are few bubbles in the cleaning product and the influence on the dirtiness value of the cleaning product can be ignored, which is determined in advance by theory or test. It can be understood that when there are bubbles and there are many bubbles in the cleaning product, the obtained dirtiness value data fluctuates greatly, and multiple dirtiness value data will be distributed in more different sections based on the value size. When there are no bubbles in the cleaning product or there are few bubbles in the cleaning product and the influence on the dirtiness value of the cleaning product can be ignored, the cleaning product in the sewage pipe is uniform and stable. The multiple dirtiness values ​​obtained are close in size, that is, multiple dirtiness value data will be distributed in a certain section more concentratedly based on the value size. The dirtiness value in the more concentrated section can be regarded as the target group dirtiness value. Therefore, it can be determined whether the obtained dirtiness value can accurately reflect the dirtiness degree of the cleaning product by whether there is a target group dirtiness value in multiple dirtiness values.

[0045] The method for determining whether there is a target group dirtiness value among multiple dirtiness values ​​can be determined by any suitable concentration degree analysis method currently available or developed in the future. For example, it can be determined whether there is a target group dirtiness value among multiple dirtiness values ​​based on a histogram or a clustering algorithm. The specific determination method is described in detail below. For the sake of brevity, it will not be repeated here.

[0046] After the judgment result is obtained through step S120, step S130 may be performed according to the judgment result. Step S130 may include: when there is a target group dirtiness value among the multiple dirtiness values, determining the actual dirtiness of the cleaning product in the sewage pipe based on at least some of the multiple dirtiness values; and / or, when there is no target group dirtiness value among the multiple dirtiness values, determining that there are bubbles in the cleaning product.

[0047] In one embodiment, step S130 may include: when there is a target group dirtiness value among the multiple dirtiness values, based on at least part of the multiple dirtiness values, determining the actual dirtiness of the cleaning product in the sewage pipe. In this embodiment, when there is no target group dirtiness value among the multiple dirtiness values, no operation may be performed, or any operation may be performed, such as controlling the cleaning device to continue to perform the cleaning operation for the area to be cleaned or to continue to perform the self-cleaning operation. In another embodiment, step S130 may include: when there is no target group dirtiness value among the multiple dirtiness values, determining that there are bubbles in the cleaning product. In this embodiment, when there is a target group dirtiness value among the multiple dirtiness values, no operation may be performed, or any operation may be performed, such as outputting prompt information about the presence of the target group dirtiness value among the multiple dirtiness values. In yet another embodiment, step S130 may include: when there is a target group dirtiness value among the multiple dirtiness values, based on at least part of the multiple dirtiness values, determining the actual dirtiness of the cleaning product in the sewage pipe; when there is no target group dirtiness value among the multiple dirtiness values, determining that there are bubbles in the cleaning product.

[0048] As described above, whether the multiple dirt values ​​accurately reflect the dirtiness of the cleaning product can be determined based on whether the target group dirtiness value exists in the multiple dirtiness values. If the target group dirtiness value exists in the multiple dirtiness values, it can be considered that the multiple dirtiness values ​​obtained can accurately reflect the dirtiness of the cleaning product.

[0049] Optionally, at least part of the dirtiness values ​​may be all of the dirtiness values ​​among the multiple dirtiness values. Alternatively, at least part of the dirtiness values ​​may be selected from the multiple dirtiness values ​​as needed. For example, at least part of the dirtiness values ​​may be one or more specific dirtiness values ​​among the multiple dirtiness values. The specific dirtiness value may be the maximum value, the minimum value, or multiple dirtiness values ​​within a specific interval among the multiple dirtiness values. The dirtiness values ​​included in the specific interval may be the target group dirtiness values. For example, in step S130, when the target group dirtiness value exists among the multiple dirtiness values, the actual dirtiness degree of the cleaning product in the sewage pipe may be determined based on the target group dirtiness value.

[0050] When the target group dirtiness value does not exist among the multiple dirtiness values, it is determined that there are bubbles in the cleaning product. As described above, when bubbles exist in the cleaning product, the dirtiness value data obtained fluctuates greatly, and the multiple dirtiness value data will be distributed in different sections based on the numerical values. Therefore, when the target group dirtiness value does not exist among the multiple dirtiness values, it can be determined that there are bubbles in the cleaning product. It can be understood that the presence of bubbles (or the existence of bubbles) in the cleaning product means that the amount of bubbles in the cleaning product is sufficient to have a significant impact on the dirtiness value of the cleaning product; accordingly, the absence of bubbles (or the absence of bubbles) in the cleaning product means that the amount of bubbles in the cleaning product is not enough to have a significant impact on the dirtiness value of the cleaning product or the impact is negligible.

[0051] According to the above scheme, by judging whether there is a target group dirtiness value whose distribution concentration meets the first preset requirement among the multiple dirtiness values, and when there is a target group dirtiness value among the multiple dirtiness values, using at least part of the multiple dirtiness values ​​to determine the actual dirtiness of the cleaning product, and / or, when there is no target group dirtiness value among the multiple dirtiness values, determining that there are bubbles in the cleaning product. This helps to eliminate the influence of bubbles in the cleaning product on the detection results and improve the accuracy of the detection results.

[0052] Exemplarily, step S120, based on the sizes of the multiple dirt values, determines whether there is a target group of dirt values ​​whose distribution concentration meets the first preset requirement among the multiple dirt values, which may include the following steps S121, S122 and S123.

[0053] Step S121: generating a histogram of multiple dirt values ​​based on the sizes of the multiple dirt values.

[0054] Step S122, searching the histogram for a first target segment that meets a second preset requirement, wherein the lower limit of the first target segment is the lower limit of a non-empty interval in the histogram, and the upper limit of the first target segment is the upper limit of a non-empty interval in the histogram. The second preset requirement includes: the total number of dirt values ​​included in the first target segment is greater than or equal to a first number threshold (hereinafter referred to as the dirt value number condition), and the number of intervals included in the first target segment is less than or equal to a second number threshold (hereinafter referred to as the total number of intervals condition).

[0055] Step S123: If there is a first target segment that meets the second preset requirement, it is determined that there is a target group dirtiness value in the multiple dirtiness values, otherwise it is determined that there is no target group dirtiness value in the multiple dirtiness values. Wherein, a non-empty interval is an interval in which the number of dirtiness values ​​included is not 0. In the case that there is a first target segment that meets the second preset requirement, the dirtiness value included in the first target segment is the target group dirtiness value.

[0056] It can be understood that the histogram includes multiple continuous intervals, and the lengths of each interval can be the same. The first target segment can include one interval or multiple continuous intervals in the histogram. The first target segment that meets the second preset requirement can be searched in multiple continuous intervals of the histogram. Assuming that the currently found interval is a non-empty interval, and the next interval of the currently found interval is an empty interval (that is, an interval containing 0 dirt values), if the second preset requirement is met when the current interval is found, there is no need to continue searching for the next interval. Therefore, the first interval found and the last interval found in the first target segment are both non-empty intervals.

[0057] Optionally, the interval length of each interval in the histogram can be set according to the fluctuation value of the dirt value corresponding to the cleaning product when there are or are not bubbles. Among them, the fluctuation value of the dirt value corresponding to the cleaning product when there are or are not bubbles represents the difference between the dirt value detected when there are bubbles and the dirt value detected when there are no bubbles of the same cleaning product determined in advance by theory or test. The above fluctuation value can be an empirical value, that is, it can be predetermined by testing. It can be understood that if the interval length is too small, the number of dirt values ​​falling into each interval is small, which is easy to cause inaccurate analysis of the distribution concentration of the dirt value, and it is impossible to accurately determine the target group dirt value among multiple dirt values, thereby causing inaccurate dirt detection results. If the interval length is too large (for example, exceeding the above fluctuation value), it is easy to cause invalid dirt values ​​(i.e., the dirt value corresponding to the cleaning product with bubbles or the dirt value detected due to the detection error of the dirt detector) to fall into the interval contained in the first target section, which also affects the accuracy of the dirt detection result. Therefore, the length of each interval in the histogram can be determined according to the fluctuation value obtained by the test. In some embodiments, the dirtiness value is the signal strength received by the dirtiness detector. When the fluctuation value is 40, the interval length of each interval may be in the range of [10, 20].

[0058] Optionally, the size of the second quantity threshold can be determined according to the interval length and the fluctuation value of the dirtiness value. The introduction of invalid dirtiness values ​​into the first target segment can be avoided by making the length of the first target segment less than or equal to the fluctuation value. In some embodiments, the second quantity threshold is equal to the ratio of the fluctuation value to the interval length. In a specific embodiment, if the fluctuation value is 40 and the interval length is 10, the second quantity threshold can be 4.

[0059] Optionally, the size of the first quantity threshold can be determined according to the total number of dirt values ​​obtained in step S110. For example, the first quantity threshold can be 1 / 4 of the total number of dirt values. In the above embodiment where the total number of dirt values ​​is 60, the first quantity threshold can be 15. Alternatively, the first quantity threshold can also be determined according to the maximum number of intervals in the first target segment (i.e., the second quantity threshold). The larger the second quantity threshold, the larger the first quantity threshold. The smaller the second quantity threshold, the smaller the first quantity threshold. It can be understood that the more dirt values ​​there are in the second quantity threshold interval, the more concentrated the data distribution of multiple dirt values, and the more dirt values ​​are included in the target group dirt values; otherwise, vice versa. Therefore, a suitable first quantity threshold can be set according to the second quantity threshold. For example, when the total number of dirt values ​​is 60 and the interval length of the histogram is 10, the second quantity threshold can be 4 and the first quantity threshold can be 15.

[0060] Optionally, the order of searching for the first target segment in each interval in the histogram can be selected as needed. For example, the search can be performed from small to large according to the size of the interval range, or from large to small according to the size of the interval range. The size of the interval range of each interval can be represented by the upper or lower limit of each interval, that is, the higher the upper or lower limit of the interval, the larger the interval range, and conversely, the lower the upper or lower limit of the interval, the smaller the interval range. Exemplarily, the first target segment that meets the second preset requirement can be searched in the histogram in the order of the degree of dirtiness corresponding to each interval range. As described above, when bubbles are present in the cleaning product, the transmittance of the cleaning product detected is reduced, and the degree of dirtiness detected is dirtier than the actual degree of dirtiness. Therefore, it is possible to start traversing from the interval with a lower degree of dirtiness, thereby reducing the influence of bubbles that may exist in the cleaning product on the detection results and improving the accuracy of the detection results.

[0061] According to the above technical solution, by generating a histogram of multiple dirtiness values ​​and searching for the first target section that meets the second preset requirement in the histogram, it is possible to quickly and accurately determine whether there is a target group of dirtiness values ​​in the multiple dirtiness values ​​according to the distribution of the dirtiness values ​​in each interval of the histogram. This solution is conducive to accurately determining the dirtiness of the cleaning product.

[0062] Exemplarily, the second preset requirement further includes: the number of continuous empty intervals in the first target section is less than or equal to a third number threshold (hereinafter referred to as the empty interval number condition). The empty interval is an interval containing zero dirt values.

[0063] The third quantity threshold can be determined according to the accuracy of dirt detection. The smaller the third quantity threshold, the fewer the number of empty intervals allowed to exist continuously, and the higher the accuracy of dirt detection. The larger the third quantity threshold, the more the number of empty intervals allowed to exist continuously, and the lower the accuracy of dirt detection. In some embodiments, the third quantity threshold may be in the range of [0,2]. In a specific embodiment, the third quantity threshold is 0. As described above, when there are bubbles in the cleaning product, the acquired dirt value data fluctuates greatly, and multiple dirt value data are distributed in different sections based on the value size. If the number of continuous empty intervals is large, it can be determined that the distribution of multiple dirt values ​​is relatively dispersed, and the target group dirt value may not exist in the multiple dirt values, and there may be more bubbles in the corresponding cleaning product. At this time, the obtained dirt value cannot accurately reflect the degree of dirtiness of the cleaning product. This embodiment can ensure the concentration of each dirt value in the first target section by limiting the number of continuous empty intervals in the first target section, which is conducive to accurately determining the dirtiness of the cleaning product.

[0064] In the embodiment described above where the dirtiness value is negatively correlated with the dirtiness of the cleaning product, when bubbles are present in the cleaning product, the dirtiness value detected by the dirtiness detector is lower than the actual dirtiness value. Exemplarily, the second preset requirement may also include: the lower limit of the first target section is greater than or equal to the target lower limit threshold (hereinafter referred to as the minimum value condition). Exemplarily and non-restrictively, the target lower limit threshold may represent the dirtiness value corresponding to the highest degree of dirtiness of the area to be cleaned or the cleaning device itself. The target lower limit threshold may be set according to actual use needs. For example, the target lower limit threshold may be the minimum dirtiness value detected when the cleaning device last performed a self-cleaning task. This solution can prevent invalid dirtiness values ​​from entering the first target section and improve the accuracy of the detection results.

[0065] It is understandable that the second preset requirement may include both the empty interval quantity condition and the minimum value condition, or may only include the empty interval quantity condition or the minimum value condition. In a specific embodiment, the second preset requirement also includes: the number of consecutive empty intervals in the first target segment is less than or equal to the third quantity threshold, and the lower limit of the first target segment is greater than or equal to the target lower limit threshold.

[0066] Exemplarily, step S122, searching the histogram for a first target segment that meets the second preset requirement, may include the following steps:

[0067] The intervals of the histogram are traversed in order from large to small interval ranges, and the number of intervals and the total number of dirt values ​​contained in the intervals are accumulated until the total number of dirt values ​​accumulated is greater than or equal to the first number threshold, so as to obtain a cumulative result.

[0068] If the cumulative result meets the second preset requirement when the accumulation is stopped, it is determined that there is a first target segment that meets the second preset requirement. If the cumulative result does not meet the second preset requirement when the accumulation is stopped, it is determined that there is no first target segment that meets the second preset requirement. Wherein, when the cumulative result meets the second preset requirement when the accumulation is stopped, the interval included in the cumulative result is the interval included in the first target segment. At this time, the dirtiness value included in the cumulative result is the target group dirtiness value.

[0069] In this example, the dirtiness value is represented by the signal strength received by the dirtiness detector. As mentioned above, in order to reduce the influence of bubbles that may exist in the clean product on the detection result, the traversal can be started from the interval with a lower degree of dirtiness. And when the dirtiness value is the signal strength received by the dirtiness detector, the dirtiness value is negatively correlated with the degree of dirtiness of the clean product. Therefore, the intervals of the histogram can be traversed in the order from large to small interval ranges, thereby ensuring the accuracy of the detection result.

[0070] In one embodiment, accumulation may be stopped when the total number of accumulated dirt values ​​is greater than or equal to a first number threshold. For example, when the first number threshold is equal to 15, accumulation may be stopped when the total number of accumulated dirt values ​​is greater than or equal to 15. Then, according to whether the number of intervals at the time when accumulation is stopped meets the total number of intervals condition, it is determined whether the second preset requirement is met. If the currently accumulated interval meets the second preset requirement, the currently accumulated interval is the first target section.

[0071] Figure 2 A histogram according to an embodiment of the present application is shown. In this embodiment, the interval length is 10, the dirtiness value is the signal strength received by the dirtiness detector, and the first quantity threshold n m =15, the second quantity threshold m m =4. Figure 2 As shown, we can start traversing from the interval [250,260], at which time the number of intervals m = 1, and the number of accumulated dirt values ​​n = 2. We continue to traverse the next interval [240,250], where the number of dirt values ​​is 4. At this time, m = 2, n = 6. Since n < n m , continue to traverse the next interval [230,240]. The number of dirty values ​​in this interval is 3, at this time m=3, n=9. Since n<n m , continue to traverse the next interval [220,230]. The number of dirty values ​​in this interval is 10, at this time m=4, n=19. Since n>n m , stop traversal. At this time, determine whether the number of intervals m meets the total number of intervals condition. Since m = m m , it can be determined that there is a first target segment that meets the second preset requirement. The first target segment is [220,260]. Alternatively, Figure 2In the embodiment shown, when the interval [220, 230] is traversed, if the number of dirty values ​​in [220, 230] is 3, then m = 4 and n = 12. m , continue to traverse the next interval [210,220]. If the number of dirty values ​​in this interval is 8, then m=5, n=20. Since n>n m , stop traversal. At this time, determine whether the number of intervals m meets the total number of intervals condition. Since m>m m , it can be determined that there is no first target segment that meets the second preset requirement.

[0072] Exemplarily, step S122, searching the histogram for a first target segment that meets the second preset requirement, may include the following steps:

[0073] The intervals of the histogram are traversed in order from large to small interval ranges, and the number of intervals and the total number of dirt values ​​contained in the intervals are accumulated until the total number of dirt values ​​accumulated is greater than or equal to the first quantity threshold or the accumulated number of intervals is equal to the second quantity threshold, so as to obtain the accumulated result.

[0074] If the accumulated result meets the second preset requirement when the accumulation is stopped, it is determined that there is a first target segment that meets the second preset requirement; if the accumulated result does not meet the second preset requirement when the accumulation is stopped, it is determined that there is no first target segment that meets the second preset requirement.

[0075] In another embodiment, accumulation can be stopped when the total number of accumulated dirtiness values ​​is greater than or equal to the first number threshold, or when the accumulated number of intervals is equal to the second number threshold. For example, when the first number threshold is equal to 15 and the second number threshold is equal to 4, accumulation can be stopped when the total number of accumulated dirtiness values ​​meets the dirtiness value number condition or the accumulated number of intervals meets the total number of intervals condition. Then, it is determined whether the accumulation result meets another condition (for example, if accumulation is stopped when the accumulated number of intervals meets the total number of intervals condition, the other condition at this time represents the dirtiness value number condition). If the other condition is met, the currently accumulated interval is the first target segment.

[0076] Still Figure 2 Take the embodiment shown in the figure as an example. In this embodiment, the traversal starts from the interval [250, 260], at which time the number of intervals m = 1 and the number of accumulated dirt values ​​n = 2. Since m < m m And n<n m , continue to traverse the next interval [240,250], the number of dirty values ​​in this interval is 4. At this time, m=2, n=6. Since m<m m And n<n m, so we can continue to traverse the next interval [230,240]. The number of dirty values ​​in this interval is 3, so m=3, n=9. Since m<m m And n<n m , so we can continue to traverse the next interval [220,230]. If the number of dirty values ​​in [220,230] is 3, then m = m m , although n<n m , the accumulation still stops. Since n<n m , it can be determined that there is no first target segment that meets the second preset requirement.

[0077] In the above-mentioned embodiments, only the case where the second preset requirement includes the condition of the number of dirt values ​​and the condition of the total number of intervals is considered. In fact, the second preset requirement may also include the empty interval number condition and / or the minimum value condition described above. It can be understood that when the second preset requirement also includes conditions such as the number of empty intervals, the minimum value condition, etc., after stopping the accumulation, it can be further confirmed whether the accumulation result meets the conditions such as the number of empty intervals, the minimum value condition, etc., and any one or several of the conditions such as the number of empty intervals, the minimum value condition, etc. can also be used as conditions for stopping accumulation. Specific examples of using the empty interval number condition or the minimum value condition as a condition for stopping accumulation are described in detail below.

[0078] According to the above technical solution, by using the dirt value quantity condition and / or the interval total quantity condition as the stop accumulation condition in the interval traversal process, and further determining whether the accumulation result meets other conditions in the second preset requirement after stopping the accumulation, the efficiency of searching the first target section in the histogram can be improved, and invalid dirt values ​​can be effectively prevented from entering the first target section. This solution can further improve the accuracy of the detection result.

[0079] In one embodiment, when searching for the first target section that meets the second preset requirement, a bubble index may be optionally calculated. The bubble index may be defined as the ratio of the total number of accumulated dirtiness values ​​to the number of accumulated intervals. That is, the bubble index may be equal to n / m. The bubble index may characterize the degree of existence of bubbles in the cleaning product. The larger the bubble index, the lower the degree of existence of bubbles, and vice versa. A bubble index threshold may be set. For example, the bubble index threshold may be equal to n / m. m / m m . Referring to the above example, assuming m m =4,n m=15, then the bubble index threshold can be equal to 3.75. During the traversal process, if the accumulation is stopped, the ratio of the total number of dirt values ​​currently accumulated n to the number of intervals accumulated m can be calculated to obtain the current bubble index. The current bubble index can be compared with the bubble index threshold. If the current bubble index is greater than or equal to the bubble index threshold, it can be determined that the current accumulation result meets the second preset requirement, otherwise it is determined that the current accumulation result does not meet the second preset requirement. It can be understood that when the accumulation is stopped, if it is detected that the bubble index is greater than or equal to the bubble index threshold, it means that the total number of dirt values ​​accumulated at this time is greater than or equal to the first number threshold and the accumulated number of intervals is less than or equal to the second number threshold.

[0080] Exemplarily, traversing the intervals of the histogram in order of interval range from large to small, accumulating the number of intervals of the intervals and the total number of dirt values ​​contained in the intervals until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold, or until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold or the accumulated number of intervals is equal to the second number threshold, to obtain the accumulation result, may include the following steps:

[0081] When the currently accumulated number of intervals is equal to the second number threshold and the currently accumulated total number of dirt values ​​is less than the first number threshold, the accumulated number of intervals and the accumulated total number of dirt values ​​are reset, and the intervals of the histogram continue to be traversed.

[0082] Still Figure 2 Take the embodiment shown as an example. In this embodiment, accumulation can be stopped when the total number of accumulated dirt values ​​is greater than or equal to the first number threshold, or when the accumulated number of intervals is equal to the second number threshold. When traversing from interval [250,260] to interval [220,230], if the number of dirt values ​​in [220,230] is 3, then m is 4 and n is 12, so m=m m , n<n m . The current accumulated number of intervals and the total number of accumulated dirt values ​​can be reset to 0, that is, m=0, n=0. Then continue to use the interval [210,220] as the first traversal interval and restart the traversal from large to small. The above scheme can clear the accumulated results corresponding to the previously traversed intervals that do not meet the second preset requirement and restart the accumulation. In this way, the first target segment that meets the second preset requirement can be found within a larger search range, which is conducive to increasing the possibility of finding the first target segment and further improving the accuracy of the detection result.

[0083] Exemplarily, traversing the intervals of the histogram in order of interval range from large to small, accumulating the number of intervals of the intervals and the total number of dirt values ​​contained in the intervals until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold, or until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold or the accumulated number of intervals is equal to the second number threshold, to obtain the accumulation result, may include the following steps:

[0084] When the current interval is the last interval of the histogram, stop accumulating.

[0085] It can be understood that if the currently traversed interval is the last interval of the histogram, there is no next interval to be traversed. If the accumulated result still does not meet the second preset requirement, it can be directly determined that the first target segment does not exist in the histogram.

[0086] Exemplarily, traversing the intervals of the histogram in order of interval range from large to small, accumulating the number of intervals of the intervals and the total number of dirt values ​​contained in the intervals until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold, or until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold or the accumulated number of intervals is equal to the second number threshold, to obtain the accumulation result, may include the following steps:

[0087] When the number of currently accumulated intervals is equal to the second number threshold and the total number of currently accumulated dirt values ​​is less than the first number threshold, the number of dirt values ​​included in the second target segment and the number of intervals included in the second target segment are deleted from the current accumulated result, and the intervals of the histogram are continued to be traversed. The second target segment is one or more intervals that are traversed first among the intervals included in the current accumulated result.

[0088] Optionally, the size of the second target segment can be set as needed. For example, the second target segment can be all intervals in the current cumulative result, or it can be part of the first traversed interval in the current cumulative result (for example, the first traversed interval). Figure 2 Take the embodiment shown as an example. If the cumulative result does not meet the second preset requirement when traversing from the interval [250,260] to the interval [220,230], the interval [250,260] and the number of dirt values ​​and the corresponding number of intervals corresponding to the interval [250,260] can be deleted from the current cumulative result. At this time, the cumulative result only includes the number of dirt values ​​and the corresponding number of intervals corresponding to the intervals [240,250], [230,240] and [220,230]. Since m<m m And n<n m, so the next interval [210,220] can be traversed continuously. In this embodiment, when the accumulated result does not meet the second preset requirement, only the first traversed interval or intervals are deleted, so that the intervals that may meet the second preset requirement can be retained as much as possible during accumulation. This is conducive to increasing the possibility of finding the first target segment in the histogram.

[0089] According to the above technical solution, when the cumulative result does not meet the second preset requirement, the possibility of finding the first target segment in the histogram can be increased by resetting the cumulative result or deleting the number of dirtiness values ​​and the number of intervals corresponding to one or more intervals traversed first in the cumulative result.

[0090] Optionally, during the traversal process, when the traversal is performed for the first time, the accumulation may be started from the first non-empty interval in the histogram. Optionally, after resetting the accumulation result or deleting the number of dirtiness values ​​and the number of intervals corresponding to the second target segment from the accumulation result, when the traversal is repeated, the accumulation may be restarted from the next first non-empty interval.

[0091] Exemplarily, the second preset requirement also includes: the number of continuous empty intervals in the first target segment is less than or equal to a third quantity threshold. Traversing the intervals of the histogram in order of interval range from large to small, accumulating the number of intervals of the intervals and the total number of dirt values ​​contained in the intervals until the total number of dirt values ​​accumulated is greater than or equal to the first quantity threshold, or until the total number of dirt values ​​accumulated is greater than or equal to the first quantity threshold or the accumulated number of intervals is equal to the second quantity threshold, to obtain the accumulation result, the following steps may be included:

[0092] When the number of consecutive empty intervals in the corresponding cumulative result when traversing to the next interval reaches a third number threshold, stop accumulation, or when the number of consecutive empty intervals in the corresponding cumulative result when traversing to the next interval reaches the third number threshold, reset the accumulated number of intervals and the total number of accumulated dirtiness values ​​and continue traversing the intervals of the histogram.

[0093] It can be understood that when the number of consecutive empty intervals is large, the distribution of the currently accumulated multiple dirtiness values ​​is relatively scattered. Therefore, this part of the dirtiness values ​​cannot accurately reflect the dirtiness of the cleaning product. At this time, the accumulation can be stopped, and it can be directly determined based on the current accumulation result that the first target section does not exist. Alternatively, the currently accumulated number of intervals and the total number of accumulated dirtiness values ​​can be reset to 0, and the traversal can be started from the next interval whose number of dirtiness values ​​is not 0. Figure 2In the illustrated embodiment, when traversing from interval [250, 260] to interval [230, 240], if the third quantity threshold is 1 and the number of dirt values ​​in interval [230, 240] is 0, the currently accumulated interval [250, 260] to interval [230, 240] can be deleted from the accumulated result. If the number of dirt values ​​in the next interval [220, 230] is not 0, traversal can be started with [220, 230] as the first traversal interval. If the number of dirt values ​​in the next interval [220, 230] is 0 and the number of dirt values ​​in interval [210, 220] is not 0, traversal can be started with [210, 220] as the first traversal interval.

[0094] The above technical solution stops accumulating or resets the current accumulation result when the number of consecutive empty intervals reaches the third quantity threshold, which can prevent invalid dirt values ​​from affecting the final detection result, and is conducive to improving the accuracy of the detection result.

[0095] Exemplarily, the second preset requirement also includes: the lower limit of the first target segment is greater than or equal to the target lower limit threshold. In order of interval range from large to small, the intervals of the histogram are traversed, the number of intervals of the intervals and the total number of dirt values ​​contained in the intervals are accumulated until the total number of dirt values ​​accumulated is greater than or equal to the first number threshold, or until the total number of dirt values ​​accumulated is greater than or equal to the first number threshold or the accumulated number of intervals is equal to the second number threshold, so as to obtain the accumulation result, and the following steps may also be included:

[0096] When the lowest lower limit of the currently traversed interval is equal to the target lower limit threshold, the accumulation stops.

[0097] As described above, when the dirt value is negatively correlated with the dirt condition of the cleaning product, when bubbles exist in the cleaning product, the dirt value detected by the dirt detector is lower than the actual dirt value. It can be understood that for the interval whose upper limit value is less than the target lower limit threshold, the dirt value existing in the interval itself has a low reliability. In other words, the dirt values ​​in these intervals can all be regarded as invalid dirt values. Therefore, traversing the dirt values ​​in these intervals will increase the amount of calculation meaninglessly and may even affect the accuracy of the test results. This scheme stops accumulating when the lowest lower limit of the currently traversed interval is equal to the target lower limit threshold, which can avoid invalid traversal operations, help reduce the occupation of computing resources, and improve the efficiency of computing resource utilization. At the same time, this scheme is conducive to ensuring the accuracy of the test results.

[0098] Figure 3 FIG. 2 shows a schematic flow chart according to a specific embodiment of the present application. Assume that the first quantity threshold is 15 and the second quantity threshold is 4. Figure 3 As shown, the dirt detection method 300 of this embodiment includes:

[0099] First, execute step S301 to obtain multiple dirt values ​​detected by the dirt detector. In this embodiment, the dirt value is represented by the signal strength received by the dirt detector. The total number of dirt values ​​is 60. Then, execute step S302 to generate a histogram of multiple dirt values. In this embodiment, the interval length of the histogram is 10. Then, in step S303, traverse each interval of the histogram from large to small. When traversing to the first interval of the histogram, execute step S304 to initialize the accumulated number of intervals hist_n=1 and the total number of accumulated dirt values ​​val_n=0. Then execute step S305 to determine whether the current interval is a non-empty interval. If the current interval is an empty interval, the next interval is used as the current interval and returns to step S304. If the current interval is a non-empty interval, execute step S306, hist_n+=1, val_n+=x, x represents the number of dirt values ​​in the current interval. Next, execute step S307 to determine whether the current val_n is greater than or equal to the first quantity threshold value 15. If val_n<15, execute step S309 to determine whether the next interval is a non-empty interval. If the next interval is a non-empty interval, take the next interval as the current interval, and return to step S306 to continue traversing. If the next interval is an empty interval, execute step S311 to determine whether there are bubbles in the cleaning product. If val_n≥15, execute step S308 to determine whether hist_n is less than or equal to the second quantity threshold value 4. If hist_n>4, execute step S311 to determine whether there are bubbles in the cleaning product. If hist_n≤4, execute step S310 to determine the actual degree of dirtiness of the cleaning product. The specific determination method is described in detail in the following embodiments. For the sake of brevity, it will not be repeated here.

[0100] For example, in step S122, before searching the histogram for the first target segment that meets the second preset requirement, the method may further include the following steps:

[0101] Get the number of empty intervals and non-empty intervals in the histogram. An empty interval is an interval containing 0 dirty values.

[0102] The ratio of the number of empty intervals to the number of non-empty intervals (hereinafter referred to as the first ratio) is calculated.

[0103] It is determined whether the first ratio is greater than a ratio threshold (for distinction, it may be referred to as a first ratio threshold).

[0104] The operation of searching the histogram for the first target segment that meets the second preset requirement is performed when the ratio is greater than the ratio threshold.

[0105] In one embodiment, when the first ratio is less than or equal to a ratio threshold, it is determined that there are bubbles in the cleaning product.

[0106] The ratio threshold can be set according to actual needs. The smaller the ratio threshold, the larger the proportion of non-empty intervals in the histogram is allowed, and the higher the fault tolerance of the obtained detection result. The larger the ratio threshold, the smaller the proportion of non-empty intervals in the histogram is allowed, and the lower the fault tolerance of the obtained detection result. It can be understood that when the clean products in the sewage pipe are uniform and stable, the data of multiple dirtiness values ​​are relatively concentrated, and the dirtiness values ​​are concentrated in one or more intervals of the histogram. When there are bubbles in the clean products, the obtained dirtiness value data fluctuates greatly, and multiple dirtiness value data will be distributed in different intervals of the histogram based on the value size. It can be seen that when the proportion of non-empty intervals in the histogram is small, the obtained dirtiness value has high credibility, and the dirtiness value can more accurately reflect the degree of dirtiness of the clean products. Therefore, before searching for the first target section, the distribution of multiple dirtiness values ​​can be judged as a whole according to the first ratio. When the first ratio is greater than the ratio threshold, the first target section is further searched. This scheme is conducive to reducing invalid operations, avoiding waste of computing resources, and improving detection efficiency.

[0107] The above-mentioned scheme for calculating the ratio of the number of empty intervals to the number of non-empty intervals is only an example. For example, the ratio of the number of empty intervals to the number of all intervals in the histogram can also be calculated (for distinction, the ratio can be referred to as the third ratio), and the ratio is compared with the second ratio threshold, and the operation of finding the first target segment that meets the second preset requirement from the histogram is performed when the third ratio is greater than the second ratio threshold. For another example, the ratio of the number of non-empty intervals to the number of all intervals in the histogram can also be calculated (for distinction, the ratio can be referred to as the fourth ratio), and the ratio is compared with the third ratio threshold, and the operation of finding the first target segment that meets the second preset requirement from the histogram is performed when the fourth ratio is greater than the third ratio threshold. For another example, the ratio of the number of non-empty intervals to the number of empty intervals can also be calculated (for distinction, the ratio can be referred to as the fifth ratio), and the ratio is compared with the fourth ratio threshold, and the operation of finding the first target segment that meets the second preset requirement from the histogram is performed when the fifth ratio is greater than the fourth ratio threshold.

[0108] Exemplarily, step S120, based on the sizes of the multiple dirt values, determines whether there is a target group of dirt values ​​whose distribution concentration meets the first preset requirement among the multiple dirt values, which may include the following steps S124, S125 and S126.

[0109] Step S124: clustering the multiple dirtiness values ​​based on the sizes of the multiple dirtiness values ​​to obtain at least one cluster.

[0110] Step S125: determine the cluster with the largest cluster center among at least one cluster as the target cluster.

[0111] Step S126, based on the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster (hereinafter referred to as the second ratio), determine whether the distribution concentration of the target cluster meets the first preset requirement. When the distribution concentration of the target cluster meets the first preset requirement, it is determined that there is a target group dirt value among the multiple dirt values; when the distribution concentration of the target cluster does not meet the first preset requirement, it is determined that there is no target group dirt value among the multiple dirt values. Among them, the distribution concentration of the target cluster is represented by a ratio or a parameter value positively correlated with the ratio. The span of the target cluster is the difference between the maximum dirt value and the minimum dirt value in the target cluster. When the distribution concentration of the target cluster meets the first preset requirement, the dirt value contained in the target cluster is the target group dirt value.

[0112] The above steps S124, S125 and S126 are a method of using a clustering algorithm to determine the distribution concentration of the dirt value. Steps S124, S125 and S126 have no temporal or logical connection with steps S121, S122 and S123.

[0113] Optionally, the clustering method may adopt any existing or future developed clustering algorithm. For example, the clustering method may include but is not limited to one or more of the following: K-means clustering algorithm (k-means), K-medoids clustering algorithm (k-medoids), linear discriminant analysis (lda) and other clustering algorithms or topic model algorithms. When clustering multiple dirtiness values, clustering may be performed based on the difference between the dirtiness values. For example, for any clustering cluster, the difference between any two dirtiness values ​​in the clustering cluster does not exceed a preset difference threshold.

[0114] As described above, when bubbles exist in the cleaning product, the transmittance of the cleaning product detected is reduced, and the detected degree of dirtiness is dirtier than the actual degree of dirtiness. Therefore, in at least one cluster, the cluster corresponding to the lowest degree of dirtiness can be selected as the target cluster. This is conducive to improving the accuracy of the detection result. When the above steps S124, S125 and S126 are used to determine whether the distribution concentration of the target cluster meets the first preset requirement, the dirtiness value is negatively correlated with the degree of dirtiness of the cleaning product. The dirtiness value can be represented by the signal strength received by the dirtiness detector. It can be understood that when the dirtiness value is positively correlated with the degree of dirtiness of the cleaning product, the cluster with the smallest cluster center can be used as the target cluster. Specifically, exemplarily, the dirtiness value is negatively correlated with the degree of dirtiness of the cleaning product. Step S120, based on the size of multiple dirtiness values, determines whether there is a target group dirtiness value whose distribution concentration meets the first preset requirement among multiple dirtiness values, which can include steps S124, S127 and S126.

[0115] Step S127: determine the cluster with the smallest cluster center among at least one cluster as the target cluster.

[0116] It can be understood that for a target cluster, the smaller the second ratio is, the higher the similarity between the dirt values ​​in the target cluster is, the more concentrated the dirt value data is, and the more accurate the detection result based on the target cluster is. Therefore, the distribution concentration of the target cluster can be accurately determined based on the ratio.

[0117] According to the above technical solution, by processing multiple dirt values ​​using a clustering method, a target cluster can be found quickly and accurately, so that accurate detection results can be obtained based on the target cluster.

[0118] Exemplarily, before step S126, based on the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster, judging whether the distribution concentration degree of the target cluster meets the first preset requirement, step S128 may be further included.

[0119] Step S128, determining whether the number of dirt values ​​in the target cluster is greater than or equal to a fourth number threshold.

[0120] When the number of dirt values ​​in the target cluster is less than the fourth number threshold, it is determined that there are bubbles in the cleaning product. Step S126 is performed when the number of dirt values ​​in the target cluster is greater than or equal to the first number threshold.

[0121] The size of the fourth quantity threshold can be set arbitrarily as needed, and it can be the same as or different from the first quantity threshold. For example, the fourth quantity threshold can be equal to 15. The setting method of the fourth quantity threshold can be similar to the setting method of the first quantity threshold. The setting method of the first quantity threshold has been described in detail in the above embodiment. The setting method of the fourth quantity threshold can be understood by referring to the above embodiment. For the sake of brevity, it will not be repeated here.

[0122] It can be understood that when the clustering method is adopted, the more samples there are in the cluster (i.e., the number of dirt values ​​in the present application), the more accurate the analysis result (i.e., the detection result in the present application) obtained based on the cluster. When the number of dirt values ​​in the target cluster is less than the first quantity threshold, the number of dirt values ​​in the target cluster is too small, and it is difficult to obtain accurate detection results based on the target cluster. Before judging whether the distribution concentration of the target cluster meets the first preset requirement based on the second ratio, the scheme pre-judges whether the number of dirt values ​​in the target cluster is greater than or equal to the first quantity threshold. Therefore, when the number of dirt values ​​in the target cluster does not meet the requirements, there is no need to continue to execute subsequent steps (such as step S126). This scheme is conducive to reducing the amount of calculation and improving detection efficiency.

[0123] Exemplarily, in step S126, judging whether the distribution concentration degree of the target cluster meets the first preset requirement based on the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster may include the following steps:

[0124] Based on the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster, it is determined whether the distribution concentration degree of the target cluster is greater than the degree threshold.

[0125] If the distribution concentration degree of the target cluster is greater than the degree threshold, it is determined that the distribution concentration degree of the target cluster meets the first preset requirement. Otherwise, it is determined that the distribution concentration degree of the target cluster does not meet the first preset requirement.

[0126] Optionally, the degree threshold can be set according to actual needs. For example, the degree threshold can be determined based on the ratio of the fourth quantity threshold to the fluctuation value of the dirtiness value (the meaning of the fluctuation value is described above). In one embodiment, the fourth quantity threshold is 15 and the fluctuation value is 40. In this embodiment, the degree threshold can be 0.375. The span of the target cluster refers to the difference between the maximum value and the minimum value in the target cluster. Assuming that the span of the target cluster is 10, the ratio between the number of dirtiness values ​​in the target cluster 15 and the span of the target cluster 10 is greater than the degree threshold 0.375. At this time, it can be determined that the distribution concentration of the target cluster meets the first preset requirement.

[0127] According to the above technical solution, the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster is used to determine whether the distribution concentration of the target cluster is greater than the degree threshold, and then determine whether the distribution concentration of the target cluster meets the first preset requirement. This distribution concentration determination method is relatively simple and requires less calculation.

[0128] After adopting the histogram-based or clustering method in the above-mentioned embodiment to determine the target group dirtiness value whose distribution concentration meets the first preset requirement, the step of determining the actual dirtiness of the cleaning products in the sewage pipe based on at least part of the multiple dirtiness values ​​can be continued. Among them, at least part of the dirtiness values ​​can be selected according to the method adopted when determining the target group dirtiness value. For example, when a clustering algorithm is adopted, at least part of the dirtiness values ​​can be the cluster center of the target cluster cluster. Exemplarily, determining the actual dirtiness of the cleaning products in the sewage pipe based on at least part of the dirtiness values ​​in the multiple dirtiness values ​​can include the following steps: determining the cluster center of the target cluster cluster as the target dirtiness value, and the actual dirtiness is represented by the target dirtiness value. In this embodiment, the cluster center is directly used to represent the actual dirtiness of the cleaning products, the steps are simple, less computing resources are occupied, and the detection efficiency is high.

[0129] Alternatively, the actual degree of dirtiness of the cleaning product may be determined based on the target cluster obtained by clustering or all or part of the dirtiness values ​​in the first target section found in the histogram. The specific determination method is described in detail in the following embodiments.

[0130] Exemplarily, determining the actual contamination level of the cleaning product in the sewage pipe based on at least some of the contamination values ​​may include the following steps:

[0131] An average of multiple dirtiness values ​​in the target group of dirtiness values ​​is calculated as the target dirtiness value, or any dirtiness value in the target group of dirtiness values ​​is determined as the target dirtiness value; wherein the actual dirtiness degree is represented by the target dirtiness value.

[0132] Optionally, in an embodiment in which a histogram-based method is used to determine whether a target group dirtiness value exists in a plurality of dirtiness values, the target dirtiness value may be determined by using all or part of the dirtiness values ​​in the first target segment. In this embodiment, the mean of all or part of the dirtiness values ​​in the first target segment may be directly calculated, and the mean may be used as the target dirtiness value. For example, the mean of the largest predetermined number of dirtiness values ​​in the first target segment may be calculated as the target dirtiness value. Alternatively, any dirtiness value may be selected from the target group dirtiness value as the target dirtiness value, for example, the largest dirtiness value in the first target segment may be directly used as the target dirtiness value.

[0133] Optionally, in an embodiment in which a clustering method is used to determine whether there is a target group dirtiness value whose distribution concentration meets the first preset requirement among multiple dirtiness values, all or part of the dirtiness values ​​in the target clustering cluster can be used to determine the target dirtiness value. In this embodiment, the mean of all or part of the dirtiness values ​​in the target clustering cluster can be directly calculated, and the mean can be used as the target dirtiness value. Similarly, the dirtiness values ​​involved in the mean calculation can be the largest predetermined number of dirtiness values ​​in the target clustering cluster. Alternatively, a dirtiness value can be selected from the target group dirtiness values ​​as the target dirtiness value. For example, the target dirtiness value can be the largest dirtiness value in the target clustering cluster. Alternatively, the cluster center of the target clustering cluster can be directly used as the target dirtiness value. This method has been described in detail in the above embodiment. For the sake of brevity, it will not be repeated here.

[0134] In the above technical solution, the average of multiple dirtiness values ​​in the target group dirtiness value can be used as the target dirtiness value, which is conducive to accurately determining the actual dirtiness of the clean product. In addition, any dirtiness value in the target group dirtiness value can also be used as the target dirtiness value. This method has a relatively small amount of calculation.

[0135] Exemplarily, before calculating the average of multiple dirtiness values ​​in the target group of dirtiness values ​​as the target dirtiness value, the method may further include the following steps:

[0136] From the target group of dirt values, a plurality of dirt values ​​that are located at the front in descending order are selected as a plurality of dirt values ​​for calculating the target dirt value.

[0137] As described above, all or part of the dirt values ​​can be selected in the first target section or the target cluster to determine the target dirt value. When there is a target group dirt value among the multiple dirt values, multiple dirt values ​​for calculating the target dirt value can be further selected from the target group dirt values. It can be understood that when the dirt value is negatively correlated with the degree of dirtiness, the dirt value corresponding to the cleaning product with bubbles is smaller than the dirt value corresponding to the stable cleaning product. Therefore, multiple dirt values ​​located at the front can be selected from large to small in the target group dirt values ​​as multiple dirt values ​​for calculating the target dirt value. This solution can reduce the amount of calculation and is conducive to improving detection efficiency.

[0138] Exemplarily, the cleaning device further comprises a cleaning member, which is used to clean dirt in the area to be cleaned to obtain a cleaning product.

[0139] The operation of obtaining multiple dirt values ​​detected by the dirt detector and determining whether there is a target group of dirt values ​​whose distribution concentration meets the first preset requirement among the multiple dirt values ​​is performed during the self-cleaning process of the cleaning member.

[0140] The dirt detection method 100 further includes the following steps:

[0141] When bubbles are detected in the cleaning product during the current self-cleaning process, a bubble removal operation is performed during the next self-cleaning process.

[0142] In some embodiments, the self-cleaning mode of the cleaning device corresponds to multiple self-cleaning operations. During each self-cleaning, the degree of dirtiness of the cleaning product can be obtained through a dirtiness detector. So as to determine whether the cleaning element is clean based on the degree of dirtiness. When bubbles are detected in the cleaning product during the current self-cleaning process, the actual degree of dirtiness of the cleaning product corresponding to the current self-cleaning process cannot be determined. In order to ensure that the actual degree of dirtiness of the cleaning product can be accurately detected during the next self-cleaning process, a debubbling operation can be adopted. The debubbling operation can be achieved by adjusting the operating parameters of the relevant components during the operation of the cleaning device. The specific operating method is described in detail below. For the sake of brevity, it will not be repeated here.

[0143] According to the above technical solution, when bubbles are detected in the cleaning product during the current self-cleaning process, the debubbling operation can be performed to ensure that the degree of dirtiness of the cleaning product can be accurately detected during the next self-cleaning process, thereby facilitating accurate judgment of the degree of dirtiness of the cleaning piece.

[0144] Exemplarily, the cleaning device also includes a suction assembly, which is used to provide power for the cleaning product to pass through the sewage pipe, and the degassing operation includes increasing the water pumping capacity of the suction assembly. In one embodiment, the power of the suction assembly can be increased to increase the water pumping capacity of the suction assembly.

[0145] Exemplarily, the cleaning device also includes a clean water tank for storing clean water, and the clean water is used to provide the cleaning parts or the area to be cleaned for cleaning. The degassing operation includes increasing the water supply of the clean water tank.

[0146] It can be understood that when the cleaning device includes a suction component and a clean water tank, the water suction volume of the suction component and the water supply volume of the clean water tank can be increased at the same time, so as to further prevent the generation of bubbles.

[0147] In the above technical solution, increasing the water pumping volume of the suction component and / or increasing the water supply volume of the clean water tank is helpful to prevent the generation of bubbles, thereby facilitating accurate detection of the actual degree of dirtiness of the cleaning product.

[0148] According to another aspect of the present application, a dirt detection device is provided, which is applied to a cleaning device, characterized in that the cleaning device includes a sewage pipe and a dirt detector, the sewage pipe is used to transport cleaning products, and the dirt detector is used to detect the degree of dirtiness of the cleaning products in the sewage pipe; the dirt detection device includes a processor and a memory. The memory stores a computer program / instruction, and the computer program / instruction is used to execute the above-mentioned dirt detection method 100 when the processor runs it. The processor is used to run the computer program / instruction stored in the memory to execute the corresponding steps of the dirt detection method 100 according to the embodiment of the present application.

[0149] The dirt detection device may be a control device included in the cleaning device or communicatively connected to the cleaning device, such as a main control microcontroller unit (MCU) in the cleaning device.

[0150] Exemplarily, the dirt detection device or the processor of the dirt detection device may include any suitable processing device with data processing capability and / or instruction execution capability. For example, the dirt detection device or the processor of the dirt detection device may be implemented by a programmable logic controller (PLC), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic array (PLA), a central processing unit (CPU), an application specific integrated circuit (ASIC), a microcontroller unit (MCU) and other forms of processing units, or a combination of several of them.

[0151] According to another aspect of the present application, a cleaning device is provided. The cleaning device includes a sewage pipe and a dirt detector, wherein the sewage pipe is used to transport cleaning products, and the dirt detector is used to detect the degree of dirtiness of the cleaning products in the sewage pipe. The cleaning device also includes the dirt detection device as described above.

[0152] According to another aspect of the embodiment of the present application, a computer-readable storage medium is also provided. The storage medium stores a computer program / instruction, and the computer program / instruction implements the above-mentioned dirt detection method when executed by the processor. The storage medium may include, for example, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.

[0153] A person skilled in the art can easily understand the implementation structure, working principle and beneficial effects of the dirt detection device, cleaning device and computer-readable storage medium by reading the dirt detection method described above, and will not be described in detail here for the sake of brevity.

[0154] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present invention thereto. Various changes and modifications may be made therein by one of ordinary skill in the art without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as required by the appended claims.

[0155] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0156] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0157] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0158] Similarly, it should be understood that in order to streamline the present invention and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present invention should not be interpreted as reflecting the following intention: the claimed invention requires more features than the features explicitly stated in each claim. More specifically, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present invention.

[0159] It will be understood by those skilled in the art that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0160] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.

[0161] The various component embodiments of the present invention can be implemented in hardware, or implemented in a software module running on one or more processors, or implemented in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some modules in the cleaning equipment according to an embodiment of the present invention. The present invention can also be implemented as a part or all of the device program (for example, computer program and computer program product) for performing the method described herein. Such a program of the present invention can be stored in a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0162] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0163] The above is only a specific embodiment of the present invention or an explanation of a specific embodiment. The protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A dirt detection method, applied to cleaning equipment, characterized in that: The cleaning device comprises a sewage pipe and a dirt detector, wherein the sewage pipe is used to transport the cleaning product, and the dirt detector is used to detect the dirtiness of the cleaning product in the sewage pipe; The method comprises: Acquiring a plurality of dirt values ​​detected by the dirt detector; Based on the magnitudes of the multiple dirtiness values, determining whether there is a target group of dirtiness values ​​whose distribution concentration degree meets a first preset requirement among the multiple dirtiness values; When the target group of dirtiness values ​​exists among the multiple dirtiness values, the actual degree of dirtiness of the cleaning product in the sewage pipe is determined based on at least some of the multiple dirtiness values; and / or, when the target group of dirtiness values ​​does not exist among the multiple dirtiness values, it is determined that there are bubbles in the cleaning product.

2. The dirt detection method according to claim 1, characterized in that: The determining, based on the magnitudes of the plurality of contamination values, whether there is a target group of contamination values ​​whose distribution concentration degree meets a first preset requirement among the plurality of contamination values ​​includes: Based on the magnitudes of the multiple dirtiness values, generating a histogram of the multiple dirtiness values; Searching the histogram for a first target segment that meets a second preset requirement, wherein a lower limit of the first target segment is a lower limit of a non-empty interval in the histogram, and an upper limit of the first target segment is an upper limit of a non-empty interval in the histogram, wherein the second preset requirement includes: a total number of dirt values ​​included in the first target segment is greater than or equal to a first number threshold, and a number of intervals included in the first target segment is less than or equal to a second number threshold; If there is a first target section that meets the second preset requirement, determining that the target group of dirtiness values ​​exists in the multiple dirtiness values, otherwise determining that the target group of dirtiness values ​​does not exist in the multiple dirtiness values; The non-empty interval is an interval in which the number of dirtiness values ​​contained is not 0; Wherein, in the case that there is a first target segment that meets the second preset requirement, the dirtiness value included in the first target segment is the target group dirtiness value.

3. The dirt detection method according to claim 2, characterized in that: The second preset requirement also includes: the number of continuous empty intervals in the first target segment is less than or equal to a third number threshold; and / or the lower limit of the first target segment is greater than or equal to a target lower limit threshold; The empty interval is an interval containing 0 dirtiness values.

4. The dirt detection method according to claim 2 or 3, characterized in that: The step of searching the histogram for a first target segment that meets a second preset requirement includes: Traversing the intervals of the histogram in order of interval range from large to small, accumulating the number of intervals and the total number of dirt values ​​contained in the intervals, until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold, or until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold or the accumulated number of intervals is equal to the second number threshold, to obtain a cumulative result; If the accumulated result meets the second preset requirement when the accumulation is stopped, it is determined that there is a first target segment that meets the second preset requirement; if the accumulated result does not meet the second preset requirement when the accumulation is stopped, it is determined that there is no first target segment that meets the second preset requirement; Wherein, when the accumulation result satisfies the second preset requirement when the accumulation is stopped, the interval included in the accumulation result is the interval included in the first target section.

5. The dirt detection method according to claim 4, characterized in that: The step of traversing the intervals of the histogram in order of interval range from large to small, accumulating the number of intervals and the total number of dirt values ​​contained in the intervals until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold, or until the accumulated total number of dirt values ​​is greater than or equal to the first number threshold or the accumulated number of intervals is equal to the second number threshold, to obtain an accumulation result, includes: When the current accumulated number of intervals is equal to the second number threshold and the current accumulated total number of dirt values ​​is less than the first number threshold, reset the accumulated number of intervals and the total number of accumulated dirt values ​​or delete the number of dirt values ​​contained in the second target segment and the number of intervals contained in the second target segment from the current accumulated result, and continue to traverse the intervals of the histogram, wherein the second target segment is the first one or more intervals traversed among the intervals counted in the current accumulated result.

6. The dirt detection method according to claim 4 as cited in claim 3, characterized in that: The second preset requirement also includes: the number of continuous empty intervals in the first target segment is less than or equal to a third quantity threshold; the traversing the intervals of the histogram in order from large to small interval ranges, accumulating the number of intervals and the total number of dirt values ​​contained in the intervals until the accumulated total number of dirt values ​​is greater than or equal to the first quantity threshold, or until the accumulated total number of dirt values ​​is greater than or equal to the first quantity threshold or the accumulated number of intervals is equal to the second quantity threshold, to obtain a cumulative result, including: When the number of consecutive empty intervals in the corresponding accumulated result when traversing to the next interval reaches the third number threshold, stop accumulating, or reset the accumulated number of intervals and the total number of accumulated dirt values ​​and continue traversing the intervals of the histogram; and / or, The second preset requirement also includes: the lower limit of the first target segment is greater than or equal to the target lower limit threshold; the intervals of the histogram are traversed in order from large to small interval ranges, and the number of intervals of the intervals and the total number of dirt values ​​contained in the intervals are accumulated until the total number of dirt values ​​accumulated is greater than or equal to the first number threshold, or until the total number of dirt values ​​accumulated is greater than or equal to the first number threshold or the number of intervals accumulated is equal to the second number threshold, so as to obtain the accumulation result, including: When the lowest lower limit of the currently traversed interval is equal to the target lower limit threshold, accumulation is stopped.

7. The dirt detection method according to claim 2 or 3, characterized in that: Before searching the histogram for the first target segment that meets the second preset requirement, the method further includes: Obtaining the number of empty intervals and the number of non-empty intervals in the histogram; wherein the empty interval is an interval containing 0 dirt values; Calculating the ratio of the number of empty intervals to the number of non-empty intervals; Determining whether the ratio is greater than a ratio threshold; The operation of searching the histogram for the first target segment that meets the second preset requirement is performed when the ratio is greater than the ratio threshold.

8. The dirt detection method according to any one of claims 1 to 3, characterized in that: The determining, based on the magnitudes of the plurality of contamination values, whether there is a target group of contamination values ​​whose distribution concentration degree meets a first preset requirement among the plurality of contamination values ​​includes: Based on the magnitudes of the multiple dirtiness values, clustering the multiple dirtiness values ​​to obtain at least one cluster; Determine the cluster with the largest cluster center in the at least one cluster as the target cluster; Based on the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster, judging whether the distribution concentration degree of the target cluster meets the first preset requirement, wherein the distribution concentration degree of the target cluster is represented by the ratio or a parameter value positively correlated with the ratio; When the distribution concentration degree of the target cluster meets the first preset requirement, determining that the target group dirtiness value exists in the multiple dirtiness values; When the distribution concentration degree of the target cluster does not meet the first preset requirement, determining that the target group dirtiness value does not exist in the multiple dirtiness values; The span of the target cluster is the difference between the maximum dirtiness value and the minimum dirtiness value in the target cluster; When the distribution concentration degree of the target cluster meets the first preset requirement, the dirtiness value included in the target cluster is the target group dirtiness value.

9. The dirt detection method according to claim 8, characterized in that: The determining, based on the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster, whether the distribution concentration degree of the target cluster meets the first preset requirement includes: Based on the ratio between the number of dirt values ​​in the target cluster and the span of the target cluster, determining whether the distribution concentration degree of the target cluster is greater than a degree threshold; If the distribution concentration degree of the target cluster is greater than the degree threshold, it is determined that the distribution concentration degree of the target cluster meets the first preset requirement.

10. The dirt detection method according to claim 8, characterized in that: The determining, based on at least some of the plurality of contamination values, an actual contamination degree of the cleaning product in the sewage pipe, comprises: The cluster center of the target cluster is determined as a target dirtiness value, and the actual dirtiness level is represented by the target dirtiness value.

11. The dirt detection method according to any one of claims 1 to 3, characterized in that: The determining, based on at least some of the plurality of contamination values, an actual contamination degree of the cleaning product in the sewage pipe, comprises: Calculating an average of a plurality of dirtiness values ​​in the target group of dirtiness values ​​as the target dirtiness value, or determining any dirtiness value in the target group of dirtiness values ​​as the target dirtiness value; The actual dirtiness level is represented by the target dirtiness value.

12. The contamination detection method according to claim 11, characterized in that: Before calculating the average of the plurality of dirtiness values ​​in the target group of dirtiness values ​​as the target dirtiness value, the method further includes: From the target group of dirt values, a plurality of dirt values ​​that are located at the front in descending order are selected as the plurality of dirt values ​​used to calculate the target dirt value.

13. The dirt detection method according to any one of claims 1 to 3, characterized in that: The cleaning device further comprises a cleaning member, which is used to clean dirt in the area to be cleaned to obtain the cleaning product. The operations of obtaining a plurality of dirt values ​​detected by the dirt detector and judging, based on the sizes of the plurality of dirt values, whether there is a target group of dirt values ​​whose distribution concentration meets a first preset requirement among the plurality of dirt values ​​are performed during the self-cleaning process of the cleaning member. Wherein, the method further comprises: When bubbles are detected in the cleaning product during the current self-cleaning process, a bubble removal operation is performed during the next self-cleaning process.

14. The dirt detection method according to claim 13, characterized in that: The cleaning device further comprises a suction assembly, the suction assembly being used to provide power for causing the cleaning product to pass through the sewage pipe, the degassing operation comprising increasing the water pumping capacity of the suction assembly, and / or, The cleaning device also includes a clean water tank, which is used to store clean water. The clean water is used to provide the cleaning element or the area to be cleaned for cleaning. The degassing operation includes increasing the water supply of the clean water tank.

15. A dirt detection device, applied to cleaning equipment, characterized in that: The cleaning device comprises a sewage pipe and a dirt detector, wherein the sewage pipe is used to transport the cleaning product, and the dirt detector is used to detect the dirtiness of the cleaning product in the sewage pipe; The dirt detection device includes a processor and a memory, wherein the memory stores a computer program / instruction, and the computer program / instruction is used by the processor to execute the dirt detection method according to any one of claims 1 to 14 when the processor is running.

16. A cleaning device, characterized in that: It comprises a sewage pipe and a dirt detector, wherein the sewage pipe is used to transport cleaning products, and the dirt detector is used to detect the dirtiness of the cleaning products in the sewage pipe; Wherein, the cleaning device also includes a dirt detection device as described in claim 15.

17. A computer-readable storage medium, characterized in that: A computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the dirt detection method as described in any one of claims 1-14 is implemented.