Track data compression method and device, electronic equipment and storage medium

By judging and utilizing compression algorithms between different types of reference track points, the contradiction between trajectory data in retaining attribute data and compression effect is solved, real-time high-speed storage and in the case of insufficient physical data storage space of the vehicle and complex network Upload.

CN119254238AActive Publication Date: 2025-01-03CHERY AUTOMOBILE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411353585.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-03
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

The existing trajectory data compression methods ensure the compression effect while difficulty in retaining the attribute data of the vehicle trajectory, resulting in the inability to meet the needs of real-time uploading and monitoring and analysis in the case of insufficient physical data storage space and complex network conditions.

Method used

By obtaining the vehicle's trajectory data, we can determine whether there are forward and backward reference track points. Using the compression algorithm within the preset points, between forward reference track points and between front and back bidirectional reference points, we can compress the trajectory points to be processed to generate key , forward prediction and bidirectional prediction points, and cache them as reference track points, forming a queue to be written and finally stored in the terminal.

Benefits of technology

It realizes the preservation of trajectory attribute data while ensuring the compression effect, greatly compressing the physical occupation of massive data and network transmission size, convenient for real-time high-speed storage, uploading and decoding analysis, and meets the insufficient storage space of the vehicle's physical data and complex network conditions. demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254238A_ABST
    Figure CN119254238A_ABST
Patent Text Reader

Abstract

The invention discloses a track data compression method and device, electronic equipment and a storage medium, and the method comprises the steps: compressing a to-be-compressed track point to obtain a key track point, and adding the key track point into a to-be-written queue if a forward reference track point does not exist in track data; if the forward reference trajectory point exists in the trajectory data, the backward reference trajectory point does not exist in the trajectory data, and the to-be-compressed trajectory point is similar to the forward reference trajectory point, compressing the to-be-compressed trajectory point to obtain a first forward prediction point; if the to-be-compressed track point is not similar to the forward reference track point and the backward reference track point, compressing the to-be-compressed track point to obtain a second forward prediction point, and adding the second forward prediction point and the first forward prediction point into a to-be-written queue; and if the to-be-compressed track points are similar to the forward reference track points and the backward reference track points, compressing the to-be-compressed track points to obtain bidirectional prediction points, adding the bidirectional prediction points into a to-be-written queue, and storing all data in the to-be-written queue to a preset terminal. Therefore, the state information of the data is completely reserved while large-volume data compression is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a trajectory data compression method, device, electronic device and storage medium. Background Art

[0002] With the popularization of in-vehicle navigation and smart cockpit autonomous driving technology, massive travel trajectory data will have high requirements for data storage, network transmission, fast playback and fast retrieval technology. There are many existing methods for trajectory data denoising, compression and optimization, but most of them focus on the early preprocessing of trajectory data, such as abnormal trajectory point denoising, trajectory point interpolation optimization, etc.; and trajectory point data optimization based on a specific model. The above methods can greatly filter out redundant data at the macro level, but in reality, vehicle trajectories are generated in different ground spaces at all times, such as taxis, buses, etc.; some methods also use the similarity between trajectory points for simplified storage, but the methods are relatively simple, not flexible, and the compression is limited. Daily car user trajectories often need to be stored for at least several days to several months and uploaded in real time for analysis. Massive storage and real-time transmission are still inevitable, so it is necessary to achieve extreme compression at the micro level of each trajectory point to meet such requirements.

[0003] Travel trajectory points often present star features such as continuity, long time span, and huge data volume. In addition, the vehicle field not only has local storage, playback, and analysis requirements, but also requires cross-end requirements such as remote network transmission, real-time monitoring, and analysis. Although the Internet of Vehicles technology and 5G communication technology have made great progress, they have not yet formed a large-scale cost reduction effect in the commercial and civilian fields. With the rapid development of new energy electric vehicles, both traditional vehicles and electric vehicles have entered a stage of fierce competition. The storage and real-time transmission and analysis of massive trajectory data have high requirements for hardware. In the case that the hardware cost cannot be further reduced on a large scale, it is urgent to find breakthroughs in large-volume data compression and transmission.

[0004] Related technologies merge and compress the position points of the same trajectory, that is, multiple position points are deleted and merged into one trajectory point, and the time is stored as a sequence. The trajectory points at different positions are judged within the threshold, and the same speed is merged and compressed in the same way.

[0005] However, this method is only applicable to determining whether the position and speed are the same. In reality, the attribute information contained in the travel trajectory points is far more than just the spatial position and speed. It also includes positioning type, accuracy, satellite type and strength, sensor data and other information. The driving status of vehicles at the same spatial position may also be different, so they cannot be simply deleted. In the vehicle-mounted travel trajectory record, redundant data cannot be simply deleted, but each attribute data should be retained as much as possible to accurately determine and analyze the vehicle's position status, driving status, and predictable status. Summary of the invention

