A road network matching method and device
By pre-calculating and storing observed probability values and transfer probability values, the HMM algorithm calculates time-consuming and memory overflow problems in road network matching is solved, and faster road network matching and more efficient memory usage is achieved.
Patent Information
- Application Number
- CN202211243335.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2042-10-11
AI Technical Summary
The existing HMM-based road network matching algorithm takes a long time to calculate the observed probability value and transfer probability value in real time, resulting in poor timeliness matching and large amount of electronic map data can easily lead to memory overflow.
The observed probability value and transfer probability value are pre-calculated, and the correlation with the geographical location area is stored in the road network database. By obtaining the geographical location area where the target track point is located, the corresponding probability value is directly found, reducing the amount of real-time calculation.
The speed of road network matching is accelerated, memory overflow problem is avoided, and the efficiency of road network matching is improved.
Smart Images

Figure CN115900733B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this specification relate to the technical field of positioning, and in particular, to a road network matching method, apparatus, electronic device, and storage medium. Background Art
[0002] Road network matching is a technology based on location services. Through the assumption that the movement of spatial objects is restricted by the road network, road network matching can match the spatial position coordinates obtained by positioning technology to the road segment where it is most likely to be located.
[0003] In practical applications, in order to improve the accuracy of road network matching, a road network matching algorithm based on HMM (Hidden Markov Model) can be adopted. For example, a vehicle-mounted terminal can obtain all road network data corresponding to an electronic map and load all the obtained road network data into the memory in an offline form. The vehicle-mounted terminal can also obtain GPS (Global Positioning System) trajectory points that need to be subjected to road network matching. Further, the vehicle-mounted terminal can calculate relevant observation probability values and transition probability values locally according to the road network data loaded into the memory by using a road network matching algorithm based on HMM to determine the road segment where the GPS trajectory point is located.
[0004] It can be seen that when using a road network matching algorithm based on HMM to determine the road segment where a GPS trajectory point is located, it is necessary to calculate observation probability values and transition probability values in real time, and the calculation takes a long time, resulting in poor timeliness of road network matching. Summary of the Invention
[0005] This application provides a road network matching method. Road network data corresponding to at least one geographical location area is stored in a road network database. Among them, the road network data corresponding to at least one geographical location area includes a first correspondence relationship between the at least one geographical location area and an observation probability value calculated in advance, and a second correspondence relationship between at least one pair of geographical location areas and a transition probability value calculated in advance. The observation probability value is used to represent the probability that a trajectory point in the corresponding geographical location area is located on a road segment that intersects with the geographical location area. The transition probability value is used to represent the probability of transitioning from a first road segment in a first geographical location area in the corresponding pair of geographical location areas to a second road segment in a second geographical location area in the corresponding pair of geographical location areas. The method includes:
[0006] Obtain a sequence of trajectory points of a vehicle; where the sequence of trajectory points includes at least one trajectory point;
[0007] Calculate the geographical location area where the target trajectory point to be matched among the at least one trajectory point is located, as the target geographical location area;
[0008] According to the first correspondence, obtain the observation probability value corresponding to the target geographical location area, and according to the second correspondence, obtain the transition probability value corresponding to the target geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area; wherein, the first geographical location area in the target geographical location area pair is the geographical location area where the previous trajectory point of the target trajectory point is located, and the second geographical location area in the target geographical location area pair is the target geographical location area; the first road segment is the road segment where the previous trajectory point of the target trajectory point is located, and the second road segment is each road segment among the at least one road segment that has an intersection with the target geographical location area;
[0009] Based on the obtained observation probability value and transition probability value, determine the target road segment where the target trajectory point is located from among the at least one road segment that has an intersection with the target geographical location area.
[0010] This application also provides a road network matching device. Road network data corresponding to at least one geographical location area is stored in the road network database; wherein, the road network data corresponding to the at least one geographical location area includes a first correspondence between the at least one geographical location area and the observation probability value calculated in advance, and a second correspondence between at least one geographical location area pair and the transition probability value calculated in advance; the observation probability value is used to represent the probability that a trajectory point in the corresponding geographical location area is located on a road segment that has an intersection with this geographical location area; the transition probability value is used to represent the probability of transferring from the first road segment in the first geographical location area in the corresponding geographical location area pair to the second road segment in the second geographical location area in the corresponding geographical location area pair; the device includes:
[0011] A first obtaining unit, configured to obtain a sequence of trajectory points of a vehicle; wherein, the sequence of trajectory points includes at least one trajectory point;
[0012] A calculation unit, configured to calculate the geographical location area where the target trajectory point to be matched among the at least one trajectory point is located, as the target geographical location area;
[0013] A second obtaining unit, configured to obtain an observation probability value corresponding to the target geographical location area according to the first corresponding relationship, and obtain a transition probability value corresponding to a target geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area according to the second corresponding relationship; wherein, the first geographical location area in the target geographical location area pair is the geographical location area where the previous trajectory point of the target trajectory point is located, and the second geographical location area in the target geographical location area pair is the target geographical location area; the first road section is the road section where the previous trajectory point of the target trajectory point is located, and the second road section is each road section in at least one road section having an intersection with the target geographical location area.
[0014] A determination unit, configured to determine the target road section where the target trajectory point is located from at least one road section having an intersection with the target geographical location area based on the obtained observation probability value and the transition probability value.
[0015] This application also provides an electronic device, including a communication interface, a processor, a memory, and a bus, where the communication interface, the processor, and the memory are interconnected through the bus;
[0016] The memory stores machine-readable instructions, and the processor executes the above method by calling the machine-readable instructions.
[0017] This application also provides a machine-readable storage medium, where the machine-readable storage medium stores machine-readable instructions, and the machine-readable instructions, when called and executed by a processor, implement the above method.
[0018] Through the above embodiments, on the one hand, since the observation probability value and the transition probability value are pre-computed, and the pre-computed observation probability value and transition probability value are associated and stored in the road network database with the corresponding geographical location area; therefore, in the subsequent road network matching process, only the target geographical location area where the target trajectory point is located needs to be calculated to obtain the corresponding observation probability value and transition probability value, that is, the pre-computed observation probability value and transition probability value can be directly searched, without having to calculate the observation probability value and transition probability value in real time according to the road network data, thereby reducing the calculation amount and calculation time in the road network matching process and accelerating the speed of road network matching.
[0019] On the other hand, since in the road network matching process, the vehicle-mounted terminal only needs to obtain the corresponding observation probability value and transition probability value according to the target geographical location area where the target trajectory point is located, without having to obtain and load all the road network data corresponding to the electronic map, so the problem of unable to load all and memory overflow can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] To more clearly illustrate the technical solutions of the embodiments of this specification, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0021] Figure 1 is a flowchart of a road network matching method shown in an exemplary embodiment;
[0022] Figure 2 is a schematic diagram of a geohash area shown in an exemplary embodiment;
[0023] Figure 3 is a schematic diagram of a hexagonal method shown in an exemplary embodiment;
[0024] Figure 4 is a schematic structural diagram of an electronic device where a road network matching device is located shown in an exemplary embodiment;
[0025] Figure 5 is a block diagram of a road network matching device shown in an exemplary embodiment. Detailed implementation manners
[0026] To enable those skilled in the art of this technology to better understand the technical solutions in this specification, the following will clearly and completely describe the technical solutions in the embodiments of this specification in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, rather than all of them. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this specification.
[0027] It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily executed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step for description in other embodiments.
[0028] To enable those skilled in the art of this technology to better understand the technical solutions in the embodiments of this specification, the following will briefly introduce the related technologies of road network matching involved in the embodiments of this specification.
[0029] Road network matching, also known as road matching, is a technology based on location services. Road network matching can, by assuming that the movement of spatial objects is restricted by the road network, match the spatial position coordinates obtained through positioning technology to the road segment where it is most likely to be located.
[0030] For example, since the GPS (Global Positioning System) sensors of in-vehicle terminals usually have certain positioning errors, that is, there are errors between the GPS trajectory points obtained by sampling and the user's true position, there are usually also errors between the GPS trajectory generated by several GPS trajectory points and the user's true trajectory. If the GPS trajectory directly crosses a house, lawn, road isolation belt, etc., it is obviously unreasonable. Therefore, road network matching is needed to map the GPS trajectory to the actual road, that is, to determine the road segment where each GPS trajectory point included in the GPS trajectory is located, and then obtain the user's true trajectory.
[0031] In practical applications, to improve the accuracy of road network matching, a road network matching algorithm based on HMM (Hidden Markov Model) can be used. Among them, HMM can be used to describe a Markov process with position parameters, and by modeling the connectivity of roads and considering different path assumptions, the road network matching problem can be solved.
[0032] Specifically, in the road network matching algorithm based on HMM, for each GPS trajectory point, a candidate road segment set can be determined first. Each candidate road segment included in the candidate road segment set can be represented as a hidden state (vertex) in the Markov chain and has an observation state probability. Further, weights, that is, state transition probabilities, can be calculated for the edges used to connect a pair of adjacent vertices in the Markov chain. Further, the maximum likelihood path with the highest observation state probability and state transition probability can be found on the Markov chain. Among them, the Viterbi algorithm is usually used for solving, that is, using dynamic programming to quickly find the optimal path that maximizes the product of the observation probability and the transition probability in the road network.
[0033] For example, the vehicle-mounted terminal can obtain all road network data corresponding to the electronic map, such as national road network data, and can load all the obtained road network data into the memory in an offline form; the vehicle-mounted terminal can also obtain the GPS trajectory points that need to be road network matched; further, even in the case of no communication network, the vehicle-mounted terminal can still calculate the relevant observation probability values (observation probability) and transition probability values (transition probability) locally according to the road network data loaded into the memory by using the road network matching algorithm based on HMM, and determine the road segment where the GPS trajectory point is located based on the calculated observation probability values and transition probability values.
[0034] It can be seen that in the above-described embodiments, on the one hand, when using the road network matching algorithm based on HMM to determine the road segment where the GPS trajectory point is located, it is necessary to calculate the observation probability value and the transition probability value in real time, and the calculation takes a long time, resulting in poor timeliness of road network matching; on the other hand, since it is usually necessary to load all the road network data corresponding to the electronic map into the vehicle-mounted terminal before performing road network matching, once the data volume of the road network data is large, it is easy to cause problems such as inability to load all and memory overflow.
[0035] In view of this, this specification aims to propose a technical solution for realizing fast road network matching based on the pre-calculated observation probability value and transition probability value.
[0036] In this specification, the road network database stores road network data corresponding to at least one geographical location area; wherein, the road network data corresponding to at least one geographical location area may include a first correspondence relationship between the at least one geographical location area and the observation probability value calculated in advance, and a second correspondence relationship between at least one geographical location area pair and the transition probability value calculated in advance; the observation probability value can be used to represent the probability that a trajectory point in the corresponding geographical location area is located on a road segment that intersects with the geographical location area; the transition probability value can be used to represent the probability of transitioning from a first road segment in the first geographical location area in the corresponding geographical location area pair to a second road segment in the second geographical location area in the corresponding geographical location area pair.
[0037] During implementation, a sequence of trajectory points of a vehicle can be obtained, and the sequence of trajectory points includes at least one trajectory point; further, a geographical location area where a target trajectory point to be matched among the at least one trajectory point is located can be calculated as a target geographical location area; further, according to the first correspondence, an observation probability value corresponding to the target geographical location area can be obtained, and according to the second correspondence, a transition probability value corresponding to a geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area can be obtained; wherein, the first geographical location area in the geographical location area pair is the geographical location area where the previous trajectory point of the target trajectory point is located, and the second geographical location area in the geographical location area pair is the target geographical location area; the first road segment is the road segment where the previous trajectory point of the target trajectory point is located, and the second road segment is each road segment among at least one road segment that intersects with the target geographical location area; further, based on the obtained observation probability value and transition probability value, the target road segment where the target trajectory point is located can be determined from among at least one road segment that intersects with the target geographical location area.
[0038] Thus, in the technical solution of this specification, on the one hand, since the observation probability value and the transition probability value are pre-calculated, and the pre-calculated observation probability value and transition probability value are associated and stored in the road network database with the corresponding geographical location area; therefore, in the subsequent road network matching process, only the target geographical location area where the target trajectory point is located needs to be calculated, and the corresponding observation probability value and transition probability value can be obtained, that is, the pre-calculated observation probability value and transition probability value can be directly searched, without having to calculate the observation probability value and transition probability value in real time according to the road network data, thereby reducing the calculation amount and calculation time consumption in the road network matching process and accelerating the speed of road network matching.
[0039] On the other hand, since in the road network matching process, the in-vehicle terminal only needs to obtain the corresponding observation probability value and transition probability value according to the target geographical location area where the target trajectory point is located, without having to obtain and load all the road network data corresponding to the electronic map, the problem of unable to load all and memory overflow can be avoided.
[0040] Please refer to Figure 1 , Figure 1 which is a flowchart of a road network matching method shown in an exemplary embodiment. The above method can perform the following steps:
[0041] Step 102: Obtain a sequence of trajectory points of the vehicle; wherein, the sequence of trajectory points includes at least one trajectory point;
[0042] Step 104: Calculate the geographical location area where the target trajectory point to be matched among the at least one trajectory point is located as the target geographical location area;
[0043] Step 106: According to the first correspondence relationship between at least one pre-calculated geographical location area and the observation probability value, obtain the observation probability value corresponding to the target geographical location area, and according to the second correspondence relationship between at least one pre-calculated geographical location area pair and the transition probability value, obtain the transition probability value corresponding to the target geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area;
[0044] Among them, the observation probability value is used to characterize the probability that the target trajectory point is located on a road section having an intersection with the target geographical location area; the first geographical location area in the target geographical location area pair is the geographical location area where the previous trajectory point of the target trajectory point is located, and the second geographical location area in the target geographical location area pair is the target geographical location area; the first road section in the first geographical location area is the road section where the previous trajectory point of the target trajectory point is located, and the second road section in the second geographical location area is each road section among at least one road section having an intersection with the target geographical location area; the transition probability value is used to characterize the probability that the target trajectory point transfers from the first road section to the second road section;
[0045] Step 108: Based on the obtained observation probability value and the transition probability value, determine the target road section where the target trajectory point is located from at least one road section having an intersection with the target geographical location area.
[0046] Next, through specific embodiments and in combination with specific application scenarios, the present application will be described in three stages: a pre-calculation stage, a road network matching stage, and a speeding warning stage.
[0047] (1) Pre-calculation stage
[0048] In this specification, road network data corresponding to at least one geographical location area is stored in the road network database.
[0049] Specifically, in the pre-calculation stage, a mapping relationship between the geographical location area and the road section can be created first, and then the road network data corresponding to the road sections having an intersection with each geographical location area is associated and stored with the geographical location area in the road network database.
[0050] For example, the geographic location area may specifically include a geohash area; in the pre-calculation stage, a mapping relationship between the geohash area and the road segment may be first created, and then the road network data corresponding to the road segment that intersects with each geohash area may be associated with each geohash area and stored in the road network database, so that the road network database stores road network data corresponding to at least one geohash area.
[0051] In practical applications, based on the general GeoHash algorithm, the earth can be understood as a two-dimensional plane. By encoding the spatial position (latitude and longitude data) of the trajectory point into a string, the two-dimensional plane corresponding to the earth can be recursively decomposed into smaller sub-areas. Several trajectory points in each sub-area can have the same geohash code as a spatial index.
[0052] See also Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a geohash region shown in an exemplary embodiment. Figure 2 As shown, a region can be divided into 6 geohash regions g1, g2, g3, g4, g5, and g6; among them, the geohash code of all trajectory points in geohash region g1 can be geohash_1, the geohash code of all trajectory points in geohash region g2 can be geohash_2, and so on. In the pre-calculation stage, the mapping relationship between geohash region g1 and road segment r1, the mapping relationship between geohash region g2 and road segments r1 and r2, and so on can be created first; then the geohash code geohash_1 is associated with the road network data corresponding to road segment r1 and stored, and the geohash code geohash_2 is associated with the road network data corresponding to road segments r1 and r2 and stored, and so on.
[0053] The longer the geohash code is, the more accurate the geographical location can be. For example, if a 9-bit geohash code is used, Figure 2 The geohash areas g1, g2, g3, g4, g5, and g6 shown can be used to represent a rectangular area with a length and width of approximately 5 meters.
[0054] It should be noted that Figure 2 Only 6 geohash areas and 4 road sections are shown as examples, which does not impose any special limitation on this specification; in actual applications, the number of areas of the at least one geographic location area is far greater than 6, and the number of road sections included in the entire road network data is far greater than 4.
[0055] In addition, it should be noted that in the above-described embodiments, the geographical location area is a geohash area, which is only an exemplary description; in practical applications, in addition to geohash coding, other methods can also be used to generate spatial indexes for each geographical location area.
[0056] In this specification, the road network data corresponding to at least one geographical location area may include a first correspondence relationship between at least one geographical location area and an observation probability value calculated in advance, and a second correspondence relationship between at least one geographical location area pair and a transition probability value calculated in advance. Among them, the first geographical location area or the second geographical location area included in the geographical location area pair may be any geographical location area in the at least one geographical location area.
[0057] Among them, the observation probability value can be used to represent the probability that a trajectory point in the corresponding geographical location area is located on a road section that intersects with the geographical location area; the transition probability value can be used to represent the probability of transitioning from a first road section in the first geographical location area in the corresponding geographical location area pair to a second road section in the second geographical location area in the corresponding geographical location area pair.
[0058] Specifically, in the pre-computation stage, for each geographical location area in the at least one geographical location area, an observation probability value used to represent the probability that a trajectory point in the geographical location area is located on a road section that intersects with the geographical location area can be calculated, and a transition probability value used to represent the probability of transitioning from a first road section in other geographical location areas to a second road section in the geographical location area can be calculated; further, in the form of key-value pairs (key-value), the geographical location area can be used as the key, and the corresponding observation probability value can be used as the value to store the first correspondence relationship in the road network database, and the geographical location area pair can be used as the key, and the corresponding transition probability value can be used as the value to store the second correspondence relationship in the road network database.
[0059] For example, please refer to Figure 2For the geohash regions shown, the road network database may store road network data corresponding to geohash regions g1, g2, g3, g4, g5, and g6 respectively. Among them, the road network data corresponding to geohash region g6 may include a first correspondence relationship between the geohash region g6 and the observation probability values, which is {g6: {r3: 0.2, r4: 0.3}}, and a second correspondence relationship between the geohash region g6 and the transition probability values, which is {"g1, g6": {"r1, r3": 0.1, "r1, r4": 0.3}, …, "g5, g6": {…}}.
[0060] Among them, {g6: {r3: 0.2, r4: 0.3}} can be used to represent that for the trajectory points in geohash region g6, the observation probability values of being located on road segments r3 and r4 are 0.2 and 0.3 respectively.
[0061] Among them, {"g1, g6": {"r1, r3": 0.1, "r1, r4": 0.3}} can be used to represent that for the trajectory points in geohash region g6, the transition probability value of transferring from road segment r1 in geohash region g1 to road segment r3 in geohash region g6 is 0.1, and the transition probability value of transferring from road segment r1 in geohash region g1 to road segment r4 in geohash region g6 is 0.3.
[0062] It should be noted that in the above-described embodiments, the specific values of the observation probability values and the transition probability values are merely exemplary descriptions and do not impose special limitations on this specification. Among them, the larger the value of the observation probability value, the closer the distance from the observed trajectory point sample to the candidate road segment can be represented, and the greater the probability of the trajectory point sample on the candidate road segment. The larger the value of the transition probability value, the closer the distance between the observed trajectory point samples can be represented, and the greater the probability of transferring from the road segment where the first trajectory point sample in the trajectory point sample pair is located to the road segment where the second trajectory point sample in the trajectory point sample pair is located.
[0063] The following combines Figure 2 and Figure 3 to introduce how to specifically determine the road segments that intersect with each geographical location region, and how to pre-calculate the first correspondence relationship and the second correspondence relationship.
[0064] In this specification, general road network data can be used as input data in the pre-computation stage. Among them, the general road network data, that is, road network data that does not include one or more of the first correspondence, the second correspondence, the observation probability value, and the transition probability value. Regarding the specific content of the general road network data, no limitation is made in this specification.
[0065] In an illustrated embodiment, roads intersecting with each geographical location area can be determined based on the hexagonal method. Specifically, for each road among at least one road included in the road network, it is possible to extend in three directions: upward, downward, left, or right from the two endpoints of each road, with the extension distance being a preset length, so as to obtain 6 vertices of the road area corresponding to this road, and then these 6 vertices can be connected to obtain the road area corresponding to this road; further, it is possible to calculate whether there is an intersection between the road areas of each road and each geographical location area.
[0066] For example, please refer to Figure 3 , Figure 3 is a schematic diagram of a hexagonal method shown in an exemplary embodiment. As Figure 3 shown, the spatial position coordinates of the two endpoints of road r1 are (lng1, lat1) and (lng2, lat2) respectively; if the preset extension distance can be 50m, that is, it is considered that the positioning error of the GPS is 50m, then for the two endpoints of road r1 to extend, the vertex coordinates of the 6 vertices obtained can be (lng1, lat1 + 50m), (lng1, lat1 - 50m), (lng1 - 50m, lat1), (lng2, lat2 + 50m), (lng2, lat2 - 50m), (lng2 + 50m, lat2), and then these 6 vertices can be connected to obtain the road area of road r1; on this basis, since the spatial position coordinates of each geohash area as Figure 2 shown are also known, it can be calculated whether there is an intersection between road r1 and each geohash area.
[0067] It should be noted that in the above illustrated embodiment, determining the roads intersecting with each geographical location area based on the hexagonal method is only an exemplary implementation method and does not limit this specification; in practical applications, those skilled in the art can flexibly formulate other methods to determine the roads intersecting with each geographical location area according to actual requirements such as the amount of calculation and the matching accuracy.
[0068] For another example, based on the circular method, the road segments that intersect with each geographical location area can be determined. Specifically, for each road segment among at least one road segment included in the road network, sampling can be performed at preset interval lengths on each road segment to obtain a plurality of sampling points; further, each sampling point can be used as the center of a circle, and a preset extension distance can be used as the radius to obtain a circular area corresponding to each sampling point, that is, the union of the circular areas corresponding to each sampling point on the road segment can be used as the road segment area of the road segment; further, it can be calculated whether there is an intersection between the circular areas corresponding to each sampling point on each road segment and each geographical location area.
[0069] It can be seen that the circular method has higher accuracy than the hexagonal method, but has a larger amount of calculation in the pre-computation stage; in practical applications, since road network data usually updates continuously, the data such as the road segments intersecting with geographical location areas, observation probability values, and transition probability values stored in the road network database also need to be updated continuously. Therefore, based on the hexagonal method to determine the road segments that intersect with each geographical location area, the amount of calculation in the pre-computation stage is smaller, and the accuracy is also within an acceptable range, with a relatively high cost performance.
[0070] In this specification, since the target trajectory points in the road network matching stage may be located at any position in any geographical location area, and considering the amount of calculation in the pre-computation stage, it is difficult to pre-calculate the observation probability value and transition probability value corresponding to each trajectory point for all possible trajectory points one by one; therefore, only the observation probability value and transition probability value corresponding to the center of each geographical location area can be calculated. Subsequently, in the road network matching stage, for a target trajectory point located at any position in the target geographical location area, the observation probability value and transition probability value corresponding to the center of the pre-calculated target geographical location area can be directly obtained as the observation probability value and transition probability value corresponding to the target trajectory point.
[0071] In one of the illustrated embodiments, before performing road network matching, a first correspondence between at least one geographical location area and an observation probability value can be pre-calculated. In implementation, the road segments that intersect with each geographical location area in the at least one geographical location area can be determined; further, the shortest distance from the center of each geographical location area to the road segment that intersects with this geographical location area can be calculated, and based on the shortest distance, an observation probability value for characterizing the probability that the center of each geographical location area is located on the road segment that intersects with this geographical location area can be calculated; wherein, the smaller the shortest distance, the larger the observation probability value calculated based on the shortest distance; further, the calculated observation probability value can be determined as the observation probability value for characterizing the probability that any trajectory point in each geographical location area is located on the road segment that intersects with this geographical location area, so as to obtain the first correspondence between each geographical location area and the observation probability value.
[0072] For example, as Figure 2 shown, for the geohash area g6, the road segments that intersect with it can be determined as r3 and r4; further, the shortest distances d(g6→r3) and d(g6→r4) from the center of the geohash area g6 to the road segments r3 and r4 can be calculated, that is, the center of the geohash area g6 is point A, the perpendicular point of point A and the road segment r3 is point B, the perpendicular point of point A and the road segment r4 is point C, and the lengths of the line segments AB and AC can be calculated respectively; further, the observation probability value for characterizing the probability that the center of the geohash area g6 is located on the road segment r3 can be represented by the following formula:
[0073]
[0074] wherein, obser_min_dist can be the extension distance, for example, the extension distance can be preset to 50m; based on a similar method, the observation probability value for characterizing the probability that the center of the geohash area g6 is located on the road segment r4 can also be calculated Further, the pre-calculated observation probability value can be determined as the observation probability value for characterizing the probability that any trajectory point in the geohash area g6 is located on the road segment r3, and, the pre-calculated observation probability value can be determined as the observation probability value for characterizing the probability that any trajectory point in the geohash area g6 is located on the road segment r4, so as to obtain the first correspondence between the geohash area g6 and the observation probability value as:
[0075]
[0076] Based on a similar method, a first correspondence between other geohash regions and observation probability values can also be pre-computed, which will not be elaborated here one by one.
[0077] It should be noted that in the above-described embodiments, the smaller the shortest distance from the center of each geographical location region to the road segment that intersects with the geographical location region, the smaller the shortest distance from the trajectory points in the geographical location region to the road segment that intersects with the geographical location region may be, and thus the greater the probability that the trajectory points in the geographical location region are located on the road segment that intersects with the geographical location region. Therefore, the observation probability value calculated based on the shortest distance is greater.
[0078] In one of the illustrated embodiments, before performing road network matching, a second correspondence between at least one pair of geographical location regions and transition probability values can be pre-computed. In implementation, the path passing from the first road segment in the first geographical location region in each pair of geographical location regions in the at least one pair of geographical location regions to the second road segment in the second geographical location region in the pair of geographical location regions can be determined; the path includes at least one road segment; further, the shortest path length from the first foot of the perpendicular from the center of the first geographical location region to the first road segment to the second foot of the perpendicular from the center of the second geographical location region to the second road segment can be calculated, and based on the shortest path length, a transition probability value for characterizing the probability of passing from the first road segment in the first geographical location region in each pair of geographical location regions to the second road segment in the second geographical location region in the pair of geographical location regions can be calculated to obtain the second correspondence between each pair of geographical location regions and the transition probability values; where, the smaller the shortest path length, the greater the transition probability value calculated based on the shortest path length.
[0079] For example, as Figure 2 shown, for the geohash region pair "g1, g6", the first road segment in the first geohash region g1 can be r1, and the second road segments in the second geohash region g6 can be r3, r4. Therefore, the path passing from the first road segment to the second road segment can be r1 -> r4, or r1 -> r2 -> r3; further, the center of the geohash region g1 is point D, and the foot of the perpendicular from point D to the road segment r1 is point E. Then, for the path r1 -> r4, the shortest path length from the first foot of the perpendicular D to the second foot of the perpendicular C can be calculated Further, the transition probability value for characterizing the probability of passing from the road segment r1 in the geohash region g1 to the road segment r4 in the geohash region g6 can be represented by the following formula:
[0080]
[0081] Among them, dist(g1, g6) can be the distance on the earth's surface between the centers of the geohash regions g1 and g6. Based on a similar method, for another path r1->r2->r3, a transition probability value can also be calculated to characterize the probability of transferring from the road segment r1 in the geohash region g1 to the road segment r3 in the geohash region g6. Based on a similar method, transition probability values corresponding to geohash region pairs (such as "g2, g6", etc.) composed of other geohash regions (such as g2, g3, g4, g5, etc.) and the geohash region g6 can also be calculated. Furthermore, a second correspondence between the geohash region pair "g1, g6" and the transition probability value can be obtained as follows:
[0082]
[0083] Based on a similar method, second correspondences between other geohash region pairs and transition probability values can also be pre-calculated, which will not be elaborated one by one here.
[0084] It should be noted that in the above-described embodiments, since the distance on the earth's surface between the centers of the two geographical location regions is a fixed value, and during the vehicle driving process, it usually tends to choose a shorter path. Therefore, the smaller the shortest path length from the first foot of the perpendicular to the second foot of the perpendicular, the greater the possibility that the trajectory point on the first road segment in the first geographical location region transfers to the second road segment where the second foot of the perpendicular is located when transferring to the second geographical location region. That is, the greater the probability of transferring from the first road segment where the first foot of the perpendicular is located to the second road segment where the second foot of the perpendicular is located. Therefore, the transition probability value calculated based on the shortest path length is greater.
[0085] In another embodiment shown, in order to further improve the accuracy of the road network matching result, the second correspondence can be pre-calculated in combination with road segment features. Among them, the road segment features can include features such as the steering angle between road segments, the road surface width of the road segment, and the road surface condition of the road segment. Here, taking the calculation of the second correspondence in combination with the steering angle of the road segment as an example for illustration.
[0086] In implementation, the path may further include at least one turning angle; calculating the transition probability value based on the shortest path length may specifically include: calculating, based on the shortest path length and the angles of the respective turning angles, a transition probability value for characterizing the probability of transferring from a first road segment in a first geographical location area in each pair of geographical location areas to a second road segment in a second geographical location area in this pair of geographical location areas; wherein, the smaller the angle of the turning angle, the smaller the transition probability value calculated based on the angle of the turning angle.
[0087] For example, as Figure 2 shown, in the path r1->r4, it may include the turning angle And, in the path r1->r2->r3, it may include the turning angle Further, for the path r1->r4, the transition probability value for characterizing the probability of transferring from the road segment r1 in the geohash area g1 to the road segment r4 in the geohash area g6 may be characterized by the formula shown as follows:
[0088]
[0089] Among them, ∏w(angle(r1, r4)) may be used to characterize the weight coefficient calculated based on the angles of the respective turning angles included in the path r1->r4; specifically, the weight coefficient may be characterized as:
[0090]
[0091] Among them, r m may be the first road segment, r n may be the second road segment, angle(r m , r n ) may be the angles of the respective turning angles included in the path passing from r m to r n ; it should be noted that regarding the specific values and angle ranges of the weight coefficients corresponding to different angles of the turning angle, those skilled in the art can flexibly set them according to needs, and what is shown above is only an exemplary description.
[0092] In a possible embodiment, substituting the turning angles into the formula shown above respectively, the weight coefficient corresponding to the path r1->r4 can be calculated as w(angle(r1, r4)) = 2 / 3, and the weight coefficient corresponding to the path r1->r2->r3 is
[0093] It should be noted that in the above - shown embodiments, during the vehicle driving process, especially for large vehicles such as trucks and buses, paths that require turning or U - turning are usually avoided as much as possible. In particular, paths with relatively small steering angles between sections are avoided. Therefore, the smaller the angles of each steering angle included in the path and the larger the number of steering angles, the lower the probability that the vehicle actually passes through this path. Consequently, the transfer probability value calculated based on the angle of the steering angle is smaller.
[0094] In addition, it should be noted that regarding the sections included in the path and the steering angles between sections, they can be determined based on the section topology data in the general road network data, which will not be elaborated here. Among them, in order to avoid excessive computational complexity in the pre - calculation stage, when pre - calculating the transfer probability, the topological level between the first section and the second section can be flexibly set; for example, it can be set that the topological level between the first section and the second section does not exceed 8 levels.
[0095] (II) Road network matching stage
[0096] In this specification, since the relevant observation probability values and transfer probability values have been pre - calculated in the pre - calculation stage and are associated with geographical location regions and stored in the road network database, in the road network matching stage, the pre - calculated observation probability values and transfer probability values can be directly obtained to determine the target section where the target trajectory point is located.
[0097] In step 102, a sequence of trajectory points of the vehicle is obtained; where the sequence of trajectory points includes at least one trajectory point.
[0098] For example, through devices such as GPS sensors, a sequence of trajectory points of the vehicle T = <p1, p2,..., p i > can be obtained; where p i can be used to represent the i - th trajectory point in the sequence of trajectory points T, and i can be a positive integer greater than 1.
[0099] In an illustrated implementation manner, in step 102, it may further include: performing a time - series anomaly filtering process on the sequence of trajectory points.
[0100] For example, for the obtained sequence of trajectory points T = <p1, p2,..., p i>For time series anomaly processing, the LOF (Local Outlier Factor) algorithm can be used to calculate the local outlier factor corresponding to each trajectory point. If the calculated local outlier factor is greater than the preset threshold, it can be determined that the trajectory point is an abnormal trajectory point and needs to be filtered out from the trajectory point sequence. Among them, the larger the local outlier factor, the more likely the corresponding trajectory point is an abnormal trajectory point. For the specific implementation of the LOF algorithm, please refer to the related technology and will not be elaborated here.
[0101] In step 104, calculate the geographical location area where the target trajectory point to be matched among the at least one trajectory point is located as the target geographical location area.
[0102] For example, the recently real-time collected trajectory point p i can be used as the target trajectory point to be matched. As Figure 2 shown, according to the spatial position coordinates of the target trajectory point p i , the target geographical location area where the target trajectory point p i is located can be calculated as the geohash area g6.
[0103] In a possible embodiment, since the target geographical location area where the target trajectory point is located has been determined, the road sections that intersect with the target geographical location area can be determined as the candidate road sections where the target trajectory point is located. For example, as Figure 2 shown, after determining that the target geographical location area where the target trajectory point p i is located is the geohash area g6, the road sections r3 and r4 that intersect with the geohash area g6 can be determined as the candidate road sections.
[0104] In step 106, according to the first correspondence, obtain the observation probability value corresponding to the target geographical location area, and according to the second correspondence, obtain the transition probability value corresponding to the target geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area.
[0105] For example, after determining that the target geographical location area where the target trajectory point p i is located is the geohash area g6, according to the first correspondence {g6: {r3: 0.2, r4: 0.3}} pre-calculated in the pre-computation stage, the observation probability value corresponding to the geohash area g6 can be directly obtained, that is, the observation probability value of the target trajectory point p i being located on the road section r3 is 0.2, and the observation probability value of the target trajectory point p i being located on the road section r4 is 0.3.
[0106] and, it is known that the target trajectory point p i and the previous trajectory point p i-1 is located in the geographical location area geohash area g1. Therefore, according to the second correspondence {"g1, g6": {"r1, r3": 0.1, "r1, r4": 0.3},..., "g5, g6": {...}} pre-computed in the pre-computation stage, the transition probability value corresponding to the target geohash area pair "g1, g6" can be directly obtained. That is, the transition probability value of the target trajectory point p i transferring from section r1 to section r3 is 0.1, and the target trajectory point p i transferring from section r1 to section r4 is 0.3.
[0107] It should be noted that in the traditional HMM algorithm, usually in the road network matching stage, according to all the road network data, the observation probability value and the transition probability value are calculated in real time, resulting in a large amount of calculation in the road network matching stage, a long calculation time, and thus a slow road network matching speed; while in this specification, since the observation probability value and the transition probability value can be pre-computed, in the road network matching stage, the observation probability value and the transition probability value can be directly queried in real time, thereby reducing the amount of calculation in the road network matching stage, shortening the calculation time in the road network matching stage, and accelerating the road network matching speed.
[0108] In an illustrated embodiment, in step 106, obtaining the observation probability value corresponding to the target geographical location area according to the first correspondence, and obtaining the transition probability value corresponding to the geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area according to the second correspondence may specifically include: obtaining the road network data corresponding to the target geographical location area from the road network database; searching for the observation probability value corresponding to the target geographical location area in the obtained road network data according to the first correspondence; and searching for the transition probability value corresponding to the geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area in the obtained road network data according to the second correspondence.
[0109] For example, when determining the target trajectory point p iAfter the target geographical location area is the geohash area g6, the road network data corresponding to the target geohash area g6 can be obtained from the road network database, and the obtained road network data corresponding to the target geohash area g6 can be recorded in the memory. Further, the observation probability value corresponding to the target geohash area g6 can be directly searched in the obtained road network data; and the transition probability value corresponding to the target geohash area pair "g1, g6" can be directly searched in the obtained road network data.
[0110] It should be noted that in the related art, it is usually necessary to obtain and load all the road network data corresponding to the electronic map, so problems such as being unable to load all data and out-of-memory may occur. In the above-described embodiment, only the road network data corresponding to the target geographical location area needs to be obtained and loaded, that is, only a small part of all the road network data needs to be loaded. Therefore, the problems of being unable to load all data and out-of-memory can be avoided. In addition, by first loading the road network data corresponding to the target geographical location area to the in-vehicle terminal locally and then performing road network matching by the in-vehicle terminal locally, the number of data access requests sent to the road network database can be reduced, the pressure on the road network database can be avoided, and the influence on the road network matching speed when the network condition is poor can also be avoided.
[0111] Based on a similar technical concept, in the pre-computation stage, at least one corresponding relationship between vehicle types and road network data can also be created. Then, in the road network matching stage, only the road network data corresponding to the vehicle type of the vehicle needs to be obtained, thereby reducing the amount of road network data to be loaded in the road network matching stage, which will not be elaborated in detail here.
[0112] In another embodiment shown, in order to further save the memory of the in-vehicle terminal, in step 106, the observation probability value corresponding to the target geographical location area can be queried in real time from the road network database, and the transition probability value corresponding to the target geographical location area pair can also be queried in real time to obtain the corresponding query result, without obtaining the road network data corresponding to the target geographical location area from the road network database.
[0113] For example, the pre-computed first corresponding relationship and second corresponding relationship can be stored in a database such as OTS that supports real-time query. In the road network matching stage, a real-time query can be initiated to the road network database.
[0114] In step 108, based on the obtained observation probability value and transition probability value, the target road segment where the target trajectory point is located is determined from at least one road segment that intersects with the target geographical location area.
[0115] For example, after obtaining the target trajectory point p i The observation probability value located in section r3 is 0.2, and the target trajectory point p i The observation probability value located in section r4 is 0.3, and, after obtaining the target trajectory point p i The transition probability value from section r1 to section r3 is 0.1, and the target trajectory point p i The transition probability value from section r1 to section r4 is 0.3, it is possible to determine the target section where the target trajectory point p i is located from the candidate sections r3 and r4 that intersect with the target geohash region g6; wherein, the target section may include one or more sections among the candidate sections.
[0116] Specifically, in step 108, it is possible to calculate the product of the obtained observation probability value and the transition probability value to obtain the matching probability values of each section that intersects with the target geographical location area; wherein, the matching probability value can be used to represent the probability that the target trajectory point is located in each section that intersects with the target geographical location area; further, according to the matching probability value, from at least one section that intersects with the target geographical location area, determine the target section where the target trajectory point is located.
[0117] Among them, the determining the target section where the target trajectory point is located from at least one section that intersects with the target geographical location area according to the matching probability value may specifically include: from at least one section that intersects with the target geographical location area, determining the section whose matching probability value exceeds a preset threshold as the target section where the target trajectory point is located; or, from at least one section that intersects with the target geographical location area, determining the preset number of sections with the largest matching probability value as the target section where the target trajectory point is located.
[0118] For example, after obtaining the target trajectory point p i The observation probability value located in section r3 is 0.2, and the target trajectory point p i The observation probability value located in section r4 is 0.3, and, after obtaining the target trajectory point p i The transition probability value from section r1 to section r3 is 0.1, and the target trajectory point p i The transition probability value from section r1 to section r4 is 0.3, it is possible to calculate that the matching probability value of section r3 is 0.2 * 0.1 = 0.02, and the matching probability value of section r4 is 0.3 * 0.3 = 0.09; further, the preset threshold may be 0.05, and according to the calculated matching probability values of each candidate section, it is possible to determine the section r4 whose corresponding matching probability value exceeds the preset threshold as the target trajectory point pi The target road section where it is located; or, the preset quantity is 2, and according to the calculated matching probability values of each candidate road section, the two road sections r3 and r4 with the largest corresponding matching probability values can be determined as the target trajectory point p i The target road section where it is located.
[0119] In a possible embodiment, in the process of determining the target road section from the candidate road sections based on spatial analysis, constraint conditions can also be added according to requirements, so as to improve the accuracy of the road network matching result.
[0120] For example, when screening the candidate road sections based on the observation probability, the following constraint conditions can be added:
[0121]
[0122] Among them, can be used to represent the road section direction of the road section r n ; can be used to represent the trajectory direction of the target trajectory point p i ; The constraint condition can limit the included angle between the direction of the target road section and the trajectory direction of the target trajectory point to be less than the preset angle threshold π / 6, that is, in the actual driving process, the trajectory direction of the vehicle should be basically consistent with the road section direction of the road section where it is located. Based on the above constraint conditions, road sections that are close to the position of the target trajectory point but have obvious direction differences can be filtered out from the candidate road sections.
[0123] In an illustrated implementation manner, in order to further improve the accuracy of the road network matching result, in addition to determining the target road section from the candidate road sections based on spatial analysis, the target road section can also be determined from the candidate road sections through time analysis. Simultaneously with or after step 108, the method may further include: determining the road section where the previous trajectory point of the target trajectory point is located, the path passed from the road section to the road section that intersects with the target geographical location area, and calculating the shortest path length of the path; determining the time taken from the previous trajectory point of the target trajectory point to move to the target trajectory point; according to the shortest path length and the time, calculating the average speed from the previous trajectory point of the target trajectory point to the target trajectory point as the average speed corresponding to the target road section; filtering out the target road sections corresponding to the average speed exceeding the preset speed threshold from the determined target road sections.
[0124] For example, after determining that the candidate road sections are r3 and r4, if road section r4 is a highway section, and from the previous trajectory point p of the target trajectory point p i ; i-1The path "r1 -> r4" passed through includes more high-speed sections, while section r3 is an ordinary section, and from the target trajectory point p i to the previous trajectory point p i-1 The path "r1 -> r2 -> r3" needs to detour a longer path length; further, the shortest path lengths of the paths "r1 -> r4" and "r1 -> r2 -> r3" can be calculated, and according to the target trajectory point p i (lng i , lat i , t i ), the previous trajectory point p i-1 (lng i-1 , lat i-1 , t i-1 ), it can be determined that the elapsed time Δt from the previous trajectory point p i-1 to the target trajectory point p i is Δt = t i - t i-1 ; further, according to the shortest path length and the elapsed time, the average speeds of moving from the previous trajectory point p i-1 to the target trajectory point p i along the paths "r1 -> r4" and "r1 -> r2 -> r3" can be calculated respectively, and used as the average speeds corresponding to sections r4 and r3 respectively; if the preset speed threshold is 120 km / h, the average speed corresponding to section r4 is 60 km / h, and the average speed corresponding to section r3 is 150 km / h. It can be seen that the average speed on the path "r1 -> r2 -> r3" is 150 km / h, which is obviously unreasonable. Therefore, section r3 can be filtered out.
[0125] (III) Overspeed warning stage
[0126] In the related art, in-vehicle terminals of the Ministry of Transport industry standards usually can only achieve the highest speed limit reminder; for sections with relatively low actual speed limits such as ramps, interchanges, national roads, and provincial roads, accurate speed limit reminders cannot be achieved. In the technical solution of this specification, on the basis of realizing fast road network matching, the actual speed limits of different sections can be combined to provide users with more timely and accurate overspeed warning services.
[0127] In this specification, after step 108, the method may further include: obtaining the section speed limit value corresponding to the target section; and performing overspeed warning according to the moving speed of the vehicle and the section speed limit value according to a preset overspeed warning strategy.
[0128] For example, the speed limit value for a general section in the urban area can be 60 km / h, while the speed limit value for a school section can be 30 km / h. If it is determined that the target section where the target trajectory point is located belongs to the school section, the speed limit value corresponding to the target section can be determined as 30 km / h, and an overspeed warning can be given according to the preset overspeed warning strategy based on the current moving speed of the vehicle and the speed limit value of the school section.
[0129] In one shown embodiment, to further improve the accuracy of the overspeed warning, in addition to giving an overspeed warning by combining the actual speed limit values of different sections, the actual speed limit values of different sections at different times and for different vehicle types can also be combined for the overspeed warning. In implementation, obtaining the speed limit value corresponding to the target section may specifically include: obtaining the time period speed limit value and / or vehicle type speed limit value corresponding to the target section; and determining the speed limit value according to the time period speed limit value and / or vehicle type speed limit value.
[0130] For example, the speed limit value for a certain section during the peak period can be 40 km / h, and the speed limit value for other non-peak periods can be 60 km / h. If it is determined that the target section where the target trajectory point is located belongs to this section and the current time period belongs to the peak period, the speed limit value corresponding to the target section can be determined as 40 km / h, and an overspeed warning can be given according to the preset overspeed warning strategy based on the current moving speed of the vehicle.
[0131] For another example, the speed limit value for a certain section for large trucks can be 40 km / h, and the speed limit value for ordinary vehicles can be 60 km / h. If it is determined that the target section where the target trajectory point is located belongs to this section and the vehicle belongs to a large truck, the speed limit value corresponding to the target section can be determined as 40 km / h, and an overspeed warning can be given according to the preset overspeed warning strategy based on the current moving speed of the vehicle.
[0132] It should be noted that in the above shown embodiments, regarding the overspeed warning strategy, no special limitation is made in this specification, and those skilled in the art can flexibly set it according to requirements. For example, to reduce the disturbance to the user, the overspeed warning strategy can be set to give an overspeed warning in response to detecting that the current moving speed of the vehicle exceeds the speed limit value corresponding to the target section to prompt the user that they have exceeded the speed limit. For another example, for scenarios with high requirements for driving safety such as passenger cars and trucks, the overspeed warning strategy can be set to give an overspeed warning in response to detecting that the current moving speed of the vehicle is close to the speed limit value corresponding to the target section to prompt the user in time before overspeed.
[0133] As can be seen from the above technical solutions, on the one hand, since the observation probability values and transition probability values are pre-computed and the pre-computed observation probability values and transition probability values are stored in association with the corresponding geographical location areas in the road network database; therefore, in the subsequent road network matching process, only the target geographical location area where the target trajectory point is located needs to be calculated, and the corresponding observation probability values and transition probability values can be obtained, that is, the pre-computed observation probability values and transition probability values can be directly searched, without the need to calculate the observation probability values and transition probability values in real time according to the road network data, thereby reducing the calculation amount and calculation time in the road network matching process and accelerating the speed of road network matching.
[0134] On the other hand, since in the road network matching process, the vehicle-mounted terminal only needs to obtain the corresponding observation probability values and transition probability values according to the target geographical location area where the target trajectory point is located, without the need to obtain and load all the road network data corresponding to the electronic map, the problem of inability to fully load and memory overflow can be avoided.
[0135] Corresponding to the embodiment of the above road network matching method, this specification also provides an embodiment of a road network matching device.
[0136] Please refer to Figure 4 , Figure 4 which is a hardware structure diagram of an electronic device where a road network matching device shown in an exemplary embodiment is located. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410. Of course, other hardware required for other services may also be included. One or more embodiments of this specification can be implemented in a software manner. For example, the processor 402 reads the corresponding computer program from the non-volatile memory 410 into the memory 408 and then runs it. Of course, in addition to the software implementation manner, one or more embodiments of this specification do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, and can also be hardware or a logic device.
[0137] Please refer to Figure 5 , Figure 5 which is a block diagram of a road network matching device shown in an exemplary embodiment. The road network matching device can be applied to such as Figure 4In the electronic device shown, the technical solution of this specification is implemented. The road network database stores road network data corresponding to at least one geographical location area; wherein, the road network data corresponding to at least one geographical location area includes a first correspondence relationship between the at least one geographical location area and an observation probability value calculated in advance, and a second correspondence relationship between at least one geographical location area pair and a transition probability value calculated in advance; the observation probability value is used to represent the probability that a trajectory point in the corresponding geographical location area is located on a road section having an intersection with the geographical location area; the transition probability value is used to represent the probability of transferring from a first road section in a first geographical location area in the corresponding geographical location area pair to a second road section in a second geographical location area in the corresponding geographical location area pair; the device includes: wherein, the road network matching device may include:
[0138] A first acquisition unit 502, configured to acquire a sequence of trajectory points of a vehicle; wherein, the sequence of trajectory points includes at least one trajectory point;
[0139] A calculation unit 504, configured to calculate the geographical location area where a target trajectory point to be matched among the at least one trajectory point is located as a target geographical location area;
[0140] A second acquisition unit 506, configured to acquire, according to the first correspondence relationship, an observation probability value corresponding to the target geographical location area, and, according to the second correspondence relationship, acquire a transition probability value corresponding to a target geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area; wherein, the first geographical location area in the target geographical location area pair is the geographical location area where the previous trajectory point of the target trajectory point is located, and the second geographical location area in the target geographical location area pair is the target geographical location area; the first road section is the road section where the previous trajectory point of the target trajectory point is located, and the second road section is each road section among at least one road section having an intersection with the target geographical location area;
[0141] A determination unit 508, configured to determine, based on the acquired observation probability value and the transition probability value, a target road section where the target trajectory point is located from among at least one road section having an intersection with the target geographical location area.
[0142] In this embodiment, the second acquisition unit 506 is specifically configured to:
[0143] Acquire road network data corresponding to the target geographical location area from the road network database;
[0144] According to the first correspondence, search for the observed probability value corresponding to the target geographical location area in the obtained road network data; and, according to the second correspondence, search for the transition probability value corresponding to the target geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area in the obtained road network data.
[0145] In this embodiment, the determining unit 508 is specifically configured to:
[0146] Calculate the product of the obtained observed probability value and the transition probability value to obtain the matching probability value of each road section having an intersection with the target geographical location area; wherein, the matching probability value is used to represent the probability that the target trajectory point is located on each road section having an intersection with the target geographical location area.
[0147] According to the matching probability value, determine the target road section where the target trajectory point is located from at least one road section having an intersection with the target geographical location area.
[0148] In this embodiment, the determining unit 508 is specifically configured to:
[0149] From at least one road section having an intersection with the target geographical location area, determine the road section whose matching probability value exceeds a preset threshold as the target road section where the target trajectory point is located; or,
[0150] From at least one road section having an intersection with the target geographical location area, determine the preset number of road sections with the largest matching probability value as the target road section where the target trajectory point is located.
[0151] In this embodiment, the device further includes:
[0152] A third obtaining unit, configured to obtain the road section speed limit value corresponding to the target road section;
[0153] An overspeed warning unit, configured to perform overspeed warning according to a preset overspeed warning strategy based on the moving speed of the vehicle and the road section speed limit value.
[0154] In this embodiment, the third obtaining unit is specifically configured to:
[0155] Obtain the time period speed limit value and / or vehicle type speed limit value corresponding to the target road section;
[0156] Determine the road section speed limit value according to the time period speed limit value and / or vehicle type speed limit value.
[0157] In this embodiment, the device further includes a first pre-calculation unit 504, configured to:
[0158] Determine the road segments that intersect with each geographical location area in the at least one geographical location area;
[0159] Calculate the shortest distance from the center of each geographical location area to the road segment that intersects with this geographical location area, and based on the shortest distance, calculate the observed probability value used to characterize the probability that the center of each geographical location area is located on the road segment that intersects with this geographical location area; wherein, the smaller the shortest distance, the larger the observed probability value calculated based on the shortest distance;
[0160] Determine the calculated observed probability value as the observed probability value used to characterize the probability that any trajectory point in each geographical location area is located on the road segment that intersects with this geographical location area, so as to obtain the first correspondence between each geographical location area and the observed probability value.
[0161] In this embodiment, the device further includes a second pre-computation unit 504, which is used for:
[0162] Determine the path passed from the first road segment in the first geographical location area of each geographical location area pair in the at least one geographical location area pair to the second road segment in the second geographical location area of this geographical location area pair; at least one road segment is included in the path;
[0163] Calculate the shortest path length from the first perpendicular point of the center of the first geographical location area and the first road segment to the second perpendicular point of the center of the second geographical location area and the second road segment, and based on the shortest path length, calculate the transition probability value used to characterize the probability of transferring from the first road segment in the first geographical location area of each geographical location area pair to the second road segment in the second geographical location area of this geographical location area pair, so as to obtain the second correspondence between each geographical location area pair and the transition probability value; wherein, the smaller the shortest path length, the larger the transition probability value calculated based on the shortest path length.
[0164] In this embodiment, at least one steering angle is further included in the path;
[0165] The second pre-computation unit 504 is specifically used for:
[0166] Based on the shortest path length and the angles of the respective steering angles, calculate the transition probability value used to characterize the probability of transferring from the first road segment in the first geographical location area of each geographical location area pair to the second road segment in the second geographical location area of this geographical location area pair; wherein, the smaller the angle of the steering angle, the smaller the transition probability value calculated based on the angle of the steering angle.
[0167] In this embodiment, the device further includes a time analysis unit, configured to:
[0168] Determine the path passed from the section where the previous trajectory point of the target trajectory point is located to the section that intersects with the target geographical location area, and calculate the shortest path length of the path;
[0169] Determine the time taken to move from the previous trajectory point of the target trajectory point to the target trajectory point;
[0170] According to the shortest path length and the time, calculate the average speed of moving from the previous trajectory point of the target trajectory point to the target trajectory point, as the average speed corresponding to the target section;
[0171] Filter out the target sections from the determined target sections whose corresponding average speeds exceed the preset speed threshold.
[0172] For the functions and roles of each unit in the above device, the specific implementation process can be seen in detail in the implementation process of the corresponding steps in the above method, which will not be elaborated here.
[0173] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to the partial description of the method embodiment. The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0174] The systems, devices, modules or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device, or a combination of any several of these devices.
[0175] In a typical configuration, a computer includes one or more processors (CPUs), an input / output interface, a network interface, and a memory.
[0176] The memory may include non-permanent memory in the form of computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0177] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media, or other magnetic storage devices, or any other non-transitory media that can store information accessible by a computing device. As defined herein, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
[0178] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.
[0179] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0180] The terms used in one or more embodiments of this specification are for the purpose of describing particular embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0181] It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".
[0182] The foregoing is only a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included within the scope of protection of one or more embodiments of this specification.
Claims
1. A road network matching method, where road network data corresponding to at least one geographical location area is stored in a road network database; among them, The road network data corresponding to at least one geographical location area includes a first correspondence relationship pre-calculated between the at least one geographical location area and the observation probability value, and a second correspondence relationship pre-calculated between at least one pair of geographical location areas and the transition probability value; The observation probability value is used to represent the probability that a trajectory point in the corresponding geographical location area is located on a road section that intersects with the geographical location area; The transition probability value is used to represent the probability of transitioning from a first road section in the first geographical location area of the corresponding pair of geographical location areas to a second road section in the second geographical location area of the corresponding pair of geographical location areas; The method includes: Obtain a sequence of trajectory points of a vehicle; wherein, the sequence of trajectory points includes at least one trajectory point; Calculate the geographical location area where the target trajectory point to be matched among the at least one trajectory point is located as the target geographical location area; According to the first correspondence relationship, obtain the observation probability value corresponding to the target geographical location area, and according to the second correspondence relationship, obtain the transition probability value corresponding to a pair of target geographical location areas composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area; wherein, the first geographical location area in the pair of target geographical location areas is the geographical location area where the previous trajectory point of the target trajectory point is located, and the second geographical location area in the pair of target geographical location areas is the target geographical location area; the first road section is the road section where the previous trajectory point of the target trajectory point is located, and the second road section is each road section among at least one road section that intersects with the target geographical location area; Based on the product of the obtained observation probability value and the transition probability value, determine the target road section where the target trajectory point is located from among at least one road section that intersects with the target geographical location area.
2. The method according to claim 1, wherein the step of obtaining the observation probability value corresponding to the target geographical location area according to the first correspondence relationship, and obtaining the transition probability value corresponding to a pair of target geographical location areas composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area according to the second correspondence relationship, includes: Obtain the road network data corresponding to the target geographical location area from the road network database; According to the first correspondence relationship, search for the observation probability value corresponding to the target geographical location area in the obtained road network data; And according to the second correspondence relationship, search for the transition probability value corresponding to a pair of target geographical location areas composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area in the obtained road network data.
3. The method according to claim 1, wherein the step of determining the target road section where the target trajectory point is located from among at least one road section that intersects with the target geographical location area based on the product of the obtained observation probability value and the transition probability value, includes: Calculate the product of the obtained observation probability value and the transition probability value to obtain the matching probability value of each road section that intersects with the target geographical location area; wherein, the matching probability value is used to represent the probability that the target trajectory point is located on each road section that intersects with the target geographical location area. According to the matching probability value, determine the target road section where the target trajectory point is located from at least one road section that intersects with the target geographical location area.
4. The method according to claim 3, wherein the determining the target road section where the target trajectory point is located from at least one road section that intersects with the target geographical location area according to the matching probability value includes: From at least one road section that intersects with the target geographical location area, determine the road section whose matching probability value exceeds a preset threshold as the target road section where the target trajectory point is located. Or, From at least one road section that intersects with the target geographical location area, determine the preset number of road sections with the largest matching probability value as the target road section where the target trajectory point is located.
5. The method according to claim 1, wherein the method further includes: Obtain the road section speed limit value corresponding to the target road section. According to a preset speeding alarm strategy, perform a speeding warning based on the moving speed of the vehicle and the road section speed limit value.
6. The method according to claim 5, wherein the obtaining the road section speed limit value corresponding to the target road section includes: Obtain the time period speed limit value and / or vehicle type speed limit value corresponding to the target road section. Determine the road section speed limit value according to the time period speed limit value and / or vehicle type speed limit value.
7. The method according to claim 1, wherein the method further includes: Determine the road sections that intersect with each geographical location area in the at least one geographical location area. Calculate the shortest distance from the center of each geographical location area to the road section that intersects with this geographical location area, and based on the shortest distance, calculate the observation probability value used to represent the probability that the center of each geographical location area is located on the road section that intersects with this geographical location area; wherein, the smaller the shortest distance, the larger the observation probability value calculated based on the shortest distance. Determine the calculated observation probability value as the observation probability value used to represent the probability that any trajectory point in each geographical location area is located on the road section that intersects with this geographical location area, so as to obtain the first corresponding relationship between each geographical location area and the observation probability value.
8. The method according to claim 1, wherein the method further includes: Determine the path passing from the first road section in the first geographical location area in each geographical location area pair in the at least one geographical location area pair to the second road section in the second geographical location area in this geographical location area pair. The path includes at least one road section. Calculate the shortest path length from the first perpendicular point of the center of the first geographical location area to the first section of the first road segment to the second perpendicular point of the center of the second geographical location area to the second section of the second road segment, and based on the shortest path length, calculate a transition probability value for characterizing the probability of transferring from the first section of the first road segment in the first geographical location area of each geographical location area pair to the second section of the second road segment in the second geographical location area of the geographical location area pair, so as to obtain a second correspondence relationship between each geographical location area pair and the transition probability value; wherein, the smaller the shortest path length, the larger the transition probability value calculated based on the shortest path length.
9. The method according to claim 8, wherein the path further includes at least one steering angle; The calculating, based on the shortest path length, a transition probability value for characterizing the probability of transferring from the first section of the first road segment in the first geographical location area of each geographical location area pair to the second section of the second road segment in the second geographical location area of the geographical location area pair, includes: Based on the shortest path length and the angles of the at least one steering angle, calculate a transition probability value for characterizing the probability of transferring from the first section of the first road segment in the first geographical location area of each geographical location area pair to the second section of the second road segment in the second geographical location area of the geographical location area pair; wherein, the smaller the angle of the steering angle, the smaller the transition probability value calculated based on the angle of the steering angle.
10. The method according to any one of claims 1-9, the method further includes: Determine the path passed from the road segment where the previous trajectory point of the target trajectory point is located to the road segment having an intersection with the target geographical location area, and calculate the shortest path length of the path; Determine the time taken from the previous trajectory point of the target trajectory point to move to the target trajectory point; According to the shortest path length and the time duration, calculate the average speed of moving from the previous trajectory point of the target trajectory point to the target trajectory point, as the average speed corresponding to the target road segment; Filter out the target road segments whose corresponding average speed exceeds a preset speed threshold from the determined target road segments.
11. A road network matching device, wherein road network data corresponding to at least one geographical location area is stored in a road network database; among them, The road network data corresponding to at least one geographical location area includes a first correspondence relationship between the at least one geographical location area and an observation probability value calculated in advance, and a second correspondence relationship between at least one geographical location area pair and a transition probability value calculated in advance; The observation probability value is used to characterize the probability that a trajectory point in the corresponding geographical location area is located on a road segment having an intersection with the geographical location area; The transition probability value is used to characterize the probability of transferring from the first section of the first road segment in the first geographical location area of the corresponding geographical location area pair to the second section of the second road segment in the second geographical location area of the corresponding geographical location area pair; The apparatus includes: A first acquisition unit, configured to acquire a sequence of trajectory points of a vehicle; wherein, the sequence of trajectory points includes at least one trajectory point; A calculation unit for calculating a geographical location area where a target trajectory point to be matched among the at least one trajectory point is located as a target geographical location area; A second acquisition unit for acquiring an observation probability value corresponding to the target geographical location area according to the first correspondence, and acquiring a transition probability value corresponding to a target geographical location area pair composed of the geographical location area where the previous trajectory point of the target trajectory point is located and the target geographical location area according to the second correspondence; wherein, the first geographical location area in the target geographical location area pair is the geographical location area where the previous trajectory point of the target trajectory point is located, and the second geographical location area in the target geographical location area pair is the target geographical location area; the first road section is the road section where the previous trajectory point of the target trajectory point is located, and the second road section is each road section among at least one road section having an intersection with the target geographical location area; A determination unit for determining, based on the product of the acquired observation probability value and the transition probability value, a target road section where the target trajectory point is located from among at least one road section having an intersection with the target geographical location area.
12. An electronic device, comprising a communication interface, a processor, a memory, and a bus, where the communication interface, the processor, and the memory are interconnected through the bus; The memory stores machine-readable instructions, and the processor executes the method according to any one of claims 1 to 10 by calling the machine-readable instructions.
13. A machine-readable storage medium storing machine-readable instructions, which, when called and executed by a processor, implement the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Different-source route matching method and system based on road network topology
CN114485685A
Road network matching method and device
CN114664104A