Road network generation method, device, readable storage medium and electronic device

By using an unsupervised road prediction model in road network generation and training based on sample data in different regions, the problem of high manual labeling in the existing technology is solved, and efficient and low-cost road network data generation is achieved.

CN114842207BActive Publication Date: 2025-02-28BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210427356.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2025-02-28
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

In the prior art, when building a road network based on a deep learning model, it is necessary to manually mark the GPS trajectory and the road network data one by one, resulting in high cost and low efficiency.

Method used

By obtaining multiple target trajectory data of the target area, the road prediction model is used to predict the target road raster map of the target area. The model is trained based on sample data of different regions, and unsupervised training is achieved, reducing the cost of model training and improving efficiency.

Benefits of technology

It realizes the generation of high-quality road network data without manual annotation, which reduces training costs, improves efficiency, and avoids data quality problems caused by manual annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114842207B_ABST
    Figure CN114842207B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a road network generation method, device, readable storage medium and electronic device. The method includes: obtaining multiple target trajectory data of a target area; predicting a target road grid map of the target area through a road prediction model based on the multiple target trajectory data, the road prediction model is trained based on multiple sample trajectory data of a first area and sample road network data of a second area, and the target area, the first area and the second area are different from each other; vectorizing the target road grid map to obtain the target road network data of the target area. In this way, unsupervised training of the road prediction model can be achieved without labeling the road network data that corresponds one-to-one with the trajectory data, thereby reducing the model training cost and improving the efficiency of model training. In addition, it can also avoid the problem that the accuracy of model prediction is affected due to the inability to ensure the quality of manually labeled data, thereby obtaining high-quality road network data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a road network generation method, device, readable storage medium and electronic device. Background Art

[0002] Roads are important infrastructures that connect different places and play an irreplaceable role in the production and life of society. In the digital age, road network data is the key support for building smart city systems. With the popularization of devices equipped with the Global Positioning System (GPS) and the widespread application of location-based services (LBS), various units and organizations use traditional algorithms or deep learning models obtained through supervised training to build road networks based on massive trajectory information and export road network data. Among them, the deep learning model obtained based on supervised training needs to label the road network data that corresponds one-to-one with the GPS trajectory during the training phase. Manual labeling is costly and inefficient. Summary of the invention

[0003] The purpose of the present disclosure is to provide a road network generation method, device, readable storage medium and electronic device to partially solve the above-mentioned problems existing in the related art.

[0004] In order to achieve the above objectives, in a first aspect, the present disclosure provides a road network generation method, comprising:

[0005] Acquire multiple target trajectory data of the target area;

[0006] According to the multiple target trajectory data, predicting a target road grid map of the target area by a road prediction model, wherein the road prediction model is trained based on multiple sample trajectory data of a first area and sample road network data of a second area, and the target area, the first area, and the second area are different from each other;

[0007] The target road raster map is vectorized to obtain target road network data of the target area.

[0008] Optionally, predicting a target road grid map of the target area by a road prediction model according to the plurality of target trajectory data includes:

[0009] Preprocessing the plurality of target trajectory data to obtain a target trajectory grid map of the target area;

[0010] The target trajectory grid map is input into a road prediction model to obtain a target road grid map of the target area.

[0011] Optionally, preprocessing the plurality of target trajectory data to obtain a target trajectory grid map of the target area includes:

[0012] For each of the target trajectory data, the target trajectory data is trajectory cleaned; the target trajectory data obtained after trajectory cleaning is rasterized to obtain a trajectory feature map corresponding to the target trajectory data;

[0013] The trajectory feature maps corresponding to each of the target trajectory data are fused and superimposed to obtain a trajectory feature density map of the target area;

[0014] A target trajectory grid map of the target area is determined according to the trajectory feature density map.

[0015] Optionally, determining the target trajectory grid map of the target area according to the trajectory feature density map includes:

[0016] The trajectory feature density map is subjected to noise reduction processing to obtain a target trajectory grid map of the target area.

[0017] Optionally, the road prediction model is trained in the following manner:

[0018] Acquire training data, wherein the training data includes a plurality of sample trajectory data of the first area and sample road network data of the second area;

[0019] Preprocessing the plurality of sample trajectory data to obtain a sample trajectory grid map of the first area;

[0020] rasterizing the sample road network data to obtain a sample road raster map of the second area;

[0021] According to the sample trajectory grid map, a predicted road grid map is generated by a style migration model;

[0022] Based on the predicted road grid map and the sample road grid map, updating model parameters of the style migration model;

[0023] In response to not meeting the training cutoff condition, re-executing the step of acquiring training data to the step of updating model parameters of the style migration model based on the predicted road grid map and the sample road grid map;

[0024] In response to satisfying the training cutoff condition, obtaining the road prediction model.

[0025] Optionally, the style transfer model is a generative adversarial network including a first generator and a first discriminator;

[0026] The step of generating a predicted road grid map by using a style migration model according to the sample trajectory grid map includes:

[0027] According to the sample trajectory grid map, generating a predicted road grid map by the first generator;

[0028] The updating of model parameters of the style migration model based on the predicted road grid map and the sample road grid map includes:

[0029] Determining, by the first discriminator, whether the image style of the predicted road raster image is consistent with the image style of the sample road raster image, and obtaining a first discrimination result;

