Road network optimization method and related apparatus
By performing global optimization and smoothing of road network data, the quality problems caused by accuracy deviations in road network data updates were resolved, ensuring the accuracy and consistency of road network data.
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-11-27
AI Technical Summary
During the road network data update process, the accuracy of data collected by different technologies or methods varies, resulting in discrepancies between the updated and unupdated parts, which affects the quality of the road network data.
By globally optimizing and smoothing the original road network data, taking into account the location influence of neighboring road segments, the road network is optimized based on the new location information and the original location information of neighboring road segments, and an optimized road network is constructed.
It eliminates the bias caused by the fusion of location information with different precision, and improves the quality of road network data after the fusion of old and new location information.
Smart Images

Figure CN2025079683_27112025_PF_FP_ABST
Abstract
Description
A road network optimization method and related device
[0001] The present application claims priority to the Chinese patent application No. 202410328236.1, filed on March 21, 2024, entitled "A road network optimization method and related device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the technical field of data processing, in particular to the road network optimization technology. BACKGROUND
[0003] The road network is a directed graph modeling the real world road. With the maturity and application of high-precision positioning, lane-level positioning and autonomous driving technologies, road network data is a very important infrastructure, and there is a high requirement for its precision. Therefore, it is necessary to update the road network data constantly.
[0004] In the updating process, new road network data can be collected to update the existing road network data using the new road network data. The new road network data can be collected based on different technologies and means, such as high-precision trajectory collection, crowd-sourced trajectory and image collection, and satellite image data. Different technologies or means can generate road network data corresponding to the collection part.
[0005] However, the data collected by different technologies or means has certain deviations in precision, and since the data production is partial update, it will cause deviations between the updated part and the non-updated part, affecting the quality of the updated road network data. SUMMARY
[0006] To solve the above technical problems, the present application provides a road network optimization method and related device, which globally optimizes and smooths the original road network data to eliminate the problems caused by the fusion of position information with different precisions, thereby avoiding the deviations 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 the present application disclose the following technical solutions:
[0008] In one aspect, the embodiments of the present application provide a road network optimization method, which is executed by a computer device, and the method comprises:
[0009] After collecting new position information of a to-be-processed road section, obtaining original road network data to which the to-be-processed road section belongs;
[0010] For each road section in the original road network data, determining a neighbor road section of the road section;
[0011] perform road network optimization based on the new position information and original position information of the neighbor road segment of each road segment in the original road network data, to obtain optimized position information of each road segment;
[0012] construct an optimized road network of the original road network data by using the optimized position information of each road segment.
[0013] In an aspect, an embodiment of the present application provides a road network optimization device, which is deployed on a computer device, and the device comprises 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 to which a to-be-processed road segment belongs after new position information of the to-be-processed road segment is collected.
[0015] The determination unit is configured to determine, for each road segment in the original road network data, a neighbor 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 the neighbor road segment of each road segment in the original road network data, to obtain optimized position information of each road segment.
[0017] The construction unit is configured to construct an optimized road network of the original road network data by using the optimized position information of each road segment.
[0018] In an aspect, an embodiment of the present application provides a computer device, which comprises a processor and a memory:
[0019] The memory is configured to store a computer program and transmit the computer program to the processor.
[0020] The processor is configured to execute a method according to any one of the preceding aspects according to instructions in the computer program.
[0021] In an aspect, an embodiment of the present application provides a computer readable storage medium, which is configured to store a computer program, and the computer program, when executed by a processor, causes the processor to execute a method according to any one of the preceding aspects.
[0022] In an aspect, an embodiment of the present application provides a computer program product, which comprises a computer program, and the computer program, when executed by a processor, implements a method according to any one of the preceding aspects.
[0023] It can be seen from the technical solution that when the newly collected position information is fused with the existing road network data (i.e., original road network data), the original position information of the road segment to be processed is not directly replaced by the new position information, but the original road network data is globally optimized. Specifically, after the new position information of the road segment to be processed is collected, the original road network data to which the road segment to be processed belongs is obtained. Then, for each road segment in the original road network data, the neighbor road segments of the road segment are determined, so that when the global road network optimization is performed, the influence of the neighbor road segments on the position of the road segment is considered for each road segment, and then the road network optimization is performed based on the new position information and the original position information of each road segment and its neighbor road segments in the original road network data, to obtain the optimized position information of each road segment. In this way, the connection relationship between each road segment and its neighbor road segments after optimization can be ensured. The optimized position information of each road segment obtained by the above process is used to construct the optimized road network of the original road network data, and the optimized road network is globally optimized and smoothed. The original road network data is globally optimized and smoothed in the application to eliminate the problems caused by the fusion of position information of different precisions, 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. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0025] FIG. 1 is an application scenario architecture diagram of a road network optimization method provided by an embodiment of the present application;
[0026] FIG. 2 is a flowchart of a road network optimization method provided by an embodiment of the present application;
[0027] FIG. 3 is an example diagram of the position relationship of a satellite map main road and auxiliary road provided by an embodiment of the present application;
[0028] FIG. 4 is an example diagram of road network data obtained for the same main road and auxiliary road provided by an embodiment of the present application;
[0029] FIG. 5 is an example diagram of converting original road network data into graph data provided by an embodiment of the present application;
[0030] FIG. 6 is an example diagram of the position relationship between road segments in an up-down elevated scenario provided by an embodiment of the present application;
[0031] FIG. 7 is an example diagram of the position relationship between a main road and an auxiliary road in a main road and auxiliary road scenario provided by an embodiment of the present application;
[0032] FIG. 8 is an actual application effect example diagram of a road network optimization method provided by an embodiment of the present application;
[0033] FIG. 9 is an actual application effect example diagram of another road network optimization method provided by an embodiment of the present application;
[0034] FIG. 10 is a structure diagram of a road network optimization device provided by an embodiment of the present application;
[0035] FIG. 11 is a structure diagram of a terminal provided by an embodiment of the present application;
[0036] FIG. 12 is a structure diagram of a server provided by an embodiment of the present application. DETAILED DESCRIPTION
[0037] The embodiments of the present application will be described below with reference to the accompanying drawings.
[0038] For the convenience of understanding, first, the related concepts are described.
[0039] Road network (Road Network): modeling the real world road to obtain the corresponding directed graph can be called road network. Each edge in the directed graph representing the road network represents a segment of the real road, which is called a road segment.
[0040] Road segment: each road can usually be represented by multiple line segments, and each line segment is represented by the position information (for example, it can be longitude and latitude) of the starting point and the ending point. The starting point and the ending point of a road are the starting point of the first line segment and the ending point of the last line segment. Each line segment can be called a road segment. The road segment usually also contains the number of lanes, traffic lights, lane direction, etc. of the road segment.
[0041] Elevation: the distance of a point on a road segment in the road network along the vertical line to the absolute base surface can be called absolute elevation, which is simply called elevation. The absolute base surface here is generally the sea level.
[0042] Overlapping relationship: it can refer to two road segments whose elevations are in the same plane, and their relative positions are very close, resulting in spatial overlapping parts of the two road segments, that is, the road segments are mutually overlapped. There are many reasons for the overlapping relationship, such as temporary road repair, local road network position optimization, etc.
[0043] Road network shape optimization: it can refer to adjusting the position of each point in the road segment, so as to change the shape of each road segment, so that the accuracy of the overall road network data is higher.
[0044] Graph model: it can be a model for processing graph structure data.
[0045] Graph Neural Network (GNN): can be a kind of graph model, the graph neural network can be a method of neural network in the field of graph, which refers to using neural network to learn graph structure data, extract and explore features and patterns in the graph structure data. Its input is a directed or undirected graph.
[0046] Various methods for obtaining road network data are provided in the related art, and after obtaining the road network data, new road network data can continue to be generated, and in order to ensure the accuracy of the used road network data, the existing road network data can need to be updated using the new road network data.
[0047] The new road network data can be collected based on different technologies and means, and the data collected by different technologies or means has certain deviation in accuracy, and because the data production is partial update, that is, the new road network data collected can be the position information of part of the road segments in the existing road network data, when the existing road network data is updated using the newly collected road network data, the updated part and the non-updated part can have deviation, and different accuracy data fusion can affect the quality of the updated road network data.
[0048] To solve the above technical problems, the embodiment of the present application provides a road network optimization method, which is not directly using new position information to replace the original position information of the road segment to be processed to obtain new road network data, but performing global and smoothing on the original road network data to eliminate the problem caused by different accuracy data fusion, that is, performing overall shape optimization on the original road network data. In the optimization process, the influence of the neighbor road segment on the position of the road segment is considered, and then the road network optimization is performed based on the new position information and the original position information of each road segment and its neighbor road segment in the original road network data, to ensure the connection relationship between each road segment and its neighbor road segment after optimization, and realize global optimization and smoothing of the road network data.
[0049] It should be noted that the road network optimization method provided by the embodiment of the present application can be applied to the fields of electronic map, autonomous driving, assisted driving, intelligent transportation, cloud technology, artificial intelligence, etc., and road network data can be required in these fields. The scenarios using road network data can be, for example, autonomous driving, high-precision positioning, lane-level positioning, traffic management, city planning, tourism, logistics, games, virtual reality, augmented reality, etc., which are not limited by the embodiment of the present application.
[0050] The road network optimization method provided by the embodiments of the present application can be executed by a computer device, which can be a server or a terminal. The server can be a physical server, a server cluster composed of multiple physical servers, a distributed system, or a cloud server providing cloud computing services. The terminal includes, but is not limited to, a smartphone, a computer, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, and the like.
[0051] As shown in FIG. 1, FIG. 1 shows an application scenario architecture diagram of a road network optimization method, which is introduced by taking a server as an example of the computer device. The application scenario can include a server 100.
[0052] Road network data is very important infrastructure, and high precision is required. Therefore, it is necessary to update the road network data continuously. Since the data production is partial update, only part of the road network data can be updated in the updating process, that is, the new road network data collected is the position information of part of the road segments. Therefore, the newly collected position information of part of the road segments needs to be fused with the existing road network data to update the road network data.
[0053] The newly collected position information of part of the road segments can be collected based on different technologies and means. The data collected by different technologies or means has certain deviation in precision, and the deviation caused by the updated part and the non-updated part can be caused during fusion. Therefore, in order to solve the above problems generated in the fusion process, the road network data can be optimized as a whole by the method provided by the embodiments of the present application.
[0054] Specifically, after collecting the new position information of the to-be-processed road segment, the server 100 can obtain the original road network data to which the to-be-processed road segment belongs.
[0055] The to-be-processed road segment is a road segment whose data (for example, position information) is updated and collected. The to-be-processed road segment can be part of the road segments in the road network data. The new position information is the newly collected position information of the to-be-processed road segment, and the new position information can be used as the target of road network optimization. The original road network data can be the existing road network data that needs to be updated by the new position information.
[0056] Then, for each road segment in the original road network data, the server 100 can determine the neighbor road segments of the road segment, so as to consider the influence of the neighbor road segments on the position of the road segment when performing global road network optimization, and then perform road network optimization based on the new position information and the original position information of each road segment and its neighbor road segments in the original road network data, to obtain the optimized position information of each road segment. In this way, the connection relationship between each optimized road segment and its neighbor road segments can be ensured. The optimized position information of each road segment obtained by using the above process is used to construct an optimized road network of the original road network data, and the optimized road network is globally optimized and smoothed.
[0057] It should be noted that in the specific embodiments of the present application, user information and other related data may be involved in the entire process. When the above embodiments of the present application are applied to specific products or technologies, the user's separate consent or separate license needs to be obtained, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of the country and region.
[0058] Next, the road network optimization method provided by the embodiments of the present application will be introduced in combination with the accompanying drawings. Referring to FIG. 2, FIG. 2 shows a flowchart of a road network optimization method, and the method comprises:
[0059] S201, after collecting new position information of a to-be-processed road segment, obtaining original road network data to which the to-be-processed road segment belongs.
[0060] The road network data can be obtained by modeling the roads in the real world. In order to ensure the accuracy of the road network data, it may be necessary to update the road network data continuously. For example, the roads in the real world may change, such as road widening or the addition of auxiliary roads, etc. In order to obtain road network data that accurately reflects the roads in the real world, the existing road network data needs to be updated. For another example, the technology and means for collecting data when modeling may change. In order to continuously improve the accuracy of the road network data, the road network data can be updated.
[0061] Since the data production is partially updated, in the updating process, only a part of the road network data may be updated, that is, the new road network data collected is the position information of a part of road segments. Therefore, it is necessary to fuse the newly collected position information of a part of road segments with the existing road network data (i.e. the original road network data) to realize the updating of the road network data. The part of road segments that has undergone data updating can be referred to as a to-be-processed road segment, and the newly collected position information of a part of road segments can be referred to as new position information. The new position information can be high-precision road network true value data, and the original road network data is the road network data used before the data updating, in order to model the roads in the real world.
[0062] The embodiment of the present application does not limit the collection manner of the new position information. In a possible implementation manner, the new position information can be obtained from high-precision three-dimensional point cloud data collected by a high-precision collection device. The accurate position of each element of the road section to be processed, that is, the new position information, can be obtained through a three-dimensional point cloud recognition algorithm. Generally, the error of the new position information recognized by the high-precision collection device is less than 1 meter, and therefore the new position information can be used as true value data. However, there are three problems in the true value data. First, the collection cost of the high-precision collection device is very high, and therefore the true value data of the road section to be processed can only cover a small number of road sections in the road network data. Second, the high-precision three-dimensional point cloud data needs to be post-processed by an algorithm to obtain highly accurate new position information, and the algorithm itself has certain limitations, for example, in a complex intersection or a scene with serious occlusion, there is a certain loss of accuracy. Third, the real-world road can change at any time, and the true value data is collected within a period of time, and therefore the true value data has a certain timeliness problem.
[0063] Based on the above problems existing in the true value data, when the new position information is fused with the original road network data, the deviation caused by the updated part and the non-updated part can be caused, and therefore the quality of the updated road network data is affected. Especially in the main auxiliary road scene, when the main road collects new road network data and the auxiliary road position is not collected, the main auxiliary road road surface overlay problem caused by the position change of the main road is often caused.
[0064] Referring to FIG. 3 and FIG. 4, FIG. 3 is a position relationship of satellite map main auxiliary road, and FIG. 4 is an example diagram of road network data obtained for the same main auxiliary road. In the satellite map, 301 represents the auxiliary road, and 302 represents the main road, which more accurately reflects the position relationship of the main road and the auxiliary road in the real world. In FIG. 4, the auxiliary road and the main road in the real world are respectively modeled as a line, the line represented by 401 represents the auxiliary road, and the line represented by 402 represents the main road. The position of the auxiliary road is biased downward, and the main road and the auxiliary road form an overlay relationship.
[0065] Therefore, after the new position information of the road section to be processed is collected, the position and shape of the current road network need to be considered comprehensively, and the adaptation problem of the true value data and the ordinary road section and the complex scene such as the intersection also needs to be solved, and therefore the road network data can be globally optimized by the method provided in the embodiment of the present application.
[0066] S202, for each road section in the original road network data, determining a neighbor road section of the road section.
[0067] Each road segment in the original road network data may not exist independently in many cases, and may have a dependency relationship with other road segments, for example, neighbor road segments of the road segment. The neighbor road segments of the road segment can be other road segments connected with the road segment, and the positions of the road segment and its neighbor road segments influence each other. If the position information of a road segment is updated without considering the neighbor road segments of the road segment, the updated road segment and its neighbor road segments may not be smoothly connected, misaligned, or even have other problems.
[0068] Based on this, the embodiments of the present application determine the neighbor road segments of each road segment, so that when performing global road network optimization, the influence of the neighbor road segments on the position of each road segment is considered.
[0069] S203, performing road network optimization based on the new position information and the original position information of each road segment in the original road network data, to obtain the optimized position information of each road segment.
[0070] S204, constructing the optimized road network of the original road network data by using the optimized position information of each road segment.
[0071] The influence of the neighbor road segments on the position of each road segment is considered, and then the road network optimization is performed based on the new position information and the original position information of each road segment in the original road network data, to obtain the optimized position information of each road segment. In this way, the connection relationship between each road segment and its neighbor road segments after optimization can be ensured. The optimized position information of each road segment obtained by the above process is used to construct the optimized road network of the original road network data, and the optimized road network realizes global optimization and smoothness.
[0072] It should be noted that when the road network optimization is performed based on the new position information and the original position information of each road segment in the original road network data, the new position information is not directly used to replace the original position information of the road segment to be processed, but the global optimization is performed by considering the position relationship, shape, and transition between the road segment to be processed and its neighbor road segments, to realize smooth transition and ensure that the optimized road network can reflect the actual situation of the road segment in real time.
[0073] It can be seen from the above technical solution that when the newly collected position information is fused with the existing road network data (i.e., original road network data), the new position information is not directly used to replace the original position information of the road segment to be processed, but the original road network data is globally optimized. Specifically, after the new position information of the road segment to be processed is collected, the original road network data to which the road segment to be processed belongs is obtained. Then, for each road segment in the original road network data, the neighbor road segments of the road segment are determined, so that when the global road network optimization is performed, the influence of the neighbor road segments on the position of each road segment is considered, and then the road network optimization is performed based on the new position information and the original position information of each road segment and its neighbor road segments in the original road network data, to obtain the optimized position information of each road segment. In this way, the connection relationship between each road segment and its neighbor road segments after optimization can be ensured. The optimized position information of each road segment obtained by using the above process is used to construct the optimized road network of the original road network data, and the optimized road network is globally optimized and smoothed. The original road network data is globally optimized and smoothed in the application to eliminate the problems caused by the fusion of position information of different precisions, 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.
[0074] In a possible implementation, the global optimization can be implemented using a graph model, which can be a way of vectorizing the vertices on the graph as entities. When the global optimization is implemented using the graph model, the way of determining the neighbor road segments of a road segment can be to determine the neighbor 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, to obtain graph data of the original road network data. The graph data is an abstract graph corresponding to the original road network data, and can include first vertices and first edges between the first vertices, the first vertices being road segments in the original road network data, and the first edges being road nodes connecting different road segments in the original road network data. Based on the existence of the first edges between the first vertices in the graph data, the first neighbor points of each first vertex in the graph data are determined, and then the neighbor road segments of the road segment are determined according to the first neighbor points of the first vertex corresponding to the road segment.
[0075] It can be understood that in the road network optimization problem, the road segment is the target entity of optimization. For the association relationship between road nodes in the road network, it can be considered almost fixed. In constructing the graph data corresponding to the original road network data, the original road network data is exchanged between the road nodes and the road segments, 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 the first edges on the graph data. As shown in FIG. 5, the original road network data includes five road segments and six road nodes, and the five road segments are respectively denoted as L1, L2, L3, L4 and L5, and the six road nodes are respectively denoted as N1, N2, N3, N4, N5 and N6. The converted graph data can be seen from the lower part of FIG. 5, each road segment corresponds to a vertex on the graph data (the vertex on the graph data is referred to as a first vertex), and if a road node connects two different road segments, the road node corresponds to an edge (referred to as a first edge) between the first vertices on the graph data. For the road node N3, since it has only one road segment connected thereto, N3 has no corresponding edge on the graph data. Thus, the graph data corresponding to the original road network data is obtained. Generally, the graph data is denoted as G(V, E), wherein V represents a vertex set, and E represents an edge set, i.e., a first edge set.
[0076] After obtaining the graph data, whether the first edge exists between the first vertices in the graph data can reflect whether the first vertices have a neighbor relationship. If the first edge exists between two first vertices, it indicates that the two first vertices have a neighbor relationship, and one of the first vertices can be referred to as the first neighbor point of the other first vertex. Conversely, it indicates that the two first vertices do not have a neighbor relationship. Thus, the first neighbor point of each first vertex can be determined, and the neighbor road segments of the road segments are obtained.
[0077] In the implementation of global optimization using the graph model, the manner of optimizing the road network based on the new position information and the original position information of each road segment in the original road network data can be to determine the Lth iteration 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 iteration position information representation of the first neighbor point of the first vertex is the original position information of the neighbor road segment of the road segment corresponding to the first vertex in the original road network data. 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, the (L+1)th iteration position information representation of each first vertex is determined. The target loss is constructed based on the (L+1)th iteration position information representation of each first vertex and the new position information. The model parameters of the graph model are solved by minimizing the target loss, and the model parameter values of the graph model are obtained. Based on the model parameter values of the graph model and the (L+1)th iteration position information representation of each first vertex, the optimized position information of each road segment is obtained.
[0078] In the embodiments of the present application, the road network optimization can actually be to optimize the position information of each first vertex on the graph data, and the manner of optimizing the position information of each first vertex can be to continuously iterate based on the position information of the road segment in the original road network data until the iteration stopping condition is met, so as to obtain the optimized position information of the road segment. The iteration stopping condition can be to reach a preset iteration number, or the position information obtained by iteration is optimal. In the iteration process, the position information representation of the road segment in the next iteration is determined based on the position information representation of the road segment obtained in the previous iteration. Here, the next iteration can refer to the (L+1)th iteration, and the previous iteration can refer to the Lth iteration.
[0079] In order to realize global optimization and ensure the adaptation between adjacent road segments, the position information of each first vertex in the (L+1)th iteration can be determined based on the Lth iteration position information representation of its first neighbor point.
[0080] The Lth iteration position information representation of the first neighbor point can be the position information representation of the first neighbor point obtained after the Lth iteration. It can be understood that for each first vertex, when L = 0, the Lth iteration position information representation of the first neighbor point of the first vertex is the position information of the road segment corresponding to the first neighbor point in the original road network data. That is, 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 the first vertex 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 coordinates in a Cartesian coordinate system, or latitude and longitude coordinates, and the present application does not limit the representation form of the position information.
[0081] In order to keep the feature dimension of the position information of each road segment corresponding to the first vertex consistent, all road segments can be evenly divided into 100 parts, and the latitude and longitude coordinates of each part are calculated to obtain 200-dimensional position information of each road segment.
[0082] In a possible implementation, the manner of determining the first neighbor points of each first vertex in the graph data based on the presence of the first edges between the first vertices in the graph data can be determining a first neighbor matrix corresponding to the graph data based on the presence of the first edges between the first vertices in the graph data, the first neighbor matrix being used to represent the first neighbor points of each first vertex. Correspondingly, the manner of determining the Lth iteration position information representation of the first neighbor points of each first vertex in the graph data can be obtaining the Lth iteration position information representation of each first vertex in the graph data, and for each first vertex, when L = 0, the Lth iteration position information representation of the first vertex is the position information of the corresponding road segment in the original road network data. Then the Lth iteration position information representation of each first vertex in the graph data is multiplied by the first neighbor matrix to obtain the Lth iteration position information representation of the first neighbor points of each first vertex in the graph data. Wherein, the Lth iteration position information representation of each first vertex in the graph data can be represented by a matrix H(L), the first neighbor matrix can be represented by a matrix A, and L is the iteration number. When determining the first neighbor matrix, if there is a first edge between two first vertices, the corresponding element position in the first neighbor matrix is 1, otherwise it is 0.
[0083] The manner of determining the Lth iteration position information representation of the first neighbor points of each first vertex through matrix calculation can improve the convenience and accuracy of determining the Lth iteration position information representation of the first neighbor points.
[0084] The manner of optimizing the position information of each first vertex can be continuously iterating based on the position information of the road segments in the original road network data until the iteration stopping condition is met, so as to obtain the optimized position information of the road segments. In the iteration process, for any iteration (for example, the (L+1)th iteration), the position information representation of the road segments in this iteration is determined based on the position information representation of the road segments obtained in the previous iteration (for example, the Lth iteration). Therefore, the server can determine the (L+1)th iteration position information representation of each first vertex based on the Lth iteration position information representation of the first neighbor points of each first vertex and the model parameters of the graph model.
[0085] It should be noted that the network structure of the graph model is not limited in the embodiments of the present application. The graph model may, for example, be a graph neural network model, a conditional random field (CRF) model, a related optimization model based on a factor graph, etc.
[0086] In a possible implementation, the (L+1)th iteration position information representation of the first neighbor point of the first vertex after the iteration can be a linear combination of the Lth iteration position information representation of the first neighbor point of the first vertex, and then the linear combination is subjected to an activation function. Based on this, the graph model can perform the transmission and update of the position information between vertices by the following formula: H (L+1) = σ(AH (L) W (L) )
[0087] wherein H is the position information of each first vertex on the graph data, specifically, H (L) is the Lth iteration position information representation of each first vertex, A is the first neighbor matrix of the graph data, L is the iteration number, 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, that is, the model parameter to be learned. σ is an activation function. In a possible implementation, the activation function can be a rectified linear unit (ReLU) function.
[0088] It should be noted that in some scenarios, especially in the main and auxiliary road scenarios, when the main road collects new road network data, and the auxiliary road position is not collected, the main and auxiliary road road surface overlay problem caused by the change of the main road position often occurs. Since the overlay relationship is represented as the distance relationship between two first vertices in the graph data, and the overlay 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, therefore, the graph of the original road network data overlay relationship needs to be constructed first, which is referred to as the conjugate graph of the graph data.
[0089] The definition of the grommet relationship is the relationship between road segments that are very close in distance. In this case, the manner in which the L+1th iteration position information representation of each first vertex is determined based on the Lth iteration position information representation of each first neighbor vertex of each first vertex and the model parameters of the graph model can be to obtain the distances between the first vertices in the graph data, determine, for each first vertex in the graph data, other first vertices that have a distance less than a distance threshold from the first vertex, and determine, based on the other first vertices that have a distance less than the distance threshold from the first vertex, a candidate vertex set for the first vertex. In this way, each road segment can find road segments near it, so that the first vertices that are very close in spatial distance in the original graph data are found to form the candidate vertex set. Then, each first vertex and the first vertices in the corresponding candidate vertex set are connected to obtain a conjugate graph of the graph data, the conjugate graph including second vertices and second edges between the second vertices, the second vertices being each first vertex and the first vertices in the corresponding candidate vertex set, and the second edges being edges between adjacent two second vertices. Next, the Lth iteration position information representation of each second neighbor vertex of each second vertex in the conjugate graph is determined based on the presence of the second edges between the second vertices in the conjugate graph, and then the L+1th iteration position information representation of each first vertex is generated based on the Lth iteration position information representation of each first neighbor vertex of each first vertex, the Lth iteration position information representation of each second neighbor vertex of each second vertex, and the model parameters of the graph model.
[0090] The conjugate graph can be represented as G1(V, E1), where V represents a vertex set, and E1 represents an edge set, i.e., a set of second edges.
[0091] In the case of considering the grommet relationship, the L+1th iteration position information representation of each first vertex can be generated based on the Lth iteration position information representation of each first neighbor vertex of each first vertex and the Lth iteration position information representation of each second neighbor vertex of each second vertex. Specifically, the L+1th iteration position information representation of each first vertex has a positive correlation relationship with the Lth iteration position information representation of each first neighbor vertex of each first vertex, and has an inverse correlation relationship with the Lth iteration position information representation of each second neighbor vertex of each second vertex.
[0092] The Lth iteration position information representation of the second neighbor of the second vertex can also be obtained by matrix calculation, that is, first, based on the existence of the second edge between the second vertices in the conjugate graph, a second neighbor matrix corresponding to the conjugate graph is determined, and then the Lth iteration position information representation of each second vertex in the conjugate graph is obtained. Then, the Lth iteration position information representation of each second vertex in the conjugate graph is multiplied by the second neighbor matrix to obtain the Lth iteration position information representation of the second neighbor of each second vertex in the conjugate graph. The second neighbor matrix can be denoted as A1.
[0093] In this case, the position information between the vertices of the graph model can be transmitted and updated by the improved formula as follows: H (L+1) = σ ((A-A1)H (L) W (L) )
[0094] where H (L) is the Lth iteration position information representation of each first vertex, A is a first neighbor matrix of the graph data, L is the number of iterations, and AH (L) is the Lth iteration position information representation of the first neighbor of the first vertex, W (L) is a weight coefficient, that is, a model parameter to be learned. A1 is a second neighbor matrix of the conjugate graph, which is 1 if two second vertices are adjacent, and 0 otherwise. A-A1 represents the positive correlation between the first neighbor in the graph data and the negative correlation between the second vertices in the conjugate graph.
[0095] By constructing the conjugate graph to realize the message passing of the covering relationship, the global road network optimization is realized. In the iteration process, the covering relationship that may be caused by optimization is considered, so as to avoid introducing new covering relationship between road segments after optimization in the optimization process, thereby improving the quality of the optimized road network.
[0096] It can be understood that the covering relationship is not not allowed to exist in any scenario, for example, in the upper and lower viaduct scenario, the road segments on the upper side and the road segments on the lower side are allowed to have a covering relationship, as shown in FIG. 6. In FIG. 6, the road segments 601 and 602 on the upper side have a covering relationship with the road segment 603 on the lower side. In the main and auxiliary road scenario, the main road and the auxiliary road are relatively close, but the main road and the auxiliary road are not allowed to have a covering relationship, as shown in FIG. 7. In FIG. 7, 701 represents the main road, and 702 represents the auxiliary road.
[0097] The scenario allowing the existence of the overlying relationship is usually a scenario of two road segments not in the same plane, and whether the two road segments are in the same plane can be determined by the elevation difference between the road segments. In this case, the manner of determining the candidate point set of the first vertex based on other first vertices with a distance less than a distance threshold from the first vertex can be to obtain the elevation information of the first vertex and the elevation information of the other first vertices, to obtain the elevation difference by subtracting the elevation information of the first vertex from the elevation information of the other first vertices. The elevation difference can reflect whether the two road segments are in the same plane, and then determine whether the overlying relationship is allowed to exist. If the elevation difference is relatively small, for example, less than an elevation difference threshold, it indicates that the corresponding two road segments are in the same plane, and the overlying relationship is not allowed to exist, so the other first vertices with the elevation difference less than the elevation difference threshold are constructed into the candidate point set of 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 corresponding two road segments are not road segments in the same plane, and the overlying relationship is allowed to exist, so the first vertices corresponding to these road segments are excluded from the candidate point set. The elevation difference threshold can be set according to actual conditions, for example, it can be set to 2 meters.
[0098] The embodiment of the present application determines whether two road segments are in the same plane through the elevation difference, so as to more accurately determine whether the overlying relationship is allowed to exist between the two road segments, and then perform targeted processing on the scenario not allowing the existence of the overlying relationship when optimizing the road network, 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+1 iteration position information of each first vertex is represented based on the model parameter of the graph model, and the specific value of the model parameter of the graph model is unknown, that is, it needs to be solved. In the solving process, the adjustment cannot be unlimited, but needs to be adjusted in compliance with certain constraints, and the constraint can be reflected by the target loss, so the target loss can be constructed.
[0100] Since the road network optimization is to optimize the road network with the collected new position information as the target, and at the same time make the new position information better fused with the original road network data, the target loss is constructed based on the L+1 iteration position information of each first vertex and the new position information. Then, the model parameter of the graph model is solved by minimizing the target loss, to obtain the model parameter value of the graph model, so that the optimized position information is as close as possible to the new position information.
[0101] The L+1th iteration 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 iteration 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] The present application eliminates the problems caused by the fusion of different precision position information by globally optimizing and smoothing the original road network data through the graph model, 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. In the optimization process, the formula for position information transmission and update between first vertices is constructed, and then 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, the L+1th iteration position information representation of each first vertex is determined, so as to convert the road network optimization problem into a mathematical optimal solution problem, so as to quickly and accurately determine the optimized position information of the road segment.
[0103] In addition, by improving the quality of the road network data, the adsorption precision of the driving trajectory can be improved in the automatic driving, navigation and other scenarios.
[0104] It can be understood that the target loss is an important factor to ensure the quality of the road network, and the construction method of the target loss will be described in detail.
[0105] In constructing the target loss, in order to make the optimized position information as close to the new position information as possible, the new position information of the to-be-processed road segment can be taken as the true value data of the to-be-processed road segment, and the corresponding constraint can be added to the target loss of the graph model. In this case, the way of constructing the target loss based on the L+1th iteration position information representation of each first vertex and the new position information can be to determine the L+1th iteration position information representation of the to-be-processed road segment from the L+1th iteration position information representation of each first vertex. Then, based on the gap between the L+1th iteration position information representation of the to-be-processed road segment and the new position information, a first loss is constructed. The first loss requires the optimized position information to be as close to the new position information as possible, and when the optimized position information is completely consistent with the new position information, the value of the first loss is 0. Then, the target loss is generated based on the first loss.
[0106] In one possible implementation, in order to adapt to the problem that the new position information has errors in very few scenarios, the present application embodiment can use the sum of squares error function to calculate the first loss. At this time, the calculation formula of the first loss can be as follows:
[0107] Wherein, V S is all to-be-processed road segments, vi is the i-th vertex, is an x-axis coordinate of the new position information of the i-th vertex, is a y-axis coordinate of the new position information of the i-th vertex, is an x-axis coordinate of the L+1-th iteration position information of the i-th vertex, is a y-axis coordinate of the L+1-th iteration position information of the i-th vertex.
[0108] By constructing the target loss in the above manner, the optimized position information can be made to be as close as possible to the new position information, thereby improving the accuracy of the optimized road network.
[0109] In a possible implementation, in the optimization process, in addition to making the optimized position information as close as possible to the new position information, the road network optimization rules also need to be met, thereby ensuring that the road segments in the optimized road network meet the basic requirements of the roads in the real world. Therefore, in a possible implementation, the manner of generating the target loss based on the first loss can be to construct a second loss according to the road network optimization rules, and then to perform weighted summation on the first loss and the second loss to obtain the target loss. In this way, the adaptation problem of the road segments is solved, smooth transition is achieved, and it is ensured that the road segments in the optimized road network meet the basic requirements of the roads in the real world.
[0110] When the first loss and the second loss are weighted and summed to obtain the target loss, the weights of the first loss and the second loss can be adjusted according to actual needs, for example, the weight of the first loss can be adjusted according to the accuracy of the ground truth data (i.e., the new position information). For example, if the ground truth data (e.g., the new position information) is collected based on other low-precision trajectory data, the difference between the direction change of the trajectory at the road bend and the requirement of the road network process is often relatively large, and the weight of this part of the loss (i.e., the first loss) can be reduced.
[0111] In this case, the manner of weighting and summing the first loss and the second loss to obtain the target loss can be to determine a first weight of the first loss according to the accuracy of the new position information, and to obtain a second weight of the second loss, the first weight determined when the accuracy of the new position information is a first accuracy is less than the first weight determined when the accuracy of the new position information is a second accuracy, the first accuracy is less than an accuracy threshold, and the second accuracy is greater than or equal to the accuracy threshold. That is, if the accuracy of the new position information is relatively high, it means that the credibility of the new position information is relatively high, and therefore the weight of the first loss can be increased, and if the accuracy of the new position information is relatively low, it means that the credibility of the new position information is not high, and therefore the weight of the first loss can be reduced. Then, the first loss and the second loss are weighted and summed using the first weight and the second weight to obtain the target loss.
[0112] The weight of the first loss is adjusted according to the accuracy of the new position information, and the road network can be optimized by more accurate position information, thereby improving the quality of the optimized road network.
[0113] It can be understood that when the second loss is constructed according to the road network optimization rule, the road network optimization rule can be different in different cases, and the constructed second loss can also be different. When the road segments corresponding to the first vertices are connected road segments, the road network optimization rule can be that the end point of the previous road segment and the start point of the subsequent road segment in the connected road segments meet the position consistency rule. At this time, according to the road network optimization rule, the way of constructing the second loss can be that if the road segments corresponding to the two first vertices are connected road segments, the L+1 iteration position information representation of the end point of the previous road segment in the connected road segments is determined based on the L+1 iteration position information representation of each first vertex, and the L+1 iteration position information representation of the start point of the subsequent road segment in the connected road segments is determined. The second loss is constructed based on the difference between the L+1 iteration position information representation of the end point and the L+1 iteration position information representation of the start point.
[0114] By constructing the second loss in the above manner, the positions of the end point of the previous road segment and the start point of the subsequent road segment in the connected road segments can be kept consistent when optimizing the road network.
[0115] When the road segments corresponding to the two first vertices have a certain included angle, the road network optimization rule is that the included angle between the road segments meets a preset angle rule. At this time, according to the road network optimization rule, the way of constructing the second loss can be that the initial angle value of the included angle between the two road segments is obtained according to the original road network data, and then the L+1 iteration angle value representation of the included angle between the two road segments after the L+1 iteration is determined according to the L+1 iteration position information representation of each first vertex. Further, the second loss is constructed based on the initial angle value of the included angle between the two road segments and the L+1 iteration angle value representation.
[0116] According to the initial angle value of the included angle between the road segments, the preset angle rule can be different. For example, if the initial angle value is relatively large, it means that the road segments may indeed have a certain included angle, and at this time the preset angle rule is the angle invariance rule, that is, the angle of the included angle needs to be kept unchanged during optimization. For another example, if the initial angle value is relatively small or even close to zero, it means that the road segments may actually be a straight line, and at this time the preset angle rule is the angle zero rule, that is, the road segments are straightened as much as possible during optimization.
[0117] In this case, the way of 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 can be to compare the initial angle value with an angle threshold to obtain a comparison result, and 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 the two road segments can indeed have a certain angle, and then the gap between the initial angle value and the L+1th iteration angle value is determined, and then the second loss is constructed based on the gap between the initial angle value and the L+1th iteration angle value.
[0118] In a possible implementation, the second loss can be represented by a sum-of-squares function, and the calculation formula of the second loss is as follows:
[0119] wherein r represents the angle of the road segment corresponding to the first vertex after optimization, R(E) represents the angle between the two road segments that need to be kept unchanged, r i is the L+1th iteration angle value of the angle between the i-th road segment, and r is the initial angle value of the angle between the i-th road segment.
[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, and the two road segments can actually be a straight line, and the road segments in the original road network data can not be straight enough. At this time, the angle zero rule is followed, and the second loss is constructed based on the L+1th iteration angle value. The angle threshold can be set according to actual needs, for example, it can be set to 5 degrees.
[0121] In a possible implementation, the second loss can be represented by a sum-of-squares function, and the calculation formula of the second loss is as follows: r∈R1(E) r i ×r i r∈R1(E)if r0≤5
[0122] wherein 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, r i is the L+1th iteration angle value of the angle between the i-th road segment, and r0is the initial angle value of the angle between the i-th road segment.
[0123] In the above manner, the angle between the road segments with an angle can be kept, and the road segments in the original road network data that are not straight enough can be straightened, thereby meeting the optimization needs of different road segments and improving the quality of the optimized road network.
[0124] It should be noted that the above plurality of ways of determining the second loss can select at least one for use, and when the above plurality of ways are selected to construct the second loss, the second loss can be obtained by weighting a plurality of partial losses, so as to simultaneously satisfy the road network optimization rule, to find a road network that is as matched as possible with the newly collected new position information and realizes smooth transition under the premise of guaranteeing the position information of the original road network data as much as possible, and effectively reduce the problem of part of the road network data quality improvement and road network global data conflict.
[0125] When considering the road network optimization in the grommet relationship, the improved formula is used for the transmission and update of the position information between the vertices, and correspondingly, when constructing the target loss, the loss brought by the grommet relationship is also needed. In this case, the way of constructing the target loss based on the L+1 iteration position information representation of each first vertex and the new position information can be to determine the L+1 iteration position information representation of the to-be-processed road segment from the L+1 iteration position information representation of each first vertex. Then, based on the gap between the L+1 iteration position information representation of the to-be-processed road segment and the new position information, the first loss is constructed. For any two second vertices of a second edge in the conjugate graph, the distance between the two second vertices is determined, and then the third loss is constructed according to the distance between the two second vertices. The distance between the two second vertices and the value of the third loss are negatively related, that is, the greater the distance between the two second vertices, the smaller the third loss, and when the distance between the two second vertices reaches a certain degree, the third loss is 0, and there is no grommet relationship. Then, the first loss and the third loss are weighted and summed to obtain the target loss.
[0126] The calculation manner of the third loss is not limited in the embodiments of the present application, and in a possible implementation manner, the third loss can be calculated by the following formula:
[0127] wherein a and b are two second vertices connected by the second edge e in the conjugate graph, E1 represents a set of edges of the conjugate graph, represents an x-axis coordinate of the L+1 iteration position information representation of the second vertex a, represents a y-axis coordinate of the L+1 iteration position information representation of the second vertex a, represents an x-axis coordinate of the L+1 iteration position information representation of the second vertex b, represents a y-axis coordinate of the L+1 iteration position information representation of the second vertex b, represents the reciprocal of the distance between the two second vertices, d is a constant less than 1, and in the 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 indicates that the distance between the two second vertices is relatively large, and the third loss is 0, without the grommet relationship. Otherwise, the third loss is larger as the distance is closer.
[0129] The grommet relationship possibly caused by optimization is considered in the iteration process, so that optimization is performed in the optimization process with the goal of not introducing new grommet relationships, thereby avoiding the introduction of new grommet relationships between road segments after optimization, and improving the quality of the road network after optimization.
[0130] It should be noted that in the case of considering the grommet relationship, the target loss can still be constructed in combination with the second loss described above, that is, the first loss, the second loss, and the third loss can be weighted and summed to obtain the target loss, so as to obtain a better optimized road network based on the target loss.
[0131] Since the original road network data itself has relatively high precision quality, in the process of road network optimization by the graph model, the computational complexity mainly depends on the constraints of the newly collected new position information part. This part is only a small part of the overall road network. In actual application, the graph model provided by the embodiments of the present application can quickly converge, greatly improving the production and updating efficiency of road network data. In the road network optimization process, focusing on a certain optimization effect can increase the weight of the loss corresponding to the optimization effect. For example, focusing on the optimization effect of straightening road segments, the weight of the loss corresponding to the angle zero rule can be increased.
[0132] The actual application effect of the road network optimization method provided by the embodiments of the present application can be seen from FIGS. 8 and 9. FIG. 8 mainly embodies the optimization effect of straightening road segments, wherein the black dashed line is a road segment in the original road network data, and the black solid line is a road segment of 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 after output. Here, the angle between the connected road segments changes a little, and does not affect the convergence of the graph model. FIG. 9 mainly embodies the optimization effect of reducing the grommet relationship, wherein the line marked by 901 represents a secondary road, corresponding to 401 in FIG. 4, and the line marked by 902 represents a main road, corresponding to 402 in FIG. 4. Compared with the result of the grommet relationship between the main road and the secondary road shown in FIG. 4, because the loss corresponding to the grommet relationship (i.e., the third loss) tends to infinity when the distance tends to zero, in order to achieve the minimum target loss, the graph model will preferentially reduce the grommet relationship, so that the secondary road shown by 901 and the main road shown by 902 are far away, avoiding the grommet relationship.
[0133] It should be noted that the implementation manners provided by the present application in the above aspects can be further combined to provide more implementation manners.
[0134] Based on the road network optimization method provided in the foregoing embodiments, an embodiment of the present application further provides a road network optimization device 1000. Referring to FIG. 10, the road network optimization device 1000 comprises 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 to which a to-be-processed road segment belongs after collecting new position information of the to-be-processed road segment.
[0136] The determination unit 1002 is configured to determine, for each road segment in the original road network data, a neighbor 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 each neighbor road segment 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 by using the optimized position information of each road segment.
[0139] In a possible implementation, the determination unit 1002 is configured to:
[0140] perform data conversion on the original road network data to which the to-be-processed road segment belongs, to obtain graph data of the original road network data, the graph data comprising first vertices and first edges between the first vertices, the first vertices being road segments in the original road network data, and the first edges being road nodes connecting different road segments in the original road network data;
[0141] determine, based on presence of the first edges between the first vertices in the graph data, first neighbor points of each first vertex in the graph data;
[0142] determine, according to the first neighbor points of the first vertex corresponding to the road segment, the neighbor road segment of the road segment.
[0143] In a possible implementation, the optimization unit 1003 is configured to:
[0144] determine Lth iteration position information representation of the first neighbor points of each first vertex in the graph data, and for each first vertex, when L=0, the Lth iteration position information representation of the first neighbor points of the first vertex is original position information of a neighbor road segment of a road segment corresponding to the first vertex in the original road network data;
[0145] determine an L+1th iteration position information representation of each of the first vertices based on the Lth iteration position information representation of the first neighbor vertex of each of the first vertices and the model parameters of the graph model;
[0146] construct a target loss based on the L+1th iteration position information representation of each of the first vertices and the new position information;
[0147] solve the model parameters of the graph model by minimizing the target loss, to obtain a value of the model parameters of the graph model;
[0148] obtain the optimized position information of each of the road segments based on the value of the model parameters of the graph model and the L+1th iteration position information representation of each of the first vertices.
[0149] In a possible implementation, the determining unit 1002 is configured to:
[0150] determine a first neighbor matrix corresponding to the graph data based on the presence of the first edges between the first vertices in the graph data, the first neighbor matrix being used to represent the first neighbor vertex of each of the first vertices;
[0151] The optimization unit 1003 is configured to:
[0152] obtain an Lth iteration position information representation of each of the first vertices in the graph data, and for each of the first vertices, when L = 0, the Lth iteration position information representation of the first vertex is the position information of the corresponding road segment of the first vertex in the original road network data;
[0153] multiply the Lth iteration position information representation of each of the first vertices in the graph data with the first neighbor matrix, to obtain an Lth iteration position information representation of the first neighbor vertex of each of the first vertices in the graph data.
[0154] In a possible implementation, the optimization unit 1003 is configured to:
[0155] determine an L+1th iteration position information representation of the to-be-processed road segment from the L+1th iteration position information representation of each of the first vertices;
[0156] construct a first loss based on a gap between the L+1th iteration position information representation of the to-be-processed road segment and the new position information;
[0157] generate the target loss based on the first loss.
[0158] In a possible implementation, the optimization unit 1003 is configured to:
[0159] construct a second loss according to a road network optimization rule;
[0160] perform weighted summation 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] determine a first weight of the first loss according to the accuracy of the new position information, and obtain a second weight of the second loss, wherein the first weight determined when the accuracy of the new position information is a first accuracy is smaller than the first weight determined when the accuracy of the new position information is a second accuracy, the first accuracy is smaller than a threshold of accuracy, and the second accuracy is greater than or equal to the threshold of accuracy;
[0163] perform weighted summation on the first loss and the second loss by 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 a previous road segment and the start point of a next road segment in connected road segments meet a location consistency rule, and the optimization unit 1003 is configured to:
[0165] if the road segments corresponding to two first vertices are connected road segments, determine an (L+1)th iteration position information representation of the end point of a previous road segment in the connected road segments and an (L+1)th iteration position information representation of the start point of a next road segment in the connected road segments based on the (L+1)th iteration position information representation of each first vertex;
[0166] construct the second loss based on a gap between the (L+1)th iteration position information representation of the end point and the (L+1)th iteration position information representation of the start point.
[0167] In a possible implementation, the road network optimization rule is that an included angle between road segments meets a preset angle rule, and the optimization unit 1003 is configured to:
[0168] obtain an initial angle value of an included angle between two road segments according to the original road network data;
[0169] determine an (L+1)th iteration angle value representation of the included angle between the two road segments after the L+1th iteration based on the (L+1)th iteration position information representation of each first vertex;
[0170] construct the second loss based on the initial angle value of the included angle between the two road segments and the (L+1)th iteration angle value representation.
[0171] In a possible implementation, the preset angle rule is an angle-invariant rule, and the optimization unit 1003 is configured to:
[0172] compare the initial angle value with an angle threshold value 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 value, determine a gap between the initial angle value and the L+1th iteration angle value representation;
[0174] construct the second loss based on the gap between the initial angle value and the L+1th iteration angle value representation.
[0175] In a possible implementation, the preset angle rule is an angle-zero 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 value, construct the second loss based on the L+1th iteration angle value representation.
[0177] In a possible implementation, the optimization unit 1003 is configured to:
[0178] obtain distances between the first vertices in the graph data;
[0179] for each first vertex in the graph data, determine other first vertices having a distance less than a distance threshold value from the first vertex, and determine a candidate point set of the first vertex based on the other first vertices having a distance less than the distance threshold value from the first vertex;
[0180] connect each first vertex and a first vertex in the corresponding candidate point set to obtain a conjugate graph of the graph data, the conjugate graph including second vertices and second edges between the second vertices, the second vertices being each first vertex and the first vertex in the corresponding candidate point set, and the second edges being edges between adjacent two second vertices;
[0181] determine an Lth iteration position information representation of a second neighbor point of each second vertex in the conjugate graph based on presence of the second edges between the second vertices in the conjugate graph;
[0182] generate an 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, the Lth iteration position information representation of the second neighbor point of each second vertex, and a model parameter of the graph model.
[0183] In a possible implementation, the optimization unit 1003 is configured to:
[0184] obtain the elevation information of the first vertex and the elevation information of the other first vertices;
[0185] difference the elevation information of the first vertex and the elevation information of the other first vertices to obtain an elevation difference value;
[0186] construct a candidate point set of the first vertex from the other first vertices with the elevation difference value less than an elevation difference threshold.
[0187] In a possible implementation, the optimization unit 1003 is configured to:
[0188] determine the L+1th iteration position information representation of the to-be-processed road segment from the L+1th iteration position information representation of each first vertex;
[0189] construct a first loss based on the gap between the L+1th iteration position information representation of the to-be-processed road segment and the new position information;
[0190] determine the distance between the two second vertices of any second edge in the conjugate graph;
[0191] construct a third loss according to the distance between the two second vertices, the distance between the two second vertices being negatively related to the value of the third loss;
[0192] perform weighted summation on the first loss and the third loss to obtain the target loss.
[0193] It can be seen from the technical solution that, when the newly collected position information is fused with the existing road network data (i.e., original road network data), the newly collected position information is not directly used to replace the original position information of the road segment to be processed, but the original road network data is globally optimized. Specifically, after the new position information of the road segment to be processed is collected, the original road network data to which the road segment to be processed belongs is obtained. Then, for each road segment in the original road network data, the neighbor road segments of the road segment are determined, so that when the global road network optimization is performed, the influence of the neighbor road segments on the position of the road segment is considered for each road segment, and then the road network optimization is performed based on the new position information and the original position information of each road segment and its neighbor road segments in the original road network data, to obtain the optimized position information of each road segment. In this way, the connection relationship between each road segment and its neighbor road segments after optimization can be ensured. The optimized position information of each road segment obtained by the above process is used to construct the optimized road network of the original road network data, and the optimized road network is globally optimized and smoothed. The original road network data is globally optimized and smoothed in the application to eliminate the problems caused by the fusion of position information of different precisions, 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.
[0194] The embodiment of the application further provides a computer device which can execute the road network optimization method. The computer device can be a terminal, and FIG. 11 shows a structural diagram of a terminal provided by the embodiment of the application. In FIG. 11, the terminal is taken as a smartphone as an example:
[0195] Referring to FIG. 11, the smartphone includes radio frequency (RF) circuit 1110, memory 1120, input unit 1130, display unit 1140, sensor 1150, audio circuit 1160, wireless fidelity (WiFi) module 1170, processor 1180, and power supply 1190, and the like. The input unit 1130 can include touch panel 1131 and other input devices 1132, and the display unit 1140 can include display panel 1141. The audio circuit 1160 can include speaker 1161 and microphone 1162. It can be understood that the structure of the smartphone shown in FIG. 11 does not constitute a limitation on the smartphone, and can include more or fewer components than shown, or combine certain components, or different component arrangements.
[0196] The memory 1120 can be used to store software programs and modules, and the processor 1180 executes various function applications and data processing of the smart phone by running the software programs and modules stored in the memory 1120. The memory 1120 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like; and the data storage area can store data (such as audio data, a phone book, etc.) created according to the use of the smart phone, and the like. In addition, the memory 1120 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.
[0197] The processor 1180 is a control center of the smart phone, connects all parts of the smart phone through various interfaces and lines, and executes various functions and processes data of the smart phone by running or executing the software programs and / or modules stored in the memory 1120 and calling the data stored in the memory 1120. Optionally, the processor 1180 can include one or more processing units; preferably, the processor 1180 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface and an application program, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1180.
[0198] In the embodiment, the processor 1180 in the smart phone can execute the road network optimization method provided in the embodiments of the present application.
[0199] The computer device provided in the embodiments of the present application can also be a server, please refer to FIG. 12, which is a structure diagram of a server 1200 provided in the embodiments of the present application. The server 1200 can have great differences due to different configurations or performances, and can 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 persistent storage. The programs stored in the storage medium 1230 can include one or more modules (not shown in the figure), each of which can include a series of instruction operations in the server. Further, the central processing unit 1222 can be configured to communicate with the storage medium 1230 and execute a series of instruction operations in the storage medium 1230 on the server 1200.
[0200] The server 1200 can also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input / output interfaces 1258, and / or one or more operating systems 1241, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , etc.
[0201] In this embodiment, the central processing unit 1222 in the server 1200 can perform the road network optimization method provided by the embodiments of the present application.
[0202] According to an aspect of the present application, a computer readable storage medium is provided, the computer readable storage medium is used to store a computer program, the computer program is used to perform the road network optimization method provided by the embodiments.
[0203] According to an aspect of the present application, a computer program product is provided, the computer program product includes a computer program stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer readable storage medium, and the processor executes the computer program, so that the computer device performs the method provided in various optional implementation manners of the above embodiments.
[0204] The descriptions of the corresponding flow or structure of each of the above figures are each focused on, and the parts not described in detail in a certain flow or structure can be referred to the related description of other flow or structure.
[0205] The terms "first", "second", "third", "fourth" and the like in the specification of the present application and in the above figures, if any, are used to distinguish similar objects, and do not necessarily have to be described in a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0206] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. The division of the units is merely a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0207] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.
[0208] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of software functional units.
[0209] When the integrated unit is implemented in the form of software functional units and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such an understanding, the technical solutions of the present application essentially, or the part that contributes to the prior art, or all or a part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing 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 methods described in the embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and various other media that can store computer programs.
[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 with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one 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 a part of an integral module or unit that includes the functions of the module or unit.
[0211] The above-described embodiments are merely used to illustrate the technical solutions of the present application, but not limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and 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 performed by a computer device, the method comprising: obtaining original road network data to which a road segment to be processed belongs after new position information of the road segment to be processed is collected; determining, for each road segment in the original road network data, a neighbor road segment of the road segment; performing road network optimization based on the new position information and original position information of each neighbor road segment of each road segment in the original road network data to obtain optimized position information of each road segment; and constructing an optimized road network of the original road network data by using the optimized position information of each road segment. 2.The method of claim 1, wherein the determining of the neighbor road segment of the road segment comprises: performing data conversion on the 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 comprising first vertices and first edges between the first vertices, the first vertices being road segments in the original road network data, and the first edges being road nodes connecting different road segments in the original road network data; determining, based on existence of the first edges between the first vertices in the graph data, first neighbor points of each first vertex in the graph data; and determining, according to the first neighbor points of the first vertex corresponding to the road segment, the neighbor road segment of the road segment. 3.The method of claim 2, wherein the performing of the road network optimization based on the new position information and the original position information of each neighbor road segment of each road segment in the original road network data to obtain the optimized position information of each road segment comprises: determining an Lth iteration position information representation of the first neighbor points of each first vertex in the graph data, for each first vertex, when L=0, the Lth iteration position information representation of the first neighbor points of the first vertex being original position information of a neighbor road segment of a road segment corresponding to the first vertex in the original road network data; determining an (L+1) th iteration position information representation of each first vertex based on the Lth iteration position information representation of the first neighbor points of each first vertex and model parameters of a graph model; constructing a target loss based on the (L+1) th iteration position information representation of each first vertex and the new position information; solving the model parameters of the graph model by minimizing the target loss to obtain a value of the model parameters of the graph model; and obtaining the optimized position information of each road segment based on the value of the model parameters of the graph model and the (L+1) th iteration position information representation of each first vertex. 4.The method of claim 3, wherein the determining of the first neighbor points 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 the existence of the first edges between the first vertices in the graph data, the first neighbor matrix being used to represent the first neighbor points of each first vertex. The determining the Lth iteration position information representation of the first neighbor point of each first vertex in the graph data comprises: obtaining the Lth iteration position information representation of each first vertex in the graph data, and for each first vertex, when L=0, the Lth iteration position information representation of the first vertex is the position information of the corresponding road segment of the first vertex in the original road network data; multiplying the Lth iteration position information representation of each first vertex in the graph data with the first neighbor matrix to obtain the Lth iteration position information representation of the first neighbor point of each first vertex in the graph data.
5. The method of claim 3 or 4, wherein the constructing the 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 iteration position information representation of the to-be-processed road segment from the L+1th iteration position information representation of each first vertex; constructing a first loss based on the gap between the L+1th iteration position information representation of the to-be-processed road segment and the new position information; and generating the target loss based on the first loss.
6. The method of claim 5, wherein the generating the target loss based on the first loss comprises: constructing a second loss according to a road network optimization rule; and performing weighted summation on the first loss and the second loss to obtain the target loss.
7. The method of claim 6, wherein the 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 according to the accuracy of the new position information, and obtaining a second weight of the second loss, wherein the first weight determined when the accuracy of the new position information is a first accuracy is smaller than the first weight determined when the accuracy of the new position information is a second accuracy, the first accuracy is smaller than a precision threshold, and the second accuracy is greater than or equal to the precision threshold; and performing weighted summation on the first loss and the second loss by using the first weight and the second weight to obtain the target loss.
8. The method of claim 6 or 7, wherein the road network optimization rule is a position consistency rule that the end point of a previous road segment and the start point of a subsequent road segment in connected road segments are consistent, and the constructing the second loss according to the road network optimization rule comprises: if the road segments corresponding to two first vertices are connected road segments, determining the L+1th iteration position information representation of the end point of the previous road segment in the connected road segments and the L+1th iteration position information representation of the start point of the subsequent road segment in the connected road segments based on the L+1th iteration position information representation of each first vertex; and constructing the second loss based on the gap between the L+1th iteration position information representation of the end point and the L+1th iteration position information representation of the start point.
9. The method of any one of claims 6-8, wherein the road network optimization rule is a preset angle rule that the included angle between road segments is consistent, and the constructing the second loss according to the road network optimization rule comprises: According to the original road network data, an initial angle value of an included angle between two road segments is obtained; According to the L+1th iteration position information representation of each first vertex, an L+1th iteration angle value representation of the included angle between the two road segments after the L+1th iteration is determined; Based on the initial angle value and the L+1th iteration angle value representation of the included angle between the two road segments, the second loss is constructed.
10. The method of claim 9, wherein the preset angle rule is an angle-invariant rule, and wherein constructing the second loss based on the initial angle value and the L+1th iteration angle value representation of the included angle between the two road segments comprises: 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, determining a gap between the initial angle value and the L+1th iteration angle value representation; constructing the second loss based on the gap between the initial angle value and the L+1th iteration angle value representation.
11. The method of claim 10, wherein the preset angle rule is an angle-zero rule, and wherein the method further comprises: if the comparison result indicates that the initial angle value is less than the angle threshold, constructing the second loss based on the L+1th iteration angle value representation.
12. The method of any one of claims 3-11, wherein determining 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 parameter of the graph model comprises: obtaining distances between the first vertices in the graph data; for each first vertex in the graph data, determining other first vertices having a distance less than a distance threshold from the first vertex, and determining a candidate point set of the first vertex based on the other first vertices having a distance less than the distance threshold from the first vertex; connecting each first vertex and the first vertex in the corresponding candidate point set to obtain a conjugate graph of the graph data, the conjugate graph comprising second vertices and second edges between the second vertices, the second vertices being each first vertex and the first vertex in the corresponding candidate point set, and the second edges being edges between adjacent two second vertices; determining an Lth iteration position information representation of a second neighbor point of each second vertex in the conjugate graph based on an existence condition of the second edges between the second vertices in the conjugate graph; generating the L+1th iteration position information representation of the first vertex 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 parameter of the graph model.
13. The method of claim 12, wherein determining the candidate point set of the first vertex based on the other first vertices having a distance less than a distance threshold from the first vertex comprises: obtaining elevation information of the first vertex and elevation information of the other first vertices. differencing the elevation information of the first vertex and the elevation information of the other first vertices to obtain elevation difference values; constructing a candidate point set of the first vertex from the other first vertices with the elevation difference values less than an elevation difference threshold.
14. The method of claim 12 or 13, wherein constructing the 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 iteration position information representation of the to-be-processed road segment from the L+1th iteration position information representation of each first vertex; constructing a first loss based on a gap between the L+1th iteration position information representation of the to-be-processed road segment and the new position information; determining a distance between two second vertices of any second edge in the conjugate graph; constructing a third loss according to the distance between the two second vertices, the distance between the two second vertices being negatively related to the value of the third loss; and performing weighted summation on the first loss and the third loss to obtain the target loss.
15. A road network optimization apparatus, 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 to which a to-be-processed road segment belongs after acquiring new position information of the to-be-processed road segment; the determination unit is configured to determine, for each road segment in the original road network data, a neighbor 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 each road segment in the original road network data to obtain optimized position information of each road segment; and the construction unit is configured to construct an optimized road network of the original road network data by using the optimized position information of each road segment.
16. A computer device, comprising a processor and a memory: the memory is configured to store a computer program and transmit the computer program to the processor; and the processor is configured to execute the method in any one of claims 1 to 14 according to instructions in the computer program.
17. A computer storage medium, configured to store a computer program, the computer program causing a processor to execute the method in any one of claims 1 to 14 when executed by the processor.
18. A computer program product, comprising a computer program, the computer program causing a processor to execute the method in any one of claims 1 to 14 when executed by the processor.