Road updating method and device
By using trajectory data preprocessing, feature extraction and neural network models to generate predicted road networks in cycling scenarios, the problem of poor data extraction of cycling road networks is solved, and higher accuracy and practicality are achieved.
Patent Information
- Application Number
- CN202411463940.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art is difficult to effectively extract high-quality road network data in cycling scenarios, mainly due to the low sampling frequency and poor data quality of the trajectory data, resulting in poor road network extraction effect.
By obtaining trajectory data, preprocessing data to filter out abnormal points, extracting trajectory feature vectors in each pixel unit, using a pre-trained neural network model to generate intermediate vectors, the decoder generates an undirected graph and adds directions to obtain a predicted road network. Finally, match with the original road network to update the road network data.
It significantly improves the accuracy and practicality of cycling road network extraction, can effectively deal with the problems of low sampling frequency and poor data quality, and provides more accurate and reliable road network data.
Smart Images

Figure CN119437260A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a road updating method and device. Background Art
[0002] With the increase in population mobility and the popularity of shared travel services, people have increasing requirements for the accuracy and completeness of road data. Map navigation is not only needed when driving a motor vehicle, but also when walking and cycling, which puts higher requirements on the quality of map data. The quality of route recommendations in navigation services directly affects the user's travel experience, especially in areas that the user is not familiar with. Missing road information may lead to detours and reduce travel efficiency. Therefore, in order to improve the user experience of maps, it is particularly important to improve the data quality of cycling road networks. At present, most research still focuses on the extraction of motor vehicle road networks. For the extraction of motor vehicle road networks, a large number of studies have achieved certain results using methods such as trajectory fusion, clustering, and kernel density estimation, but these methods have high requirements on the quality, sampling frequency, and density of trajectory data. In cycling scenarios, due to the low sampling frequency of trajectory points and relatively poor data quality, these traditional methods are less effective in extracting road networks in cycling scenarios. Summary of the invention
[0003] In view of this, an object of the embodiments of the present invention is to provide a road updating method and device, which can improve the accuracy and practicality of road extraction.
[0004] In a first aspect, an embodiment of the present invention provides a road updating method, the method comprising:
[0005] Get trajectory data;
[0006] Acquire a trajectory feature vector in each pixel unit according to the trajectory data;
[0007] Acquire a predicted road network according to the trajectory feature vector;
[0008] Obtaining a matching result between the predicted road network and the original road network;
[0009] The original road network is updated based on the matching result.
[0010] In some embodiments, the method further comprises:
[0011] The trajectory data is preprocessed.
[0012] In some embodiments, the preprocessing of the trajectory data includes at least one of the following:
[0013] Filter out trajectory data whose trajectory point sampling time interval is greater than a predetermined time length;
[0014] Split the trajectory data with large adjacent position or speed differences into two segments;
[0015] The self-intersecting trajectory data are filtered out to remove the shorter trajectory data.
[0016] In some embodiments, acquiring the trajectory feature vector in each pixel unit according to the trajectory data comprises:
[0017] Acquire a plurality of tiles based on a map tile principle, each of the tiles comprising a plurality of pixel units;
[0018] The trajectory feature vector is determined according to the trajectory data in each pixel unit, and the trajectory feature vector includes at least one information of point feature, line feature, speed feature and direction feature.
[0019] In some embodiments, acquiring a predicted road network according to the trajectory feature vector comprises:
[0020] Generate an intermediate vector according to the trajectory feature vector through a pre-trained neural network model;
[0021] Determine the undirected graph corresponding to each pixel unit according to the intermediate vector by a predetermined decoder;
[0022] A direction is added to the undirected graph according to the trajectory data to obtain a predicted road network corresponding to the tile.
[0023] In some embodiments, the intermediate vector is used to represent whether there is a point in the pixel unit, whether there is an edge in each quadrant in the pixel unit, and the end point coordinates of the edge in each quadrant in the pixel unit.
[0024] In some embodiments, the pre-trained neural network model is obtained by training through the following steps:
[0025] Determine the initial model;
[0026] Obtain sample trajectory data and sample road network data;
[0027] Acquire an input feature vector based on the sample trajectory data, wherein the input feature vector includes at least one of point features, line features, speed features, and direction features;
[0028] Acquire a label based on the sample road network data;
[0029] The initial model is trained according to the input feature vector and the label to obtain the pre-trained neural network model.
[0030] In some embodiments, acquiring a label based on the sample road network data comprises:
[0031] Acquire a plurality of tiles based on a map tile principle, each of the tiles comprising a plurality of pixel units;
[0032] Extracting the road centerline within the tile;
[0033] Based on the endpoints of the road centerline, interpolation of points is completed according to a fixed distance to obtain point information;
[0034] Extract the corresponding segmented road segments according to the point information to obtain the edges;
[0035] The label is obtained through a predetermined encoder based on an undirected graph composed of the point information and edges.
[0036] In some embodiments, obtaining the label based on the undirected graph composed of the point information and edges through a predetermined encoder comprises:
[0037] Establishing a plane rectangular coordinate system corresponding to each pixel unit with the center of the pixel unit as the coordinate origin;
[0038] Dividing each of the pixel units into a plurality of quadrants according to a predetermined angle;
[0039] The label is generated according to the multiple quadrants, and the label includes whether there is a point in the pixel unit, whether there is an edge in each quadrant in the pixel unit, and the end point coordinates of the edge in each quadrant in the pixel unit.
[0040] In some embodiments, updating the original road network based on the matching result includes:
[0041] In response to the matching result being abnormal, the abnormal matching result is sent to the terminal device;
[0042] receiving a feedback result sent by the terminal device, wherein the feedback result is a review result of the abnormal matching result;
[0043] The original road network is updated according to the feedback results.
[0044] In a second aspect, an embodiment of the present invention provides a road updating device, the device comprising:
[0045] A trajectory data acquisition unit, used for acquiring trajectory data;
[0046] A trajectory feature vector acquisition unit, used to acquire a trajectory feature vector in each pixel unit according to the trajectory data;
[0047] A predicted road network acquisition unit, used to acquire a predicted road network according to the trajectory feature vector;
[0048] A matching result acquisition unit, used to acquire the matching result between the predicted road network and the original road network;
[0049] A road network updating unit is used to update the original road network based on the matching result.
[0050] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in the first aspect.
[0051] In a fourth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product includes a computer program. When the computer program runs on a computer, the computer executes the method described in the first aspect.
[0052] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in the first aspect is implemented.
[0053] The technical solution of the embodiment of the present invention obtains trajectory data, obtains the trajectory feature vector in each pixel unit according to the trajectory data, obtains the predicted road network according to the trajectory feature vector, obtains the matching result between the predicted road network and the original road network, and updates the original road network based on the matching result. Thus, the accuracy and practicality of road extraction can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0055] Figure 1 is a flow chart of a road updating method according to an embodiment of the present invention;
[0056] Figure 2 is a flow chart of obtaining a trajectory feature vector according to an embodiment of the present invention;
[0057] Figure 3 is a flow chart of obtaining a predicted road network according to an embodiment of the present invention;
[0058] Figure 4 is a flow chart of model training in an embodiment of the present invention;
[0059] Figure 5 is a flowchart of obtaining a tag according to an embodiment of the present invention;
[0060] Figure 6 is a schematic diagram of an undirected graph according to an embodiment of the present invention;
[0061] Figure 7 is a flow chart of updating a road network according to an embodiment of the present invention;
[0062] Figure 8 is a schematic diagram of a road renewal device according to an embodiment of the present invention;
[0063] Fig. 9 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the detailed description of the present invention below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present invention without the description of these details. In order to avoid confusing the essence of the present invention, known methods, processes, flows, components and circuits are not described in detail.
[0065] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.
[0066] Unless the context clearly requires otherwise, the words "include", "comprising" and the like throughout this application should be interpreted as including rather than exclusive or exhaustive; that is, as meaning "including but not limited to".
[0067] In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0068] At present, the extraction of motor vehicle road networks is still one of the core focuses in the field of transportation research. To achieve this goal, the industry has widely adopted a variety of technical means, including but not limited to trajectory fusion technology, cluster analysis algorithm and kernel density estimation method. After long-term research and practice, these technologies have achieved a series of remarkable results in the extraction of motor vehicle road networks, effectively improving the accuracy and completeness of road network information.
[0069] However, it is worth noting that the above methods generally set high thresholds for the quality, sampling frequency and data density of trajectory data in practical applications. Specifically, high-quality, high-frequency and dense trajectory data are the key prerequisites to ensure that these technologies can perform at their best. But in cycling scenarios, the situation is quite different. Due to multiple influences such as the mobility characteristics of cyclists, equipment limitations and environmental factors, the collection of cycling trajectory data often faces the challenges of low sampling frequency and uneven data quality. Therefore, when traditional methods are applied to cycling road network extraction, their effects are often greatly reduced and it is difficult to meet the needs of practical applications.
[0070] Therefore, the present invention aims to propose a road updating method optimized for cycling scenarios, which can effectively cope with the challenges brought by low sampling frequency and poor data quality, thereby significantly improving the accuracy and practicality of cycling road network extraction.
[0071] The road updating method of the embodiment of the present invention can be implemented by various devices (terminals, servers, etc.) with data processing functions.
[0072] Specifically, Figure 1 : is a flow chart of the road updating method according to an embodiment of the present invention. Figure 1 As shown, the road updating method of the embodiment of the present invention includes the following steps:
[0073] Step S100: Acquire trajectory data.
[0074] In this embodiment, the trajectory data is riding trajectory data. The riding trajectory data can be obtained by a positioning module provided in various riding vehicles and uploaded to the data processing device of the embodiment of the present invention. Among them, the riding vehicle can be a bicycle, an electric bicycle, a tricycle, an electric tricycle, a scooter, a balance car, etc. The positioning module can obtain positioning information through one or more of GPS positioning, Beidou positioning, GSM positioning, Bluetooth positioning, sensor positioning, etc. A series of positioning information during a single ride constitutes the trajectory data of the embodiment of the present invention.
[0075] In a specific implementation, in order to enhance the accuracy of road updates and obtain sufficient data support, an embodiment of the present invention cleverly utilizes the trajectory data resources of shared vehicles. In view of the large number of shared vehicles and the fact that they are uniformly managed by the same platform, the collection of trajectory data becomes more convenient and the amount of data is richer, thereby effectively improving the accuracy of road updates. In addition, considering that users may stop using the vehicle during riding, the present invention is more inclined to use the data recorded by the vehicle's own integrated positioning module, rather than relying on trajectory data collected by the riding user's personal terminal device (such as a smart phone, wearable device, etc.). The advantage of this approach is that it can significantly reduce the problem of discontinuity or missing trajectory data caused by user behavior (such as stopping midway), thereby ensuring the integrity and reliability of the trajectory data.
[0076] In some embodiments, the track data includes positioning information and time information. That is, during the driving process, the vehicle obtains the current positioning information at regular intervals, and binds the current positioning information and time information as a track point information, and the track data includes multiple track point information. The positioning information is the longitude and latitude coordinates.
[0077] In some embodiments, in order to improve the accuracy and availability of the trajectory data, the embodiment of the present invention further includes, after step S100:
[0078] Step S100': pre-process the trajectory data.
[0079] The preprocessing of the trajectory data includes at least one of the following:
[0080] Filter out trajectory data whose trajectory point sampling time interval is greater than a predetermined time length;
[0081] Split the trajectory data with large adjacent position or speed differences into two segments;
[0082] The self-intersecting trajectory data are filtered out to remove the shorter trajectory data.
[0083] Specifically, the accuracy of the shared vehicle's positioning module varies from vehicle to vehicle, and the error of the vehicle's positioning module is usually larger than that of the user's terminal device. This error not only affects the user's riding experience, but also brings challenges to subsequent trajectory analysis and processing. Therefore, for the trajectory data collected from the vehicle, data cleaning and preprocessing are required to ensure the accuracy and availability of the data.
[0084] Filtering out the trajectory data whose sampling time interval of the trajectory points is greater than the predetermined time length is to achieve low-precision filtering. Considering that the time interval for the vehicle to upload the positioning information is generally between 2 seconds and 4 minutes, the excessive time interval difference will affect the calculation of relevant features and the extraction of the final result. Therefore, the present invention filters out all the trajectory data whose time interval exceeds 30 seconds to ensure the continuity and consistency of the data.
[0085] For dividing the trajectory data with large differences in adjacent positions or speeds into two segments: As described above, the trajectory data includes the positioning information and time information of multiple trajectory points, and thus, the speed and adjacent positions of each trajectory point can be determined according to the positioning information and time information, and the adjacent position is the distance between each two adjacent trajectory points, wherein the speed of each trajectory point can be obtained in various ways, for example, dividing the distance between the current trajectory point and the next trajectory point by the time difference between the current trajectory point and the next trajectory point, for example, dividing the distance between the previous trajectory point of the current trajectory point and the next trajectory point by the time difference between the previous trajectory point of the current trajectory point and the next trajectory point, and for example, dividing the distance between the current trajectory point and the previous trajectory point by the time difference between the current trajectory point and the previous trajectory point. The distance between each two adjacent trajectory points can be calculated and obtained by the positioning information of the two trajectory points. If the adjacent position difference of a certain trajectory point is large, and / or the speed difference is large, it is characterized that the trajectory point may be an abnormal trajectory point. After deleting the abnormal trajectory point, two segments of normal trajectory data are obtained.
[0086] Regarding filtering out the shorter trajectory data from the self-intersecting trajectory data, since the user may circle around again during the riding process, or when the positioning of the trajectory point is abnormal (positioning drift, etc.), a trajectory data may self-intersect. In the embodiment of the present invention, the shorter trajectory data from the self-intersecting trajectory data is filtered out to obtain non-intersecting trajectory data. This step helps to eliminate trajectory anomalies caused by equipment errors or environmental factors.
[0087] Through the above preprocessing steps, the present invention can significantly improve the accuracy and reliability of bicycle riding trajectory data, and provide high-quality data support for subsequent trajectory analysis, path planning and other applications.
[0088] Step S200: acquiring a trajectory feature vector in each pixel unit according to the trajectory data.
[0089] In this embodiment, after the trajectory data is preprocessed, a trajectory feature vector in each pixel unit is obtained according to the trajectory data. The trajectory feature vector includes at least one of point feature, line feature, speed feature and direction feature.
[0090] Specifically, the process of obtaining the trajectory feature vector is as follows: Figure 2 As shown, the following steps are included:
[0091] Step S210: acquiring a plurality of tiles based on the map tile principle, each of the tiles comprising a plurality of pixel units.
[0092] In this embodiment, the tile information of the target area is obtained through the map tile principle of the Geographic Information System (GIS), and the tile information is used to divide the geographic space into a series of grid units (i.e., tiles) of fixed size to facilitate the subsequent organization and management of data. Each tile is then divided into multiple pixel units.
[0093] Step S220: determining the trajectory feature vector according to the trajectory data in each pixel unit.
[0094] Taking level 17 tiles as an example, the size of each tile is about 250 meters * 250 meters, which is represented as a grid image with a resolution of 256 * 256, and the size of each pixel unit is about 1m * 1m. For different feature dimensions, the pixel unit value calculation is different. For example, the point feature is to count the frequency of trajectory points in each pixel unit, and the speed feature is to count the point speed average of the trajectory points in each pixel unit. The line feature is the endpoint coordinates of the line in the pixel unit. The direction feature is the direction of each trajectory point or the direction of the line in the pixel unit, etc. Among them, the area without trajectory points is regarded as the background area. The embodiment of the present invention obtains a 36-dimensional trajectory feature vector containing points, lines, speeds, directions, etc. based on the above logic.
[0095] It should be noted that the point features, line features, speed features and direction features listed above are only examples of an embodiment of the present invention. The embodiment of the present invention does not limit the calculation method of each feature listed above. At the same time, it is not limited to the features listed above. The required features can be added, deleted or modified according to actual needs.
[0096] Step S300: obtaining a predicted road network according to the trajectory feature vector.
[0097] Figure 3 FIG. 1 is a flowchart of obtaining a predicted road network according to an embodiment of the present invention. Figure 3 As shown, the embodiment of the present invention obtains the predicted road network according to the trajectory feature vector, including the following steps:
[0098] Step S310: Generate an intermediate vector according to the trajectory feature vector using a pre-trained neural network model.
[0099] Among them, the steps of obtaining the pre-trained neural network model are as follows Figure 4 As shown, specifically including:
[0100] Step S311, determine the initial model.
[0101] In this embodiment, the initial model is a DLA (Deep Layer Aggregation) and Transformer (deep learning model architecture based on attention mechanism) model. Among them, DLA is a feature aggregation method for convolutional neural network (CNN) in deep learning, which mainly merges the features of different layers and blocks in an iterative and hierarchical manner to improve the accuracy and efficiency of the network. Transformer is a deep learning model architecture based on attention mechanism, and its core idea is self-attention mechanism (Self-Attention), which allows the model to pay attention to different parts of the input sequence at each step without the need to process the sequence step by step through structures such as recurrent neural network (RNN). This parallel operation enables Transformer to have good performance when processing long sequences, while also reducing training time.
[0102] Since convolutional neural networks (CNN) can express image information very well, the embodiment of the present invention first uses the classic structure DLA model of CNN to complete image feature fusion and extract multi-scale features, and then uses the Transformer model widely used in the NLP field to enhance the global expression of features using a multi-head attention mechanism. The loss function of model training contains four parts, namely point loss, edge loss, edge position loss, and whether the pixel point exists on the road centerline.
[0103] Step S312: Obtain sample trajectory data and sample road network data.
[0104] In this embodiment, historical riding trajectory data is obtained as sample trajectory data, and the road network corresponding to the sample trajectory data is used as sample road network data.
[0105] Step S313: Obtain an input feature vector based on the sample trajectory data.
[0106] In this embodiment, the input feature vector includes at least one of point features, line features, speed features and direction features.
[0107] The embodiment of the present invention adopts 17-level tiles, and the size of each tile is about 250 meters * 250 meters. It is represented as a grid image with a resolution of 256 * 256, and the size represented by each pixel unit is about 1m * 1m. For different feature dimensions, the pixel unit value calculation is different. For example, the point feature is to count the frequency of trajectory points in each pixel unit, and the speed feature is to count the point speed average of the trajectory points in each pixel unit. The line feature is the endpoint coordinates of the line in the pixel unit. The direction feature is the direction of each trajectory point or the direction of the line in the pixel unit, etc. Among them, the area without trajectory points is regarded as the background area. Based on the above logic, the embodiment of the present invention obtains a 36-dimensional input feature vector containing points, lines, speeds, directions, etc.
[0108] Step S314: Obtain a label based on the sample road network data through a predetermined encoder.
[0109] In this embodiment, for the sample road network data, a label is obtained through a predetermined encoder.
[0110] Specifically, Figure 5 FIG. 1 is a flowchart of obtaining a tag according to an embodiment of the present invention. Figure 5 As shown, the embodiment of the present invention acquires a label based on the sample road network data through a predetermined encoder, including the following steps:
[0111] Step S3141: Acquire multiple tiles based on the map tile principle, each of the tiles including multiple pixel units.
[0112] The embodiment of the present invention adopts 17 levels of tiles, and the size of each tile is about 250 meters * 250 meters. It is represented as a grid image with a resolution of 256 * 256, and the size represented by each pixel unit is about 1m * 1m.
[0113] Step S3142: extract the road centerline within the tile.
[0114] In this embodiment, the center lines of each road in the tile are extracted.
[0115] Step S3143: interpolating points based on the endpoints of the road centerline according to a fixed distance to obtain point information.
[0116] In this embodiment, the endpoints of each road centerline are determined, and point information corresponding to the road centerline is obtained by interpolation of the completed points according to a fixed distance.
[0117] Step S3144: extract the corresponding segmented road segments according to the point information to obtain edges.
[0118] In this embodiment, after obtaining the point information corresponding to the road centerline, the corresponding segmented road sections are extracted from the road network data to obtain the edges.
[0119] Thus, through the above steps, a road centerline grid image and an undirected graph consisting of points and edges can be obtained.
[0120] Specifically, Figure 6 is a schematic diagram of an undirected graph according to an embodiment of the present invention. Figure 6 In the illustrated embodiment, P1 is a road network image, P2 is a point information image obtained through step S3143, and P3 is an edge image obtained through step S3144.
[0121] Step S3145: Obtain the label based on the undirected graph composed of the point information and edges through a predetermined encoder.
[0122] The plane rectangular coordinate system corresponding to each pixel unit is established with the center of the pixel unit as the coordinate origin, each pixel unit is divided into a plurality of quadrants according to a predetermined angle, and the label is generated according to the plurality of quadrants. The label includes whether there is a point in the pixel unit, whether there is an edge in each quadrant in the pixel unit, and the end point coordinates of the edge in each quadrant in the pixel unit.
[0123] For example, each pixel unit can be divided into six quadrants, with each 60 degrees in the north direction as a quadrant. Furthermore, the label is a 19-dimensional vector, and the first dimension indicates whether there is a point in the pixel unit. In the next 18 dimensions, each three-dimensional is a group, and each group corresponds to a quadrant. In each group, one dimension indicates whether there is an edge in the quadrant, and the other two dimensions record the coordinates of the end point of the edge. In this way, the true value of the road network, that is, the label, can be obtained.
[0124] Step S315: training the initial model according to the input feature vector and the label to obtain the pre-trained neural network model.
[0125] In this embodiment, the input feature vectors of all pixel units in a tile are input into the initial model. The initial model obtains the output feature vector of each pixel unit according to the input feature vector. The output feature vector is a 19-dimensional vector. The first dimension represents the probability of a point in the pixel unit. In the following 18 dimensions, each three-dimensional dimension is a group, and each group corresponds to a quadrant. In each group, one dimension represents the probability of an edge in the quadrant, and the other two dimensions are the predicted end point coordinates of the edge. The initial model is optimized according to the output feature vector and label of each pixel unit in the tile, so that the output feature vector is as similar to the label as possible. Through continuous iterative optimization, a pre-trained neural network model can be obtained. Among them, the loss function of the neural network model includes point loss, edge loss, edge position loss and segmentation loss.
[0126] Among them, the neural network model includes a DLA (Deep Layer Aggregation) model and a Transformer (deep learning model architecture based on attention mechanism) model. Deep Layer Aggregation (DLA) is a convolutional neural network architecture that captures multi-scale information by fusing features at different levels. DLA effectively utilizes feature information at different levels by aggregating feature maps from different network layers, thereby improving the expressiveness and generalization capabilities of the model. In this embodiment, DLA is used to process input image data. Through the convolution layer and pooling layer of DLA, the model can extract local features and spatial structure information in the image. At the same time, the hierarchical feature fusion mechanism of DLA enables the model to capture multi-scale features in the image. The Transformer model allows the model to focus on different parts of the input sequence at the same time when processing sequence data, thereby capturing global dependencies. In this embodiment, the Transformer model is used to enhance the global expression of features. Through the multi-head attention mechanism, the model can learn the global dependencies between image features, which is very helpful for tasks that require global information such as road centerline detection. Specifically, the feature map extracted by DLA can be used as the input of Transformer, and the features can be globally fused and weighted through the multi-head attention mechanism to obtain a more global feature representation.
[0127] Furthermore, the formula of the loss function of the neural network model is:
[0128]
[0129] Where W represents the number of pixel units in the tile in the width direction, H represents the number of pixel units in the tile in the height direction, ∑ (x,y)∈[1..W]×[1..H] It means to sum all pixel units (x, y) in the tile, where x and y represent the xth pixel unit in the width direction and the yth pixel unit in the height direction respectively, and the range of x is from 1 to W and the range of y is from 1 to H.
[0130] It is the point loss value, which is used to measure the accuracy of the model in predicting whether there is a point in a pixel unit, and represents the cross entropy loss of the point feature (such as classification) in a certain pixel unit (x, y). v Represents the true probability distribution of whether a point exists in the label, Represents the predicted probability distribution of whether a point exists in the output feature vector.
[0131] D max Indicates the number of quadrants.
[0132] is the edge loss value, which is used to measure the accuracy of the model in predicting the end point coordinates of the edge, and represents the cross entropy loss of the edge feature (such as classification) in a certain pixel unit (x, y). ei represents the true probability distribution of whether there is an edge in the label, Represents the predicted probability distribution of whether an edge exists in the output feature vector.
[0133] is the edge position loss value, which represents the distance loss of the edge position feature in a certain pixel unit (x, y). (dx i ,dy i ) represents the true value of the end point coordinate of the edge in the label, Represents the predicted value of the end point coordinates of the edge in the output feature vector.
[0134] is the segmentation loss. In addition to the 19-dimensional vector described above, the label also sets a label y indicating whether there is an edge in the pixel unit. i Correspondingly, the output feature vector of the neural network model also includes the probability that there is an edge in the pixel unit
[0135] It is an indicator value used to determine on which pixel cells the edge loss and edge position loss are calculated. When a pixel cell is marked as containing a point, the edge and edge position information around it are considered.
[0136] Thus, a pre-trained neural network model can be obtained, and an intermediate vector can be generated according to the trajectory feature vector based on the pre-trained neural network model.
[0137] Step S320: Determine the undirected graph corresponding to each pixel unit according to the intermediate vector through a predetermined decoder.
[0138] In this embodiment, the decoder is an inverse operation of the encoder in step S314, and an undirected graph including points and edges can be obtained according to the intermediate vectors.
[0139] Step S330: adding directions to the undirected graph according to the trajectory data to obtain a predicted road network corresponding to the tile.
[0140] In this embodiment, directions are added to the undirected graph according to the directions of each trajectory point in the trajectory data to obtain a predicted road network corresponding to the tile.
[0141] Step S400: Obtain the matching result between the predicted road network and the original road network.
[0142] In this embodiment, the predicted road network obtained according to the trajectory data is matched with the original road network to obtain a matching result of the predicted road network and the original road network.
[0143] Step S500: Update the original road network based on the matching result.
[0144] Figure 7 is a flow chart of updating the road network according to an embodiment of the present invention. Figure 7 As shown, updating the original road network based on the matching result includes the following steps:
[0145] Step S510: In response to the abnormal matching result, the abnormal matching result is sent to the terminal device.
[0146] In this embodiment, the abnormal matching result means that there are roads in the predicted road network that are not in the original road network, that is, new roads. The terminal device is a device used by the auditor. The matching result is a new road.
[0147] Step S520: Receive the feedback result sent by the terminal device.
[0148] In this embodiment, if the matching result is that there is a road in the predicted road network that is not in the original road network, that is, the predicted road network has a new road, the matching result is sent to the terminal device so that the terminal device reviews the new road. The feedback result is sent to the data processing device through the terminal device. The feedback result is the review result of the abnormal matching result.
[0149] Step S530: Update the original road network according to the feedback result.
[0150] In this embodiment, if the feedback result is that the new road exists, the new road is added to the original road network. If the feedback result is that the new road does not exist, the original road network is not updated.
[0151] The embodiment of the present invention obtains trajectory data, obtains a trajectory feature vector in each pixel unit according to the trajectory data, obtains a predicted road network according to the trajectory feature vector, obtains a matching result between the predicted road network and the original road network, and updates the original road network based on the matching result. Thus, the accuracy and practicality of road extraction can be improved.
[0152] It should be noted that the road updating method of the embodiment of the present invention is not limited to road extraction in a cycling scenario, and road extraction in other scenarios (such as walking, motor vehicles, etc.) is also applicable to the technical solution of the embodiment of the present invention.
[0153] Figure 8 Schematic diagram of a road renewal device according to an embodiment of the present invention. Figure 8As shown, the road updating device of the embodiment of the present invention includes a trajectory data acquisition unit 81, a trajectory feature vector acquisition unit 82, a predicted road network acquisition unit 83, a matching result acquisition unit 84 and a road network updating unit 85. Among them, the trajectory data acquisition unit 81 is used to acquire trajectory data. The trajectory feature vector acquisition unit 82 is used to acquire the trajectory feature vector in each pixel unit according to the trajectory data. The predicted road network acquisition unit 83 is used to acquire the predicted road network according to the trajectory feature vector. The matching result acquisition unit 84 is used to obtain the matching result between the predicted road network and the original road network. The road network updating unit 85 is used to update the original road network based on the matching result.
[0154] In some embodiments, the apparatus further comprises:
[0155] A preprocessing unit is used to preprocess the trajectory data.
[0156] In some embodiments, the pre-processing unit includes at least one of the following:
[0157] A first filtering subunit, used to filter out trajectory data whose trajectory point sampling time interval is greater than a predetermined time length;
[0158] The second filtering subunit is used to divide the trajectory data with large adjacent position or speed differences into two segments;
[0159] The third filtering subunit is used to filter out shorter trajectory data from self-intersecting trajectory data.
[0160] In some embodiments, the trajectory feature vector acquisition unit includes:
[0161] A tile acquisition subunit, used for acquiring a plurality of tiles based on a map tile principle, each of the tiles comprising a plurality of pixel units;
[0162] The vector acquisition subunit is used to determine the trajectory feature vector according to the trajectory data in each pixel unit, and the trajectory feature vector includes at least one information of point feature, line feature, speed feature and direction feature.
[0163] In some embodiments, the predicted road network acquisition unit includes:
[0164] An intermediate vector acquisition subunit, used to generate an intermediate vector according to the trajectory feature vector through a pre-trained neural network model;
[0165] An undirected graph determination subunit, used to determine the undirected graph corresponding to each of the pixel units according to the intermediate vector through a predetermined decoder;
[0166] The direction adding subunit is used to add directions to the undirected graph according to the trajectory data to obtain a predicted road network corresponding to the tile.
[0167] In some embodiments, the intermediate vector is used to represent whether there is a point in the pixel unit, whether there is an edge in each quadrant in the pixel unit, and the end point coordinates of the edge in each quadrant in the pixel unit.
[0168] In some embodiments, the apparatus further comprises:
[0169] An initial module acquisition unit, used to determine an initial model;
[0170] A sample acquisition unit, used to acquire sample trajectory data and sample road network data;
[0171] An input feature vector acquisition unit, configured to acquire an input feature vector based on the sample trajectory data, wherein the input feature vector includes at least one of point features, line features, speed features, and direction features;
[0172] A label acquisition unit, used for acquiring labels based on the sample road network data;
[0173] A model acquisition unit is used to train the initial model according to the input feature vector and the label to obtain the pre-trained neural network model.
[0174] In some embodiments, the label acquisition unit includes:
[0175] A segmentation subunit, used for acquiring a plurality of tiles based on a map tile principle, each of the tiles comprising a plurality of pixel units;
[0176] A road centerline extraction subunit, used to extract the road centerline in the tile;
[0177] An interpolation subunit, configured to interpolate points based on the endpoints of the road centerline according to a fixed distance to obtain point information;
[0178] The edge acquisition subunit is used to extract the corresponding segmented road segments according to the point information to obtain the edge;
[0179] The label acquisition subunit is used to acquire the label based on the undirected graph composed of the point information and edges through a predetermined encoder.
[0180] In some embodiments, the tag acquisition subunit includes:
[0181] A coordinate system establishment module, used to establish a plane rectangular coordinate system corresponding to each pixel unit with the center of the pixel unit as the coordinate origin;
[0182] A quadrant division module, used for dividing each pixel unit into a plurality of quadrants according to a predetermined angle;
[0183] The label generation module is used to generate the label according to the multiple quadrants, and the label includes whether there is a point in the pixel unit, whether there is an edge in each quadrant in the pixel unit, and the end point coordinates of the edge in each quadrant in the pixel unit.
[0184] In some embodiments, the road network updating unit includes:
[0185] a matching result sending subunit, configured to send the abnormal matching result to the terminal device in response to the abnormal matching result;
[0186] A feedback result receiving subunit, configured to receive a feedback result sent by the terminal device, wherein the feedback result is a review result of the abnormal matching result;
[0187] The updating subunit is used to update the original road network according to the feedback result.
[0188] The embodiment of the present invention obtains trajectory data, obtains a trajectory feature vector in each pixel unit according to the trajectory data, obtains a predicted road network according to the trajectory feature vector, obtains a matching result between the predicted road network and the original road network, and updates the original road network based on the matching result. Thus, the accuracy and practicality of road extraction can be improved.
[0189] Fig. 9 is a schematic diagram of an electronic device according to an embodiment of the present invention. Fig. 9 The electronic device shown is a general data processing device, which includes a general computer hardware structure, which at least includes a processor 91 and a memory 92. The processor 91 and the memory 92 are connected via a bus 93. The memory 92 is suitable for storing instructions or programs executable by the processor 91. The processor 91 can be an independent microprocessor or a collection of one or more microprocessors. Thus, the processor 91 executes the instructions stored in the memory 92, thereby executing the method flow of the embodiment of the present invention as described above to realize the processing of data and the control of other devices. The bus 93 connects the above-mentioned multiple components together, and at the same time connects the above-mentioned components to the display controller 94 and the display device and the input / output (I / O) device 95. The input / output (I / O) device 95 can be a mouse, a keyboard, a modem, a network interface, a touch input device, a somatosensory input device, a printer, and other devices known in the art. Typically, the input / output device 95 is connected to the system via an input / output (I / O) controller 96.
[0190] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, devices (equipment) or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0191] The present invention is described with reference to flowcharts of methods, apparatuses (devices) and computer program products according to embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions.
[0192] These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.
[0193] These computer program instructions may also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the instructions for implementing the process Figure 1 A device that specifies functions in a process or multiple processes.
[0194] The solutions described in this specification and in the examples, if they involve the processing of personal information, will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or being necessary for the performance of a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.
[0195] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A road updating method, characterized in that: The method comprises: Get trajectory data; Acquire a trajectory feature vector in each pixel unit according to the trajectory data; Acquire a predicted road network according to the trajectory feature vector; Obtaining a matching result between the predicted road network and the original road network; The original road network is updated based on the matching result.
2. The method according to claim 1, characterized in that The method further comprises: The trajectory data is preprocessed.
3. The method according to claim 2, characterized in that The preprocessing of the trajectory data includes at least one of the following: Filter out trajectory data whose trajectory point sampling time interval is greater than a predetermined time length; Split the trajectory data with large adjacent position or speed differences into two segments; The self-intersecting trajectory data are filtered out to remove the shorter trajectory data.
4. The method according to claim 1, characterized in that: The step of obtaining the trajectory feature vector in each pixel unit according to the trajectory data comprises: Acquire a plurality of tiles based on a map tile principle, each of the tiles comprising a plurality of pixel units; The trajectory feature vector is determined according to the trajectory data in each pixel unit, and the trajectory feature vector includes at least one information of point feature, line feature, speed feature and direction feature.
5. The method according to claim 4, characterized in that The obtaining of the predicted road network according to the trajectory feature vector comprises: Generate an intermediate vector according to the trajectory feature vector through a pre-trained neural network model; Determine the undirected graph corresponding to each pixel unit according to the intermediate vector by a predetermined decoder; A direction is added to the undirected graph according to the trajectory data to obtain a predicted road network corresponding to the tile.
6. The method according to claim 5, characterized in that The intermediate vector is used to indicate whether there is a point in the pixel unit, whether there is an edge in each quadrant in the pixel unit, and the end point coordinates of the edge in each quadrant in the pixel unit.
7. The method according to claim 5, characterized in that The pre-trained neural network model is obtained by training through the following steps: Determine the initial model; Obtain sample trajectory data and sample road network data; Acquire an input feature vector based on the sample trajectory data, wherein the input feature vector includes at least one of point features, line features, speed features, and direction features; Acquire a label based on the sample road network data; The initial model is trained according to the input feature vector and the label to obtain the pre-trained neural network model.
8. The method according to claim 7, characterized in that The acquiring of labels based on the sample road network data comprises: Acquire a plurality of tiles based on a map tile principle, each of the tiles comprising a plurality of pixel units; Extracting the road centerline within the tile; Based on the endpoints of the road centerline, interpolation of points is completed according to a fixed distance to obtain point information; Extract the corresponding segmented road segments according to the point information to obtain the edges; The label is obtained through a predetermined encoder based on an undirected graph composed of the point information and edges.
9. The method according to claim 8, characterized in that The obtaining the label based on the undirected graph composed of the point information and edges by a predetermined encoder comprises: Establishing a plane rectangular coordinate system corresponding to each pixel unit with the center of the pixel unit as the coordinate origin; Dividing each of the pixel units into a plurality of quadrants according to a predetermined angle; The label is generated according to the multiple quadrants, and the label includes whether there is a point in the pixel unit, whether there is an edge in each quadrant in the pixel unit, and the end point coordinates of the edge in each quadrant in the pixel unit.
10. The method according to claim 1, characterized in that The updating of the original road network based on the matching result includes: In response to the matching result being abnormal, the abnormal matching result is sent to the terminal device; receiving a feedback result sent by the terminal device, wherein the feedback result is a review result of the abnormal matching result; The original road network is updated according to the feedback results.
11. A road renewal device, characterized in that: The device comprises: A trajectory data acquisition unit, used for acquiring trajectory data; A trajectory feature vector acquisition unit, used to acquire a trajectory feature vector in each pixel unit according to the trajectory data; A predicted road network acquisition unit, used to acquire a predicted road network according to the trajectory feature vector; A matching result acquisition unit, used to acquire the matching result between the predicted road network and the original road network; A road network updating unit is used to update the original road network based on the matching result.
12. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1-10.
13. A computer program product, comprising a computer program, characterized in that: When the computer program is executed on a computer, the computer executes the method according to any one of claims 1 to 10.
14. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 10 when executed by a processor.