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

By classifying the trajectory data of engineering vehicles and dynamically adjusting the threshold and weight processing, combined with the Douglas-Peucker algorithm, the problems of trajectory point redundancy and high computational complexity are solved, efficient compression of trajectory data and precise trajectory retention are achieved, and supervision efficiency and accuracy are improved.

CN120301430APending Publication Date: 2025-07-11CHINA CONSTRUCTION THIRD ENGINEERING BUREAU YUNCAI SUPPLY CHAIN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510417230.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The prior art has problems such as trajectory point redundancy, high computational complexity and loss of important information in the compression of engineering vehicle trajectory data, resulting in a decrease in trajectory accuracy and unable to meet the real-time supervision needs.

Method used

By classifying the trajectory data during the vehicle's driving process, different driving types are determined, and the threshold and weight are adjusted according to the driving type are set, and the sampling point set is eliminated and trajectory fitted to obtain the compressed target trajectory data.

Benefits of technology

It realizes effective detection of curve paths, improves trajectory accuracy and completeness, ensures the accuracy and efficient compression of trajectory information, and adapts to the real-time regulatory needs of the construction industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301430A_ABST
    Figure CN120301430A_ABST
Patent Text Reader

Abstract

The invention relates to a track data compression method and device, electronic equipment and a storage medium, and belongs to the technical field of logistics transportation, and the method comprises the steps: classifying the track data of a vehicle in the driving process, obtaining the driving data of different driving types, and storing the driving data in a storage medium; therefore, the driving data of different driving types can be processed through a subsequent process, the driving types can comprise curve paths, and the curve paths are detected; and a sampling point set, an adjustment threshold and a weight of each driving type can be determined according to the driving data, so that the sampling point set can be subjected to elimination and track fitting according to the adjustment threshold and the weight, and compressed target track data is obtained, namely, the adjustment threshold and the weight are correspondingly set for the driving data of different driving types, so that the target track data can be obtained. Accurate track compression of various kinds of driving data is achieved, then the compressed track precision can be improved, and the integrity and accuracy of track information are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of logistics transportation, and particularly to a method, device, electronic device and storage medium for compressing trajectory data. Background Art

[0002] With the growth of the demand for building materials transportation in the construction industry, the management of the material transportation trajectory of engineering vehicles has become an important means to ensure construction efficiency. However, in the process of logistics trajectory management, due to the excessive density of GPS data points collected by vehicles in real time, the following technical problems are faced: Engineering vehicles will continuously collect GPS trajectory points during long-distance transportation, forming a large amount of redundant data. These data not only occupy storage space but also increase the burden of data transmission. Especially in the case of limited network conditions at the construction site, it causes difficulties in real-time data synchronization. Due to the excessive amount of original trajectory data, the efficiency of background data processing is significantly reduced. When performing functions such as path playback and anomaly detection, it often requires longer calculation time, affecting the real-time supervision ability. The dense distribution of data points results in overly cluttered trajectory lines, unable to clearly show the actual driving path of the vehicle, affecting the decision-making efficiency and accuracy of management personnel. In actual construction scenarios, the supervision requirements focus on key positions (such as inflection points or stop points), while the existing trajectory data contains a large number of meaningless repeated sampling points, unable to efficiently meet the management requirements.

[0003] The technical solutions adopted are as follows: 1. Screening trajectory points by a fixed time interval or distance; 2. Compression based on distance; 3. Douglas-Peucker algorithm. Method 1 may lose important information about curves or complex paths. Method 2 can reduce the redundancy between adjacent trajectory points and improve storage efficiency, but it cannot effectively process curved paths and is prone to a decrease in trajectory accuracy, especially on complex paths. Method 3 can dynamically adjust sampling points according to the geometric shape of the path to ensure the geometric integrity of the trajectory, but the computational complexity is relatively high, making it difficult to meet the real-time compression requirements. Therefore, the technical solutions in the prior art have problems such as redundant trajectory points, high computational complexity, and loss of important information, resulting in poor compression effects of trajectory data.

[0004] Therefore, there is an urgent need to propose a method, device, electronic device and storage medium for compressing trajectory data to solve the problems of trajectory point loss and inability to effectively process curved paths during the abnormal detection of trajectory points in the prior art, resulting in a decrease in trajectory accuracy. Summary of the Invention

