Intelligent environmental sanitation processing method and system, storage medium and program product
By acquiring obstacle information and crowd flow prediction models in real time and dynamically adjusting cleaning paths and task sequences, the problem that cleaning plans in urban public areas are difficult to adapt to changes in crowd flow is solved, thereby improving the safety and efficiency of cleaning work.
Patent Information
- Application Number
- CN202510972325.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-16
AI Technical Summary
Existing urban public area cleaning plans are difficult to adapt to the dynamic changes in pedestrian flow, resulting in safety hazards and low cleaning efficiency.
By obtaining real-time obstacle information around cleaning equipment and combining it with a crowd flow data prediction model, we can dynamically adjust the cleaning path and task sequence, prioritize high-risk areas, and rationally arrange cleaning task priorities to ensure safety and efficiency.
It enables flexible response to changes in pedestrian flow in a dynamic environment, improves the safety and efficiency of cleaning work, and ensures the orderly progress of various tasks.
Smart Images

Figure CN120655054A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of urban environmental sanitation management, and in particular to a smart environmental sanitation processing method, system, storage medium and program product. Background Art
[0002] In modern urban life, public areas are important venues for daily activities. Their environmental sanitation directly affects the city's overall image and the quality of life of residents. Therefore, regular cleaning of public areas is an indispensable part of urban management. In particular, those public areas with rapidly changing traffic and complex conditions require more efficient cleaning and maintenance to cope with them.
[0003] The conventional approach currently used in the sanitation sector typically involves pre-planning relatively fixed cleaning areas based on a variety of factors. Subsequently, a comprehensive assessment of each area is conducted based on relatively stable reference factors such as its size and historically measured foot traffic. This leads to the development of a general cleaning route and detailed task schedule. These areas are then linked together to form a fixed cleaning route, and cleaning machines systematically carry out their cleaning work according to the established task schedule and route.
[0004] However, the flow of people in urban public areas is highly dynamic, and cleaning plans based on old data such as flow of people are difficult to adapt to the current real-time changes, leading to a greater safety hazard of collisions. Summary of the Invention
[0005] This application provides a smart sanitation treatment method, system, storage medium and program product for improving cleaning efficiency and flexibility while avoiding safety hazards.
[0006] On the first aspect, the present application provides a smart sanitation processing method, including: determining the sanitation path and task sequence according to multiple planned areas to be cleaned, the priorities of the corresponding planned areas to be cleaned and the cleaning time of the corresponding planned areas to be cleaned; the planned areas to be cleaned are determined by dynamic area data; the sanitation path passes through all planned areas to be cleaned, and the task sequence includes cleaning tasks, planned start and end times of cleaning tasks, travel time of cleaning tasks and priorities of cleaning tasks; in the process of executing the task sequence, obtaining real-time obstacle information of the current planned area to be cleaned; and determining the current collision risk based on the real-time obstacle information; judging whether the collision risk is greater than the collision threshold; if it is greater than the collision threshold, the number of people in the current planned area to be cleaned is reduced. According to the input of the crowd flow data prediction model, the predicted crowd flow data within the preset time length is obtained; the predicted collision risk within the preset time length is determined according to the predicted crowd flow data within the preset time length and the area of the current planned area to be cleaned; it is judged whether the time less than the collision threshold in the predicted collision risk within the preset time length is greater than the remaining time of the current cleaning task; if it is greater than the remaining time of the current cleaning task, the current cleaning task is paused, and the time period less than the collision threshold in the predicted collision risk within the preset time length is extracted, and the current cleaning task is continued in the time period; if it is not greater than the remaining time of the current cleaning task, the next target cleaning task is determined according to the priority of the cleaning task, and the current cleaning task is paused.
[0007] By employing this technical solution, during the execution of a task sequence, real-time obstacle information is collected in the current planned cleaning area to determine collision risk. This real-time data is classified as small data, focusing on the specific conditions surrounding the cleaning equipment itself. Compared to macro-data from dynamic areas, it is more targeted and timely. When the collision risk is determined to be greater than the collision threshold, pedestrian flow data for the current planned cleaning area is extracted based on dynamic area data from different time periods. This data is then input into a pedestrian flow prediction model to predict pedestrian flow data for a preset time period in the future. The predicted collision risk is then determined based on the size of the current planned cleaning area to further assess whether the remaining time is sufficient for the cleaning equipment to successfully complete the current cleaning task. If the remaining time allows, the cleaning equipment can pause and wait until conditions are suitable to resume the current task. If not, the cleaning equipment will prioritize the next cleaning task and move to another area to carry out cleaning work. This allows the entire sanitation cleaning process to flexibly respond to real-time changes while ensuring cleaning efficiency and safety, ensuring the orderly progress of each task.
[0008] In combination with some embodiments of the first aspect, in some embodiments, the step of determining the planned area to be cleaned by dynamic area data specifically includes: determining the personnel contours based on the dynamic area data of all areas; classifying the personnel contours into discrete personnel and clustered personnel according to the discrete degree of the personnel contours and the predetermined discrete threshold; classifying the clustered personnel arranged adjacent to each other in the queue direction into different initial queue groups based on the preset queue direction; for each initial queue group, calculating and generating a single outer contour box that can envelop all clustered personnel in the initial queue group; determining the direction perpendicular to the queue direction as the cleaning direction; measuring whether the interval distance between two spatially adjacent single outer contour boxes in the cleaning direction is less than the preset cleaning distance threshold; if it is less than the preset cleaning distance threshold; merging them into a single outer contour box; removing all single outer contour boxes in all areas, and then dividing all the removed areas into multiple sub-areas; extracting the garbage coverage rate in the sub-area from the dynamic area data; and determining the sub-area with a garbage coverage rate greater than the coverage rate threshold as the planned area to be cleaned.
[0009] By adopting the above technical solution, the outlines of people are determined based on the dynamic area data of all areas, laying the foundation for subsequent work. According to the degree of discreteness of the person outlines and the predetermined discrete threshold, the person outlines are accurately classified into discrete people and clustered people. The different distribution states of people can be clearly distinguished to preliminarily identify areas that cannot be cleaned (due to higher safety risks). Then, based on the preset queue direction, adjacent clustered people are classified into different initial queue groups. For each initial queue group, a single outer contour box is calculated to further determine the areas that cannot be cleaned. Then, considering that people will circulate within the area, the single outer contour boxes with smaller spacing are merged. After all, the smaller the spacing between two single outer contour boxes, the greater the probability that people will circulate to the separated areas during the subsequent execution of the task sequence. If they are not merged, the scope of the cleaning area may be misjudged. This process makes the judgment of the cleaning area more consistent with the actual flow of people. Then, all the single outer contour boxes are removed, and the entire area after removal is segmented into multiple sub-areas. The reason for segmentation is that these areas are likely to have been a whole block, and it is difficult to refine the cleaning task without segmentation. Finally, the garbage coverage rate in the sub-area is extracted from the dynamic area data, and the sub-area with a garbage coverage rate greater than the coverage rate threshold is identified as the area to be cleaned. This targeted screening avoids indiscriminate cleaning arrangements for all areas and ensures that cleaning resources can be invested in areas that really need cleaning and have more garbage.
[0010] In combination with some embodiments of the first aspect, in some embodiments, the step of merging into a single outer contour frame specifically includes: extending the outer frame line of any single outer contour frame to generate a single outer contour frame that can enclose all gathered people in two spatially adjacent single outer contour frames.
[0011] By employing this technical solution, when a single outer frame needs to be merged, the outer frame lines of any single outer frame are extended to generate a single outer frame that encompasses all the people gathered in the two adjacent single outer frames. This action of extending the outer frame lines connects the previously relatively independent but adjacent gathering areas of people, forming a unified whole in spatial representation, and simplifying the complex spatial distribution of people.
[0012] In combination with some embodiments of the first aspect, in some embodiments, the step of determining whether the collision risk is greater than the collision threshold specifically includes: determining the remaining time based on the difference between the planned time of the current cleaning task and the time for executing the current cleaning task, and the planned time of the current cleaning task is determined by the planned start and end time of the current cleaning task; determining the deviation factor based on the deviation between the overall completion progress of the task sequence and the planned progress; determining the priority based on the collision risk, the priority of the current cleaning task, the remaining time, and the deviation factor; determining whether the priority is greater than the priority threshold; if it is greater than the collision threshold, the step specifically includes: if it is greater than the priority threshold.
[0013] By adopting the above technical solution, the remaining time is first determined based on the difference between the planned time of the current cleaning task and the time to execute the current cleaning task. At the same time, the deviation factor is determined based on the deviation between the overall completion progress of the task sequence and the planned progress. Then, the priority is determined by combining multiple factors such as collision risk, priority of the current cleaning task, the determined remaining time, and deviation factor, and its importance and urgency in the entire task system are evaluated from different angles. Finally, the subsequent action strategy is determined by judging whether this priority is greater than the priority threshold. It avoids the one-sidedness of relying solely on a single factor to make decisions, makes the judgment on whether the cleaning task needs to be adjusted more reasonable, and effectively responds to various complex changes.
[0014] In combination with some embodiments of the first aspect, in some embodiments, the next target cleaning task is determined based on the priority of the cleaning task, and the step of pausing the current cleaning task specifically includes: obtaining the dynamic area data of the remaining cleaning tasks; determining the optimal cleaning task based on the dynamic area data, priority, and current distance of the remaining cleaning tasks.
[0015] By employing the above technical solution, dynamic regional data on remaining cleaning tasks is obtained, providing real-time insights into the areas where these tasks are located, including key information such as personnel flow changes and environmental emergencies. The optimal cleaning task is then determined based on this dynamic regional data, combined with factors such as the original priority of each cleaning task and the current distance. This fully considers changes in actual conditions and ensures that the selected cleaning task is the most appropriate under the current circumstances, ensuring that cleaning work is consistently optimized and making the selection of cleaning tasks more rational.
[0016] In combination with some embodiments of the first aspect, in some embodiments, after the step of obtaining real-time obstacle information of the current planned area to be cleaned, the method also includes: calculating the geometric data of the obstacle in the real-time obstacle information and the first current position coordinates to obtain a three-dimensional coordinate sequence consisting of multiple continuous path points, and obtaining a local bypass path, the starting path point of the local bypass path is the first current position coordinate, and the intermediate path points are located in the reachable space outside the geometric data; applying the local bypass path.
[0017] By adopting the above technical solution, when entering the stage after judging that the collision risk is greater than the threshold, the geometric data of the obstacle in the real-time obstacle information and the first current position coordinates of the cleaning equipment are used to generate a three-dimensional coordinate sequence consisting of multiple continuous path points through precise calculation, and then a local detour path is obtained. Among them, the geometric data of the obstacle provides key spatial information about the shape, size, position, etc. of the obstacle, and the first current position coordinates clearly define the starting point of the cleaning equipment at the moment. The local detour path generated by the combination of the two has a starting path point based on the current position, which ensures that the cleaning equipment can naturally and coherently cut into the detour route. The intermediate path points are located in the accessible space outside the geometric data, ensuring that the detour process is feasible. This allows cleaning work to proceed uninterruptedly in complex and changing environments, while enhancing the ability of cleaning equipment to cope with sudden obstacles, ensuring the smoothness and safety of the entire sanitation cleaning work.
[0018] In combination with some embodiments of the first aspect, in some embodiments, after the step of applying the local bypass path, the method also includes: determining a regression point based on the second current position coordinates and the original path in the task sequence; restoring the original path in the task sequence from the regression point; determining whether there are any unexecuted predetermined cleaning key points in the original path segment skipped during the execution of the local bypass path; if there are unexecuted predetermined cleaning key points; then inserting the missing predetermined cleaning key points after the regression point and before the first current position coordinates to generate a supplementary path; and applying the supplementary path.
[0019] By adopting the above technical solution, after applying the local detour path, the regression point is first determined based on the two key elements of the second current position coordinates of the cleaning equipment and the original path in the task sequence, which points out the accurate entry point for the cleaning equipment to subsequently restore the original path. Then, from this regression point, the cleaning equipment can restore the original path in the task sequence in an orderly manner, allowing the cleaning work to return to the normal planned track. Then, it is determined whether there are any unexecuted scheduled cleaning key points in the original path segment skipped during the execution of the local detour path, ensuring that important cleaning links will not be missed due to the detour. Once it is found that there are unexecuted scheduled cleaning key points, these missed key points are inserted at the appropriate position after the regression point and before the first current position coordinates, and a supplementary path is generated and applied. The entire cleaning process can not only ensure smooth progress by flexibly detouring when encountering obstacles, but also ensure that all scheduled cleaning tasks can be fully executed, taking into account the flexibility of responding to emergencies and the comprehensiveness of the cleaning work.
[0020] In the second aspect, the present application provides a smart sanitation treatment system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the smart sanitation treatment system to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0021] In a third aspect, the present application provides a computer program product comprising instructions, which, when run on a smart sanitation treatment system, enables the smart sanitation treatment system to execute the method described in the first aspect and any possible implementation of the first aspect.
[0022] In a fourth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on a smart sanitation treatment system, enable the smart sanitation treatment system to execute the method described in the first aspect and any possible implementation of the first aspect.
[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. During the execution of the task sequence, real-time obstacle information for the current planned cleaning area is collected to determine collision risk. This real-time data is classified as small data, focusing on the specific conditions surrounding the cleaning equipment itself. Compared to macro-data from dynamic areas, it is more targeted and timely. When the collision risk is determined to be greater than the collision threshold, traffic flow data for the current planned cleaning area is extracted based on dynamic area data from different time periods. This data is then input into a traffic flow prediction model to predict traffic flow for a preset time period in the future. The predicted collision risk is then determined based on the size of the current planned cleaning area. This is used to further assess whether the remaining time available for the cleaning equipment to successfully complete the current cleaning task. If time permits, the cleaning equipment can pause and wait until conditions are suitable to resume the current task. If time prohibits, the cleaning equipment will prioritize the next cleaning task and move to another area. This allows the entire sanitation cleaning process to flexibly respond to real-time changes while ensuring cleaning efficiency and safety, ensuring the orderly progress of each task.
[0024] 2. Determine the outline of people based on the dynamic area data of all areas, laying the foundation for subsequent work. According to the degree of discreteness of the personnel outline and the predetermined discrete threshold, the personnel outline is accurately classified into discrete people and clustered people. The different distribution states of people can be clearly distinguished to preliminarily identify areas that cannot be cleaned (due to higher safety risks). Then, based on the preset queue direction, adjacent clustered people are classified into different initial queue groups. For each initial queue group, a single outer contour box is calculated to further determine the areas that cannot be cleaned. Then, considering that people will circulate within the area, single outer contour boxes with smaller intervals are merged. After all, the smaller the interval between two single outer contour boxes, the greater the probability that people will circulate to the interval area during the subsequent execution of the task sequence. If they are not merged, the scope of the cleaning area may be misjudged. This process makes the judgment of the cleaning area more consistent with the actual personnel flow situation. Then, all single outer contour boxes are removed, and the entire area after removal is segmented into multiple sub-areas. The reason for segmentation is that these areas are likely to have been a whole block, and it is difficult to refine the cleaning task without segmentation. Finally, the garbage coverage rate in the sub-area is extracted from the dynamic area data, and the sub-area with a garbage coverage rate greater than the coverage rate threshold is identified as the area to be cleaned. This targeted screening avoids indiscriminate cleaning arrangements for all areas and ensures that cleaning resources can be invested in areas that really need cleaning and have more garbage.
[0025] 3. First, determine the remaining time based on the difference between the planned time of the current cleaning task and the time to execute the current cleaning task. At the same time, determine the deviation factor based on the deviation between the overall completion progress of the task sequence and the planned progress. Next, combine multiple factors such as collision risk, priority of the current cleaning task, the determined remaining time, and deviation factor to determine the priority, and evaluate its importance and urgency in the entire task system from different angles. Finally, determine the subsequent action strategy by judging whether this priority is greater than the priority threshold. This avoids the one-sidedness of relying solely on a single factor to make decisions, making the judgment on whether the cleaning task needs to be adjusted more reasonable and effectively responding to various complex changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a flow chart of the smart sanitation treatment method in the embodiment of the present application; Figure 2 This is another flow chart of the smart sanitation treatment method in an embodiment of the present application; Figure 3 This is another flow chart of the smart sanitation treatment method in an embodiment of the present application; Figure 4 It is an exemplary hardware structure diagram of the smart sanitation treatment system in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The terms used in the following examples of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and encompasses any or all possible combinations of one or more of the listed items.
[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0029] Please refer to Figure 1 , Figure 1 This is a flow chart of the smart sanitation treatment method in the embodiment of the present application; S101. Determine a sanitation path and a task sequence based on multiple planned areas to be cleaned, their priorities, and cleaning times. The planned areas to be cleaned are determined by dynamic area data. The sanitation path passes through all planned areas to be cleaned, and the task sequence includes cleaning tasks, their planned start and end times, their travel times, and their priorities. Among them, the planned area to be cleaned refers to the specific area that needs to be cleaned according to the dynamic area data. The priority is used to indicate the importance and urgency of different planned areas to be cleaned in the entire sanitation cleaning task. Cleaning time refers to the estimated time required to complete the cleaning task of each planned area to be cleaned. This indicator takes into account factors such as the size of the area, the amount of garbage, and the difficulty of cleaning. The sanitation path refers to the route that the sanitation cleaning equipment needs to pass when performing its tasks. This path passes through all planned areas to be cleaned to ensure that each area can be cleaned. The task sequence includes information such as the cleaning task, the planned start and end time of the cleaning task, the travel time of the cleaning task, and the priority of the cleaning task. It clarifies the order, timing, and importance of each cleaning task, and is the execution plan for the entire sanitation cleaning work.
[0030] It should be noted that the implementation of sanitation cleaning work must first determine a large area, which is the entire range of the cleaning operation. Subsequently, the area that actually needs to be cleaned will be further extracted based on the dynamic area data of the large area. The dynamic area data here is mainly obtained by video detection of the large area. Specifically, it is to use cameras and other equipment installed in the corresponding positions to shoot real-time video of the large area. The obtained video data constitutes the dynamic area data. This data can reflect many real-time conditions in the large area, such as the distribution of people, the placement of objects, and possible garbage accumulation, etc., providing a key basis for the subsequent screening of areas that need to be cleaned.
[0031] It's important to emphasize that this dynamic area data is instantaneous, representing only the situation within the larger area at the moment it was acquired. While new dynamic area data will be generated later, and the type of data remains consistent, based on relevant information obtained from large-area video detection, the actual situation within the area is constantly changing, such as the constant flow of people. Therefore, the specific content contained in subsequent dynamic area data will differ from previously acquired dynamic area data. Each acquired data point represents the real-time status of the larger area at a specific moment in time.
[0032] Specifically, multiple planned areas to be cleaned are first determined based on dynamic area data, and then corresponding priorities and cleaning times are set for each area.
[0033] The priority is estimated by the importance of the area and the garbage distribution density. The greater the importance, the higher the priority, and the greater the garbage distribution density, the higher the priority.
[0034] The unit cleaning time of an area is multiplied by the size of the area, and then multiplied by the density of garbage distribution in the area. The result is the cleaning time of the planned area to be cleaned.
[0035] In some specific embodiments, all planned cleaning areas can be sorted from high to low priority. Then, based on the location and cleaning time of each area, a heuristic algorithm such as a greedy algorithm is used to plan the sanitation path, minimizing the total length or total time of the path. When generating the task sequence, the cleaning tasks, planned start and end times, and travel time for each area are determined in order of the path, and priority information is also incorporated into the task sequence.
[0036] In some specific embodiments, sanitation routes may be planned not according to priority, but using a heuristic algorithm such as a greedy algorithm to minimize the total length or total time of the route. When generating a task sequence, the cleaning tasks, planned start and end times, and travel time for each area are determined in sequence according to the route order, and priority information is also incorporated into the task sequence.
[0037] S102. During the execution of the task sequence, obtain real-time obstacle information of the current planned area to be cleaned; and determine the current collision risk based on the real-time obstacle information; Real-time obstacle information refers to information about obstacles in the planned area to be cleaned, acquired in real time during the execution of a task sequence. This information includes the location, shape, and size of the obstacles. This information is used to assess the collision risk that cleaning equipment may encounter while performing cleaning work in that area.
[0038] It should be noted that real-time obstacle information is obtained by the clearing equipment, because dynamic area data presents a macro-level information, which focuses on reflecting the overall situation of the entire area, such as the distribution of personnel.
[0039] Real-time obstacle information focuses on objects in the immediate vicinity of the cleaning equipment that could hinder the cleaning process, such as the sudden appearance of pedestrians. Leveraging its various sensors (such as lidar and cameras), the cleaning equipment can accurately detect these obstacles in real time. The resulting information is more targeted and immediate, providing crucial and practical guidance for operations such as determining collision risks and planning local detours.
[0040] Specifically, when the cleaning equipment reaches the planned cleaning area, it uses sensors (such as lidar and cameras) to obtain real-time information about obstacles within the area, including the presence of pedestrians, vehicles, and fixed obstacles, as well as their specific locations and shapes. Based on this information and the cleaning equipment's own motion state (such as speed and direction), a specific algorithm is used to calculate the collision risk. For example, by calculating parameters such as the distance between the cleaning equipment and the obstacle and the relative speed, the likelihood of a collision is assessed.
[0041] In some embodiments, the collision risk is the number of obstacles; in other embodiments, the collision risk is the volume of the obstacles; in other embodiments, the collision risk is the area occupied by the obstacles multiplied by the speed of the cleaning device itself.
[0042] S103: Determine whether the collision risk is greater than a collision threshold; The collision threshold is a pre-set standard value used to determine the magnitude of the collision risk. When the calculated collision risk exceeds this threshold, it indicates that the cleaning equipment is at high risk of collision if it continues to perform the cleaning task in its current state, and appropriate measures must be taken.
[0043] If it is greater than the collision threshold, execute step S104; If it is not greater than the collision threshold, step S104 is executed to continue executing the task sequence.
[0044] S104: Inputting the pedestrian flow data of the current planned area to be cleaned into a pedestrian flow data prediction model to obtain predicted pedestrian flow data within a preset time length; Crowd flow data refers to data related to the flow of people in the current planned area to be cleaned, including the number of people.
[0045] It should be noted that dynamic area data covers traffic flow data for all areas. Throughout the sanitation workflow, when traffic flow data for the current planned area to be cleaned is needed, the traffic flow data for the corresponding area can be extracted from the existing dynamic area data to obtain the traffic flow data for the current planned area at a specific moment.
[0046] Furthermore, since the dynamic area data mentioned in the previous embodiment is essentially instantaneous data, as time passes, from the batch of dynamic area data used as the basis for the initial task sequence to the currently acquired dynamic area data, the traffic flow data for the current planned cleaning area contained in the dynamic area data at different moments will also change accordingly. By sequentially arranging and integrating these traffic flow data at different moments, a sequence of traffic flow data for the current planned cleaning area over time can be obtained.
[0047] Specifically, the preset time length is based on a pre-set time value, which clarifies the specific duration that needs to be paid attention to later. Then, the current time is added to the time value to obtain the preset time length.
[0048] The input data for the pedestrian flow prediction model is pedestrian flow data. This model collects pedestrian flow records corresponding to the planned cleaning area over different time periods. For example, the input data can be organized chronologically into time series vectors, with each vector element corresponding to the pedestrian flow value at a specific point in time. Statistical analysis-based prediction methods, such as moving average and exponential smoothing, are then used. Based on the changing trends of historical pedestrian flow data and combined with current pedestrian flow data, predicted pedestrian flow data for a preset time period is calculated. For example, by analyzing the average pedestrian flow for each time period over a period of time, pedestrian flow for a preset future time period can be predicted.
[0049] S105: Determine the predicted collision risk within a preset time length based on the predicted pedestrian flow data within a preset time length and the area of the current planned area to be cleaned; In some embodiments, the predicted human flow data is divided by the area of the current planned area to be cleaned to obtain the predicted collision risk.
[0050] S106: Determine whether the time during which the predicted collision risk within the preset time length is less than the collision threshold is greater than the remaining time of the current cleaning task; The remaining time of the current cleaning task is the time interval from the current moment to the scheduled end time of the current cleaning task. It is calculated by the scheduled start and end time of the current cleaning task and the current execution time.
[0051] After the predicted collision risk within the preset time length is determined in step S105 , this step is performed to determine whether there is enough time for the cleaning device to complete the current cleaning task safely.
[0052] Specifically, the predicted collision risk within a preset time period is used to identify the portion of time that is less than the collision threshold. This portion of time is then compared with the remaining time of the current cleaning task. If the portion of time less than the collision threshold is greater than the remaining time of the current cleaning task, this indicates that there is sufficient time within the remaining time of the current cleaning task for the cleaning device to continue the cleaning task safely (i.e., the collision risk is less than the threshold). If the portion of time less than the collision threshold is not greater than the remaining time of the current cleaning task, then adjustments to the cleaning task should be considered to avoid potential collision hazards.
[0053] If it is greater than the remaining time of the current cleaning task, then execute step S107; If it is not greater than the remaining time of the current cleaning task, then execute step S108; S107, pausing the current cleaning task, and extracting a time period within a preset time length during which the predicted collision risk is less than the collision threshold, and continuing to perform the current cleaning task during the time period; Specifically, the system first pauses the current cleaning task to avoid accidents caused by continued operation during high-collision risk conditions. Then, from the predicted collision risk within a preset timeframe, it extracts a time period below the collision threshold. When this time period arrives, the system resumes the current cleaning task. This ensures the cleaning equipment completes its cleaning work in a relatively safe environment, improving safety and efficiency.
[0054] In some embodiments, a pause and resume mechanism is implemented in the cleaning device's control system. When the conditions in step S106 are met, the control system issues a pause command, halting the cleaning device. Simultaneously, a timer is started. When the timer reaches a time interval less than the collision threshold, the control system issues a resume command, allowing the cleaning device to resume its cleaning task.
[0055] S108: Determine the next target cleaning task according to the priority of the cleaning task, and pause the current cleaning task.
[0056] Specifically, if it is found that the cleaning equipment cannot complete the task safely within the remaining time of the current cleaning task, the next target cleaning task to be executed is determined based on the priority of each cleaning task. First, the current cleaning task is paused, and then a cleaning task with a higher priority and current conditions that can be executed is selected from the task sequence as the next target task. This allows the order of cleaning tasks to be reasonably adjusted while ensuring safety, ensuring that the entire sanitation cleaning work can be carried out efficiently and orderly.
[0057] In some embodiments, when the next target cleaning task needs to be determined, the task with the highest priority and not yet paused or completed is found as the next target task according to the current task sequence. At the same time, a pause instruction is sent to the currently executing cleaning task to stop its operation.
[0058] As can be seen, during the execution of the task sequence, real-time obstacle information for the current planned cleaning area is obtained in real time to determine collision risk. This real-time data falls into the small data category, focusing on the specific conditions surrounding the cleaning equipment itself. Compared to macro-data from dynamic areas, it is more targeted and timely. When the collision risk is determined to be greater than the collision threshold, pedestrian flow data for the current planned cleaning area is extracted based on dynamic area data from different time periods. This data is then input into a pedestrian flow prediction model to predict pedestrian flow data for a preset time period in the future. Next, the predicted collision risk is comprehensively determined based on the size of the current planned cleaning area. This is used to further assess whether the remaining time is sufficient for the cleaning equipment to successfully complete the current cleaning task. If the remaining time allows, the cleaning equipment can pause and wait until conditions are suitable to resume the current task. If not, the cleaning equipment will prioritize the next cleaning task and move to another area to carry out cleaning work. This allows the entire sanitation cleaning process to flexibly respond to real-time changes while ensuring cleaning efficiency and safety, ensuring the orderly progress of each task.
[0059] See also Figure 2 , Figure 2 This is another flow chart of the smart sanitation treatment method in an embodiment of the present application; In some embodiments, before step S101, the method further includes: S201, determining a personnel profile based on dynamic area data of all areas; The personnel outline is used to represent the spatial distribution shape and range of personnel in the area outlined by dynamic area data.
[0060] S202, classifying the personnel profiles into discrete personnel and aggregated personnel according to the discrete degree of the personnel profiles and a predetermined discrete threshold; The degree of dispersion refers to a quantitative indicator of the dispersion state of personnel in spatial distribution. It measures whether personnel are relatively dispersed or concentrated by calculating factors such as the distance between personnel and the uniformity of distribution, thereby judging the density of personnel distribution.
[0061] The predetermined discreteness threshold is a pre-set numerical standard used to distinguish whether the people corresponding to the person profile are discrete or clustered. When the degree of discreteness of the person distribution reaches or exceeds this threshold, it is determined to be a discrete person; otherwise, it is determined to be a clustered person.
[0062] In some embodiments, multiple representative points within a person's outline (such as the person's center) are first selected, and the average distance between each pair of these points is calculated as a measure of dispersion. This distance is then compared with a predetermined dispersion threshold, and the person is classified based on the comparison result. For example, if the average distance is greater than 5 meters (assuming the dispersion threshold is set at 5 meters), the person is classified as a discrete person; otherwise, the person is clustered.
[0063] In some embodiments, a clustering analysis algorithm is used to cluster people within the personnel outline according to factors such as distance. If the number of clusters formed after clustering is large and the number of people in each cluster is small, it means that the distribution of people is relatively dispersed, and they are judged as discrete people according to preset rules; if relatively few clusters but a large number of people are formed after clustering, they are judged as clustered people. This judgment rule is adjusted according to a pre-set discrete threshold to ensure the accuracy of classification.
[0064] S203, classifying the gathered persons arranged adjacent to each other in the queue direction into different initial queue groups according to the preset queue direction; Preset queue direction: refers to a direction standard that is pre-set based on factors such as regional characteristics and personnel flow patterns. This direction can be the direction of the street, the main channel direction of the event venue, etc.
[0065] In some embodiments, the preset queue direction may be the direction of entering the current planned area to be cleaned in the sanitation path.
[0066] In some embodiments, on a geographic information system (GIS) map, virtual reference lines are drawn along preset queue directions, and then clustered personnel who fall near these reference lines and meet adjacent arrangement rules are marked out and grouped into an initial queue group. By continuously adjusting the position and range of the reference lines, the grouping operation of all clustered personnel is completed.
[0067] In other embodiments, by analyzing the personnel location data, a distance range is set (for example, the distance between people is within 2 meters and they are arranged in the queue direction) as the criterion for judging proximity. Then, starting from one end of the gathered personnel, according to the preset queue direction, the people who meet the proximity criteria are sequentially included in an initial queue group until they no longer meet the criteria. Then, the next group division is started, and so on to complete the grouping.
[0068] S204: For each initial queue group, calculate and generate a single outer contour frame that can envelop all gathered people in the initial queue group; determine a direction perpendicular to the queue direction as a cleaning direction; A single outer contour box refers to a closed geometric shape (usually a polygon, etc.) that can completely surround all the people gathered in the initial queue group. It spatially defines the approximate range of this group of people, making it easier to intuitively judge the relationship between this area and other areas and to perform cleaning planning and other operations.
[0069] The cleaning direction refers to the direction perpendicular to the queue direction. This direction plays a key role in the subsequent consideration of how the cleaning equipment should clean the corresponding area, such as the cleaning equipment's back-and-forth cleaning along the cleaning direction. It is an important reference for planning the cleaning path.
[0070] For each initial queue group, a computational geometry algorithm is used to calculate a closed geometric shape that encloses all of the people within the group, based on the positional coordinates of all the people gathered within the group. This is known as a single outer contour box. For example, for relatively regularly distributed groups of people, a rectangular outer contour box might be generated; for irregularly distributed groups, a polygonal outer contour box might be generated. At the same time, a direction perpendicular to the previously set queue direction is determined as the cleaning direction. This allows the cleaning equipment to efficiently cover the entire area according to this cleaning direction, improving cleaning efficiency and reducing omissions.
[0071] In some embodiments, a convex hull algorithm is used, taking the coordinates of the people in the initial queue as input data and calculating the smallest convex polygon that encompasses all people. This convex polygon is the single outer contour box. For the cleaning direction, the direction perpendicular to the queue direction vector is mathematically calculated and determined as the cleaning direction.
[0072] S205: Measure whether the distance between two spatially adjacent single outer contour frames in the cleaning direction is less than a preset cleaning distance threshold; It is a pre-set distance value used to measure whether the spacing between two adjacent single outer contour boxes in the cleaning direction is appropriate. If the spacing is less than the threshold, it is considered that there is a high possibility of people circulating between the two areas, and subsequent merging operations are required.
[0073] Taking into account the circulation of people between areas and to avoid unreasonable division of cleaning areas due to too small intervals, the interval distance between adjacent single outer contour frames is measured and compared with the cleaning distance threshold.
[0074] Along the determined cleaning direction, the distance between each pair of spatially adjacent single outer contour boxes is measured. This measurement can be achieved by calculating the distance between the closest boundary points of the two outer contour boxes in the cleaning direction. The measured distance is then compared with the pre-set cleaning distance threshold. If the distance is less than the threshold, it means that people can easily move between the two areas. From the perspective of cleaning area planning, the two areas can be considered as a relative whole and need to be merged to determine the cleaning area more in line with the actual dynamic situation of people. If the distance is greater than or equal to the cleaning distance threshold, the independence of the two single outer contour boxes is maintained, and subsequent cleaning planning is carried out according to their respective situations.
[0075] If it is less than the preset cleaning distance threshold, execute step S206; S206, merging into a single outer contour frame; Specifically, when it's determined that two adjacent single-outer-frames need to be merged, one of the outer frames is selected (usually the one that's easier to operate or has the least impact on the overall area) and its outer frame lines are extended. For example, by calculating the relative positional relationship between the two outer frames and the distribution of people, the outer frame lines are extended in the appropriate direction to ultimately generate a new outer frame. This new outer frame can completely enclose all the people gathered within the original two single outer frames, thus merging the two areas into one. This makes the division of the cleaning area more consistent with the actual flow and distribution of people, facilitating subsequent unified planning of cleaning tasks and other operations.
[0076] In some embodiments, based on a certain edge of one of the single outer contour frames, according to the distance and angle relationship between the two outer contour frames, a geometric calculation method is used to determine the length and direction that needs to be extended. Then, through means such as coordinate transformation, this edge is extended according to the calculation result, and the positions of other related edges are adjusted at the same time, finally forming a new single outer contour frame that can enclose all people.
[0077] In some specific embodiments, S2061 , the outer frame line of any single outer contour frame is extended to generate a single outer contour frame that can enclose all the gathered persons within two spatially adjacent single outer contour frames.
[0078] Specifically, after clarifying the two adjacent single outer contour frames to be merged, select one of the outer contour frames and perform an extension operation on its outer contour line. For example, if the two adjacent single outer contour frames are closely spaced in a certain direction and the distribution of personnel is relatively continuous, then analyze the outer contour line situation in this direction, and determine the length and angle direction that need to be extended by calculating the distance, angle, and other relationships between the outermost boundary of the personnel distribution and the adjacent outer contour line. Then, extend the selected outer contour line along this direction so that the extended outer contour line can form a new, larger single outer contour frame together with the original other edges. This new outer contour frame can completely enclose all the gathered personnel in the original two single outer contour frames, merging the two areas that were originally relatively independent but closely connected (because of the small interval, personnel are easy to circulate) into a whole, so as to facilitate more accurate planning of cleaning paths and determination of cleaning tasks in the future, so that the definition of the cleaning area is more in line with the actual dynamic distribution of personnel.
[0079] In some embodiments, the single outer contour to be extended is first determined, and its relative positional relationship with adjacent single outer contours is analyzed. Using geometric coordinate calculation methods, the specific lengths required for extension in each direction are calculated based on the coordinates of the endpoints of adjacent outer contours and the coordinates of the farthest points of the people in the two areas. Then, based on the calculated results, the coordinates of the corresponding outer contour endpoints are updated using a coordinate transformation formula to extend the outer contour. Finally, the newly generated outer contour is checked to ensure that it fully encompasses all people. If necessary, further adjustments are made to form a suitable, encompassing single outer contour.
[0080] As can be seen, when merging into a single outer frame is necessary, by extending the outer frame lines of any single outer frame, a single outer frame is generated that encompasses all the people gathered within the two adjacent single outer frames. This action of extending the outer frame lines connects the originally relatively independent but adjacent areas of people gathering, forming a unified whole in spatial representation, and simplifying the complex spatial distribution of people.
[0081] S207, removing all single outer contour boxes from the entire region, and then dividing the entire region after removal into multiple sub-regions; After completing the relevant processing of the single outer contour frame (such as merging operations), in order to analyze the area and plan the cleaning task in more detail, it is necessary to remove all the single outer contour frames and then divide the remaining area into multiple sub-areas, so that the parts that really need to be cleaned can be found from these sub-areas later.
[0082] Specifically, all previously defined single outlines are first removed from the entire area. The remaining area may be irregular in shape, large in scope, and relatively continuous. Then, based on the area's actual shape and geographic features (such as roads and building boundaries), or using a specific segmentation algorithm (based on factors such as area and shape regularity), the remaining area is divided into multiple smaller, relatively independent sub-areas. This ensures that each sub-area has relatively clear boundaries and scope, facilitating further analysis of its garbage coverage rate and other factors, thereby determining which sub-areas require cleaning.
[0083] S208, extracting garbage coverage in the sub-area from the dynamic area data; S209: Determine the sub-area whose garbage coverage rate is greater than the coverage rate threshold as the planned area to be cleaned.
[0084] As can be seen, determining the outlines of people based on dynamic area data across all areas lays the foundation for subsequent work. Based on the degree of discreteness of the outlines and a predetermined discrete threshold, the outlines are accurately classified into discrete people and clustered people. This allows for clear distinction between different distribution states of people, allowing for preliminary screening of areas that cannot be cleaned (due to higher safety risks). Next, based on the preset queue direction, adjacent clustered people are grouped into different initial queue groups. For each initial queue group, a single outer contour is calculated to further identify the areas that cannot be cleaned. Taking into account the flow of people within the area, single outer contours with small spacing are merged. After all, the smaller the spacing between two single outer contours, the greater the probability that people will flow into the separated areas during the subsequent execution of the task sequence. Failure to merge may lead to misjudgment of the cleaning area. This process ensures that the judgment of the cleaning area is more consistent with the actual flow of people. All single outer contours are then removed, and the entire area after removal is segmented into multiple sub-areas. Segmentation is required because these areas are likely to have originally been a single block, making it difficult to refine the cleaning tasks without segmentation. Finally, the garbage coverage rate in the sub-area is extracted from the dynamic area data, and the sub-area with a garbage coverage rate greater than the coverage rate threshold is identified as the area to be cleaned. This targeted screening avoids indiscriminate cleaning arrangements for all areas and ensures that cleaning resources can be invested in areas that really need cleaning and have more garbage.
[0085] In actual use, when making decisions based solely on the single factor of collision risk, the risk is highly one-sided. For example, in the case where the area cleaning task mentioned above is almost completed, if the decision to change the area is made only considering the collision risk, ignoring the progress of task completion, it may lead to unnecessary duplication of work or waste of resources.
[0086] See also Figure 3 , Figure 3This is another flow chart of the smart sanitation treatment method in an embodiment of the present application; Therefore, in some embodiments, step S103 is replaced by: S301, determining the remaining time according to the difference between the planned time of the current cleaning task and the time for executing the current cleaning task, where the planned time of the current cleaning task is determined by the planned start and end times of the current cleaning task; The planned time for the current cleaning task refers to the total duration from start to finish planned for the currently being executed cleaning task in the pre-established task sequence. It clarifies the time that the cleaning task is expected to take under ideal conditions. It is determined by the planned start and end times of the current cleaning task set in the task sequence and is an important basis for measuring task progress scheduling.
[0087] The execution time of the current cleaning task refers to the time spent from the actual start of the cleaning task to the current moment. The actual execution progress of the cleaning task is reflected by recording the elapsed time after the task is started.
[0088] The remaining time is the difference between the planned time of the current cleaning task and the time to execute the current cleaning task. It reflects how much available time is left before the cleaning task is completed as planned at the current moment. It plays a key role in subsequent decisions such as whether the task can be completed smoothly and whether adjustments are needed.
[0089] S302. Determine a deviation factor based on the deviation between the overall completion progress of the task sequence and the planned progress; The overall completion progress of the task sequence refers to the proportion of all completed cleaning tasks in the entire sanitation cleaning task sequence to the total task volume. It is measured by comparing the relevant indicators of the completed tasks (such as the number of cleaning areas, task duration, etc.) with the total task volume, reflecting the progress of the overall cleaning work.
[0090] The planned progress refers to the degree of completion of the overall cleaning work that should be achieved at the current moment according to the pre-set task sequence and time schedule. It is an expected reference standard used to compare the actual overall completion progress to detect any deviations.
[0091] The deviation factor is a quantitative indicator calculated based on the deviation between the overall completion progress of the task sequence and the planned progress. It is used to comprehensively reflect the degree of deviation of the overall cleaning work compared to the plan. Its numerical value and positive and negative direction can help determine whether the cleaning work is ahead of schedule or lagging behind, as well as the degree of deviation, providing a basis for subsequent further analysis and decision-making.
[0092] Specifically, the overall completion progress of the task sequence is calculated by tallying the number of completed cleaning tasks, the total cleaning area corresponding to these tasks, and the total time spent. This information is then compared with the total number of cleaning tasks, the total cleaning area, and the planned total duration set in the task sequence. For example, if the area corresponding to completed cleaning tasks accounts for 40% of the total cleaning area, this roughly indicates an overall completion progress of 40%. Then, based on the pre-planned task sequence, the planned progress that should be achieved at the current moment is determined according to the time nodes and task schedule. For example, if 50% of the tasks are scheduled to be completed at the current moment, the planned progress is 50%. Finally, the planned progress is subtracted from the overall completion progress to determine the deviation between the two. This deviation is then normalized or weighted (the specific algorithm can be customized based on actual needs) to obtain a deviation factor. A negative deviation factor indicates that the cleaning work is behind schedule; a positive deviation factor indicates that it is ahead of schedule. The absolute value of the deviation factor reflects the degree of deviation.
[0093] S303, determining the priority based on the collision risk, the priority of the current cleaning task, the remaining time, and the deviation factor; In some embodiments, there is a positive correlation between collision risk and priority. Specifically, the greater the collision risk, the higher the potential danger faced by the cleaning equipment when performing tasks in the current area. Given that ensuring the safety of cleaning work and avoiding possible collision accidents are the primary considerations, when the collision risk increases, in order to be able to take corresponding measures in a timely manner, such as adjusting the order of tasks or pausing the current task, etc., to effectively reduce the risk, the priority of the cleaning task should be higher at this time, thereby guiding the cleaning work to prioritize those tasks that may cause safety problems.
[0094] There is an inverse correlation here, that is, the higher the priority originally set for the current cleaning task, the lower its priority in the current overall assessment after comprehensive consideration. This is because the originally set high priority usually means that the current planned area to be cleaned is relatively more important under normal circumstances, and the cleaning work really needs to be completed as soon as possible. However, when taking into account other actual factors (such as collision risk, remaining time, etc.), if it is still executed according to the original high priority, it may not be able to complete the task smoothly due to the current unfavorable conditions (such as excessively high collision risk, tight remaining time, etc.), and even affect the progress of the overall cleaning work. Therefore, appropriately lowering its priority can arrange the task sequence more flexibly, increase the probability of successfully completing the important task in the future, ensure that the overall cleaning work can be carried out in an orderly manner, and avoid being overly obsessed with a single high-priority task and ignoring potential problems caused by other actual situations.
[0095] Remaining time is negatively correlated with priority. The shorter the remaining time, the less urgent the task is from the perspective of the overall cleaning process. Because the available time is limited, forcing the task to continue may lead to numerous difficulties, even failure to complete it on time, and may also delay the progress of other tasks. Therefore, the lower the priority of the cleaning task, the more inclined to prioritize tasks with more time remaining and a greater chance of completion. This ensures that the overall cleaning process proceeds at a reasonable pace and sequence, improving overall cleaning efficiency.
[0096] The deviation factor is positively correlated with the priority level. A larger deviation factor indicates that the overall completion progress of the task sequence is more likely to be ahead of the planned progress. If time permits, the current pace can be maintained.
[0097] Based on the influence of the above factors on priority, the final priority value is determined by weighting. In specific operations, the corresponding weight coefficient will first be set for each factor based on the actual characteristics of sanitation cleaning work and the importance of each factor in the overall decision-making. For example, considering that the risk of collision is related to the safety of cleaning equipment and personnel, a relatively high weight may be given; while the priority of the current cleaning task is relatively less important in the comprehensive consideration, a relatively low weight will be set, etc. (The specific weight value can be determined based on actual experience and a large number of cleaning task simulation tests).
[0098] Next, the actual values corresponding to each factor (e.g., collision risk can be expressed as a specific risk probability value, the remaining time in minutes, the quantified value of the deviation factor, etc.) are multiplied by their corresponding weight coefficients. The weighted results of all factors are then summed up. The final value is the priority value of the cleaning task determined after comprehensively considering all factors. This weighted calculation method can organically integrate factors of different dimensions and scales, scientifically and rationally reflecting the importance and urgency of the cleaning task within the current task system from multiple perspectives, providing a strong basis for subsequent decisions such as whether to adjust the cleaning task accordingly.
[0099] S304, determining whether the priority is greater than the priority threshold; Step S104 is replaced by: S1041. If it is greater than the priority threshold, the pedestrian flow data of the current planned area to be cleaned is input into the pedestrian flow data prediction model to obtain the predicted pedestrian flow data within a preset time length.
[0100] It can be seen that the remaining time is first determined based on the difference between the planned time of the current cleaning task and the time to execute the current cleaning task. At the same time, the deviation factor is determined based on the deviation between the overall completion progress of the task sequence and the planned progress. Next, the priority is determined by combining multiple factors such as the collision risk, the priority of the current cleaning task, the determined remaining time, and the deviation factor, and its importance and urgency in the entire task system are evaluated from different angles. Finally, the subsequent action strategy is determined by judging whether this priority is greater than the priority threshold. It avoids the one-sidedness of relying solely on a single factor to make decisions, makes the judgment on whether the cleaning task needs to be adjusted more reasonable, and effectively responds to various complex changes.
[0101] In practice, the timing of task sequence creation and subsequent decision-making regarding cleaning task changes often differ. This discrepancy can lead to numerous changes in the actual cleaning situation, including changes in foot traffic, the presence of temporary obstacles, and overall cleaning schedule deviations.
[0102] In this case, it's obviously unreasonable to use only the initial priority of the cleaning task in the task sequence to determine whether to change the cleaning task at that moment. This is because the initial priority is based only on various estimated factors at the specific time when the task sequence was created, and it cannot fully and dynamically reflect the ever-changing reality during the subsequent actual execution process.
[0103] In some embodiments, step S108 is replaced by: S305, obtaining dynamic area data of remaining cleaning tasks; S306: Determine the optimal cleaning task according to the dynamic area data, priority, and current distance of the remaining cleaning tasks.
[0104] The optimal cleaning task refers to the cleaning task that is most suitable for priority execution among the remaining cleaning tasks, after comprehensively considering the real-time situation of the area reflected by its dynamic area data, the originally set priority, and the current distance (such as the distance between the cleaning equipment and the area where the task is located).
[0105] The priority mentioned here is the one determined in step S101. However, it's important to note that this priority is based on a previous point in time. In practice, if computing power permits, the priority should be re-determined based on the actual situation at the new point in time, following the method in step S101. Because the circumstances surrounding cleaning tasks change over time, timely updating of priorities can help make decisions more relevant to current circumstances.
[0106] The dynamic area data here specifically refers to pedestrian flow data.
[0107] Current distance: This refers to the distance between the cleaning equipment's current location and the areas where each remaining cleaning task is located. It can also be the distance between the current planned cleaning area and other areas.
[0108] Crowdflow data: Crowdflow data is positively correlated with the optimal cleaning task. This means that higher traffic in an area indicates a higher volume of waste and a more urgent need for cleaning. Consequently, the cleaning task corresponding to that area is more likely to be selected as the optimal task in the comprehensive evaluation.
[0109] Priority: Priority also has a positive correlation with final results. High-priority cleaning tasks are typically determined based on a comprehensive assessment of factors such as their importance and urgency. These high-priority tasks are prioritized when selecting the optimal cleaning task to ensure that critical areas and emergencies are addressed promptly.
[0110] Current distance: The current distance is negatively correlated with the final result. The closer the cleaning equipment is to a remaining cleaning task area, the lower the time and cost required to reach that area. Under the same conditions, the cleaning task in that area is more advantageous and more likely to be selected as the optimal task. This improves the efficiency of the cleaning equipment and reduces unnecessary travel.
[0111] In some embodiments, each factor can be assigned a corresponding weight. Specific values such as foot traffic data, updated priority, and current distance can be quantified and then weighted and summed according to a specific calculation formula. Finally, the remaining cleaning tasks are ranked based on the calculated results, and the task with the highest value is the optimal cleaning task.
[0112] As can be seen, obtaining dynamic regional data for remaining cleaning tasks allows for real-time monitoring of the areas where these tasks are located, including key information such as personnel flow changes and environmental emergencies. This dynamic regional data for remaining cleaning tasks is then combined with factors such as the original priority of each cleaning task and the current distance to determine the optimal cleaning task. This fully considers changes in actual conditions and ensures that the selected cleaning task is the most appropriate under the current circumstances, ensuring that cleaning work is consistently optimized and making the selection of cleaning tasks more rational.
[0113] In some embodiments, after step S102, the method further includes: S401, calculating the geometric data of the obstacle in the real-time obstacle information and the first current position coordinates to obtain a three-dimensional coordinate sequence consisting of multiple continuous path points, and obtaining a local detour path, wherein the starting path point of the local detour path is the first current position coordinates, and the intermediate path points are located in the reachable space outside the geometric data; The geometric data of an obstacle is used to represent the spatial characteristics of the obstacle, such as its shape, size, and position. For example, for a rectangular obstacle, the geometric data may include its length, width, height, and coordinate position in space.
[0114] The first current position coordinate refers to the three-dimensional space coordinate position of the cleaning device at the current moment, and is used to determine the starting point of the cleaning device in the environment.
[0115] Three-dimensional coordinate sequence: It is an ordered set consisting of a series of three-dimensional coordinate points. These points are connected in sequence to form a path, which is used to represent the local detour path in this step.
[0116] When the cleaning device senses an obstacle in the surrounding environment, it will extract the geometric data of the obstacle from the real-time obstacle information and clarify its own first current position coordinates. Then, based on this data, precise calculations are performed through specific algorithms (such as path planning algorithms). The purpose of the calculation is to generate a three-dimensional coordinate sequence, and each coordinate point in this sequence represents the position that the cleaning device needs to pass through during the detour. The starting path point is the first current position coordinate of the cleaning device, which can ensure that the cleaning device smoothly enters the detour path from the current position. The intermediate path points are strictly limited to the accessible space outside the obstacle geometric data to ensure that the cleaning device will not collide with obstacles during the detour and can pass through the surrounding space smoothly.
[0117] S402: Apply the local detour path.
[0118] It can be seen that when entering the stage after judging that the collision risk is greater than the threshold, the geometric data of the obstacle in the real-time obstacle information and the first current position coordinates of the cleaning equipment are used to generate a three-dimensional coordinate sequence consisting of multiple continuous path points through precise calculation, and then a local detour path is obtained. Among them, the geometric data of the obstacle provides key spatial information about the shape, size, position, etc. of the obstacle, and the first current position coordinates clearly define the starting point of the cleaning equipment. The local detour path generated by the combination of the two has a starting path point based on the current position, which ensures that the cleaning equipment can naturally and coherently cut into the detour route. The intermediate path points are located in the accessible space outside the geometric data, ensuring that the detour process is feasible. It allows cleaning work to proceed uninterruptedly in complex and changing environments, while enhancing the ability of cleaning equipment to cope with sudden obstacles, ensuring the smoothness and safety of the entire sanitation cleaning work.
[0119] After step S402, the method further includes: S403, determining a regression point based on the second current position coordinates and the original path in the task sequence; The second current position coordinate refers to the new position coordinate of the cleaning device after a certain operation (for example, after taking a local detour or other actions), which clarifies the specific position of the cleaning device in space at this time.
[0120] The original path in the task sequence is the standard route set for the cleaning equipment when the cleaning task is initially planned, which passes through each area to be cleaned in sequence. It stipulates the ideal trajectory for the normal progress of cleaning work and is an important basis for subsequent judgment of whether the cleaning equipment has deviated and how to return to the normal route.
[0121] The regression point is a position point determined based on two key elements: the second current position coordinates of the cleaning equipment and the original path in the task sequence. It is equivalent to the entry point for the cleaning equipment to return from the current position to the original path. After finding this point, the cleaning equipment can continue to perform subsequent cleaning tasks along the original path to ensure the continuity of the cleaning work.
[0122] Specifically, when the cleaning equipment encounters an obstacle and applies a local detour, its position changes. At this point, the second current position coordinates of the cleaning equipment are obtained through a positioning system (such as GPS, Beidou positioning, etc.) to determine its current spatial location. At the same time, the original path information in the pre-set task sequence is retrieved. This path is composed of a series of continuous position points, representing the order and route of the cleaning equipment's normal cleaning of each area. Then, by analyzing the relative positional relationship between the cleaning equipment's second current position coordinates and each position point on the original path, an appropriate algorithm (such as calculating the shortest distance, minimum angle deviation, etc.) is used to find the most suitable position point on the original path as the regression point.
[0123] S404, starting from the regression point, restoring the original path in the task sequence; S405, determining whether there are any unexecuted predetermined cleaning key points in the original path segment skipped during the execution of the local detour path; The original path segment refers to the part of the original path in the task sequence that should have been passed but was actually skipped during the execution of the local detour path by the cleaning equipment. There are usually some key positions or areas that need to be cleaned on these paths, which are the predetermined cleaning key points.
[0124] The scheduled cleaning key points are some pre-set locations or areas that are important for cleaning work on the original path in the task sequence, such as corners that are prone to generating a lot of garbage, areas with high traffic flow and high hygiene requirements, etc. These key points must be cleaned to ensure the integrity and high-quality completion of the entire cleaning task.
[0125] When the cleaning equipment continues to perform the cleaning task along the original path, it calls the original path information in the stored task sequence and the relevant records of the previously executed local detour path to determine which original path segments were skipped during the detour. Then, it checks one by one to see whether these key points have been cleaned by comparing them with the pre-set scheduled cleaning key point information on these path segments (this information has been determined and stored when the cleaning task was initially planned, and includes the location coordinates of the key points, cleaning requirements, etc.). For example, by checking the cleaning records of the cleaning equipment (such as records of which areas have completed cleaning operations, etc.) or by using sensors to detect the cleaning status of the corresponding areas (such as detecting whether garbage is still present, etc.), it can be determined whether there are any unexecuted scheduled cleaning key points in the original path segments skipped during the execution of the local detour path, providing an accurate basis for determining whether additional cleaning is needed later.
[0126] S406: If there are any unexecuted predetermined cleaning key points, insert the missing predetermined cleaning key points after the regression point and before the first current position coordinate to generate a supplementary path; The missed scheduled cleaning key points refer to those scheduled cleaning key points that were not executed in the original path segment that was skipped during the execution of the local detour path, as determined by step S405. These key points are very important to the integrity of the cleaning work and need to be ensured to be cleaned by inserting supplementary paths.
[0127] The supplementary path is based on the position of the missed scheduled cleaning key points. The corresponding path segments are inserted after the regression point and before the first current position coordinate, so that the cleaning equipment can pass through these missed key points while continuing to perform the cleaning task, thereby ensuring the comprehensiveness of the cleaning work. It is a supplement to the original path.
[0128] After identifying any missed scheduled cleaning key points, the system first determines the current regression point and the previous first current position coordinates of the cleaning device. The system then analyzes the location distribution of these missed scheduled cleaning key points. Based on their coordinate positions and their relative relationships to the regression point and the first current position coordinates, a path planning algorithm (e.g., considering how to connect these key points in the shortest and most convenient manner while complying with the cleaning device's traffic rules) is used to generate a supplementary path. For example, by calculating the geometric relationships between each missed key point and between them and the regression point and the first current position coordinates, such as distances and angles, the system determines the appropriate order for the cleaning device to pass through these key points. These key points are then connected in sequence and smoothly integrated with the path segments containing the regression point and the first current position coordinates to form a complete supplementary path. This supplementary path is then integrated into the cleaning device's subsequent route planning, allowing the cleaning device to continue its journey from the regression point, passing through the missed scheduled cleaning key points one by one according to the supplementary path settings, completing the cleaning of these areas that might have been missed, and ensuring the comprehensiveness and high-quality completion of the entire cleaning task.
[0129] S407: Apply the supplementary path.
[0130] It can be seen that after applying the local detour path, the regression point is first determined based on the two key elements of the second current position coordinates of the cleaning equipment and the original path in the task sequence, which points out the accurate entry point for the cleaning equipment to subsequently restore the original path. Then, from this regression point, the cleaning equipment can restore the original path in the task sequence in an orderly manner, allowing the cleaning work to return to the normal planned track. Then, it is determined whether there are any unexecuted scheduled cleaning key points in the original path segment skipped during the execution of the local detour path, ensuring that important cleaning links will not be missed due to detours. Once it is found that there are unexecuted scheduled cleaning key points, these missed key points are inserted at the appropriate position after the regression point and before the first current position coordinates, and a supplementary path is generated and applied. The entire cleaning process can not only ensure smooth progress by flexibly detouring when encountering obstacles, but also ensure that all scheduled cleaning tasks can be fully executed, taking into account the flexibility of responding to emergencies and the comprehensiveness of the cleaning work.
[0131] The following introduces an exemplary smart sanitation treatment system 400 provided in an embodiment of the present application. Figure 4 This is a schematic diagram of an exemplary hardware structure of the smart sanitation treatment system 400 provided in an embodiment of the present application.
[0132] In some embodiments, the smart sanitation treatment system 400 is a computer device or the smart sanitation treatment system 400 includes a computer device. The computer device includes a processor, a memory and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers through a network connection. In some embodiments, the network interface can be a wired network interface, and in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, it implements the method in the embodiment of the present application.
[0133] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0134] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0135] As used in the above embodiments, the term “when” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if determining that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0136] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive).
[0137] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A smart sanitation treatment method, characterized in that: include: Determine a sanitation path and a task sequence according to a plurality of planned areas to be cleaned, priorities corresponding to the planned areas to be cleaned, and cleaning times corresponding to the planned areas to be cleaned; The planned area to be cleaned is determined by dynamic area data; the sanitation path passes through all the planned areas to be cleaned, and the task sequence includes cleaning tasks, planned start and end times of the cleaning tasks, travel times of the cleaning tasks, and priorities of the cleaning tasks; During the execution of the task sequence, real-time obstacle information of the current planned area to be cleaned is obtained; and determining a current risk of collision based on the real-time obstacle information; determining whether the collision risk is greater than a collision threshold; If it is greater than the collision threshold, then; Determine the predicted collision risk within a preset time length based on the predicted pedestrian flow data within a preset time length and the area of the current planned area to be cleaned; Determine whether the time during which the predicted collision risk within a preset time length is less than the collision threshold is greater than the remaining time of the current cleaning task; If it is greater than the remaining time of the current cleaning task, the current cleaning task is paused, and a time period less than the collision threshold in the predicted collision risk within the preset time length is extracted, and the current cleaning task is continued during the said time period; If it is not greater than the remaining time of the current cleaning task, the next target cleaning task is determined according to the priority of the cleaning task, and the current cleaning task is paused.
2. The method according to claim 1, characterized in that The step of determining the planned area to be cleaned by dynamic area data specifically includes: Determine personnel profiles based on dynamic area data for all areas; Classifying the personnel profiles into discrete personnel and aggregated personnel according to the discrete degree of the personnel profiles and a predetermined discrete threshold; According to a preset queue direction, classifying the gathered persons arranged adjacent to each other in the queue direction into different initial queue groups; For each of the initial queue groups, a single outer contour frame that can envelop all the gathered people in the initial queue group is calculated and generated; a direction perpendicular to the queue direction is determined as a cleaning direction; Measuring whether the distance between two spatially adjacent single outer contour frames in the cleaning direction is less than a preset cleaning distance threshold; If it is less than the preset cleaning distance threshold, it will be merged into a single outer contour frame; Remove all single outer contour boxes from the entire area, and then divide the entire area after removal into multiple sub-areas; extracting the garbage coverage rate in the sub-area from the dynamic area data; The sub-area whose garbage coverage rate is greater than the coverage rate threshold is determined as the planned area to be cleaned.
3. The method according to claim 2, characterized in that The step of merging into a single outer contour frame specifically includes: Extend the outer frame line of any single outer contour frame to generate a single outer contour frame that can envelop all the gathered persons within two spatially adjacent single outer contour frames.
4. The method according to claim 1, wherein The step of determining whether the collision risk is greater than the collision threshold specifically includes: Determine the remaining time based on the difference between the planned time of the current cleaning task and the time of executing the current cleaning task, where the planned time of the current cleaning task is determined by the planned start and end times of the current cleaning task; Determining a deviation factor based on the deviation between the overall completion progress of the task sequence and the planned progress; Determine the priority based on the collision risk, the priority of the current cleaning task, the remaining time, and the deviation factor; Determining whether the priority is greater than a priority threshold; The step of if it is greater than the collision threshold specifically includes: if it is greater than the priority threshold.
5. The method according to claim 4, characterized in that The step of determining the next target cleaning task according to the priority of the cleaning task and pausing the current cleaning task specifically includes: Acquiring the dynamic area data of the remaining cleaning tasks; An optimal cleaning task is determined according to the dynamic area data, priority, and current distance of the remaining cleaning tasks.
6. The method according to claim 1, wherein After the step of obtaining real-time obstacle information of the current planned area to be cleaned, the method further includes: Calculating the geometric data of the obstacle in the real-time obstacle information and the first current position coordinates to obtain a three-dimensional coordinate sequence consisting of multiple continuous path points to obtain a local detour path, where the starting path point of the local detour path is the first current position coordinate and the intermediate path points are located in the reachable space after the geometric data; The local detour path is applied.
7. The method according to claim 6, characterized in that After the step of applying the local detour path, the method further includes: Determine a regression point based on the second current position coordinates and the original path in the task sequence; Starting from the regression point, restoring the original path in the task sequence; determining whether there are any unexecuted predetermined cleaning key points in the original path segment skipped during the execution of the local detour path; If there are any unexecuted predetermined cleaning key points, insert the missing predetermined cleaning key points after the regression point and before the first current position coordinate to generate a supplementary path; The supplemental path is applied.
8. A smart sanitation treatment system, characterized in that: The smart sanitation treatment system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the smart sanitation treatment system to execute the method as described in any one of claims 1-7.
9. A computer program product comprising instructions, characterized in that When the computer program product runs on a smart sanitation treatment system, the smart sanitation treatment system executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on the smart sanitation treatment system, the smart sanitation treatment system executes the method as described in any one of claims 1-7.