Checkpoint classification method, device and computer storage medium based on road network
Through the automated classification method of graph structure based on road network data, the problem of low efficiency in traditional bayonet point classification is solved, and efficient and accurate bayonet point classification and naming is achieved, which is suitable for intelligent security systems.
Patent Information
- Application Number
- CN202310121004.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-18
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2043-01-18
AI Technical Summary
The attribute labeling and maintenance efficiency of traditional bayonet points is low. With the popularization of high-definition video surveillance and the expansion of bayonet scale, maintenance is difficult and it is difficult to efficiently classify and manage.
A graph structure is constructed based on road network data, and by identifying block areas, intersection areas and section areas, using the latitude and longitude range of the bayonets to automatically classify them into the corresponding traffic area, and using the nodes and edge relationships in the graph structure for classification.
It realizes the automated classification and naming of caliper points, reduces labor costs, improves classification efficiency and accuracy, and is suitable for intelligent security systems with massive video data.
Smart Images

Figure CN116049338B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic security technology, and in particular to a checkpoint classification method based on a road network, a checkpoint classification device, and a computer storage medium. Background Art
[0002] In recent years, with the continuous investment of governments and enterprises in the construction of smart cities and social monitoring, more and more video surveillance equipment will be deployed, which will also generate massive amounts of video data, thereby promoting security to move towards intelligence and big data.
[0003] The attributes of traditional checkpoints are manually labeled and maintained (classifications such as intersections, roadside, within parks, etc., and naming), which is inefficient. Moreover, with the gradual promotion and popularization of high-definition video surveillance, the scale of checkpoints is getting larger and larger, and maintenance will become increasingly difficult. Summary of the Invention
[0004] The present application provides a checkpoint classification method based on a road network, a checkpoint classification device, and a computer storage medium.
[0005] A technical solution adopted in this application is to provide a checkpoint classification method based on a road network, the checkpoint classification method comprising:
[0006] Obtain a checkpoint set to be classified, and determine the point classification range based on the latitude and longitude range of the checkpoints in the checkpoint set;
[0007] Acquire corresponding road network data according to the point classification range, wherein the road network data includes a plurality of road data;
[0008] Constructing a graph structure according to endpoints and road relationships of the plurality of road data;
[0009] Identifying block areas, intersection areas, and road section areas in the graph structure;
[0010] According to the positional relationship between each checkpoint in the checkpoint set and the block area, the intersection area, and the road section area, the checkpoints are classified into corresponding areas.
[0011] The graph structure includes a number of nodes and road segments between adjacent nodes;
[0012] The identifying of block areas, intersection areas, and road section areas in the graph structure includes:
[0013] The block area is formed according to a closed area formed by a plurality of road segments connected at nodes in the graph structure;
[0014] Obtaining intersections from the plurality of nodes, and forming the intersection area according to positions of the intersections that meet the preset intersection conditions;
[0015] According to the distance between the adjacent intersection areas, the road section between the two intersection areas whose distance is greater than the first preset distance threshold is determined as the road section area.
[0016] Wherein, before forming the block area according to the closed area formed by a plurality of road segments connected at nodes in the graph structure, the checkpoint point classification method obtains the road segments formed by adjacent nodes in the graph structure;
[0017] When at least two road sections intersect, the at least two road sections are cut off at the intersection to form new road sections;
[0018] When there are two continuous road segments that do not intersect with other road segments, the two road segments are merged into a new road segment.
[0019] The intersection is a node in the graph structure that connects at least three road segments;
[0020] The forming of the intersection area according to the positions of the intersections meeting the preset intersection conditions includes:
[0021] Starting from the position of each unmarked intersection, search for all unmarked intersections whose neighboring distance is less than a second preset distance threshold, form an intersection area with the positions of the unmarked intersections and the positions of the searched intersections, and mark all intersections in the intersection area;
[0022] Traverse all intersections until all intersections are marked, and then obtain all the intersection areas.
[0023] The step of classifying the checkpoints into corresponding areas according to the positional relationship between each checkpoint in the checkpoint set and the block area, the intersection area, and the road section area includes:
[0024] Get the block search range of each checkpoint;
[0025] If there are no longitude and latitude points of the boundary road section of the block area within the block search range, the checkpoint points are classified into corresponding block areas according to the positions of the checkpoints.
[0026] The checkpoint classification method includes:
[0027] Obtaining the longitude and latitude points of the boundary sections of all the block areas;
[0028] Determining whether the distance between adjacent longitude and latitude points on the same boundary section is greater than a fourth preset distance threshold;
[0029] If so, new longitude and latitude points are inserted at equal intervals between the adjacent longitude and latitude points.
[0030] The checkpoint classification method includes:
[0031] Converting the longitude and latitude points of the boundary sections of all the block areas into grid points according to a preset scaling factor to grid the road network data;
[0032] Get the grid block search range of each bayonet;
[0033] If there is no grid point of the boundary road section of the block area within the grid block search range, the checkpoint point is classified into the corresponding block area according to the position of the checkpoint.
[0034] After obtaining the block search range of each checkpoint, the checkpoint point classification method further includes:
[0035] If there is any longitude and latitude point of a boundary road section of the block area within the block search range, obtaining the intersection search range of the checkpoint;
[0036] If there is at least one longitude and latitude point of an intersection area within the intersection search range, the checkpoint points are classified into corresponding intersection areas according to the positions of the checkpoints.
[0037] After obtaining the intersection search range of the checkpoint, the checkpoint point classification method further includes:
[0038] If the longitude and latitude points of all the intersection areas do not exist within the intersection search range, the checkpoint points are classified into corresponding road section areas according to the positions of the checkpoints.
[0039] Wherein, after classifying the checkpoints into corresponding areas according to the positional relationship between each checkpoint in the checkpoint set and the block area, the intersection area, and the road section area, the checkpoint point classification method further includes:
[0040] Each checkpoint in the checkpoint set is named according to the name of the area to which it is classified.
[0041] Another technical solution adopted by the present application is to provide a checkpoint point classification device, the checkpoint point classification device comprising a memory and a processor coupled to the memory;
[0042] The memory is used to store program data, and the processor is used to execute the program data to implement the checkpoint point classification method as described above.
[0043] Another technical solution adopted in the present application is to provide a computer storage medium, which is used to store program data. When the program data is executed by a computer, it is used to implement the above-mentioned checkpoint point classification method.
[0044] The beneficial effects of the present application are as follows: the checkpoint point classification device obtains a checkpoint set to be classified, and determines the point classification range based on the latitude and longitude range of the checkpoints in the checkpoint set; obtains corresponding road network data according to the point classification range, wherein the road network data includes a plurality of road data; constructs a graph structure according to the endpoints and road relationships of the plurality of road data; identifies block areas, intersection areas, and road section areas in the graph structure; and classifies the checkpoints into corresponding areas according to the positional relationship between each checkpoint in the checkpoint set and the block area, intersection area, and road section area. The checkpoint point classification method of the present application analyzes different types of traffic areas based on open source road network data, and automatically classifies each checkpoint into the corresponding traffic area according to the positional relationship, making it easy to retrieve relevant checkpoints based on the traffic area. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0046] Figure 1 This is a schematic diagram of the structure of an embodiment of the OSM road network provided by this application;
[0047] Figure 2 This is a flow chart of an embodiment of the checkpoint classification method provided by this application;
[0048] Figure 3 This is a schematic diagram of the overall process of the checkpoint classification method provided by this application;
[0049] Figure 4 This is a schematic diagram of the specific effect of the road network data provided by this application;
[0050] Figure 5 This is a schematic diagram of the detailed information of the OSM road network data provided by this application;
[0051] Figure 6 This is a schematic diagram of the simplified road network data provided by this application;
[0052] Figure 7yes Figure 2 The specific flow diagram of step S14 of the checkpoint point classification method shown;
[0053] Figure 8 It is a schematic diagram of the block area division effect provided by this application;
[0054] Figure 9 is a schematic diagram of intersections extracted from the road network data provided by this application;
[0055] Figure 10 This is a schematic diagram of the intersection area division effect provided by this application;
[0056] Figure 11 This is a schematic diagram of an embodiment of a filtering road provided by the present application;
[0057] Figure 12 This is a schematic diagram of the overall process of dividing the areas to which the checkpoints belong provided by this application;
[0058] Figure 13 yes Figure 2 The specific flow diagram of step S15 of the checkpoint point classification method shown;
[0059] Figure 14 This is a structural diagram of an embodiment of a checkpoint classification device provided by the present application;
[0060] Figure 15 It is a structural diagram of an embodiment of a computer storage medium provided by this application. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0062] The present application provides a method for classifying and naming checkpoints based on a road network, which mainly involves the fields of transportation, geography, and security, and in particular involves road network processing and regional division and identification. It mainly divides the space into blocks, intersections, and sections through road network processing, and absorbs surrounding checkpoints for classification and naming.
[0063] The technical terms involved in this application include but are not limited to:
[0064] Graph Data Structure: A graph is a data structure in which a node can have zero or more adjacent elements. The connection between two nodes is called an edge. Nodes in a graph are also called vertices, and the path from one vertex to another is called a path. Specific graph structure types include undirected graphs, directed graphs, and weighted graphs.
[0065] OSM road network (such as Figure 1 The road network refers to the underlying road data of a map. Each piece of data represents a small road segment, consisting of a series of longitude and latitude points, along with information such as road type, name, and direction. Baidu, AutoNavi, and NavInfo use commercial map data, while OSM (OpenStreetMap) is used here as open source road network data.
[0066] In conjunction with the above introduction, please refer to Figure 2 and Figure 3 , Figure 2 This is a flow chart of an embodiment of the checkpoint classification method provided by this application. Figure 3 This is a schematic diagram of the overall process of the checkpoint classification method provided in this application.
[0067] The checkpoint classification method of the present application is applied to a checkpoint classification device. The checkpoint classification device of the present application can be a server or a system comprising a server and a local terminal. Accordingly, the various components of the checkpoint classification device, such as the various units, subunits, modules, and submodules, can be entirely disposed in the server or separately disposed in the server and the local terminal.
[0068] Furthermore, the above-mentioned server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules, such as software or software modules used to provide distributed servers, or it can be implemented as a single software or software module, which is not specifically limited here. In some possible implementations, the checkpoint classification method of the embodiment of the present application can be implemented by a processor calling computer-readable instructions stored in a memory.
[0069] Specifically, if Figure 2 As shown, the checkpoint classification method of the embodiment of the present application specifically includes the following steps:
[0070] Step S11: Obtain a checkpoint set to be classified, and determine the point classification range according to the latitude and longitude range of the checkpoints in the checkpoint set.
[0071] In an embodiment of the present application, a checkpoint point classification device obtains an area to be classified, such as a checkpoint set consisting of all checkpoints to be classified in the current city, and calculates the latitude and longitude ranges of the checkpoint points in the checkpoint set.
[0072] Specifically, the checkpoint classification device counts the longitude and latitude of all checkpoint points in the checkpoint set, thereby obtaining the maximum and minimum values of longitude, as well as the maximum and minimum values of latitude, and thus obtaining the longitude and latitude range of the checkpoints in the checkpoint set.
[0073] Furthermore, the checkpoint point classification device also needs to determine the point classification range according to the above-mentioned longitude and latitude range. In one embodiment, the checkpoint point classification device can directly use the longitude and latitude range as the point classification range. In another embodiment, the checkpoint point classification device can also slightly expand the longitude and latitude range boundaries to determine the point classification range, thereby avoiding the loss of relevant roads at the boundary. For example, the checkpoint point classification device can subtract a preset value, such as 0.001, from the minimum longitude and latitude values and add a preset value, such as 0.001, to the maximum value to determine the final point classification range.
[0074] Step S12: Obtain corresponding road network data according to the point classification range, wherein the road network data includes a plurality of road data.
[0075] In an embodiment of the present application, the checkpoint point classification device obtains corresponding road network data according to the point classification range, wherein the road network data includes a plurality of road data.
[0076] Specifically, the checkpoint classification device traverses the OSM road network data and extracts all road data that intersect with the point classification range determined in step S11. The specific method is to traverse all the longitude and latitude data of each road data. If the longitude and latitude of at least one road point of a road data falls within the point classification range, then the road data is retained. For a specific schematic diagram of the road network data, please refer to Figure 4 ,like Figure 4 As shown in the figure, the dots are the checkpoints and the black lines are the retained road data.
[0077] Furthermore, the checkpoint classification device can further simplify the road data. Specifically, in one embodiment, the checkpoint classification device can only retain higher-level road data and eliminate road data of lower levels, such as small roads within parks and schools, to avoid subsequent identification blocks being too small.
[0078] The checkpoint sorting device can combine two methods to eliminate small paths:
[0079] The first method removes unnamed roads, as major roads generally have names, while most minor roads do not. The second method filters minor roads based on road categories and corresponding descriptions in the OSM road network data. Since the second method relies on road categories, which are not always accurate, combining it with the first method can achieve more accurate results.
[0080] like Figure 5 and Figure 6 As shown, Figure 5 This is a schematic diagram of the detailed information of OSM road network data provided by this application. Figure 6 This is a schematic diagram of the simplified road network data provided by this application. Figure 5 As shown, the road data in the "Very small roads", "Paths unsuitable for cars" and "Unknown" ranges in the detailed information table, that is, Figure 5 The road data selected in the box can be removed, so as to simplify the road network data and form the following Figure 6 road network data.
[0081] Step S13: Construct a graph structure according to endpoints and road relationships of a plurality of road data.
[0082] In an embodiment of the present application, the checkpoint point classification device constructs a graph structure according to the endpoints and road relationships of a number of road data, wherein the endpoints of all road data are constructed into nodes, and all road relationships connected by the same endpoint constitute edges, whose weight is the road length, forming a graph structure of an undirected weighted graph.
[0083] It should be noted that, in addition to the starting point and the end point of the road data, the endpoints of the road data should also include the road points that intersect with other road data, that is, the road points with the same longitude and latitude.
[0084] Step S14: Identify block areas, intersection areas, and road section areas in the graph structure.
[0085] In an embodiment of the present application, the checkpoint classification device divides the entire road network data into block areas, intersection areas, and section areas based on the nodes and edges in the graph structure.
[0086] Intersections and road sections are key traffic elements. Intersections are high-incidence areas for traffic violations and accidents, involving changes in route such as straight driving and turning. Road sections are high-incidence areas for violations such as speeding. Vehicle capture is rare in areas such as hospitals, supermarkets, schools, parks, and various buildings, so they can be divided into these three categories based on the scene.
[0087] The above three area division methods can be divided according to the results of conventional model recognition, manually by staff, or based on prior information of urban planning.
[0088] In a specific embodiment, the checkpoint classification device can divide the area according to the relationship between nodes and edges in the graph structure, which can effectively improve the accuracy of area division. Figure 7 , Figure 7 yes Figure 2 The specific flow chart of step S14 of the checkpoint point classification method is shown.
[0089] Specifically, if Figure 7 As shown, the checkpoint classification method of the embodiment of the present application specifically includes the following steps:
[0090] Step S141: forming a block area according to a closed area formed by a number of road segments connected at nodes in the graph structure.
[0091] In the embodiment of the present application, the checkpoint classification device is based on the line segment intersection judgment and cutting, line segment merging, and generating polygons from the intersection lines based on the geometric algorithm, i.e., the block area. Specifically, the checkpoint classification device directly combines the road segments connected at several endpoints into the outline of an independent block, i.e., forming the block boundary. The closed area formed by the block boundary is the block area. For the effect of the block area division, please refer to Figure 8 , Figure 8 The different color blocks in the image represent different block areas.
[0092] Before identifying the block boundaries, the checkpoint classification device can also perform segment processing on the road segments in the road network data, including but not limited to segment cutting and segment merging:
[0093] 1. Line segment intersection judgment and cutting: If two road segments intersect, the two road segments are cut off at the intersection point and divided into two independent road segments.
[0094] 2. Segment merging: If two segments are continuous and do not intersect with other segments, the two segments can be combined into one segment.
[0095] Step S142: Obtain intersections from a plurality of nodes, and form an intersection area according to the positions of the intersections that meet the preset intersection conditions.
[0096] In the embodiment of the present application, the checkpoint classification device obtains intersections from all nodes in the road network data. The definition of an intersection is as follows: In the graph structure, a node with three or more edges is an intersection. Among them, one edge is a boundary point, two edges are the same road, and three or more edges are intersections. Figure 9 As shown, Figure 9 This is a schematic diagram of intersections extracted from the road network data provided in this application. Figure 9 The positions indicated by the multiple dots in the chart are the intersection positions.
[0097] Then, the checkpoint classification device starts from each intersection and searches for all intersections that can be reached within a certain distance (e.g., within 40 meters). These nearby intersections constitute the same intersection. For example, a search algorithm such as DFS (Depth First Search) can be used:
[0098] (1) Traverse all intersections, which are initially unmarked. If an intersection has been marked, skip it.
[0099] (2) For each intersection, all surrounding reachable nodes can be accessed through the edges connecting the nodes, and whether the edge is less than 40 meters (i.e., the road length) is determined.
[0100] (3) For all reachable nodes visited in (2), determine whether they are intersections and have not been marked. If so, it is the same intersection, mark the node, and repeat the steps (2) to continue searching downward; if not, interrupt the search for the current reachable node, backtrack and search for other reachable nodes.
[0101] (4) Through the above steps, all the intersections that can be reached from one intersection are obtained, that is, the same intersection, and these intersections will be marked to avoid repeated search and access.
[0102] Step S143: According to the distance between adjacent intersection areas, a road section between two intersection areas whose distance is greater than a first preset distance threshold is determined as a road section area.
[0103] In the embodiment of the present application, the checkpoint classification device starts from each intersection in the intersection area determined in step S142 until the intersection and the road network boundary are found. For example, a search algorithm such as a depth-first search (DFS) graph can be used:
[0104] (1) When another intersection is found, all the small road segments between the two adjacent intersections constitute the same complete road segment.
[0105] (2) Searching for the same intersection (such as Figure 10 As shown), these small road segments are intersection data, not road segments.
[0106] (3) When the road network boundary is found, all the small road sections between the intersection and the boundary constitute the same complete road section.
[0107] (4) Another possibility is that the road segment is from the road network boundary to the road network boundary (e.g. Figure 11 As shown in the figure, there is no intersection, so this data is directly filtered, that is, it has no connection with other roads and is an isolated road.
[0108] Step S15: Classify the checkpoints into corresponding areas according to the positional relationship between each checkpoint in the checkpoint set and the block area, intersection area and road section area.
[0109] In the embodiment of the present application, after step S14 and its sub-steps S141 to S143, the checkpoint point classification device divides the road network data into block areas, intersection areas and section areas, and then all the checkpoints in the checkpoint set can be divided into three major types: within the block, intersection, and section according to the positional relationship between their checkpoint points and the block area, intersection area and section area, which is of great significance for practical applications.
[0110] Furthermore, the checkpoint point classification device can also name the divided checkpoints according to the name of the area they describe. For example, if the road section area divided by a checkpoint is "Chenghua Avenue", the name of the checkpoint can be "Chenghua Avenue Checkpoint A".
[0111] Specifically, the checkpoint classification device has already absorbed all checkpoints into appropriate blocks, intersections, and road sections through algorithms and experience. Therefore, checkpoints can be named according to three types and their related road information:
[0112] 1. Naming of checkpoints attached to road sections: directly naming based on the road names in the road network data.
[0113] 2. Naming of checkpoints adsorbed to intersections: An intersection contains several longitude and latitude points. Based on the graph structure established in S13, the connected road sections can be obtained through the longitude and latitude points. The checkpoints can be named as intersections with several road names.
[0114] 3. Naming of the checkpoints adsorbed to the block: The latitude and longitude points of the block outline can be used to index the surrounding road sections, that is, the block surrounded by several roads.
[0115] Specifically, in a specific embodiment, the checkpoint classification device can be used as follows Figure 12 and Figure 13 The checkpoint classification method shown is used to divide the checkpoints, where: Figure 12 This is a schematic diagram of the overall process of dividing the area of the checkpoint provided in this application. Figure 13 yes Figure 2 The specific flow chart of step S15 of the checkpoint point classification method is shown.
[0116] Specifically, if Figure 13 As shown, the checkpoint classification method of the embodiment of the present application specifically includes the following steps:
[0117] Step S151: Obtain the block search range of each camera.
[0118] In the embodiment of the present application, points near the block boundary (road) should not belong to the block, but to the road section or intersection, so it is necessary to first determine whether the checkpoint is near the road (such as within 20 meters).
[0119] Specifically, the checkpoint classification device can traverse the longitude and latitude information of block boundary points and, using a distance threshold, determine whether the checkpoint is near a block boundary (road). Alternatively, the checkpoint classification device can traverse data points near the checkpoint, centered on the checkpoint location, to determine whether a block boundary exists within the checkpoint block search range. If so, the checkpoint is near a block boundary; if not, the checkpoint is within the block.
[0120] In another embodiment, the checkpoint classification device can establish a geographical index to speed up calculations.
[0121] Specifically, the formula for building a combined index is as follows:
[0122]
[0123] k is the scaling factor, for example, k = 1000. The longitude and latitude points of all block boundaries are converted into grid keys through the formula. Each grid is (longitude multiplied by the coefficient and rounded down, latitude multiplied by the coefficient and rounded down), and the entire map can be gridded.
[0124] When searching for roads near each checkpoint, the checkpoint classification device only needs to search all grids within a specified distance (20 meters) from the checkpoint. The combined index query formula is:
[0125]
[0126] 0.0000104 represents 1 meter in longitude, and 0.000009 represents 1 meter in latitude. By taking all integer index keys within the range of key_1 and key_2 and calculating the longitude and latitude points of all block boundaries within the grid, we can determine whether there is a road within 20 meters of the checkpoint.
[0127] Furthermore, in order to avoid matching errors caused by adjacent longitudes and latitudes being too far apart, the checkpoint point classification device can also encrypt the longitude and latitude points of the block boundaries through linear interpolation.
[0128] Specifically, taking the 5-meter interpolation threshold as an example, the distance between the two preceding and following longitude and latitude points is calculated in sequence. If the distance is greater than 5 meters, at least (distance / 5 meters) points need to be inserted, and these longitude and latitude points are inserted at equal intervals.
[0129] Step S152: If there are no longitude and latitude points of the boundary road section of the block area within the block search range, the checkpoint points are classified into corresponding block areas according to the positions of the checkpoints.
[0130] In an embodiment of the present application, if it is determined in step S152 that there are no longitude and latitude points of the boundary road section of the block area within the block search range of the checkpoint point, the checkpoint point is classified into the block area according to the position of the checkpoint.
[0131] Specifically, if the checkpoint is not near the block boundary, the checkpoint classification device uses the geometric algorithm of "whether the polygon contains the point" to determine which block the checkpoint belongs to.
[0132] Specifically, the general algorithm description states: This method counts the number of times a ray starting at point P crosses the polygon's boundary (regardless of the direction of the crossing). If this number is even, the point is outside; otherwise, if the number of crossings is odd, the point is inside. Its correctness is easy to understand, as each time a ray crosses the edge of a polygon, its inside-outside parity changes (because the boundary always separates inside and outside). Ultimately, any ray ends up outside the boundary polygon. Therefore, if the point is inside the polygon, the order of crossing the boundary must be: out > ... > in > out, so the number of crossings must be odd. Similarly, if the point is outside the polygon, the order of crossing the boundary must be in > out ... > in > out, so the number of crossings must be even.
[0133] Step S153: If there is a longitude and latitude point of a boundary road section of any block area within the block search range, the road intersection search range of the checkpoint is obtained.
[0134] In the embodiment of the present application, when the checkpoint classification device determines that the checkpoint is near a block boundary, it further determines whether the checkpoint is near an intersection.
[0135] Specifically, the checkpoint classification device can calculate the intersection search range of the checkpoint based on the location of the checkpoint, and calculate whether there is a latitude and longitude point in the intersection area based on the intersection search range. The calculation process is shown in step S151 and is not further described here. It should be noted that the search distance threshold for the intersection search range is different from the search distance threshold for the block search range. For example, the search distance threshold for the block search range is 20 meters, while the search distance threshold for the intersection search range is 40 meters.
[0136] Step S154: If there is at least one longitude and latitude point of an intersection area within the intersection search range, the checkpoint points are classified into corresponding intersection areas according to the locations of the checkpoints.
[0137] In this embodiment of the present application, when the checkpoint classification device determines that the checkpoint is near an intersection, it classifies the checkpoint into the intersection area according to the checkpoint's location. When the checkpoint classification device determines that the checkpoint is not near an intersection, it classifies the checkpoint into the road section area according to the checkpoint's location, and then proceeds to step S155.
[0138] Furthermore, when the checkpoint classification device adsorbs the checkpoint to the nearest intersection, it can also obtain the latitude and longitude points of the nearest intersection area, and can also quickly determine which intersection it is by constructing an index of the dictionary (latitude and longitude points -> intersection information).
[0139] Step S155: If the longitude and latitude points of all intersection areas do not exist within the intersection search range, the checkpoint points are classified into corresponding road section areas according to the locations of the checkpoints.
[0140] In the embodiment of the present application, the checkpoint classification device can search for the latitude and longitude points of the nearest road section area based on the location of the checkpoint. The calculation process is shown in step S151 and will not be repeated here. It should be noted that the search distance threshold for the road section search range is the same as the search distance threshold for the block search range. For example, the search distance threshold for the block search range is 20 meters, and the search distance threshold for the road section search range is also 20 meters.
[0141] Furthermore, when the checkpoint classification device adsorbs the checkpoint to the nearest road section, it can also obtain the latitude and longitude points of the nearest road section area, and can also quickly determine which road section it is by constructing an index of the dictionary (latitude and longitude points->road section information).
[0142] In an embodiment of the present application, a checkpoint point classification device obtains a checkpoint set to be classified, and determines a point classification range based on the latitude and longitude range of the checkpoints in the checkpoint set; obtains corresponding road network data according to the point classification range, wherein the road network data includes a plurality of road data; constructs a graph structure according to the endpoints of the plurality of road data and the road relationship; identifies block areas, intersection areas, and road section areas in the graph structure; and classifies the checkpoints into corresponding areas according to the positional relationship between each checkpoint in the checkpoint set and the block area, intersection area, and road section area. The checkpoint point classification method of the present application analyzes different types of traffic areas based on open source road network data, and automatically classifies each checkpoint into the corresponding traffic area according to the positional relationship, so as to facilitate the retrieval of relevant checkpoints according to the traffic area. The checkpoint point classification method of the present application proposes a new automatic classification and naming method for checkpoint points, which reduces the cost of a large amount of manpower labeling; it does not rely on trajectory data, is based on open source road network data, and the method has universality and good recognition accuracy.
[0143] The above embodiment is only one common case of the present application and does not limit the technical scope of the present application. Therefore, any minor modifications, equivalent changes or modifications made to the above content based on the essence of the present application solution are still within the scope of the technical solution of the present application.
[0144] Please continue to see Figure 14 , Figure 14 1 is a schematic diagram of a structure of an embodiment of a checkpoint classification device provided by the present application. The checkpoint classification device 500 of the embodiment of the present application includes a processor 51 , a memory 52 , an input / output device 53 , and a bus 54 .
[0145] The processor 51 , the memory 52 , and the input / output device 53 are respectively connected to the bus 54 . The memory 52 stores program data, and the processor 51 is used to execute the program data to implement the checkpoint classification method described in the above embodiment.
[0146] In the embodiment of the present application, the processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having signal processing capabilities. The processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor, or the processor 51 may be any conventional processor.
[0147] This application also provides a computer storage medium, please continue to refer to Figure 15 , Figure 15 It is a structural diagram of an embodiment of a computer storage medium provided in the present application. The computer storage medium 600 stores program data 61. When the program data 61 is executed by the processor, it is used to implement the checkpoint classification method of the above embodiment.
[0148] When the embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0149] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Equivalent structures or equivalent process changes made by utilizing the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A checkpoint classification method based on a road network, characterized in that: The checkpoint classification method includes: Obtain a checkpoint set to be classified, and determine the point classification range based on the latitude and longitude range of the checkpoints in the checkpoint set; Acquire corresponding road network data according to the point classification range, wherein the road network data includes a plurality of road data; Constructing a graph structure according to endpoints and road relationships of the plurality of road data; Identifying block areas, intersection areas, and road section areas in the graph structure; According to the positional relationship between each checkpoint in the checkpoint set and the block area, the intersection area, and the road section area, the checkpoints are classified into corresponding areas.
2. The method for classifying checkpoints according to claim 1, characterized in that: The graph structure includes a number of nodes and road segments between adjacent nodes; The identifying of block areas, intersection areas, and road section areas in the graph structure includes: The block area is formed according to a closed area formed by a plurality of road segments connected at nodes in the graph structure; Obtaining intersections from the plurality of nodes, and forming the intersection area according to positions of the intersections that meet the preset intersection conditions; According to the distance between the adjacent intersection areas, the road section between the two intersection areas whose distance is greater than the first preset distance threshold is determined as the road section area.
3. The method for classifying checkpoints according to claim 2, characterized in that: The closed area formed by a plurality of road sections connected at nodes in the graph structure is formed before the block area is formed, and the checkpoint point classification method is characterized in that: Obtaining a road segment formed by adjacent nodes in the graph structure; When at least two road sections intersect, the at least two road sections are cut off at the intersection to form new road sections; When there are two continuous road segments that do not intersect with other road segments, the two road segments are merged into a new road segment.
4. The method for classifying checkpoints according to claim 2, characterized in that: The intersection is a node in the graph structure that connects at least three road segments; The forming of the intersection area according to the positions of the intersections meeting the preset intersection conditions includes: Starting from the position of each unmarked intersection, search for all unmarked intersections whose neighboring distance is less than a second preset distance threshold, form an intersection area with the positions of the unmarked intersections and the positions of the searched intersections, and mark all intersections in the intersection area; Traverse all intersections until all intersections are marked, and then obtain all the intersection areas.
5. The method for classifying checkpoints according to claim 1, characterized in that: The classifying the checkpoints into corresponding areas according to the positional relationship between each checkpoint in the checkpoint set and the block area, the intersection area, and the road section area includes: Get the block search range of each checkpoint; If there are no longitude and latitude points of the boundary road section of the block area within the block search range, the checkpoint points are classified into corresponding block areas according to the positions of the checkpoints.
6. The method for classifying checkpoints according to claim 5, characterized in that: The checkpoint point classification method includes: Obtaining the longitude and latitude points of the boundary sections of all the block areas; Determining whether the distance between adjacent longitude and latitude points on the same boundary section is greater than a fourth preset distance threshold; If so, new longitude and latitude points are inserted at equal intervals between the adjacent longitude and latitude points.
7. The checkpoint classification method according to claim 5 or 6, characterized in that: The checkpoint point classification method includes: Converting the longitude and latitude points of the boundary sections of all the block areas into grid points according to a preset scaling factor to grid the road network data; Get the grid block search range of each bayonet; If there is no grid point of the boundary road section of the block area within the grid block search range, the checkpoint point is classified into the corresponding block area according to the position of the checkpoint.
8. The method for classifying checkpoints according to claim 5, characterized in that: After obtaining the block search range of each checkpoint, the checkpoint point classification method further includes: If there is any longitude and latitude point of a boundary road section of the block area within the block search range, obtaining the intersection search range of the checkpoint; If there is at least one longitude and latitude point of an intersection area within the intersection search range, the checkpoint points are classified into corresponding intersection areas according to the positions of the checkpoints.
9. The method for classifying checkpoints according to claim 6, characterized in that: After obtaining the intersection search range of the checkpoint, the checkpoint point classification method further includes: If the longitude and latitude points of all the intersection areas do not exist within the intersection search range, the checkpoint points are classified into corresponding road section areas according to the positions of the checkpoints.
10. The checkpoint classification method according to claim 1, characterized in that: After classifying the checkpoints into corresponding areas according to the positional relationship between each checkpoint in the checkpoint set and the block area, the intersection area, and the road section area, the checkpoint point classification method further includes: Each checkpoint in the checkpoint set is named according to the name of the area to which it is classified.
11. A bayonet point classification device, characterized in that: The checkpoint point classification device includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the checkpoint classification method according to any one of claims 1 to 10.
12. A computer storage medium, characterized in that The computer storage medium is used to store program data, and when the program data is executed by a computer, it is used to implement the checkpoint classification method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Path identification station arranging method of complicated road net
CN102542617A
Method and system for determining traffic checkpoint, electronic equipment and medium
CN112013865A