[0005] In view of this, it is necessary to provide a method, device, electronic device and storage medium for compressing trajectory data to solve the problems of trajectory point loss and inability to effectively process curved paths during the abnormal detection of trajectory points in the prior art, resulting in a decrease in trajectory accuracy.

[0006] To solve the above problems, in a first aspect, the present invention provides a method for compressing trajectory data, including: Obtain the trajectory data of a vehicle during driving; the trajectory data includes a plurality of consecutive sampling points; According to the trajectory data, determine at least one driving type and the driving data of each driving type; According to the driving data, determine the sampling point set, adjustment threshold, and weight of each driving type; Perform rejection and trajectory fitting on the sampling point set according to the adjustment threshold and the weight to obtain the compressed target trajectory data.

[0007] In a possible implementation manner, the driving data includes a driving path, a driving speed, an angle of direction change, and a time interval for collecting trajectory points; the determining the sampling point set, adjustment threshold, and weight of each driving type according to the driving data includes: According to the driving path of each driving type in the trajectory data, determine the sampling point set corresponding to each driving type; According to the driving speed, the angle of direction change, and the time interval of each driving type, determine the corresponding adjustment threshold; According to the driving speed and the angle of direction change, determine the weight of each driving type.

[0008] In a possible implementation manner, the performing rejection and trajectory fitting on the sampling point set according to the adjustment threshold and the weight to obtain the compressed target trajectory data includes: According to the connection line of the sampling points in the trajectory data, determine the maximum vertical distance of the sampling point set of each driving type; Judge the sampling points in the sampling point set according to the adjustment threshold, the weight, and the maximum vertical distance of each driving type to determine the sampling points to be deleted in the sampling point set; Process the trajectory data according to the sampling points to be deleted to obtain the compressed target trajectory data.

[0009] In a possible implementation manner, the determining the maximum vertical distance of the sampling point set of each driving type according to the connection line of the sampling points in the trajectory data includes: According to the starting point and the ending point of the sampling points in the trajectory data, determine the connection line; Calculate the vertical distance of each sampling point according to the connection line; According to the vertical distances of the sampling points in the sampling point set of each driving type, determine the corresponding maximum vertical distance.

[0010] In a possible implementation, processing the trajectory data according to the sampling points to be deleted to obtain the compressed target trajectory data includes: Removing all the sampling points to be deleted in the trajectory data to obtain a set of target sampling points; Performing trajectory fitting according to the set of target sampling points to obtain the compressed target trajectory data.

[0011] In a possible implementation, judging the sampling points in the set of sampling points according to the adjustment threshold, the weight, and the maximum vertical distance of each driving type to determine the sampling points to be deleted in the set of sampling points includes: Determining the number of samples of each driving type according to the weight; Judging the vertical distance and the maximum vertical distance of the sampling points in the corresponding set of sampling points according to the number of samples and the adjustment threshold of each driving type to determine the sampling points to be deleted in the number of samples in the set of sampling points.

[0012] In a possible implementation, judging the vertical distance and the maximum vertical distance of the sampling points in the corresponding set of sampling points according to the number of samples and the adjustment threshold of each driving type to determine the sampling points to be deleted in the number of samples in the set of sampling points includes: Judging whether the product of the vertical distances of the first sampling point and the last sampling point in the set of sampling points and / or the maximum vertical distance is less than or equal to the adjustment threshold; If so, determining the sampling points to be deleted between the first sampling point and the last sampling point according to the number of samples; If not, performing segmented recursive processing on the set of sampling points according to the maximum vertical distance to obtain a first segmented set and a second segmented set, determining the maximum vertical distance in the corresponding sets, and judging the sampling points and the maximum vertical distance in the first segmented set and the second segmented set respectively according to the adjustment threshold and the number of samples to obtain the sampling points to be deleted.

[0013] In a second aspect, the present invention also provides a device for compressing trajectory data, including: A data acquisition module, configured to acquire trajectory data during the driving of a vehicle; the trajectory data includes a plurality of consecutive sampling points; A type determination module, configured to determine at least one driving type and the driving data of each driving type according to the trajectory data; A set determination module, configured to determine a set of sampling points, an adjustment threshold, and a weight of each driving type according to the driving data; A data compression module, configured to eliminate and perform trajectory fitting on the set of sampling points according to the adjustment threshold and the weight, so as to obtain compressed target trajectory data.

