Loop detection method, device, electronic device and storage medium

By determining key points in the autonomous navigation device, performing neighborhood search and segmentation processing, and constructing a minimum connected graph to identify loop pairs, the problems of redundant detection, missing and wrong detection in the existing technology are solved, and the accuracy of loop detection is improved. Accuracy and efficiency, enhancing the stability and accuracy of trajectory mapping.

CN118274820BActive Publication Date: 2024-09-10NEOLIX TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410710938.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-10
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

Existing loopback detection technology has the problems of redundant detection, missed detection and wrong detection, resulting in low efficiency and insufficient accuracy in trajectory mapping of autonomous navigation equipment.

Method used

By determining the key points on the autonomous navigation trajectory, performing neighborhood search and segmentation processing, and constructing a minimum connected graph to identify loop-closing pairs, the accuracy and efficiency of loop-closing detection are improved.

Benefits of technology

It effectively reduces the detection of redundant loop pairs, improves the accuracy and mapping efficiency of loop pairs, and enhances the attitude estimation accuracy and trajectory consistency of autonomous navigation equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118274820B
    Figure CN118274820B
Patent Text Reader

Abstract

The present disclosure relates to the field of autonomous navigation technology, specifically to the field of loop detection technology, and more particularly to a loop detection method, device, electronic device and storage medium, wherein the specific implementation scheme is as follows: determining key points on an autonomous navigation trajectory; performing neighborhood search on the key points to determine a target trajectory located in the neighborhood of the key points on the autonomous navigation trajectory; segmenting the target trajectory to obtain multiple trajectory segments, and constructing a minimum connected graph of the multiple trajectory segments based on the inter-segment distances of the segment pairs in the multiple trajectory segments; determining loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory. The present disclosure converts the loop detection problem of the autonomous navigation trajectory into a graph connectivity problem, thereby improving the accuracy of loop pair detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of autonomous navigation technology, specifically to the field of loop detection technology, and more particularly to a loop detection method, device, electronic device and storage medium. Background Art

[0002] In Simultaneous Localization and Mapping (SLAM), the pose estimation of autonomous navigation devices is often a recursive process, that is, the pose of the previous frame is used to solve the pose of the current frame. The errors generated during this period will gradually accumulate to form cumulative errors. Through loop detection, we can identify the places where the autonomous navigation device has passed, and find potential loops. Using loops to optimize the trajectory backend can significantly reduce the cumulative error, improve the accuracy of the pose estimation of the autonomous navigation device, and facilitate the construction of a globally consistent trajectory and map. Summary of the invention

[0003] The present disclosure provides a loop detection method, device, electronic device and storage medium.

[0004] According to a first aspect of the present disclosure, a loop detection method is provided, the method comprising: determining a key point on an autonomous navigation trajectory; performing a neighborhood search on the key point to determine a target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory; segmenting the target trajectory to obtain a plurality of trajectory segments, and constructing a minimum connected graph of the plurality of trajectory segments based on the inter-segment distances of the segment pairs in the plurality of trajectory segments; determining loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs are used as loop detection results of the autonomous navigation trajectory.

[0005] According to a second aspect of the present disclosure, a loop detection device is provided, which includes: a first determination module, configured to determine a key point on an autonomous navigation trajectory; a second determination module, configured to perform a neighborhood search on the key point to determine a target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory; a minimum connected graph construction module, configured to segment the target trajectory to obtain multiple trajectory segments, and construct a minimum connected graph of the multiple segments based on the inter-segment distances of the multiple trajectory segments; a third determination module, configured to determine loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory.

[0006] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any implementation manner in the above-mentioned first aspect.

[0007] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method described in any implementation manner in the above-mentioned first aspect.

[0008] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the method described in any implementation manner in the above first aspect.

[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0011] Figure 1 is an exemplary system architecture diagram in which the present disclosure may be applied;

[0012] Figure 2 is a flow chart of an embodiment of a loop closure detection method according to the present disclosure;

[0013] Figure 3 is a flow chart of another embodiment of the loop closure detection method according to the present disclosure;

[0014] Figure 4 is a schematic diagram of key points on the autonomous navigation trajectory of the present disclosure;

[0015] Figure 5 is a flow chart of another embodiment of the loop detection method according to the present disclosure;

[0016] Figure 6 is a segmented schematic diagram of the target trajectory of the present disclosure;

[0017] Figure 7 is another segmented schematic diagram of the target trajectory of the present disclosure;

[0018] Figure 8 is a flow chart of another embodiment of the loop detection method according to the present disclosure;

[0019] Fig. 9 is a schematic diagram of determining the inter-segment distance of a segment pair according to the present disclosure;

[0020] Fig.10 is a flow chart of another embodiment of the loop detection method according to the present disclosure;

[0021] Fig.11is a schematic diagram of the loop detection result disclosed in the present invention;

[0022] Fig.12 is a schematic diagram of the positional relationship between the loop detection results disclosed in the present invention and the key points on the autonomous navigation trajectory;

[0023] Fig.13 is a structural schematic diagram of an embodiment of a device for loop detection method according to the present disclosure;

[0024] Fig.14 The block diagram is a block diagram of an electronic device for implementing the loop detection method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0026] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0027] Figure 1 An exemplary system architecture diagram 100 is shown to apply an embodiment of the loop closure detection method or loop closure detection apparatus of the present disclosure.