[0030] According to the first discrimination result, model parameters of the first generator and the first discriminator are updated.

[0031] Optionally, the style transfer model is a cyclic generative adversarial network including a second generator, a third generator, a second discriminator and a third discriminator;

[0032] The step of generating a predicted road grid map by using a style migration model according to the sample trajectory grid map includes:

[0033] According to the sample trajectory grid map, generating a predicted road grid map by the second generator;

[0034] The updating of model parameters of the style migration model based on the predicted road grid map and the sample road grid map includes:

[0035] Determining whether the image style of the predicted road raster image is consistent with the image style of the sample road raster image by the second discriminator, and obtaining a first discrimination result;

[0036] According to the predicted road grid map, generating a predicted trajectory grid map by the third generator;

[0037] Determining, by the third discriminator, whether the image style of the predicted trajectory raster image is consistent with the image style of the sample trajectory raster image, to obtain a second discrimination result;

[0038] updating model parameters of the second generator and the second discriminator according to the predicted trajectory grid map, the sample trajectory grid map, the first discrimination result, and the second discrimination result;

[0039] The model parameters of the third generator and the third discriminator are updated according to the predicted trajectory grid map, the sample trajectory grid map and the second discrimination result.

[0040] Optionally, updating model parameters of the second generator and the second discriminator according to the predicted trajectory grid map, the sample trajectory grid map, the first discrimination result and the second discrimination result includes:

[0041] Calculating a cycle consistency loss according to the predicted trajectory grid map and the sample trajectory grid map;

[0042] Calculating a first adversarial loss according to the first discrimination result, and calculating a second adversarial loss according to the second discrimination result;

[0043] According to the cycle consistency loss, the first adversarial loss, and the second adversarial loss, model parameters of the second generator and the second discriminator are updated.

[0044] Optionally, updating model parameters of the third generator and the third discriminator according to the predicted trajectory grid map, the sample trajectory grid map and the second discrimination result includes:

[0045] Calculating a cycle consistency loss according to the predicted trajectory grid map and the sample trajectory grid map;

[0046] Calculating a second adversarial loss according to the second discrimination result;

[0047] According to the cycle consistency loss and the second adversarial loss, model parameters of the third generator and the third discriminator are updated.

[0048] In a second aspect, the present disclosure provides a road network generation device, comprising:

[0049] A first acquisition module is used to acquire multiple target trajectory data of a target area;

[0050] A prediction module, configured to predict a target road grid map of the target area through a road prediction model according to the multiple target trajectory data acquired by the first acquisition module, wherein the road prediction model is trained based on multiple sample trajectory data of the first area and sample road network data of the second area, and the target area, the first area, and the second area are different from each other;

[0051] The vectorization processing module is used to perform vectorization processing on the target road grid map predicted by the prediction module to obtain the target road network data of the target area.

[0052] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the road network generation method provided in the first aspect of the present disclosure.

[0053] In a fourth aspect, the present disclosure provides an electronic device, including:

[0054] a memory having a computer program stored thereon;

[0055] A processor is used to execute the computer program in the memory to implement the steps of the road network generation method provided in the first aspect of the present disclosure.

[0056] In the above technical solution, the road prediction model for predicting the target road grid map of the target area is obtained by training based on multiple sample trajectory data of the first area and sample road network data of the second area. Since the first area and the second area are different, that is, the multiple sample trajectory data and the sample road network data are not one-to-one corresponding, unsupervised training of the road prediction model can be achieved without labeling the road network data that corresponds one-to-one with the trajectory data, thereby reducing the model training cost and improving the model training efficiency. In addition, it can also avoid the problem that the accuracy of model prediction is affected due to the inability to ensure the quality of manually labeled data, thereby obtaining high-quality road network data.

[0057] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0059] Figure 1 The present invention is a flowchart of a method for generating a road network according to an exemplary embodiment.

[0060] Figure 2 The figure is a flowchart of a road prediction model training method according to an exemplary embodiment.

[0061] Figure 3 The present invention is a block diagram of a road network generating device according to an exemplary embodiment.

[0062] Figure 4 It is a block diagram of a road prediction model training device according to an exemplary embodiment.

[0063] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment.

[0064] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0065] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0066] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0067] Figure 1 FIG. 1 is a flow chart of a method for generating a road network according to an exemplary embodiment. Figure 1 As shown, the method may include the following S101 to S103.

[0068] In S101 , a plurality of target trajectory data of a target area is obtained.

[0069] In the present disclosure, the target area may be any area where road network data is to be generated, such as an industrial park, a community, an urban area, etc.

[0070] Target trajectory data can include hardware trajectory point data and software trajectory point data. Specifically, hardware trajectory point data mainly refers to the trajectory point data generated by the vehicle during movement (such as the trajectory point data of a shared bicycle, the trajectory point data of a car, etc.); software trajectory point data mainly refers to the trajectory point data generated by the mobile terminal. Among them, the trajectory point data includes the location of the trajectory point, the time point corresponding to the trajectory point, and the current moving speed of the trajectory point.

[0071] In S102, a target road grid map of a target area is predicted by a road prediction model according to a plurality of target trajectory data.