[0006] The present application provides a trajectory data compression method, device, electronic device and storage medium to solve the problem that it is difficult to retain attribute data while ensuring compression effect for large-volume trajectory data. In the face of insufficient physical data storage space for vehicles, complex network conditions but requiring real-time upload of locations, true restoration of original trajectories and monitoring analysis, the physical occupancy and network transmission size of massive data are greatly compressed, facilitating real-time high-speed storage, uploading and decoding analysis.

[0007] The first aspect of the present application provides a trajectory data compression method, comprising the following steps:

[0008] Obtaining the vehicle's trajectory data and trajectory points to be compressed;

[0009] Determining whether there is a forward reference trajectory point in the trajectory data;

[0010] If there is no forward reference trajectory point in the trajectory data, compress the trajectory point to be compressed by using a preset intra-point compression algorithm to obtain a key trajectory point, add the key trajectory point to a queue to be written, and cache the key trajectory point as a forward reference trajectory point; otherwise, determine whether there is a backward reference trajectory point in the trajectory data;

[0011] If there is no backward reference trajectory point in the trajectory data, then when the trajectory point to be compressed and the forward reference trajectory point meet the first preset similarity matching requirement, the trajectory point to be compressed is compressed using the preset forward reference trajectory point compression algorithm to obtain a first forward prediction point, and the first forward prediction point is added to the temporary queue, and the first forward prediction point is cached as the backward reference trajectory point; otherwise, when the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement, the trajectory point to be compressed is compressed using the preset forward reference trajectory point compression algorithm to obtain a first forward prediction point. The trajectory point to be compressed is compressed to obtain a second forward prediction point, the second forward prediction point and the first forward prediction point in the temporary queue are added to the queue to be written, and the second forward prediction point is cached as a forward reference trajectory point. When the trajectory point to be compressed meets the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed using a preset compression algorithm between forward and backward bidirectional reference points to obtain a bidirectional prediction point, and the bidirectional prediction point is added to the queue to be written, and all data in the queue to be written is stored in a preset terminal.

[0012] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the method further includes:

[0013] If the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement, the trajectory point to be compressed is compressed using a preset intra-point compression algorithm to obtain the key trajectory point.

[0014] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the method further includes:

[0015] If there is at least one main matching element between the trajectory point to be compressed and the forward reference trajectory point that exceeds the corresponding error threshold, it is determined that the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement; otherwise, it is determined that the trajectory point to be compressed and the forward reference trajectory point meet the first preset similarity matching requirement.

[0016] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point exists in the trajectory data, the method further includes:

[0017] If there is at least one secondary matching element between the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point that exceeds the corresponding error threshold, it is determined that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement; otherwise, it is determined that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point meet the second preset similarity matching requirement.

[0018] A second aspect of the present application provides a trajectory data compression device, including:

[0019] An acquisition module, used to acquire the vehicle's trajectory data and the trajectory points to be compressed;

[0020] A judging module, used for judging whether there is a forward reference trajectory point in the trajectory data;

[0021] a first compression module, configured to compress the trajectory points to be compressed to obtain key trajectory points by using a preset intra-point compression algorithm when there are no forward reference trajectory points in the trajectory data, add the key trajectory points to a queue to be written, and cache the key trajectory points as forward reference trajectory points; otherwise, determine whether there are backward reference trajectory points in the trajectory data;

[0022] a second compression module, configured to compress the trajectory point to be compressed to obtain a first forward prediction point by using a preset compression algorithm between forward reference trajectory points when there is no backward reference trajectory point in the trajectory data, and to add the first forward prediction point to a temporary queue, and to cache the first forward prediction point as a backward reference trajectory point; otherwise, when the trajectory point to be compressed, the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement, and to use the preset compression algorithm between forward reference trajectory points to obtain a first forward prediction point; The compression algorithm compresses the trajectory point to be compressed to obtain a second forward prediction point, adds the second forward prediction point and the first forward prediction point in the temporary queue to the queue to be written, and caches the second forward prediction point as a forward reference trajectory point. When the trajectory point to be compressed meets the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed to obtain a bidirectional prediction point using a preset compression algorithm between forward and backward bidirectional reference points, and the bidirectional prediction point is added to the queue to be written, and all data in the queue to be written are stored in a preset terminal.

[0023] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the second compression module further includes:

[0024] The first compression unit is used to compress the trajectory point to be compressed by using a preset intra-point compression algorithm to obtain the key trajectory point when the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement.

[0025] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the second compression module further includes:

[0026] The first determination unit is configured to determine that the trajectory point to be compressed and the forward reference trajectory point do not satisfy the first preset similarity matching requirement when at least one main matching element between the trajectory point to be compressed and the forward reference trajectory point exceeds a corresponding error threshold; otherwise, determine that the trajectory point to be compressed and the forward reference trajectory point satisfy the first preset similarity matching requirement.

[0027] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point exists in the trajectory data, the second compression module further includes:

[0028] A second determination unit is configured to determine that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not satisfy the second preset similarity matching requirement when at least one secondary matching element between the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point exceeds a corresponding error threshold; otherwise, determine that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point satisfy the second preset similarity matching requirement.

[0029] A third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the trajectory data compression method as described in the above embodiment.

[0030] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the trajectory data compression method as described in the above embodiment.

[0031] Thus, by obtaining the trajectory data of the vehicle and the trajectory points to be compressed; determining whether there is a forward reference trajectory point in the trajectory data; if there is no forward reference trajectory point in the trajectory data, compressing the trajectory points to be compressed using a preset intra-point compression algorithm to obtain key trajectory points, adding the key trajectory points to a queue to be written, and caching the key trajectory points as forward reference trajectory points, otherwise, determining whether there is a backward reference trajectory point in the trajectory data;

[0032] If there is no backward reference trajectory point in the trajectory data, when the trajectory point to be compressed and the forward reference trajectory point meet the first preset similarity matching requirement, the trajectory point to be compressed is compressed by using the preset compression algorithm between forward reference trajectory points to obtain a first forward prediction point, and the first forward prediction point is added to a temporary queue, and the first forward prediction point is cached as a backward reference trajectory point; otherwise, when the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement, the trajectory point to be compressed is compressed by using the preset compression algorithm between forward reference trajectory points to obtain a second forward prediction point, the second forward prediction point and the first forward prediction point in the temporary queue are added to a queue to be written, and the second forward prediction point is cached as a forward reference trajectory point; when the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point meet the second preset similarity matching requirement, the trajectory point to be compressed is compressed by using the preset compression algorithm between forward and backward bidirectional reference points to obtain a bidirectional prediction point, and the bidirectional prediction point is added to the queue to be written, and all data in the queue to be written is stored in a preset terminal. As a result, the problem that it is difficult to retain attribute data while ensuring compression effect for large-volume trajectory data is solved. In scenarios where the vehicle's physical data storage space is insufficient, network conditions are complex but real-time upload of location is required, the original trajectory is truly restored, and monitoring and analysis are required, the physical occupancy and network transmission size of massive data are greatly compressed, facilitating real-time high-speed storage, upload, decoding and analysis.

[0033] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0035] Figure 1 A flowchart of a trajectory data compression method provided according to an embodiment of the present application;

[0036] Figure 2 A schematic diagram of a classification principle of trajectory points provided according to an embodiment of the present application;

[0037] Figure 3A schematic diagram of a compression principle of trajectory data provided according to an embodiment of the present application;

[0038] Figure 4 A schematic diagram of the principle of a preset intra-point compression algorithm provided according to an embodiment of the present application;

[0039] Figure 5 A schematic diagram of the principle of similarity matching provided according to an embodiment of the present application;

[0040] Figure 6 A block diagram of a trajectory data compression device provided according to an embodiment of the present application;

[0041] Figure 7 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0042] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0043] The following describes the trajectory data compression method, device, electronic device and storage medium of the embodiment of the present application with reference to the accompanying drawings. In view of the problem mentioned in the above background technology that it is difficult to retain attribute data while ensuring the compression effect of large-volume trajectory data, the present application provides a trajectory data compression method, in which the trajectory data and the trajectory points to be compressed of the vehicle are obtained; it is determined whether there are forward reference trajectory points in the trajectory data; if there are no forward reference trajectory points in the trajectory data, the trajectory points to be compressed are compressed using a preset intra-point compression algorithm to obtain key trajectory points, the key trajectory points are added to the queue to be written, and the key trajectory points are cached as forward reference trajectory points, otherwise, it is determined whether there are backward reference trajectory points in the trajectory data; if there are no backward reference trajectory points in the trajectory data, when the trajectory points to be compressed and the forward reference trajectory points meet the first preset similarity matching requirement, the trajectory points to be compressed are compressed using a preset forward reference trajectory point inter-compression algorithm to obtain A first forward prediction point is obtained, and the first forward prediction point is added to a temporary queue, and the first forward prediction point is cached as a backward reference trajectory point. Otherwise, when the trajectory point to be compressed does not meet the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed using a preset compression algorithm between forward reference trajectory points to obtain a second forward prediction point, the second forward prediction point and the first forward prediction point in the temporary queue are added to a queue to be written, and the second forward prediction point is cached as a forward reference trajectory point. When the trajectory point to be compressed meets the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed using a preset compression algorithm between forward and backward bidirectional reference points to obtain a bidirectional prediction point, and the bidirectional prediction point is added to the queue to be written, and all data in the queue to be written is stored in a preset terminal. As a result, the problem that it is difficult to retain attribute data while ensuring compression effect for large-volume trajectory data is solved. In scenarios where the vehicle's physical data storage space is insufficient, network conditions are complex but real-time upload of location is required, the original trajectory is truly restored, and monitoring and analysis are required, the physical occupancy and network transmission size of massive data are greatly compressed, facilitating real-time high-speed storage, upload, decoding and analysis.