[0028] like Figure 1 As shown, the system architecture 100 may include a mobile device 101 (a moving target equipped with an autonomous navigation system, such as an autonomous vehicle, a drone, a robot, etc.), a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the mobile device 101 and the server 103. The network 102 may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The autonomous navigation system installed on the mobile device 101 may include a SLAM odometer, such as a VO odometer (visual inertial odometer), a VIO (visual inertial odometer), and a LIO (lidar odometer). The SLAM odometer is used to estimate the movement of the mobile device 101 and output the autonomous navigation trajectory of the mobile device 101.

[0029] The server 103 can provide various services. For example, the server 103 can perform loop detection on the autonomous navigation trajectory to obtain a loop detection result corresponding to the autonomous navigation trajectory.

[0030] It should be noted that the server 103 can be hardware or software. When the server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 103 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0031] It should be noted that the loop detection method provided in the embodiments of the present disclosure is generally executed by the server 103 , and accordingly, the loop detection device is generally disposed in the server 103 .

[0032] It should be understood that Figure 1 The number of mobile devices, networks and servers in the embodiment is only for illustration. Any number of mobile devices, networks and servers may be provided as required.

[0033] In the prior art, the most commonly used loop detection solution is based on descriptors, but this solution has the following shortcomings:

[0034] 1. Many redundant loop pairs will be found. For example, a problem that can be solved with only one or two loop pairs may be solved but multiple loop pairs are found. Redundant loop detection will increase the registration time and affect the efficiency of mapping.

[0035] 2. Failure to utilize spatiotemporal information results in two frames that are far away being incorrectly selected simply because of similar features, leading to incorrect constraints in the final optimization and map construction failure.

[0036] In addition, there are loop detection schemes proposed in the prior art to reduce loop detection redundancy, but the schemes have the following shortcomings: 1. It is often impossible to find the optimal loop pair, resulting in insufficient constraints for the final optimization. 2. There are situations where too many loop pairs are found or missed. These shortcomings will easily lead to ghosting, stratification and failure when building maps.

[0037] In summary, in the prior art, loop detection is prone to problems such as loop pair detection redundancy, missed detection, and wrong detection.

[0038] In view of this, the present disclosure provides a loop detection method, referring to Figure 2 , which shows a process 200 of an embodiment of a loop detection method according to the present disclosure. The loop detection method comprises the following steps:

[0039] Step 201: Determine key points on the autonomous navigation trajectory.