[0072] In the present disclosure, the road prediction model is trained based on multiple sample trajectory data of the first area and sample road network data of the second area. The target area, the first area, and the second area are different from each other, that is, the multiple sample trajectory data and the sample road network data are not one-to-one corresponding. The second area can be any area containing corresponding road network data, and the corresponding road network data contained in the area can be determined as the sample road network data of the area.

[0073] In addition, the first area may be, for example, an industrial park, a community, an urban area, etc., and the second area may also be, for example, an industrial park, a community, an urban area, etc., which is not specifically limited in the present disclosure.

[0074] In S103, the target road raster map is vectorized to obtain target road network data of the target area.

[0075] In the present disclosure, since the road grid map is an image represented by a plane coordinate system, and the road network data is a set of line segments represented by geographic coordinates (i.e., spherical coordinates that use latitude and longitude to represent the position of ground points), after the target road grid map of the target area is predicted by the road prediction model in the above S102, it needs to be vectorized to obtain the target road network data of the target area.

[0076] Specifically, the target road raster map can be vectorized in the following ways:

[0077] First, the skeleton extraction operation is performed on the target road raster map; then, the key points (including turning points, starting points, and end points) of the road raster map obtained after the skeleton extraction are extracted to obtain the road network data under the vectorized plane coordinate representation; finally, the road network data under the plane coordinate representation is mapped to the road network data under the geographic coordinate representation, that is, the target road network data of the target area is obtained.

[0078] In the above technical solution, the road prediction model for predicting the target road grid map of the target area is obtained by training based on multiple sample trajectory data of the first area and sample road network data of the second area. Since the first area and the second area are different, that is, the multiple sample trajectory data and the sample road network data are not one-to-one corresponding, unsupervised training of the road prediction model can be achieved without labeling the road network data that corresponds one-to-one with the trajectory data, thereby reducing the model training cost and improving the model training efficiency. In addition, it can also avoid the problem that the accuracy of model prediction is affected due to the inability to ensure the quality of manually labeled data, thereby obtaining high-quality road network data.

[0079] The following is a detailed description of the specific implementation method of predicting the target road grid map of the target area through the road prediction model based on the multiple target trajectory data in S102. Specifically, it can be achieved through the following steps (1) and (2):

[0080] (1) Preprocess multiple target trajectory data to obtain a target trajectory grid map of the target area.

[0081] (2) The target trajectory grid map is input into the road prediction model to obtain the target road grid map of the target area.

[0082] The following is a detailed description of the specific implementation method of preprocessing multiple target trajectory data in the above step (1) to obtain a target trajectory grid map of the target area. Specifically, it can be achieved by the following steps (11) to (14):

[0083] (11) For each target trajectory data, trajectory cleaning is performed on the target trajectory data.

[0084] Specifically, at least one of the drift points, indoor points and stay points may be eliminated from the target trajectory data.

[0085] Due to the reasons of the GPS device itself and network communication, various abnormalities may occur in the collected location information, including the abnormal situation that there is a large time difference and distance between two adjacent points due to the device being offline; the abnormal situation that the GPS position distance is too large in continuous time due to the device abnormality, that is, the abnormal situation of drift points. Among them, the latter trajectory point (that is, the trajectory point later in the corresponding time point) of any two adjacent trajectory points in the target trajectory data whose average speed between trajectory points is greater than the first preset speed threshold can be determined as a drift point. Eliminating drift points from the target trajectory data can ensure that the trajectory data used for road network generation does not deviate from its actual position in the road network, that is, avoids false road predictions caused by drift points, which is conducive to more accurate and efficient generation of high-quality road network data.

[0086] In addition, the points in the target trajectory point data whose corresponding time points are within the indoor time interval (i.e., indoor activity period) can be determined as indoor points. Among them, indoor points are noise points, and removing them can also make the trajectory data used for road network generation not deviate from its actual position in the road network, that is, avoid false road prediction caused by indoor noise points, which is conducive to more accurate and efficient generation of high-quality road network data.

[0087] In addition, the latter trajectory point (i.e., the trajectory point at the later time point) of any two adjacent trajectory points in the target trajectory data whose average speed between trajectory points is less than the second preset speed threshold can be determined as a stop point. Wherein, the second preset speed threshold is less than the above-mentioned first preset speed threshold. Eliminating the stop points from the target trajectory data can even out the trajectory density, thereby eliminating the density difference of adjacent trajectories, guiding the road prediction model to enhance the focus on low-density trajectory features, and effectively improving the recall rate of the road network, so that the road prediction model can not only mine the main roads from the high-density trajectory features, but also mine the branches from the low-density trajectory features, thereby improving the quality of the target road network data. In this way, it is possible to mine fine, complete and accurate internal road network data (wherein, the data of public roads within various communities, parks or units is called internal network data) from the road trajectory information of internal areas with different distributions (wherein, various communities, parks, etc. are called internal areas). These internal road network data can help build a more complete LBS application and help people live a better life, such as providing more delicate and accurate navigation routes.

[0088] (12) The target trajectory data obtained after trajectory cleaning is rasterized to obtain a trajectory feature map corresponding to the target trajectory data.

[0089] In the present disclosure, the trajectory feature map may be, for example, a trajectory line feature map, a trajectory point feature map, a trajectory direction feature map, a trajectory speed feature map, a first-order derivative feature map of the trajectory speed, a second-order derivative feature map of the trajectory speed, etc., and the present disclosure does not make any specific limitations.