[0014] In a third aspect, an embodiment of the present invention discloses an electronic device, including: a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, each step of the embodiment of the above-mentioned trajectory data compression method is implemented.

[0015] In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each step of the embodiment of the above-mentioned trajectory data compression method is implemented.

[0016] The beneficial effects of the present invention are as follows: The trajectory data of the vehicle during driving is classified to obtain driving data of different driving types, so that the driving data of different driving types can be processed in subsequent processes. The driving type may include a curved path, thereby realizing the detection of the curved path; It is also possible to determine the set of sampling points, the adjustment threshold, and the weight for each driving type according to the driving data, so that the set of sampling points can be eliminated and trajectory fitting can be performed according to the adjustment threshold and the weight to obtain compressed target trajectory data, that is: the adjustment threshold and the weight are correspondingly set for the driving data of different driving types to achieve precise trajectory compression of various driving data, and further improve the accuracy of the compressed trajectory, ensuring the integrity and accuracy of the trajectory information. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic flowchart of an embodiment of the trajectory data compression method provided by the present invention; Figure 2 For the present invention Figure 1 It is a schematic flowchart of an embodiment of step S103 in the present invention; Figure 3 It is a schematic structural diagram of all sampling points in the trajectory data of the vehicle provided by the present invention; Figure 4 For the present invention Figure 1 It is a schematic flowchart of an embodiment of step S104 in the present invention; Figure 5 It is a schematic structural diagram of an embodiment of the sampling point vertical line graph provided by the present invention; Figure 6 It is a schematic structural diagram of an embodiment of the trajectory data compression device provided by the present invention; Figure 7 It is a schematic structural diagram of an embodiment of the electronic device provided by the present invention. Detailed implementation manners

[0018] The preferred embodiments of the present invention will be specifically described below with reference to the accompanying drawings. The accompanying drawings form a part of this application and are used together with the embodiments of the present invention to explain the principles of the present invention, rather than to limit the scope of the present invention.

[0019] The Douglas - Peucker algorithm (DP algorithm) is a classic trajectory thinning algorithm, mainly used to simplify curves or trajectories by reducing the number of data points while maintaining the basic shape of the curve.

[0020] As Figure 1 shown, a specific embodiment of the present invention discloses a method for compressing trajectory data, including: S101. Obtain the trajectory data of the vehicle during driving; the trajectory data includes a plurality of consecutive sampling points.

[0021] The embodiments of the present invention can be applied to a trajectory data compression system. The trajectory data compression system can be connected to a GPS satellite. The GPS satellite positioning system calculates the position information of the vehicle by receiving the signals sent by the GPS satellite and then sends it to the trajectory data compression system. The trajectory data compression system can be a software system running on a terminal device. The terminal device can be a server, a tablet computer, an in - vehicle device, an Augmented Reality (AR) / Virtual Reality (VR) device, a laptop computer, an Ultra - Mobile Personal Computer (UMPC), a netbook, a Personal Digital Assistant (PDA), a mobile phone, or other terminal devices. The specific type of the terminal device is not limited in the embodiments of this application.

[0022] Among them, the possible driving types of the vehicle during driving include straight - line driving, turning driving, and stationary, etc. The corresponding generated paths are straight - line paths, turning paths, and stationary dwells respectively. The straight - line path means that when the vehicle is driving at a constant speed and direction, the consecutive sampling points will show a linear distribution, and there are a large number of redundancies in such points; the turning path means that when the vehicle changes direction, the spatial distribution of the sampling points forms a curve, and such points need to be retained with emphasis to reflect the trajectory change characteristics; the stationary dwell means that when the vehicle is in a stagnant state, the sampling points are concentrated in a single area and the timestamps are close, and such points can be compressed into a single dwell point. Thus, the sampling points collected during driving can be obtained according to the driving path of the vehicle during driving, and the trajectory data can be obtained based on all the sampling points.

[0023] S102. Determine at least one driving type and the driving data of each driving type according to the trajectory data.