[0040] In this embodiment, the execution subject (for example, Figure 1The server 103 shown first obtains the autonomous navigation trajectory of the mobile device, and then performs key point sampling on the autonomous navigation trajectory to determine the key points of the autonomous navigation trajectory.

[0041] The autonomous navigation trajectory is a motion trajectory of the mobile device estimated by a SLAM odometer included in an autonomous navigation system installed on the mobile device.

[0042] As a feasible method, the above autonomous navigation system can be a single-source autonomous navigation system or a multi-source autonomous navigation system. A single-source autonomous navigation system is an autonomous navigation system that uses measurement data from one sensor as input, such as an autonomous navigation system that uses measurement data from an IMU (inertial measurement unit) as input, an autonomous navigation system that uses measurement data from a LiDAR (laser radar) as input, and an autonomous navigation system that uses RTK data as input. RTK measurement data refers to data obtained by processing measurement data from a GPS (global positioning system) or a GNSS (global navigation satellite system) using RTK technology (real-time dynamic measurement technology). A multi-source autonomous navigation system is an autonomous navigation system that uses monitoring data from multiple sensors as input, such as an autonomous navigation system with IMU+RTK, an autonomous navigation system with IMU+wheel speed meter+RTK, an autonomous navigation system with LiDAR+RTK, an autonomous navigation system with LiDAR+IMU, and an autonomous navigation system with LiDAR+IMU+RTK. There are two fusion modes for the fusion of multiple sensor monitoring data in the multi-source autonomous navigation system: tight coupling and loose coupling. Tight coupling refers to the use of iterative Kalman series filtering technology to unify the measurement data of all sensors to construct an error matrix, and estimate the motion trajectory of the mobile device by optimizing the error matrix. Loose coupling refers to the use of the measurement data of each sensor to estimate the motion trajectory of the mobile device corresponding to each sensor, and the use of Kalman filtering technology to fuse the estimated motion trajectories of all mobile devices to obtain the final motion trajectory of the mobile device.

[0043] As an implementable manner, the autonomous navigation trajectory may be a motion trajectory collected by the mobile device once, or may be a collection of motion trajectories collected by the mobile device multiple times.

[0044] Step 202: Perform neighborhood search on the key point to determine the target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory.

[0045] In this embodiment, after determining the key points on the autonomous navigation trajectory, the above-mentioned execution entity performs a neighborhood search on each key point to determine the target trajectory located in the neighborhood of each key point on the autonomous navigation trajectory, and the target trajectory is the target trajectory corresponding to each key point.

[0046] Among them, the target trajectory corresponding to each key point can be a continuous trajectory or multiple discontinuous trajectories.

[0047] Step 203: segment the target trajectory to obtain multiple trajectory segments, and construct a minimum connected graph of the multiple trajectory segments based on the inter-segment distances of the segment pairs in the multiple trajectory segments.

[0048] In this embodiment, after determining the target trajectory corresponding to each key point, the execution subject determines the minimum connected graph corresponding to each key point according to the target trajectory corresponding to each key point, specifically:

[0049] For each key point, the target trajectory corresponding to the key point is segmented to obtain multiple trajectory segments, and the multiple trajectory segments are taken as a segment pair in pairs, and the inter-segment distances of the segment pairs in the multiple trajectory segments are determined, wherein the inter-segment distances of the segment pairs are used to characterize the minimum value of the inter-point distances of all trajectory point pairs in the segment pair, and the trajectory points on one trajectory segment of the segment pair are combined with the trajectory points on the other trajectory segment in pairs to obtain all the trajectory point pairs in the segment pair; based on the inter-segment distances of the segment pairs in the multiple trajectory segments, a minimum connected graph of the multiple trajectory segments is constructed, and the minimum connected graph is the minimum connected graph corresponding to the key point.

[0050] The trajectory point pair with the smallest distance between the points in the segment pair is regarded as a loop pair selected from the segment pair. In this way, if a key point corresponds to n trajectory segments, then the key point will correspond to n(n-1) / 2 segment pairs, and there will be n(n-1) / 2 loop pairs in the neighborhood of the key point, that is, Such loop pairs will consume more time in the subsequent registration and affect the efficiency of mapping. Accordingly, the segment pairs in the n trajectory segments are represented as edges in the graph structure, and a fully connected graph containing n nodes can be constructed. The edge is used to represent the connectivity between the two segments in the segment pair, and the two nodes of the edge are used to represent the two segments in the segment pair.

[0051] In fact, some of these n(n-1) / 2 loop pairs have very limited effect on backend optimization and need to be screened out from the n(n-1) / 2 loop pairs. , and Can be composed into segment pairs , and , and their inter-segment distances are , and , Since the loop should be found from the two closest trajectory segments, the segment pair and There may be loops, segment pairs There is a high probability that there is no loop, and it is necessary to Screening. By screening loop pairs with such rules, we can finally screen out (n-1) segment pairs from n(n-1) / 2 segment pairs, and then get (n-1) loop pairs, that is, we get loop pairs of O(V) size. Correspondingly, by representing the segment pairs in the n trajectory segments as edges in the graph structure, we can construct a minimum connected graph containing n nodes. The edge is used to represent the connectivity relationship between the two segments in the segment pair, the two nodes of the edge are used to represent the two segments in the segment pair, and the weight of the edge is used to represent the distance between the segments of the segment pair.

[0052] The present invention retains (n-1) loop pairs from n(n-1) / 2 loop pairs, which is converted into the problem of retaining (n-1) edges from a fully connected graph of n nodes to obtain a minimum connected graph of n nodes, thereby improving the efficiency of screening.

[0053] Step 204: determine loop pairs contained in the neighborhood of the key point based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory.

[0054] In this embodiment, after determining the minimum connected graph corresponding to each key point, the execution subject determines the segment pairs corresponding to the node pairs connected in the minimum connected graph as the loop pairs contained in the neighborhood of the corresponding key point, and more specifically, the trajectory point pairs with the smallest distance between the segments corresponding to the node pairs connected in the minimum connected graph are determined as the loop pairs contained in the neighborhood of the corresponding key point. The summary results of the loop pairs contained in the neighborhood of all key points can be regarded as the loop detection results of the autonomous navigation trajectory.

[0055] The loop detection method provided by the embodiment of the present disclosure first determines the key points on the autonomous navigation trajectory; secondly, a neighborhood search is performed on the key points to determine the target trajectory located in the neighborhood of the key points on the autonomous navigation trajectory; then, the target trajectory is segmented to obtain multiple trajectory segments, and a minimum connected graph of the multiple trajectory segments is constructed based on the inter-segment distances of the segment pairs in the multiple trajectory segments; finally, the loop pairs contained in the neighborhood are determined based on the minimum connected graph, wherein the loop pairs are used as the loop detection results of the autonomous navigation trajectory. The present disclosure converts the loop detection problem of the autonomous navigation trajectory into a graph connectivity problem, thereby improving the accuracy of loop pair detection.

[0056] Continue to refer Figure 3 , which shows a process 300 of another embodiment of the loop detection method according to the present disclosure. The loop detection method comprises the following steps:

[0057] Step 301: determine a point cloud formed by trajectory points of an autonomous navigation trajectory.

[0058] In this embodiment, step 301 executes the execution subject (for example, Figure 1 The server 103 shown in the figure first obtains the autonomous navigation trajectory of the mobile device. The autonomous navigation trajectory is composed of a plurality of trajectory points, and each trajectory point has a corresponding timestamp, which is used to indicate the time when the mobile device reaches the trajectory point. After obtaining the autonomous navigation trajectory of the mobile device, the point cloud formed by the trajectory points of the autonomous navigation trajectory is determined.

[0059] Step 302: Divide the point cloud space where the point cloud is located into uniform voxel grids, and store the point cloud in the voxel grids.

[0060] In this embodiment, the execution subject determines the point cloud formed by the trajectory points of the autonomous navigation trajectory, and then represents the point cloud in a voxel grid.

[0061] Step 303: perform voxel thinning on the stored voxel grid to obtain a thinned point cloud, wherein the points on the thinned point cloud are used as key points on the autonomous navigation trajectory.

[0062] In this embodiment, after the execution subject represents the point cloud in a voxel grid, it performs voxel thinning on the voxel grid to obtain a thinned point cloud.

[0063] As an achievable method, the above-mentioned voxel thinning of the voxel grid to obtain the thinned point cloud includes: according to a pre-set threshold, voxel thinning of the voxel grid to obtain the thinned point cloud, and the threshold is used to determine the number of points to be retained in each sub-grid in the voxel grid after storage.

[0064] Figure 4 A schematic diagram 400 of key points on the autonomous navigation trajectory of the present disclosure is shown, wherein the black parts are the key points of the autonomous navigation trajectory.

[0065] Step 304: perform neighborhood search on the key point to determine the target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory.

[0066] In this embodiment, after determining the key points on the autonomous navigation trajectory, the execution subject performs a neighborhood search on each key point to determine the target trajectory located within the neighborhood of each key point on the autonomous navigation trajectory.

[0067] As a feasible method, the above-mentioned neighborhood search of the key point is performed to determine the target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory, including: establishing a K-dimensional tree corresponding to the autonomous navigation trajectory, where K is the dimension of the trajectory point in the autonomous navigation trajectory; determining the target trajectory point in the neighborhood of the key point from the K-dimensional tree; based on the timestamp of the target trajectory point, connecting the target trajectory points in chronological order to obtain the target trajectory.

[0068] Among them, the K-dimensional tree (kd-tree) is a data structure of spatial division. The above-mentioned execution entity predetermines the neighborhood of the key point, such as a 40m range centered on the key point, and then represents the autonomous navigation trajectory as a K-dimensional tree. The K-dimensional tree is searched for the range of the key point neighborhood to determine the trajectory points on the autonomous navigation trajectory that are within the neighborhood of the key point, and these trajectory points are connected in chronological order to obtain the target trajectory.

[0069] Step 305: segment the target trajectory to obtain multiple trajectory segments, and construct a minimum connected graph of the multiple trajectory segments based on the inter-segment distances of the segment pairs in the multiple trajectory segments.

[0070] Step 306: determine loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory.

[0071] In this embodiment, the specific operations of step 305 to step 306 are already described in Figure 2 In the illustrated embodiment, steps 203 to 204 are described in detail and will not be repeated here.

[0072] The loop closure detection method provided by the embodiment of the present disclosure determines the key points on the autonomous navigation trajectory and the target trajectory of the autonomous navigation trajectory within the neighborhood of the key points, thereby converting the loop closure detection of the autonomous navigation trajectory into the loop closure detection of the target trajectory within the neighborhood of multiple key points, thereby improving the loop closure detection efficiency of the autonomous navigation trajectory.

[0073] Continue to refer Figure 5 , which shows a process 500 of another embodiment of the loop detection method according to the present disclosure. The loop detection method comprises the following steps:

[0074] Step 501: Determine key points on the autonomous navigation trajectory.

[0075] In this embodiment, the specific operations of step 501, step 502, step 504 and step 505 are already described in Figure 2 In the illustrated embodiment, steps 201 to 204 are described in detail and will not be repeated here.

[0076] Step 502: Perform neighborhood search on the key point to determine the target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory.

[0077] Step 503: Segment the target trajectory according to the timestamps of the trajectory points and / or the accumulated turning angles to obtain a plurality of trajectory segments.

[0078] In this embodiment, after determining the target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory, the execution subject segments the target trajectory according to the timestamps and / or accumulated turning angles of the trajectory points to obtain a plurality of trajectory segments.

[0079] As an implementable method, the target trajectory is segmented according to the timestamps of the trajectory points, including: calculating the timestamp difference between adjacent trajectory points on the target trajectory; and segmenting the target trajectory using the middle position of the adjacent trajectory points whose timestamp difference is greater than a preset time threshold as a breakpoint.

[0080] Figure 6 A segmentation schematic diagram 600 of the target trajectory is shown, wherein the black part indicated by the arrow in the red circle is the key point, the inside of the red circle is the neighborhood of the key point, and the target trajectory is segmented using the middle position of adjacent trajectory points whose timestamp difference is greater than a preset time threshold as the breakpoint, thereby obtaining two continuous trajectory segments.

[0081] As an achievable manner, the target trajectory is segmented according to the cumulative turning angles of the trajectory points, including: segmenting the target trajectory using trajectory points whose cumulative turning angles are greater than a preset angle as breakpoints.

[0082] Among them, a yaw angle odometer is set in the autonomous navigation system to determine the cumulative turning angle of the trajectory point in real time.

[0083] Figure 7 Another segmentation schematic diagram 700 of the target trajectory is shown, in which the black part indicated by the arrow in the red circle is the key point, the inside of the red circle is the neighborhood of the key point, and the neighborhood of the key point includes a continuous yellow trajectory and a continuous green trajectory. The green trajectory cannot be segmented according to the disconnection of the timestamp. At this time, the target trajectory is segmented with the trajectory points where the cumulative turning angle is greater than the preset angle as the breakpoints. For example, the preset angle is set to 60°, and the trajectory is interrupted every time the cumulative turning angle is greater than 60 degrees, so that the green trajectory is divided into three sections, before entering the curve, during the curve, and after exiting the curve (accumulated 180 degrees).

[0084] Step 504: construct a minimum connected graph of the plurality of trajectory segments based on the inter-segment distances of the segment pairs in the plurality of trajectory segments.

[0085] Step 505: determine loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory.

[0086] The loop detection method provided in the embodiment of the present disclosure adds turning detection and uses the yaw angle odometer to interrupt the continuous trajectory of the U-turn, thereby solving the loop detection problem when turning.

[0087] Continue to refer Figure 8 , which shows a process 800 of another embodiment of the loop detection method according to the present disclosure. The loop detection method includes the following steps:

[0088] Step 801: Determine key points on the autonomous navigation trajectory.

[0089] In this embodiment, the specific operations of step 801 to step 802 and step 805 to step 806 are already described in Figure 5 In the illustrated embodiment, steps 501 to 505 are described in detail and will not be repeated here.

[0090] Step 802: Perform neighborhood search on the key point to determine the target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory.

[0091] Step 803: Segment the target trajectory according to the timestamps of the trajectory points and / or the accumulated turning angles to obtain a plurality of trajectory segments.

[0092] Step 804: Determine the distances between pairs of segments in the plurality of trajectory segments.

[0093] In this embodiment, after determining the trajectory segments, the execution subject determines the distances between segment pairs in the plurality of trajectory segments.

[0094] As an implementable manner, the above-mentioned segment pair includes a first trajectory segment and a second trajectory segment, and the above-mentioned determination of the inter-segment distance of the segment pair in the multiple trajectory segments includes: determining a trajectory point pair set consisting of a trajectory point on the first trajectory segment and a trajectory point on the second trajectory segment; calculating the inter-point distance of the trajectory point pair in the trajectory point pair set; and determining the minimum value of the inter-point distance as the inter-segment distance of the trajectory segment.

[0095] Further, as an implementable manner, the above-mentioned trajectory point pair includes a first trajectory point and a second trajectory point; the above-mentioned calculation of the point-to-point distance of the trajectory point pair in the trajectory point pair set includes: determining the distance between the first trajectory point and the second trajectory point according to the distance formula between two points; taking the sum of the distance between the first trajectory point and the second trajectory point and the distance from the first trajectory point to the key point as the first distance; taking the sum of the distance between the first trajectory point and the second trajectory point and the distance from the second trajectory point to the key point as the second distance; and determining the minimum value of the first distance and the second distance as the point-to-point distance of the trajectory point pair.

[0096] Fig. 9 A schematic diagram 900 is shown of a method for determining the distance between points of a trajectory point pair, wherein the points and Point There are two key points, The circle with the center at point The neighborhood of The circle with the center at point The neighborhood of , (e,f) and (g,h) are segment pairs and The trajectory point pair with the smallest distance between midpoints, (c, d) and (a, b) are segmented pairs The distances of trajectory point pairs (c, d), (a, b), (e, f) and (g, h) on the , , and .

[0097] As can be seen from the figure, , if only the distance between two points is considered when calculating the distance between trajectory point pairs, two problems will be introduced:

[0098] First, point Neighborhood and point The neighborhood of will choose (c, d) as the segment pair The pair of trajectory points with the smallest distance between them.

[0099] Second, in Sampling at any point cannot guarantee that (a,b) will be adopted as a loop closure pair, and loop closure detection at other sampling points is even less likely to be detected. However, although (a,b) is slightly longer, it is necessary because (a,b) is closer to (e,f) and (g,h) than (c,d). Using (a,b) together with (e,f) and (g,h) for loop closure optimization can bring better results. Figure 1 Consistency.

[0100] This disclosure introduces a key point distance factor, that is, the distance from point a to point b in the trajectory point pair (a, b) is set to , is point a and The distance between the two points between them can be calculated from this, and the distance between point a and point b and the distance between point b and point a in the trajectory point pair (a, b) can be calculated. The minimum value is selected as the point distance between the trajectory point pair (a, b). The segment pairs can be selected by the track point pairs on This allows each segment pair to select a good loopback pair near its key point, rather than always adopting short loopback pairs, or even repeating them, while slightly longer but necessary loopback pairs are never selected.

[0101] Step 805: construct a minimum connected graph of the plurality of trajectory segments based on the inter-segment distances of the segment pairs in the plurality of trajectory segments.

[0102] Step 806: determine loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory.

[0103] The loop detection method provided by the embodiment of the present disclosure increases the key point distance factor, solves the problem of finding similar loops at different key point positions, and achieves a balance between optimal and nearest loop pair search.

[0104] Continue to refer Fig.10 , which shows a process 1000 of another embodiment of a loop detection method according to the present disclosure. The loop detection method comprises the following steps:

[0105] Step 1001: Determine key points on the autonomous navigation trajectory.

[0106] In this embodiment, the specific operations of steps 1001 to 1004 and step 1007 are already described in Figure 8 In the illustrated embodiment, steps 801 to 804 and step 805 are described in detail and will not be repeated here.

[0107] Step 1002: Perform neighborhood search on the key point to determine the target trajectory located in the neighborhood of the key point on the autonomous navigation trajectory.

[0108] Step 1003: segment the target trajectory according to the timestamps of the trajectory points and / or the accumulated turning angles to obtain a plurality of trajectory segments.

[0109] Step 1004: Determine the distances between pairs of segments in the plurality of trajectory segments.

[0110] Step 1005: Represent the segment pairs in the multiple trajectory segments as edges in a graph structure to obtain a corresponding edge set, wherein the edge is used to represent the connectivity between the two segments in the segment pair, the two nodes of the edge are used to represent the two segments in the segment pair, and the weight of the edge is used to represent the distance between the segments of the segment pair.

[0111] In this embodiment, after determining the inter-segment distance of the segment pairs in the multiple trajectory segments, the above-mentioned execution entity represents each segment pair as an edge, the two segments of the segment pair are regarded as the two nodes (endpoints) of the edge, and the inter-segment distance of the segment pair is regarded as the weight of the edge. The edge is used to represent that the two segments corresponding to the two nodes on it have a connected relationship.

[0112] Step 1006: With the goal of minimizing the sum of edge weights in the graph structure, construct a minimum connected graph of multiple trajectory segments, wherein the minimum connected graph includes all nodes in the edge set, and the nodes have direct or indirect connected relationships.

[0113] In this embodiment, after obtaining the edge set, the execution subject constructs a minimum connected graph of multiple trajectory segments with the goal of minimizing the sum of edge weights.

[0114] As an achievable method, the above method aims to minimize the sum of the weights of the edges in the graph structure and construct a minimum connected graph of multiple trajectory segments, including:

[0115] Sort the edges in the edge set in order of edge weight from small to large to obtain an edge sequence;

[0116] Based on the edge sequence, the minimum connected graph of multiple trajectory segments is constructed using union-find.

[0117] The above method of constructing the minimum connected graph of multiple trajectory segments based on edge sequence by using union-find set includes:

[0118] S1: Initialize edge K=1, and the number of union-find sets contained in the union-find set is 0, where edge K indicates the edge with sequence number K in the edge sequence.

[0119] S2: Based on the edge K and the number of common nodes of each union-find set in the union-find set set, the union-find sets in the union-find set set are updated, and it is determined whether there is a union-find set in the updated union-find set set that meets the preset condition. The preset condition is that all nodes involved in the edge sequence are included, and all nodes have a direct or indirect connectivity relationship.

[0120] As an implementable method, the above execution entity can encode all nodes involved in the edge sequence, for example Encoded as , converted to binary form, it can be expressed as , through the binary encoding of the nodes, determine the nodes that edge K has in common with each union-find set in the union-find set.

[0121] S3: In response to existence, determine the union-find set as the minimum connected graph of multiple trajectory segments; in response to non-existence, set K=K+1 and re-execute S2.

[0122] The above execution subject introduces a union-find set to store the connectivity state of the graph, and traverses the edges in the edge sequence in sequence. When adding an edge to the union-find set can increase the connectivity of the graph, the edge is added to the union-find set in the union-find set, and the union-find sets in the union-find set are merged; when adding an edge to the union-find set cannot increase the connectivity of the graph, it is skipped; the above operation is repeated until there is a union-find set in the union-find set that meets the preset conditions.

[0123] As an implementable method, the above updating of the union-find set in the union-find set based on the edge K and the number of common nodes of each union-find set in the union-find set set includes:

[0124] In response to the presence of a union-find set in the union-find set set that has two common nodes with edge K, the union-find set in the union-find set set is not updated;

[0125] In response to the presence of a union-find set having one common node with edge K in the union-find set set, a first constructed union-find set is selected from the union-find sets having one common node with edge K and recorded as a target union-find set;

[0126] Add edge K to the target and search the set by merging common nodes;

[0127] In response to determining that there is a union-find set in the union-find set that has a common node with the edge K in the target union-find set, merging the determined union-find set into the target union-find set in a manner of merging the common nodes;

[0128] In response to the absence of a union-find set having a common node with the edge K in the union-find set set, an empty union-find set is constructed in the union-find set set, and the edge K is added to the empty union-find set.

[0129] As an implementable method, the above-mentioned execution subject can number each union-find set in the union-find set set according to the order of union-find set construction, so that when selecting the first constructed union-find set from the union-find sets that have one common node with edge K, the union-find set with the smallest number can be selected. Accordingly, after the determined union-find sets are merged into the target union-find set in a common node merging manner, the numbers of the union-find sets in the union-find set set are updated. For example, among union-find sets 1, 2, 3, and 4, after union-find set 3 is merged into union-find set 2, union-find sets 1, 2, and 4 remain, and the numbers of union-find sets 1, 2, and 4 are updated to 1, 2, and 3.

[0130] Step 1007: determine loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory.

[0131] Fig.11 A schematic diagram 1100 showing loop closure detection results; Fig.12 A schematic diagram 1200 is shown showing the positional relationship between loop detection results and key points on autonomous navigation trajectories. In the figure, black dots represent key points, green dot pairs represent loop pairs in loop detection results, and black and green intersecting points represent points in loop pairs that overlap with key points. It can be seen from these two figures that loop pairs are relatively close point pairs between opposite trajectories, and the loop pairs are close enough to the key points, that is, loop detection is performed on the trajectory near the sampling point.

[0132] After the above-mentioned execution entity determines the loop detection result of the autonomous navigation trajectory, in response to the loop detection result being used for global detection or the loop detection result being used for local detection and the collection vehicle combined navigation output result is not of high quality, the loop detection result is used for optimization; in response to the loop detection result being used for local detection and the collection vehicle combined navigation output result is of relatively high quality, the loop pairs in the loop detection result are layered detected, and only loop optimization is performed at the layered positions of the loop pairs to improve mapping efficiency.

[0133] Among them, as a feasible method, the loop pairs in the loop detection results are layered detected, including: taking the two trajectory points of the loop pair and the single-frame point cloud of the trajectory pair within a preset distance (for example, 10m) before and after to produce a sub-image, using the cloth algorithm to extract the ground respectively, and converting both sub-images to a coordinate system with one of them as the origin, cutting out the ground point cloud (from the current sub-image ground and the opposite sub-image ground) with the two trajectory points as the center and the radius of 1m, and averaging the heights of the two ground point clouds and making the difference. When the ground height difference is greater than the preset height (for example, 5cm), it is considered that the point cloud is layered.

[0134] As a feasible method, in response to the loop detection results being used for local detection and the combined navigation output results of the acquisition vehicle being of relatively high quality, after the loop pairs in the loop detection results are layered detected, it is also possible to: perform global loop optimization, but increase the prior weights for the non-layered parts of the loop pairs so that the influence of the loop factor on other neighborhoods is limited to a fixed distance, so as to improve the mapping accuracy.

[0135] The loop detection method provided by the embodiment of the present disclosure uses a union-find algorithm to establish a minimum connected graph of multiple trajectory segments, thereby improving the efficiency of constructing the minimum connected graph.

[0136] Further references Fig.13 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a loop detection device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0137] like Fig.13 As shown, the loop detection device 1300 of this embodiment may include a first determination module 1301, a second determination module 1302, a minimum connected graph construction module 1303 and a third determination module 1304, wherein the first determination module 1301 is configured to determine the key points on the autonomous navigation trajectory; the second determination module 1302 is configured to perform a neighborhood search on the key points to determine the target trajectory located in the neighborhood of the key points on the autonomous navigation trajectory; the minimum connected graph construction module 1303 is configured to segment the target trajectory to obtain multiple trajectory segments, and construct a minimum connected graph of the multiple segments based on the inter-segment distances of the multiple trajectory segments; the third determination module 1304 is configured to determine the loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs are used as the loop detection results of the autonomous navigation trajectory.

[0138] In this embodiment, the specific processing of the first determination module 1301, the second determination module 1302, the minimum connected graph construction module 1303 and the third determination module 1304 in the loop detection device 1300 and the technical effects thereof can be referred to respectively. Figure 2 The relevant descriptions of steps 201 - 204 in the corresponding embodiment are not repeated here.

[0139] In some optional implementations of the present embodiment, the above-mentioned first determination module 1301 includes: a first determination unit, configured to determine the point cloud formed by the trajectory points of the autonomous navigation trajectory; a voxel division unit, configured to divide the point cloud space where the point cloud is located into a uniform voxel grid, and store the point cloud in the voxel grid; a voxel thinning unit, configured to perform voxel thinning on the stored voxel grid to obtain a thinned point cloud, wherein the points on the thinned point cloud serve as key points on the autonomous navigation trajectory.

[0140] In some optional implementations of the present embodiment, the above-mentioned second determination module 1302 includes: a K-dimensional tree establishment unit, configured to establish a K-dimensional tree corresponding to the autonomous navigation trajectory, wherein K is the dimension of the trajectory point in the autonomous navigation trajectory; a second determination unit, configured to determine the target trajectory point within the neighborhood of the key point from the K-dimensional tree; a target trajectory generation unit, configured to concatenate the target trajectory points in chronological order based on the timestamp of the target trajectory point to obtain the target trajectory.

[0141] In some optional implementations of this embodiment, the above-mentioned minimum connected graph construction module 1303 includes: a first calculation unit, configured to calculate the timestamp difference between adjacent trajectory points on the target trajectory; a first segmentation unit, configured to segment the target trajectory using the middle position of the adjacent trajectory points whose timestamp difference is greater than a preset time threshold as a breakpoint.

[0142] In some optional implementations of the present embodiment, the above-mentioned minimum connected graph construction module 1303 further includes: a third determination unit, configured to determine the cumulative turning angles of trajectory points on the target trajectory; and a second segmentation unit, configured to segment the target trajectory using trajectory points whose cumulative turning angles are greater than a preset angle as breakpoints.

[0143] In some optional implementations of this embodiment, the segment pair includes a first trajectory segment and a second trajectory segment, and the above-mentioned device also includes: determining a trajectory point pair set consisting of trajectory points on the first trajectory segment and trajectory points on the second trajectory segment; calculating the point-to-point distances of the trajectory point pairs in the trajectory point pair set; and determining the minimum value of the point-to-point distances as the segment-to-segment distance of the trajectory segment.

[0144] In some optional implementations of the present embodiment, the trajectory point pair includes a first trajectory point and a second trajectory point; the above-mentioned calculation of the inter-point distance of the trajectory point pair in the trajectory point pair set includes: determining the distance between the first trajectory point and the second trajectory point according to the distance formula between two points; taking the sum of the distance between the first trajectory point and the second trajectory point and the distance from the first trajectory point to the key point as the first distance; taking the sum of the distance between the first trajectory point and the second trajectory point and the distance from the second trajectory point to the key point as the second distance; and determining the minimum value of the first distance and the second distance as the inter-point distance of the trajectory point pair.

[0145] In some optional implementations of this embodiment, the above-mentioned minimum connected graph construction module 1303 further includes: an edge set determination unit, configured to represent the segment pairs in the multiple trajectory segments as edges in the graph structure, and obtain a corresponding edge set, wherein the edge is used to characterize the connectivity relationship between the two segments in the segment pair, the two nodes of the edge are used to characterize the two segments in the segment pair, and the weight of the edge is used to characterize the distance between the segments of the segment pair; a minimum connected graph construction unit, configured to construct a minimum connected graph of the multiple trajectory segments with the goal of minimizing the sum of the weights of all edges in the graph structure, wherein the minimum connected graph contains all nodes in the edge set, and all nodes have a direct or indirect connectivity relationship.

[0146] In some optional implementations of this embodiment, the third determination module 1303 includes: a fourth determination unit configured to determine the segment pairs corresponding to the node pairs connected in the minimum connected graph as the loop pairs included in the neighborhood.

[0147] like Fig.14 As shown, the device 1400 includes a computing unit 1401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1402 or a computer program loaded from a storage unit 1408 into a random access memory (RAM) 1403. In the RAM 1403, various programs and data required for the operation of the device 1400 can also be stored. The computing unit 1401, the ROM 1402, and the RAM 1403 are connected to each other via a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.

[0148] A number of components in the device 1400 are connected to the I / O interface 1405, including: an input unit 1406, such as a keyboard, a mouse, etc.; an output unit 1407, such as various types of displays, speakers, etc.; a storage unit 1408, such as a disk, an optical disk, etc.; and a communication unit 1409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1409 allows the device 1400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0149] The computing unit 1401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1401 performs the various methods and processes described above, such as the loop detection method. For example, in some embodiments, the loop detection method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1400 via the ROM 1402 and / or the communication unit 1409. When the computer program is loaded into the RAM 1403 and executed by the computing unit 1401, one or more steps of the loop detection method described above may be performed. Alternatively, in other embodiments, the computing unit 1401 may be configured to perform the loop detection method in any other appropriate manner (eg, by means of firmware).