[0044] Specifically, Figure 1 A schematic flow chart of a trajectory data compression method provided in an embodiment of the present application.

[0045] like Figure 1 As shown, the trajectory data compression method includes the following steps:

[0046] In step S101, the trajectory data of the vehicle and the trajectory points to be compressed are obtained.

[0047] Specifically, a large amount of trajectory data will be generated during the vehicle journey and needs to be compressed and stored. After the generated trajectory data is subjected to conventional noise reduction and abnormal points are eliminated, the trajectory points to be compressed are obtained.

[0048] In step S102, it is determined whether there is a forward reference trajectory point in the trajectory data.

[0049] It should be noted that if Figure 2 As shown, in the embodiment of the present application, the actually stored user trajectory point data are defined as three types: key trajectory point I point, forward reference trajectory point P point and forward and backward bidirectional reference trajectory point B point.

[0050] Among them, all attribute data will be fully recorded for the key trajectory point I. The key trajectory point I can be understood as the starting position trajectory point of the user at some identical or similar trajectory position points, such as the first position point when the user ignites the vehicle to start recording the position; the first position point when driving to the next road; the first position point after the signal is interrupted; the position point whose difference with the previous key position point exceeds the threshold, and the first position point where the positioning accuracy meets the high-precision requirements for the first time, etc.

[0051] For the forward reference trajectory point P, the attribute data that is different from the previous reference trajectory point will be recorded, and the attribute data that is not different will not be recorded. Point P can be understood as the subsequent position trajectory point of the previous reference trajectory point (the same or similar trajectory position point), for example, the second trajectory point after the key trajectory point I, which is the same as the previous trajectory point in some attributes, but has a large difference in some attributes.

[0052] For the forward and backward bidirectional reference track point B, only the attribute data that is different from a small part of the two forward and backward bidirectional reference points will be recorded, and the attribute data without difference will not be recorded.

[0053] The set of trajectory points from one key trajectory point I to the next key trajectory point I is defined as a trajectory point group.

[0054] Specifically, combined Figure 3 As shown, after obtaining the trajectory point to be compressed, the trajectory point encoding process can be entered. First, it is determined whether there is a forward reference trajectory point before. Generally, the first trajectory point to be compressed recorded must not have a forward reference trajectory point. In step S103, if there is no forward reference trajectory point in the trajectory data, the trajectory point to be compressed is compressed using a preset intra-point compression algorithm to obtain a key trajectory point, the key trajectory point is added to the queue to be written, and the key trajectory point is cached as a forward reference trajectory point. Otherwise, it is determined whether there is a backward reference trajectory point in the trajectory data.

[0055] Specifically, if there is no forward reference trajectory point in the trajectory data, the key trajectory point I is directly compressed and encoded, and transmitted to the trajectory data to-be-written queue Q. Meanwhile, the key trajectory point I is automatically cached as a forward reference trajectory point.

[0056] It should be noted that the preset intra-point compression algorithm can be as follows Figure 4 As shown, the track point number, timing time, system time, track type (GPS, NET, Beidou...), track longitude, track latitude, elevation, direction angle, horizontal positioning accuracy, vertical positioning accuracy, angle positioning accuracy, speed, number of positioning satellites, signal strength, sensor temperature, sensor type, road ID and other data are first uniformly integerized, and then secondary encoded according to Varints and ZigZag encoding specifications. Taking 32.121 as an example, the original 8 bytes of 64-bit double pre-encoding data can be encoded into 3 bytes of 24-bit encoded data. The preset intra-point compression algorithm directly acts on the encoding key track point I, and the Varints and ZigZag encoding specifications are used for intra-point data compression encoding for each attribute data of the track data. The preset forward reference track point compression algorithm directly acts on the encoding forward prediction point P, and the preset forward and backward bidirectional reference point compression algorithm directly acts on the encoding forward and backward bidirectional prediction point B.

[0057] In step S104, if there is no backward reference trajectory point in the trajectory data, when the trajectory point to be compressed and the forward reference trajectory point meet the first preset similarity matching requirement, the trajectory point to be compressed is compressed by using the preset compression algorithm between forward reference trajectory points to obtain a first forward prediction point, and the first forward prediction point is added to a temporary queue, and the first forward prediction point is cached as a backward reference trajectory point. Otherwise, when the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement, the trajectory point to be compressed is compressed by using the preset compression algorithm between forward reference trajectory points to obtain a second forward prediction point, the second forward prediction point and the first forward prediction point in the temporary queue are added to a queue to be written, and the second forward prediction point is cached as a forward reference trajectory point. When the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point meet the second preset similarity matching requirement, the trajectory point to be compressed is compressed by using the preset compression algorithm between forward and backward bidirectional reference points to obtain a bidirectional prediction point, and the bidirectional prediction point is added to the queue to be written, and all data in the queue to be written is stored in a preset terminal.

