Road network optimization method and related apparatus
By globally optimizing and smoothing the road network data, the deviation problem caused by data of different precision in road network data updates is solved, and the quality of road network data and the smoothness of connection relationships are improved.
Patent Information
- Application Number
- PCT/CN2025/079683
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-21
- Filing Date
- 2025-02-28
- Publication Date
- 2025-09-25
AI Technical Summary
During the process of updating road network data, there are deviations in the accuracy of data collected by different technologies or means, which leads to deviations between the updated and unupdated parts, affecting the quality of road network data.
By globally optimizing and smoothing the original road network data, considering the position influence of neighboring road segments, the road network is optimized based on the new position information and the original position information of neighboring road segments, and the optimized road network is constructed.
It eliminates the deviation caused by the fusion of position information of different precisions, improves the quality of road network data after the fusion of new and old position information, and ensures a smooth transition of the connection relationship between road segments and neighboring segments.
Smart Images

Figure CN2025079683_25092025_PF_FP_ABST
Abstract
Description
A road network optimization method and related device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 21, 2024, application number 202410328236.1, and application name “A Road Network Optimization Method and Related Devices”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of data processing technology, and in particular to road network optimization technology. Background Art
[0003] A road network is a directed graph derived from modeling real-world roads. With the maturity and application of technologies like high-precision positioning, lane-level positioning, and autonomous driving, road network data has become a crucial infrastructure, requiring high accuracy. Consequently, it needs to be continuously updated.
[0004] During the update process, new road network data can be collected, and the existing road network data can be updated with the new road network data. New road network data can be collected based on different technologies and methods, such as high-precision track collection, crowd-sourced track collection and image data, and satellite image data. Different technologies or methods can generate the corresponding road network data for the collected part.
[0005] However, there are certain deviations in the accuracy of data collected by different technologies or means, and since data production is partially updated, it will cause deviations between the updated and unupdated parts, affecting the quality of the updated road network data. Summary of the Invention
[0006] In order to solve the above technical problems, the present application provides a road network optimization method and related devices to globally optimize and smooth the original road network data to eliminate the problems caused by the fusion of position information of different accuracies, thereby avoiding the deviation between the updated part and the non-updated part, and improving the quality of the road network data obtained after the fusion of new and old position information.
[0007] The embodiments of this application disclose the following technical solutions:
[0008] In one aspect, an embodiment of the present application provides a road network optimization method, the method being executed by a computer device, the method comprising:
[0009] After collecting the new location information of the road segment to be processed, obtaining the original road network data to which the road segment to be processed belongs;
[0010] For each road segment in the original road network data, determining a neighboring road segment of the road segment;
[0011] Performing road network optimization based on the new position information and original position information of neighboring road segments of each road segment in the original road network data to obtain optimized position information of each road segment;
[0012] The optimized road network of the original road network data is constructed using the optimized position information of each road segment.
[0013] In one aspect, an embodiment of the present application provides a road network optimization device, which is deployed on a computer device and includes an acquisition unit, a determination unit, an optimization unit, and a construction unit:
[0014] The acquisition unit is configured to acquire original road network data of the road segment to be processed after acquiring the new location information of the road segment to be processed;
[0015] The determining unit is configured to determine, for each road segment in the original road network data, a neighboring road segment of the road segment;
[0016] The optimization unit is configured to perform road network optimization based on the new position information and original position information of neighboring road segments of each road segment in the original road network data, to obtain optimized position information of each road segment;
[0017] The construction unit is used to construct an optimized road network of the original road network data using the optimized position information of each road segment.
[0018] In one aspect, an embodiment of the present application provides a computer device, comprising a processor and a memory.
[0019] The memory is used to store a computer program and transmit the computer program to the processor;
[0020] The processor is configured to execute the method described in any one of the preceding aspects according to instructions in the computer program.
[0021] In one aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program. When the computer program is executed by a processor, the processor executes the method described in any one of the aforementioned aspects.
[0022] In one aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the method described in any of the aforementioned aspects when executed by a processor.
[0023] As can be seen from the above technical solution, when integrating the newly collected location information with the existing road network data (i.e., the original road network data), the new location information is not directly used to replace the original location information of the road segment to be processed. Instead, the original road network data is globally optimized. Specifically, after collecting the new location information of the road segment to be processed, the original road network data corresponding to the road segment to be processed is obtained. Then, for each road segment in the original road network data, the neighboring road segments of the road segment are determined. This allows the influence of the neighboring road segments on the location of each road segment to be considered during global network optimization. Network optimization is then performed based on the new location information and the original location information of each road segment's neighboring road segments in the original road network data, resulting in optimized location information for each road segment. This ensures the connection between each road segment and its neighboring road segments after optimization. Using the optimized location information of each road segment obtained in the above process, an optimized road network based on the original road network data is constructed, achieving global optimization and smoothing. This application performs global optimization and smoothing on the original road network data to eliminate the problems caused by the fusion of position information of different accuracies, thereby avoiding the deviation between the updated part and the unupdated part, and improving the quality of the road network data obtained after the fusion of new and old position information. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technical members in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0025] FIG1 is an application scenario architecture diagram of a road network optimization method provided by an embodiment of the present application;
[0026] FIG2 is a flow chart of a road network optimization method provided in an embodiment of the present application;
[0027] FIG3 is an example diagram of the positional relationship between main and auxiliary roads in a satellite image provided by an embodiment of the present application;
[0028] FIG4 is an example diagram of road network data obtained for the same main and auxiliary roads according to an embodiment of the present application;
[0029] FIG5 is an example diagram of converting original road network data into graph data according to an embodiment of the present application;
[0030] FIG6 is an example diagram of the positional relationship between road segments in an upper and lower elevated road scenario provided by an embodiment of the present application;
[0031] FIG7 is an example diagram of the positional relationship between a main road and a secondary road in a main-secondary road scenario provided by an embodiment of the present application;
[0032] FIG8 is a diagram illustrating an example of the actual application effect of a road network optimization method provided in an embodiment of the present application;
[0033] FIG9 is an example diagram of the actual application effect of another road network optimization method provided in an embodiment of the present application;
[0034] FIG10 is a structural diagram of a road network optimization device provided in an embodiment of the present application;
[0035] FIG11 is a structural diagram of a terminal provided in an embodiment of the present application;
[0036] FIG12 is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The embodiments of the present application are described below with reference to the accompanying drawings.
[0038] To facilitate understanding, the relevant concepts are first explained.
[0039] Road Network: A directed graph modeling real-world roads is called a road network. Each edge in the directed graph represents a segment of a real road, called a road segment.
[0040] Road Segment: Each road is typically represented by multiple line segments. Each line segment is represented by its start and end location information (e.g., longitude and latitude). The start and end points of a road are the start and end points of the first and last line segments, and each line segment is called a road segment. A road segment typically also includes the number of lanes, traffic lights, lane directions, and other information.
[0041] Elevation: The distance from a point on a road segment in a road network to an absolute base along a vertical line can be called absolute elevation, or simply elevation. The absolute base here is generally sea level.
[0042] Overlapping: This refers to two road segments that are located in the same plane and are close to each other, resulting in spatial overlap. This overlap can be caused by a variety of factors, including temporary road repairs and local road network optimization.
[0043] Road network shape optimization: This can refer to adjusting the position of each point in a road segment, thereby changing the shape of each road segment and making the overall road network data more accurate.
[0044] Graph model: can be a model used to process graph structured data.
[0045] Graph Neural Network (GNN): A type of graph model, GNN is a method of applying neural networks to graphs. It uses neural networks to learn from graph-structured data, extracting and discovering features and patterns within it. Its input is a directed or undirected graph.
[0046] The relevant technology provides various methods for obtaining road network data. After obtaining the road network data, new road network data may continue to be generated. In order to ensure the accuracy of the road network data used, it may be necessary to use the new road network data to update the existing road network data.
[0047] New road network data may be collected based on different technologies and means. The data collected by different technologies or means may have certain deviations in accuracy. Moreover, since data production is partially updated, that is, the newly collected road network data may be the location information of some road sections in the existing road network data, when the newly collected road network data is used to update the existing road network data, there may be deviations between the updated part and the unupdated part. The fusion of data with different accuracies may affect the quality of the updated road network data.
[0048] To address the aforementioned technical issues, embodiments of the present application provide a road network optimization method. This method does not directly replace the original location information of the road segment to be processed with new location information to generate new road network data. Instead, it performs a global smoothing of the original road network data to eliminate issues associated with the fusion of data of varying precision. In other words, it performs a holistic shape optimization of the original road network data. During the optimization process, the influence of neighboring road segments on the position of that road segment is taken into account. The network is then optimized based on the new location information and the original location information of each road segment's neighboring road segments in the original road network data. This ensures that each road segment maintains a consistent connection with its neighboring road segments after optimization, achieving global optimization and smoothing of the road network data.
[0049] It should be noted that the road network optimization method provided in the embodiments of this application can be applied to fields such as electronic maps, autonomous driving, assisted driving, smart transportation, cloud technology, and artificial intelligence, all of which may require road network data. Scenarios using road network data include autonomous driving, high-precision positioning, lane-level positioning, traffic management, urban planning, tourism, logistics, gaming, virtual reality, and augmented reality, though these are not limited in the embodiments of this application.
[0050] The road network optimization method provided in the embodiments of the present application can be executed by a computer device, which can be, for example, a server or a terminal. The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. Terminals include, but are not limited to, smartphones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, and the like.
[0051] As shown in FIG1 , FIG1 shows an application scenario architecture diagram of a road network optimization method. The application scenario is introduced by taking a computer device being a server as an example. The application scenario may include a server 100 .
[0052] Road network data is a crucial infrastructure, requiring high accuracy. Therefore, it must be constantly updated. Since data is generated and updated partially, during the update process, only a portion of the road network data may be updated. This means that the newly collected road network data contains the location information of a portion of the road segments. This requires integrating the newly collected location information of the partial road segments with the existing road network data to achieve the update.
[0053] The newly collected location information for some road segments can be collected using different technologies and methods. Data collected using these different technologies or methods may have certain variations in accuracy, which can lead to discrepancies between updated and unupdated parts during fusion. Therefore, to address the aforementioned issues arising from the fusion process, the method provided in the embodiments of this application can be used to optimize the road network data as a whole.
[0054] Specifically, after collecting the new location information of the road segment to be processed, the server 100 may obtain the original road network data to which the road segment to be processed belongs.
[0055] The road segments to be processed are collected road segments with updated data (e.g., location information). These road segments can be part of the road network data. The new location information is newly collected location information for the road segments to be processed. This new location information can be used as a target for road network optimization. The original road network data can refer to existing road network data that includes the road segments to be processed and needs to be updated with the new location information.
[0056] For each road segment in the original road network data, server 100 can then determine the road segment's neighboring road segments. This allows the impact of these neighboring road segments on the location of each road segment to be considered during global network optimization. Network optimization is then performed based on the new location information and the original location information of each road segment's neighboring road segments in the original road network data, resulting in optimized location information for each road segment. This ensures the connectivity between each road segment and its neighboring road segments after optimization. Using the optimized location information for each road segment obtained in this process, an optimized road network based on the original road network data is constructed, achieving global optimization and smoothing.
[0057] It should be noted that in the specific implementation of this application, user information and other related data may be involved in the entire process. When the above embodiments of this application are applied to specific products or technologies, the user's separate consent or separate permission is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0058] Next, the road network optimization method provided by the embodiment of the present application will be introduced with reference to the accompanying drawings. Referring to FIG2 , FIG2 shows a flow chart of a road network optimization method, the method comprising:
[0059] S201: After collecting new location information of a road segment to be processed, obtaining original road network data to which the road segment to be processed belongs.
[0060] Road network data is generated by modeling real-world roads. To ensure the accuracy of this data, it may be necessary to continually update it. For example, real-world roads may change, such as a road widening or the addition of a secondary road. To accurately reflect real-world roads, existing network data must be updated. Similarly, the data collection techniques and methods used during modeling may change. To continuously improve the accuracy of this data, this data must be updated.
[0061] Since data production is always updated partially, during the update process, only a portion of the road network data may be updated. That is, the newly collected road network data is the location information of a portion of road segments. This requires integrating the newly collected location information of these road segments with the existing road network data (i.e., the original road network data) to update the road network data. The road segments where data updates are performed can be referred to as pending road segments, and the newly collected location information of these road segments can be referred to as new location information. The new location information can be high-precision ground-truth road network data. The original road network data is the road network data used to model real-world roads before the data update.
[0062] The embodiments of this application do not limit the method for collecting new location information. In one possible implementation, the new location information can be derived from high-precision three-dimensional point cloud data collected by high-precision acquisition equipment. Using a three-dimensional point cloud recognition algorithm, the precise location of each element of the road segment to be processed, i.e., the new location information, can be obtained. Generally, the error of the new location information recognized by the high-precision acquisition equipment is less than 1 meter, and therefore can be used as true value data. However, there are three issues with true value data: First, due to the high acquisition cost of high-precision acquisition equipment, the true value data of the road segment to be processed often only covers a relatively small number of road segments in the road network data; Second, because high-precision three-dimensional point cloud data requires algorithmic post-processing to obtain highly accurate new location information, and the algorithm itself has certain limitations, such as a certain loss of accuracy in complex intersections or scenes with severe occlusion; Third, because real-world roads can change constantly, while true value data is collected over a period of time, the true value data also has certain timeliness issues.
[0063] Due to these issues with ground truth data, fusing new location information with the original road network data can cause discrepancies between updated and unupdated parts, impacting the quality of the updated road network data. This is especially true in scenarios involving primary and secondary roads. When new road network data is collected for the primary road but not for the secondary road, this often results in overlapping road surfaces due to the shift in the primary road's location.
[0064] Refer to Figures 3 and 4. Figure 3 shows the positional relationship between primary and secondary roads in a satellite image, while Figure 4 shows an example of road network data obtained for the same primary and secondary roads. In the satellite image, 301 represents the secondary road, and 302 represents the primary road, accurately reflecting the real-world positional relationship between primary and secondary roads. In Figure 4, the secondary and primary roads in the real world are each modeled as a line, with line 401 representing the secondary road and line 402 representing the primary road. The secondary road is positioned lower, resulting in an overlapping relationship between the primary and secondary roads.
[0065] To this end, after collecting the new location information of the road segment to be processed, the embodiment of the present application needs to comprehensively consider the position and shape of the current existing road network after using the new location information, and at the same time do a good job of adapting the true value data to complex scenes such as ordinary road segments and intersections. Therefore, the road network data can be globally optimized through the method provided in the embodiment of the present application.
[0066] S202: For each road segment in the original road network data, determine a neighboring road segment of the road segment.
[0067] In many cases, each road segment in the original road network data may not exist independently but may have dependencies on other road segments, such as its neighboring road segments. Neighboring road segments may be other road segments connected to the segment, and the positions of a road segment and its neighboring road segments affect each other. Updating the location information of a road segment without considering its neighboring road segments may result in an unsmooth transition between the updated segment and its neighboring road segments, misalignment, or even other issues.
[0068] Based on this, the embodiment of the present application determines the neighboring road segments of each road segment, so that when performing global road network optimization, the influence of the neighboring road segments on the position of each road segment is considered.
[0069] S203 : Perform road network optimization based on the new position information and the original position information of the neighboring road segments of each road segment in the original road network data to obtain optimized position information of each road segment.
[0070] S204: Construct an optimized road network of the original road network data using the optimized position information of each road segment.
[0071] For each road segment, the influence of neighboring road segments on its position is taken into account. Then, based on the new position information and the original position information of each road segment's neighboring road segments in the original road network data, the road network is optimized to obtain the optimized position information for each road segment. This ensures the connection between each road segment and its neighboring road segments after optimization. Using the optimized position information of each road segment obtained in this process, an optimized road network is constructed based on the original road network data, achieving global optimization and smoothing.
[0072] It should be noted that when performing road network optimization based on the new location information and the original location information of each road segment's neighboring road segments in the original road network data, the new location information is not directly used to replace the original location information of the road segment to be processed. Instead, global optimization is performed by considering the positional relationship, shape, and transition between the road segment to be processed and its neighboring road segments to achieve a smooth transition, thereby ensuring that the optimized road network can reflect the actual situation of the road segment in real time.
[0073] As can be seen from the above technical solution, when integrating the newly collected location information with the existing road network data (i.e., the original road network data), the new location information is not directly used to replace the original location information of the road segment to be processed. Instead, the original road network data is globally optimized. Specifically, after collecting the new location information of the road segment to be processed, the original road network data corresponding to the road segment to be processed is obtained. Then, for each road segment in the original road network data, the neighboring road segments of the road segment are determined. This allows the influence of the neighboring road segments on the location of each road segment to be considered during global network optimization. Network optimization is then performed based on the new location information and the original location information of each road segment's neighboring road segments in the original road network data, resulting in optimized location information for each road segment. This ensures the connection between each road segment and its neighboring road segments after optimization. Using the optimized location information of each road segment obtained in the above process, an optimized road network is constructed based on the original road network data, achieving global optimization and smoothing. This application performs global optimization and smoothing on the original road network data to eliminate the problems caused by the fusion of position information of different accuracies, thereby avoiding the deviation between the updated part and the unupdated part, and improving the quality of the road network data obtained after the fusion of new and old position information.
[0074] In one possible implementation, a graph model can be used to implement global optimization. The graph model can be a method for vectorizing vertices on a graph as entities. When using the graph model to implement global optimization, the method for determining the neighboring road segments of a road segment can be to determine the neighboring road segments of the road segment based on the graph structure data that the graph model can process. In order to obtain the graph structure data that the graph model can process, the server can perform data conversion on the original road network data to which the road segment to be processed belongs, and obtain graph data of the original road network data. The graph data is an abstract graph corresponding to the original road network data. The graph data can include a first vertex and a first edge between the first vertices. The first vertex is a road segment in the original road network data, and the first edge is a road node connecting different road segments in the original road network data. Based on the existence of the first edge between the first vertices in the graph data, the first neighbor point of each first vertex in the graph data is determined, and then the neighboring road segments of the road segment are determined according to the first neighbor point of the first vertex corresponding to the road segment.
[0075] It is understandable that in the road network optimization problem, the road segment is the target entity for optimization. The association relationship between road nodes in the road network can be almost considered to be fixed. When constructing the graph data corresponding to the original road network data, the embodiment of the present application swaps the road nodes and road segments on the original road network data. The road segments on the original road network data correspond to the first vertices on the graph data, and the road nodes on the original road network data correspond to multiple first edges on the graph data. As shown in Figure 5, the original road network data contains five road segments and six road nodes. The five road segments are represented as L1, L2, L3, L4 and L5, and the six road nodes are represented as N1, N2, N3, N4, N5 and N6. The converted graph data can be seen in the lower part of Figure 5. Each road segment corresponds to a vertex on the graph data (the vertex on the graph data is called the first vertex). If a road node connects two different road segments, then the road node connects an edge between the first vertices on the graph data (the edge on the graph data is called the first edge). For a road node like N3, since it has only one road segment connected to it, N3 has no corresponding edge in the graph data. Thus, the graph data corresponding to the original road network data is obtained. Graph data is generally represented as G(V, E), where V represents the vertex set and E represents the edge set, i.e., the set of the first edge.
[0076] After obtaining the graph data, whether there is a first edge between the first vertices in the graph data can reflect whether the first vertices have a neighbor relationship. If a first edge exists between two first vertices, then the two first vertices have a neighbor relationship, and one first vertex can be said to be the first neighbor of the other first vertex. Otherwise, the two first vertices do not have a neighbor relationship. This can determine the first neighbor of each first vertex and, in turn, the neighboring road segments of the road segment.
[0077] When using a graph model to achieve global optimization, road network optimization is performed based on the new position information and the original position information of the neighboring road segments of each road segment in the original road network data. The optimized position information of each road segment can be obtained by determining the Lth iterative position information representation of the first neighbor point of each first vertex in the graph data. For each first vertex, when L=0, the Lth iterative position information representation of the first neighbor point of the first vertex is the original position information of the neighboring road segment of the road segment corresponding to the first vertex in the original road network data; based on the Lth iterative position information representation of the first neighbor point of each first vertex and the model parameters of the graph model, the L+1th iterative position information representation of each first vertex is determined; based on the L+1th iterative position information representation of each first vertex and the new position information, a target loss is constructed; the model parameters of the graph model are solved by minimizing the target loss to obtain the model parameter values of the graph model; and based on the model parameter values of the graph model and the L+1th iterative position information representation of each first vertex, the optimized position information of each road segment is obtained.
[0078] In an embodiment of the present application, road network optimization may actually be performed by optimizing the position information of each first vertex in the graph data. The optimization of the position information of each first vertex may be performed by continuously iterating, based on the position information of the road segment in the original road network data, until an iteration stop condition is satisfied, thereby obtaining optimized position information of the road segment. The iteration stop condition may be reaching a preset number of iterations, or the position information obtained by the iteration is optimal. During the iterative process, the position information representation of the road segment in the subsequent iteration is determined based on the position information representation of the road segment obtained in the previous iteration. Here, the subsequent iteration may refer to the L+1th iteration, and the previous iteration may refer to the Lth iteration.
[0079] In order to achieve global optimization and ensure adaptation between adjacent road segments, the position information of each first vertex at the L+1th iteration may be determined based on the position information of its first neighbor point at the Lth iteration.
[0080] Among them, the L-th iteration position information representation of the first neighbor point can be the position information representation of the first neighbor point obtained after the L-th iteration. It can be understood that, for each first vertex, when L=0, the L-th iteration position information representation of the first neighbor point of the first vertex is the position information of the first neighbor point of the first vertex corresponding to the road segment in the original road network data. That is to say, in the road network optimization problem, the initial value of each first vertex can be directly defined as the position information of the road segment corresponding to it in the original road network data, and the position information of a road segment can be represented by the position information of all points on the road segment. The position information can be a coordinate in a Cartesian coordinate system or a longitude and latitude coordinate. The embodiment of the present application does not limit the representation form of the position information.
[0081] In order to keep the characteristic dimension of the position information of the first vertex of each road segment consistent, all road segments can be divided into 100 equal parts, and the longitude and latitude coordinates of each part are calculated to obtain 200-dimensional position information of each road segment.
[0082] In one possible implementation, determining the first neighbor of each first vertex in the graph data based on the presence of first edges between first vertices in the graph data can be accomplished by determining a first neighbor matrix corresponding to the graph data based on the presence of first edges between first vertices in the graph data. The first neighbor matrix represents the first neighbor of each first vertex. Accordingly, determining the Lth iteration position information representation of the first neighbor of each first vertex in the graph data can be accomplished by obtaining the Lth iteration position information representation of each first vertex in the graph data. For each first vertex, when L = 0, the Lth iteration position information representation of the first vertex is the position information of the road segment corresponding to the first vertex in the original road network data. The Lth iteration position information representation of each first vertex in the graph data is then multiplied by the first neighbor matrix to obtain the Lth iteration position information representation of the first neighbor of each first vertex in the graph data. The Lth iteration position information representation of each first vertex in the graph data can be represented by the matrix H(L), and the first neighbor matrix can be represented by the matrix A, where L is the number of iterations. When determining the first neighbor matrix, if two first vertices are connected by a first edge, the corresponding element in the first neighbor matrix is set to 1; otherwise, it is set to 0.
[0083] Determining the L-th iterative position information representation of the first neighbor point of each first vertex by means of matrix calculation can improve the convenience and accuracy of determining the L-th iterative position information representation of the first neighbor point.
[0084] The method for optimizing the position information of each first vertex can be to continuously iterate the position information of the road segment in the original road network data until the iteration stop condition is met, thereby obtaining the optimized position information of the road segment. During the iterative process, for any iteration (e.g., the L+1th iteration), the position information representation of the road segment in that iteration is determined based on the position information representation of the road segment obtained in the previous iteration (e.g., the Lth iteration). Therefore, the server can determine the L+1th iteration position information representation of each first vertex based on the Lth iteration position information representation of the first neighbor point of each first vertex and the model parameters of the graph model.
[0085] It should be noted that the embodiments of the present application do not limit the network structure of the graph model. The graph model can be, for example, a graph neural network model, a conditional random field (CRF) model, a related optimization model based on a factor graph, etc.
[0086] In one possible implementation, the L+1th iteration position information representation of the first neighbor point of the first vertex after the iteration can be obtained by linearly combining the Lth iteration position information representation of the first neighbor point of the first vertex, and then passing the linear combination through an activation function. Based on this, the graph model can transfer and update the position information between vertices through the following formula: H (L+1) =σ(AH (L) W (L) )
[0087] Among them, H is the position information of each first vertex on the graph data. Specifically, H (L) The Lth iteration position information of each first vertex is represented, A is the first neighbor matrix of the graph data, L is the number of iterations, then AH (L) is the L-th iteration position information representation of the first neighbor point of the first vertex, W(L) is the weight coefficient, that is, the model parameter to be learned. σ is the activation function. In one possible implementation, the activation function can be a Rectified Linear Unit (ReLU) function.
[0088] It should be noted that in some scenarios, especially those involving primary and secondary roads, when new road network data is collected for the primary road but not for the secondary road, this often leads to overlapping of the primary and secondary roads due to the change in the primary road's position. Since the overlapping relationship is represented as the distance between the first two vertices in the graph data, and the overlapping relationship of the original road network data does not exist on the adjacent edges of the corresponding graph data of the original road network data, it is necessary to first construct a graph of the overlapping relationship of the original road network data, which is called the conjugate graph of the graph data.
[0089] An overlapping relationship is defined as the relationship between closely spaced road segments. In this case, based on the Lth-iteration position information representation of each first vertex's first neighbor and the model parameters of the graph model, the L+1th-iteration position information representation of each first vertex can be determined by obtaining the distances between first vertices in the graph data. For each first vertex in the graph data, other first vertices whose distances from the first vertex are less than a distance threshold are identified. A set of candidate points for the first vertex is then determined based on these other first vertices whose distances from the first vertex are less than the distance threshold. This allows each road segment to be found near its neighboring road segments, thereby finding first vertices that are spatially closely spaced in the original graph data to form a set of candidate points. Each first vertex is then connected to the first vertex in the corresponding candidate point set to obtain a conjugate graph of the graph data. The conjugate graph includes a second edge between a second vertex and the second vertex, where each first vertex is associated with the first vertex in the corresponding candidate point set, and the second edge is the edge between two adjacent second vertices. Next, based on the existence of the second edge between the second vertices in the conjugate graph, the L-th iterative position information representation of the second neighbor point of each second vertex in the conjugate graph is determined, and then based on the L-th iterative position information representation of the first neighbor point of each first vertex, the L-th iterative position information representation of the second neighbor point of each second vertex and the model parameters of the graph model, the L+1-th iterative position information representation of the first vertex is generated.
[0090] Among them, the conjugate graph can be expressed as G1(V, E1), where V represents the vertex set, which is the same as the vertex set in the graph data, but for the sake of distinction, it is called the second vertex, and E1 represents the edge set, that is, the set of second edges.
[0091] Taking into account the overlapping relationship, the L+1th iterative position information representation based on the first vertex can be generated by the Lth iterative position information representation of the first neighbor point of the first vertex and the Lth iterative position information representation of the second neighbor point of each second vertex. Specifically, the L+1th iterative position information representation of the first vertex has a positive correlation with the Lth iterative position information representation of the first neighbor point of the first vertex, and the L+1th iterative position information representation of the first vertex has a negative correlation with the Lth iterative position information representation of the second neighbor point of the second vertex.
[0092] Similar to the L-th iteration position information representation of the first neighbor point of the first vertex, the L-th iteration position information representation of the second neighbor point of the second vertex can also be obtained through matrix calculation. That is, based on the existence of the second edge between the second vertices in the conjugate graph, the second neighbor matrix corresponding to the conjugate graph is first determined, and then the L-th iteration position information representation of each second vertex in the conjugate graph is obtained. Next, the L-th iteration position information representation of each second vertex in the conjugate graph is multiplied by the second neighbor matrix to obtain the L-th iteration position information representation of the second neighbor point of each second vertex in the conjugate graph. The second neighbor matrix can be represented by A1.
[0093] In this case, the graph model can transmit and update the position information between vertices through the following improved formula: (L+1) =σ((A-A1)H (L) W (L) )
[0094] Among them, H (L) The Lth iteration position information of each first vertex is represented, A is the first neighbor matrix of the graph data, L is the number of iterations, then AH (L) is the Lth iteration position information representation of the first neighbor point of the first vertex, W (L) is the weight coefficient, i.e., the model parameter to be learned. A1 is the second neighbor matrix of the conjugate graph, which is 1 if the two second vertices are adjacent, and 0 otherwise. A-A1 represents the positive correlation with the first neighbor point in the graph data and the negative correlation with the second vertex in the conjugate graph.
[0095] By constructing a conjugate graph to realize the message transmission of overlapping relationships, global road network optimization is achieved. During the iterative process, the overlapping relationships that may be caused by the optimization are considered, so as to avoid introducing new overlapping relationships between the optimized road segments during the optimization process, thereby improving the quality of the optimized road network.
[0096] It's understandable that overlapping relationships aren't prohibited in all scenarios. For example, in an elevated overpass scenario, an overlapping relationship between the upper road segment and the lower road segment is permitted, as shown in Figure 6. In Figure 6, upper road segments 601 and 602, respectively, overlap with lower road segment 603. In a primary-secondary road scenario, the primary and secondary roads are relatively close, but overlapping is not permitted, as shown in Figure 7. In Figure 7, 701 represents the primary road, and 702 represents the secondary road.
[0097] Scenarios where overlapping relationships are permitted typically involve two road segments that are not coplanar. Whether the two road segments are coplanar can be determined by the elevation difference between the road segments. In this case, the candidate point set for the first vertex can be determined by obtaining the elevation information of the first vertex and the elevation information of the other first vertices whose distance from the first vertex is less than a distance threshold, and then subtracting the elevation information of the first vertex from the other first vertices to obtain the elevation difference. The elevation difference can indicate whether the two road segments are coplanar, and thus determine whether an overlapping relationship is permitted. If the elevation difference is relatively small, for example, less than the elevation difference threshold, it indicates that the two corresponding road segments are coplanar, and an overlapping relationship is not permitted. Therefore, the other first vertices with an elevation difference less than the elevation difference threshold constitute the candidate point set for the first vertex. If the elevation difference is relatively large, for example, greater than or equal to the elevation difference threshold, it indicates that the two corresponding road segments are not coplanar, and an overlapping relationship is permitted, so the first vertices corresponding to these road segments are excluded from the candidate point set. The elevation difference threshold can be set based on actual conditions, for example, 2 meters.
[0098] The embodiment of the present application determines whether two road segments are located in the same plane through the elevation difference, so that it can more accurately determine whether an overlapping relationship is allowed between the two road segments, and then perform targeted processing on scenarios where overlapping relationships are not allowed during road network optimization, so that the optimized road network is more consistent with the actual road and the quality of the optimized road network is improved.
[0099] The L+1th iteration position of each first vertex is represented based on the model parameters of the graphical model. The specific values of these model parameters are unknown and need to be solved. However, during the solution process, adjustments cannot be made indefinitely but must adhere to certain constraints. This constraint can be reflected through the target loss, so a target loss can be constructed.
[0100] Because road network optimization targets the newly collected location information and aims to better integrate it with the original network data, the target loss is constructed based on the L+1th iteration location information representation of each first vertex and the new location information. The model parameters of the graph model are then solved by minimizing the target loss to obtain the model parameter values that ensure that the optimized location information is as close as possible to the new location information.
[0101] The L+1th iterative position information representation of the first vertex can be a formula with model parameters. After obtaining the model parameter values of the graph model, the model parameter values are substituted into the L+1th iterative position information representation of the first vertex to obtain the optimized position information of each road segment, and the optimized road network of the original road network data is constructed based on the optimized position information of each road segment.
[0102] This application uses a graph model to globally optimize and smooth the original road network data to eliminate the problems caused by the fusion of position information of different accuracies, thereby avoiding deviations between updated and unupdated parts and improving the quality of the road network data obtained after the fusion of new and old position information. During the optimization process, a formula for transferring and updating position information between first vertices of the graph model is constructed. Based on this formula, the L+1th iterative position information representation of each first vertex is determined based on the Lth iterative position information representation of the first neighbor point of each first vertex and the model parameters of the graph model. This transforms the road network optimization problem into a mathematical optimal solution problem, allowing for the rapid and accurate determination of the optimized position information of the road segment.
[0103] In addition, by improving the quality of road network data, the adsorption accuracy of driving trajectories can be improved in scenarios such as autonomous driving and navigation.
[0104] It is understandable that target loss is an important factor in ensuring the quality of the road network. The construction method of target loss will be introduced in detail below.
[0105] When constructing the target loss, in order to make the optimized position information as close as possible to the new position information, the new position information of the road segment to be processed can be used as the true value data of the road segment to be processed, and corresponding constraints can be added to the target loss of the graph model. In this case, the method of constructing the target loss based on the L+1th iterative position information representation of each first vertex and the new position information can be to determine the L+1th iterative position information representation of the road segment to be processed from the L+1th iterative position information representation of each first vertex. Then, based on the difference between the L+1th iterative position information representation of the road segment to be processed and the new position information, the first loss is constructed. The first loss requires that the optimized position information is as close to the new position information as possible. When the optimized position information is completely consistent with the new position information, the value of the first loss is 0. The target loss is then generated based on the first loss.
[0106] In one possible implementation, in order to accommodate the problem of errors in the new location information in rare scenarios, the present embodiment may use a squared error function to calculate the first loss. In this case, the calculation formula for the first loss may be as follows:
[0107] Among them, V S are all road segments to be processed, vi is the i-th vertex, is the x-axis coordinate of the new position information of the i-th vertex, is the y-axis coordinate of the new position information of the i-th vertex, is the x-axis coordinate represented by the L+1th iteration position information of the i-th vertex, The y-axis coordinate represented by the L+1th iteration position information of the i-th vertex.
[0108] By constructing the target loss in the above way, the optimized location information can be made as close as possible to the new location information, thereby improving the accuracy of the optimized road network.
[0109] In one possible implementation, during the optimization process, in addition to ensuring that the optimized location information is as close as possible to the new location information, it is also necessary to satisfy the road network optimization rules, thereby ensuring that the road segments in the optimized road network meet the basic requirements of real-world roads. Therefore, in one possible implementation, the target loss can be generated based on the first loss by constructing a second loss based on the road network optimization rules, and then performing a weighted sum of the first and second losses to obtain the target loss. This solves the problem of road segment adaptation, achieves a smooth transition, and ensures that the road segments in the optimized road network meet the basic requirements of real-world roads.
[0110] When performing a weighted summation of the first and second losses to obtain the target loss, the weights of the first and second losses can be adjusted based on actual needs. For example, the weight of the first loss can be adjusted based on the accuracy of the true value data (i.e., the new location information). For example, if the true value data (i.e., the new location information) is collected based on other low-precision trajectory data, then the direction change of the trajectory at a road bend often differs significantly from the requirements of the road network technology. In this case, the weight of this loss (i.e., the first loss) can be reduced.
[0111] In this case, the target loss can be obtained by weighting the first and second losses and summing them. The first weight for the first loss and the second weight for the second loss can be determined based on the accuracy of the new location information. The first weight determined when the new location information has the first accuracy is smaller than the first weight determined when the new location information has the second accuracy, the first accuracy is smaller than the accuracy threshold, and the second accuracy is greater than or equal to the accuracy threshold. In other words, if the accuracy of the new location information is relatively high, indicating a high degree of credibility, the weight of the first loss can be increased. If the accuracy of the new location information is relatively low, indicating a low degree of credibility, the weight of the first loss can be decreased. The first and second weights are then used to perform a weighted sum of the first and second losses to obtain the target loss.
[0112] By adjusting the weight of the first loss according to the accuracy of the new location information, the road network can be optimized based on more accurate location information, thereby improving the quality of the optimized road network.
[0113] It is understood that when constructing the second loss according to the road network optimization rules, the road network optimization rules may vary in different situations, and thus the constructed second loss may also vary. When the road segments corresponding to the first vertices are connected road segments, the road network optimization rule may be that the endpoint of the previous road segment and the starting point of the next road segment in the connected road segment meet the position consistency rule. In this case, according to the road network optimization rule, the second loss may be constructed by, if the road segments corresponding to the two first vertices are connected road segments, determining the L+1th iteration position information representation of the endpoint of the previous road segment in the connected road segment and the L+1th iteration position information representation of the starting point of the next road segment in the connected road segment based on the L+1th iteration position information representation of each first vertex; and constructing the second loss based on the difference between the L+1th iteration position information representation of the endpoint and the L+1th iteration position information representation of the starting point.
[0114] By constructing the second loss in the above manner, the positions of the end point of the previous road segment and the starting point of the subsequent road segment in the connected road segments can be kept consistent when optimizing the road network.
[0115] When there is a certain angle between the road segments corresponding to the two first vertices, the road network optimization rule is that the angle between the road segments meets the preset angle rule. At this time, according to the road network optimization rule, the method of constructing the second loss can be to obtain the initial angle value of the angle between the two road segments based on the original road network data, and then determine the L+1th iteration angle value representation of the angle between the two road segments after the L+1th iteration based on the L+1th iteration position information representation of each first vertex, and then construct the second loss based on the initial angle value and the L+1th iteration angle value representation of the angle between the two road segments.
[0116] Depending on the initial angle value between road segments, the preset angle rule may vary. For example, if the initial angle value is large, it indicates that the road segments may indeed have a certain angle between them. In this case, the preset angle rule is the angle-invariant rule, meaning that the angle must be maintained during optimization. Alternatively, if the initial angle value is small or even close to zero, it indicates that the road segments may actually be a straight line. In this case, the preset angle rule is the angle-zero rule, meaning that the road segments will be straightened as much as possible during optimization.
[0117] In this case, based on the initial angle value and the L+1th iteration angle value representation of the angle between the two road segments, a second loss can be constructed by comparing the initial angle value with an angle threshold to obtain a comparison result. If the comparison result indicates that the initial angle value is greater than or equal to the angle threshold, it means that the initial angle value is relatively large, and there may indeed be a certain angle between the road segments. In this case, the difference between the initial angle value and the L+1th iteration angle value representation is determined, and then the second loss is constructed based on the difference between the initial angle value and the L+1th iteration angle value representation.
[0118] In one possible implementation, the second loss can be represented by a square sum function. The calculation formula of the second loss is as follows:
[0119] Among them, r represents the angle of the road segment corresponding to the first vertex after optimization, R(E) is the angle between the two road segments that need to remain unchanged, and r i is the L+1th iteration angle value of the angle between the i-th road segments, is the initial angle value of the angle between the i-th road segments.
[0120] If the comparison result indicates that the initial angle value is less than the angle threshold, it means that the initial angle value is relatively small or even close to zero. The road segments may actually be straight lines, and the road segments in the original road network data may not be straight enough. In this case, the angle is zero rule is followed and the second loss is constructed based on the angle value of the L+1th iteration. The angle threshold can be set according to actual needs, for example, it can be set to 5 degrees.
[0121] In one possible implementation, the second loss can be represented by a square sum function. In this case, the calculation formula of the second loss is as follows: ∑ r∈R1(E) r i ×r i r∈R1(E)if r0≤5
[0122] Among them, r represents the angle of the road segment corresponding to the first vertex after optimization, R1(E) represents the angle between the two road segments that need to be straightened, and r i is the L+1th iteration angle value of the angle between the i-th road segments, and r0 is the initial angle value of the angle between the i-th road segments.
[0123] Through the above method, the angles of angled road segments can be maintained, and the road segments that are not straight enough in the original road network data can be straightened, thereby meeting the optimization requirements of different road segments and improving the quality of the optimized road network.
[0124] It should be noted that at least one of the above-mentioned methods for determining the second loss can be selected for use. When the above-mentioned methods are selected to construct the second loss, the above-mentioned second loss can be obtained by weighting multiple partial losses, thereby satisfying the above-mentioned road network optimization rules at the same time, and achieving the premise of ensuring the location information of the original road network data as much as possible, finding a road network that matches the newly collected new location information as much as possible and achieving a smooth transition, thereby effectively reducing the problems of improving the quality of partial road network data and conflicts in global road network data.
[0125] When considering overlapping relationships for road network optimization, an improved formula is used to transfer and update position information between vertices. Accordingly, the loss caused by overlapping relationships is also considered when constructing the target loss. In this case, constructing the target loss based on the L+1th iteration position information representation and the new position information of each first vertex can involve determining the L+1th iteration position information representation of the road segment to be processed from the L+1th iteration position information representation of each first vertex. The first loss is then constructed based on the difference between the L+1th iteration position information representation and the new position information of the road segment to be processed. For each second vertex on any second edge in the conjugate graph, the distance between the two second vertices is determined. A third loss is then constructed based on this distance. The distance between the two second vertices is negatively correlated with the value of the third loss. That is, the greater the distance between the two second vertices, the smaller the third loss. When the distance between the two second vertices reaches a certain value, the third loss is zero, indicating no overlapping relationship. The first and third losses are then weighted summed to obtain the target loss.
[0126] The embodiment of the present application does not limit the calculation method of the third loss. In one possible implementation, the third loss can be calculated using the following formula:
[0127] Among them, a and b are the two second vertices connected by the second edge e in the conjugate graph, E1 represents the edge set of the conjugate graph, The x-axis coordinate of the L+1th iteration position information of the second vertex a, The y-axis coordinate of the L+1th iteration position information of the second vertex a, The x-axis coordinate of the L+1th iteration position information of the second vertex b, The y-axis coordinate of the L+1th iteration position information of the second vertex b, Represents the reciprocal of the distance between the two second vertices, d is a constant less than 1, in this formula, t in f(t) is
[0128] That is, when the reciprocal of the distance between two second vertices on the conjugate graph is less than or equal to d, it means that the distance between the two second vertices is relatively large, the third loss is 0, and there is no overlap relationship. Otherwise, the closer the distance, the greater the third loss.
[0129] During the iteration process, the possible overlapping relationships caused by the optimization are taken into consideration, so that during the optimization process, the optimization is performed with the goal of not introducing new overlapping relationships, thereby avoiding the introduction of new overlapping relationships between the optimized road segments and improving the quality of the optimized road network.
[0130] It should be noted that, when considering the overlapping relationship, the target loss can still be constructed in combination with the above-mentioned second loss, that is, the first loss, the second loss and the third loss can be weighted summed to obtain the target loss, so as to obtain a better optimized road network based on the target loss.
[0131] Since the accuracy and quality of the original road network data itself are already relatively high, the computational complexity of the road network optimization process using the graph model mainly depends on the constraints of the newly collected new location information. This part is only a small part relative to the overall road network. In practical applications, the graph model provided by the embodiment of the present application can converge quickly, greatly improving the production and update efficiency of road network data. In the road network optimization process, if you focus on a certain optimization effect, you can increase the weight of the loss corresponding to that optimization effect. For example, if you focus on the optimization effect of straightening a road segment, you can increase the weight of the loss corresponding to the zero angle rule.
[0132] The actual application effect of the road network optimization method provided by the embodiment of the present application can be seen in Figures 8 and 9. Figure 8 mainly reflects the optimization effect of straightening road segments, where the black dotted line represents the road segment in the original road network data, and the black solid line represents the road segment in the optimized road network. Some road segments in the original road network data are not straight enough, and the graph model can play a role in straightening them after output. Here, the angle between the connected road segments has a relatively small change, which does not affect the convergence of the graph model. Figure 9 mainly reflects the optimization effect of reducing the overlapping relationship, where the line marked 901 represents the auxiliary road, corresponding to 401 in Figure 4, and the line marked 902 represents the main road, corresponding to 402 in Figure 4. Compared with the result shown in Figure 4 where the main road and the auxiliary road have an overlapping relationship, because in the overlapping relationship, when the distance tends to zero, the corresponding loss (i.e., the third loss) will tend to infinity, so in order to achieve the target loss minimum, the graph model will prioritize reducing the overlapping relationship, so that the auxiliary road shown in 901 and the main road shown in 902 are far away from each other to avoid the overlapping relationship.
[0133] It should be noted that, based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods.
[0134] Based on the road network optimization method provided in the above embodiment, the embodiment of the present application further provides a road network optimization device 1000. Referring to FIG10 , the road network optimization device 1000 includes an acquisition unit 1001, a determination unit 1002, an optimization unit 1003, and a construction unit 1004:
[0135] The acquisition unit 1001 is configured to acquire original road network data of the road segment to be processed after acquiring new location information of the road segment to be processed;
[0136] The determining unit 1002 is configured to determine, for each road segment in the original road network data, a neighboring road segment of the road segment;
[0137] The optimization unit 1003 is configured to perform road network optimization based on the new position information and original position information of neighboring road segments of each road segment in the original road network data, to obtain optimized position information of each road segment;
[0138] The construction unit 1004 is configured to construct an optimized road network of the original road network data using the optimized position information of each road segment.
[0139] In a possible implementation, the determining unit 1002 is configured to:
[0140] Performing data conversion on original road network data to which the road segment to be processed belongs to obtain graph data of the original road network data, the graph data including a first vertex and a first edge between the first vertices, the first vertex being a road segment in the original road network data, and the first edge being a road node connecting different road segments in the original road network data;
[0141] Determine a first neighbor point of each first vertex in the graph data based on existence of the first edges between the first vertices in the graph data;
[0142] A neighboring road segment of the road segment is determined according to a first neighbor point of the first vertex corresponding to the road segment.
[0143] In a possible implementation, the optimization unit 1003 is configured to:
[0144] Determine an L-th iteration position information representation of a first neighbor point of each first vertex in the graph data, where, for each first vertex, when L=0, the L-th iteration position information representation of the first neighbor point of the first vertex is original position information of a neighboring road segment of the road segment corresponding to the first vertex in the original road network data;
[0145] Determine an L+1th iterative position information representation of each of the first vertices based on the Lth iterative position information representation of the first neighbor point of each of the first vertices and a model parameter of the graph model;
[0146] Constructing a target loss based on the L+1th iteration position information representation of each of the first vertices and the new position information;
[0147] Solving the model parameters of the graphical model by minimizing the target loss to obtain the model parameter values of the graphical model;
[0148] Based on the model parameter values of the graph model and the L+1th iteration position information representation of each first vertex, the optimized position information of each road segment is obtained.
[0149] In a possible implementation, the determining unit 1002 is configured to:
[0150] Determining a first neighbor matrix corresponding to the graph data based on existence of the first edges between the first vertices in the graph data, where the first neighbor matrix is used to represent a first neighbor point of each of the first vertices;
[0151] The optimization unit 1003 is configured to:
[0152] Obtaining an L-th iteration position information representation of each first vertex in the graph data, where, for each first vertex, when L=0, the L-th iteration position information representation of the first vertex is position information of a road segment corresponding to the first vertex in the original road network data;
[0153] Multiply the L-th iteration position information representation of each first vertex in the graph data by the first neighbor matrix to obtain the L-th iteration position information representation of the first neighbor point of each first vertex in the graph data.
[0154] In a possible implementation, the optimization unit 1003 is configured to:
[0155] Determining the L+1th iterative position information representation of the road segment to be processed from the L+1th iterative position information representation of each of the first vertices;
[0156] constructing a first loss based on a difference between the L+1th iterative position information representation of the road segment to be processed and the new position information;
[0157] The target loss is generated based on the first loss.
[0158] In a possible implementation, the optimization unit 1003 is configured to:
[0159] According to the road network optimization rules, the second loss is constructed;
[0160] A weighted sum is performed on the first loss and the second loss to obtain the target loss.
[0161] In a possible implementation, the optimization unit 1003 is configured to:
[0162] determining a first weight of the first loss based on the accuracy of the new location information, and obtaining a second weight of the second loss, wherein the first weight determined when the accuracy of the new location information is the first accuracy is less than the first weight determined when the accuracy of the new location information is the second accuracy, the first accuracy is less than an accuracy threshold, and the second accuracy is greater than or equal to the accuracy threshold;
[0163] The first loss and the second loss are weightedly summed using the first weight and the second weight to obtain the target loss.
[0164] In a possible implementation, the road network optimization rule is that the end point of the previous road segment and the starting point of the next road segment in the connected road segments meet the position consistency rule, and the optimization unit 1003 is used to:
[0165] If the road segments corresponding to the two first vertices are connected road segments, determining the L+1th iterative position information representation of the end point of the preceding road segment in the connected road segments, and determining the L+1th iterative position information representation of the starting point of the succeeding road segment in the connected road segments based on the L+1th iterative position information representation of each first vertex;
[0166] The second loss is constructed based on the difference between the L+1th iteration position information representation of the end point and the L+1th iteration position information representation of the starting point.
[0167] In a possible implementation, the road network optimization rule is that the angles between road segments meet a preset angle rule, and the optimization unit 1003 is configured to:
[0168] Obtaining an initial angle value of the angle between two road segments according to the original road network data;
[0169] Determining, based on the L+1th iteration position information representation of each of the first vertices, an L+1th iteration angle value representation of the angle between the two road segments after the L+1th iteration;
[0170] The second loss is constructed based on the initial angle value and the L+1th iteration angle value representation of the angle between the two road segments.
[0171] In a possible implementation, the preset angle rule is an angle-invariant rule, and the optimization unit 1003 is configured to:
[0172] Comparing the initial angle value with the angle threshold to obtain a comparison result;
[0173] If the comparison result indicates that the initial angle value is greater than or equal to the angle threshold, determining a difference between the initial angle value and the L+1th iteration angle value representation;
[0174] The second loss is constructed based on the difference between the initial angle value and the L+1th iteration angle value representation.
[0175] In a possible implementation, the preset angle rule is a zero angle rule, and the optimization unit 1003 is further configured to:
[0176] If the comparison result indicates that the initial angle value is less than the angle threshold, the second loss is constructed based on the L+1th iteration angle value representation.
[0177] In a possible implementation, the optimization unit 1003 is configured to:
[0178] Obtaining the distance between the first vertices in the graph data;
[0179] For each first vertex in the graph data, determine other first vertices whose distances to the first vertex are less than a distance threshold, and determine a candidate point set for the first vertex based on the other first vertices whose distances to the first vertex are less than the distance threshold;
[0180] Connecting each of the first vertices to a first vertex in the corresponding candidate point set to obtain a conjugate graph of the graph data, wherein the conjugate graph includes a second edge between a second vertex and a second vertex, wherein the second vertex is each of the first vertices and a first vertex in the corresponding candidate point set, and the second edge is an edge between two adjacent second vertices;
[0181] Determine, based on the existence of the second edges between the second vertices in the conjugate graph, an L-th iteration position information representation of a second neighbor point of each second vertex in the conjugate graph;
[0182] Based on the Lth iteration position information representation of the first neighbor point of each first vertex, the Lth iteration position information representation of the second neighbor point of each second vertex and the model parameters of the graph model, the L+1th iteration position information representation of the first vertex is generated.
[0183] In a possible implementation, the optimization unit 1003 is configured to:
[0184] Acquire the elevation information of the first vertex and the elevation information of the other first vertices;
[0185] Subtracting the elevation information of the first vertex from the elevation information of the other first vertices to obtain an elevation difference;
[0186] Other first vertices whose elevation difference values are less than the elevation difference threshold constitute a candidate point set for the first vertex.
[0187] In a possible implementation, the optimization unit 1003 is configured to:
[0188] Determining the L+1th iterative position information representation of the road segment to be processed from the L+1th iterative position information representation of each of the first vertices;
[0189] constructing a first loss based on a difference between the L+1th iterative position information representation of the road segment to be processed and the new position information;
[0190] For two second vertices of any second side in the conjugate graph, determining a distance between the two second vertices;
[0191] Constructing a third loss according to the distance between the two second vertices, wherein the distance between the two second vertices is negatively correlated with the value of the third loss;
[0192] A weighted sum is performed on the first loss and the third loss to obtain the target loss.
[0193] As can be seen from the above technical solution, when integrating the newly collected location information with the existing road network data (i.e., the original road network data), the new location information is not directly used to replace the original location information of the road segment to be processed. Instead, the original road network data is globally optimized. Specifically, after collecting the new location information of the road segment to be processed, the original road network data corresponding to the road segment to be processed is obtained. Then, for each road segment in the original road network data, the neighboring road segments of the road segment are determined. This allows the influence of the neighboring road segments on the location of each road segment to be considered during global network optimization. Network optimization is then performed based on the new location information and the original location information of each road segment's neighboring road segments in the original road network data, resulting in optimized location information for each road segment. This ensures the connection between each road segment and its neighboring road segments after optimization. Using the optimized location information of each road segment obtained in the above process, an optimized road network is constructed based on the original road network data, achieving global optimization and smoothing. This application performs global optimization and smoothing on the original road network data to eliminate the problems caused by the fusion of position information of different accuracies, thereby avoiding the deviation between the updated part and the unupdated part, and improving the quality of the road network data obtained after the fusion of new and old position information.
[0194] The present application also provides a computer device that can execute the road network optimization method. The computer device can be a terminal. FIG11 shows a structural diagram of a terminal provided by the present application. In FIG11, the terminal is a smartphone as an example:
[0195] 11 , the smartphone includes components such as a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, a processor 1180, and a power supply 1190. The input unit 1130 may include a touch panel 1131 and other input devices 1132, the display unit 1140 may include a display panel 1141, and the audio circuit 1160 may include a speaker 1161 and a microphone 1162. It should be understood that the smartphone structure shown in FIG11 does not limit the smartphone and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0196] The memory 1120 can be used to store software programs and modules. The processor 1180 executes the various functional applications and data processing of the smartphone by running the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the smartphone (such as audio data, a phone book, etc.). In addition, the memory 1120 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0197] Processor 1180 is the control center of the smartphone, connecting all components of the smartphone using various interfaces and circuits. It executes software programs and / or modules stored in memory 1120 and accesses data stored in memory 1120 to perform various smartphone functions and process data. Optionally, processor 1180 may include one or more processing units. Preferably, processor 1180 integrates an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 1180.
[0198] In this embodiment, the processor 1180 in the smartphone can execute the road network optimization method provided in each embodiment of the present application.
[0199] The computer device provided in the embodiment of the present application can also be a server, as shown in Figure 12, which is a structural diagram of the server 1200 provided in the embodiment of the present application. The server 1200 may have relatively large differences due to different configurations or performances, and may include one or more processors, such as a central processing unit (CPU) 1222, and a memory 1232, one or more storage media 1230 (such as one or more mass storage devices) storing application programs 1242 or data 1244. Among them, the memory 1232 and the storage medium 1230 can be temporary storage or permanent storage. The program stored in the storage medium 1230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1222 can be configured to communicate with the storage medium 1230 to execute a series of instruction operations in the storage medium 1230 on the server 1200.
[0200] The server 1200 may also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input and output interfaces 1258, and / or one or more operating systems 1241, such as Windows Server 200. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0201] In this embodiment, the central processor 1222 in the server 1200 can execute the road network optimization method provided in each embodiment of the present application.
[0202] According to one aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the road network optimization method described in each of the aforementioned embodiments.
[0203] According to one aspect of the present application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the methods provided in various optional implementations of the above-described embodiments.
[0204] The descriptions of the processes or structures corresponding to the above figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0205] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0206] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0207] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0208] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0209] If the integrated unit 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 application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a terminal, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store computer programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0210] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0211] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, ordinary technical members in this field should understand that they can still modify the technical solutions recorded in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A road network optimization method, the method being executed by a computer device, the method comprising: After collecting the new location information of the road segment to be processed, obtaining the original road network data to which the road segment to be processed belongs; For each road segment in the original road network data, determining a neighboring road segment of the road segment; Performing road network optimization based on the new position information and original position information of neighboring road segments of each road segment in the original road network data to obtain optimized position information of each road segment; The optimized road network of the original road network data is constructed using the optimized position information of each road segment.
2. The method according to claim 1, wherein determining the neighboring road segments of the road segment comprises: Performing data conversion on original road network data to which the road segment to be processed belongs to obtain graph data of the original road network data, the graph data including a first vertex and a first edge between the first vertices, the first vertex being a road segment in the original road network data, and the first edge being a road node connecting different road segments in the original road network data; Determine a first neighbor point of each first vertex in the graph data based on existence of the first edges between the first vertices in the graph data; A neighboring road segment of the road segment is determined according to a first neighbor point of the first vertex corresponding to the road segment.
3. The method according to claim 2, wherein the performing road network optimization based on the new location information and the original location information of the neighboring road segments of each road segment in the original road network data to obtain the optimized location information of each road segment comprises: Determine an L-th iteration position information representation of a first neighbor point of each first vertex in the graph data, where, for each first vertex, when L=0, the L-th iteration position information representation of the first neighbor point of the first vertex is original position information of a neighboring road segment of the road segment corresponding to the first vertex in the original road network data; Determine an L+1th iterative position information representation of each of the first vertices based on the Lth iterative position information representation of the first neighbor point of each of the first vertices and a model parameter of the graph model; Constructing a target loss based on the L+1th iteration position information representation of each of the first vertices and the new position information; Solving the model parameters of the graphical model by minimizing the target loss to obtain the model parameter values of the graphical model; Based on the model parameter values of the graph model and the L+1th iteration position information representation of each first vertex, the optimized position information of each road segment is obtained.
4. The method according to claim 3, wherein determining the first neighbor point of each first vertex in the graph data based on the existence of the first edges between the first vertices in the graph data comprises: Determining a first neighbor matrix corresponding to the graph data based on existence of the first edges between the first vertices in the graph data, where the first neighbor matrix is used to represent a first neighbor point of each of the first vertices; The determining the Lth iteration position information representation of the first neighbor point of each first vertex in the graph data includes: Obtaining an L-th iteration position information representation of each first vertex in the graph data, where, for each first vertex, when L=0, the L-th iteration position information representation of the first vertex is position information of a road segment corresponding to the first vertex in the original road network data; Multiply the L-th iteration position information representation of each first vertex in the graph data by the first neighbor matrix to obtain the L-th iteration position information representation of the first neighbor point of each first vertex in the graph data.
5. The method according to claim 3 or 4, wherein constructing a target loss based on the L+1th iteration position information representation of each first vertex and the new position information comprises: Determining the L+1th iterative position information representation of the road segment to be processed from the L+1th iterative position information representation of each of the first vertices; constructing a first loss based on a difference between the L+1th iterative position information representation of the road segment to be processed and the new position information; The target loss is generated based on the first loss.
6. The method according to claim 5, wherein generating the target loss based on the first loss comprises: According to the road network optimization rules, the second loss is constructed; A weighted sum is performed on the first loss and the second loss to obtain the target loss.
7. The method according to claim 6, wherein performing weighted summation on the first loss and the second loss to obtain the target loss comprises: determining a first weight of the first loss based on the accuracy of the new location information, and obtaining a second weight of the second loss, wherein the first weight determined when the accuracy of the new location information is the first accuracy is less than the first weight determined when the accuracy of the new location information is the second accuracy, the first accuracy is less than an accuracy threshold, and the second accuracy is greater than or equal to the accuracy threshold; The first loss and the second loss are weightedly summed using the first weight and the second weight to obtain the target loss.
8. The method according to claim 6 or 7, wherein the road network optimization rule is that the end point of the previous road segment and the starting point of the next road segment in the connected road segments meet the position consistency rule, and constructing the second loss according to the road network optimization rule comprises: If the road segments corresponding to the two first vertices are connected road segments, determining the L+1th iterative position information representation of the end point of the preceding road segment in the connected road segments, and determining the L+1th iterative position information representation of the starting point of the succeeding road segment in the connected road segments based on the L+1th iterative position information representation of each first vertex; The second loss is constructed based on the difference between the L+1th iteration position information representation of the end point and the L+1th iteration position information representation of the starting point.
9. The method according to any one of claims 6 to 8, wherein the road network optimization rule is that the angles between road segments conform to a preset angle rule, and constructing the second loss according to the road network optimization rule comprises: Obtaining an initial angle value of the angle between two road segments according to the original road network data; Determining, based on the L+1th iteration position information representation of each of the first vertices, an L+1th iteration angle value representation of the angle between the two road segments after the L+1th iteration; The second loss is constructed based on the initial angle value and the L+1th iteration angle value representation of the angle between the two road segments.
10. The method according to claim 9, wherein the preset angle rule is an angle invariance rule, and constructing the second loss based on the initial angle value and the L+1th iteration angle value of the angle between the two road segments comprises: Comparing the initial angle value with the angle threshold to obtain a comparison result; If the comparison result indicates that the initial angle value is greater than or equal to the angle threshold, determining a difference between the initial angle value and the L+1th iteration angle value representation; The second loss is constructed based on the difference between the initial angle value and the L+1th iteration angle value representation.
11. The method according to claim 10, wherein the preset angle rule is a zero angle rule, and the method further comprises: If the comparison result indicates that the initial angle value is less than the angle threshold, the second loss is constructed based on the L+1th iteration angle value representation.
12. The method according to any one of claims 3 to 11, wherein determining the L+1th iterative position information representation of each first vertex based on the Lth iterative position information representation of the first neighbor point of each first vertex and model parameters of a graph model comprises: Obtaining the distance between the first vertices in the graph data; For each first vertex in the graph data, determine other first vertices whose distances to the first vertex are less than a distance threshold, and determine a candidate point set for the first vertex based on the other first vertices whose distances to the first vertex are less than the distance threshold; Connecting each of the first vertices to a first vertex in the corresponding candidate point set to obtain a conjugate graph of the graph data, wherein the conjugate graph includes a second edge between a second vertex and a second vertex, wherein the second vertex is each of the first vertices and a first vertex in the corresponding candidate point set, and the second edge is an edge between two adjacent second vertices; Determine, based on the existence of the second edges between the second vertices in the conjugate graph, an L-th iteration position information representation of a second neighbor point of each second vertex in the conjugate graph; Based on the Lth iteration position information representation of the first neighbor point of each first vertex, the Lth iteration position information representation of the second neighbor point of each second vertex and the model parameters of the graph model, the L+1th iteration position information representation of the first vertex is generated.
13. The method according to claim 12, wherein determining a candidate point set for the first vertex based on other first vertices whose distances to the first vertex are less than a distance threshold comprises: Acquire the elevation information of the first vertex and the elevation information of the other first vertices; Subtracting the elevation information of the first vertex from the elevation information of the other first vertices to obtain an elevation difference; Other first vertices whose elevation difference values are less than the elevation difference threshold constitute a candidate point set for the first vertex.
14. The method according to claim 12 or 13, wherein constructing a target loss based on the L+1th iteration position information representation of each first vertex and the new position information comprises: Determining the L+1th iterative position information representation of the road segment to be processed from the L+1th iterative position information representation of each of the first vertices; constructing a first loss based on a difference between the L+1th iterative position information representation of the road segment to be processed and the new position information; For two second vertices of any second side in the conjugate graph, determining a distance between the two second vertices; Constructing a third loss according to the distance between the two second vertices, wherein the distance between the two second vertices is negatively correlated with the value of the third loss; A weighted sum is performed on the first loss and the third loss to obtain the target loss.
15. A road network optimization device, deployed on a computer device, comprising an acquisition unit, a determination unit, an optimization unit, and a construction unit: The acquisition unit is configured to acquire original road network data of the road segment to be processed after acquiring the new location information of the road segment to be processed; The determining unit is configured to determine, for each road segment in the original road network data, a neighboring road segment of the road segment; The optimization unit is configured to perform road network optimization based on the new position information and original position information of neighboring road segments of each road segment in the original road network data, to obtain optimized position information of each road segment; The construction unit is used to construct an optimized road network of the original road network data using the optimized position information of each road segment.
16. A computer device comprising a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method of any one of claims 1 to 14 according to instructions in the computer program.
17. A computer storage medium, the computer readable storage medium being used to store a computer program, which, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 14.
18. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
GPS (Global Position System) spatio-temporal data increment road network real-time updating and trace matching system
CN106840176A
Road network matching method combining human interaction and active learning
CN113704377A
Traffic network optimization method, device and equipment, readable storage medium and product
CN114626169A
Road network topology updating method based on GPS data
CN116204539A
Incremental update topology road network construction method, system and device and storage medium
CN116793372A