Road type analysis method and device based on geographical hash, equipment and storage medium
By establishing a geographic hash index and converting vehicle trajectory data into geographic hash values, the inefficiency problem in traditional methods is solved, and fast and accurate road type and administrative division analysis is achieved, improving data processing efficiency and accuracy.
Patent Information
- Application Number
- CN202510545582.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-19
AI Technical Summary
Traditional road types and administrative division analysis methods are inefficient when processing massive data and cannot meet real-time requirements.
By obtaining vehicle trajectory data, national road network data and prefecture-level administrative division data, a geographical hash index is established, a geographical hash road network index dictionary is generated, and the vehicle trajectory data is converted into geographic hash values. The target trajectory information is quickly extracted and the road type proportion is analyzed.
It realizes rapid and accurate analysis of the proportion of vehicle road types, significantly improves data processing efficiency and analysis accuracy, and reduces computing complexity and storage costs.
Smart Images

Figure CN120508690A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent transportation technology, and in particular to a road type analysis method, device, equipment and storage medium based on geographic hashing. Background Art
[0002] With the development of big data and smart car technologies, the widespread use of GPS technology and improvements in data storage and processing capabilities are enabling efficient processing of the vast amounts of vehicle operation data collected by commercial vehicles via onboard T-box devices. Analyzing the types of roads and administrative divisions traveled by commercial vehicles not only helps optimize vehicle routes, but also improves transportation efficiency, reduces energy consumption, and reduces environmental pollution.
[0003] Currently, traditional methods for analyzing road types and administrative divisions primarily rely on matching vehicle GPS trajectories with road network data. Traditional algorithms compare GPS trajectories with road data through geometric matching, topological relationship matching, and probabilistic statistical matching to select the optimal path. Most methods rely on third-party APIs to obtain location information and use this information to determine the vehicle's administrative division. However, when faced with large amounts of road network data and vehicle GPS trajectory data, these traditional methods are time-consuming and inefficient, failing to meet real-time requirements.
[0004] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a road type analysis method, device, equipment and storage medium based on geographic hashing, aiming to solve the technical problem of low efficiency of traditional road matching and administrative division analysis methods when processing massive data.
[0006] To achieve the above objectives, this application proposes a road type analysis method based on geo-hashing, which includes:
[0007] Obtain vehicle trajectory data, national road network data, and prefecture-level administrative division data;
[0008] Establishing a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary;
[0009] Converting the vehicle trajectory data into a geo-hash value to obtain a trajectory hash value;
[0010] Target trajectory information is extracted according to the trajectory hash value and the geographic hash road network index dictionary, and road type proportions are analyzed according to the target trajectory information.
[0011] In one embodiment, the step of establishing a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary includes:
[0012] Get the index dictionary;
[0013] Extracting path points based on the national road network data and the prefecture-level administrative division data, and converting the path points into geographic hash values;
[0014] A geo-hash index is established according to the index dictionary and the geo-hash value to obtain a geo-hash road network index dictionary.
[0015] In one embodiment, the step of establishing a geo-hash index based on the index dictionary and the geo-hash value to obtain a geo-hash road network index dictionary includes:
[0016] determining whether the geo-hash value is included in the index dictionary;
[0017] When the geo-hash value is not included in the index dictionary, constructing the geo-hash value and the prefecture-level administrative division data corresponding to the path point of the geo-hash value as a target key-value pair;
[0018] Adding a path number to the target key-value pair to obtain a geographic hash index;
[0019] The index dictionary is updated according to the geographic hash index to obtain a geographic hash road network index dictionary.
[0020] In one embodiment, after the step of determining whether the geo-hash value is included in the index dictionary, the method further includes:
[0021] When the geo-hash value is included in the index dictionary, determining whether the path number of the geo-hash value is included in the current geo-hash index;
[0022] When the path number of the geo-hash value is not included in the current geo-hash index, adding the path number of the geo-hash value to the current geo-hash index to obtain a target geo-hash index;
[0023] Update the geo-hash road network index dictionary according to the target geo-hash index.
[0024] In one embodiment, the step of converting the vehicle trajectory data into a geo-hash value to obtain a trajectory hash value includes:
[0025] Obtaining a vehicle speed, a first waypoint time, and a second waypoint time according to the vehicle trajectory data, wherein the first waypoint time is earlier than the second waypoint time;
[0026] Calculating a waypoint theoretical distance based on the vehicle speed, the first waypoint time, and the second waypoint time;
[0027] When the theoretical distance of the path point is greater than a preset theoretical distance threshold, the path point corresponding to the second path point time is deleted to obtain target trajectory data;
[0028] Performing geo-hash conversion on the target trajectory data to obtain a trajectory hash value.
[0029] In one embodiment, the step of extracting target trajectory information according to the trajectory hash value and the geo-hash road network index dictionary includes:
[0030] Searching for road information in the geo-hash road network index dictionary according to the trajectory hash value to obtain a set of candidate roads;
[0031] Calculate the target road distance based on the current path point position and the position of the alternative road in the alternative road set;
[0032] Calculate the gear ratio based on the vehicle's engine speed, current vehicle speed, tire diameter, and reduction ratio;
[0033] Obtaining a target road type according to the geographic hash road network index;
[0034] Target trajectory information is extracted according to the target road type, the gear ratio, and the target road distance.
[0035] In one embodiment, the step of analyzing the road type ratio according to the target trajectory information includes:
[0036] According to the target trajectory information, the target mileage, road type mileage and proportion, prefecture-level administrative division mileage and proportion, and travel road mileage and proportion are obtained;
[0037] The road type proportion is analyzed based on the target mileage, the road type mileage and proportion, the prefecture-level administrative division mileage and proportion, and the travel road mileage and proportion.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a road type analysis device based on geo-hash, the road type analysis device based on geo-hash comprising: a data acquisition module for acquiring vehicle trajectory data, national road network data, and prefecture-level administrative division data;
[0039] An index building module, configured to build a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary;
[0040] A hash value conversion module, configured to convert the vehicle trajectory data into a geographic hash value to obtain a trajectory hash value;
[0041] A road analysis module is used to extract target trajectory information according to the trajectory hash value and the geographic hash road network index dictionary, and analyze the road type ratio according to the target trajectory information.
[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a road type analysis device based on geographic hashing, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the road type analysis method based on geographic hashing as described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the road type analysis method based on geographic hashing as described above are implemented.
[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the road type analysis method based on geographic hashing as described above.
[0045] One or more technical solutions proposed in this application have at least the following technical effects:
[0046] This method acquires vehicle trajectory data, national road network data, and prefecture-level administrative division data, then establishes a geohash index based on this data to generate a geohash road network index dictionary. By converting the GPS coordinates of vehicle trajectory data into geohash values, the geohash index dictionary is used to quickly extract target trajectory information. Combined with the vehicle trajectory data, the geohash index dictionary is used to analyze road type distribution. This solves the existing problems of inefficient road type analysis, reliance on complex road network matching algorithms, and high computational costs. Compared with existing technologies, this method achieves rapid and accurate analysis of the proportion of vehicle-traveled road types through the efficient spatial partitioning and fast query characteristics of geohash indexes, significantly improving data processing efficiency and analysis accuracy while reducing computational complexity and storage costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0049] Figure 1 A flowchart of the first embodiment of the road type analysis method based on geo-hashing is provided in this application;
[0050] Figure 2 A schematic diagram of the process of constructing a GeoHash index according to the first embodiment of the road type analysis method based on geohash in this application;
[0051] Figure 3 A schematic diagram of the trajectory matching process provided in Example 1 of the road type analysis method based on geo-hash in this application;
[0052] Figure 4 A flowchart of the second embodiment of the road type analysis method based on geo-hashing is provided in this application;
[0053] Figure 5 This is a schematic diagram of the module structure of the road type analysis device based on geo-hash according to an embodiment of the present application;
[0054] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the road type analysis method based on geographic hashing in the embodiment of the present application.
[0055] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0056] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0057] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0058] The main solution of the embodiment of the present application is: obtaining vehicle trajectory data, national road network data and prefecture-level administrative division data; establishing a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary; converting the vehicle trajectory data into a geographic hash value to obtain a trajectory hash value; extracting target trajectory information based on the trajectory hash value and the geographic hash road network index dictionary, and analyzing the road type proportion based on the target trajectory information.
[0059] In this embodiment, for ease of description, the following description is made by taking the identification of a road type analysis device based on geographic hashing as the execution subject.
[0060] Because the traditional road matching and administrative division analysis methods in the existing technology are inefficient when processing massive amounts of data, this application provides a solution that obtains vehicle trajectory data, national road network data, and prefecture-level administrative division data, and then establishes a geographic hash index based on this data to generate a geographic hash road network index dictionary. By converting the GPS coordinates of the vehicle trajectory data into a geographic hash value, using the geographic hash index dictionary to quickly extract the target trajectory information, and combining the vehicle trajectory data to analyze the road type ratio, the problems of low efficiency of road type analysis, reliance on complex road network matching algorithms, and high computational cost in the existing technology are solved. Compared with the existing technology, the efficient spatial division and fast query characteristics of the geographic hash index achieve a fast and accurate analysis of the proportion of vehicle road types, significantly improving data processing efficiency and analysis accuracy, while reducing computational complexity and storage costs.
[0061] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution capabilities, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions, a road type analysis device based on geo-hashing, etc. The following uses the road type analysis device based on geo-hashing as an example to illustrate this embodiment and the following embodiments.
[0062] Based on this, the embodiment of the present application provides a road type analysis method based on geo-hash. Figure 1 , Figure 1 This is a flowchart of the first embodiment of the road type analysis method based on geo-hashing in this application.
[0063] In this embodiment, the road type analysis method based on geo-hash includes steps S10 to S40:
[0064] Step S10, obtaining vehicle trajectory data, national road network data, and prefecture-level administrative division data;
[0065] It should be noted that vehicle trajectory data is a sequence of vehicle location information recorded at regular intervals by onboard equipment during driving. It includes data such as the vehicle's latitude and longitude coordinates, speed, and direction of travel at different times. This data reflects the vehicle's actual driving path and can be used to analyze driving habits and route preferences. In this embodiment, the national road network data and prefecture-level administrative division data must conform to the WGS-84 standard.
[0066] Separately, national road network data covers detailed information on all roads nationwide, including road name, type (e.g., expressway, national highway, urban road), start and end point coordinates, length, number of lanes, and road grade. This data is used to describe the national road network structure and provides basic data support for vehicle route planning and road matching.
[0067] Separately, prefecture-level administrative division data is a collection of information such as the geographic scope, name, and boundary coordinates of each prefecture-level administrative region, after the country is divided into prefecture-level administrative regions. This data is used to determine the administrative region a vehicle is traveling within, which is crucial for traffic management and data analysis. For example, Guangdong Province includes multiple prefecture-level administrative regions, including Guangzhou, Shenzhen, and Zhuhai. Each prefecture-level administrative region has its own specific area and relevant data.
[0068] Step S20, establishing a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary;
[0069] It should be noted that a geohash index is a method for encoding geographic locations as strings. It divides the Earth's surface into multiple rectangular regions, each with a unique string identifier. The principle is to first encode the longitude and latitude separately in binary format, then cross-combine them according to specific rules to form a complete binary code, which is then converted into a GeoHash value.
[0070] In addition, the geohash road network index dictionary uses geohash values as keys and stores information related to national road network data and prefecture-level administrative division data as values. The key is obtained by GeoHash encoding the geographic location of the road network data and administrative division data; the value contains the road information within the GeoHash region and the prefecture-level administrative division information. For example, the dictionary value corresponding to the key wx4g0s2 may contain information such as the road number G101 in the region, the road type is a national highway, and the prefecture-level administrative division is a certain city.
[0071] It's understandable that the longitude and latitude coordinates of each road point in the national road network data are GeoHash-encoded. During the encoding process, according to GeoHash encoding rules, the longitude and latitude are first converted into binary codes, then cross-combined into complete binary codes, and converted into a string-based GeoHash value. For prefecture-level administrative division data, the boundary coordinates are also GeoHash-encoded. The encoded GeoHash value is then used as the key, and the corresponding road and administrative division information is stored in a dictionary structure as the value, resulting in a geohash road network index dictionary.
[0072] In a feasible implementation, step S20 may include steps S21 to S23:
[0073] Step S21, obtaining an index dictionary;
[0074] It's important to note that an index dictionary is a structure used to store and quickly find data. In this context, it's used to store data related to geohash indexes. The index dictionary exists as key-value pairs, where the key is typically a unique identifier, such as a geohash value, and the value is the relevant information corresponding to the key, such as the prefecture-level administrative division corresponding to a geohash value or the unique road number within the geohash range. Using the key, the corresponding value can be quickly found, facilitating subsequent search and management of road network and administrative division data.
[0075] Step S22, extracting path points based on the national road network data and the prefecture-level administrative division data, and converting the path points into geographic hash values;
[0076] It's important to note that waypoints are the fundamental elements that define a road's shape. They represent specific locations on a road, and a series of them can accurately depict the road's direction and contours. In road network data, a road is connected by multiple waypoints, and the coordinates of these waypoints determine the road's actual location on the map.
[0077] It is understandable that each path point representing the shape of the road is extracted from the national road network data, and relevant path points are also extracted from the prefecture-level administrative division data. Each extracted path point is converted according to the generation rules of the geographic hash value. Specifically, the binary codes of the longitude and latitude of the path point are calculated separately, and the complete binary code is obtained by cross-combining. The binary code is then divided into groups of five, and the decimal value of each group is calculated and the corresponding value of the BASE32 encoding table is searched. Finally, the geographic hash value is obtained by splicing. For example, there is a path point with a longitude and latitude of (110.0°, 20.0°). According to the above rules, the binary code of its longitude and latitude is first obtained, and then cross-combined and grouped for conversion to finally obtain the geographic hash value of the path point.
[0078] Step S23: establishing a geo-hash index according to the index dictionary and the geo-hash value to obtain a geo-hash road network index dictionary.
[0079] As you can understand, the obtained index dictionary is used as a foundation, combined with the geohash values obtained in the previous step. Each geohash value is used as a key, and the corresponding road network data is added to the new structure to build a geohash index. After a series of such operations, the geohash road network index dictionary is finally formed.
[0080] In a feasible implementation, step S23 may include steps S231 to S234:
[0081] Step S231, determining whether the index dictionary includes the geographic hash value;
[0082] It is understandable that in the process of building a geohash index, the newly generated geohash value needs to be compared with the existing index dictionary. All keys in the index dictionary are traversed to see if there is a key that is the same as the geohash value currently being processed.
[0083] Step S232: when the geo-hash value is not included in the index dictionary, constructing the geo-hash value and the prefecture-level administrative division data corresponding to the path point of the geo-hash value into a target key-value pair;
[0084] It's important to note that a target key-value pair is a data structure created for building a geohash index. A target key-value pair consists of a geohash value as the key and the prefecture-level administrative division data corresponding to that geohash value as the value. A target key-value pair is the basic unit for associating geographic information with related attributes, constructed and integrated through a series of target key-value pairs.
[0085] It is understandable that when it is determined that the currently processed geohash value does not exist in the index dictionary, a new target key-value pair needs to be created. Using the geohash value as the key, the prefecture-level administrative division data corresponding to the path point of the geohash value is searched and used as the value to form the target key-value pair.
[0086] Step S233, adding the path number to the target key-value pair to obtain a geographic hash index;
[0087] It's important to note that a route number uniquely identifies each road or route in the road network. In national road network data, each road or route is assigned a unique number to distinguish between different roads. This route number allows for accurate and rapid identification and location of specific roads, facilitating the management and query of road information during data processing.
[0088] It is understandable that, based on the already constructed target key-value pair, the query speed is improved. According to the path number of the road where the path point corresponding to the current geohash value is located, the path number is added to the value of the target key-value pair. By adding the path number to the target key-value pair, the geohash index not only contains the correspondence between geographical areas and administrative divisions, but also associates it with specific road information, providing more complete information support for subsequent rapid queries of road-related data based on geohash values, thereby improving the comprehensiveness and accuracy of data queries.
[0089] Step S234: update the index dictionary according to the geographic hash index to obtain a geographic hash road network index dictionary.
[0090] It is understood that the key-value pairs in the constructed geohash index are added one by one to the original index dictionary. If some records with the same key as the geohash index already exist in the index dictionary, the existing values are updated with the new values in the geohash index, such as the newly added path number. If no records with the same key exist, the key-value pairs in the geohash index are directly added to the index dictionary.
[0091] In a feasible implementation, step S231 may include: when the geo-hash value is included in the index dictionary, determining whether the path number of the geo-hash value is included in the current geo-hash index; when the path number of the geo-hash value is not included in the current geo-hash index, adding the path number of the geo-hash value to the current geo-hash index to obtain a target geo-hash index; and updating the geo-hash road network index dictionary according to the target geo-hash index.
[0092] It should be noted that the current geo-hash index is an index structure constructed or involved for the geo-hash value currently being processed during the process of constructing the geo-hash road network index dictionary.
[0093] It's important to note that the target geohash index is a more complete index for a specific geohash value, obtained by adding missing path numbers to the current geohash index. The target geohash index integrates more comprehensive information corresponding to the geohash value, including administrative division data and path numbers, and is a key intermediate step in building the geohash network index dictionary. The target geohash index is further integrated into the geohash network index dictionary to ensure its completeness and accuracy.
[0094] It is understandable that when it is determined that the currently processed geohash value exists in the index dictionary, the current geohash index is further checked. If the path number of the geohash value does not exist in the current geohash index, it is necessary to supplement the complete information and update it, and use the obtained target geohash index to update the geohash road network index dictionary. The integrity of the information in the geohash road network index dictionary is guaranteed. In the case where the index dictionary already has a geohash value, further checking and supplementing the path number can enable more comprehensive data to be obtained when querying road network information based on the geohash value. For example, when analyzing the vehicle's driving trajectory, it can more quickly determine which road the vehicle is traveling on, which improves the accuracy and reliability of the road type and administrative division analysis, and helps to more efficiently manage and analyze vehicle operation data.
[0095] Reference Figure 2 , Figure 2 This is a schematic diagram of the GeoHash index construction process of the first embodiment of the road type analysis method based on geohash in this application.
[0096] like Figure 2 As shown in the figure, the road network information and geographic administrative division information are imported from the file, and then a dictionary dct is created to store the index data. Then, it is checked whether the road network information has been traversed. If not, the back-end path point of the current road is searched, the current path point is converted to GeoHash, and the GeoHash of the current path point is checked to see if it already exists in the dictionary dct. If not, an entry with GeoHash as the key name is added to the dictionary, and the geographical administrative division of the point is searched and the key value corresponding to GeoHash is added. If it already exists, the current path number is added to the key value of GeoHash. Then, the front-end path point of the current road is searched. The operations of converting GeoHash and updating the dictionary are repeated until all road network information is traversed. Finally, the processed index result is stored in the database.
[0097] Step S30, converting the vehicle trajectory data into a geographic hash value to obtain a trajectory hash value;
[0098] It should be noted that a GeoHash value is a string obtained by encoding a geographic location through GeoHash. Each GeoHash value represents a specific area on the Earth's surface, and all points within that area have the same GeoHash value. Different GeoHash lengths represent different areas of precision. For example, a 7-digit GeoHash value corresponds to a minimum box size of a square area with a side length of 152.7 meters.
[0099] In addition, the trajectory hash value is a set of GeoHash values obtained by GeoHash encoding the geographic location of each trajectory point in the vehicle trajectory data. The trajectory hash value is used to look up the corresponding road and administrative division information in the geohash road network index dictionary to analyze the vehicle's driving trajectory.
[0100] It is understandable that each trajectory point in the vehicle trajectory data is traversed to obtain its longitude and latitude coordinates. According to the GeoHash encoding method, the longitude and latitude are first binary encoded separately, that is, by dichotomy, each bit of the binary code is determined according to the position of the longitude and latitude in the initial interval (longitude [-180°, +180°], latitude [-90°, +90°]), and the recursive process is performed until the expected GeoHash length is reached (7 bits in this embodiment). The binary code is then divided into groups of five, the decimal value of each group is calculated and the corresponding value in the BASE32 encoding table is searched, and finally the GeoHash value is obtained by splicing. Each trajectory point is subjected to such an encoding operation, and the resulting set of GeoHash values is the trajectory hash value. For example, the longitude and latitude of a trajectory point in the vehicle trajectory data are (110.5, 22.3). After the above encoding process, its GeoHash value "wx4g0s5" is obtained. When all points on the vehicle trajectory are encoded, the trajectory hash value set corresponding to the entire vehicle trajectory data is obtained. By converting vehicle trajectory data into trajectory hash values, it is convenient to match them with the geographic hash road network index dictionary, quickly find the road and administrative division information near the vehicle trajectory point, and improve analysis efficiency.
[0101] Step S40 , extracting target trajectory information according to the trajectory hash value and the geo-hash road network index dictionary, and analyzing the road type ratio according to the target trajectory information.
[0102] It should be noted that the target trajectory information is the road information and administrative division information related to the vehicle trajectory point, which is found based on the trajectory hash value from the geohash road network index dictionary. The target trajectory information is used to analyze the roads and administrative divisions involved in the vehicle's driving trajectory.
[0103] In addition, the road type share is the proportion of mileage on different types of roads, such as highways, national highways, urban roads, and other roads, in a vehicle's total mileage. By calculating the road type share, we can understand the distribution of vehicles on different road types, providing data support for traffic planning and vehicle operations management. For example, if a vehicle's total mileage is 1,000 kilometers, and 600 kilometers of that is on highways, then the highway type share is 60%.
[0104] As you can understand, for each trajectory hash value, a lookup is performed in the geohash road network index dictionary. Based on the corresponding key-value pairs found, the target trajectory information, namely the road and administrative division information for the area where the trajectory point is located, is extracted. The mileage traveled by vehicles on different road types is counted. This provides a clear understanding of the distribution of different road types within a vehicle's trajectory, providing important data support for traffic management departments in road planning and transportation companies in optimizing transport routes.
[0105] In a feasible implementation, step S40 may include steps S41 to S45:
[0106] Step S41, searching for road information in the geo-hash road network index dictionary according to the trajectory hash value to obtain a set of candidate roads;
[0107] It should be noted that road information includes various attributes and characteristics of roads, such as road types, road names, road numbers, road directions, road connection relationships, etc., such as highways, national roads, urban roads, and other roads.
[0108] Additionally, the candidate road set is a set of possible roads corresponding to the current trajectory hash value, found from the geohash road network index dictionary. Since a trajectory hash value may correspond to multiple roads within the region, this set of candidate roads is subsequently filtered to select the road the vehicle actually traveled on.
[0109] It can be understood that the trajectory hash value of the vehicle trajectory point is obtained and the trajectory hash value is used as the key to search the geo-hash road network index dictionary. For example, if the trajectory hash value of the vehicle trajectory point at a certain moment is abcdefg, the geo-hash road network index dictionary is searched for the value with abcdefg as the key. The roads corresponding to the road information contained in the value constitute the candidate road set. By utilizing the fast search function of the geo-hash road network index dictionary, the scope of the search for vehicle travel roads is narrowed, the search efficiency is improved, and a foundation is laid for subsequent precise matching of vehicle travel roads.
[0110] Step S42, calculating the target road distance based on the current path point position and the positions of the candidate roads in the candidate road set;
[0111] It's important to note that the target road distance is the distance between the current waypoint and each candidate road in the candidate road set. Calculating this distance helps determine the vehicle's proximity to each candidate road. The closer the distance, the more likely the vehicle is traveling on that road.
[0112] As can be understood, for each candidate road in the candidate road set, a distance calculation is performed between the current pathpoint's location and each pathpoint on that candidate road. The distance from the current pathpoint to each pathpoint on that road is calculated, and the minimum distance is selected as the target road distance between the current pathpoint and that candidate road. This calculation is repeated for all roads in the candidate road set, resulting in the target road distance between the current pathpoint and each candidate road. If no road information is found, the search range is expanded, and if no road information is found again, the track point is skipped.
[0113] Step S43, calculating the gear ratio according to the vehicle engine speed, the current vehicle speed, the tire diameter, and the reduction ratio;
[0114] It's important to note that a vehicle's engine speed refers to the number of revolutions per minute (RPM) it makes, reflecting the engine's operating status and output power. Higher engine speeds generally indicate greater engine output power and a more powerful vehicle. During driving, engine speed changes with various operations, such as acceleration, deceleration, and gear shifting.
[0115] Additionally, the vehicle's current speed is the speed at which the vehicle is traveling at the current moment. This represents the distance traveled per unit time and is an important indicator of vehicle speed. The vehicle's current speed can be obtained using an onboard speed sensor.
[0116] In addition, tire diameter refers to the distance from any point on the tire's circumference through the center of the circle to the opposite point. The size of the tire diameter affects the vehicle's speed, mileage calculation, and power transmission.
[0117] The reduction ratio, on the other hand, represents the ratio between the engine's output shaft speed and the drive wheel's speed. This ratio determines the degree to which the engine's power is amplified or reduced when transmitted to the drive wheels, affecting the vehicle's acceleration and speed. Under different driving conditions, the vehicle adjusts the reduction ratio by shifting gears to meet varying power requirements.
[0118] The gear ratio is a value calculated based on the vehicle's engine speed, current speed, tire diameter, and reduction ratio. It reflects the transmission ratio of the vehicle's current gear. A smaller gear ratio generally indicates a higher gear, while a larger gear ratio indicates a lower gear. This value can help determine the vehicle's gear status during driving and assist in analyzing the type of road the vehicle is traveling on.
[0119] The smaller the gear ratio, the higher the gear. When in a high gear, the vehicle's road type generally does not change. This is especially true when switching between a highway and a national road, a highway and a city road, a highway and other roads, or a national road and other roads. When a high gear is shifted and a road type change occurs, the algorithm considers the road connection relationship (connectivity is determined by searching for road overlap points in the road network data and pre-stored in the file) to determine whether a road type change has occurred. The gear ratio is calculated as follows:
[0120]
[0121] Where i g is the calculated gear ratio of the transmission, n is the engine output speed, d is the tire diameter, Ua is the vehicle speed, and i0 is the main reduction ratio.
[0122] Step S44, obtaining the target road type according to the geographic hash road network index;
[0123] It should be noted that the target road type refers to the specific type of road the vehicle is currently traveling on. In this embodiment, road types can be categorized as expressways, national highways, urban roads, and other roads. Expressways include expressways and their ramps, national highways include their ramps, urban roads are roads within the city planning area, and other roads include provincial highways, county roads, and rural roads. Determining the target road type is crucial for analyzing vehicle travel paths and driving conditions.
[0124] It can be understood that, based on the geographical hash road network index information corresponding to the current trajectory hash value, the road type information related to the area where the trajectory point is located is obtained.
[0125] Step S45 , extracting target trajectory information according to the target road type, the gear ratio, and the target road distance.
[0126] It is understood that a comprehensive judgment and analysis is performed based on the target road type, gear ratio, and target road distance. For example, if the target road type is a highway, the gear ratio indicates that the vehicle is in a high gear, and the target road distance indicates that a certain alternative highway is closest to the current path point, target trajectory information can be extracted indicating that the vehicle is likely currently traveling on a highway and that its driving state is consistent with highway driving characteristics.
[0127] In a feasible implementation, step S40 may further include: obtaining target mileage, road type mileage and proportion, prefecture-level administrative division mileage and proportion, and driving road mileage and proportion based on the target trajectory information; and analyzing the road type proportion based on the target mileage, the road type mileage and proportion, the prefecture-level administrative division mileage and proportion, and the driving road mileage and proportion.
[0128] It should be noted that the target mileage refers to the total distance traveled by the vehicle during the entire driving process. It is calculated by adding up the distances between adjacent track points on the vehicle's trajectory and is used to measure the total distance traveled by the vehicle.
[0129] Additionally, road type mileage and proportions refer to the mileage vehicles travel on different types of roads (highways, national highways, urban roads, and other roads), as well as the proportion of these mileages in total mileage. By analyzing road type mileage and proportions, we can understand the distribution of vehicles on different types of roads, providing data support for analyzing vehicle driving habits and road usage.
[0130] Additionally, the prefecture-level administrative division mileage and share refers to the mileage traveled within each prefecture-level administrative division and its proportion of total mileage. This information reflects the range of vehicle activity and mileage distribution across prefecture-level administrative divisions, helping to analyze vehicle driving preferences and transportation business coverage.
[0131] In addition, the road mileage and proportion refers to the mileage traveled on each specific road and the proportion of these mileages in the total mileage. This can be accurately determined for specific roads, helping to understand the frequency of vehicle use and dependence on specific roads.
[0132] It can be understood that the target mileage is calculated based on the driving distance of each trajectory point recorded in the target trajectory information. According to the target road type in the target trajectory information, the mileage of the vehicle on different types of roads is counted, and the road type mileage and proportion are calculated. According to the prefecture-level administrative division where the trajectory point in the target trajectory information is located, the prefecture-level administrative division mileage and proportion are counted; according to the specific road number, the mileage and proportion of the traveled road are counted. Finally, the calculated target mileage, road type mileage and proportion, prefecture-level administrative division mileage and proportion, and traveled road mileage and proportion are used to analyze the road type proportion. For example, the differences in the mileage proportions of different road types can be compared to understand which types of roads the vehicle mainly travels on.
[0133] Reference Figure 3 , Figure 3 This is a schematic diagram of the trajectory matching process of the first embodiment of the road type analysis method based on geo-hashing in this application.
[0134] like Figure 3 As shown, the road information and vehicle trajectory information are imported from the database, and then a check is made to see if the trajectory information has been traversed. If not, the road that best matches the vehicle trajectory is searched. If it has been traversed, the total mileage is calculated, and the mileage and proportion of each road type, each administrative division, and each traveled road are calculated. Then, it is determined whether there is a matching point at the current point. If so, the regional division information is extracted, and the algorithm analyzes the road information. Otherwise, the back-end trajectory information is searched until all the trajectory information is traversed. Finally, the processed index results are stored in the database.
[0135] This embodiment provides a road type analysis method based on geo-hash. By obtaining vehicle trajectory data, national road network data, and prefecture-level administrative division data, and establishing a geo-hash index to obtain a geo-hash road network index dictionary, the method solves the technical problems of low efficiency, reliance on complex road network matching algorithms, and high computational cost in the existing technology of road type analysis. It achieves the beneficial effect of quickly and accurately analyzing the proportion of vehicle travel road types, significantly improving data processing efficiency and analysis accuracy, while reducing computational complexity and storage costs.
[0136] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 4 The step S30 of the road type analysis method based on geo-hash includes steps S31 to S34:
[0137] Step S31, obtaining a vehicle speed, a first waypoint time, and a second waypoint time according to the vehicle trajectory data, wherein the first waypoint time is earlier than the second waypoint time;
[0138] It's important to note that the first waypoint time refers to the time corresponding to the earlier waypoint selected in the vehicle trajectory data. When analyzing a vehicle's trajectory, to calculate the vehicle's travel over a certain period of time, two waypoints are selected at different times. The first waypoint time is the earlier of these two timepoints, and is used for comparison and calculation with the later second waypoint time.
[0139] Additionally, the second waypoint time corresponds to the first waypoint time and is the time corresponding to the later waypoint in the vehicle trajectory data. When calculating parameters such as the vehicle's distance traveled over a period of time, the second waypoint time and the first waypoint time serve as the two endpoints of the time interval to help determine the time span of the calculation.
[0140] It is understandable that relevant information is extracted from the collected vehicle trajectory data. The vehicle trajectory data records the information of the path points, including time, speed, longitude and latitude, etc. During analysis, two adjacent path points are found from this data, and the time of one of the path points is obtained as the first path point time, and the time of the other path point at a later time is obtained as the second path point time. At the same time, the vehicle speed at the corresponding time of these two path points is obtained. It provides the necessary data basis for the subsequent calculation of the theoretical distance of the path points. By clarifying the time points and the corresponding speeds, the driving conditions of the vehicle in that time period can be more accurately analyzed.
[0141] Step S32, calculating the waypoint theoretical distance according to the vehicle speed, the first waypoint time, and the second waypoint time;
[0142] It's important to note that the theoretical distance between two waypoints is calculated based on vehicle speed and the time difference between the two waypoints. This is calculated by multiplying vehicle speed by time and is used to compare with the actual distance between waypoints to determine the validity of the data.
[0143] It can be understood that the difference between the distances traveled at the first path point time and the distances traveled at the second path point time is calculated to obtain the path point theoretical distance.
[0144] Step S33, when the theoretical distance of the waypoint is greater than a preset theoretical distance threshold, deleting the waypoint corresponding to the second waypoint time to obtain target trajectory data;
[0145] It should be noted that the preset theoretical distance threshold is a standard distance value set in advance to determine whether the theoretical distance between waypoints is reasonable. The preset theoretical distance threshold is determined based on factors such as normal vehicle driving conditions and data collection errors. If the calculated theoretical distance between waypoints exceeds this threshold, it may indicate data anomalies.
[0146] It is understood that the calculated theoretical distance of the waypoint is compared with a preset theoretical distance threshold. If the theoretical distance of the waypoint exceeds the preset theoretical distance threshold, it indicates that the travel distance calculated based on the vehicle speed and time exceeds a reasonable range, which may be caused by data collection errors or other reasons. In this case, the waypoint corresponding to the second waypoint time is deleted from the vehicle trajectory data, and the remaining trajectory data becomes the target trajectory data.
[0147] Step S34: performing geo-hash conversion on the target trajectory data to obtain a trajectory hash value.
[0148] It is understood that after deleting abnormal path points, the latitude and longitude coordinates of each trajectory point in the target trajectory data are converted according to the rules of the GeoHash algorithm. This converts the geographic location information of the vehicle trajectory into a form suitable for indexing and searching, facilitating subsequent matching with the geohash road network index dictionary, facilitating analysis of vehicle road types and administrative divisions, and improving the efficiency of data processing and analysis.
[0149] This embodiment provides a road type analysis method based on geohashing. By incorporating speed and time information into the vehicle trajectory data processing process to calculate the theoretical travel distance and setting a threshold to eliminate abnormal data points, this method solves the problem of inaccurate trajectory data caused by data collection errors or outliers, achieving the beneficial effect of improving the accuracy and reliability of vehicle trajectory data, thereby enhancing the precision of road type and administrative division analysis.
[0150] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the road type analysis method based on geographic hashing in the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0151] This application also provides a road type analysis device based on geo-hash, please refer to Figure 5 , the road type analysis device based on geo-hash comprises:
[0152] Data acquisition module 10, used to obtain vehicle trajectory data, national road network data and prefecture-level administrative division data;
[0153] An index building module 20 is configured to build a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary;
[0154] A hash value conversion module 30 is used to convert the vehicle trajectory data into a geographic hash value to obtain a trajectory hash value;
[0155] The road analysis module 40 is configured to extract target trajectory information according to the trajectory hash value and the geo-hash road network index dictionary, and analyze the proportion of road types according to the target trajectory information.
[0156] The geo-hash-based road type analysis device provided in this application utilizes the geo-hash-based road type analysis method described in the aforementioned embodiments, addressing the technical issues of low efficiency in processing massive amounts of data associated with traditional road matching and administrative division analysis methods. Compared to the prior art, the geo-hash-based road type analysis device provided in this application achieves the same beneficial effects as the geo-hash-based road type analysis method described in the aforementioned embodiments. Other technical features of the geo-hash-based road type analysis device are the same as those disclosed in the aforementioned embodiments and are not further detailed here.
[0157] In one embodiment, the index establishment module 20 is also used to obtain an index dictionary; extract path points based on the national road network data and the prefecture-level administrative division data, and convert the path points into geographic hash values; establish a geographic hash index based on the index dictionary and the geographic hash value to obtain a geographic hash road network index dictionary.
[0158] In one embodiment, the index establishment module 20 is further used to determine whether the geo-hash value is included in the index dictionary; when the geo-hash value is not included in the index dictionary, the prefecture-level administrative division data corresponding to the geo-hash value and the path point of the geo-hash value are constructed as a target key-value pair; the path number is added to the target key-value pair to obtain a geo-hash index; and the index dictionary is updated according to the geo-hash index to obtain a geo-hash road network index dictionary.
[0159] In one embodiment, the index establishment module 20 is further used to determine whether the path number of the geo-hash value is included in the current geo-hash index when the geo-hash value is included in the index dictionary; when the path number of the geo-hash value is not included in the current geo-hash index, add the path number of the geo-hash value to the current geo-hash index to obtain a target geo-hash index; and update the geo-hash road network index dictionary according to the target geo-hash index.
[0160] In one embodiment, the hash value conversion module 30 is further used to obtain the vehicle speed, the first path point time and the second path point time based on the vehicle trajectory data, where the first path point time is earlier than the second path point time; calculate the path point theoretical distance based on the vehicle speed, the first path point time and the second path point time; when the path point theoretical distance is greater than a preset theoretical distance threshold, delete the path point corresponding to the second path point time to obtain target trajectory data; perform geographic hash conversion based on the target trajectory data to obtain a trajectory hash value.
[0161] In one embodiment, the road analysis module 40 is further used to search for road information in the geo-hash road network index dictionary according to the trajectory hash value to obtain an alternative road set; calculate the target road distance according to the current path point position and the alternative road position in the alternative road set; calculate the gear ratio according to the vehicle engine speed, the current vehicle speed, the tire diameter and the reduction ratio; obtain the target road type according to the geo-hash road network index; and extract the target trajectory information according to the target road type, the gear ratio and the target road distance.
[0162] In one embodiment, the road analysis module 40 is further used to obtain the target mileage, road type mileage and proportion, prefecture-level administrative division mileage and proportion, and driving road mileage and proportion based on the target trajectory information; and analyze the road type proportion based on the target mileage, the road type mileage and proportion, the prefecture-level administrative division mileage and proportion, and the driving road mileage and proportion.
[0163] The present application provides a road type analysis device based on geographic hashing, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the road type analysis method based on geographic hashing in the above-mentioned embodiment one.
[0164] Reference below Figure 6 , which shows a schematic diagram of the structure of a road type analysis device based on geo-hash suitable for implementing the embodiments of the present application. The road type analysis device based on geo-hash in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The road type analysis device based on geo-hash shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0165] like Figure 6As shown, the road type analysis device based on geo-hash can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a ROM (Read Only Memory) 1002 or a program loaded from a storage device 1003 into a RAM (Random Access Memory) 1004. Various programs and data required for the operation of the road type analysis device based on geo-hash are also stored in the RAM 1004. The processing device 1001, ROM 1002, and RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the geo-hash-based road type analysis device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a geo-hash-based road type analysis device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have instead.
[0166] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0167] The geo-hash-based road type analysis device provided in this application utilizes the geo-hash-based road type analysis method described in the aforementioned embodiment, resolving the technical issues of low efficiency in processing massive amounts of data associated with traditional road matching and administrative division analysis methods. Compared to the prior art, the geo-hash-based road type analysis device provided in this application achieves the same beneficial effects as the geo-hash-based road type analysis method described in the aforementioned embodiment. Other technical features of this geo-hash-based road type analysis device are the same as those disclosed in the aforementioned embodiment and are not further elaborated upon here.
[0168] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0169] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0170] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the road type analysis method based on geographic hashing in the above embodiment.
[0171] The computer-readable storage medium provided in this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, RAM (Random Access Memory), ROM (Read Only Memory), Erasable Programmable Read Only Memory (Erasable Programmable Read Only Memory or flash memory, EPROM), optical fiber, CD-ROM (CD-Read Only Memory, portable compact disk read-only memory), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0172] The computer-readable storage medium may be included in the road type analysis device based on geographic hashing, or may exist independently without being assembled into the road type analysis device based on geographic hashing.
[0173] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the road type analysis device based on geographic hashing, the road type analysis device based on geographic hashing: obtains vehicle trajectory data, national road network data and prefecture-level administrative division data; establishes a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary; converts the vehicle trajectory data into a geographic hash value to obtain a trajectory hash value; extracts target trajectory information based on the trajectory hash value and the geographic hash road network index dictionary, and analyzes the road type proportion based on the target trajectory information.
[0174] The computer program code for performing the operations of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a LAN (Local Area Network) or a WAN (Wide Area Network), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0175] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0176] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0177] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned geo-hashing-based road type analysis method. This computer-readable storage medium can address the technical issues of low efficiency in processing massive amounts of data associated with traditional road matching and administrative division analysis methods. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the geo-hashing-based road type analysis method provided in the aforementioned embodiments, and are not further elaborated here.
[0178] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned road type analysis method based on geographic hashing when executed by a processor.
[0179] The computer program product provided in this application can address the technical issues of low efficiency in processing massive amounts of data using traditional road matching and administrative division analysis methods. Compared to existing technologies, the computer program product provided in this application offers the same beneficial effects as the geohashing-based road type analysis method provided in the aforementioned embodiments, and will not be further elaborated here.
[0180] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A road type analysis method based on geo-hashing, characterized in that: The method comprises: Obtain vehicle trajectory data, national road network data, and prefecture-level administrative division data; Establishing a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary; Converting the vehicle trajectory data into a geo-hash value to obtain a trajectory hash value; Target trajectory information is extracted according to the trajectory hash value and the geographic hash road network index dictionary, and road type proportions are analyzed according to the target trajectory information.
2. The method according to claim 1, wherein The step of establishing a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary includes: Get the index dictionary; Extracting path points based on the national road network data and the prefecture-level administrative division data, and converting the path points into geographic hash values; A geo-hash index is established according to the index dictionary and the geo-hash value to obtain a geo-hash road network index dictionary.
3. The method according to claim 2, wherein The step of establishing a geo-hash index according to the index dictionary and the geo-hash value to obtain a geo-hash road network index dictionary comprises: determining whether the geo-hash value is included in the index dictionary; When the geo-hash value is not included in the index dictionary, constructing the geo-hash value and the prefecture-level administrative division data corresponding to the path point of the geo-hash value as a target key-value pair; Adding a path number to the target key-value pair to obtain a geographic hash index; The index dictionary is updated according to the geographic hash index to obtain a geographic hash road network index dictionary.
4. The method according to claim 3, wherein After the step of determining whether the geo-hash value is included in the index dictionary, the method further includes: When the geo-hash value is included in the index dictionary, determining whether the path number of the geo-hash value is included in the current geo-hash index; When the path number of the geo-hash value is not included in the current geo-hash index, adding the path number of the geo-hash value to the current geo-hash index to obtain a target geo-hash index; Update the geo-hash road network index dictionary according to the target geo-hash index.
5. The method according to claim 1, wherein The step of converting the vehicle trajectory data into a geographic hash value to obtain a trajectory hash value includes: Obtaining a vehicle speed, a first waypoint time, and a second waypoint time according to the vehicle trajectory data, wherein the first waypoint time is earlier than the second waypoint time; Calculating a waypoint theoretical distance based on the vehicle speed, the first waypoint time, and the second waypoint time; When the theoretical distance of the path point is greater than a preset theoretical distance threshold, the path point corresponding to the second path point time is deleted to obtain target trajectory data; Performing geo-hash conversion on the target trajectory data to obtain a trajectory hash value.
6. The method according to claim 1, wherein The step of extracting target trajectory information according to the trajectory hash value and the geo-hash road network index dictionary includes: Searching for road information in the geo-hash road network index dictionary according to the trajectory hash value to obtain a set of candidate roads; Calculate the target road distance based on the current path point position and the position of the alternative road in the alternative road set; Calculate the gear ratio based on the vehicle's engine speed, current vehicle speed, tire diameter, and reduction ratio; Obtaining a target road type according to the geographic hash road network index; Target trajectory information is extracted according to the target road type, the gear ratio, and the target road distance.
7. The method according to claim 1, wherein The step of analyzing the road type proportion according to the target trajectory information includes: According to the target trajectory information, the target mileage, road type mileage and proportion, prefecture-level administrative division mileage and proportion, and travel road mileage and proportion are obtained; The road type proportion is analyzed based on the target mileage, the road type mileage and proportion, the prefecture-level administrative division mileage and proportion, and the travel road mileage and proportion.
8. A road type analysis device based on geo-hashing, characterized in that: The device comprises: Data acquisition module, used to obtain vehicle trajectory data, national road network data, and prefecture-level administrative division data; An index building module, configured to build a geographic hash index based on the national road network data and the prefecture-level administrative division data to obtain a geographic hash road network index dictionary; A hash value conversion module, configured to convert the vehicle trajectory data into a geographic hash value to obtain a trajectory hash value; A road analysis module is used to extract target trajectory information according to the trajectory hash value and the geographic hash road network index dictionary, and analyze the road type ratio according to the target trajectory information.
9. A road type analysis device based on geo-hashing, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the road type analysis method based on geo-hashing according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the road type analysis method based on geographic hashing according to any one of claims 1 to 7 are implemented.