Inspection path planning method and device, electronic equipment and storage medium
By combining and merging candidate paths with partitions in inspection path planning, the shortcomings of multi-address path planning in the existing technology are solved, and efficient path planning for a large number of merchant addresses is realized, and time loss is reduced.
Patent Information
- Application Number
- CN202411743579.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-02-28
AI Technical Summary
The existing technology has obvious shortcomings in multi-address path planning, which cannot meet the path planning needs of a large number of merchant addresses in a short period of time during inspection tasks.
By determining the candidate path set based on the inspection location set, the original path set and the preset correlation threshold, combining and merging with partitions, the target candidate path set is generated to determine the result path that meets the conditions.
Further reduce path correlation analysis to a lower level path collection level, reduce the time loss caused by repeated paths and selected paths, and improve the efficiency and accuracy of path planning.
Smart Images

Figure CN119533515A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an inspection path planning method, device, electronic equipment and storage medium. Background Art
[0002] With the development of economy, the number of offline merchants of enterprises is increasing. In order to better manage offline merchants, it is necessary to conduct regular offline inspections of offline merchants from time to time. Regular offline inspections require inspectors to regularly conduct offline field inspections of registered merchants in their management areas. In a short period of time, inspectors have to travel back and forth between a large number of merchant addresses, which consumes a lot of time, money and other resources on the road.
[0003] In view of the above situation, effective inspection route planning is particularly important. The inventors have found that the existing path-finding algorithms are relatively mature in the analysis of path planning with a specified starting point and end point, that is, path planning based on two path points. However, most algorithms and systems have some obvious shortcomings in multi-address path planning, and cannot well meet the path planning needs of a large number of merchant addresses in a short period of time in the inspection task. Summary of the invention
[0004] In this regard, the present application provides a patrol route planning method, device, electronic device and storage medium to solve the problem that existing solutions have obvious shortcomings in multi-address route planning and cannot meet the route planning needs of a large number of merchant addresses in a short period of time during patrol tasks.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] The first aspect of the present application discloses a patrol route planning method, comprising:
[0007] Determine a candidate path set according to a set of inspection locations, an original path set and a preset correlation threshold, wherein the set of inspection locations includes at least one inspection location, the original path set includes all paths leading to each inspection location in the set of inspection locations, and the candidate path set includes a plurality of candidate tuples;
[0008] Grouping and merging each of the candidate tuples in the candidate path set to obtain a candidate path group set, wherein the candidate path group set includes a plurality of group-level candidate tuples;
[0009] According to the preset maximum number of combinations, each of the group-level candidate tuples in the candidate path group set is partitioned and merged to obtain a target candidate path set, so as to determine a qualified result path based on the target candidate path set, and the target candidate path set includes several high-level candidate tuples and / or several group-level candidate tuples.
[0010] Optionally, in the above inspection path planning method, determining the candidate path set according to the inspection location set, the original path set and the preset correlation threshold includes:
[0011] Performing an extended search based on the original path set with each of the inspection locations in the inspection location set as an extended center point;
[0012] The paths whose overall relevance upper bounds obtained through the extended search are smaller than the preset relevance threshold are taken as candidate paths to generate the candidate path set.
[0013] Optionally, in the above inspection path planning method, each of the candidate tuples in the candidate path set is grouped and merged to obtain a candidate path group set including:
[0014] According to the paths of the candidate tuples in the candidate path set, the candidate tuples with the same paths are merged to obtain a plurality of candidate group level tuples;
[0015] The candidate group level tuples are screened according to the relationship between the upper bound of the relevance of each candidate group level tuple and the preset relevance threshold to obtain the candidate path group set.
[0016] Optionally, in the above inspection path planning method, the candidate group level tuples are screened according to the relationship between the upper bound of the correlation degree of each candidate group level tuple and the preset correlation degree threshold, and the candidate path group set is obtained, including:
[0017] Determine the upper bound of the relevance of each of the candidate group level tuples;
[0018] According to the relationship between the upper bound of the relevance of each of the candidate group level tuples and the preset relevance threshold, selecting the candidate group level tuples that meet the requirements from all the candidate group level tuples;
[0019] The candidate group-level tuples that meet the requirements are used as the group-level candidate tuples in the candidate path group set to obtain the candidate path group set.
[0020] Optionally, in the above inspection path planning method, each of the group-level candidate tuples in the candidate path group set is partitioned and merged according to a preset maximum number of combinations, and the target candidate path set is obtained, including:
[0021] The preset maximum number of combinations is used as the upper limit of the number of partitions;
[0022] Partitioning each of the group-level candidate tuples in the candidate path group set layer by layer until the number of partitions reaches the preset maximum number of combinations, or there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than a preset correlation threshold value, thereby obtaining a partition subset corresponding to each layer;
[0023] Starting from the bottom layer, the partitions corresponding to each layer are merged layer by layer to obtain the target candidate path set.
[0024] Optionally, in the above inspection path planning method, merging the partitions corresponding to each layer layer by layer starting from the bottom layer includes:
[0025] For each layer of partition subset, determine a group-level candidate tuple pair in the candidate path group set that meets the partition merging condition, where two of the group-level candidate tuples in the group-level candidate tuple pair have path intersections and there is no path conflict;
[0026] The group-level candidate tuple pairs are merged respectively.
[0027] The second aspect of the present application discloses a patrol route planning device, comprising:
[0028] A determination unit, configured to determine a candidate path set according to a set of inspection locations, an original path set and a preset correlation threshold, wherein the set of inspection locations includes at least one inspection location, the original path set includes all paths leading to each inspection location in the set of inspection locations, and the candidate path set includes a plurality of candidate tuples;
[0029] A grouping and merging unit, configured to group and merge each of the candidate tuples in the candidate path set to obtain a candidate path group set, wherein the candidate path group set includes a plurality of group-level candidate tuples;
[0030] A partition merging unit is used to partition and merge each of the group-level candidate tuples in the candidate path group set according to a preset maximum number of combinations to obtain a target candidate path set, so as to determine a qualified result path according to the target candidate path set, and the target candidate path set includes several high-level candidate tuples and / or several group-level candidate tuples.
[0031] Optionally, in the above inspection path planning device, the determining unit includes:
[0032] An extended search unit, configured to perform an extended search based on the original path set with each of the inspection locations in the inspection location set as an extended center point;
[0033] The set generating unit is used to take the paths corresponding to the paths whose overall relevance upper bound of the paths obtained through the extended search is less than the preset relevance threshold as candidate paths, and generate the candidate path set.
[0034] The third aspect of the present application discloses an electronic device, including: a memory and a processor;
[0035] Wherein, the memory is used to store computer programs;
[0036] The processor is used to execute the computer program, specifically to implement the inspection path planning method as described in any one of the items disclosed in the first aspect.
[0037] The fourth aspect of the present application discloses a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the inspection path planning method as described in any one of the items disclosed in the first aspect.
[0038] The present invention provides an inspection path planning method, comprising: determining a candidate path set according to an inspection location set, an original path set and a preset correlation threshold, the inspection location set including at least one inspection location, the original path set including all paths leading to each inspection location in the inspection location set, and the candidate path set including a plurality of candidate tuples; grouping and merging each candidate tuple in the candidate path set to obtain a candidate path group set, the candidate path group set including a plurality of group-level candidate tuples; partitioning and merging each group-level candidate tuple in the candidate path group set according to a preset maximum number of combinations to obtain a target candidate path set, so as to determine a qualified result path according to the target candidate path set, the target candidate path set including a plurality of high-level candidate tuples and / or a plurality of group-level candidate tuples, which can further reduce the path correlation analysis to a lower-level path set level, and the obtained result path can greatly reduce the time loss caused by repeated paths and path selection, thereby solving the problem that the existing solutions have obvious shortcomings in multi-address path planning and cannot meet the path planning requirements of a large number of merchant addresses in a short time of the inspection task. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0040] Figure 1 A flowchart of an inspection path planning method provided in this application;
[0041] Figure 2 A flow chart for determining a candidate path set provided in an embodiment of the present application;
[0042] Figure 3 A flow chart for determining a candidate path group set provided in an embodiment of the present application;
[0043] Figure 4 A flow chart for determining a target candidate path set provided in an embodiment of the present application;
[0044] Figure 5 An algorithm flow chart of an inspection path planning method provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of the structure of an inspection path planning device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] The Top-k query algorithm returns the top k results that best meet user needs from massive data, and can avoid scoring most irrelevant documents and data during execution.
[0048] The divide and conquer algorithm decomposes a large-scale problem into multiple smaller sub-problems. These sub-problems are independent of each other and have the same nature as the original problem. By solving the sub-problems, the solution to the original problem can be found.
[0049] First of all, most existing systems and research use the Top-k query algorithm to implement multi-address path planning. The most typical application of the Top-k query algorithm is the page search algorithm in the browser, which selects the top k web pages that meet the requirements for users to browse based on the user's input request. The advantage of the Top-k query algorithm is that it can save a lot of irrelevant documents and pages from scoring and sorting, significantly improving the efficiency of page search.
[0050] The same principle can also be applied to the sorting of existing paths to achieve the top-k path results that meet the path point search requirements. This method is relatively high and accurate in searching for simple paths with a given starting point and end point. Currently, a path planning solution that uses the Top-k query algorithm combined with the divide-and-conquer algorithm is as follows:
[0051] Assume that there are 1 million paths within the required area, and the 10 best paths need to be found. Then:
[0052] Step 1: Divide 1 million data into 1,000 parts, each with 1,000 data points.
[0053] Step 2: Calculate the correlation of the query path points to obtain the best 10 paths in each piece of data, and merge the best 10 paths in each piece of data to obtain 10,000 candidate paths, so that 99% of the path data can be filtered out.
[0054] Step 3: Use quick sort to sort the 10,000 candidate paths. After sorting, the position of the cardinality S will divide all candidate paths into two parts Si and Sj. The correlation of the candidate paths in Si is less than S, and the correlation of the candidate paths in Sj is greater than S.
[0055] Step 4: If the number of elements in Si is greater than 10, the array of Si can be sorted again and divided into Sii and Sij; if the number of elements in Si is less than 10, Sj needs to be sorted to find the first 10-count(Si) elements and merge them with Si. This recursive process can get the best 10 paths.
[0056] The inventors have found that although the above-mentioned path planning scheme improves the search efficiency, the path planning result does not include the problem of the optimal path and is not stable enough; moreover, the range search method and path screening of similar locations often result in the acquired path not actually passing through most of the path points, but having a certain distance from these path points. The planned path will cause the patrol personnel to still consider the path from the main route to the target merchant during the work process; in addition, the distance between the path and the actual merchant address will inevitably cause the patrol personnel to pass through a large number of repeated paths.
[0057] Based on the above, the embodiments of the present application provide a patrol path planning method, device, electronic device and storage medium to solve the problem that the existing solutions have obvious shortcomings in multi-address path planning and cannot meet the path planning needs of a large number of merchant addresses in a short period of time during the patrol task. At the same time, it also solves the problem that the path planning results do not contain the optimal path, the stability is insufficient, and the patrol personnel still have to consider the path from the main route to the target merchant and the distance between the path and the actual merchant address during the work process, which will inevitably cause the patrol personnel to pass through a large number of repeated paths.
[0058] First, clarify the following definitions:
[0059] Path: It is defined as a sequence of path points. The traversal direction of the sequence from left to right is the path direction. A path consists of at least two sub-path vectors.
[0060] Subpath: It is defined as a path segment between two path points in a path sequence. These two path points are defined as the starting point and the end point of the subpath respectively.
[0061] Conflicting subpaths: Two subpaths with a common endpoint, where the common endpoint is the common starting point or end point of the two paths, are conflicting paths. Otherwise, there is no conflict between the two subpaths.
[0062] See also Figure 1 , the inspection path planning method mainly includes the following steps:
[0063] S101. Determine a candidate path set according to an inspection location set, an original path set, and a preset correlation threshold.
[0064] The inspection location set includes at least one inspection location, and each inspection location corresponds to a merchant address; the original path set includes all paths leading to each inspection location in the inspection location set, and the candidate path set includes a number of candidate tuples.
[0065] In practical applications, when the inspection location set is known, a spatial database can be used to determine the original path set using the spatial data resources provided by the spatial database or the open map API.
[0066] In some embodiments, the specific process of step S101, determining the candidate path set according to the inspection location set, the original path set and the preset correlation threshold, is as follows: Figure 2 As shown, it mainly includes steps S201 and S202:
[0067] S201 . Perform an extended search based on the original path set and taking each inspection location in the inspection location set as an extended center point.
[0068] In practical applications, assume that the set of inspection locations is O, and the number of inspection locations in the inspection location set is O. i , each inspection location in the inspection location set O can be used as an extended center point, and the original path set can be scanned and expanded outward using the Dijkstra algorithm. The greedy algorithm thinking at the core of the Dijkstra algorithm ensures that the path point p on the path scanned earlier is closer to the center point o. The spatial distance sd(o, p) between the center point o and the path point p is the shortest distance d(o, τ) between the center point o and the path point p, that is, d(o, τ) = sd(o, p). Among them, the path point p is a path point on a path in the original path set, and the center point o is the inspection location used as the extended center point.
[0069] It should be noted that Dijkstra's algorithm is a shortest path algorithm from one vertex to the remaining vertices. It adopts the strategy of a greedy algorithm and can solve the problem of the shortest path in a weighted graph.
[0070] In the specific process, the correlation between the inspection location set O and a certain path τ can be defined as:
[0071]
[0072] because The upper bound of the correlation between other inspection locations in the inspection location set O and the path τ can be taken as 1, so the upper bound of the overall correlation can be derived:
[0073]
[0074] All inspection locations O in the inspection location set O i They all serve as expansion centers to perform independent and parallel expansion search operations.
[0075] S202: taking the paths corresponding to the paths whose overall relevance upper bounds obtained through the extended search are smaller than the preset relevance threshold as candidate paths, and generating a candidate path set.
[0076] Since all the inspection locations O in the inspection location set O i As the expansion center point, independent parallel expansion search operations are performed. For each inspection location O i , when its overall correlation upper bound ub is less than the preset correlation threshold θ, the inspection location O i The network extension search will be terminated, and the remaining unscanned paths will be excluded from the candidate path set.
[0077] It should be noted that the inspection location O i The distance d(o, τ) from each candidate path τ can be recorded as a key value for subsequent calculations.
[0078] It should also be noted that in the process of performing an extended search based on the original path set with each inspection location in the inspection location set as the extended center point, it can be determined in real time whether the overall upper bound of the correlation of the paths obtained by the extended search of the inspection locations is less than the preset correlation threshold. When it is determined that the overall upper bound of the correlation of the paths obtained by the extended search of the inspection locations is not less than the preset correlation threshold, the extended search can be stopped.
[0079] In practical applications, each candidate path in the candidate path set can be represented by a candidate tuple, which can be o i (τ, p) =<e,p,d> , e represents the path τ, p represents the path point scanned by spatial expansion, and d represents the path point p and the inspection location o i Spatial distance, i.e. inspection location o i and the shortest distance of the path τ.
[0080] When the inspection location i When the extended scan is performed with as the center point, if the upper bound ub of the overall association calculated after scanning the new path point p is not less than the preset association threshold, the path point p, path τ and distance d are used to form a candidate tuple o i (τ, p) is added to the candidate path set C of the inspection location oi i When the upper bound of the overall correlation calculated by scanning a new path point is less than the preset correlation threshold, the scan is terminated and the inspection location o is obtained. i The candidate path set C i This is the inspection location o i The candidate path set. When all the inspection locations o in the inspection location set O i After completing the extended scan, all inspection locations o i The candidate path sets are merged to obtain the candidate path set C, C = {C1, C2, ..., C i}.
[0081] S102: Group and merge candidate tuples in the candidate path set to obtain a candidate path group set.
[0082] There may be multiple candidate path group sets, and each candidate path group set includes several group-level candidate tuples.
[0083] It should be noted that in practice, the inspection location set can be partitioned, and each partition is divided into multiple location groups C1, C2, ..., C i , that is, the candidate path group set can be C1, C2, ..., C i Respectively, corresponding to each inspection location o i The candidate path set, at this time the inspection location o iThe candidate tuples of are also grouped, and the inspection locations o i By merging the candidate tuples in the candidate path set, group-level candidate tuples can be obtained, and each merged set becomes a candidate path group set.
[0084] Specifically, the inspection location set can be partitioned into (k+1) mutually non-overlapping subsets, where the range of k is [0, M], and M is the preset maximum number of combinations. The value of k increases gradually from the minimum value to the maximum value. If the current k value has found the result path, there is no need to consider a larger k value. The candidate paths are merged and evaluated in each partition separately, and each partition is parallel.
[0085] In practical applications, the specific process of step S102, grouping and merging each candidate tuple in the candidate path set to obtain the candidate path group set is as follows: Figure 3 As shown, it mainly includes steps S301 and S302:
[0086] S301. According to the paths of the candidate tuples in the candidate path set, the candidate tuples with the same paths are merged to obtain a plurality of candidate group level tuples.
[0087] In practical applications, since the candidate tuple in the candidate path set is represented by o i (τ, p) =<e,p,d> , according to the paths of each candidate tuple in the candidate path set, the candidate tuples with the same path can be merged to obtain multiple candidate group level tuples.
[0088] Specifically, the candidate group level tuple can be defined as G i (τ, P) = <e,p,ub G >, where e represents a path, p represents the path point scanned by spatial expansion, P represents a set of key-value pairs consisting of inspection locations o in location group G and path points p on the path τ searched by expansion, ub G Represents the upper bound of the degree of association of path τ with respect to all its associated locations.
[0089] Similar to the calculation of ub value of a single inspection location, ub G The value of can be calculated by the following formula:
[0090]
[0091] S302 , screening the candidate group level tuples according to the relationship between the upper bound of the relevance of each candidate group level tuple and the preset relevance threshold to obtain a candidate path group set.
[0092] In practical applications, the upper bound of the correlation of each candidate group-level tuple can be determined first; then, based on the relationship between the upper bound of the correlation of each candidate group-level tuple and the preset correlation threshold, the candidate group-level tuples that meet the requirements are screened out from all the candidate group-level tuples; the candidate group-level tuples that meet the requirements are used as group-level candidate tuples in the candidate path group set to obtain the candidate path group set.
[0093] It should be noted that according to the above ub G The calculation method is used to determine the upper bound of the correlation of each candidate group level tuple. If the upper bound of the correlation of the candidate group level tuple is less than the preset correlation threshold, the candidate group level tuple is regarded as a tuple that meets the requirements. Then, each candidate tuple that meets the requirements is used as a group level candidate tuple in the candidate path group set to obtain the candidate path group set.
[0094] S103: partition and merge the candidate tuples at the group level in the candidate path group set according to a preset maximum number of combinations to obtain a target candidate path set, so as to determine a result path that meets the conditions according to the target candidate path set.
[0095] The target candidate path set includes several high-level candidate tuples and / or several group-level candidate tuples.
[0096] In practical applications, after completing the screening of group-level candidate tuples to obtain a set of candidate path groups, it is necessary to merge the group-level candidate tuples at the partition level to obtain higher-level candidate tuples for synthesizing the final path results.
[0097] In some embodiments, in step S103, the specific process of partitioning and merging the candidate tuples at the group level in the candidate path group set according to the preset maximum number of combinations to obtain the target candidate path set is as follows: Figure 4 As shown, it mainly includes steps S401 and S402:
[0098] S401. Set the preset maximum number of combinations as the upper limit of the number of partitions.
[0099] In actual applications, the preset maximum number of combinations is the upper limit of the number of times the generated target candidate path set can execute partitioning. The specific value can be determined according to the application environment and user needs. This application does not make any specific limitations and is within the scope of protection of this application.
[0100] It should be noted that the preset maximum number of combinations can be understood as the allowed transfer points of the path result that meets the inspection location set, that is, the turning points on the path result that are usually understood.
[0101] S402. Partition each group-level candidate tuple in the candidate path group set layer by layer until the number of partitions reaches a preset maximum number of combinations, or there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than a preset correlation threshold value, thereby obtaining a partition subset corresponding to each layer.
[0102] In practical applications, the inspection location set can be partitioned into (k+1) non-overlapping subsets, where the range of k is [0, M], and M is the preset maximum number of combinations, and the candidate tuples at each group level in the path group set can be partitioned to obtain partition subsets corresponding to each layer; in the partitioning process, the condition that there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than the preset correlation threshold value can be considered. When the condition that there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than the preset correlation threshold value is met, the partitioning is terminated to obtain partition subsets corresponding to each layer.
[0103] It can be understood that the partition termination condition may be that the number of partitions reaches the preset maximum number of combinations, or that there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than the preset correlation threshold. In practice, the partition can be terminated as long as the number of partitions reaches the preset maximum number of combinations, or there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than the preset correlation threshold.
[0104] S403 , starting from the bottom layer, the partition subsets corresponding to each layer are merged layer by layer to obtain a target candidate path set.
[0105] In practical applications, merging is the inverse process of partitioning. When the candidate tuples at each group level in the candidate path group set are partitioned layer by layer until the number of partitions reaches the preset maximum number of combinations, or there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than the preset correlation threshold value, after obtaining the partition subsets corresponding to each layer, the partition subsets corresponding to each layer can be merged layer by layer starting from the bottom layer to obtain the target candidate path set.
[0106] In practical applications, the process of merging the partitions corresponding to each layer from the bottom layer is as follows: first, for the partition subset of each layer, determine the group-level candidate tuple pairs in the candidate path group set that meet the partition merging conditions, and the two group-level candidate tuples in the group-level candidate tuple pairs have path intersections and there is no conflict in the paths; then merge the group-level candidate tuple pairs separately.
[0107] For example, for two group-level candidate tuples G(τ, P) and G'(τ', P'), if the routes τ and τ' represented by these two group-level candidate tuples have a corner point, and this intersection is located between all the extension points of the inspection locations included in the G group and all the extension points of the inspection locations included in the G' group (that is, there is no conflict between the two merged sub-paths), then this group-level candidate tuple can be considered as a group-level candidate tuple pair that can be merged, and this intersection can be called a "transfer point" p in , the formula is:
[0108]
[0109] Among them, τ - p in Represents the path from the starting point of path τ to the intersection point p in A subpath of a path τ, τ′ + p in Indicates that from the intersection point p in A subpath of path τ that leads to the end point of path τ'.
[0110] Through the "transfer point" in The two paths and their corresponding group-level candidate tuples can be combined to obtain a high-level candidate tuple S(τ s ,P∪P′), where S=G∪G′, τ s =τ - p in +τ′ + p in ; The obtained high-level candidate tuple can be added as a group-level candidate tuple to a new round of merging operation. The principle of the new round of merging operation is the same as above, and the number of merging rounds; that is, after all group-level candidate tuples are partitioned and merged, the group-level candidate tuples after the partition merger are merged again. In this way, the bottom-up parallel iterative merging operation can eventually obtain the target candidate path set. According to the target candidate path set, the qualified result path can be derived and returned to the inspection personnel.
[0111] Exemplary, combined Figure 5 , the target candidate path set may include: S1(τ s ,P1∪P2) and G3(τ3,P3) to merge the routes and obtain the result path τ that meets the conditions r .
[0112] It should be noted that in practice, before the candidate path set generation stage, the inspection location set can also be grouped, and the candidate tuple generation operation at the group level can be directly performed in each group, thereby realizing the candidate tuple generation process of a single inspection location; however, this method has high requirements on the inspection location grouping in the initial stage and the operation method of directly screening candidate tuples through multiple initial inspection locations in the group. Among them, the inspection location set can be grouped according to the longitude and latitude of each inspection location in the inspection location set; of course, it is not limited to this, and can also be determined according to the application environment and user needs, all within the scope of protection of this application.
[0113] Based on the above, the inspection path planning method provided in this embodiment includes: determining a candidate path set according to an inspection location set, an original path set and a preset correlation threshold, the inspection location set includes at least one inspection location, the original path set includes all paths leading to each inspection location in the inspection location set, and the candidate path set includes a number of candidate tuples; grouping and merging each candidate tuple in the candidate path set to obtain a candidate path group set, the candidate path group set includes a number of group-level candidate tuples; partitioning and merging each group-level candidate tuple in the candidate path group set according to a preset maximum number of combinations to obtain a target candidate path set, so as to determine a qualified result path according to the target candidate path set, the target candidate path set includes a number of high-level candidate tuples and / or a number of group-level candidate tuples, which can further reduce the path correlation analysis to a lower-level path set level, and the resulting path can greatly reduce the time loss caused by repeated paths and path selection, and solves the problem that the existing solutions have obvious shortcomings in multi-address path planning and cannot meet the path planning needs of a large number of merchant addresses in a short period of time for inspection tasks.
[0114] It is worth noting that the present application uses branched parallel operations of the inspection location set to calculate the associated path sets of all inspection locations separately, then group and merge them, and finally partition and merge them into the result path, which can save a lot of computing time and improve the efficiency of the path planning scheme. In addition, the sub-path divide-and-conquer algorithm is innovatively introduced, that is, the candidate path is split into sub-paths according to the "transfer points" and combined layer by layer into new paths, which solves the problem of low accuracy of existing Top-k and other path planning algorithms for multi-location path planning, and the resulting path has a better fit with the inspection location. In addition, the path analysis based on multiple path points can be more refined, and the precision of the combination of high-correlation sub-paths is much higher than the one-time correlation calculation of the entire path, which significantly improves the probability and stability of the planning result returning to the optimal path. Furthermore, the parallel divide-and-conquer RSL (Route Search by Locations) algorithm based on multiple locations of the present application has also greatly improved the accuracy of the path planning structure on the basis of refinement. Compared with the Top-k algorithm, the path results calculated by the parallel divide-and-conquer RSL algorithm based on multiple locations are more in line with the inspection location set, especially when the number of inspection locations is relatively large, its query accuracy will be greatly improved. This also makes this algorithm highly consistent with the path planning requirements of multiple merchant addresses for merchant inspections. Inspectors can completely rely on the result path obtained by the algorithm, reduce the time loss caused by taking repeated paths and selecting paths, and greatly improve the inspection work efficiency and work experience. Finally, the parallel divide-and-conquer RSL algorithm based on multiple locations of the present application is implemented at the sub-path level using the thinking of the divide-and-conquer algorithm. With sufficient computing performance, multiple tasks can be calculated in parallel and the results can be merged. While ensuring accuracy, the algorithm execution efficiency and complexity are also taken into account, so that the implementation plan has better usability.
[0115] Optionally, another embodiment of the present application further provides an inspection path planning device, such as Figure 6 As shown, the device mainly includes:
[0116] The determining unit 101 is used to determine a candidate path set according to a set of inspection locations, an original path set and a preset correlation threshold, wherein the set of inspection locations includes at least one inspection location, the original path set includes all paths leading to each inspection location in the set of inspection locations, and the candidate path set includes a plurality of candidate tuples;
[0117] A grouping and merging unit 102, configured to group and merge each of the candidate tuples in the candidate path set to obtain a candidate path group set, wherein the candidate path group set includes a plurality of group-level candidate tuples;
[0118] The partition merging unit 103 is used to partition and merge each of the group-level candidate tuples in the candidate path group set according to a preset maximum number of combinations to obtain a target candidate path set, so as to determine a qualified result path according to the target candidate path set, and the target candidate path set includes several high-level candidate tuples and / or several group-level candidate tuples.
[0119] In some embodiments, the determining unit 101 includes:
[0120] An extended search unit, configured to perform an extended search based on the original path set with each of the inspection locations in the inspection location set as an extended center point;
[0121] The set generating unit is used to take the paths corresponding to the paths whose overall relevance upper bound of the paths obtained through the extended search is less than the preset relevance threshold as candidate paths, and generate the candidate path set.
[0122] In some embodiments, the group merging unit 102 includes:
[0123] A merging subunit, configured to merge candidate tuples with the same path according to the paths of the candidate tuples in the candidate path set, to obtain a plurality of candidate group level tuples;
[0124] The screening unit is used to screen the candidate group level tuples according to the relationship between the upper bound of the correlation degree of each candidate group level tuple and the preset correlation degree threshold to obtain the candidate path group set.
[0125] In some embodiments, the screening unit comprises:
[0126] A determination subunit, used to determine the upper bound of the relevance of each of the candidate group level tuples;
[0127] A screening subunit, configured to screen out candidate group level tuples meeting the requirements from among all the candidate group level tuples according to the relationship between the upper bound of the relevance of each candidate group level tuple and the preset relevance threshold;
[0128] The first unit is used to take the candidate group level tuples that meet the requirements as the group level candidate tuples in the candidate path group set to obtain the candidate path group set.
[0129] In some embodiments, the partition merging unit 103 includes:
[0130] The second is a unit, used to use the preset maximum number of combinations as an upper limit of the number of partitions;
[0131] A partitioning subunit is used to partition and merge each of the group-level candidate tuples in the candidate path group set layer by layer until the number of partitions reaches the preset maximum number of combinations, or there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than a preset correlation threshold value, thereby obtaining a partition subset corresponding to each layer;
[0132] The merging subunit is used to merge the partition subsets corresponding to each layer layer by layer starting from the bottom layer to obtain the target candidate path set.
[0133] In some embodiments, merging partitions corresponding to each layer layer by layer starting from the bottom layer includes:
[0134] For each partition subset of each layer, determine a group-level candidate tuple pair in the candidate path group set that meets the partition merging condition, where two of the group-level candidate tuples in the group-level candidate tuple pair have path intersections and there is no path conflict;
[0135] The group-level candidate tuple pairs are merged respectively.
[0136] The inspection path planning device provided in this embodiment includes: a determination unit 101 is used to determine a candidate path set according to an inspection location set, an original path set and a preset correlation threshold, wherein the inspection location set includes at least one inspection location, the original path set includes all paths leading to each inspection location in the inspection location set, and the candidate path set includes a plurality of candidate tuples; a grouping and merging unit 102 is used to group and merge each of the candidate tuples in the candidate path set to obtain a candidate path group set, and the candidate path group set includes a plurality of group-level candidate tuples; a partition merging unit 103 is used to group and merge the candidate tuples according to the preset maximum group The composite number partitions and merges each of the group-level candidate tuples in the candidate path group set to obtain a target candidate path set, so as to determine a qualified result path according to the target candidate path set. The target candidate path set includes several high-level candidate tuples and / or several group-level candidate tuples, which can further reduce the path correlation analysis to a lower-level path set level. The resulting path can greatly reduce the time loss caused by repeated paths and path selection, and solves the problem that the existing solutions have obvious shortcomings in multi-address path planning and cannot meet the path planning needs of a large number of merchant addresses in a short period of time in inspection tasks.
[0137] It should be noted that for the relevant description of each unit in the inspection path planning device, please refer to the above method embodiment, and this application will not go into details one by one.
[0138] Optionally, another embodiment of the present application further provides a computer storage medium for storing a computer program, which, when executed, is specifically used to implement the inspection path planning method provided in any embodiment of the present application.
[0139] It should be noted that, for the relevant description of the inspection path planning method, please refer to the above embodiment, which will not be repeated here.
[0140] Optionally, another embodiment of the present application further provides an electronic device, which includes a memory and a processor.
[0141] Wherein, the memory is used to store computer programs;
[0142] The processor is used to execute a computer program, specifically to implement the inspection path planning method provided in any embodiment of the present application.
[0143] It should be noted that the relevant description of the inspection path planning method can also be found in the above embodiment and will not be repeated here.
[0144] The features recorded in the various embodiments in this specification can be replaced or combined with each other, and the same and similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work. Professionals can also further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0145] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0146] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A patrol route planning method, characterized in that: include: Determine a candidate path set according to a set of inspection locations, an original path set and a preset correlation threshold, wherein the set of inspection locations includes at least one inspection location, the original path set includes all paths leading to each inspection location in the set of inspection locations, and the candidate path set includes a plurality of candidate tuples; Grouping and merging each of the candidate tuples in the candidate path set to obtain a candidate path group set, wherein the candidate path group set includes a plurality of group-level candidate tuples; According to the preset maximum number of combinations, each of the group-level candidate tuples in the candidate path group set is partitioned and merged to obtain a target candidate path set, so as to determine a qualified result path based on the target candidate path set, and the target candidate path set includes several high-level candidate tuples and / or several group-level candidate tuples.
2. The inspection path planning method according to claim 1, characterized in that: According to the inspection location set, the original path set and the preset correlation threshold, the candidate path set is determined to include: Performing an extended search based on the original path set with each of the inspection locations in the inspection location set as an extended center point; The paths whose overall relevance upper bounds obtained through the extended search are smaller than the preset relevance threshold are taken as candidate paths to generate the candidate path set.
3. The inspection path planning method according to claim 1, characterized in that: The candidate tuples in the candidate path set are grouped and merged to obtain a candidate path group set including: According to the paths of the candidate tuples in the candidate path set, the candidate tuples with the same paths are merged to obtain a plurality of candidate group level tuples; The candidate group level tuples are screened according to the relationship between the upper bound of the relevance of each candidate group level tuple and the preset relevance threshold to obtain the candidate path group set.
4. The inspection path planning method according to claim 3, characterized in that: The candidate group level tuples are screened according to the relationship between the upper bound of the relevance of each candidate group level tuple and the preset relevance threshold, and the candidate path group set is obtained, including: Determine the upper bound of the relevance of each of the candidate group level tuples; According to the relationship between the upper bound of the relevance of each of the candidate group level tuples and the preset relevance threshold, selecting the candidate group level tuples that meet the requirements from all the candidate group level tuples; The candidate group-level tuples that meet the requirements are used as the group-level candidate tuples in the candidate path group set to obtain the candidate path group set.
5. The inspection path planning method according to claim 1, characterized in that: The candidate tuples at the group level in the candidate path group set are partitioned and merged according to the preset maximum number of combinations, and the target candidate path set is obtained, including: The preset maximum number of combinations is used as the upper limit of the number of partitions; Partitioning each of the group-level candidate tuples in the candidate path group set layer by layer until the number of partitions reaches the preset maximum number of combinations, or there is at least one path in each partition such that the upper bound of the overall correlation between all inspection locations in the partition and the path is less than a preset correlation threshold value, thereby obtaining a partition subset corresponding to each layer; Starting from the bottom layer, the partition subsets corresponding to each layer are merged layer by layer to obtain the target candidate path set.
6. The inspection path planning method according to claim 5, characterized in that: Starting from the bottom layer, merging the partitions corresponding to each layer layer by layer includes: For each partition subset of each layer, determine a group-level candidate tuple pair in the candidate path group set that meets the partition merging condition, where two of the group-level candidate tuples in the group-level candidate tuple pair have path intersections and there is no path conflict; The group-level candidate tuple pairs are merged respectively.
7. A patrol route planning device, characterized in that: include: A determination unit, configured to determine a candidate path set according to a set of inspection locations, an original path set and a preset correlation threshold, wherein the set of inspection locations includes at least one inspection location, the original path set includes all paths leading to each inspection location in the set of inspection locations, and the candidate path set includes a plurality of candidate tuples; A grouping and merging unit, configured to group and merge each of the candidate tuples in the candidate path set to obtain a candidate path group set, wherein the candidate path group set includes a plurality of group-level candidate tuples; A partition merging unit is used to partition and merge each of the group-level candidate tuples in the candidate path group set according to a preset maximum number of combinations to obtain a target candidate path set, so as to determine a qualified result path according to the target candidate path set, and the target candidate path set includes several high-level candidate tuples and / or several group-level candidate tuples.
8. The inspection path planning device according to claim 7, characterized in that: The determining unit comprises: An extended search unit, configured to perform an extended search based on the original path set with each of the inspection locations in the inspection location set as an extended center point; The set generating unit is used to take the paths corresponding to the paths whose overall relevance upper bound of the paths obtained through the extended search is less than the preset relevance threshold as candidate paths, and generate the candidate path set.
9. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store computer programs; The processor is used to execute the computer program, specifically to implement the inspection path planning method as described in any one of claims 1-6.
10. A computer storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the inspection path planning method as described in any one of claims 1-6.