A method for querying and processing vehicle terminal data trajectory based on Hxknn
Through data cleaning, VC encoding dimensionality reduction and Hxknn query algorithm combined with EMD and wavelet transformation, the problem of redundant data in data query of on-board terminals is solved, and query efficiency and storage optimization are improved.
Patent Information
- Application Number
- CN202111343459.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-13
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-11-13
AI Technical Summary
The existing technology lacks effective data preprocessing methods in vehicle-mounted terminal data query, resulting in massive redundant data, wasting storage resources and increasing data query difficulties.
The data cleaning method combined with EMD and wavelet transform is adopted, VC virtual encoding is used to reduce dimensionality, and the Hxknn query algorithm combined with the knn algorithm and the MTR measurement method is optimized through the pruning strategy.
It improves data query efficiency, reduces the query range of useless data, reduces the number of node access, and optimizes storage space and CPU consumption.
Smart Images

Figure CN114090708B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer applications, and more particularly to a method for querying and processing vehicle terminal data trajectory based on Hxknn. Background Art
[0002] Vehicle terminal data is a complex, multi-layered, high-dimensional data with spatial and temporal characteristics. The continuous emergence of complex vehicle terminal data urges database researchers to develop effective query processing methods to meet the growing number of complex and diverse query requirements.
[0003] While scholars at home and abroad have already conducted extensive research in the field of vehicle-mounted terminal data query, research on trajectory query methods for massive amounts of terminal data is still in its infancy. This is primarily due to a lack of research on trajectory query and data preprocessing for vehicle-mounted terminal data with temporal and spatial attributes. Furthermore, research on mobile terminal trajectory data has focused on optimizing index structures and distance metrics, lacking data strategies. This has resulted in massive amounts of redundant data, a significant waste of storage resources, and difficulties in data query. Summary of the Invention
[0004] The purpose of the present invention is to provide a vehicle terminal data trajectory query processing method based on Hxknn, which can perform data cleaning and dimensionality reduction preprocessing on massive temporal data, and can eliminate a large amount of useless data through pruning strategies, reduce the scope of the query, reduce the number of node visits, and improve data query efficiency.
[0005] The purpose of the present invention is achieved through the following technical solutions:
[0006] A method for querying and processing vehicle terminal data trajectory based on Hxknn, the method comprising the following steps:
[0007] S1: Cleaning and processing of vehicle-borne big data based on the combination of EMD and wavelet transform;
[0008] S2: Use VC virtual coding to reduce the high-dimensional vehicle terminal data into one-dimensional data;
[0009] S3: Use the Hxknn query algorithm with the knn algorithm combined with the MTR metric and pruning strategy to query the trajectory data of moving objects;
[0010] The cleaning process of vehicle-mounted big data includes the following steps:
[0011] S11: Calculate n IMF components and a residual R, and perform EMD decomposition on the latitude and longitude x(t) of the vehicle terminal data;
[0012] S12: Calculate the high and low frequency IMF components through the cumulative mean index, and use the wavelet function, decomposition layer number and threshold to perform wavelet soft threshold denoising cycle on the high frequency IMF;
[0013] S13: The high-frequency components, the low-frequency components that have not been denoised, and the residual obtained in the above process are subjected to EMD reconstruction operation to complete the terminal data denoising.
[0014] Dimensionality reduction of high-dimensional vehicle terminal data specifically includes the following steps:
[0015] S21: VC is a virtual code. VC is composed of a quaternary string. n is the code length. VC can be represented as c1 to cn, where ci∈{0, 1, 2, 3}, i is 1 to n, and the character ci represents the quadrilateral character of each level. In a 2-bit s *2 s A layer of spatial objects, where the VC encoding length of each object is s;
[0016] S22: Encode the data in the layer into a unique VC value through VC. The sub-region code where the object is located can be found through this unique VC.
[0017] S23: Let the position of the object be the coordinates (x, y), and the size of the layer area where it is located be 2 s *2 s , the conversion formula is to convert (x, y) into binary, the length of the binary string is equal to the area length s of the layer, VC is the encoding value, the conversion formula is:
[0018] The Hxknn query algorithm specifically queries moving object trajectory data and includes the following steps:
[0019] S31: MTR(q, N) metric method is used to calculate the distance between a point and N;
[0020] S32: In d-dimensional space, the position of a point q is recorded as (q1, q2, ..., q d ), the lower left and upper right vertices of MBRN are denoted as (s1, s2, ..., s d ) and (t1, t2, ..., t d ), maxdist(q, N) represents the distance between the farthest vertices of q and N. The calculation formula of maxdist(q, N) is:
[0021]
[0022] in, BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0024] Figure 1 This is a flow chart of the vehicle terminal data trajectory query processing of the present invention;
[0025] Figure 2 This is the EMD wavelet combined denoising flow chart of the present invention;
[0026] Figure 3 This is a schematic diagram of the VC encoding and decoding process of the present invention Figure 1 ;
[0027] Figure 4 This is a schematic diagram of the VC encoding and decoding process of the present invention Figure 2 ;
[0028] Figure 5 This is a schematic diagram of the VC encoding and decoding process of the present invention Figure 3 ;
[0029] Figure 6 It is a flowchart of the Hxknn query of the present invention. DETAILED DESCRIPTION
[0030] The present invention will be described in further detail below with reference to the accompanying drawings.
[0031] In order to solve the technical problem of how to improve data query efficiency, combined with the attached Figures 1 to 6 ,The following is a detailed description of the steps and functions of a method for querying and processing vehicle terminal data trajectory based on Hxknn;
[0032] A method for querying and processing vehicle terminal data trajectory based on Hxknn, the method comprising the following steps:
[0033] S1: Cleaning and processing of vehicle-borne big data based on the combination of EMD and wavelet transform;
[0034] S2: Use VC virtual coding to reduce the high-dimensional vehicle terminal data into one-dimensional data;
[0035] S3: Use the Hxknn query algorithm with the knn algorithm combined with the MTR metric and pruning strategy to query the trajectory data of moving objects;
[0036] A knn query is to find the k nearest moving object trajectory data from a set of moving object trajectory data within a set time period [ti, tj]. An Hcknn query is to find the k nearest moving object trajectory data from a set of moving object trajectory data at a certain time point within a time period [ti, tj].
[0037] The present invention combines EMD and wavelet transform to improve the denoising effect of vehicle-mounted high-speed data preprocessing.
[0038] The present invention adopts a pruning strategy to eliminate a large amount of useless data, reduce the scope of the query, and reduce the number of node visits;
[0039] The Hxknn-based vehicle terminal data trajectory query method proposed in this invention optimizes the algorithm's storage space and CPU consumption, improving the efficiency of massive data queries.
[0040] Specifically, the following is a detailed example of each step of a method for querying and processing vehicle terminal data trajectory based on Hxknn:
[0041] S1: Calculate n IMF components and a residual R, and perform EMD decomposition on the latitude and longitude x(t) of the vehicle terminal data;
[0042] S2: Calculate the high and low frequency IMF components through the cumulative mean index, and use the wavelet function, decomposition layer number and threshold to perform wavelet soft threshold denoising cycle on the high frequency IMF;
[0043] S3: The high-frequency components, un-denoised low-frequency components and residuals obtained in the above process are subjected to EMD reconstruction to complete terminal data denoising;
[0044] S4: VC is a virtual code. VC is composed of a quaternary string. n is the code length. VC can be represented as c1 to cn, where ci∈{0, 1, 2, 3}, i is 1 to n, and the character ci represents the quadrilateral character of each level. In a 2-bit s *2 s A layer of spatial objects, where the VC encoding length of each object is s;
[0045] S5: Encode the data in the layer into a unique VC value through VC. Through this unique VC, the sub-region code of the object can be found. Let the position of the object be the coordinate (x, y), and the size of the layer region where it is located be 2 s *2 s , the conversion formula is to convert (x, y) into binary, the length of the binary string is equal to the area length s of the layer, VC is the encoding value, the conversion formula is:
[0046] like Figures 3 to 5 As shown in the figure, the encoding process of the region side length is equal to 2. Figure 3 The process of converting (x, y) into binary; Figure 4 : VC code string of spatial object; Figure 5: The quaternary representation of the VC value of the vehicle terminal object. For example, the VC value of (1, 2) is "21"; the VC value of (2, 2) is "30";
[0047] S6: MTR(q, N) metric method is used to calculate the distance between a point and N. Since a trajectory is formed by several straight line segments, we can easily extend the above calculation method to a maxdist calculation method for a trajectory T to an MBRN;
[0048] S7: In d-dimensional space, the position of a point q is recorded as (q1, q2, ..., q d ), the lower left and upper right vertices of MBRN are denoted as (s1, s2, ..., s d ) and (t1, t2, ..., t d ), maxdist(q, N) represents the distance between the farthest vertices of q and N. The calculation formula of maxdist(q, N) is:
[0049]
[0050] in,
[0051] If the query time interval is [T qs , T qe ], only those time intervals partially or completely exist in
[0052] [T qs , T qe ] Only records within the time interval can be stored in the H database;
[0053] Leaf nodes E only store the same moving object trajectory. When a query is needed, only the data closest to the query object is found in the visited node E and inserted into the heap H. A paper-cutting strategy is used to avoid useless data from entering the heap H.
[0054] Given a query point q and a leaf node E, of all the data in E, only the trajectory data closest to the query point q can be inserted into the heap H. Other trajectory data farther away from the query point q do not need to be inserted into the heap H. When an intermediate node N is visited: (i) visit each leaf node under N, calculate the distance from each leaf node to the query point, and put the results one by one into the heap H; (ii) only visit some useful nodes among the leaf nodes;
[0055] Let q be the query point, N be the intermediate node, and Ni be a node under N. If mindist(Ni,q) ≤ kPruneDist, then Ni is likely the query result node, so it is inserted into the heap H. mindist(Ni,q) is the distance between Ni's minimum bounding box (MBB) and the query point q, and kPruneDist is the minimum distance between k different trajectory identifiers.
Claims
1. A method for querying and processing vehicle terminal data trajectory based on Hxknn, characterized by: The method comprises the following steps: S1: Cleaning and processing of vehicle-mounted big data; S2: Reduce the dimensionality of high-dimensional vehicle terminal data; S3: Hxknn query algorithm queries moving object trajectory data; Dimensionality reduction of high-dimensional vehicle terminal data specifically includes the following steps: S21: VC is composed of a quaternary string, n is the encoding length, VC can be represented as c1 to cn, where ci∈{0, 1, 2, 3}, i is 1 to n, and the character ci represents the quadrilateral character of each level. s *2 s A layer of spatial objects, where the VC encoding length of each object is s; S22: Encode the data in the layer into a unique VC value through VC. The sub-region code where the object is located can be found through this unique VC. S23: Let the position of the object be the coordinates (x, y), and the size of the layer area where it is located be 2 s *2 s , the conversion formula is to convert (x, y) into binary, the length of the binary string is equal to the area length s of the layer, VC is the encoding value; The VC is a virtual code; The conversion formula is:
2. The method for querying and processing vehicle terminal data trajectory based on Hxknn according to claim 1, characterized in that: The vehicle-borne big data is cleaned and processed by combining EMD and wavelet transform.
3. The method for querying and processing vehicle terminal data trajectory based on Hxknn according to claim 2, characterized in that: The cleaning process of vehicle-mounted big data includes the following steps: S11: Calculate n IMF components and a residual R, and perform EMD decomposition on the latitude and longitude x(t) of the vehicle terminal data; S12: Calculate the high and low frequency IMF components through the cumulative mean index, and use the wavelet function, decomposition layer number and threshold to perform wavelet soft threshold denoising cycle on the high frequency IMF; S13: The high-frequency components, the low-frequency components that have not been denoised, and the residual obtained in the above process are subjected to EMD reconstruction operation to complete the terminal data denoising.
4. The method for querying and processing vehicle terminal data trajectory based on Hxknn according to claim 1, characterized in that: VC virtual coding is used to reduce the high-dimensional vehicle terminal data into one-dimensional data.
5. The method for querying and processing vehicle terminal data trajectory based on Hxknn according to claim 1, characterized in that: The Hxknn query algorithm, which combines the knn algorithm with the MTR metric method and pruning strategy, is used to query the trajectory data of moving objects.
6. The method for querying and processing vehicle terminal data trajectory based on Hxknn according to claim 5, characterized in that: The Hxknn query algorithm specifically queries moving object trajectory data and includes the following steps: S31: MTR(q, N) metric method is used to calculate the distance between a point and N; S32: In d-dimensional space, the position of a point q is recorded as (q1, q2, ..., q d ), the lower left and upper right vertices of MBRN are denoted as (s1, s2, ..., s d ) and (t1, t2, ..., t d ), maxdist(q, N) represents the distance between the farthest vertices of q and N.
7. The method for querying and processing vehicle terminal data trajectory based on Hxknn according to claim 6, characterized in that: The formula for calculating maxdist(q, N) is: in,