Methods and equipment for determining traffic flow
By determining and transforming the coordinate system of travel trajectory points in the traffic flow determination method, and combining map matching algorithms and topological relationships, the problem of low accuracy in urban road traffic flow reconstruction in existing technologies is solved, achieving higher accuracy in path reconstruction and traffic statistics, and supporting scientific traffic management decisions.
Patent Information
- Application Number
- CN202211542671.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2042-12-02
AI Technical Summary
Existing methods for reconstructing urban road traffic flow have low accuracy, which affects the effectiveness of traffic management decisions.
By determining whether the first trajectory coordinate system of the travel trajectory point sequence to be processed matches the road network coordinate system, and performing coordinate system transformation when they do not match, the travel path is reconstructed in the road network by combining map matching algorithm, and the traffic flow of road segments is determined by considering the sorting information between travel trajectory points and the road network topology.
This improves the accuracy of travel route reconstruction, thereby enhancing the accuracy of traffic flow statistics and ensuring the scientific and effective nature of traffic management decisions.
Smart Images

Figure CN116434566B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for determining traffic flow. Background Technology
[0002] With the development of the times and the continuous improvement of people's living standards, urban highway passenger and freight transportation has developed rapidly, and road conditions have been greatly improved, but this has also brought about a greater traffic load. Traffic congestion and frequent accidents have become problems that many cities urgently need to solve. Against this backdrop, effective traffic management is particularly important for improving urban traffic capacity and enhancing residents' travel satisfaction. For traffic management departments, before solving any traffic problems, they need to have a basic understanding of the city's current traffic situation and make relevant decisions accordingly. Urban road flow is one of the basic pieces of information about the current urban traffic situation. It depicts the traffic flow on various road sections at different times and is an important basis for tracing the source of urban congestion and optimizing road channelization.
[0003] Existing methods for restoring urban road traffic flow suffer from problems such as low accuracy. Summary of the Invention
[0004] In view of the above problems, this application is made to provide a method and apparatus for determining traffic flow that solves or at least partially solves the above problems.
[0005] Therefore, in one embodiment of this application, a method for determining traffic flow is provided, comprising:
[0006] Based on the sequence of travel trajectory points to be processed and the road network, determine whether the first trajectory coordinate system on which the sequence of travel trajectory points to be processed is based matches the road network coordinate system on which the road network is based;
[0007] When the first trajectory coordinate system does not match the road network coordinate system, coordinate system transformation is performed on the travel trajectory points in the sequence of travel trajectory points to be processed to obtain the travel trajectory point sequence.
[0008] Reconstruct the travel path corresponding to the sequence of travel trajectory points in the road network;
[0009] Based on the road segments traversed by the travel route, the traffic flow of the road segments in the road network is determined.
[0010] In another embodiment of this application, a method for determining traffic flow is provided, comprising:
[0011] In the road network, candidate road segments are determined for each of multiple travel trajectory points in the sequence of travel trajectory points;
[0012] Based on the sorting information between travel trajectory points in the travel trajectory point sequence and the topological relationship between road segments in the road network, the target road segment where each of the multiple travel trajectory points is located is determined from the candidate road segments of each of the multiple travel trajectory points.
[0013] Based on the target road segment where each of the multiple travel trajectory points is located, the travel path corresponding to the sequence of travel trajectory points is reconstructed.
[0014] Based on the road segments traversed by the travel route, the traffic flow of the road segments in the road network is determined.
[0015] In another embodiment of this application, an electronic device is provided. The electronic device includes: a memory and a processor, wherein,
[0016] The memory is used to store programs;
[0017] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the traffic flow determination method described in any of the preceding claims.
[0018] In practical applications, various mobile devices are used to collect travel trajectory points, and different mobile devices use different geographic coordinate systems. In order to reduce the statistical bias caused by the difference in coordinate systems, the technical solution provided in this application will first determine whether the first trajectory coordinate system on which the travel trajectory point sequence is based matches the road network coordinate system on which the road network is based before restoring the travel path for the travel trajectory point sequence to be processed. When the first trajectory coordinate system does not match the road network coordinate system, the travel trajectory points in the travel trajectory point sequence to be processed will be transformed to improve the accuracy of travel path restoration, thereby improving the accuracy of traffic flow statistics.
[0019] In the technical solution provided in this application, when determining the target road segment of each travel trajectory point from the candidate road segments corresponding to each travel trajectory point in the travel trajectory point sequence, the sorting information between travel trajectory points and the topological relationship between road segments in the road network are considered. Considering the road network topology and the sorting information between travel trajectory points allows for a more comprehensive judgment of the road segment to which the trajectory point belongs, improving the accuracy of road segment matching for travel trajectory points and thus improving the accuracy of traffic flow statistics. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A schematic diagram illustrating the process of determining traffic flow according to an embodiment of this application;
[0022] Figure 2 A schematic diagram illustrating the process of determining traffic flow according to an embodiment of this application;
[0023] Figure 3 A schematic diagram illustrating the process of determining traffic flow according to an embodiment of this application;
[0024] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.
[0026] Furthermore, some processes described in the specification, claims, and accompanying drawings of this application include multiple operations that appear in a specific order. These operations may be performed out of order or in parallel. Operation numbers such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel. It should be noted that the terms "first," "second," etc., used herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0027] Figure 1 A flowchart illustrating a traffic flow determination method according to an embodiment of this application is shown. The method can be executed by either a client or a server. The client can be hardware with embedded programs integrated into a terminal, application software installed on the terminal, or utility software embedded in the terminal's operating system; this embodiment does not limit its scope. The terminal can be any terminal device, including mobile phones and tablets. The server can be a conventional server, a cloud server, or a virtual server; this embodiment does not specifically limit its scope. Figure 1 As shown, the method includes:
[0028] 101. Based on the sequence of travel trajectory points to be processed and the road network, determine whether the first trajectory coordinate system on which the sequence of travel trajectory points to be processed is based matches the road network coordinate system on which the road network is based.
[0029] 102. When the first trajectory coordinate system does not match the road network coordinate system, the coordinate system of the travel trajectory points in the sequence of travel trajectory points to be processed is transformed to obtain the travel trajectory point sequence.
[0030] 103. Reconstruct the travel path corresponding to the sequence of travel trajectory points in the road network.
[0031] 104. Determine the traffic flow of road segments in the road network based on the road segments traversed by the travel route.
[0032] In the above 101, "road network" refers to a network of interconnected roads within a designated area. This designated area can be a city, a province, a country, or so on.
[0033] The sequence of travel trajectory points to be processed is obtained by sorting multiple travel trajectory points collected during a single trip according to the order of collection time. A single trip refers to the process of traveling from one stop point to another. For example: the process of a user traveling from home to the office is one trip; the process of a user traveling from the office to home is one trip; the process of a user traveling from home to the shopping mall is one trip.
[0034] Each travel trajectory point in the sequence of travel trajectory points to be processed has a corresponding latitude dimension and a collection timestamp.
[0035] In one example, the first trajectory coordinate system upon which the sequence of travel trajectory points to be processed is based can be determined; the road network coordinate system upon which the road network is based can also be determined; if the first trajectory coordinate system and the road network coordinate system are consistent, then they are considered to match; otherwise, they are considered to be mismatched. The coordinate information of the travel trajectory points in the sequence of travel trajectory points to be processed may carry the identification information of the first trajectory coordinate system; thus, the first trajectory coordinate system upon which the sequence of travel trajectory points to be processed is based can be determined according to this identification information.
[0036] In another example, the distance between each travel trajectory point in the sequence of travel trajectory points to be processed and the road segment in the road network can be used to determine whether the first trajectory coordinate system on which the sequence of travel trajectory points to be processed is based matches the road network coordinate system on which the road network is based.
[0037] In practical applications, the geographic coordinate systems used by mobile terminals are generally the Mars coordinate system and the WGS84 (World Geodetic System-1984 Coordinate System). The road network coordinate system used by the aforementioned road network can be either the Mars coordinate system or the WGS84 coordinate system.
[0038] Taking the WGS84 coordinate system as an example: If the geographic coordinate system (i.e., the first trajectory coordinate system mentioned above) of the mobile terminal corresponding to the travel trajectory point sequence to be processed is the Mars coordinate system, then the first trajectory coordinate system mentioned above does not match the road network coordinate system; if the geographic coordinate system of the mobile terminal corresponding to the travel trajectory point sequence to be processed is the WGS84 coordinate system, then the first trajectory coordinate system mentioned above matches the road network coordinate system.
[0039] In step 102 above, when the first trajectory coordinate system does not match the road network coordinate system, a coordinate system transformation is performed on the travel trajectory points in the sequence of travel trajectory points to be processed to obtain the travel trajectory point sequence. Specifically, a target coordinate system to road network coordinate system transformation operation can be performed on the travel trajectory points in the sequence of travel trajectory points to be processed. The target coordinate system can be preset.
[0040] In a specific example, if the mobile terminal uses only two geographic coordinate systems: the Mars coordinate system and the WGS84 coordinate system, and the road network coordinate system is the WGS84 coordinate system, then the target coordinate system is the Mars coordinate system. That is, a Mars coordinate system to WGS84 coordinate system conversion operation is performed on the travel trajectory points in the sequence of travel trajectory points to be processed to obtain the travel trajectory point sequence.
[0041] In another specific example, if the geographic coordinate system used by the mobile terminal includes multiple alternative coordinate systems in addition to the road network coordinate system, then the target coordinate system can be determined from these alternative coordinate systems. Note: When multiple alternative coordinate systems exist, the target coordinate system can be determined by traversing through them. Then, the "coordinate system transformation" operation in step 102 above is performed. If the second trajectory coordinate system on which the obtained travel trajectory point sequence is based matches the road network coordinate system, the traversal ends; otherwise, the traversal continues until all alternative coordinate systems have been traversed.
[0042] In step 103 above, the travel path corresponding to the sequence of travel trajectory points can be reconstructed in the road network using a map matching algorithm.
[0043] The map matching algorithm described above can be selected according to actual needs, and this application embodiment does not impose specific limitations on it. In one example, the map matching algorithm described above can be based on a Hidden Markov Model (HMM).
[0044] In practical applications, as described in section 104 above, there are multiple travel trajectory point sequences to be processed. Correspondingly, there are multiple travel trajectory point sequences. The traffic flow of a road segment in the road network can be determined based on the road segments traversed by the travel paths corresponding to each of the multiple travel trajectory point sequences. For example, the number of travel paths passing through a certain road segment can be counted, and this number of travel paths can be used as the traffic flow of that road segment.
[0045] In practical applications, traffic statistics can be performed in different time periods. The specific settings can be configured according to actual needs, and this application does not impose any specific limitations on this.
[0046] In practical applications, various mobile devices are used to collect travel trajectory points, and different mobile devices use different geographic coordinate systems. In order to reduce the statistical bias caused by the difference in coordinate systems, the technical solution provided in this application will first determine whether the first trajectory coordinate system on which the travel trajectory point sequence is based matches the road network coordinate system on which the road network is based before restoring the travel path for the travel trajectory point sequence to be processed. When the first trajectory coordinate system does not match the road network coordinate system, the travel trajectory points in the travel trajectory point sequence to be processed will be transformed to improve the accuracy of travel path restoration, thereby improving the accuracy of traffic flow statistics.
[0047] In one example, the sequence of travel trajectory points to be processed is determined based on geographic location data collected by a location-based services (LBS) application. LBS data has advantages such as high positioning accuracy, high data penetration, and low collection cost. However, in practical applications, different users use different mobile terminals, and the geographic coordinate systems used by different mobile terminals will also differ. This leads to the possibility that the geographic coordinate systems used by the geographic location information collected by the LBS application uploaded by different users may be different. If the geographic coordinate system used by the geographic location information collected by the user's uploaded LBS application is the same as the geographic coordinate system used by the road network, then mapping the travel trajectory points in the travel trajectory point sequence to the road network will not result in a significant deviation. However, if the geographic coordinate system used by the user's uploaded LBS application is different from the geographic coordinate system used by the road network, then mapping the travel trajectory points in the travel trajectory point sequence to the road network will result in a significant offset, which may even affect the accuracy of travel path reconstruction and thus the degree of road traffic flow reconstruction. Therefore, the technical solution provided in the embodiments of this application is needed to reduce the above-mentioned offset in order to ensure the accuracy of path restoration and thus ensure the accuracy of traffic restoration.
[0048] Furthermore, when the first trajectory coordinate system matches the road network coordinate system, the sequence of travel trajectory points to be processed is taken as the travel trajectory point sequence.
[0049] In one feasible solution, the step 101 above, "determining whether the first trajectory coordinate system on which the travel trajectory point sequence is based matches the road network coordinate system on which the road network is based," can be implemented using the following steps:
[0050] 1011. Determine the distance between each travel trajectory point in the sequence of travel trajectory points to be processed and the nearest road segment in the road network.
[0051] 1012. Based on the distance between each travel trajectory point in the sequence of travel trajectory points to be processed and the nearest road segment in the road network, determine whether the first trajectory coordinate system on which the sequence of travel trajectory points to be processed is based matches the road network coordinate system on which the road network is based.
[0052] In one example, the above 1012 can be implemented using the following steps:
[0053] The average distance is determined based on the distance between each travel trajectory point in the sequence of travel trajectory points to be processed and the nearest road segment in the road network;
[0054] If the average distance is greater than or equal to a preset distance threshold, it is determined that the first trajectory coordinate system on which the travel trajectory point sequence to be processed is based does not match the road network coordinate system on which the road network is based.
[0055] If the average distance is less than a preset distance threshold, it is determined that the first trajectory coordinate system on which the travel trajectory point sequence to be processed is based matches the road network coordinate system on which the road network is based.
[0056] The aforementioned average distance is the average distance between each travel trajectory point in the sequence of travel trajectory points to be processed and the nearest road segment in the road network.
[0057] In a specific example, road segment location points can be collected at preset intervals (e.g., 50 meters) on each road segment in the road network to obtain a set of road segment location points; the sequence of travel trajectory points to be processed includes a fourth travel trajectory point; the fourth travel trajectory point refers to any travel trajectory point in the sequence of travel trajectory points to be processed. Determine the target geographic grid number of the fourth travel trajectory point under a preset level and S2 mapping; wherein the preset level can be level 13; extract multiple road segment location points with the same geographic grid number as the target geographic grid number from the road segment location point set, as a selection set; if the selection set is empty, record the distance of the fourth travel trajectory point to its nearest road segment in the road network as a preset distance, which is determined by the preset level. When the preset level is level 13, the preset distance can be 1000 meters; if the selection set is not empty, the minimum value among the distances from the trajectory point to all road segment location points in the selection set is taken as the distance of the fourth travel trajectory point to its nearest road segment in the road network; determine the average distance between each travel trajectory point in the sequence of travel trajectory points to be processed and its nearest road segment in the road network; if the average distance is greater than or equal to a preset distance threshold (e.g., 300 meters), determine that the first trajectory coordinate system and the road network coordinate system do not match; otherwise, determine that the first trajectory coordinate system and the road network coordinate system match. S2 is a commonly used geolocation coding method used to establish a two-way mapping between latitude and longitude coordinates and planar grid numbers.
[0058] Optionally, the above method may further include:
[0059] 105. Determine whether the second trajectory coordinate system on which the travel trajectory point sequence is based matches the road network coordinate system.
[0060] 106. When the second trajectory coordinate system matches the road network coordinate system, the step of reconstructing the travel path corresponding to the travel trajectory point sequence in the road network is triggered.
[0061] In the above 105, after coordinate system transformation, the trajectory coordinate system on which the travel trajectory point sequence is based is different from the trajectory coordinate system on which the travel trajectory point sequence to be processed is based.
[0062] The method for determining whether the second trajectory point coordinate system on which the travel trajectory point sequence is based matches the road network coordinate system can be referred to the corresponding content in the above embodiments, and will not be described in detail here.
[0063] In step 106 above, when the second trajectory coordinate system matches the road network coordinate system, the step of reconstructing the travel path corresponding to the travel trajectory point sequence in the road network is triggered.
[0064] In one instance, the travel trajectory point sequence is ignored when the second trajectory coordinate system does not match the road network coordinate system.
[0065] To further improve the accuracy of traffic flow reconstruction, before performing the map matching, the above method further includes:
[0066] 107. Determine the motion state information of the travel trajectory points in the travel trajectory point sequence.
[0067] 108. When the motion status information is abnormal, delete the abnormal travel trajectory point from the travel trajectory point sequence.
[0068] The abnormal travel trajectory point is determined from the travel trajectory point and the previous travel trajectory point in the sequence of travel trajectory points.
[0069] In the above 107, the motion state information may include: displacement velocity and angular velocity.
[0070] In step 108 above, when the displacement velocity or angular velocity is abnormal, the abnormal travel trajectory point is deleted from the travel trajectory point sequence.
[0071] In practical applications, when the displacement velocity or angular velocity is abnormal, the preceding travel trajectory point in the travel trajectory point sequence is deleted to obtain a new travel trajectory point sequence; the motion state information of the travel trajectory point in the new travel trajectory point sequence is re-determined; if the re-determined motion state information is normal, the preceding travel trajectory point in the travel trajectory point sequence is determined as an abnormal travel trajectory point; otherwise, the travel trajectory point is determined as an abnormal travel trajectory point.
[0072] Specifically, if the displacement velocity is greater than or equal to a preset displacement velocity threshold, the displacement velocity is determined to be abnormal; otherwise, the displacement velocity is determined to be normal. If the angular velocity is greater than or equal to a preset angular velocity threshold, the angular velocity is determined to be abnormal; otherwise, the angular velocity is determined to be normal.
[0073] Specifically, remember (lng) i lat i ,ts i (lng1, lat1, ts1), (lng2, lat2, ts2), ..., (lng2, lat2, ts2), representing the longitude, latitude, and sampling timestamp of the i-th trajectory point in the travel trajectory point sequence. All trajectory points are arranged in ascending order of sampling timestamps to obtain an ordered trajectory sequence of {(lng1, lat1, ts1), (lng2, lat2, ts2), ..., (lng2, lat1, ts2 ... n lat n ,ts n )}:
[0074] (1) Starting from the second trajectory point, calculate the velocity of the current trajectory point based on the data of the current trajectory point and the previous trajectory point:
[0075]
[0076] Where i > 2, dis(lng1, lat1, lng2, lat2) represents the spherical distance from point (lng1, lat1) to point (lng2, lat2).
[0077] (2) Starting from the second trajectory point, calculate the point (lng) based on the data of the current trajectory point and the previous trajectory point. i-1 lat i-1 ) to point (lng) i lat i ) direction angle ang i ;
[0078] (3) Starting from the third trajectory point, calculate the angular velocity of the current trajectory point:
[0079]
[0080] Wherein, angdiff(ang1, ang2) represents the angle difference between the direction angles ang1 and ang2, taking angle values within the range of 0 to 180 degrees.
[0081] In one feasible solution, the step 103 above, "reconstructing the travel path corresponding to the travel trajectory point sequence in the road network," can be achieved by the following steps:
[0082] 1031. In the road network, determine the candidate road segments for each of the multiple travel trajectory points in the travel trajectory point sequence.
[0083] 1032. Determine the target road segment where each of the multiple travel trajectory points is located from the candidate road segments of each of the multiple travel trajectory points.
[0084] 1033. Based on the target road segment where each of the multiple travel trajectory points is located, reconstruct the travel path corresponding to the sequence of travel trajectory points.
[0085] In one feasible solution of the above 1031, candidate road segments corresponding to each travel trajectory point can be determined based on multiple road segments located within the area where each travel trajectory point is located in the road network. The size of the area where each travel trajectory point is located can be set according to actual needs, and this application embodiment does not specifically limit it. For example, the area can be a circular area with the travel trajectory point as the center and a preset length as the radius.
[0086] Specifically, the plurality of travel trajectory points includes a first travel trajectory point. Candidate road segments corresponding to the first travel trajectory point are determined based on multiple road segments located in the surrounding area of the first travel trajectory point within the road network. In one specific example, these multiple road segments can be directly used as candidate road segments corresponding to the first travel trajectory point. In another specific example, these multiple paths can be filtered to obtain candidate road segments corresponding to the first travel trajectory point. The filtering method will be described in detail in the following embodiments.
[0087] In practical applications, the number of the above-mentioned travel trajectory point sequences can be one or more; the number of candidate road segments corresponding to each travel trajectory point can be one or more.
[0088] In the above 1032, the target road segment where each of the multiple travel trajectory points is located can be determined from the candidate road segments of each of the multiple travel trajectory points through a map matching algorithm.
[0089] The map matching algorithm can be selected according to actual needs, and this application embodiment does not impose specific limitations on it.
[0090] In one example, the target road segment of each of the multiple travel trajectory points can be determined from the candidate road segments of each travel trajectory point based on the sorting information between travel trajectory points in the sequence and the topological relationship between road segments in the road network. The specific implementation process will be described in detail in the following embodiments.
[0091] In one example of the above 1032, the target road segment where each of the multiple travel trajectory points is located can be sorted according to the sorting information of the multiple travel trajectory points; and the travel path corresponding to the sequence of travel trajectory points can be restored according to the sorting result.
[0092] The following will introduce a method for selecting candidate road segments:
[0093] Specifically, the plurality of travel trajectory points includes a first travel trajectory point. The step 1031 above, "determining the candidate road segment corresponding to the first travel trajectory point in the road network," can be implemented using the following steps:
[0094] S11. In the road network, determine the initial candidate road segment corresponding to the first travel trajectory point.
[0095] S12. When the road segment type of the initial candidate road segment is a road type related to closed roads, determine at least one closed road segment in the area where the initial candidate road segment is located in the road network.
[0096] S13. Determine the degree of matching between the travel trajectory point sequence and at least one closed road segment in the area where the initial candidate road segment is located in the road network.
[0097] S14. When the matching degree is greater than or equal to the first preset matching threshold, the candidate road segment corresponding to the first travel trajectory point is determined according to the initial candidate road segment.
[0098] In step S11 above, initial candidate road segments corresponding to the first travel trajectory point are determined based on multiple road segments located within the area of the first travel trajectory point in the road network. In a specific example, these multiple road segments can be directly used as the initial candidate road segments corresponding to the first travel trajectory point.
[0099] In S12 above, the road types related to closed roads include: closed road type, closed road entrance ramp type, and closed road exit ramp type. Closed roads can be highways, urban expressways, etc.
[0100] In practical applications, once a vehicle enters a closed road, it needs to travel on that road for a period of time and cannot quickly exit; this is determined by the characteristics of closed roads. Based on this, the initial candidate road segments corresponding to the first travel trajectory point can be screened.
[0101] When the road segment type of the initial candidate road segment is a road type related to closed roads, at least one closed road segment in the area where the initial candidate road segment is located in the road network is determined. In one example, at least one closed road segment in the area where the initial candidate road segment is located in the road network may include: all closed road segments in the area where the initial candidate road segment is located in the road network.
[0102] In S13 above, the shortest distance between each travel trajectory point in the travel trajectory point sequence and at least one closed road segment can be calculated; the number of travel trajectory points in the trajectory point sequence whose shortest distance is less than or equal to a preset shortest distance threshold can be determined; and the matching degree can be determined based on the travel trajectory point data. In one example, the larger the travel trajectory point data, the greater the matching degree.
[0103] In S14 above, if the matching degree is greater than or equal to the first preset matching threshold, the initial candidate road segment is used as the candidate road segment corresponding to the first travel trajectory point; otherwise, the initial candidate road segment is ignored.
[0104] In one feasible approach, to reduce computational load and improve the accuracy of matching calculations, the number of at least one closed road segment in the area where the initial candidate road segment is located in the road network can be reduced. Specifically, step S12 above, "when the road segment type of the initial candidate road segment is a road type related to closed roads, determine at least one closed road segment in the area where the initial candidate road segment is located in the road network," may include one or more of the following steps:
[0105] S121. When the initial candidate road segment is a closed road or a closed road entrance ramp, at least one first closed road segment that can be reached within a preset time period from the initial candidate road segment is determined in the road network, and is used as at least one closed road segment in the area where the initial candidate road segment is located in the road network.
[0106] S122. When the initial candidate road segment is a closed road or a closed road exit ramp, at least one second closed road segment that may be traversed within a preset time period with the initial candidate road segment as the endpoint is determined in the road network, so as to be at least one closed road segment in the area where the initial candidate road segment is located in the road network.
[0107] In S121 above, at least one first closed road segment can be determined in the road network that can be reached within a preset time period, starting from the initial candidate road segment, according to a preset traffic speed. The preset traffic speed can be the maximum speed limit of closed roads in the road network.
[0108] Accordingly, the process in S13 above, "determining the degree of matching between the travel trajectory point sequence and at least one closed road segment in the area where the initial candidate road segment is located in the road network," can be achieved using the following steps:
[0109] S131a. When the initial candidate road segment is a closed road or a closed road entrance ramp, at least one first target travel trajectory point is determined from the plurality of travel trajectory points whose collection timestamp is located between the first collection timestamp and the second timestamp of the first travel trajectory point.
[0110] The second timestamp is the sum of the first collection timestamp and the preset duration.
[0111] S132a. Determine the shortest distance between each of the at least one first target travel trajectory points and the at least one first closed road segment.
[0112] S133a. Based on the first number of first target travel trajectory points whose shortest distance is less than or equal to a preset distance threshold, determine the degree of matching between the travel trajectory point sequence and at least one closed road segment in the area where the initial candidate road segment is located in the road network.
[0113] In S132a above, the distance from the first target travel trajectory point to each first closed road segment is calculated; the distances from the first target travel trajectory point to each segment of at least one first closed road segment are compared to determine the shortest distance.
[0114] In S133a above, in one instance, the first quantity can be used as the degree of matching; in another instance, the ratio of the first quantity to the number of at least one first target travel trajectory point can be used as the degree of matching.
[0115] In S122 above, at least one second closed road segment that may be traversed within a preset time period with the initial candidate road segment as the destination road segment can be determined in the road network according to a preset traffic speed.
[0116] Accordingly, the process in S13 above, "determining the degree of matching between the travel trajectory point sequence and at least one closed road segment in the area where the initial candidate road segment is located in the road network," can be achieved using the following steps:
[0117] S131b When the initial candidate road segment is a closed road or a closed road exit ramp, at least one second target travel trajectory point is determined from the plurality of travel trajectory points whose collection timestamp is located between the third timestamp and the first collection timestamp of the first travel trajectory point.
[0118] The third timestamp is the difference between the first collection timestamp and the preset duration.
[0119] S132b, Based on the shortest distance between each of the at least one second target travel trajectory points and the at least one second closed road segment.
[0120] S133b: Based on the second number of second target travel trajectory points whose shortest distance is less than or equal to a preset distance threshold among the at least one second target travel trajectory points, determine the degree of matching between the travel trajectory point sequence and at least one closed road segment in the area where the initial candidate road segment is located in the road network.
[0121] In S132b above, the distance from the second target travel trajectory point to each second closed road segment is calculated; the distances from the second target travel trajectory point to each segment of at least one second closed road segment are compared to determine the shortest distance.
[0122] In S133b above, in one instance, the second quantity can be used as the degree of matching; in another instance, the ratio of the second quantity to the number of at least one second target travel trajectory point can be used as the degree of matching.
[0123] Using the previous example:
[0124] 1. Initialize the state transition matrix sequence S0;
[0125] Where S0 is empty.
[0126] 2. Perform the following operations on the i-th trajectory point in the travel trajectory point sequence (where i is greater than or equal to 1 and less than or equal to n, and n is the number of travel trajectory points in the travel trajectory point sequence):
[0127] Using the location of the i-th trajectory point as the center and a radius of 100 meters, filter all road segments within the area to obtain a candidate road segment set C. i ;
[0128] Combined with the current S i-1 The current road segment candidate set C of the (i-1)th trajectory point i-1 Candidate set C of road segments i Calculate S i-1 To C i The transition probability of each road segment is calculated, and road segments with a transition probability of 0 are filtered out.
[0129] 2. Regarding C i Use the following method to filter out abnormal candidate road segments:
[0130] Traversing C i Each road segment r j Make the following judgment:
[0131] Calculate road segment r j The direction angle from the start to the end of the road segment
[0132] Calculate the target angular velocity dr j :
[0133]
[0134] Where, if dr j >45, then from C i Delete r j Otherwise, no action will be taken.
[0135] 3. Regarding C i Use the following methods to check and filter abnormal highway candidate road segments:
[0136] Traversing C i Each road segment r j If r j If the road type is related to a closed road, then proceed as follows (otherwise, do nothing).
[0137] If r j If the road segment type is a closed road or a closed road entrance ramp type, then the following processing shall be performed:
[0138] With road segment r j Starting from the road segment, search forward to [ts] i ,tsi Add all highways within a +5 minute radius to the group. middle:
[0139] Take the timestamps collected from the travel trajectory point sequence in [ts i ,ts i All trajectory points within a range of [+5 minutes] are added to the set. middle:
[0140] For sets For each trajectory point u, calculate the position of u relative to the set. The minimum distance between the endpoints of each road segment is taken as denoted as .
[0141] calculate:
[0142]
[0143] Among them, if but otherwise Represents a set The number of elements in the middle;
[0144] like Then from C i Delete r j Otherwise, no action will be taken.
[0145] If r j If the road segment type is a closed road or a closed road exit ramp, and it was not deleted in the previous step, then the following processing shall be performed;
[0146] With road segment r j For the endpoint segment, reverse search in [ts i -5 minutes, ts i All highway sections that may be traversed within the range are included in the set. middle;
[0147] Take the timestamps collected from the travel trajectory point sequence in [ts i -5 minutes, ts i All trajectory points within the range are placed into a set. middle;
[0148] For sets For each trajectory point u, calculate the position of u relative to the set. The minimum distance between the endpoints of each road segment is taken as denoted as .
[0149] calculate:
[0150]
[0151] Among them, if but otherwise Represents a set The number of elements in the middle;
[0152] like Then from C i Delete r j Otherwise, no action will be taken.
[0153] 4. Use C i Update S i-1 For S i ;
[0154] 5. Solve for S i This yields the matching road segment corresponding to each trajectory point. Add it to the trajectory point set, and you will have
[0155] In practical applications, if a mobile device loses network connectivity or passes through a tunnel while moving, some movement trajectory points may not be collected, potentially leading to a discontinuous travel path in the final reconstruction. To improve the accuracy of travel path reconstruction, the step 1033 above, "reconstructing the travel path corresponding to the sequence of travel trajectory points based on the target road segments where each of the multiple travel trajectory points is located," can be achieved using the following steps:
[0156] S31. When the target road segment where the third travel trajectory point is located in the road network is not adjacent to the target road segment where the second travel trajectory point is located, the shortest path algorithm is used to find the shortest path from the target road segment where the second travel trajectory point is located to the target road segment where the third travel trajectory point is located.
[0157] S32. Based on the target road segment where each of the multiple travel trajectory points is located and the shortest path, reconstruct the travel path corresponding to the first travel trajectory point sequence.
[0158] The travel trajectory point sequence includes: an adjacent second travel trajectory point and a third travel trajectory point; in the first travel trajectory point sequence, the second travel trajectory point is located before the third travel trajectory point.
[0159] The shortest path algorithm can be selected according to actual needs, and the specific implementation of the shortest path algorithm can be found in existing technologies.
[0160] Specifically, the target road segments where multiple travel trajectory points are located are arranged in ascending order according to the collection timestamps of the corresponding travel trajectory points. Starting from the second target path, if the current road segment... Not on the previous road section Within the direct downstream set, a shortest path algorithm with time constraints is used to find the path from the nearest neighbor. arrive The shortest path. The time constraint is τ·(ts) i -ts i-1 ), where τ represents the relaxation coefficient, and the speed constraint is set according to the maximum speed limit of the road segments in the road network. If the shortest path algorithm returns a non-empty result, the road segments in the returned path are inserted into the result in sequence; otherwise, the result is not modified.
[0161] Optionally, the sequence of travel trajectory points to be processed is determined based on geographic location data collected by a location-based service (LBS) application; the sequence of travel trajectory points can be multiple. Considering that some users may not use LBS applications in practical applications, their travel trajectory points cannot be obtained, and therefore these users cannot be counted when calculating traffic flow. To further improve the accuracy of traffic flow statistics, step 104 above, "determining the traffic flow of road segments in the road network based on the road segments traversed by the travel path," can be implemented using the following steps:
[0162] 1041. Divide the same travel paths in the travel paths corresponding to the multiple travel trajectory point sequences into a group to obtain multiple groups of travel paths.
[0163] 1042. Based on the percentage of users using LBS applications within the departure community corresponding to each travel route, adjust the number of travel routes for each travel route to obtain the adjusted number of travel routes for each travel route.
[0164] 1043. Determine the traffic flow of road segments in the road network based on the multiple sets of travel paths and the number of corrected travel paths for each of the multiple sets of travel paths.
[0165] In the above 1042, the departure zone for each travel path refers to the traffic zone to which the first travel trajectory point in each travel path belongs. The area to be analyzed can be divided into multiple traffic zones according to specific scales or rules.
[0166] The corrected number of travel routes can be obtained by dividing the number of travel routes by the percentage of users.
[0167] In the above 1043, the road network includes a first road segment; based on the multiple sets of travel paths and the corrected number of travel paths for each of the multiple sets of travel paths, the number of travel paths passing through the first road segment is determined as the traffic flow of the first road segment.
[0168] Specifically, at least one set of travel routes passing through the first road segment is determined; the sum of the number of modified travel routes corresponding to each set of travel routes in the at least one set of travel routes is taken as the number of travel routes passing through the first road segment.
[0169] Specifically, suppose the area under study is divided into M sub-areas according to a specific scale or rule, denoted as Q. i , i∈[1,M];
[0170] Travel routes are aggregated according to the 5-tuple (departure time slice, departure zone, arrival time slice, arrival zone, route sequence), and the number of travel routes for each group is counted, which is the travel volume for that group, and is denoted as . k represents the quintuple index;
[0171] Based on this, flow calibration should be performed according to the following rules:
[0172] Calculate the calibration coefficient: for each cell Q i For i∈[1,M], the calibration coefficient of this cell is:
[0173]
[0174] in, This indicates the number of permanent residents in the community as determined by statistics from sources such as the census. This indicates the number of people identified in this neighborhood using LBS data:
[0175] Traffic calibration: For each cell Q i Let i∈[1,M], and let Q be the starting cell. i The trip volume is calibrated using the quintuple k, and the calibrated trip volume is:
[0176]
[0177] In addition, quality evaluation indicators for path recognition results can be calculated, including matching distance and adjacency rate. The specific calculation methods are as follows:
[0178] Matching distance: For each trajectory point, calculate the spherical distance from that point to the center point of the matching road segment, and record it as the matching distance of that point; calculate the matching distance of all trajectory points and take the average value to obtain the overall matching distance.
[0179] Adjacency ratio: The proportion of the next path within the downstream set of the current path in any given pair of adjacent paths. Assume there are N path segments in the trajectory, denoted as r. i If i∈[0, N-1], then the adjacency rate can be defined as:
[0180]
[0181] Where, if r i+1 For r i The direct downstream section, then 1(r i .out.contains(r i+1 )) = 1, otherwise 1(r) i ·out.contains(r i+1 )) = 0.
[0182] The matching distance and adjacency rate mentioned above can be provided to users so that they can judge whether the statistically obtained road segment traffic is reliable and then decide on subsequent decisions.
[0183] Optionally, the above method may further include:
[0184] 109. Based on the geographic location data collected by the location-based service (LBS) application, determine multiple initial travel trajectory point sequences.
[0185] 110. Based on the movement speed corresponding to each of the multiple initial travel trajectory point sequences, determine the target initial travel trajectory point sequence with the mode of travel being automobile travel.
[0186] 111. The initial travel trajectory point sequence of the target is determined as the travel trajectory point sequence to be processed.
[0187] While LBS data boasts high penetration, high density, and good positioning accuracy, it is often passively collected and lacks travel-related information. Therefore, the raw LBS data needs to be processed as follows to obtain travel data:
[0188] The process involves identifying and segmenting different travel segments and corresponding stops for each user to obtain an initial travel trajectory point sequence; identifying the travel mode corresponding to each initial travel trajectory point sequence; retaining all target initial travel trajectory point sequences for those using car travel; and determining the target initial travel trajectory point sequence as the travel trajectory point sequence to be processed. The aforementioned movement speed can be the average movement speed. The average movement speed is the average displacement velocity at each travel trajectory point in the initial travel trajectory point sequence.
[0189] Figure 2A flowchart illustrating a traffic flow determination method according to an embodiment of this application is shown. The method can be executed by either a client or a server. The client can be hardware with embedded programs integrated into a terminal, application software installed on the terminal, or utility software embedded in the terminal's operating system; this embodiment does not limit its scope. The terminal can be any terminal device, including mobile phones and tablets. The server can be a conventional server, a cloud server, or a virtual server; this embodiment does not specifically limit its scope. Figure 2 As shown, the method includes:
[0190] 201. In the road network, determine the candidate road segments for each of the multiple travel trajectory points in the travel trajectory point sequence.
[0191] 202. Based on the sorting information between travel trajectory points in the travel trajectory point sequence and the topological relationship between road segments in the road network, determine the target road segment where each of the multiple travel trajectory points is located from the candidate road segments of each of the multiple travel trajectory points.
[0192] 203. Based on the target road segment where each of the multiple travel trajectory points is located, reconstruct the travel path corresponding to the sequence of travel trajectory points.
[0193] 204. Determine the traffic flow of the road segments in the road network based on the road segments traversed by the travel route.
[0194] In section 201 above, the sequence of travel trajectory points is obtained by sorting multiple travel trajectory points collected during a single trip according to the order of collection time. A single trip refers to the process of traveling from one stop point to another. For example: the process of a user traveling from home to the company is a single trip; the process of a user traveling from the company to home is a single trip; the process of a user traveling from home to the shopping mall is a single trip.
[0195] Each travel trajectory point in the travel trajectory point sequence corresponds to longitude, latitude, and collection timestamp.
[0196] In one feasible solution, candidate road segments corresponding to each travel trajectory point can be determined based on multiple road segments located within the area where each travel trajectory point is located in the road network. The size of the area where each travel trajectory point is located can be set according to actual needs, and this application embodiment does not specifically limit it. For example, the area can be a circular area with the travel trajectory point as the center and a preset length as the radius.
[0197] Specifically, the plurality of travel trajectory points includes a first travel trajectory point. Candidate road segments corresponding to the first travel trajectory point are determined based on multiple road segments located in the surrounding area of the first travel trajectory point within the road network. In one specific example, these multiple road segments can be directly used as candidate road segments corresponding to the first travel trajectory point. In another specific example, these multiple paths can be filtered to obtain candidate road segments corresponding to the first travel trajectory point. The filtering method will be described in detail in the following embodiments.
[0198] In practical applications, the number of the above-mentioned travel trajectory point sequences can be one or more; the number of candidate road segments corresponding to each travel trajectory point can be one or more.
[0199] In section 202 above, the topological relationship between road segments in a road network refers to the adjacency relationship and upstream / downstream relationship between road segments. Based on the topological relationship between road segments in a road network, the set of upstream road segments and the set of downstream road segments adjacent to each road segment can be determined. In this paper, adjacency means direct connection, that is, each road segment is directly connected to any road segment in its adjacent set of upstream and downstream road segments, rather than indirectly connected through other road segments.
[0200] By combining the sorting information between travel trajectory points in the travel trajectory point sequence and the topological relationships between road segments in the road network, the target road segment of each travel trajectory point is determined from its respective candidate road segments. In other words, when determining the target road segment for each travel trajectory point from its corresponding candidate road segments, the sorting information between travel trajectory points and the topological relationships between road segments in the road network are considered. Considering the road network topology and the sorting information between travel trajectory points allows for a more comprehensive judgment of the road segment to which a trajectory point belongs, thereby improving the accuracy of road segment matching for travel trajectory points.
[0201] In one example, in addition to considering the aforementioned sorting information and topological relationships, the distance from each travel trajectory point to its respective candidate road segment can also be considered, which can further improve the road segment matching accuracy of travel trajectory points. Specifically, the phrase "determining the target road segment of each of the multiple travel trajectory points from their respective candidate road segments based on the sorting information between travel trajectory points in the travel trajectory point sequence and the topological relationships between road segments in the road network" in step 201 above can include: determining the target road segment of each of the multiple travel trajectory points from their respective candidate road segments based on the sorting information between travel trajectory points in the travel trajectory point sequence, the distance from each travel trajectory point to its corresponding candidate road segment, and the topological relationships between road segments in the road network.
[0202] In one example of 203 above, the target road segment where each of the multiple travel trajectory points is located can be sorted according to the sorting information of the multiple travel trajectory points; and the travel path corresponding to the sequence of travel trajectory points can be restored according to the sorting result.
[0203] In practical applications, as described in section 204 above, there are multiple travel trajectory point sequences. The traffic flow of a road segment in the road network can be determined based on the travel paths corresponding to each of the multiple travel trajectory point sequences. For example, the number of travel paths passing through a certain road segment can be counted among the travel paths corresponding to each of the multiple travel trajectory point sequences, and this number of travel paths can be used as the traffic flow of that road segment.
[0204] In practical applications, traffic statistics can be performed in different time periods. The specific settings can be configured according to actual needs, and this application does not impose any specific limitations on this.
[0205] In the technical solution provided in this application, when determining the target road segment of each travel trajectory point from the candidate road segments corresponding to each travel trajectory point in the travel trajectory point sequence, the sorting information between travel trajectory points and the topological relationship between road segments in the road network are considered. Considering the road network topology and the sorting information between travel trajectory points can more comprehensively determine the road segment to which the trajectory point belongs, thereby improving the accuracy of road segment matching for travel trajectory points.
[0206] In one feasible solution, step 202 above, "determining the target road segment where each of the multiple travel trajectory points is located from the candidate road segments of each of the multiple travel trajectory points based on the sorting information between travel trajectory points in the sequence of travel trajectory points and the topological relationship between road segments in the road network," can be achieved by the following steps:
[0207] 2021. Based on the topological relationship between road segments in the road network, determine the transfer probability of a candidate road segment from the previous travel trajectory point to the candidate road segment of the next travel trajectory point in the sequence of travel trajectory points.
[0208] The previous travel trajectory point and the next travel trajectory point are adjacent in the sequence of travel trajectory points.
[0209] 2022. Based on the transition probability, determine the target road segment where each of the multiple travel trajectory points is located from the candidate road segments of each of the multiple travel trajectory points.
[0210] In the aforementioned 2021, based on the topological relationships between road segments in the road network, it is determined whether the candidate road segment of the next travel trajectory point is located in the set of downstream road segments adjacent to the candidate road segment of the previous travel trajectory point and / or the length of the transfer path from the candidate road segment of the previous travel trajectory point to the candidate road segment of the next travel trajectory point, so as to obtain the determination result; based on the determination result, the corresponding transfer probability is determined. In practical applications, there may be multiple transfer paths from the candidate road segment of the previous travel trajectory point to the candidate road segment of the next travel trajectory point; the length of the shortest transfer path can be selected as the aforementioned transfer path length.
[0211] Specifically, if the candidate road segment of the later travel trajectory point is located in the set of downstream road segments adjacent to the candidate road segment of the earlier travel trajectory point, the corresponding transfer probability is set as the first transfer probability. If the candidate road segment of the later travel trajectory point is not located in the set of downstream road segments adjacent to the candidate road segment of the earlier travel trajectory point, the corresponding transfer probability is determined based on the transfer path length from the candidate road segment of the earlier travel trajectory point to the candidate road segment of the later travel trajectory point. The transfer probability determined based on the transfer path length is less than the first transfer probability; the transfer probability determined based on the transfer path length is inversely proportional to the transfer path length.
[0212] In practical applications, each travel trajectory point has one or more candidate road segments. Therefore, based on the topological relationships between road segments in the road network, the transfer probability of moving from each candidate road segment of the previous travel trajectory point to each candidate road segment of the next travel trajectory point can be determined. For example, if the candidate road segments of the next travel trajectory point include a first candidate road segment, which refers to any candidate road segment of the next travel trajectory point, the transfer probability of moving from each candidate road segment of the previous travel trajectory point to the first candidate road segment can be determined.
[0213] The travel trajectory point sequence involves multiple sets of travel trajectory points, each set including the preceding and following travel trajectory points. For each set of travel trajectory points, the corresponding transition probability can be calculated according to step 1021 above.
[0214] In the above-mentioned 2022, in one example, according to the sorting information of multiple travel trajectory points, the candidate road segments of each of the multiple travel trajectory points are combined to obtain multiple candidate road segment sequences; in each candidate road segment sequence, multiple candidate road segments come from the candidate road segment sets of multiple travel trajectory points, wherein one or more candidate road segments of each travel trajectory point constitute the candidate road segment set of that travel trajectory point.
[0215] Based on the transition probabilities, the occurrence probabilities of each of the multiple candidate road segment sequences are calculated; based on the candidate road segment sequence with the highest occurrence probability, the target road segment where each of the multiple travel trajectory points is located is determined.
[0216] Specifically, the multiple candidate road segment sequences include a first candidate road segment sequence; based on the sorting information of the candidate road segments in the first candidate road segment sequence, multiple groups of candidate road segments are determined; each group of candidate road segments includes two adjacent candidate road segments in the first candidate road segment sequence; the product of the transition probabilities corresponding to each of the multiple groups of candidate road segments is taken as the occurrence probability of the first candidate road segment sequence. The transition probability corresponding to each group of candidate road segments is the transition probability of the previous candidate road segment moving to the next candidate road segment in each group.
[0217] The candidate road segment corresponding to each travel trajectory point in the candidate road segment sequence with the highest probability of occurrence is selected as the target road segment for that travel trajectory point. Note: There is a one-to-one correspondence between the candidate road segments in the candidate road segment sequence and the travel trajectory points in the travel trajectory point sequence.
[0218] In practical applications, step 202 above, "determining the target road segment where each of the multiple travel trajectory points is located from the candidate road segments of each of the multiple travel trajectory points based on the sorting information between travel trajectory points in the sequence of travel trajectory points and the topological relationship between road segments in the road network," may further include the following steps:
[0219] 2023. Before determining the target road segment of each of the multiple travel trajectory points from their respective candidate road segments based on the transfer probability, the transfer probability of transferring from the candidate road segment of the previous travel trajectory point to the candidate road segment of the next travel trajectory point in the sequence of travel trajectory points is corrected based on the distance from the next travel trajectory point to the candidate road segment of the next travel trajectory point.
[0220] The distance from the next travel trajectory point to the candidate road segment of the next travel trajectory point can be a vertical distance, or the minimum distance from the next travel trajectory point to the endpoint of the candidate road segment, or the distance from the next travel trajectory point to the midpoint of the candidate road segment. This application embodiment does not specifically limit this and can be selected according to actual needs.
[0221] For the same transition probability, the greater the distance, the smaller the corresponding corrected transition probability; the smaller the distance, the greater the corresponding corrected transition probability. Note: The relationship between the corrected transition probability and the original transition probability can be set according to actual needs, and this application embodiment does not specifically limit this.
[0222] In other words, the smaller the candidate road segment from the next travel trajectory point to the next travel trajectory point, the greater the probability of transferring from the candidate road segment of the previous travel trajectory point to the candidate road segment of the next travel trajectory point, which is consistent with reality.
[0223] It should be noted that the process of transferring from the candidate road segment of the previous travel trajectory point to the candidate road segment of the next travel trajectory point is essentially a state transition. Therefore, the above-mentioned transition probability can also be called the state transition probability.
[0224] In practical applications, a map matching algorithm based on a Hidden Markov Model (HMM) can be used to implement the above step 202.
[0225] It should be noted that any steps in the method provided in this application that are not described in detail can be found in the corresponding content of the above embodiments, and will not be repeated here. Furthermore, the method provided in this application may include other parts or all of the steps in the above embodiments in addition to the steps described above; for details, please refer to the corresponding content of the above embodiments, and will not be repeated here.
[0226] The technical solution provided in this application can be applied to traffic flow statistics in various cities. The following will combine... Figure 3 Examples of scenarios are provided to illustrate the technical solutions provided in the embodiments of this application. For example... Figure 3 As shown, the method for determining traffic flow mainly includes the following steps:
[0227] 301. Obtain LBS trajectory point data.
[0228] Specifically, obtain the LBS trajectory point data of all LBS users in target city A.
[0229] 302. Travel data acquisition.
[0230] That is, obtaining the initial travel trajectory point sequence.
[0231] 303. Coordinate system matching check and coordinate system transformation.
[0232] 304. Analysis of the motion state of trajectory points.
[0233] 305. Abnormal trajectory point identification.
[0234] 306. Map matching.
[0235] 307. Complete discontinuous paths.
[0236] 308. Matching distance and continuity assessment.
[0237] 309. Trajectory Convergence and Flow Calibration.
[0238] By following the steps above, we can obtain the traffic flow statistics for each road segment in the road network of the target city A. Subsequently, we can improve the traffic carrying capacity of city A based on the statistical results.
[0239] In summary, this application provides a scheme for restoring urban road traffic flow based on location service data. After acquiring LBS travel data, it calculates the matching degree between the LBS trajectory point coordinate system and the road network data coordinate system through a coordinate system road network fit check, and performs coordinate system transformation on trajectory coordinate points with mismatched coordinate systems. Through trajectory point motion state analysis, it filters abnormal coordinate points using speed and angle change rate. Through discontinuous trajectory completion, it completes the path in signal blind spots, thereby restoring the complete travel path. It evaluates the quality of path recognition results through two quantitative indicators: matching distance and continuity. Finally, it corrects the sampling deviation of LBS data through trajectory convergence and traffic flow calibration, thereby completing the road traffic flow output.
[0240] This solution uses LBS data as the primary dataset for urban road traffic flow reconstruction. The LBS data collection process does not rely on specific devices on urban roads, resulting in low collection costs and high penetration. LBS positioning accuracy is typically at the meter level, significantly improving upon the positioning accuracy of GPS devices installed in floating cars, thereby enhancing the accuracy of road traffic flow statistics. Based on the characteristics of LBS data, a travel path identification method for urban road traffic flow reconstruction is designed, including coordinate system fit checking and transformation, anomaly point identification based on trajectory point movement status, and discontinuous trajectory completion techniques. Matching distance and adjacency rate indices are also designed to evaluate the path identification results. This method overcomes the problems of erroneous path identification and discontinuous output trajectories that often occur when traditional map matching models are applied to LBS data, enabling the output of reliable and complete travel path identification results.
[0241] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of this application is shown. Figure 4As shown, the electronic device includes a memory 1101 and a processor 1102. The memory 1101 can be configured to store various other data to support operation on the electronic device. Examples of such data include instructions for any application or method used to operate on the electronic device. The memory 1101 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Electrically Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0242] The memory 1101 is used to store programs;
[0243] The processor 1102, coupled to the memory 1101, is used to execute the program stored in the memory 1101 to implement the traffic flow determination method provided in the above-described method embodiments.
[0244] Furthermore, such as Figure 4 As shown, the electronic device also includes: communication component 1103, display 1104, power supply component 1105, audio component 1106, and other components. Figure 4 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 4 The components shown.
[0245] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the steps or functions of the traffic flow determination method provided in the above-described method embodiments.
[0246] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0247] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM (Read Only Memory) / RAM (Static Random-Access Memory, magnetic disk, optical disk, etc.), including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0248] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method of determining traffic flow, characterized by, The method comprises the following steps: According to the to-be-processed travel trajectory point sequence and the road network, it is determined whether the first trajectory coordinate system on which the to-be-processed travel trajectory point sequence is based and the road network coordinate system on which the road network is based are matched, comprising: determining an average distance according to the distance between each travel trajectory point in the to-be-processed travel trajectory point sequence and the nearest road segment in the road network; if the average distance is greater than or equal to a preset distance threshold, it is determined that the first trajectory coordinate system and the road network coordinate system are not matched; When the first trajectory coordinate system and the road network coordinate system are not matched, a target coordinate system is determined from a plurality of candidate coordinate systems through an iterative method, and the travel trajectory points in the to-be-processed travel trajectory point sequence are converted from the target coordinate system to the road network coordinate system to obtain a travel trajectory point sequence; If the second trajectory coordinate system on which the obtained travel trajectory point sequence is based is matched with the road network coordinate system, the iteration is ended, and the displacement speed and the angular speed of the travel trajectory points in the travel trajectory point sequence are determined; when the displacement speed is greater than or equal to a preset displacement speed threshold or the angular speed is greater than or equal to a preset angle threshold, an abnormal travel trajectory point is determined from the travel trajectory point and the previous travel trajectory point of the travel trajectory point in the travel trajectory point sequence, the abnormal travel trajectory point is deleted from the travel trajectory point sequence, and the travel path corresponding to the travel trajectory point sequence is restored in the road network; Otherwise, the iteration is continued until the plurality of candidate coordinate systems are iterated through; According to the road segments passed through by the travel path, the traffic of the road segments in the road network is determined.
2. The method of claim 1, wherein, Restoring the travel path corresponding to the travel trajectory point sequence in the road network comprises: In the road network, candidate road segments of a plurality of travel trajectory points in the travel trajectory point sequence are determined; The target road segments where the plurality of travel trajectory points are located are determined from the candidate road segments of the plurality of travel trajectory points; According to the target road segments where the plurality of travel trajectory points are located, the travel path corresponding to the travel trajectory point sequence is restored.
3. The method of claim 2, wherein, The plurality of travel trajectory points comprise a first travel trajectory point; in the road network, the candidate road segment corresponding to the first travel trajectory point is determined, comprising: In the road network, an initial candidate road segment corresponding to the first travel trajectory point is determined; When the road segment type of the initial candidate road segment is a road type related to a closed road, at least one closed road segment of the area where the initial candidate road segment is located in the road network is determined; The matching degree of the travel trajectory point sequence and the at least one closed road segment of the area where the initial candidate road segment is located in the road network is determined; When the matching degree is greater than or equal to a first preset matching threshold, the initial candidate road segment is determined as the candidate road segment corresponding to the first travel trajectory point.
4. The method of claim 2, wherein, The travel trajectory point sequence comprises adjacent second and third travel trajectory points; in the travel trajectory point sequence, the second travel trajectory point is located before the third travel trajectory point; According to the target road segments where the plurality of travel trajectory points are located, the travel path corresponding to the travel trajectory point sequence is restored, comprising: when the target road section where the third travel trajectory point is located and the target road section where the second travel trajectory point is located are not adjacent, finding a shortest path from the target road section where the second travel trajectory point is located to the target road section where the third travel trajectory point is located by using a shortest path algorithm; restoring a travel path corresponding to the first travel trajectory point sequence according to the target road section where each of the plurality of travel trajectory points is located and the shortest path.
5. The method of claim 2, wherein, determining the target road section where each of the plurality of travel trajectory points is located from the candidate road sections of the plurality of travel trajectory points, including: determining the target road section where each of the plurality of travel trajectory points is located from the candidate road sections of the plurality of travel trajectory points according to the ordering information between the travel trajectory points in the travel trajectory point sequence and the topological relationship between road sections in the road network.
6. The method of claim 1, wherein, the travel trajectory point sequence is determined according to geographic location data collected by a location-based service (LBS) application; the travel trajectory point sequence is a plurality of travel trajectory point sequences; determining the traffic of the road sections in the road network according to the road sections passed through by the travel path, including: grouping the same travel paths in the travel paths corresponding to the plurality of travel trajectory point sequences respectively into a group to obtain a plurality of groups of travel paths; correcting the number of travel paths of each group of travel paths according to the proportion of users using the LBS application in the departure cell corresponding to each group of travel paths to obtain a corrected number of travel paths of each group of travel paths; determining the traffic of the road sections in the road network according to the plurality of groups of travel paths and the corrected number of travel paths of the plurality of groups of travel paths.
7. The method of claim 1, wherein, further comprising: determining a plurality of initial travel trajectory point sequences according to geographic location data collected by a location-based service (LBS) application; determining a target initial travel trajectory point sequence whose travel mode is a car travel mode according to the moving speed corresponding to each of the plurality of initial travel trajectory point sequences; determining the target initial travel trajectory point sequence as the travel trajectory point sequence to be processed.
8. An electronic device, comprising: comprising: a memory and a processor, wherein the memory is configured to store a program; the processor is coupled to the memory and is configured to execute the program stored in the memory to implement the method for determining traffic flow according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for matching positioning information with road
CN111189459A
Method, device and equipment for displaying traffic flow migration condition and medium
CN113808400A