Road data processing method and device, storage medium and electronic equipment
By acquiring and processing road data, including track points, lane lines and images, combined with three-dimensional reconstruction and electronic maps, the road divergence and merging locations are determined, solving the problem of low recognition accuracy in the existing technology and achieving more accurate road diverging and merging. Scene building.
Patent Information
- Application Number
- CN202410850171.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-29
AI Technical Summary
Existing technology cannot accurately construct a variety of road divergence and merging scenarios, resulting in low recognition accuracy, lack of generalization capabilities, and inability to adapt to complex traffic conditions.
By obtaining road-related track point data, lane line collection data and road images, predictions are made to obtain the initial diversion area, and three-dimensional reconstruction is performed to determine the locations of merging and diverging. Combined with electronic map data, multiple road lines are constructed to determine the target diverging and merging locations to establish target road merging scene areas.
It improves the recognition accuracy and robustness of road diverging and merging scenes, ensures the usability of generated scenes, and solves the problem of being unable to accurately construct road diverging and merging scenes.
Smart Images

Figure CN118865664A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular, to a method and device for processing road data, a storage medium, and an electronic device. Background Art
[0002] Since the actual traffic conditions are relatively complex, if we only rely on a single scene construction method in the related technology to identify and construct road merging and diverging scenes, we cannot adapt to various types of road diverging and merging scenes. In other words, in the related technology, the scene construction method lacks generalization ability and performs poorly in some traffic scenes, resulting in low recognition accuracy of the generated road diverging and merging scenes. In summary, there is a technical problem in the related technology that we cannot accurately construct road diverging and merging scenes.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method and device for processing road data, a storage medium, and an electronic device to at least solve the technical problem of being unable to accurately construct road divergence and merging scenarios.
[0005] According to one aspect of an embodiment of the present application, a method for processing road data is provided, comprising: acquiring trajectory point data, lane line collection data, and a road image associated with a first road and a second road, wherein the first road is allowed to merge into the second road; predicting the road image to obtain an initial diversion area, and performing three-dimensional reconstruction based on the road image and the initial diversion area to determine a first merging position, a first diverging position, and a target diversion area, wherein the target diversion area represents the initial diversion area mapped to a geographic coordinate system; constructing a plurality of road lines corresponding to the first road and the second road based on the trajectory point data, and determining a second diverging position and a second merging position based on the plurality of road lines and the target diversion area, wherein the second diverging position is different from the first diverging position, and the second merging position is different from the first diverging position. The first merging position is different; the third diverging position and the third merging position are determined based on the lane line collection data and the pre-acquired electronic map data, wherein the third diverging position is different from the first diverging position and the second diverging position, and the third merging position is different from the first merging position and the second merging position; the first diverging position, the second diverging position and the third diverging position are determined as target diverging positions, and the first merging position, the second merging position and the third merging position are determined as target merging positions, and a target road diverging and merging scene area is determined according to the target diverging position and the target merging position, wherein the target merging position represents the predicted position where the first road merges into the second road, and the target diverging position represents the predicted position where the second road diverges from the first road.
[0006] According to another aspect of an embodiment of the present application, a road data processing device is also provided, including: an acquisition module, used to acquire trajectory point data, lane line collection data and road images associated with a first road and a second road, wherein the first road is allowed to merge into the second road; a construction module, used to predict the road image to obtain an initial diversion area, and perform three-dimensional reconstruction based on the road image and the initial diversion area to determine a first merging position, a first diverging position and a target diversion area, wherein the target diversion area represents the initial diversion area mapped to a geographic coordinate system; a first determination module, used to construct a plurality of road lines corresponding to the first road and the second road based on the trajectory point data, and determine a second diverging position and a second merging position based on the plurality of road lines and the target diversion area, wherein the second diverging position is different from the first diverging position, and the second merging position different from the first merging position; a second determination module, used to determine a third diverging position and a third merging position based on the lane line collection data and the pre-acquired electronic map data, wherein the third diverging position is different from both the first diverging position and the second diverging position, and the third merging position is different from both the first merging position and the second merging position; a third determination module, used to determine the first diverging position, the second diverging position and the third diverging position as target diverging positions, determine the first merging position, the second merging position and the third merging position as target merging positions, and determine a target road diverging and merging scene area according to the target diverging position and the target merging position, wherein the target merging position represents the predicted position where the first road merges into the second road, and the target diverging position represents the predicted position where the second road diverges from the first road.
[0007] Optionally, the device is used to predict the road image to obtain an initial diversion area in the following manner: obtain a sample road image with annotated diversion areas; use the sample road image to train an initial image detection model to obtain a target image detection model; input the road image into the target image detection model to predict the initial diversion area.
[0008] Optionally, the device is used to perform three-dimensional reconstruction based on the road image and the initial diversion area to determine the first merging position, the first diverging position and the target diversion area in the following manner: mapping the initial diversion area to the image coordinate system of the road image to obtain a target road image; performing three-dimensional modeling on the target road image, fusing the initial diversion areas corresponding to different frames to obtain a three-dimensional scene model; mapping the three-dimensional scene model to the geographic coordinate system to obtain the target diversion area, and post-processing the target diversion area to obtain the first merging position and the first diverging position.
[0009] Optionally, the device is used to construct multiple road lines corresponding to the first road and the second road based on the trajectory point data in the following manner: performing a trip operation on the trajectory point data according to sampling time points to obtain N groups of trajectory points, wherein the sampling time points corresponding to the same group of trajectory points in the N groups of trajectory points belong to the same sampling time period, and the sampling time points corresponding to different groups of trajectory points belong to different sampling time periods, and N is a positive integer; performing a filtering operation on a predetermined initial road line according to the N groups of trajectory points to obtain the multiple road lines.
[0010] Optionally, the device is used to perform a trip operation on the trajectory point data according to sampling time points to obtain N groups of trajectory points in the following manner: perform a trip operation on the trajectory point data according to sampling time points to obtain M groups of trajectory points, wherein M is a positive integer; determine a target break point corresponding to the i-th group of trajectory points based on the azimuth between the first trajectory point and the second trajectory point in the i-th group of trajectory points, wherein the M groups of trajectory points include the i-th group of trajectory points, and i is a positive integer less than or equal to M; and use the target break points in turn to divide the i-th group of trajectory points to obtain the N groups of trajectory points.
[0011] Optionally, the device is used to perform a filtering operation on a predetermined initial road line according to the N groups of trajectory points to obtain the multiple road lines in the following manner: obtain N groups of initial road lines corresponding to each group of trajectory points in the N groups of trajectory points; generate N trajectory lines based on position information of the N groups of trajectory points; determine N groups of intermediate road lines according to the distance between the N trajectory lines and each initial road line in the N groups of initial road lines, wherein the N groups of intermediate road lines represent road lines in the N groups of initial road lines whose distance meets a preset distance condition; perform a clustering fusion operation on the N groups of intermediate road lines to obtain the multiple road lines.
[0012] Optionally, the device is used to determine the second divergence position and the second merging position based on the multiple road lines and the target diversion area in the following manner: traverse the multiple road lines to determine whether the target diversion area exists at the starting position and the ending position of each road line in the multiple road lines; determine the starting position where the target diversion area does not exist as the second divergence position, and determine the ending position where the target diversion area does not exist as the second merging position.
[0013] Optionally, the device is used to determine the first diverging position, the second diverging position and the third diverging position as target diverging positions, determine the first merging position, the second merging position and the third merging position as target merging positions, and determine a target road diverging and merging scene area according to the target diverging position and the target merging position, including: determining the road diverging scene area according to the target diverging position, the position at a first preset distance forward of the target diverging position, and the first road line and the second road line on both sides, wherein the target road diverging and merging scene area includes the road diverging scene area; determining the road merging scene area according to the target merging position, the position at a fourth preset distance backward of the target merging position, and the third road line and the fourth road line on both sides, wherein the target road diverging and merging scene area includes the road merging scene area.
[0014] According to another aspect of the embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned road data processing method when running.
[0015] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above road data processing method.
[0016] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the road data processing method through the computer program.
[0017] In an embodiment of the present application, trajectory point data, lane line acquisition data, and road images associated with a first road and a second road are acquired, wherein the first road is allowed to merge into the second road; an initial diversion area is obtained by predicting the road image, and three-dimensional reconstruction is performed based on the road image and the initial diversion area to determine a first merging position, a first diverging position, and a target diversion area, wherein the target diversion area represents the initial diversion area mapped to a geographic coordinate system; a plurality of road lines corresponding to the first road and the second road are constructed based on the trajectory point data, and a second diverging position and a second merging position are determined based on the plurality of road lines and the target diversion area, wherein the second diverging position is different from the first diverging position, and the second merging position is different from the first merging position; a third diverging position and a third merging position are determined based on the lane line acquisition data and pre-acquired electronic map data, wherein the third diverging position is different from the first diverging position and the second The diverging positions are all different, and the third merging position is different from the first merging position and the second merging position; the first diverging position, the second diverging position and the third diverging position are determined as target diverging positions, and the first merging position, the second merging position and the third merging position are determined as target merging positions, and the target road diverging and merging scene area is determined according to the target diverging position and the target merging position, wherein the target merging position represents the predicted position where the first road merges into the second road, and the target diverging position represents the predicted position where the second road diverges from the first road, which provides sufficiently high recognition accuracy and robustness for the identification and construction of road divergence and merging scenes, and ensures the availability of the generated road divergence and merging scenes. In other words, through the embodiments of the present application, the technical effect of improving the construction accuracy of road diverging and merging scenes is achieved, thereby solving the technical problem of being unable to accurately construct road diverging and merging scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a schematic diagram of an application environment of an optional road data processing method according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of an optional road data processing method according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of an optional road data processing method according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of another optional road data processing method according to an embodiment of the present application;
[0023] Figure 5 is a schematic structural diagram of an optional road data processing device according to an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of the structure of an optional road data processing product according to an embodiment of the present application;
[0025] Figure 7 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:
[0029] Road Merge Area: An area where two or more roads merge into one road at a certain point.
[0030] Road Divergence: An area where a road divides at a certain point into two or more roads.
[0031] The present application is described below in conjunction with embodiments:
[0032] According to one aspect of an embodiment of the present application, a method for processing road data is provided. Optionally, in this embodiment, the method for processing road data can be applied to Figure 1In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1 As shown, the server 101 is connected to the terminal device 103 via a network, and can be used to provide services for the terminal device or an application installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include, but is not limited to, a wired network and a wireless network, wherein the wired network includes, a local area network, a metropolitan area network and a wide area network; the wireless network includes, Bluetooth, WIFI and other networks that implement wireless communication; the terminal device 103 may be a terminal configured with an application, and may include, but is not limited to, at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal and other computer devices; the above-mentioned server may be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0033] Combination Figure 1 As shown, the above-mentioned road data processing method can be executed by an electronic device, which can be a terminal device or a server. The above-mentioned road data processing method can be implemented by the terminal device or the server respectively, or by the terminal device and the server together.
[0034] The above is only an example and is not specifically limited in this embodiment.
[0035] Optionally, as an optional implementation, as Figure 2 As shown, the method for processing the above road data includes:
[0036] S202, obtaining trajectory point data, lane line collection data, and road images associated with a first road and a second road, wherein the first road is allowed to merge into the second road;
[0037] Optionally, in an embodiment of the present application, the first road and the second road can be understood as the main road and the branch road in the intersection, the trajectory point data can include but are not limited to coordinate information, driving speed, acceleration, etc., the lane line collection data can include but are not limited to lane width, marking color, road curvature, etc., and the road image can include but are not limited to images collected by the vehicle itself, satellite maps, aerial images, road images taken by traffic monitoring cameras, etc.
[0038] Exemplarily, a positioning device or a vehicle-mounted sensor is used to record the above-mentioned trajectory point data of the vehicle on the above-mentioned first road and the second road, which may include but is not limited to information such as the vehicle's position, speed, and direction; a vehicle-mounted camera or a lidar or other device is used to collect the above-mentioned lane line data of the first road and the second road, which may include but is not limited to information such as the lane line's position, width, and marking type; a camera or satellite imaging or other device is used to obtain the above-mentioned road images of the first road and the second road.
[0039] S204, predicting the road image to obtain an initial diversion area, and performing three-dimensional reconstruction based on the road image and the initial diversion area to determine a first confluence position, a first divergence position, and a target diversion area, wherein the target diversion area represents the initial diversion area mapped to a geographic coordinate system;
[0040] Optionally, in an embodiment of the present application, the above-mentioned initial diversion area refers to a traffic concentration area in a road image, that is, a dense area of vehicles, pedestrians, etc. The above-mentioned first merging position refers to a position where the lanes on the above-mentioned first road and the above-mentioned second road merge as determined by the above-mentioned initial diversion area. The above-mentioned first diverging position refers to a position where the lanes on the above-mentioned first road and the above-mentioned second road diverge as determined by the above-mentioned initial diversion area. The above-mentioned target diversion area can be understood as a diversion area in a geographic coordinate system obtained after three-dimensional reconstruction.
[0041] It should be noted that road images can be predicted in the following ways, including but not limited to using deep learning models, big data analysis, etc.
[0042] In an exemplary embodiment, the road image is predicted by a deep learning model to generate the initial diversion area. Then, the initial diversion area is mapped into an image coordinate system to obtain image data, ensuring that the spatial position of the diversion area matches the spatial position of the actual road diversion area. Further, the obtained image data is three-dimensionally reconstructed, and the diversion area information of different time frames is fused to obtain a more accurate diversion area range. In other words, multi-perspective image data is used in combination with parallax calculation and other technologies to generate a road diversion area image of a three-dimensional scene. The diversion area range under a geographic coordinate system is generated, and the range of the obtained three-dimensionally reconstructed road diversion area image is mapped into the geographic coordinate system to obtain the target diversion area to ensure consistency with the real-world geographic location.
[0043] S206, constructing a plurality of road lines corresponding to the first road and the second road based on the trajectory point data, and determining a second diverging position and a second merging position based on the plurality of road lines and the target diversion area, wherein the second diverging position is different from the first diverging position, and the second merging position is different from the first merging position;
[0044] Optionally, in an embodiment of the present application, the above-mentioned road line may include but is not limited to the starting point, end point and key reference points along the way, the above-mentioned second merging position refers to the position where the lanes on the above-mentioned first road and the above-mentioned second road merge as determined by the above-mentioned initial diversion area, and the above-mentioned second diverging position refers to the position where the lanes on the above-mentioned first road and the above-mentioned second road diverge as determined by the above-mentioned initial diversion area.
[0045] It should be noted that the above-mentioned second divergence position is different from the first divergence position, and the second merging position is different from the first merging position. For example, the first merging position is at position A where the first road and the second road intersect, and the second merging position is at position B where the first road and the second road intersect; the first divergence position is at position C where the first road and the second road intersect, and the second divergence position is at position D where the first road and the second road intersect.
[0046] Illustratively, a vehicle merging from the first road into the second road at the first merging position may include but is not limited to exiting the second road through the first diverging position and the second diverging position; similarly, a vehicle exiting the second road at the first diverging position and entering the first road may include but is not limited to merging into the second road through the first merging position and the second merging position.
[0047] In an exemplary embodiment, the deep learning recognition and segmentation technology is used to obtain the drivable road range corresponding to the road image, and then determine the second diverging position and the second merging position. Specifically:
[0048] S1, using 3D reconstruction and fusion technology to construct the drivable range of roads in the geographic coordinate system. First, the above-mentioned trajectory point data is processed in batches. Then, the road boundary line data corresponding to the above-mentioned trajectory point data is traversed to calculate the average distance between the drivable road boundary line and the trajectory line (directly determined by the trajectory data). The boundary line is clustered in one dimension according to the average distance. For example, the number of clusters is set to 10 meters and the cluster distance is set to 3.75 meters. The road boundary line set with the smallest distance is retained, and the noise and larger boundary line sets are discarded to achieve the purpose of filtering non-current road boundary lines.
[0049] S2, road boundary data fusion, may include but is not limited to clustering the road boundary lines using a density clustering algorithm based on Mahalanobis distance, and fusing the clustered data using geometric mean to obtain the final fused road boundary lines.
[0050] S3, based on the road boundary line, judge the road divergence and merging scenarios, and again perform line-based density clustering on the road boundary line obtained in S2, with the minimum number of clusters set to 2 and the cluster distance set to 2 meters; traverse all clustered road boundary line data to determine whether there is a diversion area at the starting position and the ending position of the boundary line; if there is a diversion area, continue traversing; if there is no diversion area, determine that the starting position is the road divergence position and the ending position is the road merging position, and obtain the above-mentioned second divergence position and second merging position.
[0051] S3: Construct the scope of the road divergence and merging scenario. At the road divergence, the longitudinal starting position is 10 meters forward, and the lateral range is to the road boundary lines on both sides; at the road merging, the longitudinal ending position is 10 meters backward, and the lateral range is to the road boundary lines on both sides.
[0052] S208, determining a third diverging position and a third merging position based on the lane line collection data and the pre-acquired electronic map data, wherein the third diverging position is different from both the first diverging position and the second diverging position, and the third merging position is different from both the first merging position and the second merging position;
[0053] Optionally, in an embodiment of the present application, the lane line collection data may include, but is not limited to, the length and width of the lane line, the color and type of the lane line (solid line, dashed line, zebra crossing, etc.), the position and direction of the lane line, the spacing and intervals of the lane line, the material and reflective performance of the lane line, the markings and markers of the lane line, and the electronic map data may include, but is not limited to, map layer data: including information on various geographic elements such as road networks, buildings, waters, terrain, etc.; geographic information annotation: annotating place names, landmarks, transportation facilities and other information to facilitate users to quickly identify and locate; satellite image data: providing high-resolution satellite images of the earth's surface, which can be used to observe terrain, natural resources and other conditions; traffic information: including real-time road conditions, traffic congestion, public transportation routes and other information to help users plan their itineraries; including navigation routes, intersection turn prompts, navigation voice and other functions to help users realize navigation functions.
[0054] It should be noted that the above-mentioned third divergence position is different from the first divergence position and the second divergence position, and the third merging position is different from the first merging position and the second merging position. For example, the first merging position is at position A where the first road and the second road intersect, the second merging position is at position B where the first road and the second road intersect, and the third merging position is at position C where the first road and the second road intersect; the first divergence position is at position D where the first road and the second road intersect, the second divergence position is at position E where the first road and the second road intersect, and the third merging position is at position F where the first road and the second road intersect.
[0055] Illustratively, a vehicle merging from the first road into the second road at the third merging position may include but is not limited to exiting the second road through the first diverging position, the second diverging position, and the third diverging position; similarly, a vehicle exiting the second road at the first diverging position and entering the first road may include but is not limited to merging into the second road through the first merging position, the second merging position, and the third merging position.
[0056] In an exemplary embodiment, the third confluence position and the third divergence position may be determined in the following manner, including but not limited to:
[0057] S1: matching the trajectory data of the auxiliary road (the first road) and the main road (the second road) with the electronic navigation data in the electronic map data;
[0058] S2: Constructing a road diversion scenario. Since the electronic navigation map has marked the auxiliary road (the first road), the road auxiliary road of the navigation map can be directly traversed to start from the intersection position of the main and auxiliary roads (the second road). The lane line data can also be used to determine the third diversion position. Specifically:
[0059] With the starting position of the road as the center and a radius of 100 meters, determine whether the road diversion scene has been built. If the diversion scene has been built, continue to traverse the end position of the auxiliary road; otherwise, obtain the lane line data, and use the density clustering algorithm based on Mahalanobis distance to cluster the lane line collection data, and fuse and extract the lane lines. Then, calculate the outermost lane line data of the main and auxiliary roads, determine the intersection of the starting positions of the two most adjacent lane lines, the longitudinal range is 10 meters forward, and the horizontal range is to the position of the outermost lane line of the main and auxiliary roads;
[0060] S3: Construct a road merging scene and determine the third merging position mentioned above: with the intersection of the end position of the auxiliary road and the main road as the center and a radius of 100 meters, determine whether the road merging scene has been constructed. If the merging scene has been constructed, continue to traverse other auxiliary roads; otherwise, obtain the reconstructed lane line data, and use the density clustering algorithm based on Mahalanobis distance to cluster the lane lines and fuse and extract the lane lines. Then calculate the outermost lane line data of the main and auxiliary roads, calculate the intersection of the starting positions of the two most adjacent lane lines, the longitudinal range of 10 meters forward, and the horizontal range to the position of the outermost lane line of the main and auxiliary roads.
[0061] S210, determining the first diverging position, the second diverging position and the third diverging position as target diverging positions, determining the first merging position, the second merging position and the third merging position as target merging positions, and determining a target road diverging and merging scene area according to the target diverging positions and the target merging positions, wherein the target merging position represents the predicted position where the first road merges into the second road, and the target diverging position represents the predicted position where the second road diverges from the first road.
[0062] Optionally, in an embodiment of the present application, the above-mentioned target diversion position may include but is not limited to a first diversion position, a second diversion position, a third diversion position, etc., and the above-mentioned target confluence position may include but is not limited to a first confluence position, a second confluence position, a third confluence position, etc.
[0063] For example, Figure 3 is a schematic diagram of an optional road data processing method according to an embodiment of the present application, such as Figure 3 As shown, the above-mentioned target road diverging and merging scene area can be understood as the area between the target diverging position and the target merging position, which may include but is not limited to the intersection area of the diverging vehicles and the merging vehicles.
[0064] In an exemplary embodiment, the target road divergence and merging scene area includes a target divergence position and a target merging position, the target divergence position includes position A and position B; the target merging position includes position C and position D, the vehicle merges from the above-mentioned first road into the above-mentioned second road at position A, and exits the second road at position D.
[0065] In yet another exemplary embodiment, Figure 4 is a schematic diagram of another optional road data processing method according to an embodiment of the present application, such as Figure 4 This may include, but is not limited to:
[0066] S402, determining a first diverging position and a first merging position based on the diversion area scene, specifically: annotating the diversion area data (e.g., road image, trajectory point data, etc.), then selecting a deep learning model for prediction for training and evaluation, deploying the trained model, using the model to predict the above-mentioned initial diversion area, and by constructing the diversion area range under the image system, further realizing three-dimensional image reconstruction and multi-frame data tracking fusion of the initial diversion area, generating the diversion area range of the initial diversion area under the geographic coordinate system, and post-processing the diversion area range, including but not limited to expansion based on the road drivable area to adapt to actual road conditions;
[0067] S404, determining a second diverging position and a second merging position based on a road boundary scene, specifically: sorting the trajectory data according to time, performing trip processing, constructing a road boundary range, then fusing the road boundary data, judging a diverging and merging scene of the road based on the road boundary line, and further determining a second diverging position and a second merging position based on the diverging and merging scene;
[0068] S406, determining a second diverging position and a second merging position based on the electronic navigation map scene, specifically: first, matching the trajectory data with the electronic navigation data in the above-mentioned electronic map data, then constructing a road diverging scene and a road merging scene, and further determining a third diverging position and a third merging position based on the diverging and merging scenes.
[0069] Furthermore, the target merging position and target diverging position are determined by the first diverging position, first merging position, second diverging position, second merging position, third diverging position and third merging position obtained through S402 to S206, and then the target road diverging and merging scene area is obtained.
[0070] In the embodiment of the present application, trajectory point data, lane line acquisition data and road images associated with a first road and a second road are acquired, wherein the first road is allowed to merge into the second road; an initial diversion area is obtained by predicting the road image, and a three-dimensional reconstruction is performed based on the road image and the initial diversion area to determine a first merging position, a first diverging position and a target diversion area, wherein the target diversion area represents the initial diversion area mapped to a geographic coordinate system; a plurality of road lines corresponding to the first road and the second road are constructed based on the trajectory point data, and a second diverging position and a second merging position are determined based on the plurality of road lines and the target diversion area, wherein the second diverging position is different from the first diverging position, and the second merging position is different from the first merging position; a third diverging position and a third merging position are determined based on the lane line acquisition data and pre-acquired electronic map data, wherein the third diverging position is different from the first diverging position and the second The diverging positions are all different, and the third merging position is different from the first merging position and the second merging position; the first diverging position, the second diverging position and the third diverging position are determined as target diverging positions, and the first merging position, the second merging position and the third merging position are determined as target merging positions, and the target road diverging and merging scene area is determined according to the target diverging position and the target merging position, wherein the target merging position represents the predicted position where the first road merges into the second road, and the target diverging position represents the predicted position where the second road diverges from the first road, which provides sufficiently high recognition accuracy and robustness for the identification and construction of road divergence and merging scenes, and ensures the availability of the generated road divergence and merging scenes. In other words, through the embodiments of the present application, the technical effect of improving the construction accuracy of road diverging and merging scenes is achieved, thereby solving the technical problem of being unable to accurately construct road diverging and merging scenes.
[0071] As an optional scheme, the above-mentioned prediction of the above-mentioned road image to obtain the initial diversion area includes: obtaining a sample road image with annotated diversion areas; using the above-mentioned sample road image to train an initial image detection model to obtain a target image detection model; inputting the above-mentioned road image into the above-mentioned target image detection model to predict the above-mentioned initial diversion area.
[0072] Optionally, in an embodiment of the present application, the above-mentioned initial image detection model may include but is not limited to a target detection model, an object recognition model, a scene segmentation model, etc.
[0073] Exemplarily, assume that there is a set of sample road images with real diversion areas marked, including sample road images with diversion areas and sample road images without diversion areas, and these sample road images are used to train an initial image detection model so that the model learns how to identify diversion areas on the road. Then, the trained target image detection model is applied to a new road image, which is an unlabeled road image mentioned above. The model will output the location and area in the image that may contain diversion areas.
[0074] In an exemplary embodiment, assuming that an unlabeled road image is used as the input of the road image, the model will identify the initial flow diversion area and provide the location and bounding box of the initial flow diversion area.
[0075] Through the embodiments of the present application, first, a sample road image with annotated diversion areas is obtained, then, the sample road image is used to train the initial image detection model to obtain a target image detection model, and the road image is input into the target image detection model to predict the initial diversion area, so as to achieve the purpose of improving the detection accuracy and efficiency of the initial diversion area.
[0076] As an optional solution, the above-mentioned three-dimensional reconstruction is performed based on the above-mentioned road image and the above-mentioned initial diversion area to determine the first merging position, the first diverging position and the target diversion area, including: mapping the above-mentioned initial diversion area to the image coordinate system of the above-mentioned road image to obtain the target road image; performing three-dimensional modeling on the above-mentioned target road image, fusing the above-mentioned initial diversion areas corresponding to different frames to obtain a three-dimensional scene model; mapping the above-mentioned three-dimensional scene model to the above-mentioned geographic coordinate system to obtain the above-mentioned target diversion area, and post-processing the above-mentioned target diversion area to obtain the above-mentioned first merging position and the above-mentioned first diverging position.
[0077] Optionally, in an embodiment of the present application, the image coordinate system of the above-mentioned road image refers to the coordinate system of the road image represented by pixel coordinates on a two-dimensional plane, and the above-mentioned target road image includes the above-mentioned initial diversion area, and the above-mentioned three-dimensional scene model may include but is not limited to three-dimensional modeling using computer-aided design software, modeling the road, diversion area and other elements in the above-mentioned target road image into a three-dimensional model, and fusing the diversion area information of different frames to generate a real three-dimensional scene model.
[0078] It should be noted that the road images in the above-mentioned different frames may be different. For example, the road image in the first frame includes the vehicle S, and the road image in the second frame does not include the vehicle S. Accordingly, the above-mentioned initial diversion areas may naturally be different or the same.
[0079] Optionally, in an embodiment of the present application, the above-mentioned mapping of the three-dimensional scene model to the geographic coordinate system may include but is not limited to converting the coordinates of the three-dimensional model into longitude and latitude coordinates under the geographic coordinate system through geographic information system software, thereby obtaining the above-mentioned target diversion area, and the above-mentioned post-processing may include but is not limited to expansion based on the drivable area of the road to adapt to actual road conditions, etc.
[0080] Exemplarily, the mapping operation of the initial flow diversion area to the image coordinate system may be achieved by performing pixel-level conversion and adjustment on the position and size of the initial flow diversion area.
[0081] In an exemplary embodiment, it is assumed that there is a road image, which includes a traffic diversion area. After being processed by the above-mentioned target image detection model, the above-mentioned initial diversion area is obtained. First, the initial diversion area is mapped to the target road image, and then three-dimensional modeling is performed to correspond the initial diversion area to the geographic coordinate system, and post-processing is performed to obtain the confluence position and divergence position of the final diversion area.
[0082] Through the embodiment of the present application, the initial diversion area is mapped to the image coordinate system of the road image to obtain the target road image, the target road image is 3D modeled, the initial diversion areas corresponding to different frames are fused to obtain a 3D scene model, the 3D scene model is mapped to the geographic coordinate system to obtain the target diversion area, and the target diversion area is post-processed, thereby making some adjustments and optimizations to the target diversion area to ensure the matching degree and realism of the target diversion area with the road image. Finally, the precise coordinates and shape information of the first confluence position and the first divergence position are obtained.
[0083] As an optional scheme, the above-mentioned construction of multiple road lines corresponding to the above-mentioned first road and the above-mentioned second road based on the above-mentioned trajectory point data includes: performing a trip operation on the above-mentioned trajectory point data according to sampling time points to obtain N groups of trajectory points, wherein the above-mentioned sampling time points corresponding to the same group of trajectory points in the above-mentioned N groups of trajectory points belong to the same sampling time period, and the above-mentioned sampling time points corresponding to different groups of trajectory points belong to different sampling time periods, and N is a positive integer; performing a filtering operation on a predetermined initial road line according to the above-mentioned N groups of trajectory points to obtain the above-mentioned multiple road lines.
[0084] Optionally, in an embodiment of the present application, the above-mentioned sampling time points can be flexibly set, and the present application does not limit it. The above-mentioned multi-trip processing refers to grouping the above-mentioned trajectory point data according to different sampling time points.
[0085] Specifically, after the trajectory point data is processed in batches, each group corresponds to a sampling time period. In each time period, a filtering operation can be performed on the predetermined initial road line to obtain the multiple road lines.
[0086] In an exemplary embodiment, assume that the above-mentioned trajectory point data includes: trajectory point 1: (39.9068, 116.3974) time: 8:00; trajectory point 2: (39.9072, 116.3977) time: 8:05; trajectory point 3: (39.9075, 116.3980) time: 8:10; trajectory point 4: (39.9078, 116.3983) time: 8:15.
[0087] Furthermore, if the track points are grouped into a time period of 5 minutes, they can be divided into two groups: the first group of track points is track point 1: (39.9068, 116.3974) time: 8:00, track point 2: (39.9072, 116.3977) time: 8:05; the second group of track points is track point 3: (39.9075, 116.3980) time: 8:10, track point 4: (39.9078, 116.3983) time: 8:15.
[0088] Exemplarily, after the above-mentioned process of dividing the trajectory point data into multiple passes is implemented, a filtering operation may be further performed according to a predetermined initial road line to obtain a plurality of road lines.
[0089] Through the embodiments of the present application, the trajectory point data is segmented according to the sampling time points to obtain N groups of trajectory points. Then, a filtering operation is performed on the predetermined initial road lines according to the N groups of trajectory points to obtain multiple road lines, thereby realizing the segmentation of the trajectory point data and the extraction of the road lines, thereby improving the processing accuracy and efficiency of the above-mentioned trajectory point data.
[0090] As an optional scheme, the above-mentioned dividing operation on the above-mentioned trajectory point data according to sampling time points to obtain N groups of trajectory points includes: dividing the above-mentioned trajectory point data according to sampling time points to obtain M groups of trajectory points, wherein M is a positive integer; determining the target break point corresponding to the above-mentioned i-th group of trajectory points according to the azimuth between the first trajectory point and the second trajectory point in the i-th group of trajectory points, wherein the above-mentioned M groups of trajectory points include the above-mentioned i-th group of trajectory points, and i is a positive integer less than or equal to M; and using the above-mentioned target break points in turn to divide the above-mentioned i-th group of trajectory points to obtain the above-mentioned N groups of trajectory points.
[0091] Optionally, in an embodiment of the present application, the above-mentioned i-th group of trajectory points can be understood as any group of trajectory points in the above-mentioned M groups of trajectory points, and the above-mentioned first trajectory point and the second trajectory point are both trajectory points in the i-th group of trajectory points.
[0092] Exemplarily, at the same road location, multiple collection trips may occur. Therefore, in order to process the data separately, the above-mentioned trajectory point data can be processed in batches. Specifically, all trajectory data are sorted by time, and the azimuth between the current point and the Nth point after the current point is calculated. It is assumed that the angle limitation condition is: if the angle is greater than 20 degrees or less than 340 degrees, the current point is stored in the interruption candidate point set (the above-mentioned i-th group of trajectory points), and the trajectory points in the above-mentioned i-th group of trajectory points are traversed in turn until there is a trajectory point that does not meet the angle limitation condition. The middle point in the interruption candidate set is used as the above-mentioned target interruption point, added to the interruption point set, and the interruption candidate point set is cleared. In other words, the above-mentioned target interruption point can be used to process the trajectory data in batches to realize the division of the i-th group of trajectory points to obtain the above-mentioned N groups of trajectory points.
[0093] As an optional solution, the above-mentioned filtering operation is performed on the predetermined initial road lines according to the above-mentioned N groups of trajectory points to obtain the above-mentioned multiple road lines, including: obtaining N groups of initial road lines corresponding to each group of trajectory points in the above-mentioned N groups of trajectory points; generating N trajectory lines based on the position information of the above-mentioned N groups of trajectory points; determining N groups of intermediate road lines according to the distances between the above-mentioned N trajectory lines and each initial road line in the above-mentioned N groups of initial road lines, wherein the above-mentioned N groups of intermediate road lines represent road lines in the above-mentioned N groups of initial road lines whose distances meet the preset distance conditions; performing a clustering fusion operation on the above-mentioned N groups of intermediate road lines to obtain the above-mentioned multiple road lines.
[0094] Optionally, in an embodiment of the present application, the above-mentioned location information includes but is not limited to the coordinates, azimuth, etc. of the trajectory points, the above-mentioned preset distance conditions can be flexibly set manually, and the present application does not limit them. The above-mentioned clustering fusion operation may include but is not limited to the K-means clustering algorithm, the DBSCAN clustering algorithm, etc.
[0095] Exemplarily, assuming the preset distance condition, the initial road line whose distance to the trajectory line does not exceed 20 meters will be determined as the road line in the above-mentioned N groups of intermediate road lines. For example, each group of trajectory points in the above-mentioned N groups of trajectory points corresponds to its own initial road line, and by connecting each group of trajectory points, the above-mentioned N trajectory lines can be obtained.
[0096] Furthermore, a trajectory line and a group of initial road lines corresponding to the trajectory line are used as an example for explanation: the trajectory line is compared with each initial road line in the group of initial road lines in turn, and the initial road lines with a distance of no more than 20 meters are determined as a group of intermediate road lines corresponding to the trajectory line. In other words, if the distance between the initial road line and the trajectory line exceeds 20 meters, the initial road line will not be used as an intermediate road line for subsequent clustering operations.
[0097] In an exemplary embodiment, after obtaining the above-mentioned N groups of middle road lines, clustering and fusion operations are performed on each group of middle road lines respectively. Specifically, first, one-dimensional density clustering is performed according to the average distance, the number of clusters is set to 10 meters, the cluster distance is set to 3.75 meters, the set of middle road lines with the smallest distance is retained, and the noise and larger sets of middle road lines are output. Then, the density clustering algorithm based on Mahalanobis distance is used to cluster the N groups of middle road lines, and the clustered data is geometrically fused to obtain the final fused road boundary line.
[0098] As an optional scheme, the above-mentioned determination of the second divergence position and the second merging position based on the above-mentioned multiple road lines and the above-mentioned target diversion area includes: traversing the above-mentioned multiple road lines, determining whether the above-mentioned target diversion area exists at the starting position and the ending position of each road line in the above-mentioned multiple road lines; determining the above-mentioned starting position where the above-mentioned target diversion area does not exist as the above-mentioned second divergence position, and determining the above-mentioned ending position where the above-mentioned target diversion area does not exist as the above-mentioned second merging position.
[0099] Optionally, in an embodiment of the present application, the starting position of the above-mentioned road line can be understood as a position where a vehicle can drive in, and the ending position can be understood as a position where a vehicle can drive out.
[0100] For example, assume that there are the following three road routes:
[0101] Road line A: The starting position is within the target diversion area, and the ending position is outside the target diversion area;
[0102] Road line B: The starting position is outside the target diversion area, and the ending position is inside the target diversion area;
[0103] Road line C: The starting position and the ending position are both outside the target diversion area.
[0104] Furthermore, the starting position of road line A is determined as the first diverging position, and the ending position is determined as the second merging position; the starting position of road line B is determined as the second diverging position, and the ending position is determined as the first merging position; the starting position and ending position of road line C can both be determined as the second diverging position.
[0105] As an optional scheme, the above-mentioned determination of the third divergence position and the third merging position based on the lane line collection data and the pre-acquired electronic map data includes: acquiring electronic navigation data from the above-mentioned electronic map data; matching the above-mentioned electronic navigation data with the above-mentioned trajectory point data to obtain target electronic navigation data; traversing the above-mentioned first road in the above-mentioned target electronic navigation data to determine the intersection position of the above-mentioned second road, wherein the above-mentioned intersection position represents the intersection position of the above-mentioned first road and the above-mentioned second road; and determining the third divergence position and the third merging position based on the above-mentioned intersection position.
[0106] Exemplarily, the third merging position and the third diverging position may be determined including but not limited to the following methods: first, the trajectory point data of the road auxiliary road (the first road) and the road main road (the second road) are matched with the electronic navigation data to obtain the target electronic navigation data; further, since the electronic navigation map has marked the auxiliary road (the first road), the road auxiliary road of the target electronic navigation data may be directly traversed to start from the intersection of the main and auxiliary roads (the second road); the lane line data may also be used to determine the third diverging position and the third merging position.
[0107] In an exemplary embodiment, with the starting position of the road as the center and a radius of 100 meters, it is determined whether a road diversion scenario has been constructed. If the diversion scenario has been constructed, the end position of the auxiliary road (the above-mentioned first road) is traversed; otherwise, the above-mentioned road line is obtained, and the density clustering algorithm based on the Mahalanobis distance is used to cluster the lane lines, and the lane lines are fused and extracted. Then, the outermost lane line data of the main and auxiliary roads are calculated, and the intersection of the starting positions of the two most adjacent lane lines is determined. The longitudinal range of 10 meters forward and the lateral range to the position of the outermost lane line of the main and auxiliary roads (the above-mentioned first road and second road) are used as the range of the above-mentioned road diversion scenario area.
[0108] In another exemplary embodiment, with the intersection of the end position of the auxiliary road and the main road as the center and a radius of 100 meters, it is determined whether the road merging scene has been constructed. If the merging scene has been constructed, other auxiliary roads are traversed; otherwise, the reconstructed lane line data is obtained, and the density clustering algorithm based on Mahalanobis distance is used to cluster the lane lines and fuse and extract the lane lines. Then the outermost lane line data of the main and auxiliary roads are calculated, and the intersection of the starting positions of the two most adjacent lane lines is calculated. The longitudinal range of 10 meters forward and the horizontal range to the position of the outermost lane line of the main and auxiliary roads are used as the range of the above-mentioned road merging scene area.
[0109] As an optional scheme, the above-mentioned first diverging position, the second diverging position and the third diverging position are determined as target diverging positions, the above-mentioned first merging position, the second merging position and the third merging position are determined as target merging positions, and the target road diverging and merging scene area is determined according to the above-mentioned target diverging positions and the above-mentioned target merging positions, including: determining the road diverging scene area according to the above-mentioned target diverging position, the position at a first preset distance forward of the above-mentioned target diverging position, and the first road line and the second road line on both sides, wherein the above-mentioned target road diverging and merging scene area includes the above-mentioned road diverging scene area; determining the road merging scene area according to the above-mentioned target merging position, the position at a fourth preset distance backward of the above-mentioned target merging position, and the third road line and the fourth road line on both sides, wherein the above-mentioned target road diverging and merging scene area includes the above-mentioned road merging scene area.
[0110] Optionally, in an embodiment of the present application, the first preset distance and the fourth preset distance can be flexibly set, and the present application does not limit this. The first road line and the second road line are road boundary lines corresponding to the target divergence position, and the third road line and the fourth road line are road boundary lines corresponding to the target merging position.
[0111] Exemplarily, the road diversion scene area is defined as the range of 10 meters forward from the longitudinal starting position of the target diverging position (the first preset distance mentioned above) and the lateral range to the road boundary lines on both sides, that is, the lateral range is the distance between the first road line and the second road line; the range of 10 meters backward from the longitudinal ending position of the target merging position (the fourth preset distance mentioned above) and the lateral range to the road boundary lines on both sides, that is, the lateral range is the distance between the third road line and the fourth road line.
[0112] Through the embodiments of the present application, a road divergence scene area is determined based on a target divergence position, a position a first preset distance forward of the target divergence position, and a first road line and a second road line on both sides; a road merging scene area is determined based on a target merging position, a position a fourth preset distance backward of the target merging position, and a third road line and a fourth road line on both sides, thereby achieving the purpose of constructing the above-mentioned target road divergence and merging scene area based on the road divergence scene area and the road merging scene area to determine the specific positions of road divergence and merging.
[0113] For example, the road data processing method proposed in this application can be applied to the application scenario of crowdsourcing automatic mapping. Through the embodiment of this application, a method and system for identifying and constructing road divergence and merging scenes are constructed. The specific implementation steps may include but are not limited to:
[0114] S1, scene recognition and construction of road divergence and confluence based on diversion areas:
[0115] S1-1: Labeling diversion area data. First, prepare a batch of image data containing diversion areas and label the image data. The labeling process may include but is not limited to manually or semi-automatically labeling the road diversion areas. For example, the labeling may be completed by using a professional image labeling tool to ensure that each pixel in the image data is correctly labeled as a diversion area or a non-diversion area.
[0116] S1-2: training and evaluating the image diversion area model, using the image dataset annotated in S1 to train the deep learning model, specifically, selecting an appropriate deep learning architecture, which may include but is not limited to a convolutional neural network (CNN), and dividing the image dataset into a training set and a validation set, adjusting the model parameters through repeated iterations to improve the performance of the model on the validation set, and using a loss function to train the model, wherein the loss function may include but is not limited to a cross entropy loss function, etc.;
[0117] S1-3: Deployment and inference of the model. After the model training is completed and the validation set is passed, the model can be deployed in the actual application environment, including but not limited to integrating the model into the real-time system to perform real-time inference of the road diversion area;
[0118] S1-4: Construct the diversion area range under the coordinate system of the image, use the deployed model to infer the new image data, generate the prediction result of the road diversion area, and then map the prediction result to the image coordinate system to obtain the image data, ensuring that the spatial position of the diversion area matches the spatial position of the actual road diversion area;
[0119] S1-5: Image 3D reconstruction and multi-frame data tracking fusion. The image data obtained in S1-4 is reconstructed in 3D, and the diversion area information of different time frames is fused to obtain a more accurate diversion area range. In other words, multi-view image data is used in combination with parallax calculation and other technologies to generate a 3D scene of the road diversion area image.
[0120] S1-6: Generate the range of the diversion area in the geographic coordinate system, map the range of the three-dimensional reconstructed road diversion area image obtained in S1-5 into the geographic coordinate system, ensure that it is consistent with the geographical location in the real world, and perform geographic correction and registration of the road diversion area image;
[0121] S1-7: Post-processing of the diversion area range. After generating the road diversion area range under the geographic coordinate system, post-processing is performed to ensure the accuracy of the result. The post-processing includes but is not limited to the expansion of the road drivable area to adapt to the actual road conditions and then construct the range of road divergence and merging.
[0122] S2, road divergence and merging scene recognition and range construction based on the road drivable range:
[0123] S2-1: Separate the trajectory data. When collecting image data, multiple collections may occur at the same location. In order to process the trajectory data separately, the trajectory data needs to be separated. Specifically:
[0124] All trajectory data are sorted by time, and the azimuth between the current point and the N(20)th point after the current point is calculated. If the azimuth angle is greater than 20 degrees or less than 340 degrees, the 10th point of the current point is stored in the interruption candidate point set, and the traversal is continued until the angle restriction condition is not met (that is, the azimuth angle is greater than 20 degrees or less than 340 degrees). The middle point in the interruption candidate set is used as the interruption point and added to the interruption point set, and the interruption candidate point set is cleared; the trajectory data is continued to be traversed until all trajectory data are traversed. In other words, in the embodiment of the present application, the trajectory data can be processed in batches by the interruption points.
[0125] S2-2: Constructing the drivable range of the road, which may include but is not limited to using deep learning recognition and segmentation technology to obtain the drivable range of the road in the image coordinate system, and using three-dimensional reconstruction and fusion technology to construct the drivable range of the road in the geographic coordinate system;
[0126] S2-3: Post-processing of the drivable range of the road. When constructing the drivable range of the road, if there is a situation where the road is not drivable, and the boundary distance is far and the error is large, filtering processing can be performed. The road boundary line data corresponding to the trajectory data after the S2-1 trip processing is traversed, and the average distance between the drivable boundary line of the road and the trajectory line (determined directly by the trajectory data) is calculated. The boundary line is clustered in one dimension according to the average distance. For example, the number of clusters is set to 10 meters and the cluster distance is set to 3.75 meters. The road boundary line set with the smallest distance is retained, and the noise and larger boundary line sets are discarded to achieve the purpose of filtering non-current road boundary lines.
[0127] S2-4: Road boundary data fusion may include but is not limited to clustering the road boundary lines using a density clustering algorithm based on Mahalanobis distance, and fusing the clustered data using geometric mean to obtain the final fused road boundary lines.
[0128] S2-5: Determine the divergence and merging scenarios of the road based on the road boundary lines, and perform line-based density clustering on the road boundary lines obtained in S2-4 again, with the minimum number of clusters set to 2 and the cluster distance set to 2 meters; traverse the road boundary line data of all clusters to determine whether there are diversion areas at the starting and ending positions of the boundary lines; if there are diversion areas, continue traversing; if there are no diversion areas, determine that the starting position is the road divergence position and the ending position is the road merging position.
[0129] S2-6: Construct the scope of the road divergence and merging scenario. At the road divergence, the longitudinal starting position is 10 meters forward, and the lateral range is to the road boundary lines on both sides; at the road merging, the longitudinal ending position is 10 meters backward, and the lateral range is to the road boundary lines on both sides.
[0130] S3, road divergence and merging scene recognition and scope construction based on electronic navigation maps:
[0131] S3-1: Matching trajectory data, matching the trajectory data of the auxiliary road and the main road with the electronic navigation data, and matching the trajectory data and the corresponding lane line data within the road boundary with the road line of the electronic navigation map by means of the road boundary;
[0132] S3-2: Constructing a road diversion scenario. Since the electronic navigation map has marked the auxiliary roads, the roads and auxiliary roads in the navigation map can be directly traversed to start from the intersection of the main and auxiliary roads. However, due to the poor accuracy of the electronic navigation map, the precise location of the road can be determined with the help of the road lane lines and other information reconstructed in S2. Specifically:
[0133] With the starting position of the road as the center and a radius of 100 meters, determine whether the road diversion scene has been built. If the diversion scene has been built, continue to traverse the end position of the auxiliary road; otherwise, obtain the lane line data reconstructed in S2, and use the density clustering algorithm based on Mahalanobis distance to cluster the lane lines, and fuse and extract the lane lines. Then, calculate the outermost lane line data of the main and auxiliary roads, determine the intersection of the starting positions of the two most adjacent lane lines, the longitudinal range of 10 meters forward, and the horizontal range to the position of the outermost lane line of the main and auxiliary roads;
[0134] S3-3: Constructing the road merging scene, with the intersection of the end position of the auxiliary road and the main road as the center and a radius of 100 meters, determine whether the road merging scene has been constructed. If the merging scene has been constructed, continue to traverse other auxiliary roads; otherwise, obtain the reconstructed lane line data, and use the density clustering algorithm based on Mahalanobis distance to cluster the lane lines and fuse and extract the lane lines. Then calculate the outermost lane line data of the main and auxiliary roads, calculate the intersection of the starting positions of the two most adjacent lane lines, the longitudinal range is 10 meters forward, and the horizontal range is to the position of the outermost lane line of the main and auxiliary roads.
[0135] Through the embodiments of the present application, the recognition and construction of road divergence and merging scenes based on diversion area detection and segmentation, and the complete and efficient recognition and construction of road divergence and merging scenes based on highway and urban diversion area segmentation and reconstruction technology are realized. It also includes the recognition and construction of road divergence and merging scenes based on road boundary recognition and reconstruction technology, and electronic navigation map, which achieves the purpose of accurately and efficiently identifying and constructing road divergence and merging scenes based on electronic navigation map information. In general, through the embodiments of the present application, the recognition and construction of urban and highway diversion and merging scenes can be accurately and efficiently carried out, and automated processing is realized, thereby improving the data integrity and production efficiency of map learning, and thereby improving the reliability and quality of crowdsourced high-precision map production.
[0136] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0137] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0138] According to another aspect of the embodiment of the present application, a road data processing device for implementing the above road data processing method is also provided. Figure 5 As shown, the device comprises:
[0139] An acquisition module 502 is used to acquire trajectory point data, lane line acquisition data and road images associated with a first road and a second road, wherein the first road is allowed to merge into the second road;
[0140] A construction module 504 is used to predict the road image to obtain an initial diversion area, and perform three-dimensional reconstruction based on the road image and the initial diversion area to determine a first confluence position, a first divergence position, and a target diversion area, wherein the target diversion area represents the initial diversion area mapped to a geographic coordinate system;
[0141] A first determination module 506 is used to construct a plurality of road lines corresponding to the first road and the second road based on the trajectory point data, and determine a second diverging position and a second merging position based on the plurality of road lines and the target diversion area, wherein the second diverging position is different from the first diverging position, and the second merging position is different from the first merging position;
[0142] A second determination module 508, configured to determine a third diverging position and a third merging position based on the lane line collection data and the pre-acquired electronic map data, wherein the third diverging position is different from both the first diverging position and the second diverging position, and the third merging position is different from both the first merging position and the second merging position;
[0143] The third determination module 510 is used to determine the first diverging position, the second diverging position and the third diverging position as target diverging positions, determine the first merging position, the second merging position and the third merging position as target merging positions, and determine a target road diverging and merging scene area according to the target diverging position and the target merging position, wherein the target merging position represents a predicted position where the first road merges into the second road, and the target diverging position represents a predicted position where the second road diverges from the first road.
[0144] As an optional solution, the above-mentioned device is used to predict the road image to obtain the initial diversion area in the following manner: obtain a sample road image with annotated diversion areas; use the sample road image to train the initial image detection model to obtain a target image detection model; input the road image into the target image detection model to predict the initial diversion area.
[0145] As an optional solution, the above-mentioned device is used to perform three-dimensional reconstruction based on the road image and the initial diversion area to determine the first merging position, the first diverging position and the target diversion area in the following manner: mapping the initial diversion area to the image coordinate system of the road image to obtain the target road image; performing three-dimensional modeling on the target road image, fusing the initial diversion areas corresponding to different frames to obtain a three-dimensional scene model; mapping the three-dimensional scene model to the geographic coordinate system to obtain the target diversion area, and post-processing the target diversion area to obtain the first merging position and the first diverging position.
[0146] As an optional solution, the above-mentioned device is used to construct multiple road lines corresponding to the first road and the second road based on the trajectory point data in the following manner: the trajectory point data is divided into trips according to sampling time points to obtain N groups of trajectory points, wherein the sampling time points corresponding to the same group of trajectory points in the N groups of trajectory points belong to the same sampling time period, and the sampling time points corresponding to different groups of trajectory points belong to different sampling time periods, and N is a positive integer; according to the N groups of trajectory points, a filtering operation is performed on a predetermined initial road line to obtain multiple road lines.
[0147] As an optional solution, the above-mentioned device is used to perform a trip operation on the trajectory point data according to the sampling time points in the following manner to obtain N groups of trajectory points: perform a trip operation on the trajectory point data according to the sampling time points to obtain M groups of trajectory points, wherein M is a positive integer; determine the target break point corresponding to the i-th group of trajectory points based on the azimuth between the first trajectory point and the second trajectory point in the i-th group of trajectory points, wherein the M groups of trajectory points include the i-th group of trajectory points, and i is a positive integer less than or equal to M; and use the target break points in turn to divide the i-th group of trajectory points to obtain N groups of trajectory points.
[0148] As an optional solution, the above-mentioned device is used to perform a filtering operation on a predetermined initial road line according to N groups of trajectory points in the following manner to obtain multiple road lines: obtain N groups of initial road lines corresponding to each group of trajectory points in the N groups of trajectory points; generate N trajectory lines based on the position information of the N groups of trajectory points; determine N groups of intermediate road lines according to the distance between the N trajectory lines and each initial road line in the N groups of initial road lines, wherein the N groups of intermediate road lines represent road lines in the N groups of initial road lines whose distances meet a preset distance condition; perform a clustering fusion operation on the N groups of intermediate road lines to obtain multiple road lines.
[0149] As an optional scheme, the above-mentioned device is used to determine the second divergence position and the second merging position based on multiple road lines and target diversion areas in the following manner: traverse multiple road lines, determine whether there is a target diversion area at the starting position and the ending position of each road line in the multiple road lines; determine the starting position where there is no target diversion area as the second divergence position, and determine the ending position where there is no target diversion area as the second merging position.
[0150] As an optional scheme, the above-mentioned device is used to determine the first diverging position, the second diverging position and the third diverging position as the target diverging position, determine the first merging position, the second merging position and the third merging position as the target merging position in the following manner, and determine the target road diverging and merging scene area according to the target diverging position and the target merging position, including: determining the road diverging scene area according to the target diverging position, the position at a first preset distance forward of the target diverging position, and the first road line and the second road line on both sides, wherein the target road diverging and merging scene area includes the road diverging scene area; determining the road merging scene area according to the target merging position, the position at a fourth preset distance backward of the target merging position, and the third road line and the fourth road line on both sides, wherein the target road diverging and merging scene area includes the road merging scene area.
[0151] 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 goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0152] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0153] According to one aspect of the present application, a computer program product is provided. The computer program product includes a computer program.
[0154] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0155] Figure 6 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0156] It should be noted that Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0157] like Figure 6 As shown, the computer system 600 includes a central processing unit 601 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 602 (ROM) or the program loaded from the storage part 608 to the random access memory 603 (RAM). Various programs and data required for system operation are also stored in the random access memory 603. The central processing unit 601, the read-only memory 602 and the random access memory 603 are connected to each other through a bus 604. An input / output interface 605 (Input / Output interface, i.e., I / O interface) is also connected to the bus 604.
[0158] The following components are connected to the input / output interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 608 including a hard disk, etc.; and a communication section 606 including a network interface card such as a local area network card, a modem, etc. The communication section 606 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
[0159] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 606, and / or installed from the removable medium 611. When the computer program is executed by the central processor 601, various functions defined in the system of the present application are executed.
[0160] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 606, and / or installed from the removable medium 611. When the computer program is executed by the central processor 601, various functions provided by the embodiment of the present application are performed.
[0161] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned road data processing method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Figure 7 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps in any of the above method embodiments through the computer program.
[0162] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0163] Optionally, in this embodiment, the above-mentioned processor can be configured to execute the methods in each embodiment of the present application through a computer program.
[0164] Alternatively, a person skilled in the art may understand that: Figure 7 The structure shown is for illustration only. Figure 7 The structure of the electronic device is not limited. Figure 7 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 7 Different configurations are shown.
[0165] Among them, the memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the road data processing method and device in the embodiment of the present application. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, that is, realizing the above-mentioned road data processing method. The memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include a memory remotely located relative to the processor 704, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 702 can be specifically, but not limited to, used to store trajectory point data, road lines and other information. As an example, such as Figure 7 As shown, the memory 702 may include, but is not limited to, the acquisition module 502, the construction module 504, the first determination module 506, the second determination module 508, and the third determination module 510 in the road data processing device. In addition, other module units in the road data processing device may also be included but are not limited to, which will not be repeated in this example.
[0166] Optionally, the transmission device 706 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 706 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 706 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0167] In addition, the electronic device further includes: a display 708, which is used to display the target road divergence and merging scene area and is used to connect the various module components in the electronic device.
[0168] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a peer-to-peer network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0169] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the road data processing method provided in various optional implementations of the above-mentioned road data processing.
[0170] Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be configured to store data for executing the methods in various embodiments of the present application.
[0171] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0172] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0173] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for one or more electronic devices to execute all or part of the steps of the methods described in each embodiment of the present application.
[0174] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0175] In the several embodiments provided in the present application, it should be understood that the disclosed application can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in 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. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0176] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0178] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing road data, characterized in that: include: Acquire trajectory point data, lane line collection data, and road images associated with a first road and a second road, wherein the first road is allowed to merge into the second road; Predicting the road image to obtain an initial diversion area, and performing three-dimensional reconstruction based on the road image and the initial diversion area to determine a first confluence position, a first divergence position, and a target diversion area, wherein the target diversion area represents the initial diversion area mapped to a geographic coordinate system; Constructing a plurality of road lines corresponding to the first road and the second road based on the trajectory point data, and determining a second diverging position and a second merging position based on the plurality of road lines and the target diversion area, wherein the second diverging position is different from the first diverging position, and the second merging position is different from the first merging position; Determine a third diverging position and a third merging position based on the lane line collection data and the pre-acquired electronic map data, wherein the third diverging position is different from both the first diverging position and the second diverging position, and the third merging position is different from both the first merging position and the second merging position; The first diverging position, the second diverging position and the third diverging position are determined as target diverging positions, the first merging position, the second merging position and the third merging position are determined as target merging positions, and a target road diverging and merging scene area is determined according to the target diverging positions and the target merging positions, wherein the target merging position represents a predicted position where the first road merges into the second road, and the target diverging position represents a predicted position where the second road diverges from the first road.
2. The method according to claim 1, characterized in that The step of predicting the road image to obtain an initial diversion area includes: Obtain a sample road image with marked diversion areas; Using the sample road image to train the initial image detection model to obtain a target image detection model; The road image is input into the target image detection model to predict the initial diversion area.
3. The method according to claim 2, characterized in that The performing three-dimensional reconstruction based on the road image and the initial diversion area to determine a first confluence position, a first divergence position, and a target diversion area includes: Mapping the initial diversion area to the image coordinate system of the road image to obtain a target road image; Performing three-dimensional modeling on the target road image, fusing the initial diversion areas corresponding to different frames to obtain a three-dimensional scene model; The three-dimensional scene model is mapped to the geographic coordinate system to obtain the target diversion area, and the target diversion area is post-processed to obtain the first confluence position and the first divergence position.
4. The method according to claim 1, characterized in that: The constructing a plurality of road lines corresponding to the first road and the second road based on the trajectory point data includes: The trajectory point data is divided into several groups according to the sampling time points to obtain N groups of trajectory points, wherein the sampling time points corresponding to the same group of trajectory points in the N groups of trajectory points belong to the same sampling time period, and the sampling time points corresponding to different groups of trajectory points belong to different sampling time periods, and N is a positive integer; A filtering operation is performed on a predetermined initial road line according to the N groups of trajectory points to obtain the multiple road lines.
5. The method according to claim 4, characterized in that The step of performing a trip operation on the trajectory point data according to the sampling time points to obtain N groups of trajectory points includes: Performing a trip operation on the trajectory point data according to the sampling time points to obtain M groups of trajectory points, where M is a positive integer; Determine a target interruption point corresponding to the i-th group of trajectory points according to an azimuth angle between a first trajectory point and a second trajectory point in the i-th group of trajectory points, wherein the M groups of trajectory points include the i-th group of trajectory points, and i is a positive integer less than or equal to M; The target break points are used in sequence to divide the i-th group of trajectory points to obtain the N groups of trajectory points.
6. The method according to claim 4, characterized in that The performing a filtering operation on the predetermined initial road line according to the N groups of trajectory points to obtain the plurality of road lines comprises: Obtaining N groups of initial road lines corresponding to each group of trajectory points in the N groups of trajectory points; Generate N trajectory lines based on the position information of the N groups of trajectory points; Determine N groups of intermediate road lines according to the distances between the N trajectory lines and each of the N groups of initial road lines, wherein the N groups of intermediate road lines represent road lines in the N groups of initial road lines whose distances satisfy a preset distance condition; A clustering fusion operation is performed on the N groups of intermediate road lines to obtain the multiple road lines.
7. The method according to claim 1, characterized in that The determining the second diverging position and the second merging position based on the multiple road lines and the target diversion area comprises: Traversing the multiple road lines, and determining whether the target diversion area exists at the start position and the end position of each road line in the multiple road lines; The starting position where the target diversion area does not exist is determined as the second diverging position, and the ending position where the target diversion area does not exist is determined as the second merging position.
8. The method according to claim 1, characterized in that The method of determining the first diverging position, the second diverging position, and the third diverging position as target diverging positions, determining the first merging position, the second merging position, and the third merging position as target merging positions, and determining a target road diverging and merging scene area according to the target diverging positions and the target merging positions includes: Determine a road divergence scene area according to the target divergence position, a position at a first preset distance forward of the target divergence position, and a first road line and a second road line located on both sides, wherein the target road divergence and merging scene area includes the road divergence scene area; A road merging scene area is determined according to the target merging position, the position at a fourth preset distance rearward of the target merging position, and the third road line and the fourth road line located on both sides, wherein the target road merging scene area includes the road merging scene area.
9. A road data processing device, characterized in that: include: An acquisition module, used to acquire trajectory point data, lane line acquisition data and road images associated with a first road and a second road, wherein the first road is allowed to merge into the second road; A construction module is used to predict the road image to obtain an initial diversion area, and perform three-dimensional reconstruction based on the road image and the initial diversion area to determine a first confluence position, a first divergence position, and a target diversion area, wherein the target diversion area represents the initial diversion area mapped to a geographic coordinate system; a first determining module, configured to construct a plurality of road lines corresponding to the first road and the second road based on the trajectory point data, and determine a second diverging position and a second merging position based on the plurality of road lines and the target diversion area, wherein the second diverging position is different from the first diverging position, and the second merging position is different from the first merging position; a second determination module, configured to determine a third diverging position and a third merging position based on the lane line collection data and pre-acquired electronic map data, wherein the third diverging position is different from both the first diverging position and the second diverging position, and the third merging position is different from both the first merging position and the second merging position; The third determination module is used to determine the first diverging position, the second diverging position and the third diverging position as target diverging positions, determine the first merging position, the second merging position and the third merging position as target merging positions, and determine a target road diverging and merging scene area according to the target diverging position and the target merging position, wherein the target merging position represents a predicted position where the first road merges into the second road, and the target diverging position represents a predicted position where the second road diverges from the first road.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 8.
11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 8 through the computer program.
