Pedestrian-vehicle track matching method, system and device, storage medium and program product
By constructing multi-level position index and dynamic prediction, identifying the spatial characteristics of the human-vehicle trajectory, the problem of low matching efficiency and accuracy of human-vehicle trajectory in the prior art is solved, and efficient and accurate matching of human-vehicle trajectory is achieved.
Patent Information
- Application Number
- CN202510670799.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-29
AI Technical Summary
In the prior art, the efficiency and accuracy of human-vehicle trajectory matching are relatively low, especially in the case of large-scale massive data, and the existing one-by-one search methods take a long time and have low accuracy.
By identifying the spatial characteristics of the human-vehicle trajectory, a multi-level position index is constructed, including the spatial position range and operating angle, and a multi-level position index is used to perform human-vehicle trajectory matching detection, combining dynamic prediction and grid retrieval priority setting, irrelevant or mismatched human-vehicle trajectory is selected.
It significantly improves the search efficiency and accuracy of human-vehicle trajectory matching, solves the missed detection problem caused by the boundary effect brought about by index grid, and improves the matching accuracy in large-scale massive data.
Smart Images

Figure CN120561607A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data processing technology, and in particular to a method, system, device, storage medium, and program product for matching human and vehicle trajectories. Background Art
[0002] As the automotive industry rapidly develops towards informatization and intelligence, the Internet of Vehicles (IoV) card, as the central device for connecting vehicles to mobile networks, plays a vital role in building the IoV network. It can provide a range of network services, such as collecting data such as vehicle location and IoV card data usage to build a platform for functions and services. Furthermore, the real-name registration requirement for IoV cards and the need for refined marketing by automakers make the human-vehicle location matching function highly relevant. In the context of IoV card real-name registration and automaker marketing, human-vehicle location matching can help resolve authentication issues for IoV cards without real-name registration and enable targeted marketing. However, current existing technologies for human-vehicle location matching primarily rely on a one-by-one search and matching method, which suffers from inefficiencies, time-consuming processes, and low accuracy. Summary of the Invention
[0003] The main purpose of this application is to provide a method, system, device, storage medium and program product for matching human and vehicle trajectories, aiming to solve the technical problem of how to improve the efficiency and accuracy of human and vehicle trajectory matching.
[0004] To achieve the above objectives, the present application proposes a method for matching human and vehicle trajectories, which includes:
[0005] Identify the spatial characteristics of human and vehicle trajectories based on the collected human and vehicle trajectory data;
[0006] Constructing a multi-level location index based on the spatial characteristics of the human and vehicle trajectories;
[0007] According to the multi-level position index, human and vehicle trajectory matching detection is performed.
[0008] In one embodiment, the spatial characteristics of the human-vehicle trajectory include a spatial position range and a running angle. The step of identifying the spatial characteristics of the human-vehicle trajectory based on the collected human-vehicle trajectory data includes:
[0009] The collected human and vehicle trajectory data are divided according to the preset time index, and a spatial location point set is constructed based on the divided human and vehicle trajectory data;
[0010] The spatial position range and running angle of the human-vehicle trajectory are determined based on the spatial position point set.
[0011] In one embodiment, the human-vehicle trajectory data includes human-vehicle trajectory position points, and the step of constructing a spatial position point set based on the divided human-vehicle trajectory data includes:
[0012] Sort the divided human and vehicle trajectory points in chronological order to form an initial spatial position point set;
[0013] Using the position of each person-vehicle trajectory position point in the initial spatial position point set as the center of the circle and the preset radius threshold as the radius to draw a circle to obtain the corresponding target circle;
[0014] Based on the target circle and the human-vehicle trajectory position points, noise points in the initial spatial position point set are deleted to obtain a final spatial position point set.
[0015] In one embodiment, the step of deleting noise points in the initial spatial position point set based on the target circle and the human-vehicle trajectory position points to obtain a final spatial position point set includes:
[0016] In the initial spatial position point set, checking whether the human-vehicle trajectory position points at adjacent times are located in adjacent target circles of the target circle where the human-vehicle trajectory position points are located;
[0017] If not, it is determined that the human-vehicle trajectory position point is a noise point, and the human-vehicle trajectory position point is deleted from the initial spatial position point set.
[0018] In one embodiment, the spatial features include a spatial position range and a running angle, the multi-level position index includes at least a first-level spatial index and a second-level spatial index, and the method for constructing a multi-level position index based on the spatial features of the human-vehicle trajectory includes:
[0019] Constructing the spatial first-level index according to the spatial position range; and
[0020] The spatial second-level index is constructed according to the operating angle.
[0021] In one embodiment, the step of constructing the spatial first-level index according to the spatial position range in the spatial position point set includes:
[0022] Determine the person-vehicle trajectory position points corresponding to the minimum and maximum values of longitude and latitude in the set of spatial position points;
[0023] Based on the minimum and maximum values of the longitude and latitude corresponding to the human and vehicle trajectory position points, four boundary values are obtained;
[0024] quantizing the four boundary values to obtain four gridded quantized values corresponding to the four boundary values;
[0025] The four gridded quantized values are hashed to generate a spatial position range index of the human-vehicle trajectory, and the spatial position range index of the human-vehicle trajectory is used as the first-level spatial index.
[0026] In one embodiment, the step of constructing the spatial second-level index according to the running angle of the spatial position point set includes:
[0027] Set the quantized value of the running angle of the human and vehicle trajectory;
[0028] According to the quantized value of the human-vehicle trajectory running angle, the spatial position point set in the original coordinate system is rotated to obtain the spatial position point set in the new rotated coordinate system;
[0029] Calculating the position range boundaries of the spatial position point set in the new rotating coordinate system and the coverage area of the human-vehicle trajectory at each quantized operating angle;
[0030] The spatial second-level index is constructed based on the position range boundary and the human and vehicle trajectory coverage area.
[0031] In one embodiment, the step of performing human-vehicle trajectory matching detection based on the multi-level position index includes:
[0032] Predicting a person-vehicle trajectory based on the spatial first-level index and the spatial second-level index to obtain a predicted person-vehicle trajectory result;
[0033] Based on the predicted human and vehicle trajectory results, human and vehicle trajectory matching detection is performed.
[0034] In one embodiment, the step of performing human-vehicle trajectory prediction based on the spatial first-level index and the spatial second-level index to obtain a predicted human-vehicle trajectory result includes:
[0035] Combined with the speed and acceleration of the historical trajectory of the person and vehicle, the trajectory of the person and vehicle is predicted within a preset time period to obtain the predicted trajectory result.
[0036] In one embodiment, after the step of predicting the trajectory of the person and vehicle within a preset time period based on the speed and acceleration of the historical trajectory of the person and vehicle and obtaining the predicted trajectory result of the person and vehicle, the following steps are included:
[0037] Determining whether the predicted human and vehicle trajectory result exceeds the range of the first-level spatial index and the second-level spatial index;
[0038] If it exceeds, return to the execution step: construct the first-level spatial index according to the spatial position range;
[0039] If not, the step of performing a human-vehicle trajectory matching detection based on the predicted human-vehicle trajectory result is executed.
[0040] In one embodiment, the step of performing human-vehicle trajectory matching detection based on the predicted human-vehicle trajectory result includes:
[0041] According to a preset search priority and search order, adjacent spatiotemporal trajectory indexes corresponding to the spatial first-level index and the spatial second-level index are detected respectively, and human-vehicle trajectory matching detection is performed in the same and adjacent spatiotemporal trajectory indexes.
[0042] In one embodiment, before the step of detecting adjacent spatiotemporal trajectory indexes corresponding to the spatial first-level index and the spatial second-level index respectively according to a preset adjacent search priority and search order, the step includes:
[0043] According to adjacent quantized values of the four spatial boundary values in the spatial first-level index, setting the adjacent search priority and search order corresponding to the spatial first-level index; and
[0044] According to the quantized value of the running angle in the spatial second-level index, the adjacent search priority and search order corresponding to the spatial second-level index are set.
[0045] In one embodiment, the steps of detecting adjacent spatiotemporal trajectory indexes corresponding to the spatial first-level index and the spatial second-level index according to a preset search priority and search order, and performing human-vehicle trajectory matching detection in the same and adjacent spatiotemporal trajectory indexes include:
[0046] Searching according to the adjacent search priority and search order corresponding to the first-level spatial index to determine the spatial position range of at least one person-vehicle trajectory;
[0047] Within the same spatial position range of the human and vehicle trajectory, the search is continued according to the adjacent search priority and search order corresponding to the second-level spatial index until a matching human and vehicle trajectory is found, and the search is stopped.
[0048] In addition, to achieve the above objectives, the present application also proposes a human-vehicle trajectory matching system, which includes:
[0049] A recognition module is used to identify the spatial characteristics of the human and vehicle trajectories based on the collected human and vehicle trajectory data;
[0050] A construction module, configured to construct a multi-level location index based on the spatial features of the person and vehicle trajectories;
[0051] The matching module is used to perform human-vehicle trajectory matching detection based on the multi-level position index.
[0052] In addition, to achieve the above-mentioned purpose, the present application also proposes a human-vehicle trajectory matching device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the human-vehicle trajectory matching method described above.
[0053] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by the processor, the steps of the human-vehicle trajectory matching method described above are implemented.
[0054] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the human-vehicle trajectory matching method as described above.
[0055] This application proposes a method, system, device, storage medium, and program product for matching human and vehicle trajectories. The method includes identifying the spatial characteristics of human and vehicle trajectories based on collected human and vehicle trajectory data; constructing a multi-level position index based on the spatial characteristics of the human and vehicle trajectories; and performing human and vehicle trajectory matching detection based on the multi-level position index. This method constructs a multi-level position index based on the spatial characteristics of the human and vehicle trajectories and performs human and vehicle trajectory matching detection based on the multi-level position index, effectively improving the search efficiency and accuracy of human and vehicle trajectory matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0058] Figure 1 A flow chart of the first embodiment of the vehicle trajectory matching method provided by the applicant;
[0059] Figure 2 This is a schematic diagram of detecting and deleting noise points in the trajectory of a person or vehicle involved in the second embodiment of the present application;
[0060] Figure 3 A schematic diagram of the spatial position range index of the human and vehicle trajectories involved in the first embodiment of the present application;
[0061] Figure 4This is a schematic diagram of the quantized operating angle coordinate coefficients involved in the first embodiment of the present application;
[0062] Figure 5 A schematic diagram of the topological structure of the multi-level location index system involved in the first embodiment of the present application;
[0063] Figure 6 A flow chart of the second embodiment of the vehicle trajectory matching method provided by the applicant;
[0064] Figure 7 A schematic diagram of a simplified process of the human-vehicle trajectory matching method provided in Example 1 of the present application;
[0065] Figure 8 This is a schematic diagram of the module structure of the human-vehicle trajectory matching system according to an embodiment of the present application;
[0066] Figure 9 Schematic diagram of the device structure of the hardware operating environment involved in the human-vehicle trajectory matching method in the embodiment of the present application.
[0067] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0068] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0069] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0070] The main solution of the embodiment of the present application is: identifying the spatial characteristics of the human and vehicle trajectories based on the collected human and vehicle trajectory data; constructing a multi-level position index based on the spatial characteristics of the human and vehicle trajectories; and performing human and vehicle trajectory matching detection based on the multi-level position index.
[0071] In this embodiment, for ease of description, the following description is made with the human-vehicle trajectory matching system as the execution body.
[0072] The current state of the art for matching human and vehicle trajectories relies primarily on a one-by-one search and matching method, which is inefficient and time-consuming, especially when dealing with large amounts of human and vehicle trajectory data. Improving the efficiency of human and vehicle trajectory matching retrieval using a spatiotemporal indexing approach inevitably involves gridding spatial locations. This gridding of geographic locations inevitably introduces boundary effects, meaning that points that are very close in space belong to different grids, and the index values of these different grids are discontinuous or even vary significantly. The originally matched human and vehicle trajectories do not completely overlap, causing the matched human and vehicle trajectories to fall into different spatiotemporal indexes, leading to missed detections and reduced accuracy in human and vehicle trajectory matching.
[0073] This application provides a solution to construct a multi-level position index based on the spatial position range index and the running angle index of the human and vehicle trajectories, thereby solving the missed detection problem caused by the boundary effect brought about by the index gridding and improving the accuracy of human and vehicle trajectory matching. By utilizing the uniqueness of the human and vehicle trajectories in the spatial position range and running angle, it is possible to efficiently screen out irrelevant or unmatched human and vehicle trajectories, significantly improving the retrieval efficiency in large-scale massive data. In addition, by dynamically predicting human and vehicle trajectories and introducing the priority setting of grid retrieval, a higher priority is set for grids with a high probability of hitting, thereby improving the efficiency of retrieval on the basis of solving the missed detection problem.
[0074] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions. The following uses a personal computer as an example to illustrate this embodiment and the following embodiments.
[0075] Based on this, the embodiment of the present application provides a method for matching human and vehicle trajectories. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the applicant's vehicle trajectory matching method.
[0076] In this embodiment, the human-vehicle trajectory matching method includes steps S10 to S30:
[0077] Step S10, identifying spatial features of the human and vehicle trajectories based on the collected human and vehicle trajectory data;
[0078] It should be noted that human and vehicle trajectory data is information about the movement of people or vehicles collected through various sensors, GPS devices or other positioning technologies, including but not limited to timestamps, human and vehicle trajectory location points (at least including accuracy, latitude and altitude, etc.), speed and direction, and other information.
[0079] The spatial characteristics of a person-vehicle trajectory include at least spatial location range and movement angle. Spatial location range refers to the geographic boundaries of an object (such as a vehicle or pedestrian)'s activity area or path in geographic space. Specifically, it can be defined by a geographic coordinate system (such as longitude and latitude). This area can be a point, a line (representing a movement path), a polygon (representing an activity area), or other spatial geometric shapes.
[0080] The running angle refers to the directional characteristics of a moving object (such as a vehicle or pedestrian) on its moving path. It is usually calculated in a clockwise direction based on the angle between the forward direction and the north direction at any point in the trajectory.
[0081] In a feasible embodiment, step S10 may include steps S11 to S12:
[0082] Step S10: dividing the collected human and vehicle trajectory data according to a preset time index, and constructing a spatial position point set based on the divided human and vehicle trajectory data;
[0083] It should be noted that a spatial location point set is a collection of spatial location points extracted from the human and vehicle trajectory data. Each point represents the specific location of an object at a specific moment. By dividing and aggregating the human and vehicle trajectory data over consecutive time periods, a spatial location point set representing the object's movement path is formed.
[0084] Specifically, in this embodiment, the massive amount of human and vehicle trajectory data obtained is first time-indexed according to certain rules, and the human and vehicle trajectory data is divided according to the set time index to obtain an initial set of spatial position points. The time index is set according to certain rules and is performed according to various standards, depending on the requirements of the application scenario. For example:
[0085] Divide by day: This is suitable for situations where you need to analyze the activity patterns of people and vehicles on a daily basis. Each independent day is used as a time index unit to facilitate the processing and comparison of daily data.
[0086] Hourly division: Each hour is used as an independent time period. This method is suitable for scenarios such as traffic flow monitoring and peak hour analysis.
[0087] Split by event or activity period: Set time index based on specific events (such as sporting events, concerts) or activity periods (such as work week and weekend).
[0088] The massive amount of human and vehicle trajectory data is divided according to the preset time index, and the human and vehicle trajectory matching can only occur within the same time index.
[0089] Furthermore, due to weak GPS (Global Positioning System) signals or deviations in signal positions such as WiFi (wireless network) and Cell (cellular data), significant positional errors may exist in the set of human-vehicle trajectory points. This can cause the spatial profile of the entire trajectory to deviate significantly from the actual trajectory, affecting the accuracy of subsequent human-vehicle trajectory matching. Therefore, this step also requires removing any significant positional drift points that may exist in the initial spatial position point set as noise points to ensure the temporal and spatial continuity of the human-vehicle trajectory and further construct the spatial position point set.
[0090] The detection of noise points in pedestrian and vehicle trajectories can adopt traditional spatial location point clustering algorithms, such as k-means, DBSCAN (Density-Based Spatial Clustering of Applications with Noise, density-based spatial clustering algorithm), etc. Since pedestrian and vehicle trajectories have continuity in both time and space, the pedestrian and vehicle trajectory point set can be constructed into an ordered spatial location point set in chronological order, and cluster detection can be performed in this ordered spatial location point set in sequence. In this way, the detection of noise points in pedestrian and vehicle trajectories can be completed after one cycle, without the need for the large amount of data calculation brought about by the frequent iterative cycles in traditional spatial location point clustering algorithms. This embodiment uses the DBSCAN algorithm as an example to explain the noise point detection in pedestrian and vehicle trajectories in detail.
[0091] Specifically, first, the human and vehicle trajectory position point sets are arranged in time sequence to form an orderly arranged spatial position point set.
[0092] Then, a radius threshold R is set, where the radius threshold R is used as the distance threshold for spatial clustering. Subsequently, according to the time sequence of the spatial position point set, a circle is drawn with the position of the spatial position point set as the circle center and the radius threshold R as the radius to obtain multiple target circles.
[0093] Next, it is detected whether the human and vehicle trajectory position points that are adjacent in time fall into the adjacent target circle of the target circle where the human and vehicle trajectory position point is located. If the human and vehicle trajectory position point falls into the adjacent target circle of the target circle where it is located, it is considered that the human and vehicle trajectory position point is not a noise point and belongs to the spatial position point set; if the human and vehicle trajectory position point does not fall into the adjacent target circle of the target circle where it is located, it is considered that the human and vehicle trajectory position point is a noise point and does not belong to the spatial position point set, and the human and vehicle trajectory position point is further deleted. Through this step, each human and vehicle trajectory position point in the ordered spatial position point set is detected and judged, so as to filter out the existing noise points and delete them from the spatial position point set. Figure 2 As shown, Figure 2Schematic diagram of noise point detection and deletion in human and vehicle trajectories, where the red dots are the noise points in the detected human and vehicle trajectories.
[0094] By dividing the human and vehicle trajectory data by preset time indexes through the above steps, we can effectively organize and manage large amounts of human and vehicle trajectory data, facilitating subsequent analysis and processing. By treating any large position drift points in the human and vehicle trajectory point set as noise points and removing them, we ensure the temporal and spatial continuity of the human and vehicle trajectory.
[0095] Step S11: determining the spatial position range and running angle of the human-vehicle trajectory based on the spatial position point set.
[0096] Specifically, after obtaining the denoised spatial position point set, the spatial position range and the running angle of the spatial position point set can be determined as the spatial characteristics of the human-vehicle trajectory.
[0097] Through the above steps, the spatial characteristics of the human and vehicle trajectories can be effectively extracted, providing basic data support for subsequent trajectory analysis, prediction and optimization.
[0098] Step S20: constructing a multi-level location index based on the spatial features of the human and vehicle trajectories;
[0099] It should be noted that the multi-level location index includes at least a spatial first-level index and a spatial second-level index. The spatial first-level index divides the entire geographic area into several smaller, fixed or dynamic sub-regions based on the location coordinates of the human and vehicle trajectory data. Each sub-region represents an index unit. The spatial second-level index further subdivides and organizes the trajectories based on the running angle information in the human and vehicle trajectory data.
[0100] In a feasible embodiment, step S20 may include steps S21 to S22:
[0101] Step S21, constructing a spatial first-level index according to the spatial position range;
[0102] It's worth noting that, because human and vehicle trajectories vary in length and spatial distribution, their spatial location range is a crucial characteristic. Furthermore, for temporally and spatially matched human and vehicle trajectories, their trajectories share the same or similar spatial location ranges. Therefore, using spatial location as a spatial index in this implementation allows filtering out the vast majority of temporally unrelated or mismatched human and vehicle trajectories from the vast amount of human and vehicle trajectory data. During the human and vehicle trajectory matching process, only human and vehicle trajectory data within the same or adjacent spatial location range indexes need to be detected, significantly improving the efficiency of the human and vehicle trajectory matching search.
[0103] In another feasible embodiment, step S21 may further include steps S211 to S214:
[0104] Step S211, determining the person and vehicle trajectory position points corresponding to the minimum and maximum values of longitude and latitude in the spatial position point set;
[0105] Specifically, traverse all the person and vehicle trajectory locations in the spatial location point set. Each record should contain at least a longitude and latitude value, representing the location at a specific point in time. Find the minimum and maximum longitude values. Note the trajectory location points corresponding to these two values. Similarly, for latitude, find its minimum and maximum values in the entire dataset and the specific trajectory location points corresponding to each.
[0106] Step S212, obtaining four boundary values based on the human-vehicle trajectory position points corresponding to the minimum and maximum values of the longitude and latitude;
[0107] It should be noted that the boundary values refer to the four coordinate values used to define the boundaries of the geographic area covered by the entire human and vehicle trajectory dataset. Specifically, these four boundary values define the minimum bounding box of the human and vehicle trajectory dataset in geographic space, ensuring that all trajectory points are located within this rectangular area.
[0108] Specifically, after obtaining the maximum and minimum values of longitude and latitude through step S111, the maximum and minimum values of longitude are used as the left and right boundaries, and the maximum and minimum values of latitude are used to determine the upper and lower boundaries, that is, the rectangular area formed by these four boundaries is used to frame the spatial position range of a person-vehicle trajectory.
[0109] Step S213, quantizing the four boundary values to obtain four gridded quantized values corresponding to the four boundary values;
[0110] Specifically, after determining the four boundary values of the spatial position range of the human-vehicle trajectory, the four boundary values are quantized to obtain gridded quantized values of the four boundary values.
[0111] For example, the four boundary values obtained are: minimum longitude lng_min = 113.432876, maximum longitude lng_max = 113.482278, minimum latitude lat_min = 22.31234, and maximum latitude lat_max = 22.376543. The quantization method used is to retain two decimal places for longitude and latitude, then round down the minimum longitude and latitude values and round up the maximum longitude and latitude values. After quantization, the four boundary values are: minimum longitude 113.43, maximum longitude 113.49, minimum latitude 22.31, and maximum latitude 22.38. The quantization step size corresponds to a grid size of approximately 1 km by 1 km.
[0112] Step S214 : hashing the four gridded quantized values to generate a spatial position range index of the human-vehicle trajectory, and using the spatial position range index of the human-vehicle trajectory as the first-level spatial index.
[0113] It should be noted that Geo-Hash is essentially a form of spatial indexing. Its basic principle is to understand the Earth as a two-dimensional plane and recursively decompose it into smaller sub-blocks. Each sub-block has the same code within a certain longitude and latitude range. Establishing a spatial index using Geo-Hash can improve the efficiency of longitude and latitude retrieval of spatial POI data.
[0114] Specifically, the four quantized boundary values are hashed to generate a spatial position index of the human and vehicle trajectory, and it is used as the first-level spatial index. In this embodiment, the specific method for generating the spatial position range index of the human and vehicle trajectory can be to directly concatenate the four quantized boundary values, or to use some existing commonly used hash generation methods, such as md5, sha256, etc., and use the generated hash value as the spatial position range index of the human and vehicle trajectory. Specifically, the spatial position range index of the human and vehicle trajectory is generated by direct string concatenation. Assuming that the four boundary values after quantization are: the minimum longitude value 113.43, the maximum longitude value 113.49, the minimum latitude value 22.31, and the maximum latitude value 22.38, the generated first-level spatial index value is "11343_11349_2231_2238". As shown Figure 3 As shown, Figure 3 Schematic diagram of the spatial position range index of the human-vehicle trajectory, where the black box represents the spatial position range of the human-vehicle trajectory, the two blue dots represent the quantized boundary points, and the spatial position range index of the human-vehicle trajectory is generated based on the positions of the two boundary points.
[0115] Through the above steps, a spatial first-level index is constructed based on the spatial location range of the spatial location point set. This can maximize the guarantee that the originally matched human and vehicle trajectories fall into the same or adjacent spatial indexes, filter out most irrelevant human and vehicle trajectories, and thus improve the search efficiency of human and vehicle trajectory matching.
[0116] Step S22: construct the second-level spatial index according to the running angle.
[0117] It should be noted that the establishment of the second-level spatial index is based on the completed first-level spatial index. By introducing the running angle to increase the dimension of the index, the movement patterns of people and vehicles can be described and analyzed more accurately.
[0118] It is worth noting that in addition to the spatial position range of the human-vehicle trajectory, the human-vehicle trajectory also has a certain directionality, that is, it runs along a certain spatial orientation angle. Therefore, the running angle of the human-vehicle trajectory is also an important feature of the human-vehicle trajectory. Using it as a position index, a second-level index above the human-vehicle trajectory spatial position range index, can further filter out irrelevant or mismatched human-vehicle trajectories, thereby improving the efficiency of human-vehicle trajectory matching search.
[0119] In another feasible embodiment, step S22 may further include steps S221 to S224:
[0120] Step S221, setting the quantized value of the human-vehicle trajectory running angle;
[0121] Specifically, the running angle range of the human-vehicle trajectory is 0-360 degrees, and a certain running angle quantization value is set within this range. For example, with 30 degrees as a quantization interval, the running angle of the human-vehicle trajectory is divided into 6 quantization values, namely 0, 30, 60, 90, 120 and 150. The specific quantized running angles are as follows Figure 4 As shown, Figure 4 Schematic diagram of quantized operating angle coordinate coefficients.
[0122] Step S222: performing coordinate rotation on the spatial position point set in the original coordinate system according to the quantized value of the human-vehicle trajectory running angle to obtain a spatial position point set in a new rotated coordinate system;
[0123] Specifically, the coordinates of the point set of the human-vehicle trajectory are rotated. That is, the coordinates of the point set of the human-vehicle trajectory in the original coordinate system are rotated according to the quantized value of the running angle, wherein the formula for coordinate rotation is:
[0124]
[0125] Wherein, x' represents the new horizontal coordinate obtained after the coordinate rotation, x represents the original horizontal coordinate before the coordinate rotation, y' represents the new vertical coordinate obtained after the coordinate rotation, y represents the original vertical coordinate before the coordinate rotation, cosθ represents the cosine value of the rotation angle θ, and sinθ represents the sine value of the rotation angle θ.
[0126] By using the above coordinate rotation formula, the coordinates (x, y) of each position point of the human-vehicle trajectory in the original coordinate system are converted to the coordinates (x', y') in the new rotated coordinate system.
[0127] Step S223, calculating the position range boundary of the spatial position point set in the new rotating coordinate system and the pedestrian and vehicle trajectory coverage area at each quantized running angle;
[0128] Specifically, first, calculate the position range boundaries of the position point set of the human and vehicle trajectory in the new rotating coordinate system, that is, the minimum and maximum values of the "longitude" (i.e., the x-axis direction) and the minimum and maximum values of the "latitude" (i.e., the y-axis direction) in the new rotating coordinate system. Based on the above four boundary values, calculate the coverage area S of the human and vehicle trajectory position point set in the new rotating coordinate system. The calculation formula is:
[0129] S=(max{y'}-min{y'})×(max{x'}-min{x'})
[0130] Wherein, x' represents the new horizontal coordinate obtained after the coordinate rotation, and y' represents the new vertical coordinate obtained after the coordinate rotation.
[0131] After obtaining the covered area S of the human-vehicle trajectory at each quantified running angle, find the minimum value among them, and the corresponding quantified running angle value is the running angle direction of the human-vehicle trajectory.
[0132] Step S224: construct the spatial second-level index based on the position range boundary and the area covered by the human and vehicle trajectories.
[0133] Specifically, after the implementation of step S33 and step S34, the trajectory of the person and the vehicle respectively constructs a spatial second-level index based on the spatial range boundary and the running angle. The topological structure of the secondary index system is as follows: Figure 5 As shown, Figure 5 Schematic diagram of the topological structure of the multi-level location index system.
[0134] Through the above steps, the running angle of the human-vehicle trajectory is introduced as a spatial index, and together with the spatial position range of the human-vehicle trajectory, a secondary index structure is constructed. This can maximize the guarantee that the originally matched human-vehicle trajectories fall into the same or similar spatial index, filter out most irrelevant human-vehicle trajectories, and improve the search efficiency of human-vehicle trajectory matching.
[0135] Step S30: performing human-vehicle trajectory matching detection based on the multi-level position index.
[0136] It is worth noting that because the multi-level position index can hierarchically organize the spatial features of the human-vehicle trajectory and rapidly locate the target area by gradually narrowing the search range, the execution of step S30 can significantly reduce the search space and computational complexity through the multi-level position index, effectively improving the search efficiency of human-vehicle trajectory matching. At the same time, by combining the hierarchical structure of the multi-level index with the trajectory prediction results, the spatiotemporal correlation analysis during the matching process is further optimized, thereby reducing the missed detection rate and improving matching accuracy.
[0137] In a feasible embodiment, step S30 may include steps S31 to S32:
[0138] Step S31, predicting the trajectory of the person and the vehicle based on the spatial first-level index and the spatial second-level index to obtain a predicted trajectory result of the person and the vehicle;
[0139] After completing step S20, this embodiment can effectively solve the boundary effect problem caused by spatial position gridding when processing large-scale human and vehicle trajectory data matching. However, this static spatial index structure has limitations in processing real-time updates of human and vehicle trajectory data. Given that the collection of human and vehicle trajectories is immediate, and the development, change, and turning of the trajectory are closely related to the previous running speed, direction angle and other characteristics, relying solely on static multi-level position indexes is difficult to quickly adapt to the rapid changes in the trajectory, which will cause the index to be frequently recalculated and adjusted. This not only wastes a lot of computing resources, but may also lead to instability of the entire index system.
[0140] Therefore, to address the challenges posed by dynamic changes in the trajectories of people and vehicles to multi-level location indexing, this embodiment enhances the adaptability of the indexing mechanism by predicting potential changes in the spatial index in advance. Specifically, in step S31, the system dynamically predicts the trajectories of people and vehicles in the future time period to ensure that the trajectory matching process is both continuous and accurate.
[0141] In a feasible embodiment, step S31 may include step S311:
[0142] Step S311 , combining the speed and acceleration of the historical trajectory of the person and the vehicle, predicting the trajectory of the person and the vehicle within a preset time period, and obtaining a predicted trajectory result of the person and the vehicle.
[0143] In terms of the specific technical implementation of predicting the trajectory of people and vehicles, this embodiment provides a variety of position trajectory prediction algorithms, such as spatiotemporal sliding window, Kalman filter, long-short term memory network (LSTM) based on machine learning, and adversarial generative network SeqGAN. The detailed operation steps are as follows:
[0144] Sliding window-based trajectory prediction for people and vehicles: Sliding window is a relatively simple and basic trajectory prediction method. Its basic principle is to introduce a time sliding window and use the historical trajectory in the time sliding window to predict the trajectory position at a certain point in the future through linear weighting. The specific weighting rule can be based on linear weight α-prediction or exponential weight β-prediction. The advantage of sliding window trajectory prediction is simple implementation and fast calculation, but this method is only applicable to the prediction of linear trajectories, and the farther the prediction time is from the sliding time window, the lower the prediction accuracy.
[0145] Dynamic human-vehicle trajectory prediction based on Kalman filtering: Kalman filtering is an algorithm that uses the linear system state equation to optimally estimate the system state through system input and output observation data. Since the observation data includes the influence of noise and interference in the system, the optimal estimation can also be regarded as a filtering process. Due to its excellent predictive effect in system state estimation, Kalman filtering is widely used in fields such as navigation and trajectory estimation. The basic principle of Kalman filtering is to obtain the optimal estimate of the system state from the output and input observation data based on the state space representation of the linear system, so as to minimize the power of noise and interference generated in the linear system state estimation. The Kalman filter is used to predict the future position of the vehicle or person, and the spatial position range of the index is adjusted in advance to reduce lag.
[0146] Trajectory prediction based on machine learning models: Currently, the LTSM network and SeqGAN network in machine learning models are both very effective for trajectory prediction. These two models or their improved models can be used to input historical location trajectories into the model and output the predicted trajectory position. This allows the model to learn the patterns of trajectory changes and automatically adjust the index update frequency and strategy.
[0147] In order to further optimize the efficiency and accuracy of the multi-level position index, in this embodiment, it is determined whether the multi-level position index needs to be adjusted based on the predicted human and vehicle trajectory results. Steps S311 to S313 may also be included after step S31:
[0148] Step S311, determining whether the predicted trajectory of the person or vehicle exceeds the range of the first-level spatial index and the second-level spatial index;
[0149] Specifically, based on the predicted trajectory of the person or vehicle in step S31, a determination is made as to whether the predicted trajectory exceeds the range of the constructed first-level spatial index and second-level spatial index. For example, if the predicted trajectory of the person or vehicle will enter a new geographic area in the future time period, and this area is not yet included in the existing spatial position range index, or if the predicted running angle exceeds the angle range covered by the current running angle index, then the predicted trajectory is considered to exceed the range of the existing index.
[0150] Step S312: If exceeded, return to the execution step: construct a spatial first-level index according to the spatial position range of the spatial position point set;
[0151] Specifically, if the predicted human and vehicle trajectory exceeds the range covered by the existing spatial position range index (spatial first-level index) and the running angle index (spatial second-level index), it is confirmed that the spatial first-level index and the spatial second-level index need to be adjusted, and the step of "constructing the spatial first-level index based on the spatial position range of the spatial position point set" is returned to be executed.
[0152] Step S313: If it does not exceed, then execute the step: based on the predicted human and vehicle trajectory results, perform human and vehicle trajectory matching detection.
[0153] If the predicted human and vehicle trajectory does not exceed the range covered by the existing spatial position range index (spatial first-level index) and the running angle index (spatial second-level index), it is confirmed that there is no need to adjust the spatial first-level index and the spatial second-level index, and the subsequent steps are continued.
[0154] Through the above steps, by combining a dynamic index update mechanism with real-time prediction, we can not only effectively solve the challenges faced by static index structures when processing dynamically changing trajectories, but also further improve the flexibility, responsiveness, and large-scale data processing capabilities of the entire index system.
[0155] Step S32: performing a human-vehicle trajectory matching detection based on the predicted human-vehicle trajectory result.
[0156] It is worth noting that since the spatial indexing of human and vehicle trajectories will inevitably introduce the gridding of positions, no matter which position gridding method is used, there will be a boundary effect, that is, two position points that are relatively close in geographical space are located in different grids, and even the index values of the grids are very different, which makes it difficult to search for human and vehicle trajectories. In addition, even for the trajectories of matched people and vehicles, their trajectory position point sets are not exactly the same. Therefore, when it comes to the multi-level position index system, the trajectories of matched people and vehicles do not fall into the same multi-level position index, but fall into similar multi-level position indexes. If only the same multi-level position index is searched, the matching of human and vehicle trajectories will be missed, that is, the originally matched human and vehicle trajectories will not be searched out. Therefore, step S40 is executed to detect the adjacent spatiotemporal trajectory indexes to make up for the problem of missed matching of human and vehicle trajectories caused by the boundary effect.
[0157] In a feasible implementation, step S32 may include step S321:
[0158] In step S321 , adjacent spatiotemporal trajectory indexes corresponding to the spatial first-level index and the spatial second-level index are detected respectively according to the preset search priority and search order, and a human-vehicle trajectory matching detection is performed in the same and adjacent spatiotemporal trajectory indexes.
[0159] It should be noted that a spatiotemporal trajectory index is a composite index structure that combines spatial position, direction (angle), and time. Its core is to divide the three-dimensional space (longitude, latitude, and time) into discrete spatiotemporal units (e.g., a space-time cube). Each unit includes, but is not limited to, information such as the spatial position range, the running angle range, and the time window.
[0160] The same spatiotemporal trajectory index refers to the index unit that exactly matches the spatiotemporal range of the predicted trajectory (the same spatial grid, angle interval, and time window).
[0161] Adjacent spatiotemporal trajectory indices are those that are directly adjacent to the spatiotemporal range of the predicted trajectory in space or time. For example, spatially adjacent refers to the upper, lower, left, right, or diagonal grids of the current grid; temporally adjacent refers to the time window before or after the predicted time period; and angularly adjacent refers to the adjacent angle intervals of the current angle interval (e.g., ±15°).
[0162] It's also important to note that the preset search priority refers to the weighting or prioritization rules for different dimensions (spatial position, travel angle, time) or different index levels (spatial first-level index, spatial second-level index) when searching the spatiotemporal trajectory index. It determines which dimension or level of index the system prioritizes within a multi-dimensional or multi-level index to maximize matching efficiency and accuracy.
[0163] In this embodiment, the priority of the spatial first-level index is generally higher than that of the spatial second-level index. For example, the system may first filter based on the spatial position range (such as grid unit) of the predicted trajectory, and then further narrow the matching range based on the angle range.
[0164] The preset search order refers to a specific search order rule for multiple candidate index units or dimensions at the same priority level.
[0165] In this embodiment, the search order for the first-level spatial index is to first search the same spatial position range as the predicted trajectory (such as the same grid cell), and then search the adjacent spatial position ranges (such as the upper, lower, left, and right grids). For the second-level spatial index, within the same spatial position range, the search order is to first search the same angle interval as the predicted trajectory (such as 0° to 45°), and then search the adjacent angle intervals (such as -15° to 0° or 45° to 90°).
[0166] Specifically, when operating according to the pre-set adjacent search priority and search order of the first-level spatial index and the second-level spatial index, the search rules of these two levels of spatial index are combined. This combination is as follows: First, the search priority and search order of the first-level spatial index (i.e., the spatial position range index of the person-vehicle trajectory) are applied to identify at least one spatial position range of the person-vehicle trajectory. Then, within the same spatial position range of the person-vehicle trajectory, the search is refined according to the search priority and search order of the second-level spatial index (i.e., the running angle index of the person-vehicle trajectory). Once a matching person-vehicle trajectory pair is found during the search process, the entire adjacent search process stops immediately.
[0167] Among them, the human-vehicle trajectory matching detection is performed in the same and adjacent spatiotemporal trajectory indexes. The trajectory matching detection can be performed through trajectory matching algorithms such as matching algorithms based on cosine similarity, matching algorithms based on position deviation, and matching algorithms based on spatiotemporal grid overlap.
[0168] Through the above steps, according to the preset adjacent search priority and search order, the same and adjacent spatiotemporal trajectory indices corresponding to the spatial first-level index and the spatial second-level index are searched, and the human-vehicle trajectory matching detection is performed in the same and adjacent spatiotemporal trajectory indices. This can effectively avoid the missed detection problem caused by the grid boundary effect of the spatial index, improve the success rate of human-vehicle trajectory matching, and also avoid the problem of too many adjacent searches and complex calculations.
[0169] Through the above-described method, the spatial characteristics of the person-vehicle trajectory are identified based on the collected trajectory data; a multi-level position index is constructed based on the spatial characteristics of the person-vehicle trajectory; the person-vehicle trajectory is predicted based on the multi-level position index to obtain a predicted person-vehicle trajectory result; and a person-vehicle trajectory matching detection is performed based on the predicted person-vehicle trajectory result. This method constructs a multi-level position index based on the spatial position range and trajectory angle of the person and vehicle trajectory, improving the search efficiency of the person-vehicle trajectory matching. At the same time, by dynamically predicting the person-vehicle trajectory, it reduces the missed detection rate and improves the matching accuracy.
[0170] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 6 Before step S321, the method further includes steps A321 to A322:
[0171] Step A321: setting the adjacent search priority and search order corresponding to the first-level spatial index according to the adjacent quantized values of the four spatial boundary values in the first-level spatial index;
[0172] For the adjacent search of the spatial position range index (spatial first-level index) of the human and vehicle trajectory, since the spatial position range index is determined by the four spatial boundary values, the adjacent index is also the quantized value adjacent to the four spatial boundary values. For example, the minimum longitude is 113.43, then the corresponding adjacent quantized values are 113.42 and 113.44, among which 113.42 is recorded as "-1", 113.44 is recorded as "+1", and the current index 113.43 is recorded as "0", then the adjacent search of each boundary value in the four spatial boundary values has three cases of "0", "-1", and "+1", which are divided into 81 cases in total after permutation and combination. However, searching for multiple cases in sequence will make the search volume very large. Therefore, this embodiment introduces the concept of search priority of the spatial first-level index, by setting a priority for each search scheme and searching in order from high to low according to the priority. During the search process, as long as a matching human and vehicle trajectory is found, no subsequent search will be performed, which greatly improves the efficiency of the adjacent search.
[0173] In this embodiment, the priority is set by the number of "0"s in the adjacent search scheme, and five priority levels are set: 1, 2, 3, 4, and 5, where 1 represents the highest priority and 5 represents the lowest priority. The search scheme for each priority is shown in Table 1 below:
[0174]
[0175] Table 1
[0176] Step A322: setting the adjacent search priority and search order corresponding to the spatial second-level index according to the quantized value of the running angle in the spatial second-level index.
[0177] For the adjacent search of the human-vehicle trajectory running angle index (spatial second-level index), since the human-vehicle trajectory running angle index is a quantized value of an angle, the adjacent index is also the adjacent quantized value of the running angle, that is, the running angle index is +30, then the adjacent quantized values are 0 and +60, among which the 0 angle is recorded as "-1", the +60 angle is recorded as "+1", and the current angle index +30 is recorded as "0", then the adjacent search of the running angle index has three cases of "0", "-1", and "+1", corresponding to two priorities, where "0" is a high priority and "-1" and "+1" are low priorities.
[0178] The method of this embodiment designs a priority-based adjacent spatiotemporal index retrieval algorithm. On the one hand, it can effectively solve the problem of missed detection of human-vehicle trajectory matching caused by the boundary effect brought about by the gridding of spatial position index, thereby improving the accuracy of human-vehicle trajectory matching retrieval. On the other hand, by setting the adjacent search priority, it assigns a higher priority to situations with high matching probability, while also avoiding the problem of too many adjacent searches and complex calculations, thereby improving the search efficiency of human-vehicle trajectory matching.
[0179] For example, in order to help understand the implementation process of the human-vehicle trajectory matching method obtained by combining the above-mentioned embodiment 1 and embodiment 2, please refer to Figure 7 , Figure 7 A brief flowchart of a human-vehicle trajectory matching method is provided. Specifically:
[0180] First, the massive amount of human and vehicle trajectory data is time-indexed according to a preset rule, and the trajectories are divided according to the set time index. The time index set according to a certain rule can be divided according to the day or other set time units.
[0181] Then, we use traditional spatial location point clustering algorithms, such as k-means and DBSCAN, to detect and remove noise from the divided human and vehicle trajectory data. Taking the DBSCAN algorithm as an example, specifically:
[0182] First, the point sets of the person-vehicle trajectory are sorted in chronological order to form an ordered set of spatial location points. A radius threshold R is set as the distance threshold for spatial location clustering. Then, a circle is drawn with the location of the spatial location point set as the center and the radius threshold R as the radius, following the chronological order of the spatial location point set, to obtain the target circle. Temporally adjacent points in the person-vehicle trajectory are checked to see if they fall within the target circle. If so, the point is considered non-noise and belongs to the set of spatial location points. Otherwise, the point is considered noise and does not belong to the set of spatial location points. Each point in the ordered set of spatial location points in the person-vehicle trajectory is tested and judged to filter out possible noise points and remove them from the person-vehicle trajectory. Finally, the processed set of spatial location points is obtained.
[0183] Next, four boundary values are determined based on the minimum and maximum longitude and latitude values of the spatial location point set. These boundary values are quantized to obtain the four quantized boundary values. The four quantized boundary values are hashed to generate the spatial position range index of the human and vehicle trajectory, which is the first-level spatial index.
[0184] On the basis of obtaining the first-level spatial index, the second-level spatial index is set and divided according to the running angle of the human-vehicle trajectory. First, the quantized value of the human-vehicle trajectory running angle is set. The running angle range of the human-vehicle trajectory is 0-360 degrees, and a certain running angle quantized value can be set within this range. Then, according to the quantized running angle quantized value, the position point set of the human-vehicle trajectory in the original coordinate system is rotated according to the quantized angle value to obtain the coordinates in the new rotated coordinate system. Next, the position range boundary of the spatial position point set in the new rotated coordinate system and the coverage area S of the human-vehicle trajectory at each quantized running angle are calculated. Finally, the second-level spatial index is constructed by combining the position range boundary of the spatial position point set in the new rotated coordinate system and the coverage area S of the human-vehicle trajectory at each quantized running angle.
[0185] After obtaining the spatial first-level index and the spatial second-level index, to prevent the static index system from being unable to quickly adapt to rapid changes in trajectories, which would lead to frequent index recalculation and adjustment, this would not only waste a large amount of computing resources but also make the entire human-vehicle trajectory index system unstable. Therefore, this embodiment also introduces a dynamic index update mechanism. By combining the dynamic characteristics of the human-vehicle historical trajectories, such as speed and acceleration, it predicts the human-vehicle trajectory in real time within a certain period of time, ensuring the continuity and accuracy of trajectory matching.
[0186] Once the predicted human and vehicle trajectory results are obtained, it is determined whether the predicted human and vehicle trajectory results exceed the range of the constructed multi-level position index. If so, the trajectory space index needs to be adjusted. Otherwise, it is considered that no adjustment is required.
[0187] Then, the corresponding search priority and search order are determined based on the four boundary values in the first-level spatial index. At the same time, the corresponding search priority and search order are determined based on the running angles of the human and vehicle trajectories in the second-level spatial index.
[0188] After setting the adjacent search priority and search order for the first-level spatial index and the second-level spatial index, the algorithm first identifies at least one spatial location range for a person or vehicle's trajectory based on the search priority and search order of the first-level spatial index. Then, within the same spatial location range index for a person or vehicle's trajectory, the algorithm searches for the person or vehicle's trajectory based on the search priority and search order of the second-level spatial index. The adjacent search stops as soon as a matching pair of person or vehicle trajectories is found.
[0189] The above-described method utilizes a multi-level position index structure based on the spatial position range index and the running angle index of the human-vehicle trajectory. This structure can leverage the unique spatial position range and running angle of the human-vehicle trajectory to filter out the vast majority of irrelevant or mismatched human-vehicle trajectories, significantly improving search efficiency in large-scale human-vehicle trajectory data. Furthermore, by introducing a grid search priority setting, grids with a high probability of hitting are given a higher priority, thereby improving search efficiency while addressing the problem of missed detections.
[0190] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the vehicle trajectory matching method of the present applicant. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0191] This application also provides a human-vehicle trajectory matching system, please refer to Figure 8 , the human-vehicle trajectory matching system includes:
[0192] Identification module 10, for identifying spatial features of human and vehicle trajectories based on the collected human and vehicle trajectory data;
[0193] A construction module 20 is used to construct a multi-level location index based on the spatial features of the human and vehicle trajectories;
[0194] The matching module 30 is used to perform human-vehicle trajectory matching detection based on the multi-level position index.
[0195] The human-vehicle trajectory matching system provided in this application, employing the human-vehicle trajectory matching method described in the aforementioned embodiment, can address the technical problem of improving the efficiency and accuracy of human-vehicle trajectory matching. Compared to the prior art, the beneficial effects of the human-vehicle trajectory matching system provided in this application are the same as those of the human-vehicle trajectory matching method described in the aforementioned embodiment. Other technical features of the human-vehicle trajectory matching system are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.
[0196] The present application provides a person-vehicle trajectory matching device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the person-vehicle trajectory matching method of the above-mentioned embodiment 1.
[0197] Reference below Figure 9 , which shows a schematic diagram of the structure of a person-vehicle trajectory matching device suitable for implementing the embodiments of the present application. The person-vehicle trajectory matching device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The human-vehicle trajectory matching device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0198] like Figure 9 As shown, the human-vehicle trajectory matching device may include a processing system 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory 1002 or programs loaded from a storage system 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the human-vehicle trajectory matching device. The processing system 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: an input system 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output system 1008 including, for example, a liquid crystal display (LCD), speakers, vibrator, etc.; a storage system 1003 including, for example, a magnetic tape, hard disk, etc.; and a communication system 1009. Communication system 1009 can allow the vehicle-vehicle trajectory matching device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a vehicle-vehicle trajectory matching device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have alternatively.
[0199] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication system, or installed from a storage system 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing system 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.
[0200] The human-vehicle trajectory matching device provided in this application utilizes the human-vehicle trajectory matching method described in the aforementioned embodiment, solving the technical problem of improving the efficiency and accuracy of human-vehicle trajectory matching. Compared to the prior art, the beneficial effects of the human-vehicle trajectory matching device provided in this application are the same as those of the human-vehicle trajectory matching method described in the aforementioned embodiment. Other technical features of this human-vehicle trajectory matching device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.
[0201] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any at least one embodiment or example.
[0202] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0203] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the human-vehicle trajectory matching method in the above embodiment.
[0204] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection having at least one wire, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0205] The computer-readable storage medium may be included in the human-vehicle trajectory matching device; or it may exist independently without being assembled into the human-vehicle trajectory matching device.
[0206] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the person-vehicle trajectory matching device, the person-vehicle trajectory matching device: constructs a multi-level position index based on the collected person-vehicle trajectory data and the spatial features of the person-vehicle trajectory data; and performs person-vehicle trajectory matching detection based on the multi-level position index.
[0207] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0208] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code includes at least one executable instruction for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0209] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0210] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned human-vehicle trajectory matching method. This computer-readable storage medium addresses the technical problem of improving the efficiency and accuracy of human-vehicle trajectory matching. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the human-vehicle trajectory matching method provided in the aforementioned embodiment, and are not further elaborated here.
[0211] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned human-vehicle trajectory matching method when executed by a processor.
[0212] The computer program product provided in this application can solve the technical problem of how to improve the efficiency and accuracy of human-vehicle trajectory matching. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the human-vehicle trajectory matching method provided in the above embodiment, and will not be repeated here.
[0213] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for matching human and vehicle trajectories, characterized in that: The human-vehicle trajectory matching method includes: Identify the spatial characteristics of human and vehicle trajectories based on the collected human and vehicle trajectory data; Constructing a multi-level location index based on the spatial characteristics of the human and vehicle trajectories; Based on the multi-level position index, human and vehicle trajectory matching detection is performed.
2. The human-vehicle trajectory matching method according to claim 1, characterized in that: The spatial characteristics of the human-vehicle trajectory include a spatial position range and a running angle. The step of identifying the spatial characteristics of the human-vehicle trajectory based on the collected human-vehicle trajectory data includes: The collected human and vehicle trajectory data are divided according to the preset time index, and a spatial location point set is constructed based on the divided human and vehicle trajectory data; The spatial position range and running angle of the human-vehicle trajectory are determined based on the spatial position point set.
3. The human-vehicle trajectory matching method according to claim 2, characterized in that: The human-vehicle trajectory data includes human-vehicle trajectory position points, and the step of constructing a spatial position point set based on the divided human-vehicle trajectory data includes: Sort the divided human and vehicle trajectory points in chronological order to form an initial spatial position point set; Using each person-vehicle trajectory position point in the initial spatial position point set as the circle center and the preset radius threshold as the radius to draw a circle to obtain the corresponding target circle; Based on the target circle and the human-vehicle trajectory position points, noise points in the initial spatial position point set are deleted to obtain a final spatial position point set.
4. The method according to claim 3, wherein The step of deleting noise points in the initial spatial position point set based on the target circle and the human-vehicle trajectory position points to obtain a final spatial position point set includes: In the initial spatial position point set, checking whether the human-vehicle trajectory position points at adjacent times are located in adjacent target circles of the target circle where the human-vehicle trajectory position points are located; If not, it is determined that the human-vehicle trajectory position point is a noise point, and the human-vehicle trajectory position point is deleted from the initial spatial position point set.
5. The method for matching human and vehicle trajectories according to any one of claims 2 to 4, characterized in that: The multi-level location index includes at least a spatial first-level index and a spatial second-level index. The method for constructing the multi-level location index based on the spatial features of the human and vehicle trajectories includes: Constructing the spatial first-level index according to the spatial position range; and The spatial second-level index is constructed according to the operating angle.
6. The method for matching human and vehicle trajectories according to claim 5, wherein: The step of constructing the spatial first-level index according to the spatial position range includes: Determine the human and vehicle trajectory position points corresponding to the minimum and maximum values of longitude and latitude in the set of spatial position points; Based on the minimum and maximum values of the longitude and latitude corresponding to the human and vehicle trajectory position points, four boundary values are obtained; quantizing the four boundary values to obtain four gridded quantized values corresponding to the four boundary values; The four gridded quantized values are hashed to generate a spatial position range index of the human-vehicle trajectory, and the spatial position range index of the human-vehicle trajectory is used as the first-level spatial index.
7. The human-vehicle trajectory matching method according to claim 5, characterized in that: The step of constructing the spatial second-level index according to the running angle of the spatial position point set includes: Set the quantized value of the running angle of the human and vehicle trajectory; According to the quantized value of the human-vehicle trajectory running angle, the spatial position point set in the original coordinate system is rotated to obtain the spatial position point set in the new rotated coordinate system; Calculating the position range boundaries of the spatial position point set in the new rotating coordinate system and the coverage area of the human-vehicle trajectory at each quantized operating angle; The spatial second-level index is constructed based on the position range boundary and the human and vehicle trajectory coverage area.
8. The method for matching human and vehicle trajectories according to claim 5, wherein: The step of performing human-vehicle trajectory matching detection based on the multi-level position index includes: Predicting a person-vehicle trajectory based on the spatial first-level index and the spatial second-level index to obtain a predicted person-vehicle trajectory result; Based on the predicted human and vehicle trajectory results, human and vehicle trajectory matching detection is performed.
9. The method for matching human and vehicle trajectories according to claim 8, wherein: The step of performing human and vehicle trajectory prediction according to the spatial first-level index and the spatial second-level index to obtain a predicted human and vehicle trajectory result comprises: Combined with the speed and acceleration of the historical trajectory of the person and vehicle, the trajectory of the person and vehicle is predicted within a preset time period to obtain the predicted trajectory result.
10. The method for matching human and vehicle trajectories according to claim 9, wherein: After the step of predicting the trajectory of the person and vehicle within a preset time period based on the speed and acceleration of the historical trajectory of the person and vehicle and obtaining the predicted trajectory result of the person and vehicle, the method includes: Determining whether the predicted human and vehicle trajectory result exceeds the range of the first-level spatial index and the second-level spatial index; If it exceeds, return to the execution step: construct the first-level spatial index according to the spatial position range; If not, the step of performing a human-vehicle trajectory matching detection based on the predicted human-vehicle trajectory result is executed.
11. The method for matching human and vehicle trajectories according to claim 8, wherein: The step of performing human-vehicle trajectory matching detection based on the predicted human-vehicle trajectory result includes: According to a preset search priority and search order, adjacent spatiotemporal trajectory indexes corresponding to the spatial first-level index and the spatial second-level index are detected respectively, and human-vehicle trajectory matching detection is performed in the same and adjacent spatiotemporal trajectory indexes.
12. The method for matching human and vehicle trajectories according to claim 11, wherein: Before the step of respectively detecting the adjacent spatiotemporal trajectory indexes corresponding to the spatial first-level index and the spatial second-level index according to the preset adjacent search priority and search order, the method includes: According to adjacent quantized values of the four spatial boundary values in the spatial first-level index, setting the adjacent search priority and search order corresponding to the spatial first-level index; and According to the quantized value of the running angle in the spatial second-level index, the adjacent search priority and search order corresponding to the spatial second-level index are set.
13. The method for matching human and vehicle trajectories according to claim 11, wherein: The steps of detecting adjacent spatiotemporal trajectory indexes corresponding to the first spatial level index and the second spatial level index according to a preset search priority and search order, and performing human-vehicle trajectory matching detection in the same and adjacent spatiotemporal trajectory indexes include: Searching according to the adjacent search priority and search order corresponding to the first-level spatial index to determine the spatial position range of at least one person-vehicle trajectory; Within the same spatial position range of the human and vehicle trajectory, the search is continued according to the adjacent search priority and search order corresponding to the second-level spatial index until a matching human and vehicle trajectory is found, and the search process is terminated.
14. A human-vehicle trajectory matching system, characterized in that: The human-vehicle trajectory matching system includes: A recognition module is used to identify the spatial characteristics of the human and vehicle trajectories based on the collected human and vehicle trajectory data; A construction module, configured to construct a multi-level location index based on the spatial features of the person and vehicle trajectories; The matching module is used to perform human-vehicle trajectory matching detection based on the multi-level position index.
15. A human-vehicle trajectory matching device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the human-vehicle trajectory matching method according to any one of claims 1 to 13.
16. A storage medium, characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the human-vehicle trajectory matching method according to any one of claims 1 to 13 are implemented.
17. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the human-vehicle trajectory matching method according to any one of claims 1 to 13 are implemented.