[0150] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0151] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0152] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0153] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0154] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0155] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0156] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0157] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0158] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A loop detection method, characterized in that: include: Determine key points on the autonomous navigation trajectory; Performing a neighborhood search on the key point to determine a target trajectory on the autonomous navigation trajectory that is within the neighborhood of the key point; Segmenting the target trajectory to obtain a plurality of trajectory segments; Representing the segment pairs in the plurality of trajectory segments as edges in a graph structure to obtain a corresponding edge set, wherein the edge is used to represent the connectivity relationship between the two segments in the segment pair, the two nodes of the edge are used to represent the two segments in the segment pair, and the weight of the edge is used to represent the distance between the segments of the segment pair; With the goal of minimizing the sum of weights of all edges in the graph structure, constructing a minimum connected graph of the plurality of trajectory segments, wherein the minimum connected graph includes all nodes in the edge set, and all nodes have a direct or indirect connected relationship; Loop pairs contained in the neighborhood are determined based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory.

2. The method according to claim 1, characterized in that The step of determining the key points on the autonomous navigation trajectory includes: Determining a point cloud formed by trajectory points of the autonomous navigation trajectory; Dividing the point cloud space where the point cloud is located into a uniform voxel grid, and storing the point cloud in the voxel grid; The stored voxel grid is subjected to voxel thinning to obtain a thinned point cloud, wherein the points on the thinned point cloud serve as key points on the autonomous navigation trajectory.