[0090] Specifically, the trajectory features corresponding to the target trajectory data obtained after trajectory cleaning can be first obtained, wherein the trajectory features can be trajectory line features, trajectory point features, trajectory direction features, trajectory speed features, first-order derivative features of trajectory speed, second-order derivative features of trajectory speed, etc.; then, according to the geographic coordinates of each trajectory point, the trajectory features are mapped to a plane coordinate system to obtain a trajectory feature map corresponding to the target trajectory data.

[0091] For example, the above-mentioned trajectory feature is a trajectory line feature, and correspondingly, the above-mentioned trajectory feature map is a trajectory line feature map. At this time, the target trajectory data obtained after trajectory cleaning can be rasterized in the following manner to obtain a trajectory line feature map corresponding to the target trajectory data: first, each trajectory point in the target trajectory data obtained after trajectory cleaning can be connected in the order of their corresponding time points to obtain a trajectory line feature corresponding to the target trajectory data (i.e., a sequentially connected trajectory line); then, according to the geographic coordinates of each trajectory point, the trajectory line feature is mapped to a plane coordinate system to obtain a trajectory line feature map corresponding to the target trajectory data.

[0092] As another example, the above-mentioned trajectory features are trajectory point features, and correspondingly, the above-mentioned trajectory feature map is a trajectory point feature map. At this time, the target trajectory data obtained after trajectory cleaning can be rasterized in the following manner to obtain a trajectory point feature map corresponding to the target trajectory data: first, each trajectory point in the target trajectory data obtained after trajectory cleaning can be directly used as a trajectory point feature corresponding to the target trajectory data; then, according to the geographic coordinates of each trajectory point, the trajectory point features are mapped to a plane coordinate system, so as to obtain a trajectory point feature map corresponding to the target trajectory data.

[0093] As another example, the above-mentioned trajectory feature is a trajectory speed feature, and accordingly, the above-mentioned trajectory feature map is a trajectory speed feature map. At this time, the target trajectory data obtained after trajectory cleaning can be rasterized in the following manner to obtain a trajectory speed feature map corresponding to the target trajectory data: first, the speed feature of each trajectory point in the target trajectory data obtained after trajectory cleaning can be obtained, and the speed feature of each trajectory point can be used as the trajectory speed feature corresponding to the target trajectory data; then, according to the geographic coordinates of each trajectory point, the trajectory speed feature is mapped to a plane coordinate system, so as to obtain a trajectory speed feature map corresponding to the target trajectory data.

[0094] Among them, when the above-mentioned trajectory feature map is a trajectory point feature map, the grayscale value of the pixel points where each trajectory point is located in the trajectory point feature map can be set to 1, and the grayscale values ​​of the remaining pixels can be set to 0; when the above-mentioned trajectory feature map is a trajectory line feature map, the grayscale values ​​of the pixel points where each trajectory point is located in the trajectory line feature map and the pixel points through which the connecting line between adjacent trajectory points passes can be set to 1, and the grayscale values ​​of the remaining pixels can be set to 0; and when the above-mentioned trajectory feature map is a trajectory direction feature map, a trajectory speed feature map, a first-order derivative feature map of trajectory speed, and a second-order derivative feature map of trajectory speed, the grayscale value of the pixel points where each trajectory point is located in the trajectory feature map can be the intensity of the corresponding feature of the corresponding trajectory point.

[0095] (13) The trajectory feature maps corresponding to each target trajectory data are fused and superimposed to obtain a trajectory feature density map of the target area.

[0096] In the present disclosure, the trajectory feature map corresponding to each target trajectory data in the target area can be fused and superimposed to obtain a trajectory feature density map of the target area. The trajectory feature density map can be, for example, a trajectory line feature density map, a trajectory point feature density map, a trajectory direction feature density map, a trajectory speed feature density map, a first-order derivative feature density map of the trajectory speed, a second-order derivative feature density map of the trajectory speed, etc., which is not specifically limited in the present disclosure.

[0097] When the above-mentioned trajectory feature map is a trajectory point feature map or a trajectory line feature map, the grayscale value of the pixel point in the trajectory feature density map obtained after fusion and addition is equal to the sum of the grayscale values ​​of the corresponding pixel points in the trajectory feature map corresponding to each target trajectory data; when the above-mentioned trajectory feature map is a trajectory direction feature map, a trajectory speed feature map, a first-order derivative feature map of the trajectory speed, a second-order derivative feature map of the trajectory speed and other feature maps, the grayscale value of the pixel point in the trajectory feature density map obtained after fusion and addition is equal to the average value of the sum of the grayscale values ​​of the corresponding pixel points in the trajectory feature map corresponding to each target trajectory data.

[0098] For example, the target area includes 5 target trajectory data, and the trajectory line feature maps corresponding to the 5 target trajectory data are respectively A, B, C, D and E, wherein the grayscale value of the first pixel point in A (i.e., the pixel point in the upper left corner) is 0, the grayscale value of the first pixel point in B is 1, the grayscale value of the first pixel point in C is 1, the grayscale value of the first pixel point in D is 0, and the grayscale value of the first pixel point in E is 1. Then, the grayscale value of the first pixel point in the trajectory line feature density map obtained by fusion and superposition of A, B, C, D and E is equal to 0+1+1+0+1=3.

