A method, device, equipment and medium for measuring and calculating highway vehicle following degree
Patent Information
- Application Number
- CN202511152486.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2045-08-18
AI Technical Summary
[0003]目前,现有技术在分析高速公路车辆伴随度的时候,所采用的分析数据范围具有一定的局限性,且测算误差较大
本申请实施例提供的高速公路车辆伴随度测算方法,基于高速公路通行数据实现建模,并在建模插补缺失数据的基础上,快速、准确地测算了目标车辆的单次行程的时空伴随度和多次行程的时空伴随度,可为后续管理部门开展涉车、涉驾管理提供有力的数据支撑。
Smart Images

Figure CN121034070B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle traffic data analysis applications, and in particular to a method, device, equipment, and medium for calculating the accompaniment of vehicles on highways. Background Technology
[0002] As a long-distance, high-speed transportation network, highways carry a large amount of goods and people. Studying the spatiotemporal accompaniment of vehicles on highways is of great significance for the overall operation management, inspection and safety governance of highways.
[0003] Currently, existing technologies have limitations in the range of analytical data used when analyzing vehicle following distance on highways, and the calculation errors are relatively large. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to overcome the shortcomings of the prior art and provide a method, apparatus, equipment and medium for calculating the vehicle accompaniment degree on highways.
[0005] This invention provides the following technical solution: In a first aspect, the present invention provides a method for calculating the vehicle accompaniment distance on highways, the method comprising: Preprocess the vehicle traffic data on the highway to obtain preprocessed traffic data; The traffic data of the target vehicle is obtained from the preprocessed traffic data, and the traffic data of the candidate accompanying vehicles are determined based on the time and location of the target vehicle entering and exiting the highway. Each node on the highway involved in the passage data of the target vehicle and the candidate accompanying vehicles is assigned a corresponding weight. The nodes include entrance toll stations, exit toll stations, and multiple gantries. Based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node, the overlap degree of the gantry space of the target vehicle and the candidate accompanying vehicle on the highway is calculated. Based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node, the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle at toll stations on the highway is calculated. Based on the spatial overlap of the gantry and the spatiotemporal overlap of the toll station, the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on a single trip on the highway is calculated, and the optimal accompanying vehicle for a single trip is selected from the candidate accompanying vehicles based on the spatiotemporal accompaniment degree of the single trip. Based on the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle during a single trip on the highway, the accompaniment degree of the target vehicle and the candidate accompanying vehicle during multiple trips on the highway is calculated, and the optimal accompanying vehicle for multiple trips is selected from the candidate accompanying vehicles based on the spatiotemporal accompaniment degree of multiple trips.
[0006] In an optional implementation, the highway vehicle traffic data includes entrance toll station traffic data and spatial location information, exit toll station traffic data and spatial location information, and gantry traffic data. The preprocessing of the highway vehicle traffic data to obtain preprocessed traffic data includes: The expressway is abstracted as a directed graph, and a national expressway network is constructed based on the directed graph and each node. Based on the traffic flow data of the national expressway network within a preset time period, the probability of passage between any two nodes in the national expressway network is calculated, and a transition probability matrix is formed. The missing nodes in the traffic data that lack the traffic data and spatial location information of the entrance toll station are formed into a directed sequence, and each missing node in the directed sequence is matched to the corresponding node of the national expressway network to obtain the matching confidence of each missing node. Using the transition probability matrix and the matching confidence of each missing node, the hidden state sequence is derived from the end point of the directed sequence. The starting point of the hidden state sequence is used as the entrance toll station passage data and spatial location information that each missing node needs to be interpolated, thus obtaining the preprocessed passage data.
[0007] In an optional implementation, assigning a corresponding weight to each node on the highway involved in the passage data of the target vehicle and the candidate accompanying vehicles includes: Set constraints, and assign corresponding weights to each node on the highway involved in the passage data of the target vehicle and the candidate accompanying vehicles according to the constraints. The constraints include that the weights of the entrance toll station and the exit toll station are equal, and that the weights of the entrance toll station and the exit toll station are greater than or equal to the weight of any of the gantries. The sum of the weights of the entrance toll station, the exit toll station and each gantry is 1, and the weight of each gantry is positively correlated with the mileage it represents.
[0008] In an optional implementation, calculating the gantry space overlap degree of the target vehicle and the candidate accompanying vehicles on the highway based on the traffic data of the target vehicle and the candidate accompanying vehicles and the weights of each node includes: Obtain the target gantry sequence of the target vehicle's travel path from the traffic data of the target vehicle, and obtain the accompanying gantry sequence of the candidate accompanying vehicle's travel path from the traffic data of the candidate accompanying vehicle. Obtain the weights of each gantry in the target gantry sequence to form a target gantry weight sequence; Determine whether there are any overlapping gantry sequences between the target gantry sequence and the accompanying gantry sequence; If they exist, each gantry in the target gantry sequence is assigned a corresponding preset value, and the gantry space overlap between the target vehicle and the candidate accompanying vehicle on the highway is calculated based on the preset value and weight of each gantry in the target gantry sequence. If not, the overlap between the target vehicle and the candidate accompanying vehicle in the gantry space on the highway is determined to be 0.
[0009] In an optional implementation, the spatiotemporal overlap of toll stations includes the spatiotemporal overlap of entrance toll stations and the spatiotemporal overlap of exit toll stations. The step of calculating the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicles at toll stations on the highway based on the passage data of the target vehicle and the candidate accompanying vehicles, and the weights of each node, includes: Obtain the target toll station sequence of the target vehicle's travel path from the target vehicle's traffic data, and obtain the accompanying toll station sequence of the candidate accompanying vehicle's travel path from the candidate accompanying vehicle's traffic data. Obtain the weights of the target entrance toll station and the target exit toll station in the target toll station sequence to form a target toll station weight sequence; obtain the weights of the accompanying entrance toll station and the accompanying exit toll station in the accompanying toll station sequence to form an accompanying toll station weight sequence. Using preset rules, an entrance administrative division weight is set based on the administrative division to which the target entrance toll station and the accompanying entrance toll station belong; using the same preset rules, an exit administrative division weight is set based on the administrative division to which the target exit toll station and the accompanying exit toll station belong. The geographical distance to the entrance is calculated based on the latitude and longitude coordinates of the target entrance toll station and the accompanying entrance toll station; the geographical distance to the exit is calculated based on the latitude and longitude coordinates of the target exit toll station and the accompanying exit toll station. The entrance weight level of the candidate accompanying vehicle is calculated based on the entrance administrative division weight and the entrance geographical distance; the exit weight level of the candidate accompanying vehicle is calculated based on the exit administrative division weight and the exit geographical distance. Based on the entrance weight level of the candidate accompanying vehicle, the weight of the target entrance toll station, and the weight of the accompanying entrance toll station, the spatial overlap of the entrance toll station is calculated. Based on the exit weight level of the candidate accompanying vehicle, the weight of the target exit toll station, and the weight of the accompanying exit toll station, the spatial overlap of the exit toll station is calculated. The entry time difference between the target vehicle entering the target entrance toll station and the candidate accompanying vehicle entering the accompanying entrance toll station is obtained; the exit time difference between the target vehicle exiting the target exit toll station and the candidate accompanying vehicle exiting the accompanying exit toll station is obtained. Based on the entrance time difference and the preset maximum entrance time difference, calculate the time overlap of the entrance toll station; based on the exit time difference and the preset maximum exit time difference, calculate the time overlap of the exit toll station. The spatiotemporal overlap of the entrance toll station is calculated based on the spatial overlap and temporal overlap of the entrance toll station. Similarly, the spatiotemporal overlap of the exit toll station is calculated based on the spatial overlap and temporal overlap of the exit toll station.
[0010] In an optional implementation, calculating the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle on a single trip on the highway based on the gantry spatial overlap and the toll station spatiotemporal overlap includes: Preset adaptive parameters are obtained for the spatial overlap of the gantry, the spatiotemporal overlap of the entrance toll station, and the spatiotemporal overlap of the exit toll station, respectively. Based on the gantry spatial overlap, the entrance toll station spatiotemporal overlap, and the exit toll station spatiotemporal overlap, as well as their respective preset adaptive parameters, the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on a single trip on the highway is calculated.
[0011] In an optional implementation, calculating the co-occurrence degree of the target vehicle and the candidate accompanying vehicle on multiple trips on the highway based on the spatiotemporal co-occurrence degree of a single trip of the target vehicle and the candidate accompanying vehicle on the highway includes: Obtain the number of times the candidate accompanying vehicle appears as a candidate accompanying vehicle in multiple trips; The spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on the highway is calculated based on the spatiotemporal accompaniment degree of each single trip of the target vehicle and the candidate accompanying vehicle on multiple trips on the highway and the number of occurrences.
[0012] Secondly, the present invention provides a highway vehicle accompaniment measurement device, the device comprising: The preprocessing module is used to preprocess the vehicle traffic data of the highway to obtain preprocessed traffic data. The acquisition module is used to acquire the traffic data of the target vehicle from the preprocessed traffic data, and determine the traffic data of the candidate accompanying vehicles based on the time and location of the target vehicle entering and exiting the highway. The weighting module is used to assign a corresponding weight to each node on the highway involved in the passage data of the target vehicle and the candidate accompanying vehicles. The nodes include entrance toll stations, exit toll stations and multiple gantries. The first calculation module is used to calculate the gantry space overlap degree of the target vehicle and the candidate accompanying vehicle on the highway based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node. The second calculation module is used to calculate the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle at toll stations on the highway based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node. The third calculation module is used to calculate the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle on the highway for a single trip based on the spatial overlap of the gantry and the spatiotemporal overlap of the toll station, and to select the optimal accompanying vehicle for a single trip from the candidate accompanying vehicles based on the spatiotemporal overlap of the single trip. The fourth calculation module is used to calculate the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on multiple trips on the highway based on the spatiotemporal accompaniment degree of a single trip on the highway, and to select the optimal accompanying vehicle for multiple trips from the candidate accompanying vehicles based on the spatiotemporal accompaniment degree of multiple trips.
[0013] Thirdly, this disclosure provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the highway vehicle accompaniment measurement method described in the first aspect.
[0014] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the highway vehicle accompaniment measurement method described in the first aspect.
[0015] The beneficial effects of this application are: The method for calculating the vehicle accompaniment degree on highways provided in this application is based on highway traffic data to achieve modeling. Based on the modeling and imputation of missing data, it quickly and accurately calculates the spatiotemporal accompaniment degree of a target vehicle for a single trip and the spatiotemporal accompaniment degree of multiple trips. This can provide strong data support for subsequent management departments to carry out vehicle-related and driver-related management.
[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the various drawings, similar components are numbered similarly.
[0018] Figure 1 A flowchart of a method for calculating the accompaniment of vehicles on a highway, provided in an embodiment of this application, is shown. Figure 2 This illustration shows one of the travel paths of the target vehicle and candidate accompanying vehicles on a highway, as provided in an embodiment of this application. Figure 3 This illustrates a second example of the driving path of the target vehicle and candidate accompanying vehicles on a highway, as provided in an embodiment of this application. Figure 4 This illustrates a third example of the driving path of the target vehicle and candidate accompanying vehicles on a highway, as provided in this application embodiment. Figure 5 This paper shows a schematic diagram of the structure of a highway vehicle accompaniment measurement device provided in an embodiment of this application; Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation
[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0020] Example 1 Current domestic and international analyses of the spatiotemporal accompaniment of vehicles on highways mainly fall into three categories: first, relying on mobile phone signaling data to determine the driver's and vehicle's accompaniment status; second, relying on GPS data collected by onboard equipment to determine vehicle accompaniment status; and third, relying on license plate recognition data to determine vehicle accompaniment status. However, the above methods have the following shortcomings: (1) Limitations of data scope: The data scope of existing methods has certain limitations. For example, in the field of safety management, it has been found that some drivers and passengers will turn off the mobile positioning function or block the GPS (Global Positioning System) signal receiving device after driving their vehicles into the highway. Therefore, when analyzing the accompanying situation of vehicles on the highway, the use of mobile phone signaling, GPS and other data is inherently incomplete, which may lead to omissions or errors in the analysis results. (2) Large data measurement error: Existing research methods judge the accompanying conditions by judging the similarity of the trajectory shape. The vehicle's driving lane, lane change, overtaking, etc. will cause the shape of the vehicle's driving trajectory to change, thus affecting the data measurement results. This scheme uses highway traffic data and the location topology relationship of infrastructure to calculate the vehicle's accompanying degree based on spatiotemporal conditions, which is not affected by the vehicle's lane change, overtaking, etc. (3) In actual business, the tracking of the accompanying vehicles of the target vehicle is generally based on multiple trips. The current data only calculates the trajectory similarity of the vehicle's single trip, and does not calculate the accompanying degree of the vehicle's multiple trips on the highway based on the spatiotemporal conditions.
[0021] Therefore, based on the technical problems of limited data range and large measurement errors in the existing technology, such as... Figure 1 As shown in the figure, this application proposes a method for calculating the accompaniment of vehicles on highways, which specifically includes the following steps: Step S110: Preprocess the vehicle traffic data of the highway to obtain preprocessed traffic data.
[0022] The daily vehicle traffic data of highways contains hundreds of millions of samples, covering highways nationwide. Therefore, the calculation results are more accurate, and no additional data collection devices are required, resulting in lower costs. Furthermore, using highway vehicle traffic data avoids reliance on vehicle self-positioning technology, which can effectively reduce errors caused by human interference, lane changes, and other factors that affect vehicle trajectory. This provides strong data support for management departments to track target vehicles and their related vehicles.
[0023] Understandably, highway vehicle traffic data includes entrance toll station traffic data and spatial location information, exit toll station traffic data and spatial location information, and gantry traffic data. The spatial location information of entrance and exit toll stations is recorded in the toll station dictionary table; entrance toll station traffic data is recorded in the entrance toll station table, exit toll station traffic data is recorded in the exit toll station table, and gantry traffic data is recorded in the gantry table. Vehicle attribute information such as vehicle type, ETC (Electronic Toll Collection) card number, OBU (Onboard Unit) device number, total vehicle and cargo weight, vehicle type code, and toll medium will not change in the three data tables.
[0024] The quality of vehicle traffic data on highways has a significant impact on the accuracy of subsequent calculations. Therefore, this embodiment requires preprocessing the vehicle traffic data. Errors or missing attribute indicators in the vehicle traffic data can be corrected and supplemented through the correlation between highway traffic data indicators. For some vehicles, there may be missing entry toll station traffic data and spatial location information after entering the highway. This lack of information will result in an incomplete actual travel path for the vehicle, making it impossible to calculate the vehicle's accompaniment degree. Although the amount of highway traffic data is enormous, a certain proportion of missing entry toll station traffic data and spatial location information will still lead to insufficient calculation accuracy.
[0025] In this embodiment, a method combining Hidden Markov Models (HMMs) and graph theory reverse path is used to address the problem of missing traffic data and spatial location information at entrance toll stations. The specific process is as follows: First, the highway is abstracted as a directed graph, and the infrastructure on the highway (entrance toll stations, exit toll stations, gantries) is set as nodes. Based on the directed graph and each node, a national highway network is constructed, represented as... Based on traffic flow data within a preset time period of the national expressway network, the values of any two nodes in the national expressway network can be calculated. The probability of passage between Based on this, a transition probability matrix can be formed for the national expressway network. , here Then, the missing nodes in the traffic data, which lack entrance toll station traffic data and spatial location information, are combined into a directed sequence. and each missing node in the directed sequence Matched to the corresponding nodes of the national expressway network The matching confidence of each missing node is obtained. , indicating missing nodes Falling on the node The probability of missing nodes Falling on the node Above, then ,otherwise Finally, using the transition probability matrix and the matching confidence of each missing node, the hidden state sequence is derived from the end of the directed sequence. The starting point of the hidden state sequence is the entrance toll station passage data and spatial location information that each missing node needs to be interpolated, thus obtaining the preprocessed passage data.
[0026] The above method uses a combination of Hidden Markov Models and graph theory reverse path to address the problem of missing traffic data and spatial location information at entrance toll stations. It effectively imputes missing data, improves data integrity, and provides an accurate foundation for subsequent analysis.
[0027] Step S120: Obtain the traffic data of the target vehicle from the preprocessed traffic data, and determine the traffic data of the candidate accompanying vehicles based on the time and location of the target vehicle entering and exiting the highway.
[0028] It should be noted that the target vehicle refers to a specific vehicle that needs to be monitored in the management of vehicles' traffic on highways, while the candidate accompanying vehicles refer to a set of vehicles that have similar driving trajectories to the target vehicle within a limited time and space.
[0029] In this embodiment, the traffic data of the target vehicle is first obtained from the preprocessed traffic data, and then the traffic data of the candidate accompanying vehicles are determined based on the time and location of the target vehicle entering and exiting the highway.
[0030] The conditions for determining candidate accompanying vehicles can be divided into: (1) Time range definition: a reasonable time range is set according to the time when the target vehicle enters and leaves the highway; (2) Location range definition: based on the entrance and exit toll stations of the target vehicle, the highway entrance that is the same as the entrance toll station of the target vehicle or within a certain distance range, and the highway exit that is the same as the exit toll station of the target vehicle or within a certain distance range are selected.
[0031] From the preprocessed traffic data, all vehicles traveling within the aforementioned time and location range will be selected as candidate accompanying vehicles, and then the traffic data of the candidate accompanying vehicles will be obtained.
[0032] The above method can obtain the traffic data of the target vehicle and the candidate accompanying vehicles that are spatiotemporally related to the target vehicle from massive traffic data more comprehensively and accurately, providing high-quality data input for subsequent spatiotemporal accompaniment degree calculation.
[0033] Step S130: Assign corresponding weights to each node on the highway involved in the passage data of the target vehicle and candidate accompanying vehicles. The nodes include entrance toll stations, exit toll stations and multiple gantries.
[0034] In this embodiment, we first focus on a single trip of the target vehicle. We assume that each gantry along the highway is the path taken by the candidate accompanying vehicle. The represented mileage is The total mileage of the candidate accompanying vehicle passing through n gantries is The constraint is set as follows: the weights of the entrance toll station and the exit toll station are equal, denoted as... Weight of each gantry and the mileage it represents Positive correlation, that is , The total weight of all gantries; the weights of the entrance toll station and the exit toll station are greater than or equal to the weight of any single gantry. ,Right now The sum of the weights of the entrance toll station, the exit toll station, and all the gantries passed through is 1, that is... Therefore, the weight of each gantry .
[0035] Based on the above constraints, we can derive... Therefore, the lower limit of the weight of toll stations is In this embodiment, a dynamic weight adjustment coefficient for toll stations is introduced. Fully parameterize the weights to ensure The initial value is taken as , The values can be dynamically adjusted according to different actual road conditions; however, this embodiment does not limit the specific values. Therefore, the weights of the entrance and exit toll stations can be expressed as follows: .
[0036] The above method, by assigning corresponding weights to each node on the highway, more accurately reflects the importance and contribution of each node in the vehicle's travel path. The weight allocation considers travel mileage and constraints to ensure its rationality and scientific validity, providing a sound basis for subsequent calculations.
[0037] Step S140: Calculate the overlap of the target vehicle and candidate accompanying vehicles in the gantry space on the highway based on the traffic data of the target vehicle and the candidate accompanying vehicles and the weight of each node.
[0038] Understandably, regarding spatial overlap, gantry spatial overlap is related to the overlap of the gantry sequences traversed by the target vehicle and the candidate accompanying vehicle. The travel paths of the target vehicle and the candidate accompanying vehicle on the highway generally fall into three categories: the first is where the target vehicle and the candidate accompanying vehicle have gantry overlap but completely different entrance and exit toll stations, such as... Figure 2 As shown; the second scenario is that the target vehicle and the candidate accompanying vehicle have overlapping gantries and share the same toll station at one of their entrances and exits, such as... Figure 3 As shown; the third scenario is that the target vehicle and the candidate accompanying vehicle do not have an intersection of gantries but have the same entrance and exit toll stations, such as... Figure 4 As shown.
[0039] Specifically, the target gantry sequence of the travel path of target vehicle C is obtained from the traffic data of the target vehicle. Obtain the accompanying gantry sequence of the travel path of candidate accompanying vehicle P from the passage data of candidate accompanying vehicles. Obtain the weights of each gantry in the target gantry sequence to form the target gantry weight sequence. .
[0040] Further, determine whether there are overlapping gantry sequences in the target gantry sequence and the accompanying gantry sequence: such as Figure 2 As shown, if it exists, then each gantry in the target gantry sequence is assigned a corresponding preset value. (0 or 1), about to Zhongyu Overlapping gantries are assigned a value of 1, and non-overlapping gantries are assigned a value of 0. Based on the preset values and weights of each gantry in the target gantry sequence, the gantry spatial overlap degree between the target vehicle and candidate accompanying vehicles on the highway is calculated. ;like Figure 3 If it does not exist, the overlap of the gantry space between the target vehicle and the candidate accompanying vehicle on the highway is determined to be 0.
[0041] The above method calculates the gantry spatial overlap between the target vehicle and the candidate accompanying vehicle by comparing the gantry sequences traversed by the target vehicle and the candidate accompanying vehicle, and combining the weights of the gantry. It can accurately reflect the spatial similarity between the two vehicles on the driving path, quantify the spatial overlap of the vehicles at the gantry level, and provide a basis for the calculation of spatiotemporal accompaniment degree.
[0042] Step S150: Calculate the spatiotemporal overlap of the target vehicle and candidate accompanying vehicles at toll stations on the highway based on the traffic data of the target vehicle and candidate accompanying vehicles and the weight of each node.
[0043] Understandably, the spatiotemporal overlap of toll stations includes the spatiotemporal overlap of entrance toll stations and exit toll stations. Spatiotemporal overlap further includes spatial overlap and temporal overlap. For spatial overlap, the spatial overlap of entrance and exit toll stations is related to the distance between the entrance and exit and the administrative division to which they belong. For temporal overlap, the temporal overlap of entrance and exit toll stations is related to the time deviation of entering the expressway (i.e., the time deviation of passing through the entrance node) and the time deviation of leaving the expressway (i.e., the time deviation of passing through the exit node).
[0044] Understandably, this embodiment calculates the spatiotemporal overlap of toll stations separately into two parts: spatial overlap and temporal overlap. The process is as follows: (1) Spatial overlap of entrance and exit toll stations Specifically, the sequence of target toll stations along the travel path of target vehicle C is first obtained from the traffic data of the target vehicle. Obtain the sequence of accompanying toll stations along the travel path of candidate accompanying vehicle P from the passage data of candidate accompanying vehicles. Obtain the target entrance toll station in the target toll station sequence. and the target exit toll station The weights are used to form the target toll station weight sequence. Obtain the accompanying entrance toll stations in the accompanying toll station sequence. and accompanying exit toll booths The weights are used to form the accompanying toll station weight sequence. .
[0045] Next, using preset rules, based on the target entrance toll station... and accompanying entrance toll station The administrative division to which it belongs determines the weight of the administrative division at the entrance. And using preset rules based on the target exit toll station and accompanying exit toll booths The administrative division to which it belongs determines the weight of the export administrative division. For example, the preset rule can be that if they are in the same province, city, or county, the administrative division weight value is 1; if they are in the same province or city, the administrative division weight value is 0.8; if they are in the same province, the administrative division weight value is 0.5; and if they are in different provinces, the administrative division weight value is 0.2. The specific administrative division weight setting rule can be determined according to the actual situation, and this embodiment does not limit it.
[0046] Then, using the Haversine formula, based on the target entrance toll station... and accompanying entrance toll station Calculate the geographical distance to the entrance using the latitude and longitude coordinates. According to the target exit toll station and accompanying exit toll booths Calculate the geographical distance to the exit using the latitude and longitude coordinates. The Haversine formula is as follows:
[0047] In the formula, Indicates the geographical distance between two stations. It is the Earth's radius (usually taken as the Earth's average radius, approximately 6371 kilometers). and These represent the latitude values of the two stations, Indicates the latitude difference between the two stations. This indicates the difference in longitude between the two stations.
[0048] Will After normalization, the distance score is Where k is the attenuation coefficient, which can be set to k=0.01, and the specific value can be adjusted. Then, the geographical distance to the entrance... After normalization, we get Geographical distance of export After normalization, we get .
[0049] Furthermore, the weight of the administrative division at the entrance. Geographical distance from entrance Normalized Linear weighting is performed to obtain the entry weight level of candidate accompanying vehicles. Weight of export administrative divisions and geographical distance from the export Normalized Linear weighting is performed to obtain the export weight level of candidate accompanying vehicles. The calculation formula is as follows:
[0050] In the formula, and These are the default values for the parameters, which can be adjusted according to actual conditions. The default values are used in this embodiment. (Geographical distance weighting) (Administrative division weight).
[0051] Finally, based on the entry weight level of the candidate accompanying vehicles. Weight of the target entrance toll station And the weight of the accompanying entrance toll station Calculate the spatial overlap of the entrance toll station Based on the export weighting level of candidate accompanying vehicles Weight of target exit toll stations And the weight of accompanying exit toll stations Calculate the spatial overlap of exit toll stations The calculation formula is as follows:
[0052] (2) Time overlap of entrance and exit toll stations Understandably, in reality, the time difference between the target vehicle and the candidate accompanying vehicle entering the entrance toll station and leaving the exit toll station will also have a significant impact on the degree of accompaniment. Therefore, the time overlap of the entrance and exit toll stations should be added to the spatial overlap of the entrance and exit toll stations to describe the degree of time deviation between the candidate accompanying vehicle and the target vehicle.
[0053] Specifically, firstly, a preset maximum entry time difference is defined. and a preset maximum exit time difference (The specific time value can be determined according to the actual situation), obtain the time difference between the target vehicle entering the target entrance toll station and the candidate accompanying vehicle entering the accompanying entrance toll station. Obtain the time difference between the target vehicle exiting the target exit toll station and the candidate accompanying vehicle exiting the accompanying exit toll station. .
[0054] Furthermore, based on the entry time difference Difference from preset maximum entry time Calculate the time overlap of the entrance toll station. According to the export time difference Time difference with preset maximum exit Calculate the time overlap of exit toll stations The calculation formula is as follows:
[0055] In summary, after calculating the spatial overlap of the entrance and exit toll stations separately... Spatial overlap of exit toll stations Overlapping time of entrance toll stations Overlap time with exit toll booths Then, based on the spatial overlap of the entrance toll station Overlap with entrance toll station time Calculate the spatiotemporal overlap of the entrance toll station Based on the spatial overlap of exit toll stations Overlap time with exit toll station Calculate the spatiotemporal overlap of exit toll stations The calculation formula is as follows:
[0056]
[0057] It should be noted that, considering the high positive correlation between the gantry time overlap of the target vehicle and the candidate accompanying vehicle and the toll station time overlap, only the toll station time overlap is calculated, and the gantry time overlap is not calculated separately.
[0058] The aforementioned method calculates the spatiotemporal overlap of toll stations by dividing it into spatial overlap and temporal overlap. It comprehensively considers factors such as the vehicle's geographical distance from the toll station, administrative division, and entry and exit times, thus providing a more holistic assessment of the spatiotemporal similarity between vehicles. Furthermore, by introducing administrative division and geographical distance weights and combining them with the calculation of temporal overlap, it can more accurately reflect the degree of vehicle consistency in time and space, avoiding inaccuracies caused by relying solely on spatial or temporal information and improving the accuracy of toll station spatiotemporal overlap calculations.
[0059] Step S160: Based on the gantry space overlap and the toll station spatiotemporal overlap, calculate the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicles for a single trip on the highway, and select the optimal accompanying vehicle for a single trip from the candidate accompanying vehicles based on the spatiotemporal accompaniment degree of the single trip.
[0060] Preferably, based on the gantry spatial overlap, the spatiotemporal overlap of the entrance toll station, and the spatiotemporal overlap of the exit toll station, this embodiment introduces corresponding preset adaptive parameters. ,satisfy It is designed to adapt to different highway driving scenarios.
[0061] Understandably, spatiotemporal accompaniment refers to an evaluation index that reflects the degree of spatiotemporal similarity between candidate accompanying vehicles and target vehicles.
[0062] Finally, based on the overlap of the gantry space Spatiotemporal overlap of entrance toll stations Spatial and temporal overlap with exit toll stations and their respective preset adaptive parameters Calculate the spatiotemporal accompaniment degree of the target vehicle and candidate accompanying vehicles during a single trip on the highway. The calculation formula is as follows:
[0063] In practical applications, the spatiotemporal following degree of candidate accompanying vehicles is calculated. Then, based on the spatiotemporal accompaniment degree The size of the vehicle is used to filter candidate accompanying vehicles for a single trip of the target vehicle, and the spatiotemporal accompanying degree of each candidate accompanying vehicle is calculated. Arrange the vehicles in order and search according to user needs (e.g., take the top 60% after sorting from largest to smallest) to obtain the optimal accompanying vehicle for a single trip, thereby improving the efficiency of accompanying vehicle selection.
[0064] The above method comprehensively considers the spatial overlap of gantry structures and the spatiotemporal overlap of toll stations, and introduces adaptive parameters. It can accurately calculate the spatiotemporal accompaniment degree of the target vehicle and candidate accompanying vehicles during a single trip on the highway, based on different highway scenarios. This effectively solves the problems of limited data range and large calculation errors in existing technologies. The spatiotemporal accompaniment degree calculation results can provide strong data support for subsequent vehicle and driver-related management by management departments, helping to screen candidate accompanying vehicles and improve management efficiency.
[0065] Step S170: Based on the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicles in a single trip on the highway, calculate the accompaniment degree of the target vehicle and the candidate accompanying vehicles in multiple trips on the highway, and select the optimal accompanying vehicle for multiple trips from the candidate accompanying vehicles according to the spatiotemporal accompaniment degree of multiple trips.
[0066] Understandably, the candidate accompanying vehicles for a single trip of the target vehicle may be somewhat random. Therefore, when the target vehicle and the candidate accompanying vehicles have multiple trips on the highway within a certain period of time, the spatiotemporal accompanying degree of the candidate accompanying vehicles can be calculated based on the multiple trips.
[0067] Assume that target vehicle C appears on the highway n (n>1) times within a certain period. Each single trip has m candidate accompanying vehicles and their corresponding spatiotemporal accompaniment degrees R. Let k be the number of times a candidate accompanying vehicle appears as a candidate accompanying vehicle in the n trips, and let k be the spatiotemporal accompaniment degree corresponding to the k trips. Then, the average spatiotemporal companion degree of the target vehicle and the candidate accompanying vehicle during n trips on the highway. The calculation formula is as follows:
[0068] In practical applications, the average spatiotemporal adjoint degree can be used as a basis. The size is used to filter candidate accompanying vehicles for multiple trips of the target vehicle, and the average spatiotemporal degree of each candidate accompanying vehicle is calculated. Arrange the vehicles in order and search according to user needs (e.g., take the top 60% after sorting from largest to smallest) to obtain the optimal accompanying vehicles for multiple trips, thereby improving the efficiency of accompanying vehicle selection.
[0069] The above method, by calculating the spatiotemporal accompaniment degree of the target vehicle and candidate accompanying vehicles on the highway, can more comprehensively analyze the accompaniment relationship between vehicles, reduce the impact of occasional candidate accompanying vehicles on the results, and is especially suitable for business scenarios that require judgment based on multiple trips, providing more comprehensive data support for management departments.
[0070] The method for calculating the vehicle accompaniment degree on highways provided in this application is based on highway traffic data to achieve modeling. Based on the modeling and imputation of missing data, it quickly and accurately calculates the spatiotemporal accompaniment degree of a target vehicle for a single trip and the spatiotemporal accompaniment degree of multiple trips. This can provide strong data support for subsequent management departments to carry out vehicle-related and driver-related management.
[0071] Example 2 like Figure 5 The diagram shown is a structural schematic of a highway vehicle accompaniment measurement device 500 according to an embodiment of this application. The device includes: The preprocessing module 510 is used to preprocess the vehicle traffic data of the highway to obtain preprocessed traffic data. The acquisition module 520 is used to acquire the traffic data of the target vehicle from the preprocessed traffic data, and determine the traffic data of the candidate accompanying vehicles based on the time and location of the target vehicle entering and exiting the highway. The weighting module 530 is used to assign corresponding weights to each node on the highway involved in the passage data of the target vehicle and candidate accompanying vehicles. The nodes include entrance toll stations, exit toll stations and multiple gantries. The first calculation module 540 is used to calculate the overlap of the gantry space of the target vehicle and the candidate accompanying vehicles on the highway based on the traffic data of the target vehicle and the candidate accompanying vehicles and the weight of each node. The second calculation module 550 is used to calculate the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle at toll stations on the highway based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node. The third calculation module 560 is used to calculate the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle on a single trip on the highway based on the spatial overlap of the gantry and the spatiotemporal overlap of the toll station, and to select the optimal accompanying vehicle for a single trip from the candidate accompanying vehicles based on the spatiotemporal overlap of the single trip. The fourth calculation module 570 is used to calculate the spatiotemporal accompaniment degree of the target vehicle and candidate accompanying vehicles on multiple trips on the highway based on the spatiotemporal accompaniment degree of a single trip on the highway, and to select the optimal accompanying vehicle from the candidate accompanying vehicles based on the spatiotemporal accompaniment degree of multiple trips.
[0072] The highway vehicle accompaniment measurement device provided in this application embodiment can realize each process of the highway vehicle accompaniment measurement method corresponding to Embodiment 1, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0073] The highway vehicle accompaniment measurement device provided in this application embodiment is based on highway traffic data to realize modeling. Based on the modeling and interpolation of missing data, it quickly and accurately calculates the spatiotemporal accompaniment of a target vehicle for a single trip and the spatiotemporal accompaniment of multiple trips, which can provide strong data support for subsequent management departments to carry out vehicle-related and driver-related management.
[0074] Example 3 This application also provides a computer device. Please refer to the following for details. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.
[0075] Computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected via a system bus. It should be noted that only computer device 6 with memory 61, processor 62, and network interface 63 is shown in the figure; however, it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described herein is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0076] Computer devices can include desktop computers, laptops, handheld computers, and cloud servers. These devices allow for human-computer interaction with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.
[0077] The memory 61 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or D slot compatibility test memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as the hard disk or memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 6. Of course, the memory 61 may include both internal storage units and external storage devices of the computer device 6. In this embodiment, the memory 61 is typically used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions for slot compatibility testing methods. In addition, memory 61 can also be used to temporarily store various types of data that have been output or will be output.
[0078] In some embodiments, processor 62 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other highway vehicle accompaniment measurement chip. This processor 62 is typically used to control the overall operation of computer device 6. In this embodiment, processor 62 is used to execute computer-readable instructions stored in memory 61 or to process data, such as computer-readable instructions for executing slot compatibility testing methods.
[0079] The network interface 63 may include a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the computer device 6 and other electronic devices.
[0080] The computer device provided in this embodiment can execute the above-described method for calculating the distance between vehicles on highways. This method for calculating the distance between vehicles on highways can be any of the methods described in the various embodiments above.
[0081] Example 4 This embodiment also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the highway vehicle accompaniment measurement method in this embodiment.
[0082] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
[0083] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0084] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for calculating the vehicle accompaniment degree on highways, characterized in that, The method includes: Preprocess the vehicle traffic data on the highway to obtain preprocessed traffic data; The traffic data of the target vehicle is obtained from the preprocessed traffic data, and the traffic data of the candidate accompanying vehicle is determined based on the time and location of the target vehicle entering and exiting the highway. Each node on the highway involved in the passage data of the target vehicle and the candidate accompanying vehicles is assigned a corresponding weight. The nodes include entrance toll stations, exit toll stations, and multiple gantries. Based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node, the overlap degree of the gantry space of the target vehicle and the candidate accompanying vehicle on the highway is calculated. Based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node, the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle at toll stations on the highway is calculated. Based on the spatial overlap of the gantry and the spatiotemporal overlap of the toll station, the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on a single trip on the highway is calculated, and the optimal accompanying vehicle for a single trip is selected from the candidate accompanying vehicles based on the spatiotemporal accompaniment degree of the single trip. Based on the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on a single trip on the highway, the accompaniment degree of the target vehicle and the candidate accompanying vehicle on multiple trips on the highway is calculated, and the optimal accompanying vehicle for multiple trips is selected from the candidate accompanying vehicles based on the spatiotemporal accompaniment degree of multiple trips. The spatiotemporal overlap of toll stations includes the spatiotemporal overlap of entrance toll stations and the spatiotemporal overlap of exit toll stations. The calculation of the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicles at toll stations on the highway, based on the passage data of the target vehicle and the candidate accompanying vehicles and the weights of each node, includes: Obtain the target toll station sequence of the target vehicle's travel path from the target vehicle's traffic data, and obtain the accompanying toll station sequence of the candidate accompanying vehicle's travel path from the candidate accompanying vehicle's traffic data. Obtain the weights of the target entrance toll station and the target exit toll station in the target toll station sequence to form a target toll station weight sequence; obtain the weights of the accompanying entrance toll station and the accompanying exit toll station in the accompanying toll station sequence to form an accompanying toll station weight sequence. Using preset rules, an entrance administrative division weight is set based on the administrative division to which the target entrance toll station and the accompanying entrance toll station belong; using the same preset rules, an exit administrative division weight is set based on the administrative division to which the target exit toll station and the accompanying exit toll station belong. The geographical distance to the entrance is calculated based on the latitude and longitude coordinates of the target entrance toll station and the accompanying entrance toll station; the geographical distance to the exit is calculated based on the latitude and longitude coordinates of the target exit toll station and the accompanying exit toll station. The entrance weight level of the candidate accompanying vehicle is calculated based on the entrance administrative division weight and the entrance geographical distance; the exit weight level of the candidate accompanying vehicle is calculated based on the exit administrative division weight and the exit geographical distance. Based on the entrance weight level of the candidate accompanying vehicle, the weight of the target entrance toll station, and the weight of the accompanying entrance toll station, the spatial overlap of the entrance toll station is calculated. Based on the exit weight level of the candidate accompanying vehicle, the weight of the target exit toll station, and the weight of the accompanying exit toll station, the spatial overlap of the exit toll station is calculated. The entry time difference between the target vehicle entering the target entrance toll station and the candidate accompanying vehicle entering the accompanying entrance toll station is obtained; the exit time difference between the target vehicle exiting the target exit toll station and the candidate accompanying vehicle exiting the accompanying exit toll station is obtained. Based on the entrance time difference and the preset maximum entrance time difference, calculate the time overlap of the entrance toll station; based on the exit time difference and the preset maximum exit time difference, calculate the time overlap of the exit toll station. The spatiotemporal overlap of the entrance toll station is calculated based on the spatial overlap and temporal overlap of the entrance toll station. Similarly, the spatiotemporal overlap of the exit toll station is calculated based on the spatial overlap and temporal overlap of the exit toll station. The step of calculating the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle on a single trip on the highway based on the spatial overlap of the gantry and the spatiotemporal overlap of the toll station includes: Preset adaptive parameters are obtained for the spatial overlap of the gantry, the spatiotemporal overlap of the entrance toll station, and the spatiotemporal overlap of the exit toll station, respectively. Based on the gantry spatial overlap, the entrance toll station spatiotemporal overlap, and the exit toll station spatiotemporal overlap, as well as their respective preset adaptive parameters, the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on a single trip on the highway is calculated.
2. The method for calculating the vehicle accompaniment degree on highways according to claim 1, characterized in that, The vehicle traffic data for the expressway includes traffic data and spatial location information at entrance toll stations, traffic data and spatial location information at exit toll stations, and gantry traffic data. The preprocessing of the expressway traffic data to obtain preprocessed traffic data includes: The expressway is abstracted as a directed graph, and a national expressway network is constructed based on the directed graph and each node. Based on the traffic flow data of the national expressway network within a preset time period, the probability of passage between any two nodes in the national expressway network is calculated, and a transition probability matrix is formed. The missing nodes in the traffic data that lack the traffic data and spatial location information of the entrance toll station are formed into a directed sequence, and each missing node in the directed sequence is matched to the corresponding node of the national expressway network to obtain the matching confidence of each missing node. Using the transition probability matrix and the matching confidence of each missing node, the hidden state sequence is derived from the end point of the directed sequence. The starting point of the hidden state sequence is used as the entrance toll station passage data and spatial location information that each missing node needs to be interpolated, thus obtaining the preprocessed passage data.
3. The method for calculating the vehicle accompaniment degree on highways according to claim 1, characterized in that, Assigning corresponding weights to each node on the highway involved in the traffic data of the target vehicle and the candidate accompanying vehicles includes: Set constraints, and assign corresponding weights to each node on the highway involved in the passage data of the target vehicle and the candidate accompanying vehicles according to the constraints. The constraints include that the weights of the entrance toll station and the exit toll station are equal, and that the weights of the entrance toll station and the exit toll station are greater than or equal to the weight of any of the gantries. The sum of the weights of the entrance toll station, the exit toll station and each gantry is 1, and the weight of each gantry is positively correlated with the mileage it represents.
4. The method for calculating the vehicle accompaniment degree on highways according to claim 3, characterized in that, The step of calculating the gantry space overlap degree of the target vehicle and the candidate accompanying vehicles on the highway based on the traffic data of the target vehicle and the candidate accompanying vehicles and the weights of each node includes: Obtain the target gantry sequence of the target vehicle's travel path from the traffic data of the target vehicle, and obtain the accompanying gantry sequence of the candidate accompanying vehicle's travel path from the traffic data of the candidate accompanying vehicle. Obtain the weights of each gantry in the target gantry sequence to form a target gantry weight sequence; Determine whether there are any overlapping gantry sequences between the target gantry sequence and the accompanying gantry sequence; If they exist, each gantry in the target gantry sequence is assigned a corresponding preset value, and the gantry space overlap between the target vehicle and the candidate accompanying vehicle on the highway is calculated based on the preset value and weight of each gantry in the target gantry sequence. If not, the overlap between the target vehicle and the candidate accompanying vehicle in the gantry space on the highway is determined to be 0.
5. The method for calculating the vehicle accompaniment degree on highways according to claim 1, characterized in that, The calculation of the co-occurrence degree of the target vehicle and the candidate accompanying vehicle on multiple trips on the highway based on the spatiotemporal co-occurrence degree of a single trip on the highway includes: Obtain the number of times the candidate accompanying vehicle appears as a candidate accompanying vehicle in multiple trips; The spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on the highway is calculated based on the spatiotemporal accompaniment degree of each single trip of the target vehicle and the candidate accompanying vehicle on multiple trips on the highway and the number of occurrences.
6. A device for calculating the vehicle accompaniment distance on highways, characterized in that, The device includes: The preprocessing module is used to preprocess the vehicle traffic data of the highway to obtain preprocessed traffic data. The acquisition module is used to acquire the traffic data of the target vehicle from the preprocessed traffic data, and determine the traffic data of the candidate accompanying vehicles based on the time and location of the target vehicle entering and exiting the highway. The weighting module is used to assign a corresponding weight to each node on the highway involved in the passage data of the target vehicle and the candidate accompanying vehicles. The nodes include entrance toll stations, exit toll stations and multiple gantries. The first calculation module is used to calculate the gantry space overlap degree of the target vehicle and the candidate accompanying vehicle on the highway based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node. The second calculation module is used to calculate the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle at toll stations on the highway based on the passage data of the target vehicle and the candidate accompanying vehicle and the weight of each node. The third calculation module is used to calculate the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle on the highway for a single trip based on the spatial overlap of the gantry and the spatiotemporal overlap of the toll station, and to select the optimal accompanying vehicle for a single trip from the candidate accompanying vehicles based on the spatiotemporal overlap of the single trip. The fourth calculation module is used to calculate the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on the highway for multiple trips based on the spatiotemporal accompaniment degree of a single trip on the highway, and to select the optimal accompanying vehicle for multiple trips from the candidate accompanying vehicles based on the spatiotemporal accompaniment degree of multiple trips. The spatiotemporal overlap of toll stations includes the spatiotemporal overlap of entrance toll stations and the spatiotemporal overlap of exit toll stations. The calculation of the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicles at toll stations on the highway, based on the passage data of the target vehicle and the candidate accompanying vehicles and the weights of each node, includes: Obtain the target toll station sequence of the target vehicle's travel path from the target vehicle's traffic data, and obtain the accompanying toll station sequence of the candidate accompanying vehicle's travel path from the candidate accompanying vehicle's traffic data. Obtain the weights of the target entrance toll station and the target exit toll station in the target toll station sequence to form a target toll station weight sequence; obtain the weights of the accompanying entrance toll station and the accompanying exit toll station in the accompanying toll station sequence to form an accompanying toll station weight sequence. Using preset rules, an entrance administrative division weight is set based on the administrative division to which the target entrance toll station and the accompanying entrance toll station belong; using the same preset rules, an exit administrative division weight is set based on the administrative division to which the target exit toll station and the accompanying exit toll station belong. The geographical distance to the entrance is calculated based on the latitude and longitude coordinates of the target entrance toll station and the accompanying entrance toll station; the geographical distance to the exit is calculated based on the latitude and longitude coordinates of the target exit toll station and the accompanying exit toll station. The entrance weight level of the candidate accompanying vehicle is calculated based on the entrance administrative division weight and the entrance geographical distance; the exit weight level of the candidate accompanying vehicle is calculated based on the exit administrative division weight and the exit geographical distance. Based on the entrance weight level of the candidate accompanying vehicle, the weight of the target entrance toll station, and the weight of the accompanying entrance toll station, the spatial overlap of the entrance toll station is calculated. Based on the exit weight level of the candidate accompanying vehicle, the weight of the target exit toll station, and the weight of the accompanying exit toll station, the spatial overlap of the exit toll station is calculated. The entry time difference between the target vehicle entering the target entrance toll station and the candidate accompanying vehicle entering the accompanying entrance toll station is obtained; the exit time difference between the target vehicle exiting the target exit toll station and the candidate accompanying vehicle exiting the accompanying exit toll station is obtained. Based on the entrance time difference and the preset maximum entrance time difference, calculate the time overlap of the entrance toll station; based on the exit time difference and the preset maximum exit time difference, calculate the time overlap of the exit toll station. The spatiotemporal overlap of the entrance toll station is calculated based on the spatial overlap and temporal overlap of the entrance toll station. Similarly, the spatiotemporal overlap of the exit toll station is calculated based on the spatial overlap and temporal overlap of the exit toll station. The step of calculating the spatiotemporal overlap of the target vehicle and the candidate accompanying vehicle on a single trip on the highway based on the spatial overlap of the gantry and the spatiotemporal overlap of the toll station includes: Preset adaptive parameters are obtained for the spatial overlap of the gantry, the spatiotemporal overlap of the entrance toll station, and the spatiotemporal overlap of the exit toll station, respectively. Based on the gantry spatial overlap, the entrance toll station spatiotemporal overlap, and the exit toll station spatiotemporal overlap, as well as their respective preset adaptive parameters, the spatiotemporal accompaniment degree of the target vehicle and the candidate accompanying vehicle on a single trip on the highway is calculated.
7. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the highway vehicle accompaniment measurement method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the highway vehicle accompaniment measurement method according to any one of claims 1-5.
Citation Information
Patent Citations
Modularity degree optimization-based automatic detection method of ground public-transport stealing group
CN108009690A
Method and device for determining companion vehicle
CN108932839A
Space-time trajectory accompanying analysis method and system, electronic equipment and storage medium
CN112000736A
Vehicle trajectory prediction method, system and device and storage medium
CN118840856A