[0024] Among them, in order to perform different processing according to the driving conditions of the vehicle in different situations, the trajectory data can be divided, so that the driving data in different driving situations can be obtained. For example, if the vehicle has traveled in a straight line, turned, and stopped during driving, the trajectory data may include types such as straight-line driving, turning driving, and stationary, so that the driving data corresponding to each driving type in the trajectory data can be obtained. For example, the driving data during straight-line driving, etc.

[0025] S103. Determine the sampling point set, adjustment threshold, and weight of each driving type according to the driving data.

[0026] Among them, according to the driving data of each driving type, the sampling point set of each driving type can be determined. For example, all the sampling points collected from the start of the vehicle's deceleration to the completion of low-speed driving are in the sampling point set of low-speed driving. Similarly, the sampling point set during high-speed driving and the sampling point set during turning of the vehicle can be obtained. The adjustment thresholds and weights of different driving types are different. For example, if it is low-speed driving or turning driving, the adjustment threshold and weight can be larger; if it is high-speed driving, the adjustment threshold and weight can be smaller.

[0027] S104. Eliminate and perform trajectory fitting on the sampling point set according to the adjustment threshold and weight to obtain the compressed target trajectory data.

[0028] Among them, after determining the adjustment threshold and weight of each driving type, the sampling point set of each driving type can be eliminated according to the adjustment threshold and weight of each driving type. The Douglas-Peucker algorithm can be used to eliminate the sampling point set, and then trajectory fitting is performed on the eliminated sampling point set, so that the compressed target trajectory data can be obtained.

[0029] Compared with the prior art, the trajectory data of the vehicle during driving in this embodiment is classified to obtain the driving data of different driving types, so that the driving data of different driving types can be processed in the subsequent process. The driving type may include a curved path, thus realizing the detection of the curved path; the sampling point set, adjustment threshold, and weight of each driving type can also be determined according to the driving data, so that the sampling point set can be eliminated and trajectory fitting can be performed according to the adjustment threshold and weight to obtain the compressed target trajectory data, that is: the adjustment threshold and weight are set correspondingly for the driving data of different driving types to achieve precise trajectory compression of various driving data, and then the accuracy of the compressed trajectory can be improved, ensuring the integrity and accuracy of the trajectory information.

[0030] In some embodiments of the present invention, the driving data includes the driving path, driving speed, direction change angle, and time interval for collecting trajectory points; as Figure 2 shown, step S103 includes: S201. Determine the set of sampling points corresponding to each driving type according to the driving path of each driving type in the trajectory data.

[0031] Among them, the trajectory data can be divided according to information such as the vehicle speed, steering wheel angle, and time during driving, so that the driving data of each driving type can be obtained. The driving data can include the driving path, driving speed, direction change angle, and time interval for collecting trajectory points, etc., as Figure 3 shown. Figure 3 Let all the sampling points in the trajectory data of the vehicle be shown. According to the driving path, driving speed, direction change angle, and time interval for collecting trajectory points, it can be determined that P1 to P4 are low-speed straight driving, that is, the driving type is low-speed driving, P4 to P10 are low-speed turning driving, that is, the driving type is turning driving, and P10 to P14 are high-speed straight driving, that is, the driving type is high-speed driving.

[0032] S202. Determine the corresponding adjustment threshold according to the driving speed, direction change angle, and time interval of each driving type.

[0033] Among them, the adjustment threshold of each driving type can be determined according to the driving speed, direction change angle, and time interval of each driving type. For example, if the driving speed is slow and / or the direction change angle changes and / or the time interval is long, it means that the vehicle is driving more cautiously during this period and needs to be focused on. Then the adjustment threshold at this place can be dynamically increased, and the adjustment amount of the adjustment threshold is set differently according to different driving speeds, direction change angles, and time intervals. For example, the adjustment thresholds corresponding to different magnitudes of the direction change angle are different. The larger the direction change angle, the larger the turn, and the more key processing is required, so the adjustment threshold is larger. The same applies to others. The specific adjustment thresholds set in the embodiments of the present invention are not limited herein.

[0034] S203. Determine the weight of each driving type according to the driving speed and direction change angle.