[0058] Optionally, in some embodiments, after determining that there is a forward reference trajectory point in the trajectory data and there is no backward reference trajectory point in the trajectory data, it also includes: if there is at least one main matching element between the trajectory point to be compressed and the forward reference trajectory point that exceeds the corresponding error threshold, then determining that the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement; otherwise, determining that the trajectory point to be compressed and the forward reference trajectory point meet the first preset similarity matching requirement.

[0059] It should be noted that in the embodiment of the present application, the similarity matching principle is as follows Figure 3 As shown in the figure, the latitude and longitude of the trajectory position, elevation and speed attribute values ​​are used as the main matching elements FirstFeatures, and the remaining attributes are used as the secondary matching elements SecondFeatures. The main and secondary attributes define a dynamically adjustable similarity error threshold. The main matching elements FirstFeatures whose differences exceed the threshold will be used to distinguish the key trajectory point I, and record detailed attribute data information within the trajectory point; the differences that do not exceed the threshold will be used to distinguish the forward prediction point P, record the difference information of the main matching elements and the difference information of the secondary matching elements, and fill in and separate the same values ​​of the secondary matching elements or negligible errors with 0. The secondary matching elements SecondFeatures whose differences exceed the threshold will be used to distinguish the forward prediction point P, and the differences that do not exceed the threshold will be used to distinguish the forward and backward bidirectional prediction points B, record the difference information of the secondary matching elements, and fill in and separate the same values ​​of the main matching elements or negligible errors with 0.

[0060] Specifically, the latitude and longitude of the trajectory position, elevation and speed are used as the main matching elements, and the remaining attributes are used as secondary matching elements. The main matching elements with obvious differences will be used to distinguish the key trajectory points I by the user, and the detailed attribute data information in the trajectory points will be recorded; similar ones will be used to distinguish the forward prediction points P, and the difference information of the main matching elements and the difference information of the secondary matching elements will be recorded. The same values ​​of the secondary matching elements will be filled and separated with 0. The secondary matching elements with obvious differences will be used to distinguish the forward prediction points P, and similar ones will be used to distinguish the forward and backward bidirectional prediction points B, and the difference information of the secondary matching elements will be recorded. The same values ​​of the main matching elements will be filled and separated with 0.

[0061] In the actual implementation process, combined with Figure 3 As shown, if after the production trajectory point comes in, it is determined that there is a forward reference trajectory point, then it is necessary to determine whether there is a backward reference trajectory point before. If there is no backward reference trajectory point, enter the trajectory point data similarity matching process. If the difference with the forward reference trajectory point is not large and is within the P point threshold range, then cache the trajectory point into the temporary queue T and temporarily do not enter the trajectory data to be written queue Q. At the same time, the point is automatically cached as a backward reference trajectory point. Optionally, in some embodiments, after determining that there is a forward reference trajectory point in the trajectory data and there is no backward reference trajectory point in the trajectory data, it also includes: if the trajectory point to be compressed does not meet the first preset similarity matching requirement with the forward reference trajectory point, then use the preset intra-point compression algorithm to compress the trajectory point to be compressed to obtain a key trajectory point.

[0062] Specifically, if the production trajectory point comes in, there is a forward reference trajectory point in the trajectory data, and there is no backward reference trajectory point in the trajectory data, then the trajectory point data similarity matching process is entered. If the difference with the forward reference trajectory point is relatively large, the compression encoding process is directly performed according to the key trajectory point I point.

[0063] Optionally, in some embodiments, after determining that there is a forward reference trajectory point in the trajectory data and there is a backward reference trajectory point in the trajectory data, it also includes: if there is at least one secondary matching element between the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point that exceeds the corresponding error threshold, then determine that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement; otherwise, determine that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point meet the second preset similarity matching requirement.

[0064] Specifically, combined Figure 3 As shown in the figure, if there is a forward reference trajectory point and a backward reference trajectory point after the trajectory point to be compressed comes in, the trajectory point data similarity matching process is entered. If the similarity exceeds the BP point threshold, the trajectory point is recorded as a forward prediction point P, and enters the trajectory data to be written queue Q together with the previously cached temporary queue T. At the same time, the point is automatically cached as a forward reference trajectory point.

[0065] If the similarity between the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point is within the BP point threshold, such as Figure 5 As shown in the figure, the rightmost point B and the forward key reference point I and the backward reference trajectory point P only differ in some local attribute values, and the other attributes are consistent. In this case, the point is recorded as the forward and backward bidirectional prediction point B, and enters the trajectory data to be written queue Q together with the previously cached temporary queue T.

[0066] It should be noted that the embodiment of the present application provides a compression encoding process of vehicle trajectory points. When the compressed data is decoded, according to Figure 3 and Figure 4 Just carry out the reverse process and operation.

