Cleaning line planning method and device, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本发明的主要目的在于提供一种清扫线规划方法、装置、设备及存储介质,旨在解决现有技术智能清扫设备清扫线规划不合理,导致清洁效率低的技术问题
[0025]本发明通过根据待清扫区域生成多条子清扫线,并依据各子清扫线的端点位置对生成的子清扫线进行分簇,获得多个清扫线簇;基于清扫线簇将待清扫区域划分为多个子区域,并为各子区域设置对应的区域标签;根据清扫起始位置确定各清扫线簇之间的簇间移动代价;基于清扫起始位置、区域标签及簇间移动代价确定目标清扫线。由于会将生成的多条子清扫线进行分簇,在分簇依据分簇设置的区域标签及各清扫线簇之间的簇间移动代价确定最终的目标清扫线,降低了清扫线规划时的计算量,保证在子清扫线较多时依旧可正常进行计算。
Smart Images

Figure CN117782082B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent cleaning technology, and in particular to a cleaning line planning method, apparatus, equipment and storage medium. Background Technology
[0002] Currently, intelligent cleaning equipment (such as intelligent cleaning robots) has been widely used in daily life, and cleaning efficiency has always been a key concern for users. The planning of the cleaning line directly determines the cleaning efficiency. However, when planning routes, current intelligent cleaning equipment generally selects the cleaning line closest to the current location without global planning, which can lead to problems such as chaotic back-and-forth trajectories and low cleaning efficiency.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a cleaning line planning method, apparatus, device, and storage medium, aiming to solve the technical problem of low cleaning efficiency caused by unreasonable cleaning line planning in existing intelligent cleaning equipment.
[0005] To achieve the above objectives, the present invention provides a cleaning line planning method, the method comprising the following steps: Multiple sub-cleaning lines are generated based on the area to be cleaned, and the generated sub-cleaning lines are clustered according to the endpoint positions of each sub-cleaning line to obtain multiple cleaning line clusters; The area corresponding to each of the cleaning line clusters is divided into multiple sub-regions, and a corresponding area label is set for each sub-region; Determine the inter-cluster movement cost between each cleaning line cluster based on the starting position of the cleaning process; The target cleaning line is determined based on the cleaning start position, the area label, and the inter-cluster movement cost.
[0006] Optionally, the step of clustering the generated sub-cleaning lines based on the endpoint positions of each sub-cleaning line includes: Detect whether the endpoint position of each sub-sweeping line can be projected onto the adjacent sub-sweeping line in a preset direction; Among the multiple sub-cleaning lines, the sub-cleaning lines that can be projected onto adjacent sub-cleaning lines are taken as the molecular cleaning lines to be cleaned. The molecular sweep line and its neighboring sub-sweep lines are grouped into a cluster.
[0007] Optionally, the step of determining the inter-cluster movement cost between each cleaning line cluster based on the cleaning start position includes: Obtain the starting cleaning position, and determine the cleaning inlet and outlet positions corresponding to each cleaning line cluster based on the starting cleaning position; The inter-cluster movement cost between each cleaning line cluster is determined based on the cleaning inlet location and the cleaning outlet location.
[0008] Optionally, the step of obtaining the starting cleaning position and determining the cleaning inlet and outlet positions corresponding to each cleaning line cluster based on the starting cleaning position includes: Obtain the starting cleaning position and determine the interval distance between the endpoint position of each sub-cleaning line in each cleaning line cluster and the starting cleaning position; The cleaning inlet and outlet positions corresponding to each cleaning line cluster are determined based on the interval distance.
[0009] Optionally, the step of determining the target cleaning line based on the cleaning start position, the area label, and the inter-cluster movement cost includes: The cluster cleaning sequence is determined based on the starting cleaning position and the inter-cluster movement cost. The target cleaning line is determined based on the area label, the cluster cleaning sequence, and the multiple cleaning line clusters.
[0010] Optionally, the step of determining the cluster cleaning sequence based on the starting cleaning position and the inter-cluster movement cost includes: The starting cleaning line cluster is selected from the plurality of cleaning line clusters according to the starting cleaning position; Obtain the cleaning outlet position corresponding to the starting cleaning line cluster; The target cleaning line cluster is selected from the plurality of cleaning line clusters based on the cleaning exit location and the inter-cluster movement cost; Detect whether there are any unselected cleaning line clusters among the plurality of cleaning line clusters; If not, the cluster cleaning sequence is determined based on the starting cleaning line cluster and the target cleaning line cluster.
[0011] Optionally, the step of determining the cluster cleaning sequence based on the starting cleaning cluster and the target cleaning cluster includes: Obtain the cluster identifier information corresponding to the starting sweep line cluster and the target sweep line cluster; The cluster identification information is spliced together according to the order in which the cleaning line clusters are selected to obtain the cluster cleaning order.
[0012] Optionally, after the step of detecting whether there is an unselected cleaning line cluster among the plurality of cleaning line clusters, the method further includes: If it exists, the cleaning exit position corresponding to the target cleaning line cluster is obtained as the new cleaning exit position, and the step of selecting the target cleaning line cluster from the multiple cleaning line clusters based on the cleaning exit position and the inter-cluster movement cost is returned.
[0013] Optionally, the step of selecting the starting cleaning line cluster from the plurality of cleaning line clusters based on the cleaning start position includes: Obtain the cleaning inlet location corresponding to each cleaning line cluster; Determine the distance the cleaning starts from the cleaning position and moves to the corresponding cleaning inlet position of each cleaning line cluster; The moving distances are sorted from smallest to largest, and the cleaning line cluster corresponding to the first moving distance in the sorting result is taken as the starting cleaning line cluster.
[0014] Optionally, the step of determining the target cleaning line based on the area label, the cluster cleaning sequence, and the plurality of cleaning line clusters includes: Based on the area labels, the cleaning sequence of the sub-cleaning lines corresponding to each cleaning line cluster is determined, and the sub-line cleaning sequence is obtained. The target cleaning line is determined based on the sub-line cleaning sequence, the cluster cleaning sequence, and the multiple cleaning line clusters.
[0015] Optionally, the step of determining the target cleaning line based on the sub-line cleaning sequence, the cluster cleaning sequence, and the plurality of cleaning line clusters includes: The cleaning trajectory corresponding to each cleaning line cluster is determined according to the sub-line cleaning sequence; The cleaning movement trajectories corresponding to each cleaning line cluster are connected according to the cluster cleaning sequence to obtain the target cleaning line.
[0016] Furthermore, to achieve the above objectives, the present invention also proposes a sweeping line planning device, which includes the following modules: The line clustering module is used to generate multiple sub-cleaning lines based on the area to be cleaned, and to cluster the generated sub-cleaning lines according to the endpoint positions of each sub-cleaning line to obtain multiple cleaning line clusters; The label setting module is used to divide the area corresponding to each cleaning line cluster into multiple sub-regions and set a corresponding area label for each sub-region. The cost calculation module is used to determine the inter-cluster movement cost between each cleaning line cluster based on the cleaning start position; The route planning module is used to determine the target cleaning line based on the cleaning start position, the area label, and the inter-cluster movement cost.
[0017] Optionally, the line clustering module is further configured to detect whether the endpoint position of each sub-cleaning line can be projected onto a neighboring sub-cleaning line in a preset direction; to designate the sub-cleaning lines that can be projected onto neighboring sub-cleaning lines as the molecular cleaning lines to be cleaned; and to group the molecular cleaning lines to be cleaned and the neighboring sub-cleaning lines corresponding to the molecular cleaning lines into a cluster.
[0018] Optionally, the cost calculation module is further configured to obtain the starting cleaning position, and determine the cleaning inlet position and cleaning outlet position corresponding to each cleaning line cluster based on the starting cleaning position; and determine the inter-cluster movement cost between each cleaning line cluster based on the cleaning inlet position and the cleaning outlet position.
[0019] Optionally, the cost calculation module is further configured to obtain the starting cleaning position, determine the interval distance between the endpoint position of each sub-cleaning line in each cleaning line cluster and the starting cleaning position; and determine the cleaning inlet position and cleaning outlet position of each cleaning line cluster based on the interval distance.
[0020] Optionally, the route planning module is further configured to determine the cluster cleaning sequence based on the starting cleaning position and the inter-cluster movement cost; and to determine the target cleaning line based on the area label, the cluster cleaning sequence, and the multiple cleaning line clusters.
[0021] Optionally, the route planning module is further configured to: select a starting cleaning line cluster from the plurality of cleaning line clusters based on the starting cleaning position; obtain the cleaning exit position corresponding to the starting cleaning line cluster; select a target cleaning line cluster from the plurality of cleaning line clusters based on the cleaning exit position and the inter-cluster movement cost; detect whether there are any cleaning line clusters that have not been selected among the plurality of cleaning line clusters; if not, determine the cluster cleaning order based on the starting cleaning line cluster and the target cleaning line cluster.
[0022] Optionally, the route planning module is further configured to obtain cluster identification information corresponding to the starting cleaning line cluster and the target cleaning line cluster; and to splice the cluster identification information according to the order in which the cleaning line clusters are selected to obtain the cluster cleaning order.
[0023] Furthermore, to achieve the above objectives, the present invention also proposes a cleaning line planning device, which includes: a processor, a memory, and a cleaning line planning program stored in the memory and executable on the processor. When the cleaning line planning program is executed by the processor, it implements the steps of the cleaning line planning method as described above.
[0024] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a cleaning line planning program, wherein the cleaning line planning program, when executed, implements the steps of the cleaning line planning method as described above.
[0025] This invention generates multiple sub-cleaning lines based on the area to be cleaned, and clusters these sub-cleaning lines according to their endpoint positions to obtain multiple cleaning line clusters. The area to be cleaned is then divided into multiple sub-regions based on these cleaning line clusters, and each sub-region is assigned a corresponding region label. The inter-cluster movement cost between cleaning line clusters is determined based on the cleaning start position. Finally, the target cleaning line is determined based on the cleaning start position, region labels, and inter-cluster movement cost. Because the generated sub-cleaning lines are clustered, and the final target cleaning line is determined based on the region labels set for each cluster and the inter-cluster movement cost, the computational load during cleaning line planning is reduced, ensuring that calculations can still be performed normally even when there are many sub-cleaning lines. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the structure of an electronic device in the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the first embodiment of the cleaning line planning method of the present invention; Figure 3 This is a flowchart illustrating the second embodiment of the cleaning line planning method of the present invention; Figure 4 This is a flowchart illustrating the third embodiment of the cleaning line planning method of the present invention; Figure 5 This is a structural block diagram of the first embodiment of the cleaning line planning device of the present invention.
[0027] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0028] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0029] Reference Figure 1 , Figure 1 This is a schematic diagram of the cleaning line planning equipment structure in the hardware operating environment involved in the embodiments of the present invention.
[0030] like Figure 1As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0031] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0032] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a cleaning line planning program.
[0033] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the cleaning line planning device. The electronic device calls the cleaning line planning program stored in the memory 1005 through the processor 1001 and executes the cleaning line planning method provided in the embodiment of the present invention.
[0034] This invention provides a cleaning line planning method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of a cleaning line planning method according to the present invention.
[0035] In this embodiment, the cleaning line planning method includes the following steps: Step S10: Generate multiple sub-cleaning lines based on the area to be cleaned, and cluster the generated sub-cleaning lines according to the endpoint positions of each sub-cleaning line to obtain multiple cleaning line clusters.
[0036] The execution subject of this embodiment can be the cleaning line planning device. The cleaning line planning device can be a device that can control the intelligent cleaning device, such as a personal computer, server or other electronic device, or the intelligent cleaning device itself, or other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the virus analysis method of the present invention is described using the cleaning line planning device as an example.
[0037] It should be noted that generating multiple sub-cleaning lines based on the area to be cleaned can be based on a flooding algorithm to perform full-coverage route planning for the area to be cleaned, thereby generating multiple sub-cleaning lines. In this process, the sub-cleaning lines can be generated according to the width of the cleaning range of the intelligent cleaning device.
[0038] In practical applications, the number of sub-sweeping lines generated simultaneously can be large. Directly planning the entire sweeping route based on these sub-sweeping lines would lead to high complexity, a large computational load, and a long overall computation time due to the limited number of sub-sweeping lines. To avoid this, the generated sub-sweeping lines can be clustered based on their endpoint positions. Then, the route can be planned based on these clustered sweeping line clusters. This reduces the amount of data to be considered during planning, thereby reducing the computational load. The endpoint positions of the sub-sweeping lines can be the positions of the two ends of the sub-sweeping line itself.
[0039] In practical implementation, when clustering sub-cleaning lines, it is necessary to ensure that sub-cleaning lines that are close to each other and have a strong correlation are grouped into the same cluster. Therefore, the step of clustering the generated sub-cleaning lines based on the endpoint positions of each sub-cleaning line, as described in this embodiment, may include: Detect whether the endpoint position of each sub-sweeping line can be projected onto the adjacent sub-sweeping line in a preset direction; Among the multiple sub-cleaning lines, the sub-cleaning lines that can be projected onto adjacent sub-cleaning lines are taken as the molecular cleaning lines to be cleaned. The molecular sweep line and its neighboring sub-sweep lines are grouped into a cluster.
[0040] It should be noted that the preset direction can be set in advance by the administrator of the sweeping line planning equipment. For example, the direction perpendicular to the direction of the sub-sweeping line can be set as the preset direction. The other sub-sweeping lines that are closest to a certain sub-sweeping line are the neighboring sub-sweeping lines corresponding to that sub-sweeping line.
[0041] In a specific implementation, the endpoint position of a sub-sweeping line includes the positions of the endpoints at both ends of the sub-sweeping line. If the endpoint of any end of a sub-sweeping line can be projected onto a neighboring sub-sweeping line in a preset direction, then it can be determined that the endpoint position of the sub-sweeping line can be projected onto a neighboring sub-sweeping line in the preset direction.
[0042] It is understandable that if the endpoint of a certain sub-sweeping line can be projected onto a neighboring sub-sweeping line in a preset direction, it means that the sub-sweeping line and its corresponding neighboring sub-sweeping line have a strong correlation. In this case, the sub-sweeping line and its corresponding neighboring sub-sweeping line can be classified into the same cluster.
[0043] Step S20: Divide the area corresponding to each cleaning line cluster into multiple sub-regions and set a corresponding area label for each sub-region.
[0044] It should be noted that dividing the area corresponding to the sweeping line cluster into multiple sub-regions can be done by dividing the area corresponding to the sweeping line cluster into multiple sub-regions according to preset rules. These preset rules can be pre-set by the administrator of the sweeping line planning equipment. For example, the preset rules can be set to divide the area into multiple sub-regions based on whether the optimal solution for the sweeping route can be defined; or to divide the area corresponding to the sweeping line cluster into multiple sub-regions according to geometric patterns.
[0045] When setting corresponding area labels for each sub-area, it can be determined whether the optimal solution for the cleaning route can be defined in the sub-area. If so, the area label of the sub-area is set as an independent area. Different independent areas are connected by connecting sub-cleaning lines. If both ends of an independent area are connecting sub-cleaning lines, then the area label corresponding to the sub-area of the independent area can be set as a transfer area.
[0046] Step S30: Determine the inter-cluster movement cost between each cleaning line cluster based on the cleaning start position.
[0047] It should be noted that the cost of inter-cluster movement can be the distance that needs to be moved when moving from one sweep line cluster to another.
[0048] Step S40: Determine the target cleaning line based on the cleaning start position, the area label, and the inter-cluster movement cost.
[0049] It should be noted that after determining the inter-cluster movement cost, the order of arrival at each cleaning line cluster can be determined based on the cleaning start position and the inter-cluster movement cost. Then, the cleaning movement trajectory corresponding to each cleaning line cluster is determined by the area label. Finally, the cleaning movement trajectories corresponding to each cleaning line cluster are spliced together according to the order of arrival at each cleaning line cluster to obtain the complete cleaning route, i.e., the target cleaning line.
[0050] This embodiment generates multiple sub-cleaning lines based on the area to be cleaned, and clusters these sub-cleaning lines according to their endpoint positions to obtain multiple cleaning line clusters. The area to be cleaned is then divided into multiple sub-regions based on these cleaning line clusters, and each sub-region is assigned a corresponding region label. The inter-cluster movement cost between cleaning line clusters is determined based on the cleaning start position. Finally, the target cleaning line is determined based on the cleaning start position, region labels, and inter-cluster movement cost. Because the generated sub-cleaning lines are clustered, and the final target cleaning line is determined based on the region labels set for each cluster and the inter-cluster movement cost, the computational load during cleaning line planning is reduced, ensuring that calculations can still be performed normally even when there are many sub-cleaning lines.
[0051] refer to Figure 3 , Figure 3 This is a flowchart illustrating a second embodiment of a cleaning line planning method according to the present invention.
[0052] Based on the first embodiment described above, step S30 of the cleaning line planning method in this embodiment includes: Step S301: Obtain the starting cleaning position, and determine the cleaning inlet and cleaning outlet positions corresponding to each cleaning line cluster based on the starting cleaning position.
[0053] It should be noted that the starting cleaning position can be the current position of the intelligent cleaning device or a cleaning start point specified by the user; this embodiment does not impose any restrictions on this. The cleaning inlet position corresponding to the cleaning line cluster can be the inlet position of the intelligent cleaning device when cleaning the sub-area corresponding to the cleaning line cluster, and the cleaning outlet position corresponding to the cleaning line cluster can be the outlet position of the intelligent cleaning device when cleaning the sub-area corresponding to the cleaning line cluster is completed.
[0054] In a specific implementation, in order to accurately determine the inlet location and the cleaning outlet location, step S301 of this embodiment may include: Obtain the starting cleaning position and determine the interval distance between the endpoint position of each sub-cleaning line in each cleaning line cluster and the starting cleaning position; The cleaning inlet and outlet positions corresponding to each cleaning line cluster are determined based on the interval distance.
[0055] It should be noted that determining the interval distance between the endpoint position of the sub-sweeping line and the starting sweeping position can be done by calculating the moving distance from the endpoint of the sub-sweeping line to the starting sweeping position based on the endpoint position of the sub-sweeping line, and using this moving distance as the interval distance.
[0056] Determining the cleaning inlet and outlet positions of the cleaning line cluster based on the interval distance can be achieved by finding the maximum and minimum values among the interval distances from the endpoints of the sub-cleaning lines in the cleaning line cluster to the starting cleaning position. The position of the endpoint corresponding to the maximum value is taken as the cleaning outlet position of the cleaning line cluster, and the position of the endpoint corresponding to the minimum value is taken as the cleaning inlet position of the cleaning line cluster.
[0057] Step S302: Determine the inter-cluster movement cost between each cleaning line cluster based on the cleaning inlet position and the cleaning outlet position.
[0058] It should be noted that determining the inter-cluster movement cost between each sweeping line cluster can be done by calculating the movement distance from the sweeping exit position corresponding to one sweeping line cluster to the sweeping inlet position corresponding to another sweeping line cluster, and using this movement distance as the inter-cluster movement cost.
[0059] For example: Suppose that the distance the cleaning exit position of cleaning line cluster A moves to the cleaning inlet position corresponding to cleaning line cluster B is 1 meter, then the inter-cluster movement cost between A and B is 1.
[0060] This embodiment obtains the starting cleaning position and determines the cleaning inlet and outlet positions corresponding to each cleaning line cluster based on the starting cleaning position; it then determines the inter-cluster movement cost between cleaning line clusters based on the cleaning inlet and outlet positions. Since the cleaning inlet and outlet positions are determined based on the interval distance between the starting cleaning position and the endpoints of each sub-cleaning line contained in the cleaning line cluster, the computational complexity of calculating the inter-cluster movement cost between cleaning line clusters is greatly simplified, further reducing the computational load during cleaning line planning and improving computational efficiency.
[0061] refer to Figure 4 , Figure 4 This is a flowchart illustrating a third embodiment of a cleaning line planning method according to the present invention.
[0062] Based on the first embodiment described above, step S40 of the cleaning line planning method in this embodiment includes: Step S401: Determine the cluster cleaning sequence based on the starting cleaning position and the inter-cluster movement cost.
[0063] It should be noted that the cluster cleaning sequence can be the order in which the cleaning lines arrive at each cluster during the cleaning process.
[0064] In practical applications, determining the cluster cleaning sequence based on the starting cleaning position and the inter-cluster movement cost can be achieved by planning various different sequences of arrival at each cleaning line cluster based on the starting cleaning position, then calculating the total movement cost corresponding to each sequence based on the inter-cluster movement cost, and finally selecting the sequence with the smallest total movement cost as the cluster cleaning sequence.
[0065] Furthermore, when there are a large number of cleaning line clusters, the number of possible sequences of arrival at each cleaning line cluster can be extremely large. This may lead to a long time consumption and a large amount of computation in determining the cluster cleaning order. To overcome this defect, step S401 in this embodiment may include: The starting cleaning line cluster is selected from the plurality of cleaning line clusters according to the starting cleaning position; Obtain the cleaning outlet position corresponding to the starting cleaning line cluster; The target cleaning line cluster is selected from the plurality of cleaning line clusters based on the cleaning exit location and the inter-cluster movement cost; Detect whether there are any unselected cleaning line clusters among the plurality of cleaning line clusters; If not, the cluster cleaning sequence is determined based on the starting cleaning line cluster and the target cleaning line cluster.
[0066] It should be noted that selecting a target cleaning line cluster from multiple cleaning line clusters based on the cleaning exit location and inter-cluster movement cost can be achieved by finding the inter-cluster movement cost from the cleaning exit location to other cleaning line clusters in the inter-cluster movement cost, and taking the cleaning line cluster corresponding to the minimum value among the found inter-cluster movement costs as the target cleaning line cluster.
[0067] Understandably, since all areas of the area to be cleaned should be covered when cleaning the area, that is, the sub-area corresponding to each cleaning line cluster should be cleaned, it can be set that each cleaning line cluster is visited once. Therefore, after selecting the target cleaning line cluster, it is also possible to check whether there are any cleaning line clusters that have not been selected among the multiple cleaning line clusters. If not, it means that the sequence planning has been completed. Therefore, the cluster cleaning order can be determined based on the starting cleaning line cluster and the target cleaning line cluster.
[0068] It should be noted that if there are unselected cleaning clusters, it indicates that the sequence planning is not yet complete, and some cleaning clusters have not been planned for access. Since the intelligent cleaning device will be located at the cleaning exit position corresponding to that cleaning cluster after cleaning the sub-area corresponding to the cleaning cluster is completed, the cleaning exit position corresponding to the target cleaning cluster can be used as the new cleaning exit position. The process then returns to the step of selecting the target cleaning cluster from the multiple cleaning clusters based on the cleaning exit position and the inter-cluster movement cost, continuing the selection of target cleaning clusters. During the return process, the order in which the selected target cleaning clusters were chosen can be recorded.
[0069] It is understandable that the above method for planning the cluster cleaning sequence is based on the idea of dynamic programming to further optimize and decompose the Traveling Salesman Problem (TSP). It defines that each cluster is visited only once, divides different maximum sub-intervals based on the visited clusters, and then continues to solve the TSP for the sub-intervals. This decomposes the TSP problem into several sub-problems, solves the problem of the curse of dimensionality in the solution, and finally obtains the optimal cleaning sequence for the cleaning line clusters.
[0070] In practical implementation, to ensure that the planned cluster cleaning sequence is optimal, the step of selecting the starting cleaning cluster from the multiple cleaning clusters based on the cleaning start position, as described in this embodiment, may include: Obtain the cleaning inlet location corresponding to each cleaning line cluster; Determine the distance the cleaning starts from the cleaning position and moves to the corresponding cleaning inlet position of each cleaning line cluster; The moving distances are sorted from smallest to largest, and the cleaning line cluster corresponding to the first moving distance in the sorting result is taken as the starting cleaning line cluster.
[0071] It should be noted that the distance the cleaning device moves from the starting cleaning position to the cleaning inlet position corresponding to the cleaning line cluster can be the distance the intelligent cleaning device needs to travel from the starting cleaning position to the cleaning inlet position corresponding to the cleaning line cluster.
[0072] It is understandable that sorting the cleaning lines based on the travel distance from smallest to largest, and then using the cleaning line cluster corresponding to the highest travel distance in the sorting results as the starting cleaning line cluster, can ensure that the selected starting cleaning line cluster is the cleaning line cluster closest to the starting position. This allows the cluster cleaning sequence to be planned by starting with the closest cleaning line cluster first, and then further selecting target cleaning line clusters based on the travel cost between each cluster, thus ensuring that the planned cluster cleaning sequence is as optimal as possible.
[0073] In specific implementation, to facilitate the differentiation of each cleaning line cluster, a unique identifier can be assigned to each cleaning line cluster as its cluster identifier information. Therefore, the step of determining the cluster cleaning order based on the starting cleaning line cluster and the target cleaning line cluster, as described in this embodiment, includes: Obtain the cluster identifier information corresponding to the starting sweep line cluster and the target sweep line cluster; The cluster identification information is spliced together according to the order in which the cleaning line clusters are selected to obtain the cluster cleaning order.
[0074] It should be noted that after each sweeping line cluster is assigned a unique identifier as cluster identification information in advance, the cluster identification information corresponding to the starting sweeping line cluster and the target sweeping line cluster can be spliced together according to the order in which the starting sweeping line cluster and the target sweeping line cluster are selected, and the spliced cluster identification information is used as the cluster sweeping order.
[0075] Understandably, using cluster identification information as the cluster cleaning sequence can significantly reduce the data complexity of the cluster cleaning sequence, thereby further reducing the data computation complexity and improving the overall cleaning line planning speed.
[0076] Step S402: Determine the target cleaning line based on the area label, the cluster cleaning sequence, and the multiple cleaning line clusters.
[0077] It should be noted that determining the target cleaning line based on the area label, the cluster cleaning sequence, and multiple cleaning line clusters can be achieved by planning the cleaning movement trajectory corresponding to each sub-area within the cleaning line cluster based on the corresponding area label, thereby obtaining the cleaning movement trajectory corresponding to each cleaning line cluster, and then splicing the cleaning movement trajectories corresponding to each cleaning cluster according to the cluster cleaning sequence to obtain the complete cleaning route, i.e., the target cleaning line.
[0078] In specific implementation, when cleaning the sub-regions corresponding to each cleaning line cluster, the determined cleaning trajectory will vary depending on the region label. Therefore, step S402 in this embodiment may include: Based on the area labels, the cleaning sequence of the sub-cleaning lines corresponding to each cleaning line cluster is determined, and the sub-line cleaning sequence is obtained. The target cleaning line is determined based on the sub-line cleaning sequence, the cluster cleaning sequence, and the multiple cleaning line clusters.
[0079] It should be noted that the sub-line cleaning sequence can be the order in which the areas corresponding to each sub-line in the cleaning line cluster are cleaned. The sub-line does not necessarily have to be cleaned in one go. In actual planning, the area corresponding to a certain sub-line can be cleaned first, then the areas corresponding to other sub-lines can be cleaned, and finally the remaining area of the sub-line can be cleaned.
[0080] In practical use, determining the target cleaning line based on the sub-line cleaning sequence, cluster cleaning sequence, and multiple cleaning line clusters can be achieved by determining the cleaning movement trajectory corresponding to each cleaning line cluster based on the sub-line cleaning sequence and the sub-cleaning lines contained in each cleaning line cluster, and then connecting the cleaning movement trajectories corresponding to each cleaning line cluster according to the cluster cleaning sequence to obtain the target cleaning line.
[0081] Specifically, determining the cleaning movement trajectory corresponding to the cleaning line cluster based on the sub-line cleaning sequence can involve obtaining the area position corresponding to each sub-cleaning line in the cleaning line cluster, sorting the cleaning order of each sub-cleaning line according to the sub-line cleaning sequence, and generating the cleaning movement trajectory corresponding to the cleaning line cluster based on the sorting and area position.
[0082] This embodiment determines the cluster cleaning sequence based on the starting cleaning position and the inter-cluster movement cost; it then determines the target cleaning line based on the area label, the cluster cleaning sequence, and the multiple cleaning line clusters. Since the cluster cleaning sequence is determined first based on the starting cleaning position and the inter-cluster movement cost, the total cost of inter-cluster movement according to the cluster cleaning sequence is minimized. Next, the cleaning movement trajectory for cleaning in the sub-regions corresponding to the cleaning line clusters is planned based on the area label. Finally, by splicing the cleaning movement trajectories corresponding to each cleaning line cluster according to the cluster cleaning sequence, a complete, global cleaning line, i.e., the target cleaning line, is obtained. This ensures that when cleaning the area to be cleaned according to the planned target cleaning line, there will be no issues such as repetitive and chaotic trajectories, thereby improving cleaning efficiency and making the cleaning trajectory more regular and aesthetically pleasing.
[0083] Furthermore, this embodiment of the invention also proposes a storage medium storing a cleaning line planning program, which, when executed by a processor, implements the steps of the cleaning line planning method described above.
[0084] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the cleaning line planning device of the present invention.
[0085] like Figure 5 As shown, the sweeping line planning device proposed in this embodiment of the invention includes: The line clustering module 10 is used to generate multiple sub-cleaning lines according to the area to be cleaned, and to cluster the generated sub-cleaning lines according to the endpoint positions of each sub-cleaning line to obtain multiple cleaning line clusters. The label setting module 20 is used to divide the area corresponding to each cleaning line cluster into multiple sub-regions and set a corresponding area label for each sub-region. Cost calculation module 30 is used to determine the inter-cluster movement cost between each cleaning line cluster based on the cleaning start position; The route planning module 40 is used to determine the target cleaning line based on the cleaning start position, the area label, and the inter-cluster movement cost.
[0086] This embodiment generates multiple sub-cleaning lines based on the area to be cleaned, and clusters these sub-cleaning lines according to their endpoint positions to obtain multiple cleaning line clusters. The area to be cleaned is then divided into multiple sub-regions based on these cleaning line clusters, and each sub-region is assigned a corresponding region label. The inter-cluster movement cost between cleaning line clusters is determined based on the cleaning start position. Finally, the target cleaning line is determined based on the cleaning start position, region labels, and inter-cluster movement cost. Because the generated sub-cleaning lines are clustered, and the final target cleaning line is determined based on the region labels set for each cluster and the inter-cluster movement cost, the computational load during cleaning line planning is reduced, ensuring that calculations can still be performed normally even when there are many sub-cleaning lines.
[0087] Furthermore, the line clustering module 10 is also used to detect whether the endpoint position of each sub-cleaning line can be projected onto the adjacent sub-cleaning line in a preset direction; to take the sub-cleaning lines that can be projected onto the adjacent sub-cleaning lines as the molecular cleaning lines to be cleaned; and to divide the molecular cleaning lines to be cleaned and the adjacent sub-cleaning lines corresponding to the molecular cleaning lines into a cluster.
[0088] Furthermore, the cost calculation module 30 is also used to obtain the starting cleaning position, and determine the cleaning inlet position and cleaning outlet position corresponding to each cleaning line cluster according to the starting cleaning position; and determine the inter-cluster movement cost between each cleaning line cluster according to the cleaning inlet position and the cleaning outlet position.
[0089] Furthermore, the cost calculation module 30 is also used to obtain the starting cleaning position, determine the interval distance between the endpoint position of each sub-cleaning line in each cleaning line cluster and the starting cleaning position; and determine the cleaning inlet position and cleaning outlet position of each cleaning line cluster according to the interval distance.
[0090] Furthermore, the route planning module 40 is also used to determine the cluster cleaning sequence based on the starting cleaning position and the inter-cluster movement cost; and to determine the target cleaning line based on the area label, the cluster cleaning sequence, and the multiple cleaning line clusters.
[0091] Furthermore, the route planning module 40 is also used to select a starting cleaning line cluster from the plurality of cleaning line clusters according to the starting cleaning position; obtain the cleaning exit position corresponding to the starting cleaning line cluster; select a target cleaning line cluster from the plurality of cleaning line clusters according to the cleaning exit position and the inter-cluster movement cost; detect whether there is a cleaning line cluster that has not been selected among the plurality of cleaning line clusters; if not, determine the cluster cleaning order according to the starting cleaning line cluster and the target cleaning line cluster.
[0092] Furthermore, the route planning module 40 is also used to obtain cluster identification information corresponding to the starting cleaning line cluster and the target cleaning line cluster; and to splice the cluster identification information according to the order in which the cleaning line clusters are selected to obtain the cluster cleaning order.
[0093] Furthermore, the route planning module 40 is also used to, if it exists, obtain the cleaning exit position corresponding to the target cleaning line cluster as the new cleaning exit position, and return to the step of selecting the target cleaning line cluster from the multiple cleaning line clusters based on the cleaning exit position and the inter-cluster movement cost.
[0094] Furthermore, the route planning module 40 is also used to obtain the cleaning inlet position corresponding to each cleaning line cluster; determine the moving distance from the cleaning start position to the cleaning inlet position corresponding to each cleaning line cluster; sort the moving distances from smallest to largest, and take the cleaning line cluster corresponding to the first moving distance in the sorting result as the starting cleaning line cluster.
[0095] Furthermore, the route planning module 40 is also used to determine the cleaning sequence of the sub-cleaning lines corresponding to each cleaning line cluster based on the area label, and obtain the sub-line cleaning sequence; and to determine the target cleaning line based on the sub-line cleaning sequence, the cluster cleaning sequence, and the multiple cleaning line clusters.
[0096] Furthermore, the route planning module 40 is also used to determine the cleaning movement trajectory corresponding to each cleaning line cluster according to the sub-line cleaning sequence; and to connect the cleaning movement trajectories corresponding to each cleaning line cluster according to the cluster cleaning sequence to obtain the target cleaning line.
[0097] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0098] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0099] In addition, for technical details not described in detail in this embodiment, please refer to the cleaning line planning method provided in any embodiment of the present invention, which will not be repeated here.
[0100] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0101] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0103] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method of planning a cleaning wire, characterized by, The sweeping line planning method includes the following steps: Multiple sub-cleaning lines are generated based on the area to be cleaned, and the generated sub-cleaning lines are clustered according to the endpoint positions of each sub-cleaning line to obtain multiple cleaning line clusters; The area corresponding to each of the cleaning line clusters is divided into multiple sub-regions, and a corresponding area label is set for each sub-region; Determine the inter-cluster movement cost between each cleaning line cluster based on the starting position of the cleaning process; The target cleaning line is determined based on the cleaning start position, the area label, and the inter-cluster movement cost. The step of clustering the generated sub-cleaning lines based on the endpoint positions of each sub-cleaning line includes: Detect whether the endpoint position of each sub-sweeping line can be projected onto the adjacent sub-sweeping line in a preset direction; Among the multiple sub-cleaning lines, the sub-cleaning lines that can be projected onto adjacent sub-cleaning lines are taken as the molecular cleaning lines to be cleaned. The molecular sweep line and its neighboring sub-sweep lines are grouped into a cluster.
2. The cleaning wire planning method of claim 1, wherein, The step of determining the inter-cluster movement cost between each cleaning line cluster based on the cleaning start position includes: Obtain the cleaning start position, and determine the cleaning inlet and cleaning outlet positions corresponding to each cleaning line cluster based on the cleaning start position; The inter-cluster movement cost between each cleaning line cluster is determined based on the cleaning inlet location and the cleaning outlet location.
3. The cleaning wire planning method of claim 2, wherein, The step of obtaining the cleaning start position and determining the cleaning inlet and outlet positions corresponding to each cleaning line cluster based on the cleaning start position includes: Obtain the cleaning start position and determine the interval distance between the endpoint position of each sub-cleaning line in each cleaning line cluster and the cleaning start position; The cleaning inlet and outlet positions corresponding to each cleaning line cluster are determined based on the interval distance.
4. The cleaning wire planning method of claim 1, wherein, The step of determining the target cleaning line based on the cleaning start position, the area label, and the inter-cluster movement cost includes: The cluster cleaning sequence is determined based on the cleaning start position and the inter-cluster movement cost. The target cleaning line is determined based on the area label, the cluster cleaning sequence, and the multiple cleaning line clusters.
5. The cleaning wire planning method of claim 4, wherein, The step of determining the cluster cleaning order based on the cleaning start position and the inter-cluster movement cost includes: A starting cleaning line cluster is selected from the plurality of cleaning line clusters based on the starting position of the cleaning process; Obtain the cleaning outlet position corresponding to the starting cleaning line cluster; The target cleaning line cluster is selected from the plurality of cleaning line clusters based on the cleaning exit location and the inter-cluster movement cost; Detect whether there are any unselected cleaning line clusters among the plurality of cleaning line clusters; If not, the cluster cleaning sequence is determined based on the starting cleaning line cluster and the target cleaning line cluster.
6. The cleaning wire planning method of claim 5, wherein, The step of determining the cluster cleaning sequence based on the starting cleaning cluster and the target cleaning cluster includes: Obtain the cluster identifier information corresponding to the starting sweep line cluster and the target sweep line cluster; The cluster identification information is spliced together according to the order in which the cleaning line clusters are selected to obtain the cluster cleaning order.
7. The cleaning wire planning method of claim 5, wherein, After the step of detecting whether there are any unselected cleaning line clusters among the plurality of cleaning line clusters, the method further includes: If it exists, the cleaning exit position corresponding to the target cleaning line cluster is obtained as the new cleaning exit position, and the step of selecting the target cleaning line cluster from the multiple cleaning line clusters based on the cleaning exit position and the inter-cluster movement cost is returned.
8. The cleaning wire planning method of claim 5, wherein, The step of selecting the starting cleaning line cluster from the plurality of cleaning line clusters based on the cleaning start position includes: Obtain the cleaning inlet location corresponding to each cleaning line cluster; Determine the distance the cleaning starts from the cleaning position and moves to the corresponding cleaning inlet position of each cleaning line cluster; The moving distances are sorted from smallest to largest, and the cleaning line cluster corresponding to the first moving distance in the sorting result is taken as the starting cleaning line cluster.
9. The cleaning wire planning method of claim 4, wherein, The step of determining the target cleaning line based on the area label, the cluster cleaning sequence, and the multiple cleaning line clusters includes: Based on the area labels, the cleaning sequence of the sub-cleaning lines corresponding to each cleaning line cluster is determined, and the sub-line cleaning sequence is obtained. The target cleaning line is determined based on the sub-line cleaning sequence, the cluster cleaning sequence, and the multiple cleaning line clusters.
10. The cleaning wire planning method of claim 9, wherein, The step of determining the target cleaning line based on the sub-line cleaning sequence, the cluster cleaning sequence, and the plurality of cleaning line clusters includes: The cleaning trajectory corresponding to each cleaning line cluster is determined according to the sub-line cleaning sequence; The cleaning movement trajectories corresponding to each cleaning line cluster are connected according to the cluster cleaning sequence to obtain the target cleaning line.
11. A cleaning wire planning device, characterized by The sweeping line planning device includes the following modules: The line clustering module is used to generate multiple sub-cleaning lines based on the area to be cleaned, and to cluster the generated sub-cleaning lines according to the endpoint positions of each sub-cleaning line to obtain multiple cleaning line clusters; The label setting module is used to divide the area corresponding to each cleaning line cluster into multiple sub-regions and set a corresponding area label for each sub-region. The cost calculation module is used to determine the inter-cluster movement cost between each cleaning line cluster based on the cleaning start position; The route planning module is used to determine the target cleaning line based on the cleaning start position, the area label, and the inter-cluster movement cost; The line clustering module is further used to detect whether the endpoint position of each sub-cleaning line can be projected onto a neighboring sub-cleaning line in a preset direction; to designate the sub-cleaning lines that can be projected onto neighboring sub-cleaning lines as the molecular cleaning lines to be cleaned; and to group the molecular cleaning lines to be cleaned and the neighboring sub-cleaning lines corresponding to the molecular cleaning lines into a cluster.
12. The cleaning wire planning apparatus of claim 11, wherein, The cost calculation module is also used to obtain the cleaning start position, and determine the cleaning inlet position and cleaning outlet position corresponding to each cleaning line cluster based on the cleaning start position; and determine the inter-cluster movement cost between each cleaning line cluster based on the cleaning inlet position and the cleaning outlet position.
13. The cleaning wire planning apparatus of claim 12, wherein, The cost calculation module is also used to obtain the cleaning start position, determine the interval distance between the endpoint position of each sub-cleaning line in each cleaning line cluster and the cleaning start position; and determine the cleaning inlet position and cleaning outlet position of each cleaning line cluster according to the interval distance.
14. The cleaning wire planning apparatus of claim 11, wherein, The line planning module is further configured to determine a cluster cleaning sequence according to the cleaning starting position and the inter-cluster movement cost; and determine a target cleaning line according to the area label, the cluster cleaning sequence, and the plurality of cleaning line clusters.
15. The cleaning wire planning apparatus of claim 14, wherein, The line planning module is further configured to select a starting cleaning line cluster from the plurality of cleaning line clusters according to a cleaning starting position; obtain a cleaning exit position corresponding to the starting cleaning line cluster; select a target cleaning line cluster from the plurality of cleaning line clusters according to the cleaning exit position and the inter-cluster movement cost; detect whether there is an unselected cleaning line cluster in the plurality of cleaning line clusters; and if not, determine a cluster cleaning sequence according to the starting cleaning line cluster and the target cleaning line cluster.
16. The cleaning wire planning apparatus of claim 15, wherein, The line planning module is further configured to obtain cluster identification information corresponding to the starting cleaning line cluster and the target cleaning line cluster; and splice the cluster identification information in the order of selection of the cleaning line cluster to obtain a cluster cleaning sequence.
17. A cleaning wire planning device, characterized by The cleaning line planning device comprises a processor, a memory, and a cleaning line planning program stored on the memory and executable on the processor, and the cleaning line planning program, when executed by the processor, implements the steps of the cleaning line planning method according to any one of claims 1-10.
18. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a cleaning line planning program, and the cleaning line planning program, when executed, implements the steps of the cleaning line planning method according to any one of claims 1-10.
Citation Information
Patent Citations
Automatic sweeping path planning method and device
CN108121331A
Path-finding cost acquisition method for searching initial cleaning position and chip
CN112650252A