Method and device for planning multi-region task, electronic equipment and storage medium
By setting channel labels with numbered information at the channel entrances, the robot constructs regional connection relationships and generates a weighted graph, which solves the problem of not being able to plan multi-region tasks in the absence of global positioning and maps, and realizes efficient multi-region task planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FIBOCOM WIRELESS
- Filing Date
- 2025-04-08
- Publication Date
- 2026-07-31
AI Technical Summary
Without global localization and a global map, robots cannot effectively plan and execute multi-area tasks.
By setting channel labels containing numbered information at the channel entrances, the robot scans the channel labels along the edge to build regional connection relationships, records the channel time, and generates a weighted graph to plan multi-region tasks.
Eliminating the complex process of multi-sensor fusion localization and map building, the robot can efficiently plan multi-area tasks without global localization and a global map.
Smart Images

Figure CN120427019B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics, and more particularly to a planning method, apparatus, electronic device, and storage medium for multi-area tasks. Background Technology
[0002] In many practical applications, robots need to be able to autonomously plan and execute tasks across multiple areas. For example, in garden maintenance, lawnmowers need to work efficiently and systematically across multiple lawn areas; in home cleaning, robot vacuums need to clean across multiple rooms. To achieve effective planning and execution of these tasks, it is typically necessary to rely on multi-sensor fusion localization technology to build a detailed area map, and then execute the tasks in each area according to this map.
[0003] This approach relies heavily on a global positioning system (such as GPS) and detailed area maps. If a monocular vision robot is used, it lacks effective localization methods (e.g., weak or unavailable GPS signals in indoor environments) and cannot accurately create area maps, making task planning and execution extremely difficult. This results in the robot being unable to effectively plan and execute multi-area tasks without global positioning and a global map. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for planning multi-regional tasks to address the problem of being unable to plan and execute multi-regional tasks in the absence of global positioning and a global map.
[0005] Firstly, this application provides a planning method for multi-regional tasks, the method comprising:
[0006] The robot is controlled to scan along the edge of the current area for all channel labels, wherein the channel labels are located at the channel ports between every two adjacent areas;
[0007] The connection relationship between the current region and adjacent regions is constructed by reading the number information in the channel label, and the number of the current region is determined, wherein the number information consists of the current region number and the adjacent region number to which it is connected;
[0008] After determining the target channel based on the connection relationship, the robot is controlled to travel through the target channel to an unscanned adjacent area, and the time taken to travel through the target channel is recorded.
[0009] After traversing all regions, a weighted graph is generated based on the connection relationships between regions and the time taken to traverse the channels. Multi-region tasks are then planned based on the weighted graph, where each vertex of the weighted graph represents a region, the vertex number is the corresponding region number, and the weight of each edge represents the time taken to traverse the channels.
[0010] Optionally, after determining the target channel based on the connection relationship, controlling the robot to travel through the target channel to an unscanned adjacent area includes:
[0011] After determining the target channel based on the connection relationship and depth-first strategy, the robot is controlled to travel through the target channel to an unscanned adjacent area according to the depth-first strategy.
[0012] Optionally, after determining the target channel based on the connectivity and depth-first strategy, controlling the robot to travel through the target channel to an unscanned adjacent area according to the depth-first strategy includes:
[0013] If it is determined based on the connection relationship that there is at least one untraversed channel in the current area, the robot is controlled to randomly or nearby select a target channel from the at least one untraversed channel and travel through the target channel to an unscanned adjacent area;
[0014] The unscanned adjacent regions are used as the current region to build region connection relationships. The above operation is repeated to continuously explore the unscanned adjacent regions. The robot's travel path is stored in the database.
[0015] If the current region has only one traversed channel, then the previous region is returned according to the stored travel path.
[0016] If there are untraversed channels in the previous region, then the step of selecting and traversing through the target channel in the untraversed channels to the unscanned adjacent region is executed;
[0017] If the previous region does not have any untraversed channels, then backtracking is performed based on the stored travel path until a region with untraversed channels is found.
[0018] Optionally, determining that there is at least one untraversed channel in the current region based on the connectivity relationship includes:
[0019] Based on the connection relationships, determine all channels connected to the current region;
[0020] The traversed channels are determined based on the travel paths in the database;
[0021] By comparing all channels connected to the current region with the traversed channels, at least one untraversed channel exists in the current region.
[0022] Optionally, by comparing all channels connected to the current region with the traversed channels, determining that at least one untraversed channel exists in the current region includes:
[0023] By identifying the numbering information of all channel labels in the current area, the channel identifiers of all channels connected to the current area are determined, wherein the numbering information is used to indicate the channel identifiers of channels between two areas;
[0024] By analyzing the travel path, the set of channel identifiers of the traversed channels is determined;
[0025] Compare all channel identifiers corresponding to the current region with the set of channel identifiers of the traversed channels;
[0026] If there is a specified channel identifier in the current area that does not appear in the channel identifier set, then the channel corresponding to the specified channel identifier is regarded as an untraversed channel.
[0027] Optionally, recording the time spent traversing the target channel includes:
[0028] When the robot switches areas, the first moment when the channel label at the first port of the target channel is scanned is recorded;
[0029] When the robot travels through the target channel to the next unscanned adjacent area, the second moment when the channel label at the second port of the target channel is scanned is recorded;
[0030] The time difference between the second moment and the first moment is taken as the time it takes for the robot to pass through the target channel.
[0031] Optionally, planning multi-region tasks based on the weighted graph includes:
[0032] The numbering of multiple vertices in the weighted graph is arranged and combined to generate multiple region access sequences, wherein the region access sequence is used to indicate the set of numbered sequences of regions accessed in sequence;
[0033] The weights of the corresponding edges in the weighted graph are accumulated according to the region access order in the region access sequence to obtain the total weight of the edges in the region access sequence.
[0034] The total weights of multiple region access sequences are compared to determine the access order corresponding to the extreme total weight, and multi-region tasks are planned according to the access order, wherein the extreme total weight is the maximum total weight or the minimum total weight.
[0035] Secondly, this application provides a planning apparatus for multi-regional tasks, the apparatus comprising:
[0036] The scanning module is used to control the robot to scan all the channel labels in the current area along the edge, wherein the channel labels are set at the channel ports between every two adjacent areas;
[0037] The construction and determination module is used to construct the connection relationship between the current region and adjacent regions by reading the number information in the channel label, and to determine the number of the current region, wherein the number information consists of the current region number and the adjacent region number to which it is connected;
[0038] The travel and recording module is used to determine the target channel based on the connection relationship, control the robot to travel through the target channel to an unscanned adjacent area, and record the time taken to travel through the target channel;
[0039] The generation and planning module is used to generate a weighted graph based on the connection relationship between regions and the time taken to traverse the channels after all regions have been traversed, and to plan multi-region tasks according to the weighted graph. Each vertex of the weighted graph represents a region, the vertex number is the corresponding region number, and the weight of each edge represents the time taken to traverse the channels.
[0040] Thirdly, this application provides an electronic device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus.
[0041] Fourthly, this application also provides a computer storage medium storing computer-executable instructions for executing the multi-region task planning method described in any of the preceding claims of this application.
[0042] Compared with the prior art, the technical solution provided in this application has the following advantages: By setting channel labels containing numbered information at the channel entrance, the robot can determine the connection relationship between adjacent areas and the number of the current area by scanning the channel labels along the edge. Then, the target channel is selected according to the connection relationship, and all areas are traversed without omission along the target channel to construct a complete area connection relationship map. The robot also records the time spent traversing the channel. Finally, a weighted map is generated based on the area connection relationship and the channel time, and multi-area tasks are planned through the weighted map. This application eliminates the complex multi-sensor fusion localization and map building process, and can directly plan multi-area tasks based on the weighted map, ensuring that the robot can plan multi-area tasks even without global localization and a global map. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0046] Figure 1 A schematic diagram illustrating the construction of a region map during multi-region lawn mowing, based on existing technology;
[0047] Figure 2 A flowchart illustrating a method for planning multi-regional tasks provided in this application embodiment;
[0048] Figure 3 A schematic diagram illustrating the regional connection relationship for establishing region 5 as provided in an embodiment of this application;
[0049] Figure 4 A schematic diagram illustrating the regional connection relationship for establishing region 2 as provided in an embodiment of this application;
[0050] Figure 5 A schematic diagram illustrating the return of region 4 to region 2 in an embodiment of this application;
[0051] Figure 6 A schematic diagram illustrating the regional connection relationship for establishing region 3 as provided in an embodiment of this application;
[0052] Figure 7 A schematic diagram illustrating the return of region 3 to region 5 in an embodiment of this application;
[0053] Figure 8 A schematic diagram of a weighted graph provided in an embodiment of this application;
[0054] Figure 9 A schematic diagram illustrating the placement of the channel label according to an embodiment of this application;
[0055] Figure 10 A schematic diagram of the structure of a multi-region task planning device provided in an embodiment of this application;
[0056] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0059] To address the problem mentioned in the background art of being unable to plan and execute multi-region tasks when lacking global localization and a global map, the robot scans channel labels along the edges to build regional connectivity. While exploring all unscanned regions, it records the time spent traversing channels and finally generates a weighted map to plan multi-region tasks.
[0060] The embodiments of this application are mainly applied to task planning in multiple areas, and the application scenarios include, but are not limited to: lawn management, house cleaning, shelf object handling, farmland management, etc.
[0061] The multi-region task planning method in this application embodiment can be executed by a robot, specifically a monocular vision robot lacking multiple sensors. The following will describe in detail the multi-region task planning method provided in this application embodiment, taking its application to a robot as an example, such as… Figure 2 As shown, the specific steps are as follows:
[0062] Step 201: Control the robot to scan all channel labels in the current area along the edge, wherein the channel labels are set at the channel ports between every two adjacent areas;
[0063] Step 202: Construct the connection relationship between the current area and adjacent areas by reading the number information in the channel label, and determine the number of the current area. The number information consists of the current area number and the adjacent area number to which it is connected.
[0064] Step 203: After determining the target channel based on the connection relationship, control the robot to travel through the target channel to the unscanned adjacent area, and record the time taken to travel through the target channel;
[0065] Step 204: After traversing all regions, generate a weighted graph based on the connection relationships between regions and the time taken to traverse the channels, and plan multi-region tasks according to the weighted graph. Each vertex in the weighted graph represents a region, the vertex number is the corresponding region number, and the weight of each edge represents the time taken to traverse the channels.
[0066] The following explains some of the terms mentioned in the embodiments of this application, including the following content.
[0067] Channel labels: These are placed at the channel ports between every two adjacent zones and contain numbering information (e.g., "1-3" indicates a route from zone 1 to zone 3).
[0068] Numbering information: It consists of two sets of numbers. The first set of numbers is the current area number, and the second set of numbers is the adjacent area number to which it is connected.
[0069] In step 201, after entering a new area, the robot moves along the edge of that area and uses its equipped camera to scan all the channel tags located at the channel ports within the area. Each channel tag is placed at both the entrance and exit of a channel for easy robot identification and scanning. These channel tags are used to identify the connection relationships between adjacent areas, allowing the robot to comprehensively obtain all exit information for the current area.
[0070] In step 202, during the scanning process, the robot's vision system identifies the channel labels and obtains the numbering information from them. Each channel label's numbering information consists of two sets of numbers: the first set is the current region number, and the second set is the number of the adjacent region it leads to (e.g., "1-3" indicates a path from region 1 to region 3). Based on the scanned numbering information, the robot can determine the current region's number and also construct the connection relationship between the current region and other adjacent regions. For example, if "1-3" is scanned, it means the current region's number is 1, and it records that there is a channel between region 1 and region 3.
[0071] The channel labels can contain either QR codes or numbers representing identification information. By scanning the channel labels to obtain the identification information, the robot can determine which areas are connected to the current area, thus understanding the topological structure between the current area and its neighboring areas, and establishing an initial map of regional connections.
[0072] In step 203, once all adjacent regions of the current area have been identified and recorded, i.e., the connectivity of the current area is determined, the robot determines the channels between the current area and each adjacent region based on the connectivity. It then selects a target channel from the untraversed channels and controls itself to travel along that target channel to an unscanned adjacent region. When entering a new adjacent region, the robot records the time required to traverse that target channel (i.e., the time spent). This time recording not only helps generate a weighted graph but also provides a reference for the actual channel travel time, further optimizing subsequent task planning.
[0073] The robot can select channels and traverse regions using strategies, which can be depth-first, breadth-first, or random. These three strategies will be described in detail below and will not be repeated here.
[0074] In step 204, as the robot continuously explores and traverses various areas, after traversing all areas, it generates a comprehensive and intuitive weighted graph based on the previously recorded area connections and the time spent traversing each passage. In the weighted graph, each vertex represents an area, and the vertex number corresponds one-to-one with the actual area number, facilitating area identification and management. The edges connecting the vertices in the weighted graph represent passages between adjacent areas. The weight of the edge reflects the time the robot spends traversing that passage; a larger weight means a longer time to traverse the passage, and vice versa.
[0075] After generating the weighted graph, the robot uses built-in algorithm modules (such as greedy algorithms, dynamic programming algorithms, or brute-force search algorithms) to analyze and calculate the weighted graph and plan multi-region tasks. During the planning process, the algorithm comprehensively considers the connectivity relationships and channel weights between regions to determine the optimal multi-region planning order and generate a detailed task execution plan, including the order of mowing in each region and the movement paths between regions.
[0076] In this application, by setting channel labels containing numbered information at the channel entrances, the robot can determine the connection relationships between adjacent areas and the current area's number by scanning the channel labels along the edges. Then, based on the connection relationships, a target channel is selected, and all areas are traversed along the target channel without omission, constructing a complete area connection relationship map. The robot also records the time spent traversing the channels. Finally, a weighted map is generated based on the area connection relationships and channel time, and multi-area tasks are planned using the weighted map. This application eliminates the complex multi-sensor fusion localization and map building process, and can directly plan multi-area tasks based on the weighted map, ensuring that the robot can plan multi-area tasks even without global localization and a global map.
[0077] In this embodiment of the application, the strategies adopted by the robot when selecting channels and traversing areas include, but are not limited to, the following three.
[0078] 1. Depth-First Strategy. During area exploration, the depth-first strategy ensures that the robot explores each area as deeply as possible in one direction until it cannot go any further, then backtracks to the previous area and continues exploring other areas, avoiding missing any regions. The depth-first strategy ensures rapid exploration of a given area, reducing redundant exploration. When area connections are complex, it can efficiently build connections between areas, avoiding repeatedly wandering in already explored areas and saving exploration time and resources.
[0079] 2. Breadth-First Strategy. The breadth-first strategy involves exploring unscanned neighboring regions in ascending order of distance, centered on the current region. Specifically, it prioritizes unscanned regions directly connected to the current region, then visits their adjacent unscanned regions, expanding outwards layer by layer. While this strategy can evenly explore all regions, it becomes less efficient when dealing with complex or large areas due to the need to process numerous short-distance channels.
[0080] 3. Random Strategy. When faced with multiple untraversed channels, the robot randomly selects one channel to proceed to an unscanned adjacent area, without relying on a specific order or rule. Each channel selection is determined by a random mechanism. This exploration process can also complete the task, but it lacks systematicity and may lead to repeated exploration of the same area, resulting in low task completion efficiency.
[0081] Therefore, based on the above strategy analysis, this application embodiment preferentially adopts a depth-first strategy, that is, determining the target channel based on the connection relationship and the depth-first strategy, and controlling the robot to travel through the target channel to the unscanned adjacent area according to the depth-first strategy. The process of selecting the target channel and traversing the area using the depth-first strategy includes the following:
[0082] Step S11: If it is determined that there is at least one untraversed channel in the current area based on the connection relationship, control the robot to randomly or nearby select the target channel in at least one untraversed channel, and travel to the unscanned adjacent area through the target channel;
[0083] Step S12: Use the unscanned neighboring regions as the current region to build region connection relationships. Repeat the above operation to continuously explore the unscanned neighboring regions. The robot's travel path is stored in the database.
[0084] Step S13: If there is only one traversed channel in the current area, then return to the previous area according to the stored travel path;
[0085] Step S14: If there are untraversed channels in the previous region, then execute the step of selecting and traversing through the target channel in the untraversed channels to the unscanned adjacent region;
[0086] Step S15: If there are no untraversed channels in the previous region, backtrack the region according to the stored travel path until a region with untraversed channels is found.
[0087] In the process of a robot exploring multiple regions, the depth-first strategy is the core method to guide it to efficiently traverse each region. The specific steps are as follows.
[0088] When the robot is in a certain area, it first detects the passage situation in that area based on the region's connectivity. If it finds that there are untraversed passages in the current area, it means that there are new areas waiting to be explored. The robot will then select a target passage from the untraversed passages and control itself to move along this target passage to the unscanned adjacent area.
[0089] If there is only one untraversed channel, then that untraversed channel will be directly used as the target channel; if there is more than one untraversed channel, then the robot will randomly or nearby select one of the untraversed channels as the target channel. The specific method of randomly or nearby selecting a channel is as follows.
[0090] When employing a random selection strategy, the robot activates a random number generator. This generator produces a random index value based on the number of channels in the unexplored channel list. This random index value acts like a random pointer, pointing to a specific channel in the unexplored channel list. Using this random index, the robot selects a channel from the list as the target channel. When the robot does not have a specific exploration preference for different unexplored areas, it avoids a fixed selection pattern, resulting in a more even coverage of the exploration process and reducing exploration delays in certain areas that might be caused by a fixed selection order.
[0091] If the target path is selected based on proximity, the robot first uses its distance sensors to measure the distance between the entrance of each untraversed path and its current position. This distance data is collected and sorted, and the robot prioritizes the untraversed path closest to its current position as the target path. This selection method is very practical in real-world applications, especially when energy is limited or time is tight. For example, for a lawnmower robot, choosing a closer path reduces the energy and time consumed in moving between paths, improving overall work efficiency and enabling it to cover more areas for mowing in a shorter time.
[0092] Once the robot enters a new adjacent area, a series of information recording operations are triggered. The robot stores the information of its current area, the specific information of the passage it has just traversed, and the information of the newly scanned area as its travel path in the database. The travel path records the robot's exploration process completely in the order in which the information is entered. Afterward, the robot sets the newly entered, unscanned area as the current area, builds new regional connections on this basis, and then checks whether there are any untraversed passages in the new current area. If so, steps S21 and S22 are repeated to continue to explore more unscanned adjacent areas, exploring as deeply as possible along a path and continuously exploring unknown areas.
[0093] When the robot discovers that there is only one already traversed path in the current area, it indicates that it cannot continue exploring new areas on the current path and needs to backtrack. At this point, the robot will accurately determine the location of the previous area based on the information recorded in its travel path, and then control itself to return to the previous area along the original route.
[0094] After returning to the previous area, the robot immediately checks the passageways in that area. If it finds untraversed passageways in the previous area, the robot will again proceed through those untraversed passageways to an unscanned adjacent area, repeating step S21 and subsequent steps to continue exploring new areas. This is similar to returning to the previous fork in the road and discovering an untraversed path, then continuing to explore along that path.
[0095] If the robot finds that there are no untraversed paths in the previous region, it means that there are no new areas to explore on this branch path, and further backtracking is required. The robot will continue to obtain information from the previous region from its current path and control itself to return again. This process will be repeated until the robot finds a region with untraversed paths. Through this continuous backtracking mechanism, the robot can comprehensively and systematically explore each region in the entire multi-region environment, avoiding missing any possible paths.
[0096] In this application, the key role of the depth-first strategy is that once a path is selected, the robot will continuously explore along that path until it reaches an area where no new paths connect, or where all paths in that area have been traversed. This strategy ensures that the robot can explore as deeply as possible in one direction during the exploration process, rather than superficially exploring or frequently switching exploration directions, thus avoiding disordered and chaotic exploration that would reduce efficiency. Furthermore, the backtracking mechanism is an important component of the depth-first search strategy, ensuring that the robot does not miss any areas during exploration. When exploration of a certain area is temporarily blocked, by backtracking to the previous area, the robot can continue to explore other unscanned areas, ensuring the integrity of the region connectivity graph.
[0097] The robot can rationally plan its exploration path and complete multi-region exploration tasks by using a depth-first strategy and corresponding backtracking operations. This facilitates the establishment of connections between multiple regions and provides a data foundation for subsequent multi-region task planning.
[0098] For example, there is a working environment containing area 1, area 2, area 3, area 4 and area 5, with the robot initially located in area 5.
[0099] 1. For example Figure 3 As shown, the robot scans along the edge of region 5 and finds two channel labels: one labeled 5-1 (indicating a connection from region 5 to region 1) and the other labeled 5-2 (indicating a connection from region 5 to region 2). The robot records the connection relationships between region 5 and regions 1 and 2, thus establishing preliminary connection relationships.
[0100] 2. For example Figure 4 As shown, since there are untraversed channels in region 5, the robot randomly selects a channel leading to region 2 and uses a depth-first strategy to travel to region 2. After arriving at region 2, region 2 becomes the current region. Scanning along the edges of region 2, the robot finds channel labels 2-5 (already traversed, ignored), 2-3, and 2-4. The robot then establishes the connection relationships between region 2 and regions 3 and 4.
[0101] 3. For example Figure 5 As shown, since there are untraversed channels in region 2, the robot randomly selects a channel leading to region 4 and proceeds to region 4. Region 4 becomes the current region. Scanning the channel labels in region 4, it is found that region 4 only has the traversed channel 4-2 (already traversed, ignored), and the robot returns to region 2.
[0102] 4. For example Figure 6As shown, region 2 only has untraversed channels 2-3. The robot selects the channel leading to region 3 and moves to region 3. Region 3 becomes the current region. In region 3, the channel labels are scanned, and 3-2 (already traversed, ignored) and 3-1 are found. The connection relationship between region 3 and region 1 is established.
[0103] 5. For example Figure 7 As shown, since there is only untraversed channel 3-1 in region 3, the robot selects the channel to region 1, scans the channel labels in region 1, finds 1-3 (already traversed, ignored) and 1-5, the robot selects the channel to region 5, and moves to region 5. There are no unscanned adjacent regions in region 5, at which point the traversal of all regions is completed.
[0104] 6. During the traversal, the robot records the time spent walking through each channel. Based on these times, the robot generates a weighted graph, such as... Figure 8 As shown, regions 1, 2, 3, 4, and 5 are vertices, and the paths connecting them are edges. The weight of each edge represents the travel time within that path. A greedy algorithm is used to analyze the weighted graph and plan the optimal mowing order, such as region 5 -> region 2 -> region 4 -> region 3 -> region 1, thus completing the multi-region task planning.
[0105] Optionally, in Figure 5 If the robot prioritizes moving from region 2 to region 3, the path will be region 2 -> region 3 -> region 1 -> region 5. At this point, there are no more untraversed channels in region 5. However, region 4 is still unscanned. The robot will then proceed through region 5 -> region 1 -> region 3 -> region 2 -> region 4 to reach region 4, completing the exploration of region 4. This completes the exploration of all regions.
[0106] As an optional implementation, determining that there is at least one untraversed channel in the current region based on connectivity includes the following:
[0107] Step S21: Determine all channels connected to the current area based on the connectivity relationships;
[0108] Step S22: Determine the traversed channels based on the travel path in the database;
[0109] Step S23: Compare all channels connected to the current region with the traversed channels to determine at least one untraversed channel in the current region.
[0110] The robot utilizes the established regional connectivity to identify all channels connecting the current area to other surrounding areas. This step provides a comprehensive data foundation for subsequent screening of untraversed channels, ensuring no possible channels are overlooked. Furthermore, during task execution, the robot records the channels it traverses in real-time along its path. By analyzing the paths stored in the database, the robot can accurately determine which channels have been visited, thus recording them as traversed channels. The robot then compares the information obtained in the first two steps, checking each channel connected to the current area against the traversed channels. If a channel is found to be absent from the traversed channel list, it is considered an untraversed channel. This comparison mechanism accurately filters out untraversed channels, providing a basis for the robot's subsequent planning. This allows it to selectively scan new areas, avoiding retracing already visited channels and improving work efficiency.
[0111] As an optional implementation, by comparing all channels connected to the current region with the traversed channels, it is determined that there is at least one untraversed channel in the current region, including the following:
[0112] Step S31: By identifying the numbering information of all channel labels in the current area, determine the channel identifier of all channels connected to the current area, wherein the numbering information is used to indicate the channel identifier of the channel between two areas;
[0113] Step S32: By analyzing the travel path, determine the set of channel identifiers for the traversed channels;
[0114] Step S33: Compare all channel identifiers corresponding to the current area with the set of channel identifiers of the traversed channels;
[0115] Step S34: If there is a set channel identifier in the current area that does not appear in the channel identifier set, then the channel corresponding to the set channel identifier is regarded as an untraversed channel.
[0116] The robot uses its onboard vision recognition system to scan the channel labels at all channel ports within the current area. By recognizing and parsing these labels, it can determine the channel identifiers of all channels connected to the current area. The robot's database also records its travel path during task execution. Through in-depth analysis of this path data, the robot can extract the channel identifiers of traversed channels. For example, if the robot travels from area 2 through channel number "2-4" to area 4, then channel identifier "2-4" is included in the set of traversed channel identifiers. As the robot continues to move, the set of traversed channel identifiers is continuously updated and expanded, providing accurate data support for subsequent comparisons. The robot compares all channel identifiers corresponding to the current area with the set of traversed channel identifiers one by one. If a channel identifier is found to have no match in the set of traversed channel identifiers, then the channel corresponding to this identifier is an untraversed channel. For example, if the channel identifier "1-6" of the current region does not appear in the set of channel identifiers of the traversed channels, then the channel from region 1 to region 6 is determined to be an untraversed channel.
[0117] In this application, the robot analyzes the travel paths stored in the database to obtain a set of channel identifiers for traversed channels, and compares this set with all corresponding channel identifiers in the current area, thus accurately identifying untraversed channels. Once untraversed channels are identified, the robot can explore them purposefully, without wasting time and resources on already visited channels.
[0118] As an optional implementation method, the time spent walking in the target channel includes the following:
[0119] Step S41: When the robot switches areas, record the first moment when the channel label at the first port of the target channel is scanned;
[0120] Step S42: When the robot travels through the target channel to the next unscanned adjacent area, record the second moment when the channel label at the second port of the target channel is scanned;
[0121] Step S43: Use the time difference between the second moment and the first moment as the time taken for the robot to pass through the target channel.
[0122] When the robot prepares to switch areas, its vision system scans the channel label at the first port of the target channel. The robot's internal high-precision timing module quickly captures this instant and records the time as the first moment. The robot then initiates its movement program, traveling along the selected target channel to the adjacent unscanned area. During this movement, when the robot successfully passes through the target channel, arrives at the next unscanned adjacent area, and scans the channel label at the second port of the target channel, the timing module restarts, recording this moment as the second moment. The robot's computing module then retrieves the stored data from the first and second moments, subtracting the second moment from the first moment to calculate the time taken for the robot to travel within the target channel.
[0123] Optionally, a detection distance threshold can be set in the robot's vision inspection system. When the detected distance to the channel label is greater than the set threshold, it is not used as the starting time recording point. Instead, the robot is allowed to move closer to the threshold range before the starting time is recorded. For example, if the threshold is set to 0.5 meters, time recording only begins when the robot detects the channel label within 0.5 meters. This reduces errors caused by long-distance detection.
[0124] For example, in a multi-area lawnmowing scenario, the robot switches from area A to area B. When it arrives at the beginning of the passage connecting areas A and B and scans the passage label at that point, let's say the time is 10:00, the timing module will accurately store this moment in its data storage unit. When the robot arrives at area B and scans the passage label at the other end of the passage, the time is 10:01. Subtracting 10:00 from 10:01 gives the robot's travel time in that passage as 1 minute.
[0125] This application provides crucial quantitative data for generating a weighted graph by accurately recording the robot's walking time in the target channel. In the weighted graph, the weight of the edge represents the time cost for the robot to traverse the corresponding channel. Precise time data allows the weighted graph to more realistically reflect the ease of passage and time consumption between areas.
[0126] Specifically, for the same channel, the order of the numbering information contained in the channel labels at the two ports of that channel is interchanged. For example, Figure 9In the diagram, the channel labels at one end are numbered 1-2, indicating that one can travel from area 1 to area 2 via this channel; while the labels at the other end are numbered 2-1, meaning that one can travel from area 2 to area 1 via this channel. Although the numbering order is different, they correspond to the same travel time for the robot to travel back and forth within this channel. This means that regardless of whether the robot enters the channel from area 1 to area 2 or from area 2 to area 1, the recorded travel time is consistent. This eliminates the need for the robot to separately record and maintain the round-trip time for the same channel, reducing data storage requirements.
[0127] In this embodiment, the channel label is placed at the edge of the area, ensuring that the robot can stably see the face of the channel label while scanning along the edge of the current area and moving between areas through the channel. The channel label can be set as a triangular double-sided structure to ensure that the robot can stably see the vertical face of the triangular channel label, or it can be set as a trapezoidal double-sided structure, a cuboid structure, or a cylindrical structure, etc. This application does not limit the shape of the channel label.
[0128] To ensure the lawnmower can efficiently and accurately identify area information in complex working environments, the lane label has at least two identical numbers. One number faces the direction of the robot's movement along the edge of the lane label. As the lawnmower moves along the edge of the area, one number is always facing its direction of movement, allowing for easy reading of the number without additional viewing angle adjustments and timely recording of the first moment the lane label is scanned. The other number is set to face the lane direction, so that when the robot passes through the lane and reaches another area, the second moment of arrival in that area can be immediately recorded.
[0129] Optionally, embodiments of this application may use the robot's built-in algorithm module (such as greedy algorithm, dynamic programming algorithm, or brute-force search algorithm) to analyze and calculate the weighted graph and plan multi-region tasks. The analysis process of greedy algorithm and brute-force search algorithm is as follows.
[0130] The process of planning a multi-region task using a greedy algorithm is as follows: 1. Start with any region, which becomes the current region. 2. Check the edge weights connecting the current region to all adjacent regions, and select the region connected by the edge with the smallest weight as the next region to visit. This is the core of the greedy algorithm; it always chooses the optimal solution (i.e., the path with the lowest cost) in the current state. 3. Update the selected next region to the current region and mark it as visited. 4. Repeat steps 2 and 3 until all regions have been visited. 5. Form the final multi-region task planning path according to the order of visiting regions.
[0131] The process of planning a multi-region task using a brute-force search algorithm is as follows: 1. Determine the total number of regions in the multi-region task, as well as the connection relationships and edge weights between regions in the weighted graph. 2. Generate all possible region access sequences by arranging and combining the vertex numbers in the weighted graph. The region access sequence indicates the set of numbered sequences for sequentially accessing regions. Assuming there are n regions, there are n! possible access sequences. For example, if there are 3 regions A, B, and C, there are 6 possible sequences: ABC, ACB, BAC, BCA, CAB, and CBA. 3. For each generated region access sequence, accumulate the weights of the corresponding edges in the weighted graph to calculate the total weight of accessing all regions in that sequence. For example, for the access sequence ABC, if the weight from A to B is m and the weight from B to C is n, then the total weight is m + n. 4. Compare all calculated total weights and find the access sequence with the smallest total weight (or the largest weight according to task requirements). This optimal access sequence is the execution order of the multi-region task planned using the brute-force search algorithm. 5. Output the optimal region access order as the planning result of the multi-region task.
[0132] The multi-region task planning using a brute-force search algorithm includes: arranging and combining the vertex numbers in the weighted graph to generate multiple region access sequences, where each region access sequence indicates the set of numbered sequences for sequential region access; accumulating the weights of corresponding edges in the weighted graph according to the region access order in the region access sequences to obtain the total weight of the edges in the region access sequences; comparing the total weights of multiple region access sequences to determine the access order corresponding to the extreme total weight, and planning the multi-region task based on the access order, where the extreme total weight is either the maximum total weight or the minimum total weight.
[0133] This application provides an overall planning process for multi-regional tasks, including the following steps.
[0134] 1. Robot Deployment and System Initialization: Place the robot in a region of the work area, start its vision system, and initialize the data structure used to store the region connection relationship, such as creating an empty list to prepare for recording channel information.
[0135] 2. Current area edge scanning: The robot scans along the edge of the current area, identifies the channel labels at the edge through the vision system, and identifies the number information in each channel label.
[0136] 3. Complete the connection relationship construction of the current area: The robot continuously scans along the edge of the current area until all channel labels in the current area are identified, constructs the connection relationship diagram between the current area and at least one adjacent area, clarifies the channel connection between areas, and determines the number of the current area.
[0137] 4. Identify untraversed channels in the current area: The robot compares the channel identifiers of all channels in the current area with those of the traversed channels to identify the untraversed channels in the current area.
[0138] 5. Select a target channel and proceed to a new area: The robot randomly or nearby selects a target channel from the untraversed channels. The robot then enters the next unscanned adjacent area through the target channel and records the time taken to pass through the target channel.
[0139] 6. Continuously traverse new regions: In newly entered unscanned regions, the robot repeatedly performs operations such as edge scanning, building region connection relationships, and identifying untraversed channels.
[0140] 7. Return to the previous area to continue exploration: If the newly entered current area only contains traversed channels, the robot returns to the previous area and checks if there are any unscanned adjacent areas. If so, it selects the target channel and proceeds to the unscanned adjacent area; otherwise, it continues to backtrack to the previous area. This process continues until all areas have been traversed.
[0141] 8. Generate a weighted graph: After traversing all regions, the robot assigns a weight to each channel between regions based on the travel time of each channel. Then, based on the region connection relationship, a weighted graph is generated with regions as vertices and channels as edges. The vertex numbers in the weighted graph are consistent with the corresponding region numbers.
[0142] 9. Planning multi-region tasks: The robot uses built-in algorithms, such as greedy algorithms and dynamic programming algorithms, to analyze the weighted graph and, in combination with task requirements, determine the optimal execution path and order of multi-region tasks.
[0143] Based on the same technical concept, this application provides a planning device for multi-regional tasks, such as... Figure 10 As shown, the device includes:
[0144] The scanning module 1001 is used to control the robot to scan all the channel labels in the current area along the edge, wherein the channel labels are set at the channel port between every two adjacent areas;
[0145] The construction and determination module 1002 is used to construct the connection relationship between the current area and adjacent areas by reading the number information in the channel label, and to determine the number of the current area, wherein the number information consists of the current area number and the adjacent area number to which it is connected;
[0146] The travel and recording module 1003 is used to control the robot to travel through the target channel to an unscanned adjacent area after determining the target channel based on the connection relationship, and to record the time taken to travel through the target channel;
[0147] The generation and planning module 1004 is used to generate a weighted graph based on the connection relationship between regions and the time taken to pass through the channel after traversing all regions, and to plan multi-region tasks according to the weighted graph. Each vertex of the weighted graph represents a region, the vertex number is the number of the corresponding region, and the weight of each edge represents the time taken to pass through the channel.
[0148] Optionally, the travel and recording module 1003 is used for:
[0149] After determining the target channel based on connectivity and depth-first strategy, the robot is controlled to travel through the target channel to an unscanned adjacent area according to the depth-first strategy.
[0150] Optionally, the travel and recording module 1003 is specifically used for:
[0151] If it is determined based on the connection relationship that there is at least one untraversed channel in the current area, the robot is controlled to randomly or nearby select a target channel from at least one untraversed channel and travel through the target channel to an unscanned adjacent area.
[0152] The unscanned neighboring regions are used as the current region to build region connection relationships. The above operation is repeated to continuously explore the unscanned neighboring regions. The robot's travel path is stored in the database.
[0153] If there is only one traversed channel in the current area, then return to the previous area according to the stored travel path;
[0154] If there are untraversed channels in the previous region, then the step of selecting and traversing through the target channel in the untraversed channels to the unscanned adjacent region is executed;
[0155] If there are no untraversed channels in the previous region, then backtrack the region according to the stored travel path until a region with untraversed channels is found.
[0156] Optionally, the travel and recording module 1003 is specifically used for:
[0157] Determine all channels connected to the current area based on connectivity relationships;
[0158] The traversed channels are determined based on the travel path in the database;
[0159] By comparing all channels connected to the current region with the traversed channels, at least one untraversed channel exists in the current region.
[0160] Optionally, the travel and recording module 1003 is specifically used for:
[0161] By identifying the numbering information of all channel labels in the current area, the channel identifiers of all channels connected to the current area are determined. The numbering information is used to indicate the channel identifiers between two areas.
[0162] By analyzing the travel path, the set of channel identifiers that have been traversed is determined;
[0163] Compare all channel identifiers corresponding to the current area with the set of channel identifiers of the traversed channels;
[0164] If there is a specified channel identifier in the current area that does not appear in the channel identifier set, then the channel corresponding to the specified channel identifier will be regarded as an untraversed channel.
[0165] Optionally, the travel and recording module 1003 is also used for:
[0166] When the robot switches areas, record the first moment when the channel label at the first port of the target channel is scanned;
[0167] When the robot moves through the target channel to the next unscanned adjacent area, record the second moment when the channel label at the second port of the target channel is scanned;
[0168] The time difference between the second moment and the first moment is taken as the time it takes for the robot to pass through the target channel.
[0169] Optionally, the generation and planning module 1004 is used for:
[0170] Multiple vertex numbers in the weighted graph are arranged and combined to generate multiple region access sequences, where the region access sequence is used to indicate the set of numbered sequences of regions to be accessed in order.
[0171] The weights of the corresponding edges in the weighted graph are accumulated according to the region access order in the region access sequence to obtain the total weight of the edges in the region access sequence.
[0172] The total weights of multiple region access sequences are compared to determine the access order corresponding to the extreme total weight. Multi-region tasks are then planned according to the access order, where the extreme total weight is either the maximum total weight or the minimum total weight.
[0173] like Figure 11 As shown, this application provides an electronic device including a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, wherein the processor 1101, the communication interface 1102, and the memory 1103 communicate with each other through the communication bus 1104.
[0174] Memory 1103 is used to store computer programs.
[0175] In one embodiment of this application, the processor 1101, when executing the program stored in the memory 1103, implements the multi-region task planning method provided in any of the foregoing method embodiments.
[0176] The electronic device provided in this application embodiment can specifically be a monocular vision robot capable of edge scanning and task planning.
[0177] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the multi-region task planning method provided in any of the foregoing method embodiments.
[0178] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0179] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0180] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0181] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A planning method for multi-regional tasks, characterized in that, The method includes: Without global localization and a global map, the robot is controlled to scan all the channel labels in the current area along the edge, wherein the channel labels are set at the channel ports between every two adjacent areas; The connection relationship between the current region and adjacent regions is constructed by reading the number information in the channel label, and the number of the current region is determined, wherein the number information consists of the current region number and the adjacent region number to which it is connected; After determining the target channel based on the connection relationship, the robot is controlled to travel through the target channel to an unscanned adjacent area, and the time taken to travel through the target channel is recorded. After traversing all regions, a weighted graph is generated based on the connection relationships between regions and the time taken to traverse the channels. Multi-region tasks are then planned based on the weighted graph. Each vertex of the weighted graph represents a region, the vertex number is the corresponding region number, and the weight of each edge represents the time taken to traverse the channels. The process of controlling the robot to travel through the target channel to an unscanned adjacent area includes: By identifying the numbering information of all channel labels in the current area, the channel identifiers of all channels connected to the current area are determined, wherein the numbering information is used to indicate the channel identifiers of channels between two areas; By analyzing the travel path, the set of channel identifiers that have been traversed is determined; Compare all channel identifiers corresponding to the current region with the set of channel identifiers of the traversed channels; If there is a specified channel identifier in the current area that does not appear in the channel identifier set, then the channel corresponding to the specified channel identifier is regarded as an untraversed channel; Select a target channel from the untraced channels and travel along the target channel to an unscanned adjacent area.
2. The method of claim 1, wherein, After determining the target channel based on the connection relationship, controlling the robot to travel through the target channel to an unscanned adjacent area includes: After determining the target channel based on the connection relationship and depth-first strategy, the robot is controlled to travel through the target channel to an unscanned adjacent area according to the depth-first strategy.
3. The method of claim 2, wherein, After determining the target channel based on the connectivity and depth-first strategy, controlling the robot to travel through the target channel to an unscanned adjacent area according to the depth-first strategy includes: If it is determined based on the connection relationship that there is at least one untraversed channel in the current area, the robot is controlled to randomly or nearby select a target channel from the at least one untraversed channel and travel through the target channel to an unscanned adjacent area; The unscanned adjacent regions are used as the current region to build region connection relationships. The above operation is repeated to continuously explore the unscanned adjacent regions. The robot's travel path is stored in the database. If the current region has only one traversed channel, then the previous region is returned according to the stored travel path. If there are untraversed channels in the previous region, then the step of selecting and traversing through the target channel in the untraversed channels to the unscanned adjacent region is executed; If the previous region does not have any untraversed channels, then backtracking is performed based on the stored travel path until a region with untraversed channels is found.
4. The method according to claim 3, characterized in that, Determining that there is at least one untraversed channel in the current region based on the connection relationship includes: Based on the connection relationships, determine all channels connected to the current region; The traversed channels are determined based on the travel paths in the database; By comparing all channels connected to the current region with the traversed channels, at least one untraversed channel exists in the current region.
5. The method according to claim 1, characterized in that, The time taken to travel through the target channel includes: When the robot switches areas, the first moment when the channel label at the first port of the target channel is scanned is recorded; When the robot travels through the target channel to the next unscanned adjacent area, the second moment when the channel label at the second port of the target channel is scanned is recorded; The time difference between the second moment and the first moment is taken as the time it takes for the robot to pass through the target channel.
6. The method according to claim 1, characterized in that, The multi-region task planning based on the weighted graph includes: The numbering of multiple vertices in the weighted graph is arranged and combined to generate multiple region access sequences, wherein the region access sequence is used to indicate the set of numbered sequences of regions accessed in sequence; The weights of the corresponding edges in the weighted graph are accumulated according to the region access order in the region access sequence to obtain the total weight of the edges in the region access sequence. The total weights of multiple region access sequences are compared to determine the access order corresponding to the extreme total weight, and multi-region tasks are planned according to the access order, wherein the extreme total weight is the maximum total weight or the minimum total weight.
7. A multi-regional task planning device, characterized in that, The device includes: The scanning module is used to control the robot to scan all the channel labels in the current area along the edge without global positioning and global map. The channel labels are set at the channel ports between every two adjacent areas. The construction and determination module is used to construct the connection relationship between the current region and adjacent regions by reading the number information in the channel label, and to determine the number of the current region, wherein the number information consists of the current region number and the adjacent region number to which it is connected; The travel and recording module is used to determine the target channel based on the connection relationship, control the robot to travel through the target channel to an unscanned adjacent area, and record the time taken to travel through the target channel; The generation and planning module is used to generate a weighted graph based on the connection relationship between regions and the time taken to traverse the channels after all regions have been traversed, and to plan multi-region tasks according to the weighted graph. Each vertex of the weighted graph represents a region, the vertex number is the number of the corresponding region, and the weight of each edge represents the time taken to traverse the channel. The traveling and recording module is used for: By identifying the numbering information of all channel labels in the current area, the channel identifiers of all channels connected to the current area are determined, wherein the numbering information is used to indicate the channel identifiers of channels between two areas; By analyzing the travel path, the set of channel identifiers that have been traversed is determined; Compare all channel identifiers corresponding to the current region with the set of channel identifiers of the traversed channels; If there is a specified channel identifier in the current area that does not appear in the channel identifier set, then the channel corresponding to the specified channel identifier is regarded as an untraversed channel; Select a target channel from the untraced channels and travel along the target channel to an unscanned adjacent area.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.