[0099] (14) Determine a target trajectory grid map of the target area based on the trajectory feature density map.

[0100] In one implementation, the trajectory feature density map may be directly determined as a target trajectory grid map of the target area.

[0101] In another implementation, the trajectory feature density map may be subjected to noise reduction processing to obtain a target trajectory grid map of the target area.

[0102] In the present disclosure, the above-mentioned noise reduction processing may include binarization processing and / or Gaussian smoothing processing.

[0103] In one embodiment, the noise reduction process may include a binarization process. Specifically, the pixel points in the trajectory feature density map whose grayscale value is less than a preset grayscale threshold value may be used as the background, and the pixel points in the trajectory feature density map whose grayscale value is greater than or equal to the preset grayscale threshold value may be used as the foreground, thereby obtaining a target trajectory grid map of the target area. In this way, the noise points with low confidence in the trajectory feature density map may be removed, so that the trajectory data used for road network generation does not deviate from its actual position in the road network, that is, pseudo road prediction caused by noise points with low confidence is avoided, which is conducive to more accurate and efficient generation of high-quality road network data.

[0104] In another embodiment, the above-mentioned noise reduction processing may include Gaussian smoothing processing. Among them, Gaussian smoothing processing is performed on the trajectory feature density map, which can weaken the influence of noise, make the grayscale distribution of the target trajectory grid map in the target area more uniform, that is, the trajectory density can be uniform, so that the density difference of adjacent trajectories can be further eliminated, and the road prediction model can be guided to enhance the focus on low-density trajectory features, which can effectively improve the recall rate of the road network, so that the road prediction model can not only mine the main roads from the high-density trajectory features, but also mine the branches from the low-density trajectory features, thereby improving the quality of the target road network data. In this way, it is possible to mine fine, complete and accurate internal road network data from the road trajectory information of internal areas with different distributions.

[0105] In another embodiment, the noise reduction process may include binarization and Gaussian smoothing. Specifically, the trajectory feature density map may be binarized and Gaussian smoothed in sequence to obtain a target trajectory grid map of the target area. In this way, the quality of the generated road network data may be improved to the greatest extent.

[0106] The following is a detailed description of the specific training method of the road prediction model involved in S102. Figure 2 The above road prediction model is obtained by training according to S201 to S207 shown in FIG.

[0107] In S201, training data is obtained, where the training data includes a plurality of sample trajectory data of a first area and sample road network data of a second area.

[0108] In S202, a plurality of sample trajectory data are preprocessed to obtain a sample trajectory grid map of a first area.

[0109] In the present disclosure, a plurality of sample trajectory data may be preprocessed in a manner similar to the preprocessing of a plurality of target trajectory data in the above step (1), and this disclosure will not elaborate on this.

[0110] In S203, the sample road network data is rasterized to obtain a sample road raster map of the second area.

[0111] In the present disclosure, the sample road network data is a set of line segments represented by geographic coordinates, which can be rasterized into an image represented by plane coordinates (i.e., the sample road network data represented by geographic coordinates is mapped to the road network data represented by plane coordinates), thereby obtaining a sample road grid map of the second area.

[0112] In S204, a predicted road grid map is generated according to the sample trajectory grid map through a style transfer model.

[0113] In S205 , model parameters of the style transfer model are updated based on the predicted road grid map and the sample road grid map.

[0114] In S206, it is determined whether the training cutoff condition is met.

[0115] In the present disclosure, the training cutoff condition may be that the number of training times reaches a preset number threshold, or that the loss of the style transfer model is less than a preset loss threshold.

[0116] If the training cut-off condition is not met, the process returns to S201 and continues to execute until the training cut-off condition is met. If the training cut-off condition is met, the process executes S207.

[0117] In S207 , a road prediction model is obtained.

[0118] In the present disclosure, the style transfer model can have a variety of structures. In one embodiment, the style transfer model is a generative adversarial network including a first generator and a first discriminator. At this time, the above S204 can generate a predicted road grid map through the first generator according to the sample trajectory grid map. Afterwards, the above S205 can use the first discriminator to determine whether the image style of the predicted road grid map generated by the first generator is consistent with the image style of the sample road grid map, obtain a first discrimination result, and update the model parameters of the first generator and the first discriminator according to the first discrimination result.

[0119] Specifically, the first adversarial loss can be calculated according to the first discrimination result; then, the model parameters of the first generator and the first discriminator are updated based on the first adversarial loss.

[0120] In another embodiment, the style transfer model is a recurrent generative adversarial network including a second generator, a third generator, a second discriminator, and a third discriminator. In this case, the above S204 can generate a predicted road grid map through the second generator according to the sample trajectory grid map. The above S205 can include the following steps 1) to 5):

[0121] 1) using a second discriminator to determine whether the image style of the predicted road raster image is consistent with the image style of the sample road raster image, thereby obtaining a first discrimination result;

[0122] 2) generating a predicted trajectory grid map through a third generator according to the predicted road grid map;

[0123] 3) using a third discriminator to determine whether the image style of the predicted trajectory raster image is consistent with the image style of the sample trajectory raster image, thereby obtaining a second discrimination result;