3. The method according to claim 1, characterized in that The performing a neighborhood search on the key point to determine a target trajectory where the autonomous navigation trajectory is located in the neighborhood of the key point includes: Establishing a K-dimensional tree corresponding to the autonomous navigation trajectory, wherein K is the dimension of the trajectory points in the autonomous navigation trajectory; Determine a target trajectory point within a neighborhood of the key point from the K-dimensional tree; Based on the timestamps of the target trajectory points, the target trajectory points are connected in series in time sequence to obtain the target trajectory.

4. The method according to claim 1, characterized in that: The segmenting of the target trajectory comprises: Calculating the timestamp difference of adjacent track points on the target track; The target trajectory is segmented by taking the middle positions of adjacent trajectory points whose timestamp differences are greater than a preset time threshold as breakpoints.

5. The method according to claim 4, characterized in that The segmenting of the target trajectory further comprises: Determining the cumulative turning angles of trajectory points on the target trajectory; The target trajectory is segmented by taking the trajectory points where the cumulative steering angle is greater than the preset angle as breakpoints.

6. The method according to claim 1, characterized in that The segment pair includes a first trajectory segment and a second trajectory segment, and the method further includes: Determine a set of trajectory point pairs consisting of trajectory points on the first trajectory segment and trajectory points on the second trajectory segment; Calculating the distances between the trajectory point pairs in the trajectory point pair set; The minimum value among the distances between the points is determined as the distance between the segments of the trajectory.

