Path thermodynamic diagram generation method, path thermodynamic diagram generation device and storage medium
By generating a path heatmap in the robot map and calculating the heat value using the path starting point and the slope of the planned path, the problem of insufficient accuracy and discrimination ability of traditional door detection methods is solved, and high-precision door detection and region segmentation are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-03-17
AI Technical Summary
Traditional door detection methods rely on visual features or map boundary geometric features. They are affected by lighting and viewing angle, making it difficult to distinguish door openings from other opening areas. Furthermore, they require high precision and cannot effectively segment areas.
By determining the starting point of the path in the map area, a planned path is generated for the starting point pair. Heat values are calculated based on the slope of the path segments and the location of the intersections. These values are then overlaid to generate a path heat map. The heat map is used to reflect the frequency of traffic for area positioning and segmentation.
It achieves accurate detection of doors and area segmentation without relying on additional sensors, improving the accuracy of door detection and area segmentation, especially in abnormal scenarios such as long corridors.
Smart Images

Figure CN121685756A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of positioning technology, and in particular to a path heatmap generation method, a path heatmap generation device, and a computer storage medium. Background Technology
[0002] With the continuous development of mobile robot technology, to enable robots to have more intelligent navigation solutions, maps are segmented into regions, dividing them into individual room areas. Room area segmentation generally relies on door detection algorithms. Traditional door detection methods often depend on visual features or geometric features of the map boundary shape. Visual features are limited by lighting and viewing angle, while geometric feature-based door detection methods require high map accuracy and struggle to distinguish doorways from other opening areas (such as corridors). Summary of the Invention
[0003] To address the aforementioned technical problems, this application proposes a path heatmap generation method, a path heatmap generation device, and a computer storage medium.
[0004] To address the aforementioned technical problems, this application proposes a method for generating path heatmaps, the method comprising: Determine several starting and ending points for paths within the map area; Iterate through the combinations of each pair of path starting points to generate several path starting point pairs; Generate the planned path for each pair of starting and ending points; The thermal value of each path point in the planned path is determined based on the slope of each path segment and the location of the intersection of the path segments. The heat values of all planned paths are overlaid on the map area to generate a path heat map of the map area. Regional information is generated based on the path heatmap.
[0005] The step of determining several path starting points in the map area includes: Determine a reference point on the map area; Several rays are generated on the map area with the reference point as the center and according to a preset angle step size; The intersections of the aforementioned rays with map boundaries or obstacles are taken as the starting points of the aforementioned paths.
[0006] The path heatmap generation method further includes: Determine the resolution of the map region and the corresponding area of the map region; The preset angle step size is determined based on the resolution and the area.
[0007] The path heatmap generation method further includes, after generating the planned path for each path start point pair, the method for generating the path heatmap. Determine whether each planned path includes at least one intersection point of path segments; If not, remove the planned path.
[0008] The step of determining the thermal value of each path point in the planned path based on the slope of each path segment and the intersection of the path segments includes: Determine the current path segment containing the current path point, as well as the adjacent path segments of the current path segment; Obtain the intersection point of the current path segment and the adjacent path segment; Calculate the absolute value of the slope difference between the current path segment and the adjacent path segment; The curvature value of the current path point is determined based on the absolute value of the slope difference and the distance from the current path point to the intersection of the path segments; The thermal value of the current path point is determined based on the curvature value.
[0009] Wherein, determining the current path segment where the current path point is located, and the adjacent path segments of the current path segment, includes: Determine the current path segment containing the current path point; Determine a first adjacent path segment connected to one end of the current path segment, and a second adjacent path segment connected to the other end of the current path segment; Obtain the intersection point of the current path segment and the first path segment of the first adjacent path segment; Obtain the intersection point of the current path segment and the second path segment of the second adjacent path segment; The adjacent path segments of the current path segment are determined based on the smaller of the distance between the intersection point of the first path segment and the current path point, and the distance between the intersection point of the second path segment and the current path point.
[0010] The path heatmap generation method further includes: Determine the number of repeated bends on the planned path where the current path point is located; Determining the thermal value of the current path point based on the curvature value includes: The thermal value of the current path point is determined based on the curvature value and the number of repeated bends.
[0011] The determination of the number of repeated bends in the planned path where the current path point is located includes: Iterate through the intersection points of the two adjacent path segments of the planned path containing the current path point; Obtain the first slope change direction of one of the intersection points of the two adjacent path segments, and the second slope change direction of the intersection point of the other path segment; When the first slope change direction and the second slope change direction are different, the number of repeated bends of the planned path where the current path point is located is incremented by 1 until all combinations of intersections of two adjacent path segments are traversed.
[0012] To address the aforementioned technical problems, this application also proposes a path heatmap generation apparatus, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the path heatmap generation method as described above.
[0013] To address the aforementioned technical problems, this application also proposes a computer storage medium for storing program data, which, when executed by a computer, is used to implement the aforementioned path heatmap generation method.
[0014] Compared with the prior art, the beneficial effects of this application are: the path heat map generation device analyzes the heat value of each planned path point by planning the path between the starting points of each pair of paths, and then obtains the path heat map of the entire map area by superimposing the heat values; the path heat map reflects the traffic frequency of various places in the map area, and the higher the heat value, the higher the traffic frequency. By locating areas with different traffic frequencies in the map area, the area positioning and area segmentation can be achieved. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a schematic flowchart of an embodiment of the path heatmap generation method provided in this application; Figure 2 This is a schematic diagram of the technical route of the path heatmap generation method provided in this application; Figure 3 This is a schematic diagram of a scenario of an embodiment of the path starting point provided in this application; Figure 4 This is a schematic diagram of a scenario of an embodiment of the map area provided in this application; Figure 5 yes Figure 1 A schematic diagram of the specific process of step S11 in the method for generating the heatmap of the path shown. Figure 6 This is a schematic diagram of the ray distribution on the map area provided in this application; Figure 7 This is a schematic diagram of a scenario of an embodiment of the planned path set provided in this application; Figure 8 This is a schematic diagram of another embodiment of the planned path set provided in this application; Figure 9 This is a schematic diagram illustrating the curvature variation values of adjacent path segments in the planned path provided in this application. Figure 10 yes Figure 1 A schematic diagram of the specific process of step S14 in the method for generating the heatmap of the path shown. Figure 11 This is a schematic diagram of a scenario where the planned path provided in this application repeatedly bends; Figure 12 The path thermal provided in this application Figure 1 A schematic diagram of a scenario in an embodiment; Figure 13 This is a schematic diagram of an embodiment of the path heatmap generation device provided in this application; Figure 14 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation
[0016] 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 a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0017] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0018] This application generates a path heatmap for door detection and area segmentation using only the passability information of the map area without the assistance of additional sensors, and can effectively deal with abnormal areas such as long corridors.
[0019] Please refer to the details. Figure 1 and Figure 2 , Figure 1 This is a schematic flowchart of an embodiment of the path heatmap generation method provided in this application. Figure 2 This is a schematic diagram of the technical route of the path heatmap generation method provided in this application.
[0020] The path heatmap generation method of this application is applied to a path heatmap generation device, wherein the path heatmap generation device can be a server, a terminal device, or a system in which the server and the terminal device cooperate with each other. Accordingly, the various parts of the path heatmap generation device, such as each unit, subunit, module, and submodule, can all be set in the server, all in the terminal device, or separately in the server and the terminal device.
[0021] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed server functionality, or as a single software program or software module; no specific limitations are made here.
[0022] like Figure 1 As shown, the specific steps are as follows: Step S11: Determine several path start points in the map area.
[0023] In the embodiments of this application, such as Figure 2 As shown, the path heatmap generation device first needs to determine several path starting points in the map area. For details, please refer to [link / reference needed]. Figure 3 and Figure 4 , Figure 3 This is a schematic diagram of a scenario of an embodiment of the path starting point provided in this application. Figure 4 This is a schematic diagram of a scenario based on an embodiment of the map area provided in this application. For example... Figure 3 As shown, the starting and ending points of paths in the map area need to be distributed in... Figure 4 The map area is divided into various locations to cover the entire map area and prevent omissions that would prevent accurate calculation of heat values.
[0024] Specifically, such as Figure 3The starting points of the paths shown can be selected by staff, or the pre-trained network model can automatically generate several combinations of starting points that can cover the input map area.
[0025] This application also provides a specific technical solution for determining the starting point of a path; please refer to the following: Figure 5 , Figure 5 yes Figure 1 The diagram shows the detailed process of step S11 in the method for generating the path heatmap.
[0026] like Figure 5 As shown, the specific steps are as follows: Step S111: Determine the reference point on the map area.
[0027] In this embodiment of the application, the path heatmap generation device first in Figure 4 A reference point is determined in the map area shown, preferably the center point of the map area, which can better cover every area of the map.
[0028] Step S112: Generate several rays on the map area with the reference point as the center and according to the preset angle step size.
[0029] In this embodiment, the path heatmap generation device extends several rays outwards from the reference point determined in step S111. For details, please refer to [link to relevant documentation]. Figure 6 , Figure 6 This is a schematic diagram of the ray distribution on the map area provided in this application.
[0030] like Figure 6 As shown, when the path heatmap generation device draws out rays, it can generate rays according to a preset angle step size to balance the distribution of rays in the map area and improve the accuracy of the path starting point.
[0031] The preset angle step size can be pre-set by the operator or selected based on the map area's resolution and minimum area threshold. Higher resolution or larger map areas allow for a smaller angle step size. Furthermore, the angle step size determines the number of rays and path starting points; too many increase the computational load, while too few affect detection accuracy. Therefore, when automatically selecting the angle step size, the device's computational resources should be considered to balance resource utilization and detection accuracy.
[0032] Step S113: Use the intersections of several rays with map boundaries or obstacles as the starting points of several paths.
[0033] In this embodiment of the application, the path heatmap generation device is based on Figure 6The ray distribution map shown identifies the intersections of rays with map boundaries or obstacles as the starting points of the paths, thus obtaining... Figure 3 The set of starting points for the path shown.
[0034] Step S12: Traverse the combinations of each pair of path starting points to generate several path starting point pairs.
[0035] Step S13: Generate the planned path for each pair of starting points.
[0036] In this embodiment, the path heatmap generation device calculates and generates the optimal path between each pair of path starting points using path planning algorithms, such as the mature Theta* algorithm and A* algorithm, thereby obtaining... Figure 7 The set of planned paths shown.
[0037] Furthermore, because there are many densely packed paths with similar starting points within the same region, the computational complexity is high, so such paths need to be eliminated in advance. Adjacent paths within the same region are generally directly reachable, meaning the optimal path is a straight line. Paths passing through different regions typically have some curvature; the greater the curvature, the higher the probability of a path connecting two different regions. Based on this theoretical premise, each path is selected and modeled.
[0038] Based on the characteristics of the planned routes within the same area, the route heatmap generation device traverses... Figure 7 For each planned path in the algorithm, directly reachable planned paths are eliminated, resulting in the following: Figure 8 The image shows the set of planned paths after path filtering.
[0039] In this application, the determination of a directly accessible planned path can be made through at least one of the following methods, including but not limited to: 1. The planned path is a straight line.
[0040] 2. The planned path has only one path segment.
[0041] 3. The planned path has no intersections of path segments.
[0042] Step S14: Determine the thermal value of each path point in the planned path based on the slope of each path segment and the location of the intersection of the path segments.
[0043] In this embodiment, each path is composed of line segments. Due to the influence of map resolution, each path is divided into small grids (similar to pixels in an image). To more accurately calculate the heat value of each path, this application needs to calculate the curvature value of each small grid on each planned path. The curvature value calculation formula is as follows: (1) Where q represents the curvature value of the grid, and s represents the distance of the grid from the intersection of adjacent line segments. and These represent the slopes of adjacent line segments.
[0044] As shown in Equation 1, the curvature value of each small grid cell is related not only to the slope of its own path segment and adjacent path segments, but also to the distance from the grid cell to the intersection of two adjacent segments; that is, the closer to the intersection, the greater the curvature value. For example... Figure 9 As shown, the closer to the intersection point, the darker the color (i.e., the greater the curvature value).
[0045] In one embodiment, the path heatmap generating device can use the curvature value of a path point as the heat value of the path point.
[0046] The following describes a specific implementation method for calculating thermal values. Please refer to [link / reference needed] for details. Figure 10 , Figure 10 yes Figure 1 The diagram shows the detailed process of step S14 in the method for generating the path heatmap.
[0047] like Figure 10 As shown, the specific steps are as follows: Step S141: Determine the current path segment where the current path point is located, and the adjacent path segments of the current path segment.
[0048] In this embodiment of the application, the path heatmap generation device determines the current path segment where the current path point is located. and the current path segment Adjacent path segments .
[0049] It should be noted that, regarding adjacent path segments... The path heatmap generation device can determine the path in a predetermined order, that is, according to the order of path segments, the current path segment. The preceding or following path segment is an adjacent path segment .
[0050] In addition, the path heatmap generation device can also determine adjacent path segments based on the distance between the current path point and the intersection points of the two preceding and following path segments. Please refer to the following procedure for details: The path heatmap generation device identifies a first adjacent path segment connected to one end of the current path segment and a second adjacent path segment connected to the other end of the current path segment. It then determines and obtains the first intersection point of the current path segment with the first adjacent path segment and the second intersection point of the current path segment with the second adjacent path segment. Next, the device calculates the distances from the current path point to the first and second path segment intersection points. Finally, the device determines the adjacent path segments of the current path segment based on the smaller of the distances between the first and second path segment intersection points and the current path point. .
[0051] Step S142: Obtain the intersection point of the current path segment and the adjacent path segment.
[0052] Step S143: Calculate the absolute value of the slope difference between the current path segment and the adjacent path segment.
[0053] In this embodiment, the path heatmap generation device calculates the absolute value of the slope difference between the current path segment and the adjacent path segment. .
[0054] Step S144: Determine the curvature value of the current path point based on the absolute value of the slope difference and the distance from the current path point to the intersection of the path segments.
[0055] In this embodiment, the path heatmap generation device calculates the distance s from the current path point to the intersection of the path segments, and then calculates the distance s based on the absolute value of the slope difference. Calculate the curvature value of the current path point according to the formula given in step S14.
[0056] Step S145: Determine the thermal value of the current path point based on the curvature value.
[0057] In another implementation, in order to make fuller use of the influence of each path on the path heatmap, the path heatmap generating device can further introduce the number of curvature changes of the planned path as an important influencing parameter for generating heatmap values, based on the curvature values.
[0058] Specifically, paths with repeated bends have a higher probability of connecting two different regions. For the definition of repeated bends in this application, please refer to [link to relevant documentation]. Figure 11 Repeated bending refers to the slopes of two adjacent intersection points changing in different directions, with one increasing and the other decreasing.
[0059] Ultimately, the thermal value of each small grid cell, i.e., a path point, is calculated using the following formula: the number of bends plus the curvature value:
[0060] Where H represents the thermal value of each grid cell on the path, N represents the number of times the entire path bends, and q(s) represents the curvature value of the grid cell. and is a coefficient.
[0061] To balance the impact of the two parameters on the overall calculation model, a coefficient is added to each parameter, and staff can adjust the parameter values as needed.
[0062] Step S15: Overlay the heat values of all planned paths on the map area to generate a path heat map of the map area.
[0063] In this embodiment of the application, the path heatmap generation device linearly superimposes the heat values of all planned paths onto a map area to obtain, for example, the heatmap generation device. Figure 12 The complete path heatmap shown indicates that the darker the color, the higher the superimposed heat value.
[0064] Step S16: Generate region information based on the path heatmap.
[0065] In this embodiment, the path heatmap generation device locates different positions of the map area based on the path heatmap. For example, the darker colored areas largely overlap with the actual door frame areas. The heatmap allows for accurate positioning and definition of the door frame area. Finally, within this limited area, the geometric features of the map are used to precisely locate the door frame, thus greatly improving the accuracy of door frame detection and region segmentation.
[0066] In one specific implementation, the path heatmap generation device performs door detection by calculating the path heatmap. Generally, doors are the areas with the highest path traffic frequency. By utilizing this characteristic, the path heatmap is calculated, and areas with high heat values are also areas with a high probability of being doors, thereby improving the accuracy of door detection.
[0067] The path heatmap generation method provided in this application is based on path planning and uses heatmaps to accurately locate and define door areas, which can greatly improve the accuracy of room detection and area segmentation.
[0068] The path heatmap generation method provided in this application does not rely on the geometric features of the map or data from additional sensors during the calculation of the door frame area, and is simple and effective.
[0069] The path heatmap generation method provided in this application can effectively handle abnormal scenarios such as long corridors, solving the problem that traditional geometric feature shape detection cannot solve long corridor scenarios.
[0070] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0071] To implement the above-mentioned path heatmap generation method, this application also proposes a path heatmap generation device, which can be found in the following details. Figure 13 , Figure 13 This is a schematic diagram of an embodiment of the path heatmap generation device provided in this application.
[0072] The path heatmap generation device 400 in this embodiment includes a processor 41, a memory 42, an input / output device 43, and a bus 44.
[0073] The processor 41, memory 42, and input / output device 43 are respectively connected to the bus 44. The memory 42 stores program data, and the processor 41 is used to execute the program data to implement the path heatmap generation method described in the above embodiment.
[0074] In this embodiment, processor 41 can also be referred to as a CPU (Central Processing Unit). Processor 41 may be an integrated circuit chip with signal processing capabilities. Processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 41 can be any conventional processor.
[0075] This application also provides a computer storage medium; please refer to the following: Figure 14 , Figure 14 This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 600 stores a computer program 61, which, when executed by a processor, is used to implement the path heatmap generation method of the above embodiment.
[0076] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0077] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A path heat map generation method characterized by, The path heat map generation method comprises: determining a plurality of path starting points in a map area; iterating through combinations of two path starting points to generate a plurality of path starting point pairs; generating a planning path for each path starting point pair; determining a heat value of each path point in the planning path according to a slope of each path segment of the planning path and a path segment intersection position; superimposing heat values of all planning paths on the map area to generate a path heat map of the map area; and generating area information according to the path heat map.
2. The path heat map generation method of claim 1, wherein the determining a plurality of path starting points in the map area comprises: determining a reference point in the map area; generating a plurality of rays in the map area with the reference point as the center and according to a preset angle step; and taking intersection points of the plurality of rays and a map boundary or an obstacle as the plurality of path starting points.
3. The path heat map generation method of claim 2, wherein the path heat map generation method further comprises: determining a resolution of the map area and an area corresponding to the map area; and determining the preset angle step according to the resolution and the area.
4. The path heat map generation method of claim 1, wherein after the generating a planning path for each path starting point pair, the path heat map generation method further comprises: judging whether each planning path includes at least one path segment intersection point; and if not, eliminating the planning path.
5. The path heat map generation method of claim 1, wherein the determining a heat value of each path point in the planning path according to a slope of each path segment of the planning path and a path segment intersection position comprises: determining a current path segment where a current path point is located and adjacent path segments of the current path segment; obtaining a path segment intersection of the current path segment and the adjacent path segment; calculating an absolute value of a slope difference of the current path segment and the adjacent path segment; determining a curvature value of the current path point according to the absolute value of the slope difference and a distance of the current path point to the path segment intersection; and determining a heat value of the current path point according to the curvature value.
6. The path heat map generation method of claim 5, wherein the determining a current path segment where a current path point is located and adjacent path segments of the current path segment comprises: determining the current path segment where the current path point is located; determining a first adjacent path segment connected to one end of the current path segment and a second adjacent path segment connected to the other end of the current path segment; obtaining a first path segment intersection of the current path segment and the first adjacent path segment; obtaining a second path segment intersection of the current path segment and the second adjacent path segment; and determining the adjacent path segments of the current path segment according to a smaller value of a distance of the first path segment intersection to the current path point and a distance of the second path segment intersection to the current path point. 7. The path heat map generation method of claim 5, wherein the path heat map generation method further comprises: determining a number of repeated bends of the planning path at the current path point; the determining the heat value of the current path point according to the curvature value comprises: determining the heat value of the current path point according to the curvature value and the number of repeated bends.
8. The path heat map generation method of claim 7, wherein the determining the number of repeated bends of the planning path at the current path point comprises: traversing all combinations of adjacent two path segment intersection points of the planning path at the current path point; obtaining a first slope change direction of one path segment intersection point and a second slope change direction of another path segment intersection point in the adjacent two path segment intersection points; when the first slope change direction is different from the second slope change direction, the number of repeated bends of the planning path at the current path point is accumulated by 1 until all combinations of adjacent two path segment intersection points are traversed. The path heat map generation apparatus comprises a memory and a processor coupled with the memory; wherein the memory is configured to store program data, and the processor is configured to execute the program data to implement the path heat map generation method according to any one of claims 1 to 8.
9. A path heat map generation apparatus characterized by comprising: The computer storage medium is configured to store program data, and the program data, when executed by a computer, is configured to implement the path heat map generation method according to any one of claims 1 to 8. 10. A computer storage medium, characterized in that,