Motion line model generation method, address evaluation method, device and program product
By screening alternative road sections around the address point and using the distances and angles between multiple points on the road section and the address point, a movement line model is generated, which solves the problem of inaccurate road representation in site selection and improves the efficiency and accuracy of site selection.
Patent Information
- Application Number
- CN202510466608.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies have difficulty finding a balance between efficiency and accuracy when selecting a site. The road representation range around the address point is difficult to accurately determine, resulting in low site selection efficiency or insufficient accuracy.
By obtaining candidate road sections around the address point, and using the distances and relative angles between multiple points on the road section and the address point, the candidate road sections are screened out and a movement line model is generated to improve the comprehensiveness and accuracy of the road representation of the address point.
The comprehensiveness and accuracy of address point road representation have been improved, providing a more reliable basis for site selection.
Smart Images

Figure CN120631997A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method for generating a movement line model, an address evaluation method, a device, and a program product. Background Art
[0002] Site selection is one of the key decisions in many fields, and its importance is self-evident. For example, in logistics, retail, urban construction, etc., the rationality of site selection is directly related to cost-effectiveness, operational efficiency and market competitiveness.
[0003] When selecting a site, it's necessary to first determine the roads that represent the address point. This allows for address point evaluation based on factors such as vehicle and pedestrian traffic on those roads. In related technologies, an address point is typically represented by all surrounding roads or roads of a specified type, such as highways and arterial roads. On the one hand, the precise range surrounding an address point is difficult to determine. Considering all surrounding roads results in low site selection efficiency due to the large number of roads. On the other hand, filtering roads by type reduces the number of roads representing the address point, improving site selection efficiency. However, this type of filtering can omit roads associated with the address point, leading to inaccurate road representation of the address point and thus affecting site selection accuracy.
[0004] Therefore, it is urgent to provide a comprehensive and accurate address point road representation solution while taking into account the efficiency of site selection evaluation. Summary of the Invention
[0005] The traffic flow model generation method, address evaluation method, device and program product provided in the embodiments of the present application realize the screening of road sections around the address point based on the distance and relative angle between the midpoint of the road section and the address point, and obtain the road representation of the address point, thereby improving the comprehensiveness and accuracy of the road representation of the address point and providing a reliable foundation for subsequent applications such as store site selection and address evaluation.
[0006] In a first aspect, an embodiment of the present application provides a method for generating a movement line model, comprising: obtaining multiple candidate road sections for an address point; the candidate road sections are road sections whose distance from the address point is less than or equal to a preset distance; based on the distances and relative angles between multiple points on the multiple candidate road sections and the address point, determining multiple alternative road sections from the multiple candidate road sections; and generating a movement line model of the address point based on the multiple alternative road sections.
[0007] In a second aspect, an embodiment of the present application provides an address evaluation method, comprising: obtaining a movement line model of an address point, wherein the movement line model of the address point is obtained based on the movement line model generation method provided in the first aspect of the present application and / or various possible implementation methods of the first aspect; and generating an evaluation result of the address point based on the movement line model of the address point.
[0008] In a third aspect, an embodiment of the present application provides a movement line model generation device, comprising: a candidate road section determination module, used to obtain multiple candidate road sections of an address point; the candidate road section is a road section whose distance from the address point is less than or equal to a preset distance; an alternative road section determination module, used to determine multiple alternative road sections from the multiple candidate road sections based on the distances and relative angles between multiple points on the multiple candidate road sections and the address point; and a movement line model generation module, used to generate a movement line model of the address point based on the multiple alternative road sections.
[0009] In a fourth aspect, an embodiment of the present application provides an address evaluation device, comprising: a movement line model acquisition module, used to obtain a movement line model of an address point, wherein the movement line model of the address point is obtained based on the movement line model generation method provided in the first aspect of the present application and / or various possible implementation methods of the first aspect; an evaluation result generation module, used to generate an evaluation result of the address point based on the movement line model of the address point.
[0010] In the fifth aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes various possible implementations of the first aspect and / or the second aspect above.
[0011] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement various possible implementations of the first aspect and / or the second aspect above.
[0012] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements various possible implementations of the first aspect and / or the second aspect above.
[0013] The embodiments of the present application provide a method for generating a movement line model, an address evaluation method, an apparatus, and a program product. To generate a road representation of an address point, the method first screens the road sections surrounding the address point from the road sections within the grid interval where the address point is located, i.e., candidate road sections whose distance from the address point is less than a preset distance. Subsequently, the distances and relative angles between multiple points on the road section and the address point are used to further screen the road sections. Based on the screening results, a road representation of the address point, i.e., a movement line model, is obtained. Multiple points on the road section can better characterize the shape of the road section. For sections with complex shapes, the comprehensiveness of the section analysis is improved by analyzing the distance between the road section and the address point at different angles. This avoids the omission of sections by screening only by type or the attributes of a single point thereon, thereby improving the comprehensiveness and accuracy of the road representation of the address point. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0015] Figure 1 Schematic diagram of the process of generating a dynamic line model provided in the embodiment of the present application Figure 1 ;
[0016] Figure 2 A schematic diagram of the north angle of the connecting line provided in an embodiment of the present application;
[0017] Figure 3 A schematic diagram of the candidate road segment screening process provided in an embodiment of the present application;
[0018] Figure 4 Schematic diagram of the process of generating a dynamic line model provided in the embodiment of the present application Figure 2 ;
[0019] Figure 5 Schematic diagram of two candidate road sections provided in an embodiment of the present application;
[0020] Figure 6 A schematic diagram of a closed-loop road segment set provided in an embodiment of the present application;
[0021] Figure 7 Schematic diagram of the process of generating a dynamic line model provided in the embodiment of the present application Figure 3 ;
[0022] Figure 8 A schematic diagram of a third road segment set provided in an embodiment of the present application;
[0023] Figure 9 A schematic diagram of adding a new search node to the search tree provided in an embodiment of the present application;
[0024] Figure 10 A schematic diagram of search tree pruning provided in an embodiment of the present application;
[0025] Figure 11 Schematic diagram of the process of generating a dynamic line model provided in the embodiment of the present application Figure 4 ;
[0026] Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0027] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0028] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0029] It should be noted that the user information (including but not limited to user device information, user attribute information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0030] First, some of the terms involved in this application are explained:
[0031] Link: The basic unit of a road network, generally a part of an actual road. Each link may have a topological connection relationship with other links at both ends. The topological connection relationship of multiple links constitutes a road network.
[0032] Degree of a road segment: In a road network, if both endpoints of a road segment are connected to other road segments (e.g., the endpoints coincide), the degree of the road segment is 2; if only one of the endpoints of a road segment is connected to other road segments, the degree of the road segment is 1; if neither endpoint is connected to other road segments, the degree of the road segment is 0.
[0033] Movement path: This refers to the movement trajectory of a single individual in the real world, typically described using road network data. For example, if a user travels from location P1, passes through street L1, and arrives at location P2, the road segment corresponding to street L1 is the user's movement path.
[0034] A traffic flow model is a road representation of an address point. It describes the road segments or network surrounding the address point that can lead to it. This is typically a closed-loop road network model. For example, if a point of interest (POI) is surrounded by five roads forming a closed loop, r1 through r5, the traffic flow model for that POI can describe the structural data of the topological connectivity between roads r1 through r5.
[0035] Heuristic Search, also known as informed search, uses heuristic information from the problem to guide the search, reducing the search scope and complexity. It is used to search for optimal or locally optimal solutions within the problem space. Heuristic information, such as an evaluation function (also known as a valuation function), is typically an estimate for each state, reflecting the state's proximity to the target state or the cost of solving the problem. The value of the evaluation function is used to select nodes for expansion (one node for each state) to search for the target node, such as nodes whose evaluation function values are less than a certain threshold.
[0036] In order to realize the site selection, it is necessary to establish a mathematical model of the address point. When establishing the mathematical model of the address point, it is necessary to determine the road representation of the address point to determine the characteristics of the address point such as the flow of people and vehicles.
[0037] In related technologies, an area near an address point is typically delineated, and the road network within that area, that is, all the road segments within that area, is used as the road representation for the address point. With this method, the size of the delineated area is difficult to accurately determine. If the area is too large, the road representation will include more road segments and the model will be bulky, affecting the efficiency of site selection. If the area is too small, road segments associated with the address point are easily missed, resulting in low road representation accuracy, which in turn affects the efficiency of site selection. On this basis, we can combine the attributes of the road segments and delineate a larger area. Based on the road grade, road type, etc., the main roads can be screened from the road segments within the area to form the road representation for the address point. This method, by screening the main roads, ignores the impact of some minor road segments near the address point on site selection, resulting in an incomplete road representation for the address point.
[0038] Based on this, in order to provide a road representation for an address point that balances site selection efficiency and accuracy, an embodiment of the present application provides a method for generating a dynamic line model, which is used to search for a closed-loop road network that is accessible near the address point and surrounds the address point. To achieve this goal, a plurality of candidate road segments near the address point are first obtained through distance screening. Then, the distances and relative angles between multiple points on the candidate road segments and the address point are used to obtain candidate road segments that are closer to the address point at a variety of angles. Based on the searched candidate road segments, a road representation for the address point is obtained. The evenly distributed and numerous points on the candidate road segments can well characterize the shape of the candidate road segments. Thus, using the distances and relative angles to the address point, it is possible to determine whether the candidate road segment is a candidate road segment by evaluating the distance of the candidate road segment from the address point at multiple angles. For example, the road segment in the road representation of the address point avoids omitting the secondary road segment that is closest to the address point at multiple angles, thereby improving the accuracy and comprehensiveness of the road representation for the address point.
[0039] The following describes in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems using specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0040] Figure 1 Schematic diagram of the process of generating a dynamic line model provided in the embodiment of the present application Figure 1 The method for generating a dynamic line model can be executed by any device with corresponding data processing capabilities, such as an electronic map server, or other devices that communicate with the electronic map server, such as Figure 1 As shown, the method for generating a dynamic line model includes the following steps:
[0041] Step S101 , obtaining multiple candidate road sections of an address point; the candidate road sections are road sections whose distance from the address point is less than or equal to a preset distance.
[0042] The address point may be any location point that is not on a road, or an address point in an electronic map. The preset distance may be a configurable parameter, such as 1 km, 1.5 km, 2 km, 2.5 km, or other values.
[0043] Specifically, based on the distance between the road section and the address point, a road section whose distance to the address point is less than or equal to a preset distance may be screened from all road sections corresponding to the address point.
[0044] The full road section corresponding to the address point can be first obtained from the road sections stored in the map database of the electronic map, and then based on the distance from the point on the road section to the address point, multiple candidate road sections with distances less than or equal to a preset distance can be screened from the full road sections.
[0045] The full road section corresponding to the address point may be defaulted to the road section of the grid area where the address point is located in the electronic map. The grid area may be an area obtained by pre-dividing the electronic map.
[0046] Illustratively, the grid area where the address point is located may be the city where the address point is located, a subdivision of the city where the address point is located, or an area of other specifications.
[0047] The distance mentioned in this application, including the distance between a road section and an address point, can be a straight-line distance or a spherical distance.
[0048] Step S102 : determining a plurality of candidate road sections from the plurality of candidate road sections based on the distances and relative angles between a plurality of points on the plurality of candidate road sections and the address point.
[0049] For each candidate road segment obtained by screening, multiple points on the candidate road segment are selected, and the distance between each point and the address point, such as spherical distance and relative angle, is calculated.
[0050] When selecting points on a candidate road segment, you can sample points at fixed intervals to obtain multiple evenly distributed points. Alternatively, you can determine the sampling interval based on the curvature of the road segment, with larger sampling intervals for sections with less curvature and smaller sampling intervals for sections with greater curvature. For example, on a straight section, you can sample points at intervals of 10 meters, 5 meters, 1 meter, etc., while on a curved section, you can sample points at intervals of 1 meter, 0.5 meters, 0.1 meters, etc.
[0051] For each point selected on each candidate road segment, the spherical distance between the point and the address point is calculated, and the angle of the line connecting the point and the address point is determined to obtain the distance and relative angle between the point and the address point.
[0052] Exemplarily, the angle of the connecting line may be the north angle of the connecting line, where the north angle of the connecting line refers to the angle from the due north direction of the address point to the connecting line in a clockwise direction.
[0053] Figure 2 Schematic diagram of the north angle of the connection provided in the embodiment of the present application, multiple points ( Figure 2 The line connecting point p21 and address point p20 and the true north direction are as follows: Figure 2 As shown, the angle α formed by the line with an arrow indicating the true north direction and going clockwise to the line is the north angle of the line connecting point p21 and address point p20.
[0054] After obtaining the distances and relative angles between multiple points on each of the multiple candidate road sections and the address point, the candidate road sections where the point or multiple smaller points with the smallest distance to the address point are located at each relative angle can be counted, and based on the statistical results, multiple alternative road sections can be determined from the multiple candidate road sections.
[0055] An angle list can be obtained by calculating the relative angles between multiple points on multiple candidate road sections and the address point. For each relative angle in the angle list, the minimum value or multiple smaller values of the distances between the point having the relative angle and the address point are calculated, and the point corresponding to the minimum value or multiple smaller values is determined as the target point. When determining the candidate road sections, candidate road sections in which the proportion of target points in the candidate road sections is higher than a preset proportion can be determined as the candidate road sections. The preset proportion can be 20%, 30%, 50%, or other values.
[0056] Optionally, based on the distances and relative angles between multiple points on the multiple candidate road sections and the address point, multiple alternative road sections are determined from the multiple candidate road sections, including: for each candidate road section, obtaining the length and angle of the line connecting the multiple points on the candidate road section and the address point; for multiple lines at the same angle, sorting them in order of the length of the line from short to long; based on the sorting results, determining multiple alternative road sections from the multiple candidate road sections.
[0057] For each candidate road segment, after selecting multiple points on the candidate road segment, a line is drawn between each point and the address point to determine the length and angle of the line. If multiple lines with the same angle exist, they are sorted in ascending order of distance at that angle, retaining only the top N lines. The percentage of lines retained among the multiple lines connecting the points on each candidate road segment is calculated, and candidate road segments with a percentage exceeding a preset percentage are identified as candidate road segments.
[0058] For example, Figure 3 Schematic diagram of the candidate road segment screening process provided in the embodiment of the present application. The address point P3 contains 11 candidate road segments, namely link31 to link41. The location of each candidate road segment is as follows: Figure 3 As shown, Figure 3 In the figure, solid dots represent the endpoints of the road segments, and hollow circles represent the points selected on the candidate road segments. Assuming N is 1, only the shortest connection at the same angle is retained. Figure 3 The dashed lines are used to represent the connections. Figure 3 It can be seen that at the same angle, link39 is shorter than link37, link38 and link41, and link40 is shorter than link36 and link35. By setting a higher preset proportion, link35 to link38 and link41 can be deleted in the candidate section screening, and the remaining candidate sections, namely link31 to link34, and link39 and link40, can be determined as alternative sections. In addition to considering the aforementioned proportions, the length of the retained links can also be considered. Specifically, a candidate section in which the length of the retained links is less than the preset length and the proportion of the retained links among the links of multiple points on the candidate section is higher than the preset proportion can be determined as an alternative section.
[0059] Exemplarily, for two candidate road segments link1 and link2, 100 points are selected in link1 and 150 points are selected in link2. Among the connections between the 100 points in link1 and the address points, 38 connections are retained, and the length of the longest connection is L1. Among the connections between the 150 points in link2 and the address points, 90 connections are retained, and the length of the longest connection is L2. Assume that the preset ratio is 0.5 and the preset length is L, where L1 < L2 < L. Then the aforementioned ratios corresponding to link1 and link2 are 0.38 (38 / 100) and 0.6 (90 / 150) respectively. Since 0.38 < 0.5 < 0.6, link1 is filtered out and link2 is determined as the alternative road segment.
[0060] In some embodiments, all the connections can be sorted according to both the angle and the length to obtain the sorting results of the connections at each angle, including the sorting results of the angles with only one connection. And based on the sorting results, the alternative road segments are determined from the candidate road segments. Specifically, it can be based on the ratio of the connections ranked靠前 in the sorting results, that is, the ratio of the connections ranked靠前 to the total number of connections between the points on the candidate road segment and the address points, to screen and obtain the alternative road segments from the candidate road segments.
[0061] By sorting the lengths of the connections between the points and the address points angle by angle and using the sorting results, recall the candidate road segments that are the closest or relatively close to the address point at more angles as the alternative road segments, with high recall efficiency and high accuracy.
[0062] Step S103, generate a moving line model of the address point based on the multiple alternative road segments.
[0063] The multiple alternative road segments can be directly determined as the moving line model of the address point, or in the road network search, the multiple alternative road segments can be connected into a closed-loop supplementary road segment, and the supplementary road segment and the multiple alternative road segments are used as the moving line model of the address point.
[0064] Furthermore, the multiple alternative road segments can be further screened, and the alternative road segments retained after screening are determined as the moving line model of the address point. For example, those road segments with too short lengths, such as less than 5 meters, can be filtered out.
[0065] The method for generating a movement line model provided in an embodiment of the present application first screens the road sections surrounding the address point from the road sections within the grid interval where the address point is located, i.e., candidate road sections whose distance from the address point is less than a preset distance, in order to generate a road representation of the address point. Subsequently, the distances and relative angles between multiple points on the road section and the address point are used to further screen the road sections. Based on the screening results, a road representation of the address point, i.e., a movement line model, is obtained. Multiple points on the road section can better characterize the shape of the road section. For sections with complex shapes, the comprehensiveness of the section analysis is improved by analyzing the distance between the road section and the address point at different angles, avoiding the omission of sections by screening only by type or attributes of a single point on it, thereby improving the comprehensiveness and accuracy of the road representation of the address point.
[0066] Figure 4 Schematic diagram of the process of generating a dynamic line model provided in the embodiment of the present application Figure 2 , this embodiment is in Figure 1 Based on the embodiment shown, the steps of determining the candidate road segments and generating the dynamic line model are further defined, such as Figure 4 As shown, the method for generating a dynamic line model provided in this embodiment may specifically include the following steps:
[0067] Step S401 : screening and obtaining a plurality of candidate road sections whose distances from the address point are less than or equal to a preset distance.
[0068] Step S402: for each candidate road section, divide the candidate road section into multiple sub-road sections.
[0069] The candidate road section may be divided into multiple sub-road sections in an equal division manner, or the portions with similar curvatures may be divided into one sub-road section according to the curvature of the candidate road section.
[0070] Step S403 : for each sub-segment of the candidate road segment, connect a plurality of equally divided points on the sub-segment with the address point, and calculate the length and angle of the line connecting each equally divided point.
[0071] The line connecting the equally divided points is the abbreviation of the line connecting the equally divided points and the address points, which means the line with the equally divided points as the endpoints.
[0072] For each sub-segment obtained by dividing each candidate road segment, the sub-segment is divided into n parts on average, and each part is regarded as an equal division point.
[0073] The number n of parts when a sub-road segment is divided into multiple parts can be determined based on the distance from the sub-road segment or candidate road segment to the address point. The longer the distance, the smaller the score n. The lower limit value of n can be set, such as 50, 100, 200, and the upper limit value can be set, such as 500, 1000, etc. n can be the rounded result of the maximum value between the lower limit value and the upper limit value minus the distance from the sub-road segment or candidate road segment to the address point. Taking the lower limit value of 100 and the upper limit value of 500 as an example, n can be expressed as: int(max(100, 500-l)), where l represents the ratio of the distance from the sub-road segment or candidate road segment to the address point to the length represented by a single point.
[0074] After determining n, divide the sub-road segment n into equal parts to obtain n equal points, and connect each equal point with the address point to obtain the line connecting each equal point. Calculate the length and north angle of the line connecting each equal point to obtain a set of distances and a set of relative angles of a candidate road segment, that is, the set of line lengths and north angles of each sub-road segment equal point on the candidate road segment, angle_lst and dist_lst.
[0075] Step S404 : determining an angle interval corresponding to the candidate road segment based on the angle of the line connecting the first and last equally divided points of each sub-segment of the candidate road segment.
[0076] The first and last dividing points of a sub-segment are respectively the first and last dividing points of the sub-segment, that is, the first and last dividing points of the sub-segment in the road direction corresponding to the sub-segment.
[0077] For each candidate road segment, the angle interval corresponding to the candidate road segment is determined based on the angle values of the lines connecting the first and last equally divided points of each sub-road segment on the candidate road segment.
[0078] Specifically, the maximum value Amax and the minimum value Amin can be determined from the angles of the lines connecting the first and last equally divided points of each sub-segment on the candidate road segment. The maximum value Amax and the minimum value Amin are then used to generate two intervals: a first interval and a second interval. The first interval is [Amin, Amax], and the second interval is the union of [0°, Amin] and [Amax, 360°]. Based on the proportion of angles in angle_lst for the candidate road segment that fall between the first and second intervals, the interval with the larger proportion is selected as the angle interval corresponding to the candidate road segment.
[0079] Compared with the method of directly using the angles of the lines connecting the two endpoints of the candidate road section and the address point as the two endpoints of the angle interval, the above method of determining the angle interval improves the accuracy of determining the angle interval, especially the accuracy of determining the angle interval of candidate road sections with complex shapes.
[0080] For example, Figure 5 Schematic diagram of two candidate road sections provided in the embodiment of this application, such as Figure 5 As shown, the candidate road section link51 is in the shape of a straight line and is located on the east side of the address point p50; the angle interval of link51 is determined using the method provided in this application and directly using the two endpoints of link51, and the results are consistent; the shape of link52 is a curve, and the range surrounding the address point p50 is wider. If the angle interval is directly determined using the north angles α1 and α2 of the lines connecting the two endpoints of link52 and the address point p50, that is, the angle interval is determined to be [α2, α1], the angle interval will be inaccurate. The true angle interval should be the complement of this angle interval.
[0081] Step S405 , based on the length and angle of the line connecting the equally divided points of each sub-segment of the candidate road segment, obtain the length of the line connecting the points on the candidate road segment whose angle with the address point is within the angle interval.
[0082] After determining the angle interval corresponding to the candidate road segment, multiple angles are selected from the angle interval. The selection can be uniform, such as selecting multiple angles from the angle interval at intervals of 1°. For angles selected from the angle interval that do not exist in the candidate road segment's angle_lst, such as the first angle, the length of the line corresponding to the first angle is interpolated using angles near the first angle in the candidate road segment's angle_lst and the length of the line corresponding to the first angle. This means that the length of the line connecting the points on the candidate road segment whose angle to the address point is the first angle is obtained. Alternatively, the corresponding relationship between angles and lengths in angle_lst can be used to fit a length-angle relationship curve, and the length corresponding to the angle in the angle interval not included in angle_lst can be determined using this relationship curve.
[0083] For example, assuming that the angles from 10° to 20° in angle_lst of the candidate road section include 5, namely 10°, 13°, 15°, 18° and 20°, and the lengths of the lines connecting the address point to the points at these 5 angles are: l 1, l2, l3, l4 and l5, respectively. Assuming that the angles from 10° to 20° in the angle interval include 10°, 11°, 12°, 13°, 14°, 15°, 16°, 17°, 18°, 19° and 20°, the lengths corresponding to 11°, 12°, 14°, 16°, 17°, and 19° are unknown. Taking 11° as an example, the length corresponding to 11° can be interpolated by the length l 1 corresponding to 10° and the length l 2 corresponding to 13°, such as 0.67×l 1+0.33×l 2.
[0084] Step S406 , sorting the multiple lines at the same angle in order of length from short to long.
[0085] For the case where there are multiple lines at the same angle, the lines at the angle are sorted in order of length from short to long to obtain the sorting result of the angle. For lines with only one angle, no sorting is required.
[0086] Specifically, for any angle with multiple connecting lines in the set of multiple angles selected from the angle interval of each candidate road section, the angle of the connecting line with the address point is counted in order of the length of the connecting line from short to long, such as the length of the connecting line with the north angle as the angle, and the multiple connecting lines under the angle are sorted in order of the length of the connecting line from short to long to obtain the sorting result of the angle.
[0087] Step S407 , counting the proportion of the lines between the points on each candidate road segment and the address point in the sorting results that are located before a preset number of lines and unsorted lines.
[0088] The unsorted lines have only one line at the angle they are at. Since there is only one line at that angle, it must be in the top N of the sorted results, so there is no need to sort these lines.
[0089] For ease of description, the links that are located before a preset number in the sorting results and the unsorted links are recorded as target links. The links that are located before a preset number in the sorting results can be understood as having a sequence number in the sorting results that is less than the preset sequence number.
[0090] Exemplarily, the preset quantity or preset sequence number may be 2, 3, 4, 5 or other values.
[0091] Since the multiple lines at the same angle are sorted in order of length from short to long, the first preset number of lines in the sorting result are the preset number of lines with shorter lengths at the corresponding angle.
[0092] For each candidate road segment, count the number of target links corresponding to the candidate segment, i.e., the number of links ranked in the top N and the number of unsorted links in the sorted results for the corresponding angles. Calculate the ratio of the number of target links corresponding to the candidate segment to the total number of links corresponding to the candidate segment to obtain the proportion of target links corresponding to the candidate segment. Links corresponding to a candidate segment specifically refer to links between points on the candidate segment and address points. The total number of links corresponding to a candidate segment can be the number of angles in the selected angle interval corresponding to the candidate segment.
[0093] For example, taking the preset sequence number 2 as an example, assume that 100 angles are selected at 1° intervals from the angle interval [21°, 120°] corresponding to the candidate road segment, namely 21°, 22°, 23°, ..., 120°. At 56 of these angles, the link corresponding to this candidate road segment is the shortest, meaning that there are 56 target links corresponding to this candidate road segment. Therefore, the proportion of target links among the links corresponding to this candidate road segment is 0.56.
[0094] An alternative approach is to sort all links at all angles, so that the target links in this step only include the first predetermined number of links in the sorted results. In other words, when calculating the percentage, it is only necessary to calculate the ratio of the number of links corresponding to the candidate road segment that are in the first predetermined number of links in the sorted results to the total number of links corresponding to the candidate road segment.
[0095] Step S408 : determining a plurality of candidate road sections from the plurality of candidate road sections based on the proportion of each candidate road section and the target distance.
[0096] The target distance is determined based on the length of the line connecting the points on the candidate road section.
[0097] For example, the target distance may be a maximum value, an average value, or other values of the lengths of the lines connecting the points on the candidate road section.
[0098] Specifically, the candidate road sections with a proportion higher than a preset proportion and a target distance less than a set distance may be determined as alternative road sections, so as to recall the alternative road sections from the candidate road sections.
[0099] Exemplarily, the set distance may be 3 meters, 5 meters, 6 meters or other values.
[0100] Step S409 : searching for supplementary road segments that enable the plurality of candidate road segments to form a closed loop, and obtaining a closed loop road segment set.
[0101] Multiple road sections form a closed loop, which can be understood as multiple road sections in the road network being connected end to end to form a closed geometric figure, namely a loop.
[0102] Any spatial search algorithm can be used to search for supplementary road segments that form a closed loop of candidate road segments from all road segments of the address point, such as road segments within the grid area where the address point is located, such as greedy algorithms, backtracking algorithms, heuristic search algorithms, etc.
[0103] For example, the road network consisting of multiple alternative road sections and the road network of the grid area where the address point is located can be converted into an undirected graph, and the Dijkstra algorithm of the undirected graph can be used to search for supplementary road sections that form a closed loop for the multiple alternative road sections.
[0104] If the recalled multiple candidate road sections themselves have formed a closed loop, there is no need to execute step S409, and the movement line model of the address point is directly generated based on the recalled multiple candidate road sections.
[0105] The endpoints of other road segments that are less than a certain distance threshold from the endpoint of the candidate road segment can be considered the same endpoint to better connect different road segments. The distance threshold can be 3 meters, 5 meters, or other values.
[0106] The general process of searching for supplementary road sections using a heuristic search algorithm is as follows: using an evaluation function, the optimal or locally optimal supplementary road section is searched from a road network such as the road network in the grid area where the address point is located, so that multiple alternative road sections form a closed loop. The total length of the supplementary road section can be used as the evaluation function.
[0107] Optionally, searching for supplementary road sections that enable multiple alternative road sections to form a closed loop to obtain a closed-loop road section set includes: searching for supplementary road sections that enable multiple alternative road sections to form a closed loop to obtain a candidate closed-loop road section set; using an evaluation function to calculate the scores of the multiple alternative road sections based on the supplementary road sections; if the scores of the multiple alternative road sections meet preset conditions, determining the candidate closed-loop road section set corresponding to the multiple alternative road sections as the closed-loop road section set.
[0108] The evaluation function may be a function of the total length of the supplementary road segments, or a function of the total length of the supplementary road segments and the total number of the supplementary road segments. The candidate closed-loop road segment set corresponding to the multiple candidate road segments is a set of road segments that form a closed loop with the multiple candidate road segments, including the multiple candidate road segments and their supplementary road segments.
[0109] The score meeting the preset condition may specifically be that the score is less than a preset score, or the score is 0, that is, the multiple alternative road sections have formed a closed loop.
[0110] Furthermore, if the scores of multiple alternative road sections do not meet the preset conditions, a new set of alternative road sections can be obtained by updating the candidate road sections, thereby realizing the update of the alternative road sections, and re-searching to make the new set of alternative road sections form a closed-loop supplementary road section, obtaining a new set of candidate closed-loop road sections, and using the evaluation function to calculate the scores of the new set of alternative road sections until the scores meet the preset conditions. The candidate closed-loop road section set corresponding to the set of alternative road sections whose scores meet the preset conditions is determined as the closed-loop road section set, or if the search time and number of times reach the corresponding upper limit value, the candidate closed-loop road section set corresponding to the set of alternative road sections with the lowest score is determined as the closed-loop road section set.
[0111] The updating of the candidate road segments may specifically include: deleting the road segments with a median value of 0 among the candidate road segments and adding the supplementary road segments obtained previously.
[0112] In order to improve the search efficiency, a heuristic search algorithm can be used to update the candidate sections under the inspiration of the evaluation function, so as to search for a set of closed-loop sections, such as a set of candidate closed-loop sections whose scores meet the preset conditions, or a set of candidate closed-loop sections with the lowest scores obtained at the end of the search.
[0113] An evaluation function is introduced to evaluate the loop cost of alternative road sections. The higher the loop cost of the alternative road section, the less accurate the result of the alternative road section search, and the alternative road section needs to be searched again. By generating a traffic flow model based on the alternative road section only when the cost is low enough, the accuracy of the traffic flow model generation is further improved.
[0114] Optionally, if the scores of multiple alternative road segments do not meet the preset conditions, the method further includes: removing at least one alternative road segment with a degree value of 1; in a road network composed of multiple alternative road segments, one end of the alternative road segment with a degree value of 1 is connected to other alternative road segments, and the other end is not connected to other alternative road segments; searching for a supplementary road segment that forms a closed loop for the removed alternative road segments, and updating multiple candidate road segments based on the supplementary road segment; returning to execute the step of determining multiple alternative road segments from multiple candidate road segments until the search end condition is met; when the search end condition is met, determining the candidate closed-loop road segment set corresponding to the multiple alternative road segments with the lowest scores as the closed-loop road segment set.
[0115] One candidate road segment with a degree of 1 can be removed each time, and a search can be conducted to find supplementary road segments that form a closed loop with the remaining candidate road segments. The searched supplementary road segments can be added as candidate road segments to update the candidate road segments. After each candidate road segment update, the process returns to the step of determining multiple candidate road segments from multiple candidate road segments, and a new round of iteration is performed until the search end condition is met, such as the scores of the multiple candidate road segments obtained by iteration meet the preset conditions, or there are no removable candidate road segments with a degree of 1, or the number of iterations or execution time reaches an upper limit. When the search end condition is met, the candidate closed loop road segment set corresponding to the set of candidate road segments with the lowest score is determined as the closed loop road segment set.
[0116] In order to improve the search efficiency, multiple candidate road segments with a degree value of 1 can also be removed in each iteration.
[0117] Step S410: generating a movement line model of the address point based on the road sections in the closed-loop road section set.
[0118] The road sections in the closed-loop road section concentration can be directly determined as the movement line model of the address point.
[0119] In other embodiments, the closed-loop road segment set may include other redundant road segments in addition to a loop, and these road segments also need to be filtered.
[0120] For example, Figure 6A schematic diagram of a closed-loop road segment set provided in an embodiment of the present application is shown as follows: Figure 6 As shown, the closed-loop segment set includes 7 segments, namely link61 to link67, among which link61 to link66 form a loop, specifically a segment surrounding the point of interest where the address point p60 is located, and link67 is an internal road of the point of interest. The loop in the closed-loop segment set can be identified to filter out the segment that does not belong to the loop, namely link67.
[0121] In this embodiment, after the angles and lengths of the lines connecting multiple points and the address point are evenly divided on the candidate road sections, the line lengths are sorted at the same angle to obtain target lines with higher rankings. The alternative road sections are determined from the candidate road sections by the proportion of target lines included in the line set of the candidate road sections, and the target distance of the candidate road sections, such as the maximum length of the lines. On the premise of ensuring that the overall distance between the alternative road sections and the address points is relatively close, the proportion of target lines in the lines is used to recall the candidate road sections with higher rankings in line lengths of more points, thereby improving the quality of the alternative road sections. By supplementing the alternative road sections, a set of sections containing a closed loop, namely a closed-loop section set, is obtained, thereby supplementing the aforementioned screening step, thereby finding a closed-loop section set surrounding the address point, and improving the comprehensiveness of the road representation of the address point.
[0122] Optionally, a movement line model of the address point is generated based on the sections in the closed-loop road section concentration, including: generating an undirected graph based on a road network composed of sections in the closed-loop road section concentration; wherein the undirected graph uses sections in the closed-loop road section concentration as nodes, and the sections corresponding to the nodes connected by edges are connected to each other in the road network; based on a depth-first search (DFS) algorithm, the undirected graph is traversed to determine the nodes that form a loop in the undirected graph; and the movement line model of the address point is generated based on the sections corresponding to the nodes that form a loop in the undirected graph.
[0123] The road segments in the closed-loop road segment set can be connected in sequence according to the topological relationship of the road segments in the road network to obtain a road network composed of the road segments in the closed-loop road segment set. The road network is converted into an undirected graph. By identifying the nodes that form a loop in the undirected graph, a movement line model of the address point is generated based on the road segments corresponding to the nodes that form the loop.
[0124] The specific process of converting the road network into an undirected graph can be as follows: defining road sections in the road network as nodes, and connecting each node based on the connection relationship between road sections in the road network to obtain an undirected graph.
[0125] Based on the DFS traversal algorithm, the process of traversing an undirected graph to identify nodes that form a cycle in the undirected graph is as follows: initialize a state array to record the information of the traversed nodes, and create a recursive stack to record the nodes traversed each time during the DFS traversal; start the DFS traversal from any node in the undirected graph as the starting point; during the traversal process, for the node currently traversed (referred to as the current node), first determine whether the current node has been traversed. If not, push the current node into the recursive stack; if so, determine whether the current node is in the recursive stack; if so, a cycle is found, and the nodes that form the cycle are the nodes already in the recursive stack; if not, continue to traverse the nodes connected to the current node; when all nodes connected to a node have been traversed, pop the node from the recursive stack and backtrack to the node above the node in the recursive stack to continue traversing other untraversed nodes; when all nodes in the undirected graph have been traversed and no cycle is found, it is determined that there is no cycle in the undirected graph.
[0126] By converting the closed-loop road segment set into an undirected graph and using the mature loop recognition method in the undirected graph, the road segments that form closed loops in the closed-loop road segment set are identified, and the non-loop road segments are filtered out, thereby further improving the accuracy of the road representation of the address point.
[0127] Figure 7 Schematic diagram of the process of generating a dynamic line model provided in the embodiment of the present application Figure 3 , this embodiment is in Figure 1 Based on the embodiment shown, the steps of generating the dynamic line model are further defined as follows: Figure 7 As shown, the method for generating a dynamic line model provided in this embodiment may specifically include the following steps:
[0128] Step S701 , obtaining multiple candidate road segments of the address point from the road segments within the grid area where the address point is located, initializing a first road segment set to the road segments within the grid area where the address point is located, and initializing a second road segment set to a collection of multiple candidate road segments.
[0129] The candidate road section is a road section within the grid area where the address point is located, the distance between the road section and the address point being less than or equal to a preset distance.
[0130] Step S702 : determining a third road segment set based on the distances and relative angles between a plurality of points on the candidate road segments in the second road segment set and the address point.
[0131] The third road segment set is a set of candidate road segments, specifically a set of multiple candidate road segments determined based on the distances and relative angles between multiple points on multiple candidate road segments in the second road segment set and the address point. The method for determining the third road segment set indicates that the third road segment set is a subset of the second road segment set. The second road segment set is comprised of road segments in the first road segment set whose distance from the address point is less than or equal to a preset distance, making the second road segment set a subset of the first road segment set.
[0132] The third road segment set may be determined based on the method for determining the candidate road segments provided in the aforementioned embodiment, which will not be described in detail here.
[0133] Step S703 : Search the first road segment set for a supplementary road segment that enables the third road segment set to form a closed loop, and obtain a candidate closed-loop road segment set.
[0134] This step can refer to the method for determining the candidate closed-loop road segment set provided in the aforementioned embodiment, with the difference being that the set of searched supplementary road segments is adjusted from the road segments within the grid area where the address point is located to the first road segment set in each iteration, and the object forming the closed loop is the set of multiple alternative road segments obtained in each iteration, i.e., the third road segment set.
[0135] Step S704 : Calculate the score of the third road segment set based on the supplementary road segments using an evaluation function.
[0136] The evaluation function is used to evaluate the cost of forming a closed loop by the third segment set, and can be represented by the total length of the supplementary segments of the third segment set.
[0137] Step S705 : If the score of the third road segment set meets a preset condition, the candidate closed-loop road segment set corresponding to the third road segment set is determined to be the closed-loop road segment set.
[0138] If the score of the third road segment set is or is lower than the preset score, the candidate closed-loop road segment set consisting of the third road segment set and its supplementary road segments is determined to be the closed-loop road segment set.
[0139] In step S706, if the score of the third segment set does not meet the preset condition, at least one candidate segment with a degree value of 1 is removed from the first segment set, the second segment set, and the third segment set at least once. After each removal of at least one candidate segment with a degree value of 1, a search is performed from the first segment set to obtain a supplementary segment that closes the third segment set, and the second segment set is updated based on the supplementary segment. After each update of the second segment set, the process returns to step S702 to obtain the third segment set for the next iteration.
[0140] Among them, the initial value of the first road segment set is the road segment within the grid area where the address point is located, the initial value of the second road segment set is multiple candidate road segments, and the initial value of the third road segment set is multiple alternative road segments; in the road network composed of multiple alternative road segments, one end of the alternative road segment with a degree value of 1 is connected to other alternative road segments, and the other end is not connected to other alternative road segments.
[0141] If the score of the third segment set obtained in this iteration does not meet the preset conditions, that is, the score of the third segment set is high, it is necessary to update the second segment set used to determine the third segment set at least once through an iterative process to obtain the third segment set for the next iteration.
[0142] One end of a candidate segment with a degree of 1 is not connected to any other candidate segment, resulting in the third segment set not forming a closed loop. This situation can occur because the segment to which one end of the candidate segment is connected was not recalled due to stringent conditions when determining the third segment set, or because the disconnected end of the candidate segment itself is not connected to any other segment in the electronic map network. To compensate for the former, the second segment set can be expanded by removing candidate segments with a degree of 1 to determine whether a sufficiently low-scoring third segment set can be found.
[0143] Specifically, when the score of the third segment set obtained in this iteration does not meet the preset conditions, a loop process is performed, where at least one candidate segment with a degree value of 1 is removed from the first segment set, the second segment set, and the third segment set each time. A supplementary segment is searched for in the first segment set after the removed segment so that the third segment set after the removed segment forms a closed loop. The second segment set is updated to the union of the second segment set after the removed segment and the supplementary segment, thereby obtaining the second segment set used in the next iteration. The process returns to step S702, and the next iteration is performed. The third segment set is re-determined, and a supplementary segment is searched for so that the third segment set forms a closed loop. The score of the third segment set is determined using an evaluation function. If the score meets the preset conditions, the third segment set and the supplementary segment obtained in this iteration are output as the closed loop segment set. If the score does not meet the preset conditions, the second segment set is updated again using the method provided in this step, and so on.
[0144] The combination of at least one candidate road segment with a degree value of 1 removed in different iterations is different.
[0145] To improve efficiency, at least one candidate road segment with a degree of 1 to be removed in the next iteration may be determined based on the scores of the third road segment set obtained in each previous iteration, so as to search in a direction that reduces the scores of the third road segment set.
[0146] If there is an alternative road segment with a degree value of 0, that is, an alternative road segment with no connection to other alternative road segments at both ends, the alternative road segment with a second road segment concentration value of 0 also needs to be removed.
[0147] For example, Figure 8 A schematic diagram of the third road segment set provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the third segment set includes 6 candidate segments, namely link81 to link86. Figure 8 The endpoints on both sides of the middle segment are represented by solid circles, and the two connected segments share a common endpoint. Link 81 and link 85 have a degree of 1, link 86 has a degree of 0, and the remaining candidate segments have a degree of 2 (each link is connected to another candidate segment at both ends). After determining that the score of the third segment set is not 0, link 86, as well as at least one of link 81 and link 85, can be removed from the first, second, and third segment sets.
[0148] In order to implement backtracking, a state space, such as a stack, can be used to record the segments removed in each iteration and the updated second segment set.
[0149] Step S707: When the search end condition is met, the candidate closed-loop road segment set corresponding to the third road segment set with the lowest score is determined.
[0150] The search end condition may be that the search time (or iteration time) reaches an upper limit, or the number of searches (or iterations) reaches an upper limit, or the score of the third road segment set meets a preset condition.
[0151] To prevent the iteration process from taking too long, an upper limit on the number of iterations or the iteration time can be set. When the upper limit is reached, the iteration process ends and the candidate closed-loop segment set corresponding to the third segment set with the lowest score obtained from the iteration is determined as the closed-loop segment set.
[0152] If the number of iterations and the iteration time have not reached the upper limit, and the score of the third segment set obtained in the current iteration meets the preset conditions, the iteration process is terminated in advance, and the candidate closed-loop segment set corresponding to the third segment set is determined as the closed-loop segment set.
[0153] Step S708: Generate a movement line model of the address point based on the road sections in the closed-loop road section set.
[0154] In this embodiment, an iterative process and an evaluation function are used to realize the search for a closed-loop road segment set. The evaluation function is used to determine whether the cost of forming a closed loop in the third road segment set is low enough, thereby improving the quality of the closed-loop road segment set. By removing different combinations of alternative road segments with a degree value of 1 multiple times and re-routing, supplementary road segments are obtained, thereby realizing the update of the second road segment set, and re-determining a third road segment set using the new second road segment set. By continuously searching various combinations, the search for a globally or locally optimal third road segment set is realized, thereby improving the quality of the third road segment set and thereby improving the accuracy of the road representation of the address point.
[0155] Optionally, after obtaining the third segment set, the method further includes: adding a search node in the search tree based on the alternative segments with a third segment concentration value of 1; the search node corresponds to a combination of alternative segments with a third segment concentration value of 1; removing at least one alternative segment with a degree value of 1 from the first segment set, the second segment set and the third segment set at least once, and after removing at least one alternative segment with a degree value of 1 each time, searching from the first segment set for a supplementary segment that makes the third segment set form a closed loop, and updating the second segment set based on the supplementary segment, including: removing the alternative segment with a second segment concentration value of 0; deleting the alternative segment with a degree value of 1 corresponding to the current search node in the search tree from the first segment set, the second segment set and the third segment set; searching from the first segment set for a supplementary segment that makes the third segment set form a closed loop, and updating the second segment set based on the supplementary segment.
[0156] The search tree is a tree structure with search nodes as nodes other than the root node. A search node corresponds to a combination of candidate road segments with a third road segment concentration value of 1. A search node represents a combination of candidate road segments with a degree value of 1, that is, at least one candidate road segment with a degree value of 1.
[0157] After obtaining the third segment set in each iteration, candidate segments with a third segment concentration value of 1 are determined, and for various combinations of candidate segments with a third segment concentration value of 1, search nodes representing the combinations are added to the search tree.
[0158] For example, Figure 9 A schematic diagram of a newly added search node in the search tree provided in the embodiment of the present application is shown as follows: Figure 9 As shown, assuming that there are two alternative road segments link91 and link92 with a degree value of 1 in the first third road segment set, the corresponding four combinations are link91, link92, (link91, link92), and (link92, link91). Then, four new search nodes are added to the search tree with only the root node, representing the four combinations respectively. Figure 9In the figure, search node n90 is the root node. The corresponding combinations of search nodes n91 to n94 are link91, link92, (link91, link92), and (link92, link91), respectively. Taking node n93 as an example, the corresponding deletion strategy is to delete link91 first and then link92. In subsequent iterations, the search nodes in the search tree can be recursively traversed to delete the segments corresponding to the traversed search nodes, thereby updating the second segment set and obtaining the second segment set for the next iteration. This second segment set is then used in the next iteration to obtain the third segment set for this iteration, and new search nodes are added to the search tree using the aforementioned method. Assume that link91 was deleted in the previous iteration and some links were added to the second link set. The candidate links with a degree of 1 in the next third link set determined by the new second link set are link93 and link92. For the new candidate link link93 with a degree of 1, three nodes, n95, n96, and n97, can be added to the search tree to represent the three combinations of link93, (link92, link93), and (link93, link92). The search tree after adding nodes is as follows: Figure 9 shown.
[0159] The iterative process of updating the second segment set can be performed by traversing the search nodes in the search tree. Each time a search node is traversed, it is considered that the search node has been searched. For each traversal, the alternative segments with a degree value of 0 are first removed from the second segment set, and then the alternative segments with a degree value of 1 corresponding to the currently traversed search node are removed from the first to third segment sets. From the first segment set after the segment is removed, a search is performed to obtain a supplementary segment (referred to as the fourth segment set) that forms a closed loop in the third segment set after the segment is removed. The second segment set is then updated to the union of the second segment set and the fourth segment set, obtaining the second segment set corresponding to the next iteration.
[0160] In order to avoid the search time being too long, the upper limit of the search depth can be limited. The search depth is used to represent the level of the search tree being traversed in the search tree. When the search depth is less than or equal to its upper limit, the search nodes in the search tree are traversed in the above-mentioned manner, and new third road segment sets are continuously searched. If the search depth exceeds the upper limit, the untraversed branches are returned until there are no untraversed search nodes with a search depth less than or equal to the upper limit, and the candidate closed-loop road segment set corresponding to the third road segment set with the lowest score is output as the result.
[0161] The search tree can be traversed in any traversal method, such as Depth-First Search (DFS), Breadth-First Search (BFS), etc.
[0162] By traversing the search nodes in the search tree, the continuous search of the third road segment set is achieved, which improves the orderliness and efficiency of the search of the third road segment set, and further improves the efficiency of the address point road representation.
[0163] Optionally, the method further includes: if the score of the third segment set determined by the updated second segment set when searching multiple search nodes at increasing levels located at the target branch of the search tree increases, deleting the target branch from the search tree.
[0164] The level of a node is the depth of the node in the tree. The root node has the lowest level, usually 0 or 1. The level of the child nodes of the root node is 1 or 2, and the level of the child nodes of these child nodes is 2 or 3. The leaf node has the highest level.
[0165] If, in the process of searching the search nodes of the search tree, the score of the third road segment set determined by the second road segment set updated when searching multiple search nodes with increasing levels on the same branch of the search tree increases, it is determined that the current search direction is not desirable and pruning is required, that is, deleting the branch where the search node with the smallest level among the multiple search nodes is located from the search tree, thereby reducing the number of search nodes to be searched in the search tree, saving search time, and improving the efficiency of determining the road representation of the address point.
[0166] For example, Figure 10 A schematic diagram of search tree pruning provided in an embodiment of the present application is shown in FIG. Figure 10 As shown in the figure, after three searches, the search nodes of the search tree include n101 to n109. The search nodes n101, n103 and n105 in the search tree are searched in the first to third searches respectively. After removing the alternative link link101 with a degree value of 1 corresponding to n101, the second link set obtained is set1012. The third link set determined based on set1012 is set1013, and the score of set1013 is 0.3 points. After removing the alternative links link101 and link103 with a degree value of 1 corresponding to n103, the second link set obtained is s et1032, the third segment set determined based on set1032 is set1033, and the score of set1033 is 0.5 points; after removing the candidate segments link101, link103, and link105 with a degree value of 1 corresponding to n105, the second segment set obtained is set1052, and the third segment set determined based on set1052 is set1053, and the score of set1053 is 0.6 points. The increasing score indicates that the direction of removing link101 is not advisable, so the branch where the node n101 corresponding to link101 is located is cut off (such as Figure 10The dotted line framed part), since node n107 is only connected to node n103, after node n103 is pruned, node 107 becomes an isolated node, so node n107 needs to be deleted at the same time. The search tree after pruning is as follows Figure 10 As shown in the right figure, the search nodes include n102, n104, n106, n108 and n109.
[0167] Optionally, after each update of the second segment set, the candidate segments in the second segment set are used as multiple candidate segments, and the step of determining multiple alternative segments from the multiple candidate segments based on the distances and relative angles between multiple points on the multiple candidate segments and the address points is returned to execute, so as to obtain the third segment set for the next iteration, including: after each update of the second segment set, the scores of the third segment set and the candidate closed-loop segment set are stored in the result queue; if there are unsearched search nodes in the search tree, the candidate segments in the second segment set are used as multiple candidate segments, and the step of determining multiple alternative segments from the multiple candidate segments based on the distances and relative angles between multiple points on the multiple candidate segments and the address points is returned to execute, i.e., step S702, to perform the next iteration and obtain the third segment set for the next iteration; if the unsearched search node in the search tree is empty, the candidate closed-loop segment set corresponding to the third segment set with the lowest score in the result queue is determined as the closed-loop segment set.
[0168] Furthermore, after each update of the second road segment set, and after storing the score of the third road segment set and the corresponding candidate closed-loop road segment set in the result queue, if there is an unsearched search node in the search tree and the search depth is less than the preset depth, then return to the step of determining the third road segment set based on the distance and relative angle between multiple points on the candidate road segment in the second road segment set and the address point.
[0169] If there is no unsearched search node in the search tree whose search depth is less than the preset depth, the candidate closed-loop road segment set corresponding to the third road segment set with the lowest score in the result queue is determined as the closed-loop road segment set.
[0170] By introducing the search depth, the excessive number of iterations that would lead to a long search time for the closed-loop road segment set is avoided, and the efficiency of address point road representation is improved.
[0171] Another method for generating a dynamic line model is provided in an embodiment of the present application. The method specifically includes the following steps:
[0172] Step S1101 : Filter out a plurality of candidate road sections whose distances to the address point are less than or equal to a preset distance from the road sections within the grid area where the address point is located.
[0173] Step S1102 : determining a plurality of candidate road sections based on the distances and relative angles between a plurality of points on each of the plurality of candidate road sections and the address point.
[0174] Step S1103 : Search for supplementary road segments that form a closed loop among the multiple candidate road segments within the grid area where the address point is located, obtain a set of candidate closed loop road segments, and calculate scores of the multiple candidate road segments based on the supplementary road segments using an evaluation function.
[0175] Step S1104, determine whether the score is 0; if not, execute step S1105, if so, execute step S1118.
[0176] Step S1105 , initialization, initializing the search tree and search depth, initializing the first segment set to the segments within the grid area where the address point is located, initializing the second segment set to multiple candidate segments, and initializing the third segment set to multiple alternative segments.
[0177] Initializing the search tree specifically involves generating a search tree based on the search nodes with a degree of 1 in the plurality of candidate road segments. A search node in the initialized search tree represents a combination of candidate road segments with a degree of 1.
[0178] The search depth can be initialized to 0. The search depth is used to represent the level of the search node being traversed in the search tree.
[0179] The state space, recursive stack and result stack can also be initialized. The state space is used to store the first segment set, the second segment set and the search depth obtained after each iteration (including initialization); the recursive stack is used to store the search nodes traversed in each iteration, and the result stack is used to store the candidate closed-loop segment set and the score of the third segment set obtained in each iteration, so as to facilitate backtracking based on the recursive stack and the state space.
[0180] Step S1106 , determining whether there is an unsearched search node in the search tree whose search depth is less than or equal to the preset depth; if so, executing step S1107 ; if not, executing step S1116 .
[0181] Step S1107: Determine the search node for the next iterative search.
[0182] Step S1108 : determining a third road segment set based on the distances and relative angles between a plurality of points on the candidate road segments in the second road segment set and the address point, ie obtaining a third road segment set.
[0183] Step S1109 : searching for supplementary road segments that enable the third road segment set to form a closed loop from the first road segment set, obtaining a candidate closed loop road segment set, and calculating a score of the third road segment set based on the supplementary road segments using an evaluation function.
[0184] Step S1110 : updating the search tree based on the candidate road segments whose third road segment concentration value is 1.
[0185] Specifically, the candidate road segment with a degree value of 1 added in the third road segment set can be used to add a new search node in the search tree.
[0186] Step S1111, determine whether the score of the third road segment set is 0; if not, execute step S1112; if so, end the loop early and jump to step S1117.
[0187] Step S1112: storing the scores of the candidate closed-loop road segment set and the third road segment set in a result queue.
[0188] The result queue may be a result stack, and the scores of the candidate closed-loop road segment set and the third road segment set may be pushed into the result stack.
[0189] Step S1113: remove candidate road sections whose second road section concentration value is 0.
[0190] Step S1114 : Remove the candidate road segments with a degree value of 1 corresponding to the currently searched search node from the first road segment set, the second road segment set, and the third road segment set.
[0191] Step S1115 , searching from the first link set to obtain a fourth link set that enables the third link set to form a closed loop, and updating the second link set to be the union of the second link set and the fourth link set, and returning to step S1106 .
[0192] It can be determined whether the search depth of the child nodes of the search node searched in the current iteration is greater than the preset depth; if not, the child nodes of the search node searched in the current iteration of the search tree are determined to be the search nodes to be searched in the next iteration; if so, any one search node from the unsearched search nodes whose search depth is less than or equal to the preset depth is determined to be the search node to be searched in the next iteration.
[0193] In order to improve the search efficiency, the search node for the next iterative search may also be determined based on the score of each third road segment set in the result stack.
[0194] Specifically, it may be determined that among the unsearched search nodes whose search depth is less than or equal to the preset depth, the search node whose parent node corresponds to the lowest third road segment set score is the search node for the next iterative search.
[0195] Step S1116 : Determine the candidate closed-loop road segment set corresponding to the third road segment set with the lowest score in the result queue as the closed-loop road segment set.
[0196] When the result queue is a result stack, the candidate closed-loop road segment set with the lowest corresponding score in the result stack may be determined as the closed-loop road segment set.
[0197] For example, after K iterations, the result stack contains K sets of data, namely (S1, s1), (S2, s2), ..., (SK, sK), where K is an integer greater than 2, Si represents the set of candidate closed-loop road segments obtained in the i-th iteration (an integer ranging from 1 to K), and si represents the score of the third road segment set obtained in the i-th iteration. If s2 is the smallest, S2 can be popped from the stack and used as the closed-loop road segment set to generate the address point movement line model.
[0198] Step S1117 : Determine the candidate closed-loop road segment set corresponding to the third set with a score of 0 as the closed-loop road segment set.
[0199] Step S1118: Determine that the set of multiple candidate road segments is a closed-loop road segment set.
[0200] Figure 11 Schematic diagram of the process of generating a dynamic line model provided in the embodiment of the present application Figure 4 ,like Figure 11 As shown, the dynamic line model generation method mainly includes the following steps:
[0201] Step S1201, user map point selection: the user selects one or more address points on the electronic map.
[0202] Step S1202, preliminary screening of road segments: for each address point selected by the user, a set of candidate road segments whose distance to the address point is less than or equal to a preset distance is screened from the road segments within the grid area where the address point is located.
[0203] Step S1203, initialize the state space, link stack and result stack: initialize the state space to the initial values of set1, set2 and d, initialize the link stack to the initial value of set2, and initialize the result stack to empty.
[0204] Among them, the initial value of set1 is the road segment within the grid area where the address point is located; the initial value of set2 is the set of candidate road segments obtained by the initial screening of road segments; d is the search depth, and its initial value is 0.
[0205] Step S1204: Based on set2, set3 is determined, and based on the evaluation function, the supplementary road segments, scores, and road segments in set3 with median values of 0 and 1 are determined.
[0206] Specifically, based on the distances and relative angles between a plurality of points on each road segment in set2 and the address point, set3 can be determined from set2, where set3 is a subset of set2.
[0207] Any path-finding algorithm can be used to find the shortest path that forms a closed loop among the road segments in set3, obtain the supplementary road segments of set3, and determine the score of set3 based on the supplementary road segments and the evaluation function, and determine the road segments in set3 with a median value of 0 and 1.
[0208] Step S1205: Initialize the search space based on the road segments with a median value of 1 in set3. The search space is a set of search nodes to be searched.
[0209] Step S1206, heuristic search: traverse the search nodes in the search space based on heuristic search, update set1 and set2 based on the traversed search nodes, obtain a new state in the state space, and determine set3 based on the updated set2, and determine the score of set3 based on the evaluation function, set1 and set2 are put into the link stack, set3 and its score are put into the result stack, and the search space is updated based on the road section with a median value of 1 in set3, until a set3 with a score of 0 is obtained or there is no search node in the search space with a search depth less than or equal to the preset depth.
[0210] Step S1207, road representation output: If set3 with a score of 0 is obtained, loop repair is performed on set3 with a score of 0 and its supplementary road segments to obtain the road representation of the address point; if there is no search node in the search space with a search depth less than or equal to the preset depth, loop repair is performed on set3 with the lowest score in the result stack and its supplementary road segments to obtain the road representation of the address point, and the road representation of the address point is output.
[0211] Loop repair for a set of road segments involves numbering the endpoints of the segments in the set and treating the endpoints of different segments that are close together, for example, within a distance of 5 meters or less, as a single endpoint. An undirected graph representing the road network of the segments in the set is then generated, using the endpoints of the segments as nodes. A depth-first traversal is performed to find the shortest loop path in the graph. The segments corresponding to the nodes traversed by the loop path are then assigned as address points, representing the road representation, or traffic flow model.
[0212] After obtaining the traffic flow model of the address point to be constructed by the traffic flow model generation method provided by any of the aforementioned embodiments, the types of constructible points of interest, such as parks, shops, gas stations, etc., can be recommended for the address point to be constructed based on the characteristics of the road sections contained in the traffic flow model of the address point.
[0213] An embodiment of the present application also provides an address evaluation method, including: obtaining a movement line model of an address point, wherein the movement line model of the address point is obtained based on the movement line model generation method provided in any embodiment of the present application; and generating an evaluation result of the address point based on the movement line model of the address point.
[0214] Specifically, an evaluation score for an address point can be determined based on the attributes and / or traffic characteristics of each road segment included in the traffic flow model for the address point, and an evaluation result for the address point can be generated based on the evaluation score. If there are multiple address points, an evaluation result can be generated based on the scores of each of the multiple address points. The evaluation result may include a recommended address point.
[0215] For example, the evaluation score of the address point may be a weighted calculation result of multiple attributes and traffic characteristics of each road segment included in the traffic line model of the address point.
[0216] The various attributes of a road segment include the road grade, road type, and road popularity of the road segment. The traffic characteristics of a road segment may include the vehicle flow and pedestrian flow of the road segment in one or more units of time in history.
[0217] The user may provide multiple candidate address points, i.e., address points where POIs are to be constructed, for example, by selecting multiple candidate address points from a map. The user may evaluate the multiple candidate address points using the obtained movement path models of the candidate address points to obtain an evaluation score for each candidate address point. An address evaluation result is generated based on the evaluation score for each candidate address point.
[0218] Other devices or modules may also send the address points to be evaluated to the address point evaluation device, which obtains the movement line model of the address points to be evaluated, and evaluates the address points based on the movement line model to generate an evaluation result of the address points.
[0219] For each alternative address point, the road section features contained in the traffic line model of the alternative address point can be input into a pre-trained address point evaluation model, and the evaluation score or type of the alternative address point can be output based on the address point evaluation model, thereby generating a site selection evaluation result based on the evaluation score or type of each alternative address point.
[0220] An embodiment of the present application also provides a movement line model generation device, including: a candidate road section determination module, used to obtain multiple candidate road sections for an address point; a candidate road section is a road section whose distance from the address point is less than or equal to a preset distance; an alternative road section determination module, used to determine multiple alternative road sections from multiple candidate road sections based on the distance and relative angle between multiple points on the multiple candidate road sections and the address point; and a movement line model generation module, used to generate a movement line model of the address point based on the multiple alternative road sections.
[0221] In one possible implementation, the alternative road section determination module includes: a connection length and angle determination unit, which is used to obtain the length and angle of the connection between multiple points on the candidate road section and the address point for each candidate road section; a sorting unit, which is used to sort multiple connection lines with the same angle in order from short to long according to the length of the connection lines; and an alternative road section determination unit, which is used to determine multiple alternative road sections from multiple candidate road sections based on the sorting results.
[0222] In one possible implementation, the line length and angle determination unit is specifically used to: for each candidate road section, divide the candidate road section into multiple sub-segments; for each sub-segment of the candidate road section, connect multiple equally divided points on the sub-segment with the address point, and calculate the length and angle of the line of each equally divided point; based on the angle of the line connecting the first equally divided point and the last equally divided point of each sub-segment of the candidate road section, determine the angle interval corresponding to the candidate road section; based on the length and angle of the line connecting the equally divided points of each sub-segment of the candidate road section, obtain the length of the line connecting the points on the candidate road section whose angle with the address point is within the angle interval.
[0223] In one possible implementation, the alternative road section determination unit is specifically used to: count the proportion of the lines connecting the points on each candidate road section and the address point in the sorting results that are located before a preset number of lines and unsorted lines; based on the proportion of each candidate road section and the target distance, determine multiple alternative road sections from the multiple candidate road sections; wherein the target distance is determined based on the length of the line connecting the points on the candidate road section.
[0224] In one possible implementation, the movement line model generation module includes: a closed-loop road segment set determination unit, used to search for supplementary road segments that form a closed loop among multiple alternative road segments, thereby obtaining a closed-loop road segment set; and a movement line model generation unit, used to generate a movement line model of an address point based on the road segments in the closed-loop road segment set.
[0225] In one possible implementation, the closed-loop segment set determination unit includes: a routing subunit, used to search for supplementary segments that enable multiple alternative segments to form a closed loop, to obtain a candidate closed-loop segment set; a score calculation subunit, used to calculate the scores of multiple alternative segments based on the supplementary segments using an evaluation function; and a first determination subunit, used to determine that the candidate closed-loop segment set corresponding to the multiple alternative segments is a closed-loop segment set if the scores of the multiple alternative segments meet a preset condition.
[0226] In one possible implementation, the closed-loop segment set determination unit also includes a second determination subunit, which is used to: if the scores of multiple alternative segments do not meet the preset conditions, remove at least one alternative segment with a degree value of 1; in a road network composed of multiple alternative segments, one end of the alternative segment with a degree value of 1 is connected to other alternative segments, and the other end is not connected to other alternative segments; search for a supplementary segment that forms a closed loop among the removed alternative segments, and update multiple candidate segments based on the supplementary segment; return to execute the step of determining multiple alternative segments from multiple candidate segments until the search end condition is met; when the search end condition is met, determine the candidate closed-loop segment set corresponding to the multiple alternative segments with the lowest scores as the closed-loop segment set.
[0227] In a possible implementation, the second determination subunit is specifically used to: if the scores of multiple alternative road sections do not meet the preset conditions, remove at least one alternative road section with a degree value of 1 from the first road section set, the second road section set and the third road section set at least once, and after removing at least one alternative road section with a degree value of 1 each time, search from the first road section set to obtain a supplementary road section that makes the third road section set form a closed loop, and update the second road section set based on the supplementary road section; after each update of the second road section set, take the candidate road sections in the second road section set as multiple candidate road sections, return to execute the distance and relative angle between multiple points on the multiple candidate road sections and the address point, and select the candidate road sections from the multiple candidate road sections. The step of determining multiple alternative road segments from the candidate road segments to obtain the third road segment set for the next iteration; when the search end condition is met, determining the candidate closed-loop road segment set corresponding to the third road segment set with the lowest score, or the candidate closed-loop road segment set corresponding to the third road segment set whose score meets the preset condition, as the closed-loop road segment set; wherein, the initial value of the first road segment set is the road segment within the grid area where the address point is located, the initial value of the second road segment set is the multiple candidate road segments, and the initial value of the third road segment set is the multiple alternative road segments; in the road network composed of the multiple alternative road segments, one end of the alternative road segment with a degree value of 1 is connected to the other alternative road segments, and the other end is not connected to the other alternative road segments.
[0228] In one possible implementation, the second determination subunit is also used to: after obtaining the third road segment set, add a search node in the search tree based on the alternative road segments with a third road segment concentration value of 1; the search tree is a tree structure with search nodes as nodes other than the root node, and the search nodes correspond to a combination of alternative road segments with a third road segment concentration value of 1.
[0229] Correspondingly, the second determination subunit is specifically used each time the second road segment set is updated to: remove the alternative road segments with a degree value of 0 in the second road segment set; delete the alternative road segments with a degree value of 1 corresponding to the search node currently being searched in the search tree from the first road segment set, the second road segment set and the third road segment set; search from the first road segment set to obtain the supplementary road segments that make the third road segment set form a closed loop, and update the second road segment set based on the supplementary road segments.
[0230] Correspondingly, after each update of the second road segment set, the second determination subunit is specifically used to: store the score of the third road segment set and the candidate closed-loop road segment set in the result queue; if there is an unsearched search node in the search tree, then use the candidate road segments in the second road segment set as multiple candidate road segments, and return to execute the step of determining multiple alternative road segments from the multiple candidate road segments based on the distances and relative angles between multiple points on the multiple candidate road segments and the address point, so as to obtain the third road segment set for the next iteration; if the unsearched search node in the search tree is empty, then determine the candidate closed-loop road segment set corresponding to the third road segment set with the lowest score in the result queue as the closed-loop road segment set.
[0231] In one possible implementation, the second determination subunit is further configured to: delete the target branch from the search tree if the score of the third segment set determined by the second segment set updated when searching multiple search nodes at increasing levels located at the target branch of the search tree increases.
[0232] In one possible implementation, the movement line model generation unit is specifically used to: generate an undirected graph based on a road network composed of sections in a closed-loop section concentration; wherein the undirected graph uses sections in the closed-loop section concentration as nodes, and sections corresponding to the nodes connected by edges are connected to each other in the road network; based on a depth-first traversal algorithm, traverse the undirected graph to determine the nodes that form a loop in the undirected graph; and generate a movement line model of the address point based on the sections corresponding to the nodes that form a loop in the undirected graph.
[0233] The movement line model generation device provided in this embodiment can execute the movement line model generation method provided in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0234] An embodiment of the present application also provides an address evaluation device including: a movement line model acquisition module, used to obtain the movement line model of the address point, wherein the movement line model of the address point is obtained based on the movement line model generation method provided in any embodiment of the present application; an evaluation result generation module, used to generate an evaluation result of the address point based on the movement line model of the address point.
[0235] Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 12 As shown, the electronic device provided by this embodiment includes: at least one processor 1301 and a memory 1302. Optionally, the electronic device further includes a communication component 1303. The processor 1301, the memory 1302 and the communication component 1303 are connected via a bus 1304.
[0236] During the specific implementation process, at least one processor 1301 executes the computer-executable instructions stored in the memory 1302, so that the at least one processor 1301 performs the above method.
[0237] The specific implementation process of the processor 1301 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0238] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules in the processor.
[0239] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0240] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0241] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0242] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0243] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0244] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0245] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.
[0246] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0247] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0248] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0249] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0250] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.
Claims
1. A method for generating a dynamic line model, characterized in that: include: Acquire multiple candidate road sections of the address point; the candidate road sections are road sections whose distance from the address point is less than or equal to a preset distance; Determining a plurality of candidate road sections from the plurality of candidate road sections based on distances and relative angles between a plurality of points on the plurality of candidate road sections and the address point; Based on the multiple candidate road sections, a movement line model of the address point is generated.
2. The method according to claim 1, characterized in that The determining of a plurality of candidate road segments from the plurality of candidate road segments based on the distances and relative angles between a plurality of points on the plurality of candidate road segments and the address point comprises: For each candidate road segment, obtaining the length and angle of the line connecting multiple points on the candidate road segment and the address point; For multiple lines at the same angle, sort them in order of length from short to long; Based on the ranking result, a plurality of candidate road sections are determined from the plurality of candidate road sections.
3. The method according to claim 2, characterized in that The step of determining a plurality of candidate road sections from the plurality of candidate road sections based on the sorting result includes: Counting the proportion of the lines between the points on each candidate road section and the address point that are located before a preset number of lines in the sorting result and the proportion of the unsorted lines; Based on the proportion and target distance of each candidate road segment, multiple candidate road segments are determined from the multiple candidate road segments; wherein the target distance is determined based on the length of the line connecting the points on the candidate road segments.
4. The method according to any one of claims 1 to 3, characterized in that Generating a movement line model of the address point based on the multiple candidate road sections includes: Searching for supplementary road segments that enable the plurality of candidate road segments to form a closed loop, and obtaining a closed loop road segment set; A movement line model of the address point is generated based on the road sections in the closed-loop road section set.
5. The method according to claim 4, characterized in that The search obtains supplementary road segments that enable the plurality of candidate road segments to form a closed loop, and obtains a closed loop road segment set, including: Searching for supplementary road segments that enable the plurality of candidate road segments to form a closed loop, to obtain a candidate closed-loop road segment set; Calculating scores of the plurality of candidate road segments based on the supplementary road segment using an evaluation function; If the scores of the multiple candidate road sections meet a preset condition, the candidate closed-loop road section set corresponding to the multiple candidate road sections is determined to be the closed-loop road section set.
6. The method according to claim 5, characterized in that If the scores of the multiple candidate road sections do not meet the preset condition, the method further includes: Removing at least one candidate road segment with a degree value of 1; in a road network consisting of the plurality of candidate road segments, one end of the candidate road segment with a degree value of 1 is connected to other candidate road segments, and the other end is not connected to other candidate road segments; Searching for a supplementary road segment that forms a closed loop with the removed candidate road segments, and updating the plurality of candidate road segments based on the supplementary road segment; returning to the step of determining a plurality of candidate road segments from the plurality of candidate road segments until a search end condition is met; When the search end condition is met, the candidate closed-loop road segment set corresponding to the multiple candidate road segments with the lowest scores is determined as the closed-loop road segment set.
7. The method according to claim 4, characterized in that The generating of the movement line model of the address point based on the road sections in the closed-loop road section set includes: generating an undirected graph based on a road network composed of the road segments in the closed-loop road segment set; wherein the undirected graph has the road segments in the closed-loop road segment set as nodes, and the road segments corresponding to the nodes connected by edges are connected to each other in the road network; Traversing the undirected graph based on a depth-first traversal algorithm to determine nodes that form a cycle in the undirected graph; A movement line model of the address point is generated based on the road sections corresponding to the nodes forming a loop in the undirected graph.
8. An address evaluation method, characterized in that: include: Obtaining a movement line model of the address point, wherein the movement line model of the address point is obtained based on the method provided in any one of claims 1 to 7; An evaluation result of the address point is generated based on the movement line model of the address point.
9. A moving line model generating device, characterized in that: include: A candidate road section determination module is used to obtain multiple candidate road sections of an address point; the candidate road sections are road sections whose distance from the address point is less than or equal to a preset distance; an alternative road section determination module, configured to determine a plurality of alternative road sections from the plurality of candidate road sections based on distances and relative angles between a plurality of points on the plurality of candidate road sections and the address point; A movement line model generation module is used to generate a movement line model of the address point based on the multiple candidate road sections.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when executed by a processor.