[0035] Among them, different driving types are set with different weights. For example, for low-speed driving or turning driving, since the sampling points are prone to errors, the weight is relatively large. To ensure accuracy, more sampling points are required. When the vehicle is driving at a low speed or turning, the geometric change of the trajectory is significant, then the adjustment threshold dynamically increases. The larger the adjustment threshold, the more sampling points are retained. When the vehicle is driving at a high speed and the direction change is not significant, the spatial distribution of the sampling points tends to be linear, the adjustment threshold dynamically decreases, and more sampling points are deleted. Among them, it is possible to judge whether a significant direction change occurs by calculating the included angle of the directions of adjacent trajectory points ( Figure 3 the included angle between the extension line of the trajectory points P3P4 and the straight line P4P5 in the middle), and if a significant change occurs, the adjustment threshold dynamically increases and the sampling weight is increased.

[0036] In some embodiments of the present invention, as Figure 4 shown, step S104 includes: S401. Determine the maximum vertical distance of the sampling point set of each driving type according to the connection line of the sampling points in the trajectory data.

[0037] Among them, the starting point and the ending point in the trajectory data can be determined, and according to the connection line of the starting point and the ending point, the maximum vertical distance of the sampling point set of each driving type can be determined.

[0038] S402. Judge the sampling points in the sampling point set according to the adjustment threshold, weight and maximum vertical distance of each driving type, and determine the sampling points to be deleted in the sampling point set.

[0039] Among them, the Douglas-Peucker algorithm can be used to judge the sampling points in the corresponding sampling point set according to the adjustment threshold, weight and maximum vertical distance of each driving type, so as to determine the sampling points to be deleted in each sampling point set.

[0040] S403. Process the trajectory data according to the sampling points to be deleted to obtain the compressed target trajectory data.

[0041] Among them, after determining the sampling points to be deleted, all the sampling points to be deleted in the trajectory data can be processed, so as to obtain the compressed target trajectory data.

[0042] In some embodiments of the present invention, step S401 includes: Determine the connection line according to the starting point and the ending point of the sampling points in the trajectory data; Calculate the vertical distance of each sampling point according to the connection line; Determine the corresponding maximum vertical distance according to the vertical distances of the sampling points in the sampling point set of each driving type.

[0043] In a specific embodiment of the present invention, the starting point and the ending point of the sampling points in the trajectory data can be determined, and then the starting point and the ending point are connected to obtain a connecting line. Then, a perpendicular line from each sampling point to the connecting line is made, and the vertical distance of each sampling point is calculated. Based on the vertical distances of the sampling points in the sampling point set of each driving type, the sampling point corresponding to the maximum vertical distance of each sampling point set is determined. As Figure 5 shown Figure 5 is a sampling point perpendicular line diagram. P1 and P14 are the starting point and the ending point respectively. The dotted line between P1 and P14 is the connecting line. The distances from the perpendicular lines of P2 to P13 to the connecting line are the vertical distances of each sampling point. Among them, the driving from P1 to P4 is low-speed driving. P4 has the largest vertical distance in the set of low-speed driving types. Therefore, the distance of P4 is the maximum vertical distance Pmax of low-speed driving. The driving type from P4 to P10 is turning driving. P7 has the largest vertical distance in the set of turning driving. Therefore, the distance of P7 is the maximum vertical distance Pmax of turning driving. The driving type from P10 to P14 is high-speed driving. P10 has the largest vertical distance in the set of high-speed driving types. Therefore, the distance of P10 is the maximum vertical distance Pmax of high-speed driving.

[0044] In some embodiments of the present invention, step S402 includes: Determine the sampling quantity of each driving type according to the weight; Based on the sampling quantity and the adjustment threshold of each driving type, judge the vertical distance and the maximum vertical distance of the sampling points in the corresponding sampling point set, and determine the sampling points to be deleted in the sampling point set.