7. The method according to claim 6, characterized in that The trajectory point pair includes a first trajectory point and a second trajectory point; The calculating the distances between the trajectory point pairs in the trajectory point pair set includes: Determine the distance between the first trajectory point and the second trajectory point according to a distance formula between two points; Taking the sum of the distance between the first trajectory point and the second trajectory point and the distance from the first trajectory point to the key point as the first distance; Taking the sum of the distance between the first trajectory point and the second trajectory point and the distance from the second trajectory point to the key point as the second distance; The minimum value between the first distance and the second distance is determined as the distance between the track point pairs.

8. The method according to claim 1, characterized in that The step of determining the loop pairs contained in the neighborhood based on the minimum connected graph includes: The segment pairs corresponding to the node pairs connected in the minimum connected graph are determined as the loop pairs included in the neighborhood.

9. A loop detection device, characterized in that: include: A first determination module is configured to determine key points on the autonomous navigation trajectory; A second determination module is configured to perform a neighborhood search on the key point to determine a target trajectory on the autonomous navigation trajectory that is within the neighborhood of the key point; A minimum connected graph construction module is configured to segment the target trajectory to obtain multiple trajectory segments; represent the segment pairs in the multiple trajectory segments as edges in a graph structure to obtain a corresponding edge set, wherein the edge is used to represent the connectivity relationship between the two segments in the segment pair, the two nodes of the edge are used to represent the two segments in the segment pair, and the weight of the edge is used to represent the distance between the segments of the segment pair; with the goal of minimizing the sum of the weights of all edges in the graph structure, construct a minimum connected graph of the multiple trajectory segments, wherein the minimum connected graph contains all nodes in the edge set, and all nodes have a direct or indirect connectivity relationship; The third determination module is configured to determine the loop pairs contained in the neighborhood based on the minimum connected graph, wherein the loop pairs serve as loop detection results of the autonomous navigation trajectory.

10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.