Rapid construction method of strip mine road network model based on GPS trajectory data
By installing RTK sensors on mine cars in open-pit mining areas, obtaining GPS trajectory data and processing, and generating high-precision road network models, the problem of difficulty in quickly building high-precision road network models in the existing technology is solved, and the intelligent scheduling and unmanned driving requirements in open-pit mining areas are realized.
Patent Information
- Application Number
- CN202411611190.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-07
AI Technical Summary
The existing technology is difficult to quickly build a high-precision open-pit mining network model, and cannot meet the needs of intelligent scheduling and unmanned driving of open-pit mine trucks.
Using a method based on GPS trajectory data, the trajectory data is obtained and preprocessed by installing an RTK sensor on the mine cart, and then rasterize it to extract road features and generate a road network model.
It realizes the rapid and stable generation of high-precision road network models, meets the needs of intelligent scheduling and unmanned driving in open-pit mining areas, and improves the efficiency and safety of mine transportation.
Smart Images

Figure CN119579814A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of open-pit mine mapping, and in particular to a method for quickly constructing an open-pit mine road network model based on GPS trajectory data. Background Art
[0002] The construction of road networks in open-pit mines is an important prerequisite for realizing intelligent scheduling and unmanned driving of open-pit mine trucks. As the scale and complexity of mines increase, manual surveying and mapping no longer meets the needs.
[0003] With the development of information technology, industrial Internet, industrial software and intelligent materials, the relevant foundation has been provided for the positioning and mapping of open-pit mines. The automation and intelligence of mining equipment can not only ensure the safety of mine workers, but also improve the efficiency of mining and transportation. Therefore, the automation and intelligent development of mining equipment is imperative. The intelligence of mining equipment includes three major issues: positioning, mapping and planning. Among them, mapping is an important support for the intelligent scheduling platform of smart mines. Since mine roads are constantly changing with the advancement of production and mining, the faster construction of high-precision map models of open-pit mines is one of the key technologies to promote intelligent scheduling of mines.
[0004] Positioning technology in open-air places is relatively mature, and mining equipment is equipped with RTK or GPS equipment, making data acquisition very convenient. At present, the road network model construction method used in open-air mines is mainly manual surveying or remote sensing image recognition. Manual surveying has high accuracy, but data collection is slow and the data content is small; remote sensing images can provide richer road network information, but the collection cost is high, and the first use requires data annotation and model training.
[0005] In order to meet the needs of intelligent scheduling and unmanned driving of open-pit mine trucks, a mapping technology is needed to quickly construct a road network model with sufficient accuracy. Summary of the invention
[0006] In order to overcome the above technical problems, the purpose of the present invention is to provide a method for quickly constructing an open-pit mine road network model based on GPS trajectory data, which can quickly provide a road network model with higher accuracy. The method generates a road network model quickly and stably and generates roads with high accuracy.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] A method for quickly constructing an open pit mine road network model based on GPS trajectory data comprises the following steps:
[0009] Step 1: Install the RTK sensor device on the top of the mine car;
[0010] Step 2: Record the trajectory data through the RTK sensor to obtain the trajectory data;
[0011] Step 3: preprocessing the trajectory data;
[0012] Step 4: rasterize the preprocessed trajectory data to obtain raster data;
[0013] Step 5: Get the internal attributes of the raster data and store the corresponding data as matrix data according to the coordinates;
[0014] Step 6: Extract road features using raster data;
[0015] Step 7: Connect road features through time series information and generate road network roads;
[0016] Step 8: Construct the road network structure based on the road network information;
[0017] Step 9: Visualize the road network based on the road network structure and feature information.
[0018] In step 1, the vehicle positioning information is obtained by installing an RTK sensor on the mining car, the continuous positioning data is converted into trajectory data, the trajectory data is collected and processed using a GPU computing platform installed in the integrated dispatching center, a road network model is generated, and finally the road network is displayed using a local server that receives the model data and performs visualization.
[0019] The step 2 is specifically as follows:
[0020] Start the vehicle and RTK sensor, keep the vehicle running normally, record all trajectory data during the entire operation cycle of the mine car and save them into a bag file; the bag file includes timestamp, mileage, longitude, latitude, and altitude data.
[0021] The step 3 is specifically as follows:
[0022] The trajectory data is read, and the bag file is parsed using rosbag. The trajectory information is converted into a csv file, and the trajectories with abnormal coordinates and attributes are deleted and stored as ndarray arrays. Each bag file is converted into an array and sorted by vehicle and timestamp. After processing, trajectory data without obvious abnormalities is obtained.
[0023] The step 4 is specifically as follows:
[0024] The trajectory data without obvious anomalies are rasterized, and the vector data of the trajectory data is converted into raster data using the raster map to match the raster map;
[0025] Create a grid array based on the pre-input grid width. The grid index is three-dimensional. The first two dimensions are grid coordinates, and the last dimension is the grid object serial number. The last dimension is the entire grid object when it is created, and the default index is 0. Import the trajectory data into the grid of the corresponding range. The calculation formula for converting trajectory coordinates to grid coordinates is as follows:
[0026]
[0027] Among them, x i ,y i is the coordinate of a point (x, y), X i , Y i is the trajectory point (x i ,y i ) corresponding to the grid coordinates, x min ,y min is the minimum value of the coordinates in the x and y directions, l cell is the grid side length.
[0028] The raster data acquisition and processing in step 5 specifically includes acquiring internal attribute data of the raster data, such as binary data, ID attribute, average speed attribute, etc., and storing the corresponding data as matrix data according to coordinates;
[0029] 5.1 Raster Binarization:
[0030] The number of trajectory points in the grid N (i,j) As the value of the grid, then the point type of the grid is determined according to the threshold T. If the number of trajectory points in the grid is greater than the threshold, the grid is a foreground point, otherwise it is a background point. The calculation formula of the grid binary matrix P is as follows:
[0031]
[0032] 5.2 Grid ID:
[0033] A unique identifier is set for the grid according to the grid's position and object characteristics. The grid is subdivided by dividing the grid. The number 0 indicates the end of the division and refers to the current grid. The formula for calculating the grid ID is defined as follows:
[0034]
[0035] Where d is the number of times the coordinate grid is divided into sub-grids, k z is the label of the subgrid. If the grid has no subgrid, the ID is an integer.
[0036] 5.3 Average grid speed
[0037] Calculate the average speed of the grid using the following formula:
[0038]
[0039] Where x is the x-axis coordinate of the trajectory point, y is the y-axis coordinate of the trajectory point, t is the timestamp corresponding to the point, and the subscript (i, j, k) refers to the kth trajectory point in the grid with i rows and j columns;
[0040] 5.4 Grid Offset
[0041] In raster data processing, the position of the raster is offset. If any matrix is extended once around and the extended value is 0, the matrix is called an extended matrix. In the extended matrix, the submatrix whose matrix size is equal to the original matrix size is called an offset matrix. For a matrix A1, its extended matrix is A, then A1 is equivalent to the non-offset matrix of A.
[0042] 5.5 Number of grid neighbor points
[0043] The formula for calculating the number of neighbor points of a grid is as follows:
[0044]
[0045] At this time, if the grid is a foreground point, the number of neighbor points is normal, if the grid is a background point, the number of neighbor points is -1;
[0046] 5.6 Grid Connectivity Orientation
[0047] The connected directions of the grid are divided into four directions or eight directions, which are sorted counterclockwise. The order of the four directions is up, right, down, and left. The order of the eight directions is up, upper right, right, lower right, down, lower left, left, and upper left. Binary numbers with the same digits are used for storage. The calculation formula is as follows:
[0048]
[0049] The step 6 processes the grid data. In view of the characteristics of the open-pit mine road with unstable shape and small road spacing, only complex areas such as joint areas are expanded, and scattered background points are filled in by interlaced aggregation to remove unreasonable data features and retain grid points that meet the actual road conditions. The remaining features are refined into a grid skeleton. The processed skeleton width is 1 grid, which can be used as the road centerline for subsequent use;
[0050] Specifically:
[0051] Step 6.1: Grid expansion: Expand the grid data;
[0052] Step 6.2: Grid reverse connected domain processing fills scattered background points and removes noise;
[0053] Step 6.3: Use grid refinement to extract the processed grid skeleton to ensure that the grid width of the processed grid image is only 1 grid.
[0054] The step 7 is specifically as follows:
[0055] Step 7.1: Match the raster data with the actual road conditions to generate a raster type matrix;
[0056] Step 7.2: Convert the discrete raster into spatially connected roads by raster vectorization;
[0057] Step 7.3: Reconstruct the rasterized roads into vectorized ones through time-series-based road network reconstruction to obtain more realistic roads.
[0058] The step 8 constructs a road network structure diagram, takes the road itself and the starting point of the road as the vertices of the road network structure diagram, and connects them in a point-road-point manner. The middle points of the road are not displayed because they do not interact with the points outside the road.
[0059] The road network visualization of step 9 is specifically as follows:
[0060] (1) Use the matplotlib library to display intermediate variables or results of road network grids, road networks, and road network sequences;
[0061] (2) Use the matplotlib library and networkx library to draw a road network structure diagram, including double-clicking the right button to create a node, dragging the left button to draw an edge, and double-clicking the right button to delete a node;
[0062] (3) Use the flask library and Baidu Map API to generate an operational web page, and provide map visualization and information display on the web page.
[0063] Beneficial effects of the present invention:
[0064] The road network model of the present invention has good matching performance and can be directly connected with GIS maps, placeholder grid maps and other maps, which is convenient for use in different map scenes. At the same time, the method is further optimized for the road characteristics of open-pit mines to make it more applicable.
[0065] The model data requirements of the present invention are low. As long as the road has corresponding trajectory data, the road network model can be generated regardless of the amount of data. Compared with road network model construction algorithms such as clustering algorithms or fusion algorithms, less data can be used to construct the road network.
[0066] The model of the present invention still has good adaptability to big data. Through rasterization processing, the amount of data calculation is effectively reduced and the displacement deviation of the data is kept at a small standard. At the same time, this model uses a large number of matrix calculations to simplify single-step calculation operations, reduce repetitive work, and keep the overall structure concise, so that it runs data extremely fast and with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a flow chart of constructing the open-pit mine road network model of the present invention.
[0068] Figure 2 It is a schematic diagram of the relationship between the grid point positions and numerical values in the present invention.
[0069] Figure 3 It is a schematic diagram of the transformation of the road network structure diagram in the present invention. DETAILED DESCRIPTION
[0070] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0071] like Figure 1 As shown, the present invention discloses a method for quickly constructing an open-pit mine road network model based on GPS trajectory data, comprising the following steps:
[0072] Step 1: Sensor installation:
[0073] Install the RTK device in the center of the top of the mine car, align the front and rear edges of the car body to facilitate differential positioning and TF coordinate conversion, set up data interaction mode, and transmit data to the mine integrated dispatching center through the wireless network;
[0074] The GPU computing platform is installed in the mine integrated dispatching center to facilitate the collection and transfer of mine car positioning data. The platform has a built-in road network model construction algorithm that can convert input data into a road network model;
[0075] The local server is installed in the mine integrated dispatching center to facilitate the acquisition of the road network model generated by the GPU computing platform, and the flask library is used to build a visual interface for the road network model. The characteristics of the mine road are:
[0076] Most of the roads in the mining area are earth slopes. Except for the main roads, the width of the roadsides is uncertain. The trajectory data in the flat areas with no driving restrictions, such as meeting and parking areas, are relatively messy. The trajectory data in the low-signal areas is prone to missing and offset, or even broken. Roads with sparse trajectory data are difficult to be identified normally, and the trajectory data of adjacent roads are prone to overlap.
[0077] The truck trajectory data is obtained through the RTK sensor and sent to the GPU computing platform of the integrated dispatch center. After preprocessing the trajectory data, the trajectory data is merged and rasterized. According to the pre-input parameters, the road network structure classes such as points, grids, and road networks are created. The GPU computing platform refines the raster data into a grid skeleton diagram after preprocessing, reorganizes it into a road network structure diagram in combination with the trajectory information, and counts and calculates other attributes and information of the road network, generates a road network visualization effect, and returns a road network object. After obtaining the road network object, the application functions of the road network model can be provided through built-in data and function functions.
[0078] Step 2: Track data recording:
[0079] Start the vehicle and RTK sensor, keep the vehicle running normally, record all the track data during the entire operation cycle of the mining truck and save it into a bag file. The file includes timestamp, mileage, longitude, latitude, altitude and other data, which can accurately provide the driving track data of the mining truck.
[0080] Step 3: Trajectory data preprocessing:
[0081] Read the trajectory data, use rosbag to parse the bag file, and convert the trajectory information into a csv file to reduce the memory space occupied by data reading. Delete the trajectories with abnormal coordinates and attributes, and store them as ndarray arrays to facilitate matrix calculations. Convert each bag file into an array and sort them by vehicle and timestamp. After processing, obtain trajectory data without obvious abnormalities, reducing the impact of data noise.
[0082] Step 4: Rasterize trajectory data:
[0083] The trajectory data is rasterized, and the longitude and latitude returned by the RTK sensor are grouped according to the preset width, and the corresponding data is assigned to the corresponding grid. The grid dimension is three-dimensional, the first two dimensions are the grid coordinates, and the third dimension is the component objects of the grid. If the number of objects is 1, the object is the entire grid. In this way, a variable grid road network is realized and the road network accuracy is improved.
[0084] Rasterize the trajectory data and use the raster map to convert the trajectory data, a vector data, into raster data to match the raster map, which is convenient for subsequent process processing. At the same time, the rasterization effect is used to reduce the amount of data and data fluctuations. Create a raster array based on the pre-input grid width. The grid index is three-dimensional. The first two dimensions are the grid coordinates, and the last dimension is the grid object sequence number. The last dimension is the entire raster object when it is created, and the default index is 0. Import the trajectory data into the grid of the corresponding range. The calculation formula for converting the trajectory coordinates to the raster coordinates is as follows:
[0085]
[0086] Among them, x i ,y i is the coordinate of a point (x, y), X i , Y i is the trajectory point (x i ,y i ) corresponding to the grid coordinates, x min ,y min is the minimum value of the coordinates in the x and y directions, l cell is the grid side length.
[0087] Step 5: Raster data acquisition and processing:
[0088] The rasterized trajectory data is processed to analyze the internal properties of the grid. The attribute values are stored in a matrix to facilitate subsequent use or calculation. In the subsequent subscripts, (i, j) indicates that the point is located in the i-th row and j-th column of the matrix. No subscript indicates that the data is the entire matrix.
[0089] 5.1 Raster Binarization
[0090] Set the number of trajectory points N in the grid (i,j) As the value of the grid, then the point type of the grid is determined according to the threshold T. If the number of trajectory points in the grid is greater than the threshold, the grid is a foreground point, otherwise it is a background point. Therefore, the calculation formula of the grid binary matrix P is as follows:
[0091]
[0092] Grid binarization divides the number of trajectory points in the grid according to the threshold T, which not only highlights the digital features of the grid, but also facilitates the judgment of the properties of the grid in subsequent use and simplifies the calculation steps.
[0093] 5.2 Grid ID
[0094] In order to facilitate the indexing of the grid, a unique identifier is set for the grid according to the position and object characteristics of the grid. Since the grid used in this method is a variable grid, the grid is subdivided into nine parts of 3*3. From top to bottom and from left to right, numbers 1-9 are assigned to the corresponding grids. At the same time, the number 0 indicates the termination of the division and refers to the current grid. Therefore, the grid ID calculation formula is defined as follows:
[0095]
[0096] Where d is the number of times the coordinate grid is divided into sub-grids, k z It is the label of the sub-grid. If the grid has no sub-grid, the ID is an integer.
[0097] 5.3 Average grid speed
[0098] In order to facilitate the judgment of grid properties and analyze constraints such as speed limits after road generation, it is necessary to calculate the average speed of the grid. The calculation formula is as follows:
[0099]
[0100] Among them, x is the x-axis coordinate of the trajectory point, y is the y-axis coordinate of the trajectory point, t is the timestamp corresponding to the point, and the subscript (i, j, k) refers to the kth trajectory point in the grid with i rows and j columns.
[0101] In mines, the upper limit of the road speed is generally about 5.6m / s, and the average running speed of the mine car is not less than 2.8m / s. Therefore, it is stipulated that when the speed is greater than 2.8m / s, the grid is a driving point, when the speed is between 1.4m / s-2.8m / s, the grid is a slow-moving point, and when the speed is less than 1.4m / s, the grid is a stop point.
[0102] 5.4 Grid Offset
[0103] In raster data processing, adjacent raster data or attributes are often used. In order to facilitate calculation, the raster needs to be offset. If the matrix is expanded around a circle and the expanded value is 0, then this matrix is called an expanded matrix. In the expanded matrix, the submatrix whose matrix size is equal to the original matrix size is called an offset matrix. For a matrix A1, its expanded matrix is A, then A1 is equivalent to the non-offset matrix of A. Let the corresponding relationship between the offset direction and the number be as follows Figure 2 As shown, the offset matrices in other directions are called A2, A3, A4, A5, A6, A7, A8, and A9. This type of offset can be performed on any matrix and point. The naming method is the same as shown above and will not be described in the subsequent use.
[0104] 5.5 Number of grid neighbor points
[0105] The number of neighbor points of a grid can reflect the relative relationship and characteristics between grids. It is an important indicator for judging the connectivity of grids and the basic basis for judging the properties of grids. The calculation formula is as follows:
[0106]
[0107] At this time, if the grid is a foreground point, the number of neighbor points is normal, and if the grid is a background point, the number of neighbor points is -1.
[0108] 5.6 Grid Connectivity Orientation
[0109] The connected orientation of a raster is a matrix that reflects the connectivity of the raster in orientation. It can calculate information such as connected domains and neighboring rasters, and plays an important role in the raster vectorization process. The connected orientation can be divided into four orientations or eight orientations, sorted counterclockwise. The order of the four orientations is top, right, bottom, and left. The order of the eight orientations is top, upper right, right, lower right, bottom, lower left, left, and upper left. Binary numbers with the same number of digits are used for storage. The calculation formula is as follows:
[0110] The raster data acquisition and processing in step 5 is to acquire the internal attributes of the raster data obtained in step 4, and store the corresponding data as matrix data according to the coordinates, so as to facilitate the subsequent analysis and processing of the road network model;
[0111] Step 5.1: Raster binarization highlights the raster features and simplifies the numerical calculation;
[0112] Step 5.2 Grid ID is to index the correct grid through the canonical unique identifier;
[0113] Step 5.3 The grid average speed is used to collect road information after the road is generated;
[0114] Step 5.4 grid offset is a description of the eight-azimuth shift of the grid, indicating that the data here is the data after the corresponding azimuth grid offset;
[0115] Step 5.5 The number of grid neighbor points is an important indicator for judging grid connectivity;
[0116] Step 5.6 The grid connectivity orientation is the spatial connectivity information of the raster data.
[0117] The above steps can be used to obtain the internal attributes of the grid. These internal attributes can be combined into matrix data according to the same coordinates to facilitate subsequent calls and calculations.
[0118] Step 6: Raster feature extraction:
[0119] The raster data is processed to remove unreasonable data features, and the remaining features are refined into a raster skeleton to obtain grid points that meet the road characteristics.
[0120] 6.1 Grid Expansion
[0121] In order to ensure that the characteristics of the raster data will not change significantly due to the expansion algorithm, only the non-middle point grids are expanded, and the surrounding background points are modified to foreground points. The other data after expansion are references to the original data to reduce the algorithm overhead and avoid the position offset caused by the expansion algorithm.
[0122] 6.2 Grid reverse connectivity detection
[0123] The expanded grid data is further optimized to reduce the impact of burrs and adjacent tracks. The expanded grid data is reversed and the Seed-Filling algorithm is used to find the connected domains in the graph. The connected directions are 4 directions. All connected domains with less than 10 grids or less than 3 connected widths are counted and reversed.
[0124] 6.3 Grid Refinement
[0125] In order to extract the skeleton features of raster data, the improved Zhang-Suen thinning algorithm is used to process the raster image. The points in the raster image are iterated in sequence. Let the current point be P1. The positions and corresponding relationships of adjacent raster points are as follows: Figure 2 As shown, first determine whether the point is a point that needs to be deleted. The judgment condition is:
[0126] 2≤B(P1)≤7
[0127]
[0128] Among them, B(P1) refers to the number of neighboring points of the point, and C(P1) refers to the connectivity corresponding to the point.
[0129] If the point meets the following conditions at the same time, delete the point, first delete the southeast boundary point and northwest corner, the conditions are:
[0130] P2*P4*P6=0
[0131] P4*P6*P8=0
[0132] After one pass, delete the northwest boundary point and the southeast corner:
[0133] P2*P4*P8=0
[0134] P2*P6*P8=0
[0135] The above two directions are traversed repeatedly until there are no points that can be deleted. At this time, the grid skeleton extraction is completed, and the remaining points are all grid skeleton points, which can be regarded as the location of the road centerline.
[0136] Step 7: Road network connection:
[0137] 7.1 Generate raster type matrix
[0138] In order to vectorize the grid skeleton, it is necessary to determine the type of grid to facilitate road identification. First, the grid neighbor point number matrix B is used as the basis: when the number of neighbor points is -1, the point is a background point; when the number of neighbor points is 0, the point is a discrete point; when the number of neighbor points is 1, the point is the starting point; when the number of neighbor points is 2, the point is the middle point; when the number of neighbor points is greater than or equal to 3, the point is the middle point or joint point. When the connectivity matrix C is used as the basis for judgment, it is found that: when the connectivity is not 2, the point must not be the middle point; when the connectivity is equal to 2, if the point is opposite in four directions, the point is the middle point; when the connectivity is equal to 2, if the point is adjacent in four directions, the point is a joint point. Therefore, the calculation method of the grid type matrix M is as follows, and all matrices are given in step 5:
[0139]
[0140] At this time, when the type value is -1, the point is a background point; when the type value is 0, the point is a discrete point; when the type value is 1, the point is a starting point; when the type value is 2, the point is an intermediate point; when the type value is greater than or equal to 3, the point is a joint point.
[0141] 7.2 Raster to Vectorization
[0142] Raster vectorization converts raster data back into vector data to obtain a real road network. The raster tracing algorithm is one of the most commonly used raster vectorization algorithms. It traverses the raster data from left to right and from top to bottom. Suppose the traversed grid point is P1, and the grid position is as follows: Figure 2 As shown. If the coordinates of P1 are not recorded, P1 is recorded and the number of foreground points in the neighborhood of P1, B(P1), is counted. If B(P1) is equal to 0, the new search point is the next grid in sequence; otherwise, P1 and its neighborhood point P are counted. i (i=2,3,4…), and set the new search point to P i The above process is repeated until there are no new search points. After the tracking is completed, all spatially connected roads are extracted.
[0143] 7.3 Road Network Reconstruction Based on Time Series
[0144] The trajectory sequence is matched with the grid point relationship, and the coordinates are matched to the road nodes in the road network structure diagram. If there is a common node between the two points, the path between the two points in the node is recorded; if there is no common node but there is a path with a total length of less than 40m in the road node where the two points are located, the minimum connected path between the two points is recorded; otherwise, the road nodes are considered to be directly connected, and all points on the road are traversed to find the point position where the minimum distance between the roads is located, connect the corresponding two points, and use the line between the two points as the path. After the traversal is completed, the unread roads are deleted to obtain the reconstructed road network. The reconstructed road network corrects the shortcomings of raster vectorization based on the time information contained in the trajectory, reduces the influence of adjacent roads and discrete points on the actual road structure, makes the road network more accurate, and the roads are more consistent with reality.
[0145] Step 8: Construction of road network structure diagram:
[0146] The physical structure of the road network, namely the roads, has been extracted. In order to facilitate the call of the road network, road search and path search, it is necessary to construct a structural diagram of the road network to realize the topological logic of the road network. The basic road network structure diagram is a point-to-point structure, with the road endpoints as vertices, and the road length, slope and other attributes as the weights of the structure diagram. In order to simplify the road network structure diagram, speed up trajectory calculation, fit the actual trajectory, focus on the connection relationship of the roads, facilitate the conversion from point matching to road matching, improve the topological structure of the road network, and propose a point-road-point road network model structure. Read the constructed roads, take the road itself and the starting point of the road as the vertices of the road network structure diagram, and connect them in a point-road-point manner. The middle points of the road do not interact with the points outside the road and are therefore not displayed. For example Figure 3 As shown in the figure, the point-point structure on the left merges the links that do not interact with other points to obtain new nodes, thereby generating the point-road-point structure on the right. Since the intermediate points of the road are unidirectionally connected and the number of intermediate points is much larger than the number of other types of points, this structure can greatly reduce the complexity of the road network model. When necessary, the road can be expanded to perform operations such as fast restoration.
[0147] A directed cyclic graph with a point-road-point structure is proposed as the road network structure. The endpoints of the roads and the road indexes themselves are regarded as graph nodes. Compared with the commonly used point-point structure, it can greatly reduce the complexity of the road network model.
[0148] Step 9: Road Network Visualization
[0149] The physical and logical structures of the road network have been constructed. To facilitate the use of the road network model, the model is visualized. The visualization includes:
[0150] (1) Use the matplotlib library to display intermediate variables or results such as road network grids, road networks, and road network sequences. By displaying information about intermediate variables and change processes, the entire process of road network processing can be seen, making it easier to modify intermediate variables of the road network.
[0151] (2) Use the matplotlib library and networkx library to draw the road network structure diagram, including the functions of double-clicking the right button to create a node, dragging the left button to draw an edge, and double-clicking the right button to delete a node. This step shows that this method generates the topological structure of the road network. At the same time, it provides the modification logic of the road network to realize the variability of the real road network and improve the applicability of the road network model.
[0152] (3) Use the flask library and Baidu Map API to generate an operational web page, and provide map visualization and information display on the web page. Use flask as the backend and link the road network model, convert the corresponding parameters of the model into json data and pass it to the front end, use jquery in javascript to asynchronously send and receive json data, and convert it into points, roads and other shapes provided by Baidu Map API for display. When the front-end data changes, or the front-end uploads a new data file, the built-in receiving function of flask is used to obtain data and update the road network. After the update is completed, the corresponding tile information is modified and sent back to the front-end for display. This step is a comprehensive visualization of the road network model and functions, and is an important part of the road network model application. The road network object refers to a Python class that stores all the data and logical structure of the road network model, a Python object used to create a map, and stores all the result data after creation. The corresponding data can be converted into commonly used data files, including csv, json, etc., by exporting them as files, or the object can be directly applied through Python, and the built-in data and function functions can be directly used to implement additional operations.
[0153] After the map is built, deploy the flask code on the local server, and use the web page and API link to obtain map data or operate map objects. If the user wants to develop faster or more complex, the source code can be used to directly obtain the map object. It can meet more road network model usage scenarios on a fast basis.
Claims
1. A method for quickly constructing an open-pit mine road network model based on GPS trajectory data, characterized in that: The steps include: Step 1: Install the RTK sensor device on the top of the mine car; Step 2: Record the trajectory data through the RTK sensor to obtain the trajectory data; Step 3: preprocessing the trajectory data; Step 4: rasterize the preprocessed trajectory data to obtain raster data; Step 5: Get the internal attributes of the raster data and store the corresponding data as matrix data according to the coordinates; Step 6: Extract road features using raster data; Step 7: Connect road features through time series information and generate road network roads; Step 8: Construct the road network structure based on the road network information; Step 9: Visualize the road network based on the road network structure and feature information.
2. A method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: In step 1, the vehicle positioning information is obtained by installing an RTK sensor on the mining car, the continuous positioning data is converted into trajectory data, the trajectory data is collected and processed using a GPU computing platform installed in the integrated dispatching center, a road network model is generated, and finally the road network is displayed using a local server that receives the model data and performs visualization.
3. The method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: The step 2 is specifically as follows: Start the vehicle and RTK sensor, keep the vehicle running normally, record all trajectory data during the entire operation cycle of the mine car and save them into a bag file; the bag file includes timestamp, mileage, longitude, latitude, and altitude data.
4. The method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: The step 3 is specifically as follows: The trajectory data is read, and the bag file is parsed using rosbag. The trajectory information is converted into a csv file, and the trajectories with abnormal coordinates and attributes are deleted and stored as ndarray arrays. Each bag file is converted into an array and sorted by vehicle and timestamp. After processing, trajectory data without obvious abnormalities is obtained.
5. The method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: The step 4 is specifically as follows: The trajectory data without obvious anomalies are rasterized, and the vector data of the trajectory data is converted into raster data using the raster map to match the raster map; Create a grid array based on the pre-input grid width. The grid index is three-dimensional. The first two dimensions are grid coordinates, and the last dimension is the grid object serial number. The last dimension is the entire grid object when it is created, and the default index is 0. Import the trajectory data into the grid of the corresponding range. The calculation formula for converting trajectory coordinates to grid coordinates is as follows: Among them, x i ,y i is the coordinate of a point (x, y), X i , Y i is the trajectory point (x i ,y i ) corresponding to the grid coordinates, x min ,y min is the minimum value of the coordinates in the x and y directions, l cell is the grid side length.
6. The method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: The step 5 is specifically to obtain the internal attribute data of the raster data and store the corresponding data as matrix data according to the coordinates, specifically: 5.1 Raster Binarization: Set the number of trajectory points N in the grid (i,j) As the value of the grid, then the point type of the grid is determined according to the threshold T. If the number of trajectory points in the grid is greater than the threshold, the grid is a foreground point, otherwise it is a background point. The calculation formula of the grid binary matrix P is as follows: 5.2 Grid ID: A unique identifier is set for the grid according to the grid's position and object characteristics. The grid is subdivided by dividing the grid. The number 0 indicates the end of the division and refers to the current grid. The formula for calculating the grid ID is defined as follows: Where d is the number of times the coordinate grid is divided into sub-grids, k z is the label of the subgrid. If the grid has no subgrid, the ID is an integer. 5.3 Average grid speed Calculate the average speed of the grid using the following formula: Where x is the x-axis coordinate of the trajectory point, y is the y-axis coordinate of the trajectory point, t is the timestamp corresponding to the point, and the subscript (i, j, k) refers to the kth trajectory point in the grid with i rows and j columns; 5.4 Grid Offset In raster data processing, the position of the raster is offset. If any matrix is extended once around and the extended value is 0, the matrix is called an extended matrix. In the extended matrix, the submatrix whose matrix size is equal to the original matrix size is called an offset matrix. For a matrix A1, its extended matrix is A, then A1 is equivalent to the non-offset matrix of A. 5.5 Number of grid neighbor points The formula for calculating the number of neighbor points of a grid is as follows: At this time, if the grid is a foreground point, the number of neighbor points is normal, if the grid is a background point, the number of neighbor points is -1; 5.6 Grid Connectivity Orientation The connected directions of the grid are divided into four directions or eight directions, which are sorted counterclockwise. The order of the four directions is up, right, down, and left. The order of the eight directions is up, upper right, right, lower right, down, lower left, left, and upper left. Binary numbers with the same digits are used for storage. The calculation formula is as follows:
7. The method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: The step 6 processes the grid data, removes unreasonable data features, retains grid points that meet the actual road conditions, and refines the remaining features into a grid skeleton to obtain grid points that meet the road characteristics. The processed skeleton width is 1 grid, which is used as the road centerline for subsequent use; Specifically: Step 6.1: Grid expansion: Expand the grid data; Step 6.2: Grid reverse connected domain processing fills scattered background points and removes noise; Step 6.3: Use grid refinement to extract the processed grid skeleton to ensure that the grid width of the processed grid image is only 1 grid.
8. The method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: The step 7 is specifically as follows: Step 7.1: Match the raster data with the actual road conditions to generate a raster type matrix; Step 7.2: Convert the discrete raster into spatially connected roads by raster vectorization; Step 7.3: Reconstruct the rasterized roads into vectorized ones through time-series-based road network reconstruction to obtain more realistic roads.
9. The method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: The step 8 constructs a road network structure diagram, taking the road itself and the starting point of the road as the vertices of the road network structure diagram, and connecting them in a point-road-point manner.
10. The method for rapidly constructing an open-pit mine road network model based on GPS trajectory data according to claim 1, characterized in that: The road network visualization of step 9 is specifically as follows: (1) Use the matplotlib library to display intermediate variables or results of road network grids, road networks, and road network sequences; (2) Use the matplotlib library and networkx library to draw a road network structure diagram, including double-clicking the right button to create a node, dragging the left button to draw an edge, and double-clicking the right button to delete a node; (3) Use the flask library and Baidu Map API to generate an operational web page, and provide map visualization and information display on the web page.
Citation Information
Cited By
Method for quickly converting coordinate formats of mineral resource reserve database in batches and related equipment
CN120216577A