[0045] Among them, according to the above content, the weight and the adjustment threshold of high-speed driving are less than those of turning driving and low-speed driving and greater than those of stationary. This means that the number of sampling points to be retained for turning driving and low-speed driving is greater than that of high-speed driving and greater than that of stationary. Then, the corresponding sampling quantity can be determined according to the weight of each driving type, so that the sampling accuracy can be adaptively adjusted according to the weight. When the speed is fast, the angle of direction change is small, and the time interval for collecting trajectory points becomes shorter, the adjustment threshold is small, and the number of sampling points to be retained is small, so the sampling quantity is small. When the speed is slow, the angle of direction change is large, and the time interval for collecting trajectory points becomes longer, the adjustment threshold is large, and the number of sampling points to be retained is large, so the sampling quantity is large. The specific size of the sampling quantity can be determined according to data such as speed, time interval, and angle in different situations. Then, based on the adjustment threshold of each driving type, the vertical distance and the maximum vertical distance of the sampling points in the corresponding sampling point set can be judged to determine the sampling points to be deleted in the sampling point set. Among them, the number of sampling points except the sampling points to be deleted in the sampling point set is the sampling quantity.

[0046] In some embodiments of the present invention, the vertical distance and the maximum vertical distance of the sampling points in the corresponding sampling point set are judged according to the sampling quantity and the adjustment threshold of each driving type, and it is determined whether the sampling points to be deleted in the sampling quantity of the sampling point set / or the maximum vertical distance is less than or equal to the adjustment threshold, including: Judging whether the product of the vertical distances of the first sampling point and the last sampling point in the sampling point set and / or the maximum vertical distance is less than or equal to the adjustment threshold; If so, determine the sampling points to be deleted between the first sampling point and the last sampling point according to the sampling quantity; If not, perform segmented recursive processing on the sampling point set according to the maximum vertical distance to obtain a first segmented set and a second segmented set, and determine the maximum vertical distance in the corresponding set. Judge the sampling points and the maximum vertical distance in the first segmented set and the second segmented set respectively according to the adjustment threshold and the sampling quantity to obtain the sampling points to be deleted.

[0047] In a specific embodiment of the present invention, for the sampling quantities of different driving types, after determining the adjustment threshold and sampling quantity for each driving type, the sampling points in the sampling point set of each driving type can be judged respectively. It is judged whether the product of the vertical distances and / or the maximum vertical distance between the first sampling point and the last sampling point in the sampling point set is less than or equal to the adjustment threshold. If the currently judged driving type is low-speed driving, the sampling point set is P = {P1, P2, …, P4}; if it is turning driving, the sampling point set is P = {P4, P25, …, P10}; if it is high-speed driving, the sampling point set is P = {P10, P11, …, P14}. For separate calculation, the sampling point set is uniformly replaced by P = {P1, P2, …, Pn}. Then it is judged whether d(Pmax, P1Pn) <= ϵ (adjustment threshold) holds. If so, the points between P1 and Pn are determined as the sampling points to be deleted. When the number of other sampling points in the sampling point set except the sampling points to be deleted is not equal to the sampling quantity, the effective sampling points in the sampling point set are increased or decreased. For example, when driving at high speed, there are more effective sampling points in the sampling point set, and the redundant sampling points are determined as the sampling points to be deleted according to the averaging method or the random method. When driving at low speed or turning, the sampling points can be expanded according to the expansion method or the equal division method. The specific process can be set according to the actual situation, and the embodiments of the present invention do not limit it here. When d(Pmax, P1Pn) <= ϵ does not hold, that is, when d(Pmax, P1Pn) > ϵ (adjustment threshold), Pmax is used as the key point, and P1 to Pmax and Pmax + 1 to Pn are processed recursively in segments. Then, through the above judgment process, the sampling point sets of P1 to Pmax (i.e., the first segmented set) and Pmax + 1 to Pn (i.e., the second segmented set) can be processed respectively. The specific process is to determine the maximum vertical distance of the set and judge whether d(Pmax, P1Pn) <= ϵ (adjustment threshold) is satisfied, so as to perform a loop until all sampling points are processed to obtain all the sampling points to be deleted.

[0048] In some embodiments of the present invention, step S403 includes: Eliminating all the sampling points to be deleted in the trajectory data to obtain a target sampling point set; Performing trajectory fitting according to the target sampling point set to obtain the compressed target trajectory data.

[0049] In a specific embodiment of the present invention, after obtaining the sampling points to be deleted in each set of sampling points, all the sampling points to be deleted in the trajectory data can be removed, so that the remaining valid sampling points can be obtained, thereby compressing the number of sampling points of the vehicle driving path to obtain a target set of sampling points. The target set of sampling points can also be subjected to trajectory fitting to obtain compressed target trajectory data. The retained sampling points can accurately restore the vehicle driving path, and there is no obvious trajectory distortion or path deviation phenomenon in the dynamic trajectory playback.