[0124] 4) updating the model parameters of the second generator and the second discriminator according to the predicted trajectory grid map, the sample trajectory grid map, the first discrimination result and the second discrimination result;

[0125] 5) According to the predicted trajectory grid map, the sample trajectory grid map and the second discrimination result, the model parameters of the third generator and the third discriminator are updated.

[0126] In the above implementation, the style transfer model is a recurrent generative adversarial network, so that it can be ensured that the predicted road grid map obtained after style transfer corresponds to the trajectory data before style transfer, so as to avoid the generation of non-existent roads, thereby further improving the quality of road network generation.

[0127] The following is a detailed description of the specific implementation method of updating the model parameters of the second generator and the second discriminator according to the predicted trajectory grid map, the sample trajectory grid map, the first discrimination result and the second discrimination result in the above step 4). Specifically, it can be achieved by the following steps:

[0128] First, the cycle consistency loss is calculated based on the predicted trajectory grid map and the sample trajectory grid map;

[0129] Then, according to the first discrimination result, a first adversarial loss is calculated, and according to the second discrimination result, a second adversarial loss is calculated;

[0130] Finally, according to the cycle consistency loss, the first adversarial loss and the second adversarial loss, the model parameters of the second generator and the second discriminator are updated.

[0131] The following is a detailed description of the specific implementation method of updating the model parameters of the third generator and the third discriminator according to the predicted trajectory grid map, the sample trajectory grid map and the second discrimination result in the above step 5). Specifically, it can be achieved by the following steps:

[0132] First, the cycle consistency loss is calculated based on the predicted trajectory grid map and the sample trajectory grid map;

[0133] Then, according to the second discrimination result, the second adversarial loss is calculated;

[0134] Finally, according to the cycle consistency loss and the second adversarial loss, the model parameters of the third generator and the third discriminator are updated.

[0135] The present disclosure also provides a road network generation device, such as Figure 3 As shown, the road network generating device 300 may include:

[0136] A first acquisition module 301 is used to acquire multiple target trajectory data of a target area;

[0137] A prediction module 302 is used to predict a target road grid map of the target area through a road prediction model according to the multiple target trajectory data acquired by the first acquisition module 301, wherein the road prediction model is trained based on multiple sample trajectory data of the first area and sample road network data of the second area, and the target area, the first area, and the second area are different from each other;

[0138] The vectorization processing module 303 is used to perform vectorization processing on the target road grid map predicted by the prediction module 302 to obtain target road network data of the target area.

[0139] In the above technical solution, the road prediction model for predicting the target road grid map of the target area is obtained by training based on multiple sample trajectory data of the first area and sample road network data of the second area. Since the first area and the second area are different, that is, the multiple sample trajectory data and the sample road network data are not one-to-one corresponding, unsupervised training of the road prediction model can be achieved without labeling the road network data that corresponds one-to-one with the trajectory data, thereby reducing the model training cost and improving the model training efficiency. In addition, it can also avoid the problem that the accuracy of model prediction is affected due to the inability to ensure the quality of manually labeled data, thereby obtaining high-quality road network data.

[0140] Optionally, the prediction module 302 includes:

[0141] A preprocessing submodule, used for preprocessing the plurality of target trajectory data to obtain a target trajectory grid map of the target area;

[0142] The prediction submodule is used to input the target trajectory grid map into the road prediction model to obtain the target road grid map of the target area.

[0143] Optionally, the preprocessing submodule includes:

[0144] A cleaning submodule is used to perform track cleaning on each target track data; a rasterization processing submodule is used to perform rasterization processing on the target track data obtained after track cleaning to obtain a track feature map corresponding to the target track data;

[0145] A superposition submodule, used for fusing and superimposing the trajectory feature graphs corresponding to each of the target trajectory data to obtain a trajectory feature density graph of the target area;

[0146] The determination submodule is used to determine the target trajectory grid map of the target area according to the trajectory feature density map.

[0147] Optionally, the determination submodule is used to perform noise reduction processing on the trajectory feature density map to obtain a target trajectory grid map of the target area.

[0148] Optionally, the road prediction model can be trained by a road prediction model training device. Figure 4 As shown, the road prediction model training device 400 may include:

[0149] The second acquisition module 401 is used to acquire training data, wherein the training data includes a plurality of sample trajectory data of the first area and sample road network data of the second area.

[0150] A preprocessing module 402, configured to preprocess the plurality of sample trajectory data acquired by the second acquisition module 401 to obtain a sample trajectory grid map of the first area;

[0151] A rasterization processing module 403 is used to perform rasterization processing on the sample road network data acquired by the second acquisition module 401 to obtain a sample road raster map of the second area;

[0152] A generating module 404, configured to generate a predicted road grid map through a style migration model according to the sample trajectory grid map obtained by the preprocessing module 402;

[0153] An updating module 405 is used to update model parameters of the style migration model based on the predicted road grid map generated by the generating module 404 and the sample road grid map obtained by the rasterization processing module 403;

[0154] The trigger module 406 is used to: in response to not meeting the training cut-off condition, trigger the second acquisition module 401 to acquire training data; in response to meeting the training cut-off condition, obtain the road prediction model.

[0155] Optionally, the style transfer model is a generative adversarial network including a first generator and a first discriminator;