[0067] In summary, the embodiment of the present application divides the trajectory points into key position point I, forward reference position point P and forward and backward bidirectional reference position point B according to time and space characteristics, and constructs an intra-point data compression coding method based on point I, a forward reference trajectory point inter-point data compression coding method based on point P, and a forward and backward bidirectional reference point inter-point compression coding method based on point B. Through the above three steps of intra-point and inter-point data coding compression, it is possible to greatly remove duplicate attribute data in massive trajectory data, greatly compress the physical storage size of different data types, and completely restore all attribute data of all original trajectory data through reverse decoding. In this way, the data storage and transmission costs are greatly reduced through coding technology, and the original trajectory data is completely restored through reverse decoding technology.

[0068] Therefore, the trajectory data compression method of the embodiment of the present application can not only restore the position and vehicle running status of the running vehicle at any time with the greatest completeness, but also flexibly control the data compression ratio, not only achieve data compression of a single trajectory point, but also achieve point-to-point data compression between trajectory points, greatly compressing the physical size of massive data, facilitating real-time fast storage, fast uploading and fast decoding and analysis, and at the same time, the original trajectory data can be restored through fast decoding, and the position status and driving status of the original trip and other information can be truly restored. By defining the compression accuracy threshold, a custom compression ratio can be achieved, and lossless compression and lossy compression can be flexibly controlled.

[0069] According to the trajectory data compression method proposed in the embodiment of the present application, the trajectory data and the trajectory point to be compressed of the vehicle are obtained; it is determined whether there is a forward reference trajectory point in the trajectory data; if there is no forward reference trajectory point in the trajectory data, the trajectory point to be compressed is compressed by using a preset intra-point compression algorithm to obtain a key trajectory point, the key trajectory point is added to a queue to be written, and the key trajectory point is cached as a forward reference trajectory point, otherwise, it is determined whether there is a backward reference trajectory point in the trajectory data; if there is no backward reference trajectory point in the trajectory data, when the trajectory point to be compressed and the forward reference trajectory point meet a first preset similarity matching requirement, the trajectory point to be compressed is compressed by using a preset forward reference trajectory point inter-compression algorithm to obtain a first forward prediction point, and the first forward prediction point is added to a temporary queue. The first forward prediction point is cached as a backward reference trajectory point. Otherwise, when the trajectory point to be compressed does not meet the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed using the preset compression algorithm between the forward reference trajectory points to obtain the second forward prediction point, the second forward prediction point and the first forward prediction point in the temporary queue are added to the queue to be written, and the second forward prediction point is cached as the forward reference trajectory point. When the trajectory point to be compressed meets the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed using the preset compression algorithm between the forward and backward bidirectional reference points to obtain a bidirectional prediction point, and the bidirectional prediction point is added to the queue to be written, and all the data in the queue to be written is stored in the preset terminal. Thus, the problem that it is difficult to store attribute data while ensuring the compression effect of large-volume trajectory data is solved. In the face of insufficient physical data storage space for vehicles, complex network conditions but requiring real-time upload location, true restoration of original trajectory and monitoring analysis, the physical occupation and network transmission size of massive data are greatly compressed, which is convenient for real-time high-speed storage, upload and decoding analysis.

[0070] Next, a trajectory data compression device according to an embodiment of the present application is described with reference to the accompanying drawings.

[0071] Figure 6 4 is a block diagram of a trajectory data compression device according to an embodiment of the present application.

[0072] like Figure 6 As shown, the trajectory data compression device 10 includes: an acquisition module 100 , a judgment module 200 , a first compression module 300 , and a second compression module 300 .

[0073] The acquisition module 100 is used to acquire the trajectory data of the vehicle and the trajectory points to be compressed.

[0074] The judging module 200 is used to judge whether there is a forward reference trajectory point in the trajectory data.

[0075] The first compression module 300 is used to compress the trajectory points to be compressed to obtain key trajectory points by using a preset intra-point compression algorithm when there is no forward reference trajectory point in the trajectory data, add the key trajectory point to a queue to be written, and cache the key trajectory point as a forward reference trajectory point; otherwise, determine whether there is a backward reference trajectory point in the trajectory data.

[0076] The second compression module 400 is used for compressing the trajectory point to be compressed to obtain a first forward prediction point by using a preset compression algorithm between forward reference trajectory points when there is no backward reference trajectory point in the trajectory data, and adding the first forward prediction point to a temporary queue, and caching the first forward prediction point as a backward reference trajectory point, when the trajectory point to be compressed and the forward reference trajectory point meet a first preset similarity matching requirement, otherwise, when the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement, using the preset compression algorithm between forward reference trajectory points The compression algorithm compresses the trajectory point to be compressed to obtain a second forward prediction point, adds the second forward prediction point and the first forward prediction point in the temporary queue to the queue to be written, and caches the second forward prediction point as a forward reference trajectory point. When the trajectory point to be compressed meets the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed to obtain a bidirectional prediction point using a preset compression algorithm between forward and backward bidirectional reference points, and the bidirectional prediction point is added to the queue to be written, and all data in the queue to be written is stored in a preset terminal.

