Model training and road network processing method, device, equipment, medium and product
By splitting the sample road network and generating features during the training of the road network segmentation model, the manual parameter setting is reduced, and the newly added road network features are directly calculated and output. This solves the problems of unstable accuracy and low efficiency in map updates in existing technologies, and achieves efficient and accurate road network generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies for updating maps using driving trajectories suffer from unstable accuracy and low efficiency, mainly due to their strong reliance on manual parameter settings and the time-consuming nature of full vector matching calculations.
By acquiring sample road networks and trajectories in the sample area, the network is divided into newly added and existing road networks, generating corresponding features. These features are then used to iteratively train a pre-defined segmentation network model to generate a road network segmentation model. The newly added road network features are then directly calculated and output, reducing the need for manual parameter setting and full vector matching.
It improves the accuracy, stability, and generation efficiency of the road network segmentation model, reduces resource consumption and time consumption, and achieves efficient and accurate generation of new road networks.
Smart Images

Figure CN115773744B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of map data, and particularly relates to a model training and road network processing method and device, equipment, medium and product. BACKGROUND
[0002] With the changes of buildings and roads in the real world, it is necessary to update the electronic map in time to ensure the accuracy of the map. In order to improve the efficiency of map updating, the driving trajectory reported by various devices can be used to update the road in the map.
[0003] At present, the main scheme of updating the road in the map by using the driving trajectory is to extract the corresponding road vector from the driving trajectory, and then perform full-amount matching between the road vector and the existing map vector to obtain the newly added road vector. However, on the one hand, the process of extracting the road vector in this scheme needs to set many parameters manually, so that the extraction of the newly added road is too dependent on manual experience and there is a problem of unstable road extraction accuracy; on the other hand, this scheme needs to perform full-amount calculation of the map vector, so that the process of obtaining the newly added road is time-consuming and low in efficiency. SUMMARY
[0004] In order to solve the technical problems of unstable accuracy and low efficiency of obtaining the newly added road by using the driving trajectory, the present disclosure provides a model training and road network processing method, device, equipment, medium and product.
[0005] In a first aspect, an embodiment of the present disclosure provides a road network segmentation model training method, comprising:
[0006] obtaining a sample road network and a sample trajectory in a sample area, and splitting the sample road network into a sample newly added road network and a sample existing road network;
[0007] mapping the sample existing road network, the sample trajectory and the sample newly added road network into a grid matrix corresponding to the sample area respectively, to generate a sample road network feature, a sample trajectory feature and a sample newly added feature;
[0008] taking the sample road network feature and the sample trajectory feature as training input data, and taking the sample newly added feature as training reference true value, iteratively training a preset segmentation network model, and determining the preset segmentation network model at the end of training as a road network segmentation model.
[0009] In a second aspect, an embodiment of the present disclosure further provides a road network processing method, comprising:
[0010] obtaining a target road network and a target trajectory in a target area;
[0011] map the target road network and the target trajectory into a grid matrix corresponding to the target area respectively to generate a target road network feature and a target trajectory feature;
[0012] based on the target road network feature and the target trajectory feature, generate the new road network in the target area through a road network segmentation model, wherein the road network segmentation model is obtained by pre-training through the road network segmentation model training method described in any embodiment of the present disclosure.
[0013] In a third aspect, the embodiments of the present disclosure further provide a road network segmentation model training device, comprising:
[0014] a sample data acquisition module, configured to acquire a sample road network and a sample trajectory in a sample area, and split the sample road network into a sample new road network and a sample existing road network;
[0015] a sample feature generation module, configured to map the sample existing road network, the sample trajectory and the sample new road network into a grid matrix corresponding to the sample area respectively to generate a sample road network feature, a sample trajectory feature and a sample new feature;
[0016] a model training module, configured to take the sample road network feature and the sample trajectory feature as training input data, take the sample new feature as training reference true value, iteratively train a preset segmentation network model, and determine the preset segmentation network model at the end of training as a road network segmentation model.
[0017] In a fourth aspect, the embodiments of the present disclosure further provide a road network processing device, comprising:
[0018] a data acquisition module, configured to acquire a target road network and a target trajectory in a target area;
[0019] a feature generation module, configured to map the target road network and the target trajectory into a grid matrix corresponding to the target area respectively to generate a target road network feature and a target trajectory feature;
[0020] a new road network generation module, configured to generate the new road network in the target area based on the target road network feature and the target trajectory feature through a road network segmentation model, wherein the road network segmentation model is obtained by pre-training through the road network segmentation model training method described in any embodiment of the present disclosure.
[0021] In a fifth aspect, the embodiments of the present disclosure further provide an electronic device, comprising:
[0022] a memory and a processor, wherein the memory is configured to store instructions executable by the processor;
[0023] The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the road network segmentation model training method or the road network processing method provided in any of the embodiments of the present disclosure.
[0024] In a sixth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, and the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the road network segmentation model training method or the road network processing method provided in any of the embodiments of the present disclosure is implemented.
[0025] In a seventh aspect, the embodiments of the present disclosure further provide a computer program product, and the computer program product is used to execute the road network segmentation model training method or the road network processing method provided in any of the embodiments of the present disclosure.
[0026] The technical solution of the road network segmentation model training provided in the embodiments of the present disclosure has the following advantages over the prior art: 1. The sample road network can be split into a sample new road network and a sample existing road network, and corresponding sample road network features and sample new features are generated, which improves the data volume and diversity of sample data, provides more abundant and complete basic data for model training, and thus improves the model precision of the road network segmentation model obtained through subsequent training. 2. The sample road network features and the sample trajectory features are used as training input data, and the sample new features are used as training reference true values. The pre-set segmentation network model is iteratively trained to generate a road network segmentation model, without the need for manual setting of too many parameters, which reduces the dependence of the model training process on human experience, and thus improves the precision stability of the road network segmentation model. 3. The road network segmentation model obtained through training can directly operate the input road network features and trajectory features to output new features, which replaces the process of full-amount vector matching difference, reduces the resource consumption and time consumption of the subsequent new road network generation process, and thus improves the generation efficiency of the subsequent new road network.
[0027] The technical solution of the road network processing provided in the embodiments of the present disclosure has the following advantages over the prior art: 1. Based on the existing target road network and target trajectory in a target region, the pre-trained road network segmentation model is directly operated to obtain the new road network in the target region, without the need for manual setting of too many parameters, which reduces the dependence of the new road network generation process on human experience and improves the precision stability of the new road network generated by using the driving trajectory. 2. The generation of two input features and the operation of the road network segmentation model reduce the computational complexity, the consumption of operation resources, and the time consumption compared with full-amount vector matching, and thus improve the generation efficiency of the new road network. BRIEF DESCRIPTION OF DRAWINGS
[0028] The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The same or similar components have the same or similar reference labels. It should be understood that the drawings are not necessarily to scale, with emphasis instead being placed upon illustrating the principles of the embodiments of the present disclosure.
[0029] Figure 1 A flowchart of a road network segmentation model training method provided by an embodiment of the present disclosure is shown in FIG. 1.
[0030] Figure 2 A generation diagram of a grid matrix corresponding to a sample area provided by an embodiment of the present disclosure is shown in FIG. 2.
[0031] Figure 3 A flowchart of a road network processing method provided by an embodiment of the present disclosure is shown in FIG. 4. Figure 1 A refinement flowchart of S110 in the road network segmentation model training method shown in FIG. 1 is shown in FIG. 3.
[0032] Figure 4 A diagram of obtaining a sample trajectory provided by an embodiment of the present disclosure is shown in FIG. 5.
[0033] Figure 5 A refinement flowchart of S120 in the road network segmentation model training method shown in FIG. 1 is shown in FIG. 6. Figure 1 A refinement flowchart of S120 in the road network segmentation model training method shown in FIG. 1 is shown in FIG. 6.
[0034] Figure 6 A flowchart of a road network processing method provided by an embodiment of the present disclosure is shown in FIG. 4.
[0035] Figure 7 A structural diagram of a road network segmentation model training device provided by an embodiment of the present disclosure is shown in FIG. 8.
[0036] Figure 8 A structural diagram of a road network processing device provided by an embodiment of the present disclosure is shown in FIG. 9.
[0037] Figure 9 A structural diagram of an electronic device provided by an embodiment of the present disclosure is shown in FIG. 10. DETAILED DESCRIPTION
[0038] Embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings. While several embodiments of the present disclosure have been illustrated and described, it will be appreciated that various changes can be made therein without departing from the spirit and scope of the present disclosure. It is therefore intended that such changes be covered by the disclosed embodiments.
[0039] It should be understood that the various steps recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this regard.
[0040] The term "comprising" and variations thereof as used herein are open-ended, and mean "including but not limited to". The term "based on" means "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related terms shall be construed accordingly.
[0041] It should be noted that the modification of "one" or "a plurality of" mentioned in the present disclosure is illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0042] In the related art, when updating the road network in the electronic map using the driving trajectory, a method such as clustering or kernel density estimation is often used to extract the road centerline from the driving trajectory, and then the road centerline is matched with the existing road network in the electronic map for full-difference to obtain the new road. However, this method not only needs to set a large number of algorithm parameters manually, but also needs a large amount of vector matching processing, so that the accuracy and efficiency of obtaining the new road are both low.
[0043] Based on the above situation, the embodiments of the present disclosure provide a road network segmentation model training method to generate sample data of sample road network features, sample trajectory features and sample new features by using the collected sample road network and sample trajectory in the sample area, and to automatically iteratively train the preset segmentation network model by using the sample data, so as to obtain a road network segmentation model that can output new features by inputting road network and trajectory. Thus, the problem of unstable extraction accuracy of new road network caused by too many manually set parameters in the algorithm can be avoided, the accuracy stability of generating new road network by using driving trajectory can be improved, the process of full-difference vector matching can be saved, the resource consumption and time consumption in the process of generating new road network can be reduced, and the generation efficiency of new road network can be improved.
[0044] Figure 1A flowchart of a road network segmentation model training method provided by an embodiment of the present disclosure is shown. The road network segmentation model training method provided by an embodiment of the present disclosure can be applied to the scenario of training a segmentation network model for generating information corresponding to a new road network by using a driving trajectory. The road network segmentation model training method can be executed by a road network segmentation model training device, which can be implemented by software and / or hardware and can be integrated in an electronic device with computing capability. The electronic device can be, for example, a notebook computer, a desktop computer, a server, or the like.
[0045] As shown in Figure 1 The road network segmentation model training method provided by an embodiment of the present disclosure can include the following steps.
[0046] In S110, a sample road network and a sample trajectory in a sample area are obtained, and the sample road network is split into a sample new road network and a sample existing road network.
[0047] The sample area is an area participating in model training. The sample road network is existing road network information in the sample area used for model training. The road network information can be, for example, a road vector link in an electronic map. The sample road network can include multiple road networks. The sample trajectory is trajectory information in the sample area used for model training, which can be obtained by reporting a target device. The target device can be a positioning device or a controller in a vehicle, or a mobile device used by a delivery person, a courier, a resident, a staff member, and other personnel. The trajectory information can include position information and attribute information of a trajectory point, and the attribute information can include device information, a timestamp, a direction, a speed, and the like. The sample trajectory can be multiple trajectory segments, and a trajectory segment is a sequence of trajectory points of a target device sorted according to a timestamp.
[0048] Specifically, the electronic device can obtain the sample road network and the sample trajectory corresponding to the sample area from a local device or a network end. If the sample trajectory is an original trajectory reported by the target device, the electronic device can directly read or pull the sample trajectory. If the sample trajectory is a result obtained by filtering the original trajectory, the electronic device can directly obtain the sample trajectory if the sample trajectory already exists, or can first obtain the original trajectory and then filter the original trajectory according to a filtering rule to obtain the sample trajectory if only the original trajectory exists.
[0049] To facilitate subsequent construction of a sample true value (which can be referred to as a reference true value) for verifying a model output result (also referred to as a prediction result) in a training process, the electronic device can split the sample road network into two parts of road network, one part as input data for model training, i.e., the sample existing road network, and the other part as a reference true value for the model output result, i.e., the sample new road network.
[0050] In some embodiments, the electronic device extracts road networks from the sample road networks based on preset road network screening rules as sample new road networks, and determines road networks other than the sample new road networks in the sample road networks as sample existing road networks.
[0051] The preset road network screening rules are constructed based on at least one of the number of screened road networks (i.e., the number of road networks), road width, road length, road direction, and road interval number.
[0052] Specifically, the electronic device selects some road networks from the sample road networks as sample new road networks according to the preset road network screening rules, and the remaining road networks in the sample road networks are determined as sample existing road networks. In this way, the comprehensiveness of the sample new road networks can be ensured, thereby ensuring the integrity of the model training and improving the accuracy of the road network segmentation model in identifying new road networks to some extent.
[0053] In other embodiments, the electronic device randomly extracts a number of road networks from the sample road networks as sample new road networks, and determines road networks other than the sample new road networks in the sample road networks as sample existing road networks.
[0054] Specifically, the sample road network splitting method can be random selection, that is, some road networks are randomly selected from the sample road networks as sample new road networks, and the remaining road networks are determined as sample existing road networks. In this way, in the case of a small sample road network, sufficient sample new road networks and sample existing road networks can be obtained through randomness, ensuring that the sample data is sufficient and has a certain diversity, and also improving the accuracy of the road network segmentation model in identifying new road networks to some extent.
[0055] S120, respectively mapping the sample existing road networks, the sample trajectories, and the sample new road networks into the grid matrix corresponding to the sample area to generate sample road network features, sample trajectory features, and sample new features.
[0056] The grid matrix is a grid / pixel array formed according to a preset grid size, which can constitute a grid image. The grid size can be determined comprehensively according to the accuracy requirement of new road extraction, the model learning speed, and the post-computation speed requirement. For example, when the accuracy requirement is high and the speed requirement is low, the grid size can be set to a small value; when the accuracy requirement is relatively low and the computation speed requirement is high, the grid size can be set to a relatively large value, and so on.
[0057] Specifically, in order to simplify the subsequent model application process and weaken the dependence of the calculation process on artificial labor, the input data of the preset segmentation network model to be trained in the embodiment of the present disclosure is set as the image features corresponding to the existing road network (i.e., road network features) and the image features corresponding to the driving trajectory (i.e., trajectory features), and the output data thereof is set as the road network features or road network vectors corresponding to the newly added road network. The above-mentioned preset segmentation network model can be a pre-selected segmentation network model, which can be, for example, an FCN model, an Unet model, an Unet++ model, a SegNet model or a RefineNet model, etc. Therefore, before iterative training of the preset segmentation network model, the input data and verification data required for model training can be obtained by using the collected sample existing road network, sample trajectory and sample newly added road network.
[0058] Firstly, the electronic device can determine the grid matrix corresponding to the sample area according to the business requirements. For example, referring to FIG. 2, the sample area 200 can be divided into a plurality of 512m*512m sub-areas 201, and each sub-area 201 can be divided into 256*256 grid cells according to a 2m*2m grid size. In this way, the grid matrix corresponding to the sample area can be obtained. Figure 2
[0059] Then, the electronic device can map the obtained sample existing road network into the grid matrix corresponding to the sample area to generate the image features of the sample road network, i.e., the sample road network features. For example, the vectorized sample existing road network can be mapped into each grid cell of the grid matrix according to its position information. For a certain grid cell, if there is a road network in the grid cell, the grid cell can be marked as 1, and if there is no road network in the grid cell, the grid cell can be marked as 0. In this way, a binary image corresponding to the sample existing road network of a sample area can be obtained as the sample road network features.
[0060] Similarly, the electronic device can map the sample trajectory into the grid matrix corresponding to the sample area to generate the image features of the sample trajectory, i.e., the sample trajectory features. For example, the trajectory points in the sample trajectory can be projected into the corresponding grid cells according to their position information, and the attribute information of the corresponding trajectory points can be marked in the grid cells to obtain the sample road network features of the sample area.
[0061] Similarly, the electronic device can add the obtained sample new road network mapping to the grid matrix corresponding to the sample area to generate the image feature of the sample road network, i.e., the sample new feature. For example, the vectorized sample new road network can be mapped to each grid cell of the grid matrix according to its position information. For a certain grid cell, if there is a road network in the grid cell, it is marked as 1, indicating that the grid cell belongs to the new road network. If there is no road network in a certain grid cell, it is marked as 0, indicating that the grid cell does not belong to the new road network. In this way, the sample new feature can be generated and used as the reference true value of the corresponding sample road network feature in the subsequent model training process.
[0062] S130, using the sample road network feature and the sample trajectory feature as training input data, and using the sample new feature as the training reference true value, iteratively training the preset segmentation network model, and determining the preset segmentation network model at the end of the training as the road network segmentation model.
[0063] Specifically, the electronic device can input each set of sample road network features and sample trajectory features to the preset segmentation network model according to the original model input form of the preset segmentation network model or a newly designed model input form. The input data is first transmitted to M convolution and pooling modules for encoder encoding in the preset segmentation network model. Then, given the encoding information from the shared encoder, the new road area is predicted. Then, decoder decoding processing is performed, which includes M upsampling blocks, each of which includes an inverse convolution layer and a relu activation layer. The input of the first inverse convolution layer is the feature image output by the last pooling layer (downsampling) of the encoder encoding. After M times of upsampling, a 3*3 convolution kernel is finally applied for convolution and sigmoid activation to generate a prediction result of the new road with the same size as the original feature image. Then, the prediction result is used to calculate the loss function and error backpropagation with the sample new feature corresponding to the input sample road network feature, to modify the model parameters and perform model iterative training until the model training end condition is met (such as the error meets the preset threshold or the training times reaches the preset number, etc.). The model parameters of the preset segmentation network model determined in this case are determined as the final model parameters, and the road network segmentation model can be obtained.
[0064] The embodiment of the present disclosure provides a road network segmentation model training method. The sample road network and the sample trajectory in the sample area are obtained, the sample road network is split into a sample new road network and a sample existing road network, and the sample existing road network, the sample trajectory and the sample new road network are respectively mapped into a grid matrix corresponding to the sample area to generate sample road network features, sample trajectory features and sample new features. The data volume and diversity of the sample data are improved, more abundant and complete basic data are provided for model training, and therefore the model precision of the road network segmentation model obtained through subsequent training is improved. The sample road network features and the sample trajectory features are taken as training input data, the sample new features are taken as training reference true values, and a preset segmentation network model is iteratively trained to obtain a road network segmentation model. The process of manually setting too many parameters can be avoided, the dependence of the model training process on human experience is reduced, the precision stability of the road network segmentation model obtained through training is improved, the process of full-amount vector matching difference is omitted, the resource consumption and time consumption of the subsequent new road network generation process are reduced, and therefore the generation efficiency of the subsequent new road network is improved. In some embodiments, on the basis that the road network segmentation model obtained through training has good robustness to part of trajectory point positioning noise phenomena, the collected sample trajectory can be further denoised to further reduce the influence of trajectory point positioning noise on the model training precision, thereby better improving the model training effect and further improving the generation precision of the subsequent new road. Figure 1 The S110 is refined as shown. The refinement scheme can be applicable to the case of extracting a new road network in a certain area by using a driving trajectory, and is particularly applicable to the case of mining and generating a new road network in the internal road network of an area such as a residential community, an industrial park, a shopping park, etc., which has many buildings and a complex road network (short, dense, parallel, and winding pedestrian roads). As shown in Figure 3 The "obtaining sample trajectories in a sample area" of S110 includes:
[0065] S311, obtaining an original trajectory corresponding to the sample area.
[0066] The original trajectory is the initial trajectory information reported by the target device. The original trajectory can also be one or more trajectory segments. Each trajectory segment can include multiple trajectory points.
[0067] Specifically, the electronic device can collect the original trajectory covered by the sample area from the target device, or obtain the original trajectory from the local or network side.
[0068] S312, extracting trajectory points falling within the area range of the sample area from the original trajectory to generate a candidate trajectory.
[0069] The candidate trajectory is the trajectory information obtained after the original trajectory is preliminarily filtered.
[0070] Specifically, the electronic device can perform initial filtering on the original trajectory according to the region range of the sample region, filter out redundant trajectory points outside the sample region, and generate a candidate trajectory, so as to reduce the amount of calculation and improve the calculation speed. For example, the electronic device can construct a spatial index of the region range of the sample region, and use the spatial index and the initial trajectory to determine a spatial inclusion relationship. The trajectory points in the original trajectory that have the spatial inclusion relationship with the region range are retained, and the remaining trajectory points are discarded, thereby obtaining the candidate trajectory.
[0071] In some embodiments, S312 includes: performing a contraction processing on the region range based on a preset distance threshold, determining a contraction range corresponding to the sample region; and if at least a continuous preset number of trajectory points in the original trajectory are within the contraction range, extracting the trajectory points within the region range from the original trajectory, and generating a candidate trajectory.
[0072] The preset distance threshold is a preset distance value, which can be determined according to the positioning accuracy of the trajectory points. For example, the positioning accuracy of the positioning device in the target device is about 10 m, and the preset distance threshold can be set to 10 m. The preset number is a preset point number of the trajectory points, which can be determined according to at least one of the positioning accuracy, the number of trajectory points of the drift trajectory, and the number of trajectory points of the effective trajectory. For example, if the positioning accuracy is low, the number of trajectory points of the drift trajectory is large, or the number of trajectory points of the effective trajectory is large, the preset number can be set to a large value; and if the positioning accuracy is high, the number of trajectory points of the drift trajectory is small, or the number of trajectory points of the effective trajectory is small, the preset number can be set to a small value.
[0073] Specifically, considering that the positioning accuracy of the target device is limited, there will be some positioning deviations in the trajectory points in the original trajectory, which will cause inaccurate trajectory point filtering using the region range of the sample region. For example, referring to FIG. 4, the original trajectory 400 is shown, which includes a main trajectory segment 410 and a drift trajectory segment 411. The main trajectory segment 410 is within the sample region 420, and the drift trajectory segment 411 is outside the sample region 420. Figure 4 Because of the positioning accuracy problem, there is a small drift trajectory segment 411 in the original trajectory 400, which is offset from the main trajectory segment 410. The drift trajectory segment 411 is offset to the sample region 420, but the corresponding main trajectory segment part is not in the sample region 420. If the trajectory point filtering is directly performed using the region range of the sample region 420, the drift trajectory segment 411 will be retained.
[0074] To solve the problem of trajectory point noise caused by inaccurate trajectory point filtering, the region range of the sample region 420 is first contracted by a preset distance threshold 430 in this embodiment, to obtain a contracted region range, i.e., a contracted range 440. Then, the spatial inclusion relationship between the original trajectory and the spatial index of the contracted range 440 is determined. If a certain complete trajectory segment 410 in the original trajectory does not have a spatial inclusion relationship with the contracted range 440, the complete trajectory segment 410 is removed. If another complete trajectory segment 450 (the trajectory point is represented by a triangular solid point in the figure) in the original trajectory segment has a spatial inclusion relationship with the contracted range 440, the other complete trajectory segment 450 is temporarily retained.
[0075] Then, to ensure trajectory validity and improve the effectiveness of subsequent calculations, trajectory segments with only a few trajectory points can also be filtered out. The electronic device further determines whether a continuous preset number of trajectory points in the retained other complete trajectory segment 450 fall within the contracted range 440. If the number of continuous trajectory points in the other complete trajectory segment 450 contained in the contracted range 440 is less than the preset number, it indicates that the other complete trajectory segment 450 is an invalid trajectory segment that does not need to participate in subsequent calculations, and the other complete trajectory segment 450 is filtered out. If the number of continuous trajectory points in the other complete trajectory segment 450 contained in the contracted range 440 is greater than or equal to the preset number, it indicates that the other complete trajectory segment 450 contains a valid trajectory segment. At this time, the electronic device can extract trajectory points contained in the region range of the sample region 420 from the other complete trajectory segment 450 as candidate trajectories. For example, Figure 4 The trajectory segment in the other complete trajectory segment 450 that falls within the thick dashed box in the region range of the sample region 420 is a candidate trajectory.
[0076] S313, performing denoising processing on the candidate trajectory based on a preset trajectory attribute threshold to generate a sample trajectory.
[0077] The preset trajectory attribute threshold is a preset critical value of a trajectory-related attribute. In this embodiment, the preset trajectory attribute threshold includes at least one of a time interval threshold, an orientation deviation threshold, a speed deviation threshold, and a concentration threshold. The time interval threshold is a critical value of the difference between the time stamps of two adjacent trajectory points. The orientation deviation threshold is a critical value of the difference between the orientations of two adjacent trajectory points. The speed deviation threshold refers to a critical value of the difference between the speeds of two adjacent trajectory points. The concentration threshold refers to a critical value of the concentration of multiple trajectory points. In this embodiment, the time interval threshold, the orientation deviation threshold, the speed deviation threshold, and the concentration threshold can be determined according to the basic attribute characteristics of the trajectory that can be obtained by the positioning device of the target device. For example, for trajectories generated by vehicles, mobile terminals of cyclists, and mobile terminals of ordinary people riding or walking, the preset trajectory attribute threshold can be as shown in Table 1.
[0078] Table 1: Examples of values of preset trajectory attribute thresholds
[0079]
[0080] Specifically, there can be some local noise trajectory points in the candidate trajectory obtained through the above processing. For example, the trajectory points that are gathered more densely cannot efficiently extract road vectors; for another example, when adjacent trajectory points are highly similar, they are likely to not increase effective trajectory features, but only increase data processing amount, etc. Therefore, the electronic device can calculate at least one index among the time interval threshold, the direction deviation threshold, the speed deviation threshold, and the gathering degree threshold in the preset trajectory attribute threshold, calculate the corresponding index in the candidate trajectory, and compare the calculation result with the preset trajectory attribute threshold corresponding to the corresponding target device. If the calculation result is less than the corresponding preset trajectory attribute threshold, the trajectory point corresponding to the calculation result is removed; if the calculation result is greater than or equal to the corresponding preset trajectory attribute threshold, the trajectory point corresponding to the calculation result is retained.
[0081] For example, when the candidate trajectory is filtered from the original trajectory reported by the vehicle positioning device with a collection frequency of 5s, at least one of the median of the time interval (and / or the average of the time interval), the median of the direction deviation (and / or the average of the direction deviation), and the median of the speed deviation (and / or the average of the speed deviation) between two adjacent trajectory points can be calculated according to the indexes in Table 1, and the calculated index values are compared with the corresponding thresholds in Table 1. If the median of the time interval < 6s (and / or the average of the time interval < 8s), the median of the direction deviation < 5 degrees (and / or the average of the direction deviation < 20 degrees), and the median of the speed deviation < 20 km / h (and / or the average of the speed deviation < 20 km / h), the two adjacent trajectory points are removed; otherwise, the two adjacent trajectory points are retained.
[0082] In addition, the ratio of the length of the circumscribed rectangle of the trajectory segment composed of a plurality of trajectory points to the length of the trajectory segment and the length of the circumscribed rectangle of the trajectory segment can also be calculated according to the indexes in Table 1, and the calculated index values are compared with the corresponding thresholds in Table 1. If the ratio of the length of the circumscribed rectangle of the trajectory segment to the length of the trajectory segment < 0.2 and the length of the circumscribed rectangle of the trajectory segment < 50m, the trajectory points participating in the calculation are removed; otherwise, the trajectory points participating in the calculation are retained. For example, for the candidate trajectory in Figure 4 After the above denoising processing is performed on the candidate trajectory in Table 1, a part of the trajectory points that are gathered more densely can be filtered out to obtain the sample trajectory 460 shown in bold.
[0083] After the above processing, the trajectory points remaining in the candidate trajectory constitute the sample trajectory. In this way, the quality of the trajectory points in the sample trajectory can be further improved, the influence of trajectory point noise on model training can be reduced as much as possible, and the accuracy of the road network segmentation model obtained by training can be improved to a greater extent.
[0084] In some embodiments, in order to improve the accuracy of extracting the road network from the trajectory points, for example, to improve the accuracy of road network extraction in an area with fewer trajectory points, the type of features can be increased in the process of generating sample trajectory features to increase the information content of the sample trajectory features. That is, the trajectory attributes of the sample trajectory can be used to generate the sample trajectory features, and the trajectory attributes of the sample trajectory include the trajectory point attributes of the trajectory points in the sample trajectory. Figure 1 S120 is shown in detail. As shown in Figure 5 As shown, S120 includes “mapping the sample trajectory into the grid matrix corresponding to the sample region to generate sample trajectory features”.
[0085] S521, for each grid cell in the grid matrix, determining a cell trajectory feature of the sample trajectory in the grid cell based on the trajectory attribute information of the sample trajectory.
[0086] The trajectory attribute information refers to the attribute information of the trajectory points. The cell trajectory feature refers to a value marked in a grid cell, which is used to describe the information of the trajectory points involved in the grid cell. In this embodiment, the cell trajectory feature includes point features, line features, speed features, direction features, and transition features. The point feature represents the number of trajectory points in the grid cell where the sample trajectory falls, which is a 1-dimensional feature vector. The line feature represents the number of trajectory segments in the grid cell where the sample trajectory falls, which is a 1-dimensional feature vector. The speed feature represents the moving speed of each trajectory point in the grid cell where the sample trajectory falls, which is a 1-dimensional feature vector, for example, the average moving speed of the trajectory points contained in a certain grid cell can be calculated. The direction feature represents the number of trajectory segments in the eight directions of the grid cell where the sample trajectory falls, which is an 8-dimensional feature vector, for example, the number of trajectory segments in the eight directions of dynamic, south, west, north, northeast, northwest, southeast, and southwest of a certain grid cell can be calculated. The transition feature represents the information of trajectory transition of the sample trajectory in the neighborhood matrix of the grid cell, which is used to describe the context information of the trajectory points in the grid cell, that is, the trajectory point before a certain trajectory point comes from which direction and the trajectory point after it goes to which direction, which is a multi-dimensional feature vector. For example, for each grid cell C, an 8*8 neighborhood matrix is constructed, and for the trajectory adjacent grid cell C' of the grid cell C, if there is a trajectory transition between the two grid cells, then C' C = 1, otherwise C' C = 0.
[0087] Specifically, in constructing the sample trajectory feature of the sample trajectory, the electronic device can first project each trajectory point in the sample trajectory into the corresponding grid cell in the grid matrix of the sample area according to the position information of the trajectory point. Then, the grid matrix is traversed, and for each traversed grid cell, the corresponding information in the traversed grid cell is counted according to the definition and calculation method example of the point feature, the line feature, the speed feature, the direction feature and the transition feature, so as to obtain the cell trajectory feature of the traversed grid cell.
[0088] S522, the sample trajectory feature is constructed by the cell trajectory feature of each grid cell.
[0089] Specifically, the electronic device can construct the sample trajectory feature corresponding to the sample trajectory from the cell trajectory feature of each grid cell. For example, for Figure 2 and the example of calculating the transition feature, when the cell trajectory feature only contains the point feature, the line feature or the speed feature, the sample trajectory feature is a 1*256*256 feature image; when the cell trajectory feature contains the direction feature, the sample trajectory feature is an 8*256*256 feature image; when the cell trajectory feature contains the transition feature, the transition feature considers the 8*8 neighborhood matrix inflow and outflow feature, and the sample trajectory feature is a 128*256*256 feature image. Then, when the cell trajectory feature contains the point feature, the line feature, the speed feature, the direction feature and the transition feature, the sample trajectory feature is a 139*256*256 feature image.
[0090] In order to improve the model calculation speed, when the sample trajectory feature is a high-dimensional feature image, it can be processed by dimension reduction. For example, the transition feature can be embedded into a lower-dimensional feature vector, for example, it can be embedded into 8 dimensions, and then when the cell trajectory feature contains the point feature, the line feature, the speed feature, the direction feature and the transition feature, the sample trajectory feature is a 19*256*256 feature image.
[0091] After the above trajectory feature extraction processing, the sample trajectory feature can contain multiple feature types, so as to better retain the feature information of the sample trajectory. For example, by extracting the point feature and the line feature of the sample trajectory, when the trajectory points are sparse, the line feature can well assist in inferring the road, thereby reducing the density distribution requirement of the trajectory points for the road network processing method in the present disclosure, and improving the universality and road network extraction accuracy of the method. For another example, the transition feature constructed by using the trajectory point transition information can effectively retain the context information of the trajectory, thereby improving the recognition accuracy of the road network segmentation model for the road network.
[0092] Figure 6A flowchart of a road network processing method provided by an embodiment of the present disclosure is shown. The road network processing method provided by the embodiment of the present disclosure can be applied to a scenario of updating a road network in an electronic map by using a driving trajectory, for example, can be applied to a scenario of generating a newly added road network in an internal road network of a certain region by using a driving trajectory. The electronic map can be a high-definition map with high map accuracy, or a general electronic map / navigational map with relatively low map accuracy. The road network processing method can be executed by a road network processing device, which can be implemented by software and / or hardware, and can be integrated in an electronic device with computing capability. The electronic device can be a mobile terminal such as a notebook computer with certain computing capability, or a fixed terminal such as a vehicle-mounted device, a desktop computer, or a server.
[0093] It should be noted that the electronic device for executing the road network processing method and the electronic device for executing the road network segmentation model training can be the same device or different devices. In addition, the explanations of the terms / steps involved in the present embodiment, which are the same as or corresponding to those in the above embodiments, will not be repeated here. As shown in the following, Figure 6 The road network processing method provided by the embodiment of the present disclosure can include the following steps.
[0094] S610, obtaining a target road network and a target trajectory in a target region.
[0095] The target region is a region to be updated for road network. The target road network is the existing road network information in the target region. The target road network can include one or more road networks. The target trajectory is the trajectory information in the target region reported by a target device.
[0096] Specifically, the electronic device can obtain the target road network and the target trajectory corresponding to the target region from the local or the network side. If the target trajectory is the original trajectory reported by the target device, the electronic device can directly read or pull the target trajectory. If the target trajectory is the result of filtering the original trajectory, the electronic device can directly obtain the target trajectory if the target trajectory already exists; or the electronic device can first obtain the original trajectory, and then filter it according to the filtering rule to obtain the target trajectory if only the original trajectory exists.
[0097] S620, respectively mapping the target road network and the target trajectory into a grid matrix corresponding to the target region to generate target road network features and target trajectory features.
[0098] Specifically, to correctly run the road network segmentation model trained in the above embodiments subsequently, the electronic device can generate a grid matrix of the target region according to the generation manner and grid size of the grid matrix of the sample region. Then, the target road network and the target trajectory are respectively mapped into the grid matrix corresponding to the target region according to the generation manner of the sample road network features and the sample trajectory features, to generate corresponding target road network features and target trajectory features.
[0099] S630, based on the target road network features and the target trajectory features, generating the new road network in the target region by the road network segmentation model.
[0100] Specifically, the electronic device can input the target road network features and the target trajectory features into the road network segmentation model according to the model input form of the road network segmentation model, and can output the model result after model operation. Then, the electronic device can obtain the new road network from the model result according to the form of the model result and the required form of the new road network. For example, when the form of the model result and the required form of the new road network are consistent, and the accuracy of the model result is sufficient, the model result can be directly determined as the new road network; and when the form of the model result and the required form of the new road network are inconsistent, the model result can be processed according to the required form of the new road network, such as a shrinking and refining vectorization processing or an expanding and extending rasterization processing, to obtain the new road network.
[0101] After the above processing, the electronic device can convert the related art vector extraction and full-quantity vector matching difference processing into image processing inside the road network segmentation model, which can reduce the calculation complexity and the consumption of computing resources to some extent, thereby improving the generation efficiency of the new road.
[0102] In some embodiments, when the model result is in the form of a raster image and the new road network is in the form of a vector, S130 includes: inputting the target road network features and the target trajectory features into the road network segmentation model to output an initial image result; and performing road network extraction based on the initial image result to generate a vectorized new road network.
[0103] The initial image result is a model output result in the form of a raster image. The value of each grid cell in the initial image result is used to represent whether the grid cell belongs to the new road. For example, the value of a certain grid cell in the initial image result is marked as 1, indicating that the grid cell belongs to the new road; if marked as 0, it indicates that the grid cell does not belong to the new road.
[0104] Specifically, the electronic device can perform a certain splicing processing on the target road network features and the target trajectory features, and then input the spliced features into the road network segmentation model. After the operation and processing of the model, an initial image result can be output. Then, the electronic device can perform a vectorization processing on the initial image result to extract a vectorized new road network therefrom.
[0105] Exemplarily, the road network extraction based on the initial image result and the generation of the vectorized new road network include: skeleton extraction on the initial image result to generate a refined image result; road node extraction on the refined image result, and road construction based on the extracted road nodes to generate the new road network.
[0106] Specifically, in the process of vectorization, the electronic device can first perform skeleton extraction on the binarized initial image result to obtain a refined grid cell level image result (which can be referred to as a binary skeleton line image). Then, the electronic device can perform road node extraction on the binary skeleton line image: traverse the binary skeleton line image, and for each traversed grid cell, determine whether the new road marks in the adjacent 8-orientation grid cells of the grid cell appear in different directions; if yes, it means that the grid cell belongs to a road node; if not, it means that the grid cell does not belong to a road node. For example, referring to Table 2, there are only left and right opposite direction new road marks in the adjacent 8-orientation grid cells of the center grid cell, which means that there is no different road direction at the center grid cell, and the center grid cell does not belong to a road node; referring to Table 3, there are left and upper direction new road marks in the adjacent 8-orientation grid cells of the center grid cell, which means that there is a different road direction at the center grid cell, and the center grid cell belongs to a road node.
[0107]
[0108] Finally, the electronic device performs road construction along the road nodes for vectorization. For example, the electronic device takes any road node as a starting point, searches along its adjacent 8-orientation grid cells, when a non-road node and a grid cell with new road marks are searched, connects the grid cell with the road node, and continues searching; when a road node is searched, connects the searched road node with the road node, and takes the searched road node as a new starting point, repeats the above process, until all grid cells with new road marks are connected, and the result is the vectorized new road network corresponding to the target region.
[0109] In some other embodiments, when the model result and the new road network are both in the form of a grid image, the electronic device can directly determine the initial image result as the new road network; or the electronic device can first perform denoising and other post-processing on the initial image result, and then take the processing result as the new road network.
[0110] In some embodiments, the model result and the new road network are both in vectorized form, and the electronic device directly takes the model result as the new road network, or performs post-processing such as denoising on the model result, and then takes the processed result as the new road network. In this case, the road network segmentation model can be a multi-task learning model, which can first generate an initial image result, and then refine the initial image result into a vectorized result.
[0111] The method provided by the embodiments of the present disclosure comprises: obtaining a target road network and a target trajectory in a target area; mapping the target road network and the target trajectory into a grid matrix corresponding to the target area respectively to generate a target road network feature and a target trajectory feature; and generating a new road network in the target area based on the target road network feature and the target trajectory feature by using a road network segmentation model obtained by pre-training a preset segmentation network model. In this way, the function of generating a new road network can be realized by using the road network segmentation model, and the processes of extracting a road center line and full-matching difference in related technologies are shielded, so that the dependence of the process of generating a new road network on manual setting of parameters can be weakened, the generation accuracy and stability of the new road network can be improved, the calculation amount in the process can be reduced, and the generation efficiency of the new road network can be improved.
[0112] Figure 7 A structural schematic diagram of a road network segmentation model training device provided by the embodiments of the present disclosure is provided. The device can be implemented by software and / or hardware, and can be integrated in any electronic device with certain computing capability. As shown in Figure 7 The road network segmentation model training device 700 provided by the embodiments of the present disclosure can comprise:
[0113] A sample data acquisition module 710 is configured to acquire a sample road network and a sample trajectory in a sample area, and split the sample road network into a sample new road network and a sample existing road network.
[0114] A sample feature generation module 720 is configured to map the sample existing road network, the sample trajectory and the sample new road network into a grid matrix corresponding to the sample area respectively to generate a sample road network feature, a sample trajectory feature and a sample new feature.
[0115] A model training module 730 is configured to perform iterative training on a preset segmentation network model by taking the sample road network feature and the sample trajectory feature as training input data and taking the sample new feature as training reference true value, and determine the preset segmentation network model at the end of the training as a road network segmentation model.
[0116] In some embodiments, the sample data acquisition module 710 comprises:
[0117] A first original trajectory acquisition sub-module is configured to acquire an original trajectory corresponding to the sample area; wherein the original trajectory comprises a plurality of trajectory points.
[0118] The first candidate trajectory generation submodule is configured to extract trajectory points in the region range from the original trajectory, and generate a candidate trajectory.
[0119] The sample trajectory generation submodule is configured to perform denoising processing on the candidate trajectory based on a preset trajectory attribute threshold to generate a sample trajectory. The preset trajectory attribute threshold includes at least one of a time interval threshold, an azimuth deviation threshold, a speed deviation threshold, and a concentration threshold.
[0120] Further, the first candidate trajectory generation submodule is specifically configured to:
[0121] perform contraction processing on the region range based on a preset distance threshold to determine a contraction range corresponding to the sample region;
[0122] If at least a continuous preset number of trajectory points in the original trajectory are within the contraction range, the trajectory points in the region range are extracted from the original trajectory to generate a candidate trajectory.
[0123] In some embodiments, the sample feature generation module 720 is specifically configured to:
[0124] For each grid cell in the grid matrix, based on the trajectory attribute information of the sample trajectory, a cell trajectory feature of the sample trajectory in the grid cell is determined. The cell trajectory feature includes a point feature, a line feature, a speed feature, a direction feature, and a transition feature. The point feature represents the number of trajectory points of the sample trajectory falling in the grid cell. The line feature represents the number of trajectory segments of the sample trajectory falling in the grid cell. The speed feature represents the moving speed of each trajectory point of the sample trajectory falling in the grid cell. The direction feature represents the number of trajectory segments of the sample trajectory falling in eight directions of the grid cell. The transition feature represents information of trajectory transition of the sample trajectory in the neighborhood matrix of the grid cell.
[0125] The sample trajectory feature is composed of the cell trajectory features of each grid cell.
[0126] In some embodiments, the sample data acquisition module 710 is specifically configured to:
[0127] Based on a preset road network screening rule, a road network is extracted from the sample road network as a sample new road network, and a road network other than the sample new road network in the sample road network is determined as a sample existing road network. The preset road network screening rule is constructed based on at least one of the number of road networks, the road width, the road length, the road direction, and the number of road intervals.
[0128] Alternatively, a number of road networks are randomly extracted from the sample road network as sample new road networks, and a road network other than the sample new road network in the sample road network is determined as a sample existing road network.
[0129] The road network segmentation model training apparatus provided by the embodiments of the present disclosure can execute the road network segmentation model training method provided by any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of the execution method. The contents not described in detail in the device embodiments of the present disclosure can refer to the description in any of the method embodiments of the present disclosure.
[0130] Figure 8 A structural schematic diagram of a road network processing apparatus provided by an embodiment of the present disclosure is shown in FIG. 8. The apparatus can be implemented by software and / or hardware, and can be integrated in any electronic device with certain computing capability. As shown in FIG. 8, the road network processing apparatus 800 provided by the embodiments of the present disclosure can include: Figure 8
[0131] A target data acquisition module 810, configured to acquire a target road network and a target trajectory in a target area;
[0132] A target feature generation module 820, configured to respectively map the target road network and the target trajectory into a grid matrix corresponding to the target area, to generate a target road network feature and a target trajectory feature;
[0133] An added road network generation module 830, configured to generate an added road network in the target area based on the target road network feature and the target trajectory feature, through a road network segmentation model; wherein the road network segmentation model is obtained by pre-training a preset segmentation network model.
[0134] In some embodiments, the target data acquisition module 810 includes:
[0135] A second original trajectory acquisition submodule, configured to acquire an original trajectory corresponding to the target area; wherein the original trajectory contains a plurality of trajectory points;
[0136] A second candidate trajectory generation submodule, configured to extract trajectory points within a region range of the target area from the original trajectory, to generate a candidate trajectory;
[0137] A target trajectory generation submodule, configured to perform denoising processing on the candidate trajectory based on a preset trajectory attribute threshold, to generate the target trajectory; wherein the preset trajectory attribute threshold includes at least one of a time interval threshold, an orientation deviation threshold, a speed deviation threshold, and a concentration threshold.
[0138] Further, the candidate trajectory generation submodule is specifically configured to:
[0139] Perform contraction processing on the region range based on a preset distance threshold, to determine a contraction range corresponding to the target area;
[0140] If at least a continuous preset number of trajectory points in the original trajectory are within the contraction range, extract the trajectory points within the region range from the original trajectory, to generate the candidate trajectory.
[0141] In some embodiments, the target feature generation module 820 is specifically used for:
[0142] For each grid cell in the grid matrix, based on the trajectory attribute information of the target trajectory, the cell trajectory features of the target trajectory within the grid cell are determined. These cell trajectory features include point features, line features, velocity features, direction features, and transfer features. Point features represent the number of trajectory points within the grid cell; line features represent the number of trajectory segments within the grid cell; velocity features represent the movement speed of each trajectory point within the grid cell; direction features represent the number of trajectory segments in the eight directions of the grid cell; and transfer features represent information about trajectory transfers within the neighborhood matrix of the grid cell.
[0143] The target trajectory features are composed of the unit trajectory features of each grid cell.
[0144] In some embodiments, the additional road network generation module 830 includes:
[0145] The initial image result output submodule is used to input the target road network features and target trajectory features into the road network segmentation model and output the initial image result; wherein, the value of each grid cell in the initial image result is used to characterize whether the grid cell belongs to the newly added road;
[0146] A new road network generation submodule has been added, which is used to extract the road network based on the initial image results and generate a vectorized new road network.
[0147] Furthermore, the newly added road network generation submodule is specifically used for:
[0148] Skeleton extraction is performed on the initial image result to generate a refined image result;
[0149] Road nodes are extracted from the refined image results, and roads are constructed based on the extracted road nodes to generate a new road network.
[0150] The road network processing apparatus provided in this disclosure can execute the road network processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method. Content not described in detail in the apparatus embodiments of this disclosure can be referred to the description in any method embodiment of this disclosure.
[0151] This disclosure also provides an electronic device that may include a processor and a memory, the memory being used to store executable instructions. The processor may be used to read the executable instructions from the memory and execute the executable instructions to implement the road network segmentation model training method or road network processing method in any of the above embodiments of this disclosure.
[0152] Figure 9 A structural schematic diagram of an electronic device is provided for the embodiments of the present disclosure, which is used to exemplarily illustrate the electronic device for implementing the road network segmentation model training method or the road network processing method in any embodiment of the present disclosure, and should not be understood as a specific limitation of the embodiments of the present disclosure. That is, although Figure 9 The electronic device 900 is shown with various devices / components, but it should be understood that not all of the shown devices / components are required, and more or fewer devices / components can alternatively be implemented.
[0153] As shown in Figure 9 The electronic device 900 can include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 901 that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 902 or loaded into a random access memory (RAM) 903 from a storage device 908. Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0154] Optionally, the following devices can be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a laser radar, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 can allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data.
[0155] In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer readable medium, the computer program containing program codes for executing the road network segmentation model training method or the road network processing method provided by any embodiment of the present disclosure. In such embodiments, the computer program can be downloaded and installed from a network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When the computer program is executed by the processor 901, the functions defined in the road network segmentation model training method or the road network processing method provided by any embodiment of the present disclosure can be performed.
[0156] It should be noted that the computer readable medium in the above disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present embodiment, the computer readable signal medium can include a data signal propagating in a baseband or as a carrier wave in a carrier, which carries computer readable program code. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or apparatus. The program code contained in the computer readable medium can be transmitted by any suitable medium, including but not limited to a wire, a cable, an RF (radio frequency) or the like, or any suitable combination thereof.
[0157] In some embodiments, the client, server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication (e.g., communication networks) of any form or medium, such as the Internet. Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
[0158] The computer readable medium described above can be included in the electronic device; or can exist separately without being assembled into the electronic device.
[0159] The computer readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the road network segmentation model training method or the road network processing method provided by any embodiment of the present disclosure.
[0160] Computer program code for carrying out operations of the present disclosure can be written in any one or more of a variety of programming languages or combinations of languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on a computer, partly on the computer, as a stand-alone software package, partly on the computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0161] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0162] The units described in the embodiments of the present disclosure can be implemented by hardware, software, or a combination of hardware and software. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0163] The functions described in this specification can be implemented in part or in whole through one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0164] In the context of the present disclosure, a computer-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium would include a tangible, non-transitory memory such as a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0165] The above description is only the preferred embodiment of the present disclosure and the explanation of the applied technical principles. It should be understood by those skilled in the art that the disclosure range involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) having similar functions.
[0166] In addition, although each operation is described in a particular order, this should not be understood as requiring the operations to be performed in the specific order shown or in a sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be separated and implemented in multiple embodiments.
[0167] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A method for training a road network segmentation model, characterized in that, include: Obtain the sample road network and sample trajectory in the sample area, and split the sample road network into newly added sample road network and existing sample road network; The existing road network of the sample, the sample trajectory, and the newly added road network of the sample are respectively mapped to the grid matrix corresponding to the sample region to generate sample road network features, sample trajectory features, and newly added sample features; Using the sample road network features and the sample trajectory features as training input data, and the newly added features of the samples as training reference ground values, the preset segmentation network model is iteratively trained, and the preset segmentation network model at the end of training is determined as the road network segmentation model.
2. The method according to claim 1, wherein, Obtaining the sample trajectory in the sample region includes: Obtain the original trajectory corresponding to the sample region; wherein, the original trajectory contains multiple trajectory points; From the original trajectory, extract the trajectory points that fall within the region of the sample area to generate candidate trajectories; The candidate trajectory is denoised based on a preset trajectory attribute threshold to generate the sample trajectory; wherein the preset trajectory attribute threshold includes at least one of a time interval threshold, an orientation deviation threshold, a velocity deviation threshold, and a clustering threshold.
3. The method according to claim 2, wherein, The step of extracting trajectory points falling within the sample area from the original trajectory to generate candidate trajectories includes: Based on a preset distance threshold, the region is shrunk to determine the shrinkage range corresponding to the sample region; If at least a predetermined number of trajectory points in the original trajectory are within the contraction range, then the trajectory points within the region range are extracted from the original trajectory to generate the candidate trajectory.
4. The method according to claim 1, wherein, Mapping the sample trajectory to the grid matrix corresponding to the sample region to generate the sample trajectory features includes: For each grid cell in the grid matrix, based on the trajectory attribute information of the sample trajectory, the cell trajectory features of the sample trajectory in the grid cell are determined; wherein, the cell trajectory features include point features, line features, velocity features, direction features, and transfer features; the point features represent the number of trajectory points of the sample trajectory falling in the grid cell; the line features represent the number of trajectory segments of the sample trajectory falling in the grid cell; the velocity features represent the moving speed of each trajectory point of the sample trajectory falling in the grid cell; the direction features represent the number of trajectory segments of the sample trajectory falling in the eight directions of the grid cell; the transfer features represent the information on trajectory transfers of the sample trajectory in the neighborhood matrix of the grid cell; The sample trajectory features are constituted by the trajectory features of each of the grid cells.
5. The method according to claim 1, wherein, The step of splitting the sample road network into a newly added sample road network and an existing sample road network includes: Road networks are extracted from the sample road network based on preset road network filtering rules, and are used as newly added road networks in the sample. Road networks other than the newly added road networks in the sample road network are identified as existing road networks in the sample. The preset road network filtering rules are constructed based on at least one of the following: number of road networks, road width, road length, road direction, and number of road intervals. Alternatively, the number of road networks randomly extracted from the sample road network can be used as the newly added road network in the sample, and the road networks in the sample other than the newly added road network can be identified as the existing road network in the sample.
6. A road network processing method, characterized in that, include: Obtain the target road network and target trajectory within the target area; The target road network and the target trajectory are respectively mapped to the grid matrix corresponding to the target region to generate target road network features and target trajectory features; Based on the target road network features and the target trajectory features, a new road network in the target area is generated through a road network segmentation model; wherein the road network segmentation model is pre-trained using the road network segmentation model training method as described in any one of claims 1 to 5.
7. The method according to claim 6, wherein, The step of generating a new road network in the target area based on the target road network features and the target trajectory features, using a road network segmentation model, includes: The target road network features and the target trajectory features are input into the road network segmentation model, and an initial image result is output; wherein, the value of each grid cell in the initial image result is used to characterize whether the grid cell belongs to a newly added road; Based on the initial image results, road network extraction is performed to generate the newly added road network in a vectorized form.
8. The method according to claim 7, wherein, The process of extracting the road network based on the initial image results and generating the newly added road network by vectorization includes: Skeleton extraction is performed on the initial image result to generate a refined image result; The refined image results are used to extract road nodes, and roads are constructed based on the extracted road nodes to generate the new road network.
9. A road network segmentation model training device, characterized in that, include: The sample data acquisition module is used to acquire the sample road network and sample trajectory in the sample area, and to divide the sample road network into newly added sample road network and existing sample road network; The sample feature generation module is used to map the existing road network of the sample, the sample trajectory, and the newly added road network of the sample to the grid matrix corresponding to the sample region, respectively, to generate sample road network features, sample trajectory features, and newly added sample features; The model training module is used to iteratively train a preset segmentation network model using the sample road network features and the sample trajectory features as training input data and the newly added features of the samples as training reference ground values, and to determine the preset segmentation network model at the end of training as the road network segmentation model.
10. A road network processing device, characterized in that, include: The target data acquisition module is used to acquire the target road network and target trajectory in the target area; The target feature generation module is used to map the target road network and the target trajectory to the grid matrix corresponding to the target region, respectively, to generate target road network features and target trajectory features; A new road network generation module is added, which is used to generate a new road network in the target area based on the target road network features and the target trajectory features, through a road network segmentation model; wherein, the road network segmentation model is pre-trained by the road network segmentation model training method as described in any one of claims 1 to 5.
11. An electronic device, characterized in that, include: A memory and a processor, wherein the memory is used to store executable instructions of the processor; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the road network segmentation model training method as described in any one of claims 1 to 5 or the road network processing method as described in any one of claims 6 to 8.
12. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the road network segmentation model training method as described in any one of claims 1 to 5 or the road network processing method as described in any one of claims 6 to 8.
13. A computer program product, characterized in that, The computer program product is used to execute the road network segmentation model training method according to any one of claims 1 to 5 or the road network processing method according to any one of claims 6 to 8.
Citation Information
Patent Citations
Road network generation method and device, readable storage medium and electronic equipment
CN114842207A