[0156] The generating module 404 is used to generate a predicted road grid map through the first generator according to the sample trajectory grid map;

[0157] The updating module 405 includes:

[0158] A first discriminant submodule, configured to discriminate, by means of the first discriminator, whether the image style of the predicted road grid image is consistent with the image style of the sample road grid image, and obtain a first discriminant result;

[0159] The first updating submodule is used to update the model parameters of the first generator and the first discriminator according to the first discrimination result.

[0160] Optionally, the style transfer model is a cyclic generative adversarial network including a second generator, a third generator, a second discriminator and a third discriminator;

[0161] The generating module 404 is used to generate a predicted road grid map through the second generator according to the sample trajectory grid map;

[0162] The updating module 405 includes:

[0163] A second discriminant submodule, configured to discriminate whether the image style of the predicted road raster image is consistent with the image style of the sample road raster image through the second discriminator, and obtain a first discriminant result;

[0164] A generating submodule, configured to generate a predicted trajectory grid map through the third generator according to the predicted road grid map;

[0165] A third discriminant submodule, configured to discriminate whether the image style of the predicted trajectory raster image is consistent with the image style of the sample trajectory raster image through the third discriminator, and obtain a second discriminant result;

[0166] A second updating submodule, configured to update model parameters of the second generator and the second discriminator according to the predicted trajectory grid map, the sample trajectory grid map, the first discrimination result, and the second discrimination result;

[0167] The third updating submodule is used to update the model parameters of the third generator and the third discriminator according to the predicted trajectory grid map, the sample trajectory grid map and the second discrimination result.

[0168] Optionally, the second updating submodule includes:

[0169] A first calculation submodule, configured to calculate a cycle consistency loss according to the predicted trajectory grid map and the sample trajectory grid map;

[0170] A second calculation submodule, configured to calculate a first adversarial loss according to the first discrimination result, and to calculate a second adversarial loss according to the second discrimination result;

[0171] The fourth updating submodule is used to update the model parameters of the second generator and the second discriminator according to the cycle consistency loss, the first adversarial loss and the second adversarial loss.

[0172] Optionally, the third updating submodule includes:

[0173] A third calculation submodule, configured to calculate a cycle consistency loss according to the predicted trajectory grid map and the sample trajectory grid map;

[0174] A fourth calculation submodule, used to calculate a second adversarial loss according to the second discrimination result;

[0175] The fifth updating submodule is used to update the model parameters of the third generator and the third discriminator according to the cycle consistency loss and the second adversarial loss.

[0176] In addition, it should be noted that the road prediction model training device 400 can be independent of the road network generation device 300, or can be integrated into the road network generation device 300, which is not specifically limited in the present disclosure.

[0177] 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.

[0178] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned road network generation method provided by the present disclosure.

[0179] Figure 5FIG. 5 is a block diagram of an electronic device 500 according to an exemplary embodiment. Figure 5 As shown, the electronic device 500 may include: a processor 501 and a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input / output (I / O) interface 504, and a communication component 505.

[0180] The processor 501 is used to control the overall operation of the electronic device 500 to complete all or part of the steps in the above-mentioned road network generation method. The memory 502 is used to store various types of data to support the operation of the electronic device 500, and these data may include, for example, instructions for any application or method used to operate on the electronic device 500, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 503 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 502 or sent through the communication component 505. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 504 provides an interface between the processor 501 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 505 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0181] In an exemplary embodiment, the electronic device 500 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned road network generation method.

[0182] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned road network generation method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 502 including program instructions, and the above-mentioned program instructions can be executed by the processor 501 of the electronic device 500 to complete the above-mentioned road network generation method.

[0183] Figure 6 6 is a block diagram of an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be provided as a server. Figure 6 The electronic device 600 includes a processor 622, which may be one or more, and a memory 632 for storing a computer program executable by the processor 622. The computer program stored in the memory 632 may include one or more modules each corresponding to a set of instructions. In addition, the processor 622 may be configured to execute the computer program to perform the above-mentioned road network generation method.

[0184] In addition, the electronic device 600 may further include a power supply component 626 and a communication component 650. The power supply component 626 may be configured to perform power management of the electronic device 600, and the communication component 650 may be configured to implement communication of the electronic device 600, for example, wired or wireless communication. In addition, the electronic device 600 may further include an input / output (I / O) interface 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server 2000. TM , Mac OSX TM , Unix TM , Linux TM etc.

[0185] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned road network generation method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 632 including program instructions, and the above-mentioned program instructions can be executed by the processor 622 of the electronic device 600 to complete the above-mentioned road network generation method.

[0186] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned road network generation method when executed by the programmable device.

[0187] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0188] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0189] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A road network generation method, characterized in that: include: Acquire multiple target trajectory data of the target area; According to the multiple target trajectory data, predicting a target road grid map of the target area by a road prediction model, wherein the road prediction model is trained based on multiple sample trajectory data of a first area and sample road network data of a second area, and the target area, the first area, and the second area are different from each other; Performing vectorization processing on the target road raster map to obtain target road network data of the target area; The road prediction model is trained in the following way: Acquire training data, wherein the training data includes a plurality of sample trajectory data of the first area and sample road network data of the second area; Preprocessing the plurality of sample trajectory data to obtain a sample trajectory grid map of the first area; rasterizing the sample road network data to obtain a sample road raster map of the second area; According to the sample trajectory grid map, a predicted road grid map is generated by a style migration model; Based on the predicted road grid map and the sample road grid map, updating model parameters of the style migration model; In response to not meeting the training cutoff condition, re-executing the step of acquiring training data to the step of updating model parameters of the style migration model based on the predicted road grid map and the sample road grid map; In response to satisfying the training cutoff condition, obtaining the road prediction model.