[0050] By dynamically adjusting and optimizing parameters, the embodiment of the present invention solves the problems of poor scene adaptability and many abnormal points in the existing trajectory compression technology in the construction industry, realizes the efficient compression of trajectory data, accurately retains key points, and improves data integrity and processing efficiency.

[0051] To better implement the trajectory data compression method in the embodiment of the present invention, correspondingly, based on the trajectory data compression method, the embodiment of the present invention also provides a trajectory data compression device, as Figure 6 shown. The trajectory data compression device 600 includes: A data acquisition module 601, configured to acquire trajectory data of a vehicle during driving; the trajectory data includes a plurality of continuous sampling points; A type determination module 602, configured to determine at least one driving type and driving data of each driving type according to the trajectory data; A set determination module 603, configured to determine a set of sampling points, an adjustment threshold, and a weight of each driving type according to the driving data; A data compression module 604, configured to remove and perform trajectory fitting on the set of sampling points according to the adjustment threshold and the weight to obtain compressed target trajectory data.

[0052] The above-described trajectory data compression device 600 provided in the above embodiment can implement the technical solutions described in the above trajectory data compression method embodiment. The specific implementation principles of the above modules or units can be referred to the corresponding content in the above trajectory data compression method embodiment, and will not be elaborated here.

[0053] As Figure 7 shown, the present invention also correspondingly provides an electronic device 700. The electronic device 700 includes a processor 701, a memory 702, and a display 703. Figure 7 Only some components of the electronic device 700 are shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.

[0054] The memory 702 can be an internal storage unit of the electronic device 700 in some embodiments, such as the hard disk or memory of the electronic device 700. The memory 702 can also be an external storage device of the electronic device 700 in other embodiments, such as a plug-in hard disk equipped on the electronic device 700, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc.

[0055] Furthermore, the memory 702 can include both the internal storage unit of the electronic device 700 and the external storage device. The memory 702 is used to store the application software installed on the electronic device 700 and various types of data.

[0056] The processor 701 can be a Central Processing Unit (CPU), a microprocessor, or other data processing chips in some embodiments, and is used to run the program code stored in the memory 702 or process data, such as the compression method of the trajectory data in the present invention.

[0057] The display 703 can be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. in some embodiments. The display 703 is used to display the information of the electronic device 700 and to display a visual user interface. The components 701-703 of the electronic device 700 communicate with each other through the system bus.

[0058] In some embodiments of the present invention, when the processor 701 executes the trajectory data compression program in the memory 702, the following steps can be implemented: Obtain the trajectory data of the vehicle during driving; the trajectory data includes a plurality of continuous sampling points; Determine at least one driving type and the driving data of each driving type according to the trajectory data; Determine the sampling point set, adjustment threshold, and weight of each driving type according to the driving data; Eliminate and perform trajectory fitting on the sampling point set according to the adjustment threshold and weight to obtain the compressed target trajectory data.

[0059] It should be understood that when the processor 701 executes the trajectory data compression program in the memory 702, in addition to the above functions, other functions can also be implemented. For specific details, please refer to the description of the corresponding method embodiments above.

[0060] Furthermore, the embodiments of the present invention do not specifically limit the type of the mentioned electronic device 700. The electronic device 700 may be a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop, or other portable electronic devices. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices running IOS, android, microsoft, or other operating systems. The above portable electronic devices may also be other portable electronic devices, such as a laptop with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 700 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0061] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium is used to store computer-readable programs or instructions. When the programs or instructions are executed by a processor, the method steps or functions for compressing trajectory data provided by the above method embodiments can be implemented.

[0062] Those skilled in the art can understand that all or part of the processes for implementing the methods of the above embodiments can be completed by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program. The computer program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a magnetic disk, an optical disk, a read-only memory, or a random access memory, etc.

[0063] The above has introduced in detail the method, device, electronic device, and storage medium for compressing trajectory data provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for compressing trajectory data, characterized in that Including: Obtaining trajectory data of a vehicle during driving; The trajectory data includes a plurality of consecutive sampling points; According to the trajectory data, determining at least one driving type and driving data of each driving type; According to the driving data, determining a sampling point set, an adjustment threshold, and a weight for each driving type; Performing rejection and trajectory fitting on the sampling point set according to the adjustment threshold and the weight to obtain compressed target trajectory data.