[0077] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and that the backward reference trajectory point does not exist in the trajectory data, the second compression module 400 further includes: a first compression unit.

[0078] The first compression unit is used to compress the trajectory point to be compressed by using a preset intra-point compression algorithm to obtain the key trajectory point when the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement.

[0079] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the second compression module 400 further includes: a first determination unit.

[0080] Among them, the first judgment unit is used to determine that the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement when there is at least one main matching element between the trajectory point to be compressed and the forward reference trajectory point that exceeds the corresponding error threshold; otherwise, determine that the trajectory point to be compressed and the forward reference trajectory point meet the first preset similarity matching requirement.

[0081] Optionally, in some embodiments, after determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point exists in the trajectory data, the second compression module 400 further includes: a second determination unit.

[0082] Among them, the second determination unit is used to determine that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement when there is at least one secondary matching element between the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point that exceeds the corresponding error threshold; otherwise, determine that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point meet the second preset similarity matching requirement.

[0083] It should be noted that the above explanations of the trajectory data compression method embodiment are also applicable to the trajectory data compression device of this embodiment, and will not be repeated here.

[0084] According to the trajectory data compression device proposed in the embodiment of the present application, by obtaining the trajectory data of the vehicle and the trajectory point to be compressed; judging whether there is a forward reference trajectory point in the trajectory data; if there is no forward reference trajectory point in the trajectory data, compressing the trajectory point to be compressed by using a preset intra-point compression algorithm to obtain a key trajectory point, adding the key trajectory point to a queue to be written, and caching the key trajectory point as a forward reference trajectory point, otherwise, judging whether there is a backward reference trajectory point in the trajectory data; if there is no backward reference trajectory point in the trajectory data, when the trajectory point to be compressed and the forward reference trajectory point meet a first preset similarity matching requirement, compressing the trajectory point to be compressed by using a preset forward reference trajectory point compression algorithm to obtain a first forward prediction point, and adding the first forward prediction point to a temporary queue The first forward prediction point is cached as a backward reference trajectory point. Otherwise, when the trajectory point to be compressed does not meet the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed using the preset compression algorithm between the forward reference trajectory points to obtain the second forward prediction point, the second forward prediction point and the first forward prediction point in the temporary queue are added to the queue to be written, and the second forward prediction point is cached as the forward reference trajectory point. When the trajectory point to be compressed meets the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed using the preset compression algorithm between the forward and backward bidirectional reference points to obtain a bidirectional prediction point, and the bidirectional prediction point is added to the queue to be written, and all the data in the queue to be written is stored in the preset terminal. Thus, the problem that it is difficult to store attribute data while ensuring the compression effect of large-volume trajectory data is solved. In the face of insufficient physical data storage space for vehicles, complex network conditions but requiring real-time upload location, true restoration of original trajectory and monitoring analysis, the physical occupation and network transmission size of massive data are greatly compressed, which is convenient for real-time high-speed storage, upload and decoding analysis.

[0085] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0086] A memory 701 , a processor 702 , and a computer program stored in the memory 701 and executable on the processor 702 .

[0087] When the processor 702 executes the program, the trajectory data compression method provided in the above embodiment is implemented.

[0088] Furthermore, the electronic device further comprises:

[0089] The communication interface 703 is used for communication between the memory 701 and the processor 702 .

[0090] The memory 701 is used to store computer programs that can be executed on the processor 702 .

[0091] The memory 701 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0092] If the memory 701, the processor 702 and the communication interface 703 are implemented independently, the communication interface 703, the memory 701 and the processor 702 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0093] Optionally, in a specific implementation, if the memory 701, the processor 702 and the communication interface 703 are integrated on a chip, the memory 701, the processor 702 and the communication interface 703 can communicate with each other through an internal interface.

[0094] The processor 702 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0095] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the above trajectory data compression method is implemented.

[0096] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0097] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0098] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0099] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.

[0100] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0101] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for compressing trajectory data, characterized in that: The following steps are involved: Obtaining the vehicle's trajectory data and trajectory points to be compressed; Determining whether there is a forward reference trajectory point in the trajectory data; If there is no forward reference trajectory point in the trajectory data, compress the trajectory point to be compressed by using a preset intra-point compression algorithm to obtain a key trajectory point, add the key trajectory point to a queue to be written, and cache the key trajectory point as a forward reference trajectory point; otherwise, determine whether there is a backward reference trajectory point in the trajectory data; If there is no backward reference trajectory point in the trajectory data, then when the trajectory point to be compressed and the forward reference trajectory point meet the first preset similarity matching requirement, the trajectory point to be compressed is compressed using the preset forward reference trajectory point compression algorithm to obtain a first forward prediction point, and the first forward prediction point is added to the temporary queue, and the first forward prediction point is cached as the backward reference trajectory point; otherwise, when the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement, the trajectory point to be compressed is compressed using the preset forward reference trajectory point compression algorithm to obtain a first forward prediction point. The trajectory point to be compressed is compressed to obtain a second forward prediction point, the second forward prediction point and the first forward prediction point in the temporary queue are added to the queue to be written, and the second forward prediction point is cached as a forward reference trajectory point. When the trajectory point to be compressed meets the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed using a preset compression algorithm between forward and backward bidirectional reference points to obtain a bidirectional prediction point, and the bidirectional prediction point is added to the queue to be written, and all data in the queue to be written is stored in a preset terminal.