2. The method according to claim 1, characterized in that The step of predicting a target road grid map of the target area by a road prediction model according to the plurality of target trajectory data comprises: Preprocessing the plurality of target trajectory data to obtain a target trajectory grid map of the target area; The target trajectory grid map is input into a road prediction model to obtain a target road grid map of the target area.

3. The method according to claim 2, characterized in that The preprocessing of the plurality of target trajectory data to obtain a target trajectory grid map of the target area includes: For each of the target trajectory data, the target trajectory data is trajectory cleaned; the target trajectory data obtained after trajectory cleaning is rasterized to obtain a trajectory feature map corresponding to the target trajectory data; The trajectory feature maps corresponding to each of the target trajectory data are fused and superimposed to obtain a trajectory feature density map of the target area; A target trajectory grid map of the target area is determined according to the trajectory feature density map.

4. The method according to claim 1, characterized in that The style transfer model is a generative adversarial network including a first generator and a first discriminator; The step of generating a predicted road grid map by using a style migration model according to the sample trajectory grid map includes: According to the sample trajectory grid map, generating a predicted road grid map by the first generator; The updating of model parameters of the style migration model based on the predicted road grid map and the sample road grid map includes: Determining, by the first discriminator, whether the image style of the predicted road raster image is consistent with the image style of the sample road raster image, and obtaining a first discrimination result; According to the first discrimination result, model parameters of the first generator and the first discriminator are updated.

5. The method according to claim 1, characterized in that The style transfer model is a cyclic generative adversarial network including a second generator, a third generator, a second discriminator and a third discriminator; The step of generating a predicted road grid map by using a style migration model according to the sample trajectory grid map includes: According to the sample trajectory grid map, generating a predicted road grid map by the second generator; The updating of model parameters of the style migration model based on the predicted road grid map and the sample road grid map includes: Determining whether the image style of the predicted road raster image is consistent with the image style of the sample road raster image by the second discriminator, and obtaining a first discrimination result; According to the predicted road grid map, generating a predicted trajectory grid map by the third generator; Determining, by the third discriminator, whether the image style of the predicted trajectory raster image is consistent with the image style of the sample trajectory raster image, to obtain a second discrimination result; updating model parameters of the second generator and the second discriminator according to the predicted trajectory grid map, the sample trajectory grid map, the first discrimination result, and the second discrimination result; The model parameters of the third generator and the third discriminator are updated according to the predicted trajectory grid map, the sample trajectory grid map and the second discrimination result.

6. The method according to claim 5, characterized in that The updating of model parameters of the second generator and the second discriminator according to the predicted trajectory grid map, the sample trajectory grid map, the first discrimination result and the second discrimination result includes: Calculating a cycle consistency loss according to the predicted trajectory grid map and the sample trajectory grid map; Calculating a first adversarial loss according to the first discrimination result, and calculating a second adversarial loss according to the second discrimination result; Update model parameters of the second generator and the second discriminator according to the cycle consistency loss, the first adversarial loss, and the second adversarial loss; The updating of model parameters of the third generator and the third discriminator according to the predicted trajectory grid map, the sample trajectory grid map and the second discrimination result includes: Calculating a cycle consistency loss according to the predicted trajectory grid map and the sample trajectory grid map; Calculating a second adversarial loss according to the second discrimination result; According to the cycle consistency loss and the second adversarial loss, model parameters of the third generator and the third discriminator are updated.

7. A road network generation device, characterized in that: include: A first acquisition module is used to acquire multiple target trajectory data of a target area; A prediction module, configured to predict a target road grid map of the target area through a road prediction model according to the multiple target trajectory data acquired by the first acquisition module, wherein the road prediction model is trained based on multiple sample trajectory data of the first area and sample road network data of the second area, and the target area, the first area, and the second area are different from each other; A vectorization processing module, used for performing vectorization processing on the target road grid map predicted by the prediction module to obtain target road network data of the target area; The road prediction model is trained in the following way: Acquire training data, wherein the training data includes a plurality of sample trajectory data of the first area and sample road network data of the second area; Preprocessing the plurality of sample trajectory data to obtain a sample trajectory grid map of the first area; rasterizing the sample road network data to obtain a sample road raster map of the second area; According to the sample trajectory grid map, a predicted road grid map is generated by a style migration model; Based on the predicted road grid map and the sample road grid map, updating model parameters of the style migration model; In response to not meeting the training cutoff condition, re-executing the step of acquiring training data to the step of updating model parameters of the style migration model based on the predicted road grid map and the sample road grid map; In response to satisfying the training cutoff condition, obtaining the road prediction model.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.

9. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Road network data acquisition method, device, equipment and computer storage medium

    CN110852342A

  • Rail traffic connection line design method and device

    CN114077643A