2. The compression method of trajectory data according to claim 1, characterized in that The driving data includes a driving path, a driving speed, an angle of direction change, and a time interval for collecting trajectory points; the determining a sampling point set, an adjustment threshold, and a weight for each driving type according to the driving data includes: Determining the sampling point set corresponding to each driving type according to the driving path of each driving type in the trajectory data; Determining a corresponding adjustment threshold according to the driving speed, the angle of direction change, and the time interval of each driving type; Determining the weight of each driving type according to the driving speed and the angle of direction change.

3. The compression method of trajectory data according to claim 1, characterized in that The performing rejection and trajectory fitting on the sampling point set according to the adjustment threshold and the weight to obtain compressed target trajectory data includes: Determining the maximum vertical distance of the sampling point set of each driving type according to the connection line of the sampling points in the trajectory data; Judging the sampling points in the sampling point set according to the adjustment threshold, the weight, and the maximum vertical distance of each driving type to determine the sampling points to be deleted in the sampling point set; Processing the trajectory data according to the sampling points to be deleted to obtain compressed target trajectory data.

4. The compression method of trajectory data according to claim 3, wherein The determining the maximum vertical distance of the sampling point set of each driving type according to the connection line of the sampling points in the trajectory data includes: Determining a connection line according to the starting point and the ending point of the sampling points in the trajectory data; Calculating the vertical distance of each sampling point according to the connection line; Determining the corresponding maximum vertical distance according to the vertical distances of the sampling points in the sampling point set of each driving type.

5. The compression method of trajectory data according to claim 3, characterized in that, The processing the trajectory data according to the sampling points to be deleted to obtain compressed target trajectory data includes: Deleting all the sampling points to be deleted in the trajectory data to obtain a target sampling point set; Performing trajectory fitting according to the target sampling point set to obtain compressed target trajectory data.

6. The compression method of trajectory data according to claim 4, characterized in that, The judging the sampling points in the sampling point set according to the adjustment threshold, the weight, and the maximum vertical distance of each driving type to determine the sampling points to be deleted in the sampling point set includes: Determining the sampling quantity of each driving type according to the weight; Judging the vertical distance and the maximum vertical distance of the sampling points in the corresponding sampling point set according to the sampling quantity and the adjustment threshold of each driving type to determine the sampling points to be deleted in the sampling quantity of the sampling point set.

7. The compression method of trajectory data according to claim 6, characterized in that Judging the vertical distance and the maximum vertical distance of the sampling points in the corresponding sampling point set according to the sampling quantity and the adjustment threshold of each driving type to determine the sampling points to be deleted in the sampling quantity in the sampling point set, including: Judging whether the product of the vertical distances of the first sampling point and the last sampling point in the sampling point set and / or the maximum vertical distance is less than or equal to the adjustment threshold; If so, determining the sampling points to be deleted between the first sampling point and the last sampling point according to the sampling quantity; If not, performing segmented recursive processing on the sampling point set according to the maximum vertical distance to obtain a first segmented set and a second segmented set, determining the maximum vertical distance in the corresponding set, and judging the sampling points and the maximum vertical distance in the first segmented set and the second segmented set respectively according to the adjustment threshold and the sampling quantity to obtain the sampling points to be deleted.

8. A compression device for trajectory data, characterized in that, Including: A data acquisition module, configured to acquire trajectory data of a vehicle during driving; The trajectory data includes a plurality of consecutive sampling points; A type determination module, configured to determine at least one driving type and the driving data of each driving type according to the trajectory data; A set determination module, configured to determine a sampling point set, an adjustment threshold, and a weight of each driving type according to the driving data; A data compression module, configured to eliminate and perform trajectory fitting on the sampling point set according to the adjustment threshold and the weight to obtain compressed target trajectory data.

9. An electronic device, characterized in that, Including: A processor, a memory, and a computer program stored on the memory and capable of running on the processor, where when the computer program is executed by the processor, the steps of the trajectory data compression method described in any one of claims 1-7 are implemented.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the trajectory data compression method described in any one of claims 1-7 are implemented.