2. The method according to claim 1, characterized in that: After determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the method further includes: If the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement, the trajectory point to be compressed is compressed using a preset intra-point compression algorithm to obtain the key trajectory point.

3. The method according to claim 1, characterized in that After determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the method further includes: If there is at least one main matching element between the trajectory point to be compressed and the forward reference trajectory point that exceeds the corresponding error threshold, it is determined that the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement; otherwise, it is determined that the trajectory point to be compressed and the forward reference trajectory point meet the first preset similarity matching requirement.

4. The method according to claim 1, characterized in that After determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point exists in the trajectory data, the method further includes: If there is at least one secondary matching element between the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point that exceeds the corresponding error threshold, it is determined that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement; otherwise, it is determined that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point meet the second preset similarity matching requirement.

5. A trajectory data compression device, characterized in that: include: An acquisition module, used to acquire the vehicle's trajectory data and the trajectory points to be compressed; A judgment module, used for judging whether there is a forward reference trajectory point in the trajectory data; a first compression module, configured to compress the trajectory points to be compressed to obtain key trajectory points by using a preset intra-point compression algorithm when there are no forward reference trajectory points in the trajectory data, add the key trajectory points to a queue to be written, and cache the key trajectory points as forward reference trajectory points; otherwise, determine whether there are backward reference trajectory points in the trajectory data; a second compression module, configured to compress the trajectory point to be compressed to obtain a first forward prediction point by using a preset compression algorithm between forward reference trajectory points when there is no backward reference trajectory point in the trajectory data, and to add the first forward prediction point to a temporary queue, and to cache the first forward prediction point as a backward reference trajectory point; otherwise, when the trajectory point to be compressed, the forward reference trajectory point and the backward reference trajectory point do not meet the second preset similarity matching requirement, and to use the preset compression algorithm between forward reference trajectory points to obtain a first forward prediction point; The compression algorithm compresses the trajectory point to be compressed to obtain a second forward prediction point, adds the second forward prediction point and the first forward prediction point in the temporary queue to the queue to be written, and caches the second forward prediction point as a forward reference trajectory point. When the trajectory point to be compressed meets the second preset similarity matching requirement with the forward reference trajectory point and the backward reference trajectory point, the trajectory point to be compressed is compressed to obtain a bidirectional prediction point using a preset compression algorithm between forward and backward bidirectional reference points, and the bidirectional prediction point is added to the queue to be written, and all data in the queue to be written are stored in a preset terminal.

6. The device according to claim 5, characterized in that After determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the second compression module further includes: The first compression unit is used to compress the trajectory point to be compressed by using a preset intra-point compression algorithm to obtain the key trajectory point when the trajectory point to be compressed and the forward reference trajectory point do not meet the first preset similarity matching requirement.

7. The device according to claim 5, characterized in that After determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point does not exist in the trajectory data, the second compression module further includes: The first determination unit is configured to determine that the trajectory point to be compressed and the forward reference trajectory point do not satisfy the first preset similarity matching requirement when at least one main matching element between the trajectory point to be compressed and the forward reference trajectory point exceeds a corresponding error threshold; otherwise, determine that the trajectory point to be compressed and the forward reference trajectory point satisfy the first preset similarity matching requirement.

8. The device according to claim 5, characterized in that After determining that the forward reference trajectory point exists in the trajectory data and the backward reference trajectory point exists in the trajectory data, the second compression module further includes: A second determination unit is configured to determine that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point do not satisfy the second preset similarity matching requirement when at least one secondary matching element between the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point exceeds a corresponding error threshold; otherwise, determine that the trajectory point to be compressed and the forward reference trajectory point and the backward reference trajectory point satisfy the second preset similarity matching requirement.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the trajectory data compression method according to any one of claims 1 to 4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the trajectory data compression method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Trajectory data compression method based on Frechet distance

    CN110518916A

  • Vehicle track thinning method and device, electronic equipment and storage medium

    CN114840503A

  • Data processing method, device and equipment and readable storage medium

    CN118353474A

  • Trajectory simplification method considering ship speed distribution

    CN118473419A

  • Communications protocols between planning and control of autonomous driving vehicle

    US20210191402A1