Trajectory data compression and decompression method, device, equipment and medium

By matching trajectory points to the electronic map road network and thinning them according to road segment feature information, the problem of wasted storage resources in traditional trajectory data compression methods is solved, achieving efficient trajectory data compression and accurate restoration.

CN117009304BActive Publication Date: 2026-02-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210455818.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2026-02-17
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

Traditional trajectory data compression methods result in the loss of important data, have limited compression ratios, and lead to a waste of storage resources.

Method used

The trajectory points are matched to the road network of the electronic map, and the key trajectory segments are obtained by thinning based on the road segment feature information and then compressed and stored.

Benefits of technology

Reduce the number of stored trajectory segments, increase the compression ratio, save storage resources, and ensure accurate restoration of trajectory data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009304B_ABST
    Figure CN117009304B_ABST
Patent Text Reader

Abstract

The application relates to a trajectory data compression and decompression method, device, equipment and medium, and is applied to the field of maps. The method comprises the following steps: acquiring a trajectory point representing an object trajectory; matching the trajectory point to a road network of an electronic map to obtain at least one object trajectory section; the object trajectory section is a section passed by the object in the road network; performing thinning processing on the at least one object trajectory section according to section characteristic information corresponding to each object trajectory section to obtain a key trajectory section; the key trajectory section is a part of the object trajectory section and is used for restoring the object trajectory; and the key trajectory section is compressed and stored to obtain trajectory compression data. The method can save storage resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to data compression and decompression technologies, and more particularly to the field of electronic maps, and in particular to a method, apparatus, device, and medium for compressing and decompressing trajectory data. Background Technology

[0002] Electronic maps are a new type of map generated from physical maps using network technology, communication technology, and geographic information system technology. They can be used for quick queries and navigation. Electronic maps are ubiquitous in daily life; for example, we can use them for destination navigation, destination search, and route planning. As the application of electronic maps becomes more widespread and the number of users increases, the amount of trajectory data generated based on electronic maps is also increasing, requiring significant storage resources to store such massive amounts of data.

[0003] Traditional techniques typically store only a subset of trajectory points from the original trajectory point sequence whose connecting lines form angles greater than a certain threshold, in order to reduce the storage space required for trajectory data. However, traditional compression methods are prone to losing important trajectory data, and the degree of data loss is directly proportional to the compression ratio; the higher the compression ratio, the more original trajectory data is lost. Therefore, to avoid excessive data loss, traditional compression methods often cannot achieve very high compression ratios, resulting in excessive memory usage and wasted storage resources. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, device, and medium for compressing and decompressing trajectory data that can save storage resources, in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a trajectory data compression method, the method comprising:

[0006] Obtain the trajectory points representing the trajectory of the object;

[0007] The trajectory points are matched to the road network of the electronic map to obtain at least one object trajectory segment; the object trajectory segment is the segment of the road that the object passes through in the road network;

[0008] Based on the road segment feature information corresponding to each of the object trajectory segments, at least one object trajectory segment is thinned to obtain a key trajectory segment; the key trajectory segment is a portion of the object trajectory segments used to reconstruct the object trajectory.

[0009] Compressed data is obtained by storing the key trajectory segments.

[0010] Secondly, this application provides a trajectory data compression device, the device comprising:

[0011] The first acquisition module is used to acquire trajectory points that represent the trajectory of the object;

[0012] The matching module is used to match the trajectory points to the road network of the electronic map to obtain at least one object trajectory segment; the object trajectory segment is the road segment traversed by the object in the road network;

[0013] The thinning module is used to perform thinning processing on at least one object trajectory segment according to the segment feature information corresponding to each object trajectory segment to obtain key trajectory segments; the key trajectory segments are the segments in the object trajectory segments and are used to reconstruct the object trajectory.

[0014] The storage module is used to compress and store the key trajectory segments to obtain compressed trajectory data.

[0015] In one embodiment, the matching device is further configured to, for each trajectory point, determine each candidate trajectory segment located within the reference area of ​​the trajectory point in the road network of the electronic map, and determine the road network point closest to the trajectory point from each candidate trajectory segment of the trajectory point as a candidate road network point, thereby obtaining a set of candidate road network points; filter out the target road network point set with the highest probability of generating the object trajectory from the set of candidate road network points, and determine the candidate trajectory segment where each target road network point in the set of target road network points is located as the object trajectory segment.

[0016] In one embodiment, the road segment feature information includes the in-degree and out-degree information of the object trajectory road segment; the endpoints of each object trajectory road segment include a first road element passed first and a second road element passed later; the in-degree and out-degree information includes the out-degree of the first road element and the in-degree of the second road element of the trajectory road segment; the thinning module is further configured to determine object trajectory road segments that satisfy the path uniqueness condition from the at least one object trajectory road segment according to the in-degree and out-degree information; delete the determined object trajectory road segments, and designate the object trajectory road segments that have not been deleted as key trajectory road segments.

[0017] In one embodiment, the at least one object trajectory segment includes a diversion trajectory segment; the diversion trajectory segment is an object trajectory segment on a diversion path starting from a road intersection; the segment feature information of the diversion trajectory segment includes trajectory distribution information on the diversion trajectory segment; the thinning module is further configured to determine object trajectory segments that meet the trajectory sparsity condition from the at least one object trajectory segment based on the trajectory distribution information; delete the determined object trajectory segments, and designate the undeleted object trajectory segments as key trajectory segments.

[0018] In one embodiment, the trajectory distribution information includes trajectory diversion information on the diversion trajectory segment; the trajectory sparsity condition includes traffic sparsity condition; the thinning module is further configured to determine, based on the trajectory diversion information, object trajectory segments that satisfy the traffic sparsity condition from the at least one object trajectory segment.

[0019] In one embodiment, the storage module is further configured to map the initial road segment information of the key trajectory segment to target road segment information represented by a target number of bytes; the initial road segment information is represented by an initial number of bytes; the initial number is greater than the target number; and the target road segment information represented by the target number of bytes is compressed and stored to obtain trajectory compressed data.

[0020] In one embodiment, the storage module is further configured to perform differential processing on the target road segment information represented by the target number of bytes to obtain a differential result for characterizing the key trajectory road segment; and to compress and store the differential result for characterizing the key trajectory road segment to obtain trajectory compressed data.

[0021] The aforementioned trajectory data compression method obtains trajectory points representing the object's trajectory and matches these points to the road network of an electronic map, resulting in at least one object trajectory segment. This ensures that the object's trajectory points accurately fall within the road network of the electronic map. Based on the road segment feature information corresponding to each object trajectory segment, at least one object trajectory segment is thinned to obtain key trajectory segments for reconstructing the object's trajectory. These key trajectory segments are then compressed and stored to obtain compressed trajectory data. This application thins object trajectory segments based on the road segment feature information corresponding to the object trajectory segments, reducing the number of object trajectory segments ultimately stored, improving the compression ratio of the trajectory data, thereby reducing the memory space occupied by trajectory data storage, saving storage resources, and effectively avoiding waste of storage resources.

[0022] Thirdly, this application provides a method for decompressing trajectory data, the method comprising:

[0023] The trajectory compression data is obtained by compressing and storing key trajectory segments in the road network; wherein, the key trajectory segments are obtained by thinning out at least one matched object trajectory segment based on the segment feature information corresponding to at least one matched object trajectory segment after matching the trajectory points representing the object trajectory to the road network of the electronic map.

[0024] The compressed trajectory data is decompressed to obtain the restored object trajectory points.

[0025] Fourthly, this application provides a trajectory data decompression device, the device comprising:

[0026] The second acquisition module is used to acquire compressed trajectory data obtained by compressing and storing key trajectory segments in the road network; wherein, the key trajectory segments are obtained by thinning out at least one matched object trajectory segment based on the segment feature information corresponding to at least one matched object trajectory segment after matching the trajectory points representing the object trajectory to the road network of the electronic map.

[0027] The decompression module is used to decompress the trajectory compressed data to obtain the restored object trajectory points.

[0028] In one embodiment, the trajectory compression data is obtained by compressing and storing initial road segment information based on the key trajectory segment and represented by an initial number of bytes; the decompression module is further configured to select the path with the shortest object movement time from multiple candidate trajectory paths of the road network as the target trajectory path; the candidate road segment information corresponding to the candidate trajectory path includes the initial road segment information of the key trajectory segment; the candidate road segment information is the road segment information of each road segment in the candidate trajectory path; and the endpoints of each road segment in the target trajectory path are used as the restored object trajectory points.

[0029] In one embodiment, the trajectory compression data is obtained by compressing and storing the target road segment information based on the key trajectory road segment; the target road segment information is obtained by mapping the initial road segment information represented by an initial number of bytes to a target number of bytes; the initial number is greater than the target number; the decompression module is further used to reverse map the target road segment information represented by the target number of bytes to the initial road segment information represented by the initial number of bytes.

[0030] In one embodiment, the trajectory compression data is obtained by compressing and storing the differential results used to characterize the key trajectory segments; the differential results used to characterize the key trajectory segments are obtained by differential processing the target segment information represented by a target number of bytes; the decompression module is further used to perform inverse differential processing on the differential results used to characterize the key trajectory segments to obtain the target segment information represented by a target number of bytes.

[0031] The aforementioned trajectory data decompression method obtains compressed trajectory data based on key trajectory segments in the road network, decompresses the compressed trajectory data, and obtains the restored object trajectory points. The key trajectory segments are obtained by thinning out at least one matched object trajectory segment based on the road segment feature information corresponding to at least one matched object trajectory segment after matching the trajectory points representing the object trajectory to the road network of the electronic map. This application thins out object trajectory segments based on the road segment feature information corresponding to the object trajectory segments, which reduces the number of object trajectory segments ultimately stored, improves the compression ratio of the trajectory data, and thus reduces the memory space occupied by trajectory data storage, saving storage resources and effectively avoiding waste of storage resources. Furthermore, because the thinning process fully considers the road segment feature information corresponding to the object trajectory segments, this application achieves better compression and storage effects for trajectory data, and can accurately restore the object trajectory based on the compressed trajectory data, improving the accuracy of object trajectory restoration.

[0032] Fifthly, this application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the various method embodiments of this application.

[0033] Sixthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various method embodiments of this application.

[0034] In a seventh aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the various method embodiments of this application. Attached Figure Description

[0035] Figure 1 This is an application environment diagram of the trajectory data compression and decompression method in one embodiment;

[0036] Figure 2 This is a flowchart illustrating a trajectory data compression method in one embodiment;

[0037] Figure 3 This is a schematic diagram of road network matching in one embodiment;

[0038] Figure 4 This is a schematic diagram of thinning processing based on in-degree information in one embodiment;

[0039] Figure 5 This is a schematic diagram of thinning processing based on trajectory diversion information in one embodiment;

[0040] Figure 6 This is a schematic diagram illustrating the mapping process of road segment information in one embodiment;

[0041] Figure 7 This is a schematic diagram illustrating differential processing of road segment information in one embodiment;

[0042] Figure 8 This is a framework diagram of trajectory data compression processing in one embodiment;

[0043] Figure 9 This is a flowchart illustrating a trajectory data decompression method in one embodiment;

[0044] Figure 10 This is a framework diagram of decompression processing for trajectory data in one embodiment;

[0045] Figure 11 This is a flowchart illustrating the trajectory data compression method in another embodiment;

[0046] Figure 12 This is a flowchart illustrating the trajectory data decompression method in another embodiment;

[0047] Figure 13 This is a structural block diagram of a trajectory data compression device in one embodiment;

[0048] Figure 14 This is a structural block diagram of a trajectory data decompression device in one embodiment;

[0049] Figure 15 This is an internal structural diagram of a computer device in one embodiment;

[0050] Figure 16 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0052] The trajectory data compression and decompression method provided in this application can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on other servers. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal 102 and server 104 can be directly or indirectly connected via wired or wireless communication; this application does not impose any restrictions on this connection.

[0053] Terminal 102 can acquire trajectory points representing the trajectory of an object and match the trajectory points to the road network of the electronic map to obtain at least one object trajectory segment. Terminal 102 can perform thinning processing on at least one object trajectory segment according to the road segment feature information corresponding to each object trajectory segment to obtain key trajectory segments, and compress and store the key trajectory segments to obtain trajectory compressed data.

[0054] It is understood that terminal 102 can generate trajectory points representing the object's trajectory and perform subsequent compression processing on the trajectory data. It is also understood that server 104 can provide trajectory points representing the object's trajectory, and terminal 102 can obtain these trajectory points from server 104. This embodiment does not limit this; however, it should be noted that... Figure 1 The application scenarios shown are for illustrative purposes only and are not limited to these.

[0055] In one embodiment, such as Figure 2 As shown, a trajectory data compression method is provided. This method can be applied to computer devices, which can be terminals or servers. It can be executed independently by the terminal or server, or through interaction between the terminal and server. This embodiment illustrates the method applied to a computer device as an example, including the following steps:

[0056] Step 202: Obtain the trajectory points representing the trajectory of the object.

[0057] In this context, "object" refers to a physical entity moving on the road, such as a vehicle driving on the road or a person walking on the road. "Trajectory point" refers to the location point generated by the object during its movement. "Object trajectory" refers to the movement path formed by the object during its movement. It can be understood that the object continuously generates trajectory points during its movement, and the set of all trajectory points constitutes the object's movement trajectory.

[0058] Specifically, the object carries a positioning device. When the object moves on the road, the positioning device can generate a series of trajectory points that represent the object's trajectory. The computer device can obtain the trajectory points that represent the object's trajectory from the positioning device.

[0059] In one embodiment, the trajectory points representing the trajectory of an object can specifically be a set of ordered GPS (Global Positioning System) coordinate points collected by positioning devices.

[0060] Step 204: Match the trajectory points to the road network of the electronic map to obtain at least one object trajectory segment; the object trajectory segment is the road segment that the object passes through in the road network.

[0061] In this context, "road network" refers to the network of roads in an electronic map. Each road in an electronic map can be understood as being composed of multiple road segments. A road segment is a section of road divided by various road elements. Road elements are important components of a road, such as intersections, traffic lights, and road signs.

[0062] Specifically, since not all of the trajectory points acquired by the computer equipment fall within the road network, some trajectory points may fall on either side of the road. Therefore, the computer equipment can match the trajectory points representing the object's trajectory to the road network of the electronic map, so that all trajectory points are mapped into the road network. It can be understood that at least one road segment corresponding to these trajectory points is the object's trajectory segment.

[0063] In one embodiment, since the distances between roads in the road network may be very close, the trajectory points representing the object trajectory may be mapped to more than one road. The computer device can select the road most likely to generate this series of trajectory points from at least one mapped road, and at least one segment of the selected road is the object trajectory segment.

[0064] In one embodiment, such as Figure 3 As shown, the small dots displayed on the electronic map are trajectory points representing the trajectory of an object. Computer equipment can match these trajectory points to the road network of the electronic map. This is understandable. Figure 3The bold black line in the image represents the trajectory path of the object determined by the network matching, and each segment on this trajectory path is a segment of the object's trajectory.

[0065] Step 206: Based on the road segment feature information corresponding to each object trajectory segment, at least one object trajectory segment is thinned to obtain a key trajectory segment; the key trajectory segment is a part of the object trajectory segment used to reconstruct the object trajectory.

[0066] Among them, road segment feature information is information that characterizes the features of a road segment. Road segment feature information can include information characterizing the inherent characteristics of the road segment itself and information characterizing the trajectory features of objects on the road segment. The inherent characteristics of the road segment itself are features inherent to the road segment; it can be understood that the inherent characteristics of the road segment itself are unrelated to the object trajectory. The object trajectory features on the road segment are features of the object trajectory on the road segment; it can be understood that the object trajectory features on the road segment are related to the object trajectory. Thinning processing refers to minimizing the number of object trajectory segments while ensuring that the object trajectory remains unchanged. It can be understood that after thinning processing, the number of object trajectory segments will be greatly reduced, while still basically ensuring that the object trajectory is reflected. Key trajectory segments are the object trajectory segments retained after thinning processing; it can be understood that the object trajectory can be reconstructed based on the key trajectory segments.

[0067] Specifically, each object trajectory segment in at least one object trajectory segment has its own corresponding segment feature information. The computer device can perform thinning processing on at least one object trajectory segment based on the segment feature information corresponding to each object trajectory segment to obtain key trajectory segments. It can be understood that the number of key trajectory segments is much smaller than the number of object trajectory segments; therefore, the memory required for key trajectory segments is much smaller than the memory required for object trajectory segments.

[0068] In one embodiment, the road segment feature information includes the road segment structure feature information of the object trajectory road segment. The road segment structure feature information is the characteristic information inherent in the structure of a road segment, and it belongs to one of the types of information described above that characterizes the inherent features of the road segment itself. The computer device can perform thinning processing on at least one object trajectory road segment based on the road segment structure feature information corresponding to each object trajectory road segment to obtain key trajectory road segments.

[0069] In one embodiment, the road segment feature information includes the road segment trajectory feature information of the object trajectory segment. The road segment trajectory feature information is the feature information possessed by the object trajectory on the road segment, and it belongs to one of the aforementioned types of information characterizing the object trajectory features on the road segment. The computer device can perform thinning processing on at least one object trajectory segment based on the road segment trajectory feature information corresponding to each object trajectory segment to obtain key trajectory segments.

[0070] Step 208: Compress and store the key trajectory segments to obtain compressed trajectory data.

[0071] Trajectory compression data is compressed data that can be used to reconstruct the trajectory of an object.

[0072] Specifically, computer equipment can compress and store road segment information based on key trajectory segments to obtain compressed trajectory data. Road segment information is used to uniquely identify road segments.

[0073] In one embodiment, the computer device can directly store the road segment information of key trajectory segments and use the stored road segment information of key trajectory segments as trajectory compressed data.

[0074] In one embodiment, the computer device may further compress the road segment information of the key trajectory segment and use the compressed result as trajectory compressed data.

[0075] In one embodiment, the road segment information may include a road segment identifier, wherein the road segment identifier may include at least one of letters, numbers, and special characters.

[0076] In the aforementioned trajectory data compression and decompression method, trajectory points representing the object's trajectory are obtained, and these trajectory points are matched to the road network of an electronic map to obtain at least one object trajectory segment, ensuring that the object's trajectory points accurately fall within the road network of the electronic map. Based on the road segment feature information corresponding to each object trajectory segment, at least one object trajectory segment is thinned to obtain key trajectory segments for reconstructing the object's trajectory. These key trajectory segments are then compressed and stored to obtain compressed trajectory data. This application thins object trajectory segments based on the road segment feature information corresponding to the object trajectory segments, reducing the number of object trajectory segments ultimately stored, improving the compression ratio of the trajectory data, thereby reducing the memory space occupied by trajectory data storage, saving storage resources, and effectively avoiding waste of storage resources.

[0077] In one embodiment, matching trajectory points to the road network of an electronic map to obtain at least one object trajectory segment includes: for each trajectory point, determining each candidate trajectory segment located within the reference area of ​​the trajectory point in the road network of the electronic map, and determining the road network point closest to the trajectory point from each candidate trajectory segment as a candidate road network point, thereby obtaining a set of candidate road network points; selecting the target road network point set with the highest probability of generating the object trajectory from the set of candidate road network points, and determining the candidate trajectory segment where each target road network point in the target road network point set is located as the object trajectory segment.

[0078] In this context, candidate trajectory segments are road segments located within the reference area of ​​a trajectory point. Road network points are points on each road segment within the road network. A road segment can be understood as being composed of multiple points. Candidate road network points are the road network points within a candidate trajectory segment that are closest to the corresponding trajectory point. The candidate road network point set is the set of candidate road network points. The target road network point set is the set of target road network points. Target road network points are the road network points selected from the candidate road network point set that have the highest probability of generating the target trajectory.

[0079] Specifically, for each trajectory point, the computer device can determine at least one candidate trajectory segment within the reference area of ​​the electronic map's road network. From these candidate trajectory segments, it can further identify the nearest road network point to the trajectory point as a candidate road network point, thus obtaining a set of candidate road network points. From each candidate road network point set corresponding to each trajectory point, the computer device can then select the target road network point set with the highest probability of generating the object trajectory, and determine the candidate trajectory segments containing each target road network point in the target road network point set as the object trajectory segments.

[0080] In one embodiment, for each trajectory point, the reference area can specifically be a circular area defined with the trajectory point as the center and a preset distance as the radius.

[0081] In the above embodiments, by determining the candidate road network points closest to each trajectory point from each candidate trajectory segment corresponding to the trajectory point, the accuracy of selecting candidate road network points can be improved. Furthermore, by filtering the target road network point set with the highest probability of generating the object trajectory from the determined candidate road network point set, and determining the object trajectory segment based on the target road network point set, the accuracy of determining the object trajectory segment can be improved.

[0082] In one embodiment, the road segment feature information includes the in-degree and out-degree information of the object trajectory road segment; the endpoints of each object trajectory road segment include a first road element passed first and a second road element passed later; the in-degree and out-degree information includes the out-degree of the first road element and the in-degree of the second road element of the trajectory road segment; based on the road segment feature information corresponding to each object trajectory road segment, at least one object trajectory road segment is thinned to obtain key trajectory road segments, including: determining object trajectory road segments that satisfy the path uniqueness condition from at least one object trajectory road segment based on the in-degree and out-degree information; deleting the determined object trajectory road segments, and taking the object trajectory road segments that are not deleted as key trajectory road segments.

[0083] The in-degree and out-degree information is determined based on the in-degree and out-degree of the endpoints of the object's trajectory segment. Each object's trajectory segment may include two endpoints. It can be understood that in-degree and out-degree information is one type of the road segment structural feature information mentioned above. The first road element traversed is the road element that the object traverses first during its movement, and the second road element traversed is the road element that the object traverses later during its movement. The path uniqueness condition is the condition under which the object has a unique path when moving on a road segment.

[0084] Specifically, the computer device can determine the object trajectory segments that satisfy the path uniqueness condition from at least one object trajectory segment based on in-degree and out-degree information. Then, the computer device can delete the determined object trajectory segments and retain the object trajectory segments that do not satisfy the path uniqueness condition. Simultaneously, the computer device can designate the retained object trajectory segments that do not satisfy the path uniqueness condition as critical trajectory segments.

[0085] In one embodiment, the path uniqueness condition may include both the out-degree of a first road element and the in-degree of a second road element of the object trajectory segment being 1. A computer device may determine, from at least one object trajectory segment, object trajectory segments where both the out-degree of the first road element and the in-degree of the second road element of the trajectory segment are 1. Furthermore, the computer device may delete object trajectory segments where both the out-degree of the first road element and the in-degree of the second road element of the trajectory segment are 1, and designate the remaining object trajectory segments as critical trajectory segments.

[0086] In one embodiment, the path uniqueness condition may also include that the first road element and the second road element of the object trajectory segment are not road intersections, etc. This embodiment is only used for illustrative purposes and does not impose specific limitations on the path uniqueness condition.

[0087] In one embodiment, such as Figure 4 As shown in (a), the object trajectory road segment includes road segment A, road segment B, and road segment C. The small black dots between road segment A and road segment B represent the first road element, and the small black dots between road segment B and road segment C represent the second road element. Figure 4 As shown in (a), the out-degree of the first road element and the in-degree of the second road element are both 1. This indicates that the first and second road elements are not road intersections used for traffic splitting; movement from segment A to segment C will necessarily pass through segment B. Furthermore, referring to... Figure 4 In (b), the computer equipment can delete segment B and use the remaining segments A and C as critical trajectory segments.

[0088] In the above embodiments, by deleting object trajectory segments that meet the path uniqueness condition, the number of object trajectory segments can be reduced while ensuring a uniquely determined trajectory path, thereby improving the compression ratio of trajectory data and reducing the memory space required for trajectory data storage. Simultaneously, the thinning method based on in-degree information is a lossless compression method for trajectory data, which can improve the accuracy of object trajectory reconstruction.

[0089] In one embodiment, at least one object trajectory segment includes a diversion trajectory segment; the diversion trajectory segment is an object trajectory segment on a diversion path starting from a road intersection; the segment feature information of the diversion trajectory segment includes trajectory distribution information on the diversion trajectory segment; based on the segment feature information corresponding to each object trajectory segment, at least one object trajectory segment is subjected to sparsification processing to obtain key trajectory segments, including: determining object trajectory segments that meet the trajectory sparsity condition from at least one object trajectory segment based on trajectory distribution information; deleting the determined object trajectory segments, and using the remaining object trajectory segments as key trajectory segments.

[0090] Trajectory distribution information refers to the distribution of the object's trajectory across various branch trajectory segments. It can be understood that trajectory distribution information is one type of the aforementioned road segment trajectory feature information. Trajectory sparsity condition refers to the condition under which the object's trajectory is sparsely distributed across road segments.

[0091] Specifically, the computer device can filter out object trajectory segments that meet the trajectory sparsity condition from at least one object trajectory segment based on trajectory distribution information. The computer device can delete the determined object trajectory segments and retain the object trajectory segments that do not meet the trajectory sparsity condition. The computer device can designate the object trajectory segments that are not deleted as critical trajectory segments, that is, the retained object trajectory segments that do not meet the trajectory sparsity condition are designated as critical trajectory segments.

[0092] In the above embodiments, by deleting object trajectory segments that meet the trajectory sparsity condition, the number of object trajectory segments can be reduced under the premise that the trajectory path is determined with a high probability, thereby improving the compression ratio of trajectory data and reducing the memory space required for trajectory data storage.

[0093] In one embodiment, the trajectory distribution information includes trajectory diversion information on the diversion trajectory segments; the trajectory sparsity condition includes the traffic sparsity condition; determining the object trajectory segments that satisfy the trajectory sparsity condition from at least one object trajectory segment based on the trajectory distribution information includes: determining the object trajectory segments that satisfy the traffic sparsity condition from at least one object trajectory segment based on the trajectory diversion information.

[0094] Among them, trajectory diversion information refers to the diversion information of the object's trajectory on each diversion trajectory segment. Traffic sparsity condition refers to the condition under which the object's trajectory diverts sparsely on the segment.

[0095] Specifically, the computer device can determine the object trajectory segments that meet the traffic sparsity condition from at least one object trajectory segment based on trajectory diversion information. Furthermore, the computer device can delete the determined object trajectory segments and designate the remaining object trajectory segments as critical trajectory segments.

[0096] In one embodiment, the traffic sparsity condition includes at least one of the following: the diversion ratio of the object trajectory on the diversion trajectory segment is less than a preset traffic threshold, and the diversion ratio of the object trajectory on the diversion trajectory segment falls within a preset traffic range.

[0097] In one embodiment, such as Figure 5 As shown in (a), the object trajectory includes road segments A, B, C, and D. The small black dots between segments A, B, C, and D represent road intersections used for traffic diversion. If the traffic flow in segment A is 2000, segment B diverts 999 of the traffic, segment C diverts 1 of the traffic, and segment D diverts 1000 of the traffic. See also... Figure 5 In (b), the computer equipment can delete the C segment with less traffic and designate the remaining A, B, and D segments as critical trajectory segments.

[0098] In the above embodiments, by deleting object trajectory segments that meet the traffic sparsity condition, the accuracy of segment deletion is improved, ensuring the accuracy of subsequent object path reconstruction. Simultaneously, given a high probability of determining the trajectory path, the number of object trajectory segments can be further reduced, increasing the compression ratio of trajectory data and thus further reducing the memory space required for trajectory data storage.

[0099] In one embodiment, compressing and storing key trajectory segments to obtain trajectory compressed data includes: mapping initial segment information of key trajectory segments to target segment information represented by a target number of bytes; the initial segment information is represented by an initial number of bytes; the initial number is greater than the target number; and compressing and storing the target segment information represented by the target number of bytes to obtain trajectory compressed data.

[0100] The initial road segment information is represented by an initial number of bytes. The target road segment information is represented by a target number of bytes.

[0101] In one embodiment, a computer device can map the initial road segment information of a critical trajectory segment to target road segment information represented by a target number of bytes, and directly use the target road segment information represented by the target number of bytes as stored trajectory compressed data. It can be understood that the number of critical trajectory segments after thinning is far less than the number of object trajectory segments before thinning, and the target road segment information of the critical trajectory segments can be successfully represented by a relatively small number of bytes.

[0102] In one embodiment, a computer device may map the initial road segment information of a key trajectory segment to target road segment information represented by a target number of bytes, further compress the target road segment information represented by the target number of bytes, and use the compressed result as stored trajectory compressed data.

[0103] For example, a computer device can map the initial road segment information of a key trajectory segment, represented by 8 bytes, to the target road segment information, represented by 4 bytes, and compress and store the target road segment information represented by 4 bytes to obtain compressed trajectory data.

[0104] In one embodiment, the road segment information of the key trajectory segment is the road segment number, such as... Figure 6 As shown, the road segment labels with larger numbers, such as 909230991, 990238710, and 819237721, represent the initial road segment information, while the road segment labels with smaller numbers, such as 1, 2, ..., n, represent the target road segment information, where n is a natural number. It can be understood that the computer equipment can map the larger road segment labels (909230991, 990238710, and 819237721) to the smaller road segment labels (1, 2, ..., n). It can also be understood that the larger road segment labels (909230991, 990238710, and 819237721) require 8 bytes to represent, while the smaller road segment labels (1, 2, ..., n) can be represented using only 4 bytes, thus saving storage resources for trajectory data.

[0105] In the above embodiments, by mapping the initial road segment information of the key trajectory segment to the target road segment information represented by the target number of bytes, since the initial number is greater than the target number, the memory space required by the target road segment information is less than the memory space required by the initial road segment information. In this way, the compression ratio of the trajectory data can be further improved, thereby further reducing the memory space required for trajectory data storage.

[0106] In one embodiment, compressing and storing target road segment information represented by a target number of bytes to obtain trajectory compressed data includes: performing differential processing on the target road segment information represented by a target number of bytes to obtain differential results for characterizing key trajectory road segments; and compressing and storing the differential results for characterizing key trajectory road segments to obtain trajectory compressed data.

[0107] In one embodiment, the computer device can perform differential processing on target road segment information represented by a target number of bytes to obtain differential results characterizing key trajectory road segments. Furthermore, the computer device can directly use the differential results characterizing key trajectory road segments as stored trajectory compressed data.

[0108] In one embodiment, the road segment information of the key trajectory segment is the road segment number, such as... Figure 7 As shown, the road segment numbers in part a (i.e., 232, 236, 239, 249, 251, 252, 254, and 255) are the road segment numbers before differential processing, and the road segment numbers in part b (i.e., 232, 4, 3, 10, 2, 1, 2, and 1) are the road segment numbers after differential processing. For example, 4 in part b represents the difference between 236 and 232 in part a, 3 in part b represents the difference between 239 and 236 in part a, and so on. The computer equipment can directly output the differential results used to characterize the key trajectory road segments... Figure 7 The b part is used as the stored trajectory compressed data.

[0109] In the above embodiments, the target road segment information represented by the target number of bytes is differentially processed to obtain the differential result used to characterize the key trajectory road segment. Since the differential result used to characterize the key trajectory road segment requires less memory space than the target road segment information, the compression ratio of the trajectory data can be further improved, thereby further reducing the memory space required for trajectory data storage.

[0110] In one embodiment, such as Figure 8 As shown, the computer device can acquire trajectory points representing the trajectory of an object and match these trajectory points to the road network of an electronic map to obtain at least one object trajectory segment. The computer device can then perform thinning processing on each object trajectory segment based on its in-degree and out-degree information and trajectory splitting information to obtain key trajectory segments. Furthermore, the computer device can map and differentially process the segment information of the key trajectory segments to obtain compressed trajectory data, and then store the compressed trajectory data.

[0111] In one embodiment, such as Figure 9As shown, a method for decompressing trajectory data is provided. This method can be applied to computer devices, which can be terminals or servers. The method can be executed independently by the terminal or server, or it can be implemented through interaction between the terminal and the server. This embodiment illustrates the application of this method to a computer device as an example, including the following steps:

[0112] Step 902: Obtain compressed trajectory data based on the compressed storage of key trajectory segments in the road network; wherein, the key trajectory segments are obtained by thinning out the at least one matched object trajectory segment based on the segment feature information corresponding to the at least one matched object trajectory segment after matching the trajectory points representing the object trajectory to the road network of the electronic map.

[0113] Specifically, the object carries a positioning device. As the object moves on a road, the positioning device generates a series of trajectory points representing the object's trajectory. The computer device can obtain these trajectory points from the positioning device. Since not all trajectory points obtained by the computer device fall within the road network, some may fall on either side of the road. Therefore, the computer device can match the trajectory points representing the object's trajectory to the road network of an electronic map, mapping all trajectory points to the road network. It can be understood that at least one road segment corresponding to these trajectory points is the object's trajectory segment. Each object trajectory segment within at least one object trajectory segment has its own corresponding road segment feature information. The computer device can perform thinning processing on at least one object trajectory segment based on the road segment feature information corresponding to each object trajectory segment to obtain key trajectory segments. It can be understood that the number of key trajectory segments is much smaller than the number of object trajectory segments; therefore, the memory required for key trajectory segments is much smaller than that required for object trajectory segments. The computer device can compress and store the road segment information of the key trajectory segments to obtain compressed trajectory data. When decompressing trajectory compressed data, computer equipment can obtain trajectory compressed data obtained by compressing and storing key trajectory segments in the road network.

[0114] Step 904: Decompress the trajectory compressed data to obtain the restored object trajectory points.

[0115] Specifically, the computer equipment can decompress the acquired trajectory compression data to obtain the restored object trajectory points. In other words, the computer equipment can first perform preliminary decompression of the trajectory compression data to obtain key trajectory segments, and then restore the object trajectory based on these key trajectory segments to obtain the restored object trajectory points.

[0116] In the aforementioned trajectory data decompression method, compressed trajectory data obtained by compressing and storing key trajectory segments in the road network is acquired, and then decompressed to obtain the restored object trajectory points. The key trajectory segments are obtained by thinning out at least one matched object trajectory segment based on the road segment feature information corresponding to at least one matched object trajectory segment after matching the trajectory points representing the object trajectory to the road network of the electronic map. This application thins out object trajectory segments based on the road segment feature information corresponding to the object trajectory segments, which reduces the number of object trajectory segments ultimately stored, improves the compression ratio of the trajectory data, thereby reducing the memory space occupied by trajectory data storage, saving storage resources, and effectively avoiding waste of storage resources. Furthermore, because the thinning process fully considers the road segment feature information corresponding to the object trajectory segments, this application achieves better compression and storage effects for trajectory data, and the object trajectory can be accurately restored based on the compressed trajectory data, improving the accuracy of object trajectory restoration.

[0117] In one embodiment, the trajectory compression data is obtained by compressing and storing initial road segment information based on key trajectory segments and represented by an initial number of bytes; decompressing the trajectory compression data to obtain the restored object trajectory points includes: selecting the path with the shortest object movement time from multiple candidate trajectory paths in the road network as the target trajectory path; the candidate road segment information corresponding to the candidate trajectory path includes the initial road segment information of the key trajectory segments; the candidate road segment information is the road segment information of each road segment in the candidate trajectory path; and using the endpoints of each road segment in the target trajectory path as the restored object trajectory points.

[0118] Among them, the candidate trajectory path is the trajectory path that includes the key trajectory segments. The target trajectory path is the path with the shortest object movement time among all candidate trajectory paths.

[0119] Specifically, the computer device can determine the different object movement times corresponding to each candidate trajectory path. From multiple candidate trajectory paths in the road network, the computer device can select the path with the shortest object movement time as the target trajectory path, and directly use the endpoints of each road segment in the target trajectory path as the reconstructed object trajectory points.

[0120] In the above embodiments, by selecting the path with the shortest object movement time from multiple candidate trajectory paths of the road network as the target trajectory path, and using the endpoints of each road segment in the target trajectory path as the restored object trajectory points, the accuracy of path restoration can be improved.

[0121] In one embodiment, the trajectory compression data is obtained by compressing and storing target road segment information based on key trajectory road segments; the target road segment information is obtained by mapping the initial road segment information represented by an initial number of bytes to a target number of bytes; the initial number is greater than the target number; the trajectory data decompression method further includes: re-mapping the target road segment information represented by the target number of bytes to the initial road segment information represented by the initial number of bytes.

[0122] Specifically, when compressing trajectory data, the computer device can map the initial road segment information of key trajectory segments into target road segment information represented by a target number of bytes, and then compress and store the target road segment information represented by the target number of bytes to obtain compressed trajectory data. When decompressing trajectory data, the computer device can reverse-map the target road segment information represented by the target number of bytes back into the initial road segment information represented by the initial number of bytes. Then, based on the initial road segment information represented by the initial number of bytes, the computer device can determine the restored object trajectory points.

[0123] In the above embodiments, by mapping the initial road segment information of the key trajectory segments to target road segment information represented by a target number of bytes, since the initial number is greater than the target number, the memory space required for the target road segment information is less than that required for the initial road segment information. This further improves the compression ratio of the trajectory data, thereby further reducing the memory space required for trajectory data storage. Simultaneously, by first mapping the target road segment information represented by the target number of bytes back to the initial road segment information represented by the initial number of bytes, and then performing object trajectory reconstruction based on the initial road segment information, the accuracy of object trajectory reconstruction can be further improved.

[0124] In one embodiment, the trajectory compression data is obtained by compressing and storing the differential results used to characterize the key trajectory segments; the differential results used to characterize the key trajectory segments are obtained by differential processing of the target segment information represented by the target number of bytes; the trajectory data decompression method further includes: performing inverse differential processing on the differential results used to characterize the key trajectory segments to obtain the target segment information represented by the target number of bytes.

[0125] Specifically, when compressing trajectory data, the computer device can perform differential processing on the target road segment information represented by a target number of bytes to obtain a differential result representing the key trajectory segments. This differential result is then used for compression and storage to obtain compressed trajectory data. When decompressing the trajectory data, the computer device can first perform inverse differential processing on the differential result representing the key trajectory segments to obtain the target road segment information represented by a target number of bytes. Then, the computer device can further map the target road segment information represented by the target number of bytes back to the initial road segment information represented by the initial number of bytes. Finally, based on the initial road segment information represented by the initial number of bytes, the computer device can determine the restored object trajectory points.

[0126] In the above embodiments, the target road segment information, represented by the target number of bytes, is subjected to differential processing to obtain differential results representing key trajectory road segments. Since the memory space required for the differential results representing key trajectory road segments is less than the memory space required for the target road segment information, the compression ratio of the trajectory data can be further improved, thereby further reducing the memory space required for trajectory data storage. Simultaneously, by first performing inverse differential processing on the differential results representing key trajectory road segments to obtain target road segment information represented by the target number of bytes, and then performing object trajectory reconstruction based on the target road segment information, the accuracy of object trajectory reconstruction can be further improved.

[0127] In one embodiment, such as Figure 10 As shown, the computer device can acquire compressed trajectory data obtained by compressing and storing the differential results of key trajectory segments in the road network, and perform inverse differential processing on the differential results used to characterize the key trajectory segments to obtain target road segment information represented by a target number of bytes. Furthermore, the computer device can inversely map the target road segment information represented by the target number of bytes to initial road segment information represented by an initial number of bytes. The computer device can then perform path planning based on the initial road segment information to reconstruct the object trajectory and obtain the object trajectory path. The computer device can query the endpoint coordinates of each road segment on the object trajectory path of the road network and use the endpoint coordinates of each road segment as the coordinates of the reconstructed object trajectory points.

[0128] like Figure 11 As shown, in one embodiment, a trajectory data compression method is provided. This method can be applied to a computer device, which can be a terminal or a server. The method can be executed independently by the terminal or server, or it can be implemented through interaction between the terminal and the server. Specifically, the method includes the following steps:

[0129] Step 1102: Obtain the trajectory points representing the trajectory of the object.

[0130] Step 1104: For each trajectory point, determine each candidate trajectory segment within the reference area of ​​the trajectory point in the road network of the electronic map, and determine the road network point closest to the trajectory point from each candidate trajectory segment of the trajectory point as a candidate road network point, thus obtaining a set of candidate road network points.

[0131] Step 1106: Select the target road network point set with the highest probability of generating the object trajectory from the candidate road network point set, and determine the candidate trajectory road segment where each target road network point in the target road network point set is located as the object trajectory road segment; the object trajectory road segment is the road segment that the object passes through in the road network.

[0132] Step 1108: Based on the road segment feature information corresponding to each object trajectory segment, at least one object trajectory segment is thinned to obtain a key trajectory segment; the key trajectory segment is a part of the object trajectory segment used to reconstruct the object trajectory.

[0133] In one example, the road segment feature information includes the in-degree and out-degree information of the object trajectory road segment; the endpoints of each object trajectory road segment include a first road element passed first and a second road element passed later; the in-degree and out-degree information includes the out-degree of the first road element and the in-degree of the second road element of the trajectory road segment. The computer device can determine object trajectory road segments that satisfy the path uniqueness condition from at least one object trajectory road segment based on the in-degree and out-degree information, delete the determined object trajectory road segments, and designate the remaining object trajectory road segments as critical trajectory road segments.

[0134] In one instance, at least one object trajectory segment includes a diversion trajectory segment; the diversion trajectory segment is an object trajectory segment on a diversion path starting from a road intersection; the segment feature information of the diversion trajectory segment includes trajectory distribution information on the diversion trajectory segment. The computer device can determine object trajectory segments that meet the trajectory sparsity condition from at least one object trajectory segment based on the trajectory distribution information, delete the determined object trajectory segments, and designate the remaining object trajectory segments as critical trajectory segments.

[0135] In one instance, trajectory distribution information includes trajectory diversion information on diverted trajectory segments; trajectory sparsity conditions include traffic sparsity conditions. A computer device can determine object trajectory segments that satisfy the traffic sparsity condition from at least one object trajectory segment based on the trajectory diversion information.

[0136] Step 1110: Map the initial road segment information of the key trajectory segment to target road segment information represented by the target number of bytes; the initial road segment information is represented by the initial number of bytes; the initial number is greater than the target number.

[0137] Step 1112 involves performing differential processing on the target road segment information represented by the target number of bytes to obtain differential results used to characterize the key trajectory road segments.

[0138] Step 1114: Compress and store the differential results used to characterize the key trajectory segments to obtain trajectory compressed data.

[0139] like Figure 12 As shown, in one embodiment, a trajectory data decompression method is provided. This method can be applied to a computer device, which can be a terminal or a server. The method can be executed independently by the terminal or server, or it can be implemented through interaction between the terminal and the server. Specifically, the method includes the following steps:

[0140] Step 1202: Obtain compressed trajectory data based on the differential results of key trajectory segments in the road network and compress and store it; wherein, the key trajectory segments are obtained by thinning out the segments from at least one matched object trajectory segments after matching the trajectory points representing the object trajectory to the road network of the electronic map, based on the segment feature information corresponding to at least one matched object trajectory segment.

[0141] Step 1204: Perform inverse difference processing on the difference results used to characterize the key trajectory segments to obtain target segment information represented by the number of bytes of the target.

[0142] Step 1206: The target road segment information represented by the target number of bytes is reverse-mapped to the initial road segment information represented by the initial number of bytes.

[0143] Step 1208: Select the path with the shortest travel time from multiple candidate trajectory paths in the road network as the target trajectory path; the candidate road segment information corresponding to the candidate trajectory path includes the initial road segment information of the key trajectory road segment; the candidate road segment information is the road segment information of each road segment in the candidate trajectory path.

[0144] Step 1210: Use the endpoints of each segment in the target trajectory path as the restored object trajectory points.

[0145] This application also provides an application scenario in which the above-described trajectory data compression and decompression method is applied. Specifically, the trajectory data compression and decompression method can be applied to the compression and decompression of trajectory data generated by vehicles traveling on roads. During the compression of trajectory data, a computer device can acquire trajectory points representing the vehicle trajectory. For each trajectory point, candidate trajectory segments within the reference area of ​​the trajectory point are determined in the road network of the electronic map. From each candidate trajectory segment, the road network point closest to the trajectory point is selected as a candidate road network point, resulting in a set of candidate road network points. From the set of candidate road network points, a target road network point set with the highest probability of generating a vehicle trajectory is selected, and the candidate trajectory segments containing each target road network point in the target road network point set are determined as vehicle trajectory segments; a vehicle trajectory segment is a road segment traversed by the vehicle in the road network. Based on the road segment feature information corresponding to each vehicle trajectory segment, at least one vehicle trajectory segment is thinned to obtain a key trajectory segment; a key trajectory segment is a portion of the vehicle trajectory segments used to reconstruct the vehicle trajectory.

[0146] The road segment feature information includes the in-degree and out-degree information of the vehicle trajectory segments. The endpoints of each vehicle trajectory segment include the first road element passed and the second road element passed later; the in-degree and out-degree information includes the out-degree of the first road element and the in-degree of the second road element of the trajectory segment. The computer equipment can determine the vehicle trajectory segments that meet the path uniqueness condition from at least one vehicle trajectory segment based on the in-degree and out-degree information, delete the determined vehicle trajectory segments, and designate the remaining vehicle trajectory segments as critical trajectory segments.

[0147] Simultaneously, at least one vehicle trajectory segment also includes a diversion trajectory segment; the diversion trajectory segment is a vehicle trajectory segment on a diversion path starting from a road intersection; the segment feature information of the diversion trajectory segment includes trajectory diversion information on the diversion trajectory segment. The computer equipment can determine vehicle trajectory segments that meet the traffic sparsity condition from at least one vehicle trajectory segment based on the trajectory diversion information, delete the determined vehicle trajectory segments, and designate the remaining vehicle trajectory segments as critical trajectory segments.

[0148] Computer equipment can map the initial road segment information of critical trajectory segments into target road segment information represented by a target number of bytes; the initial road segment information is represented by an initial number of bytes; the initial number is greater than the target number. The target road segment information represented by the target number of bytes is then differentially processed to obtain a differential result representing the critical trajectory segments. This differential result is then compressed and stored to obtain compressed trajectory data.

[0149] During the compression of trajectory data, the computer device can acquire and compress trajectory data based on the differential results of key trajectory segments in the road network. The computer device can then perform inverse differential processing on the differential results used to characterize the key trajectory segments, obtaining target road segment information represented by a target number of bytes, and then inversely map this target road segment information to initial road segment information represented by an initial number of bytes. The computer device can select the path with the shortest vehicle travel time from multiple candidate trajectory paths in the road network as the target trajectory path; the candidate road segment information corresponding to the candidate trajectory path includes the initial road segment information of the key trajectory segments; the candidate road segment information is the road segment information of each segment in the candidate trajectory path. Furthermore, the computer device can use the endpoints of each road segment in the target trajectory path as the restored vehicle trajectory points.

[0150] This application also provides another application scenario where the aforementioned trajectory data compression and decompression method is applied. Specifically, this trajectory data compression and decompression method can be applied to scenarios involving the compression and decompression of trajectory data generated by pedestrians or other movable objects moving on roads. Other movable objects can be animals, etc. Using the trajectory data compression and decompression method of this application, in the compression process of pedestrian trajectory data, the computer device can perform electronic map matching on the trajectory points representing the pedestrian's walking trajectory generated during walking to obtain the pedestrian walking trajectory segments. These segments are then thinned to obtain key trajectory segments, which are then compressed and stored to obtain the compressed trajectory data corresponding to the pedestrian. In the decompression process of pedestrian trajectory data, the computer device can obtain the compressed trajectory data corresponding to the pedestrian and decompress it to obtain the restored trajectory points of the pedestrian.

[0151] It is understood that the trajectory data compression and decompression method of this application can also be applied to many scenarios involving trajectory data, such as route navigation, urban road congestion analysis, and trajectory monitoring of criminals. For example, in the route navigation scenario, the trajectory data compression and decompression method of this application can compress and store the trajectory data of navigation users to obtain compressed trajectory data, thereby saving storage space. By decompressing the compressed trajectory data of navigation users, route reconstruction can be achieved. Through statistical analysis of the reconstructed route, better navigation services can be provided to more navigation users.

[0152] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially, these steps are not necessarily executed in that order. Unless otherwise expressly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the above embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0153] In one embodiment, such as Figure 13 As shown, a trajectory data compression device 1300 is provided. This device can be a software module, a hardware module, or a combination of both as part of a computer device. Specifically, the device includes:

[0154] The first acquisition module 1302 is used to acquire trajectory points representing the trajectory of an object.

[0155] The matching module 1304 is used to match trajectory points to the road network of the electronic map to obtain at least one object trajectory segment; the object trajectory segment is the segment of the road that the object passes through in the road network.

[0156] The thinning module 1306 is used to perform thinning processing on at least one object trajectory segment to obtain a key trajectory segment based on the segment feature information corresponding to each object trajectory segment; the key trajectory segment is a part of the object trajectory segment used to reconstruct the object trajectory.

[0157] Storage module 1308 is used to compress and store key trajectory segments to obtain trajectory compressed data.

[0158] In one embodiment, the matching module 1304 is further configured to, for each trajectory point, determine each candidate trajectory segment located within the reference area of ​​the trajectory point in the road network of the electronic map, and determine the road network point closest to the trajectory point from each candidate trajectory segment of the trajectory point as a candidate road network point, thereby obtaining a set of candidate road network points; filter out the target road network point set with the highest probability of generating the object trajectory from the set of candidate road network points, and determine the candidate trajectory segment where each target road network point in the target road network point set is located as the object trajectory segment.

[0159] In one embodiment, the road segment feature information includes the in-degree and out-degree information of the object trajectory road segment; the endpoints of each object trajectory road segment include a first road element passed first and a second road element passed later; the in-degree and out-degree information includes the out-degree of the first road element and the in-degree of the second road element of the trajectory road segment; the thinning module 1306 is further configured to determine the object trajectory road segments that satisfy the path uniqueness condition from at least one object trajectory road segment according to the in-degree and out-degree information; delete the determined object trajectory road segments, and take the object trajectory road segments that are not deleted as key trajectory road segments.

[0160] In one embodiment, at least one object trajectory segment includes a diversion trajectory segment; the diversion trajectory segment is an object trajectory segment on a diversion path starting from a road intersection; the segment feature information of the diversion trajectory segment includes trajectory distribution information on the diversion trajectory segment; the thinning module 1306 is further configured to determine object trajectory segments that meet the trajectory sparsity condition from at least one object trajectory segment based on the trajectory distribution information; delete the determined object trajectory segments, and designate the undeleted object trajectory segments as key trajectory segments.

[0161] In one embodiment, the trajectory distribution information includes trajectory diversion information on the diversion trajectory segment; the trajectory sparsity condition includes the traffic sparsity condition; the thinning module 1306 is further configured to determine, based on the trajectory diversion information, object trajectory segments that satisfy the traffic sparsity condition from at least one object trajectory segment.

[0162] In one embodiment, the storage module 1308 is further configured to map the initial road segment information of the key trajectory segment to target road segment information represented by a target number of bytes; the initial road segment information is represented by an initial number of bytes; the initial number is greater than the target number; and the target road segment information represented by the target number of bytes is compressed and stored to obtain trajectory compressed data.

[0163] In one embodiment, the storage module 1308 is further configured to perform differential processing on the target road segment information represented by the target number of bytes to obtain differential results for characterizing key trajectory road segments; and compress and store the differential results for characterizing key trajectory road segments to obtain trajectory compressed data.

[0164] The aforementioned trajectory data compression device acquires trajectory points representing the trajectory of an object and matches these trajectory points to the road network of an electronic map to obtain at least one object trajectory segment, ensuring that the object's trajectory points accurately fall within the road network of the electronic map. Based on the road segment feature information corresponding to each object trajectory segment, at least one object trajectory segment is thinned to obtain key trajectory segments for reconstructing the object trajectory. These key trajectory segments are then compressed and stored to obtain compressed trajectory data. This application thins object trajectory segments based on the road segment feature information corresponding to the object trajectory segments, reducing the number of object trajectory segments ultimately stored, improving the compression ratio of the trajectory data, thereby reducing the memory space occupied by trajectory data storage, saving storage resources, and effectively avoiding waste of storage resources.

[0165] In one embodiment, such as Figure 14 As shown, a trajectory data decompression device 1400 is provided. This device can be a software module, a hardware module, or a combination of both as part of a computer device. Specifically, the device includes:

[0166] The second acquisition module 1402 is used to acquire compressed trajectory data obtained by compressing and storing key trajectory segments in the road network; wherein, the key trajectory segments are obtained by thinning out at least one matched object trajectory segment based on the segment feature information corresponding to at least one matched object trajectory segment after matching the trajectory points representing the object trajectory to the road network of the electronic map.

[0167] The decompression module 1404 is used to decompress the trajectory compressed data to obtain the restored object trajectory points.

[0168] In one embodiment, the trajectory compression data is obtained by compressing and storing the initial road segment information based on the key trajectory segments and represented by an initial number of bytes; the decompression module 1404 is also used to select the path with the shortest object movement time from multiple candidate trajectory paths of the road network as the target trajectory path; the candidate road segment information corresponding to the candidate trajectory path includes the initial road segment information of the key trajectory segments; the candidate road segment information is the road segment information of each road segment in the candidate trajectory path; and the endpoints of each road segment in the target trajectory path are used as the restored object trajectory points.

[0169] In one embodiment, the trajectory compression data is obtained by compressing and storing the target road segment information based on the key trajectory road segment; the target road segment information is obtained by mapping the initial road segment information represented by the initial number of bytes to the target number of bytes; the initial number is greater than the target number; the decompression module 1404 is also used to reverse map the target road segment information represented by the target number of bytes to the initial road segment information represented by the initial number of bytes.

[0170] In one embodiment, the trajectory compression data is obtained by compressing and storing the differential results used to characterize the key trajectory segments; the differential results used to characterize the key trajectory segments are obtained by differential processing of the target segment information represented by the target number of bytes; the decompression module 1404 is also used to perform inverse differential processing on the differential results used to characterize the key trajectory segments to obtain the target segment information represented by the target number of bytes.

[0171] The aforementioned trajectory data decompression device acquires compressed trajectory data obtained by compressing and storing key trajectory segments in the road network, decompresses the compressed trajectory data, and obtains the restored object trajectory points. The key trajectory segments are obtained by thinning out at least one matched object trajectory segment based on the road segment feature information corresponding to at least one matched object trajectory segment after matching the trajectory points representing the object trajectory to the road network of the electronic map. This application thins out object trajectory segments based on the road segment feature information corresponding to the object trajectory segments, which can reduce the number of object trajectory segments ultimately stored, improve the compression ratio of trajectory data, thereby reducing the memory space occupied by trajectory data storage, saving storage resources, and effectively avoiding waste of storage resources. Furthermore, because the thinning process fully considers the road segment feature information corresponding to the object trajectory segments, this application has a better compression and storage effect on trajectory data, and the object trajectory can be accurately restored based on the compressed trajectory data, improving the accuracy of object trajectory restoration.

[0172] Each module in the aforementioned trajectory data compression and decompression devices can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0173] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 15As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a trajectory data compression and decompression method.

[0174] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 16 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a trajectory data compression and decompression method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0175] Those skilled in the art will understand that Figure 15 and Figure 16The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0176] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0177] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0178] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0179] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0180] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0181] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0182] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A trajectory data compression method, characterized in that, The method includes: Obtain the trajectory points representing the trajectory of the object; For each trajectory point, candidate trajectory segments located within the reference area of ​​the trajectory point are determined in the road network of the electronic map, and the road network point closest to the trajectory point is determined from each candidate trajectory segment of the trajectory point as a candidate road network point, thus obtaining a set of candidate road network points; From the candidate road network point set, the target road network point set with the highest probability of generating the object trajectory is selected, and the candidate trajectory road segments where each target road network point in the target road network point set is located are determined as object trajectory road segments, thus obtaining at least one object trajectory road segment; the object trajectory road segment is the road segment that the object passes through in the road network; Based on the road segment feature information corresponding to each of the object trajectory segments, at least one object trajectory segment is thinned to obtain a key trajectory segment; the key trajectory segment is a portion of the object trajectory segments used to reconstruct the object trajectory. Compressed data is obtained by storing the key trajectory segments.

2. The method according to claim 1, characterized in that, The road segment feature information includes the in-degree and out-degree information of the object trajectory road segment; the endpoints of each object trajectory road segment include a first road element passed first and a second road element passed later; the in-degree and out-degree information includes the out-degree of the first road element and the in-degree of the second road element of the trajectory road segment; The step of thinning the at least one object trajectory segment to obtain key trajectory segments based on the segment feature information corresponding to each object trajectory segment includes: Based on the in-degree information, determine the object trajectory segment that satisfies the path uniqueness condition from the at least one object trajectory segment; Delete the identified object trajectory segments and designate the remaining object trajectory segments as critical trajectory segments.

3. The method according to claim 1, characterized in that, The at least one object trajectory segment includes a diversion trajectory segment; the diversion trajectory segment is an object trajectory segment on a diversion path starting from a road intersection; the segment feature information of the diversion trajectory segment includes trajectory distribution information on the diversion trajectory segment; The step of thinning the at least one object trajectory segment to obtain key trajectory segments based on the segment feature information corresponding to each object trajectory segment includes: Based on the trajectory distribution information, determine the object trajectory segments that satisfy the trajectory sparsity condition from the at least one object trajectory segment; Delete the identified object trajectory segments and designate the remaining object trajectory segments as critical trajectory segments.

4. The method according to claim 3, characterized in that, The trajectory distribution information includes trajectory diversion information on the diversion trajectory segments; the trajectory sparsity condition includes traffic sparsity condition; The step of determining the object trajectory segment that satisfies the trajectory sparsity condition from the at least one object trajectory segment based on the trajectory distribution information includes: Based on the trajectory diversion information, determine the object trajectory segment that meets the traffic sparsity condition from the at least one object trajectory segment.

5. The method according to claim 1, characterized in that, The step of compressing and storing the key trajectory segments to obtain compressed trajectory data includes: The initial road segment information of the key trajectory segment is mapped to target road segment information represented by a target number of bytes; the initial road segment information is represented by an initial number of bytes; the initial number is greater than the target number; The target road segment information, represented by the target number of bytes, is compressed and stored to obtain trajectory compressed data.

6. The method according to claim 5, characterized in that, The step of compressing and storing the target road segment information represented by the target number of bytes to obtain trajectory compressed data includes: The target road segment information, represented by the target number of bytes, is subjected to differential processing to obtain differential results used to characterize the key trajectory road segment; The trajectory compressed data is obtained by compressing and storing the differential results used to characterize the key trajectory segments.

7. A method for decompressing trajectory data, characterized in that, The method includes: The process involves acquiring compressed trajectory data based on key trajectory segments in a road network. The key trajectory segments are obtained by thinning out at least one matched object trajectory segment based on its feature information after matching trajectory points representing object trajectories to the road network of an electronic map. The compressed trajectory data is obtained by compressing and storing initial road segment information based on the key trajectory segments and represented by an initial number of bytes. The path with the shortest travel time for the object is selected from multiple candidate trajectory paths in the road network as the target trajectory path; the candidate road segment information corresponding to the candidate trajectory path includes the initial road segment information of the key trajectory road segment; the candidate road segment information is the road segment information of each road segment in the candidate trajectory path; The endpoints of each segment in the target trajectory path are used as the restored object trajectory points.

8. The method according to claim 7, characterized in that, The trajectory compression data is obtained by compressing and storing the target road segment information based on the key trajectory road segment; the target road segment information is obtained by mapping the initial road segment information represented by an initial number of bytes to a target number of bytes; the initial number is greater than the target number; The method further includes: The target road segment information, represented by the target number of bytes, is reverse-mapped to the initial road segment information, represented by the initial number of bytes.

9. The method according to claim 8, characterized in that, The trajectory compression data is obtained by compressing and storing the differential results used to characterize the key trajectory segments; the differential results used to characterize the key trajectory segments are obtained by differential processing the target segment information represented by the target number of bytes. The method further includes: The differential results used to characterize the key trajectory segments are subjected to inverse differential processing to obtain target segment information represented by the target number of bytes.

10. A trajectory data compression device, characterized in that, The device includes: The first acquisition module is used to acquire trajectory points that represent the trajectory of the object; The matching module is used to, for each trajectory point, determine each candidate trajectory segment within the reference area of ​​the electronic map's road network, and from each candidate trajectory segment, determine the road network point closest to the trajectory point as a candidate road network point, thus obtaining a set of candidate road network points; from the set of candidate road network points, select the target road network point set with the highest probability of generating the object trajectory, and determine the candidate trajectory segments where each target road network point in the target road network point set is located as the object trajectory segment, thus obtaining at least one object trajectory segment; the object trajectory segment is the road segment traversed by the object in the road network; The thinning module is used to perform thinning processing on at least one object trajectory segment according to the segment feature information corresponding to each object trajectory segment to obtain key trajectory segments; the key trajectory segments are the segments in the object trajectory segments and are used to reconstruct the object trajectory. The storage module is used to compress and store the key trajectory segments to obtain compressed trajectory data.

11. The trajectory data compression device according to claim 10, characterized in that, The road segment feature information includes the in-degree and out-degree information of the object trajectory road segment; the endpoints of each object trajectory road segment include a first road element passed first and a second road element passed later; the in-degree and out-degree information includes the out-degree of the first road element and the in-degree of the second road element of the trajectory road segment; The thinning module is also used to determine, based on the in-degree information, object trajectory segments that satisfy the path uniqueness condition from the at least one object trajectory segment; Delete the identified object trajectory segments and designate the remaining object trajectory segments as critical trajectory segments.

12. The trajectory data compression device according to claim 10, characterized in that, The at least one object trajectory segment includes a diversion trajectory segment; the diversion trajectory segment is an object trajectory segment on a diversion path starting from a road intersection; the segment feature information of the diversion trajectory segment includes trajectory distribution information on the diversion trajectory segment; The sparsity module is also used to determine, based on the trajectory distribution information, object trajectory segments that satisfy the trajectory sparsity condition from the at least one object trajectory segment; Delete the identified object trajectory segments and designate the remaining object trajectory segments as critical trajectory segments.

13. The trajectory data compression device according to claim 12, characterized in that, The trajectory distribution information includes trajectory diversion information on the diversion trajectory segments; the trajectory sparsity condition includes traffic sparsity condition; The thinning module is also used to determine, based on the trajectory diversion information, object trajectory segments that meet the traffic sparsity condition from the at least one object trajectory segment.

14. The trajectory data compression device according to claim 10, characterized in that, The storage module is further configured to map the initial road segment information of the key trajectory segment into target road segment information represented by a target number of bytes; the initial road segment information is represented by an initial number of bytes; the initial number is greater than the target number; and the target road segment information represented by the target number of bytes is compressed and stored to obtain trajectory compressed data.

15. The trajectory data compression device according to claim 14, characterized in that, The storage module is further configured to perform differential processing on the target road segment information represented by the target number of bytes to obtain differential results for characterizing the key trajectory road segment; and to compress and store the differential results for characterizing the key trajectory road segment to obtain trajectory compressed data.

16. A trajectory data decompression device, characterized in that, The device includes: The second acquisition module is used to acquire compressed trajectory data based on key trajectory segments in the road network. The key trajectory segments are obtained by thinning out at least one matched object trajectory segment based on the segment feature information corresponding to at least one matched object trajectory segment after matching trajectory points representing object trajectories to the road network of the electronic map. The compressed trajectory data is obtained by compressing and storing initial segment information based on the key trajectory segments and represented by an initial number of bytes. The decompression module is used to select the path with the shortest object movement time from multiple candidate trajectory paths of the road network as the target trajectory path; the candidate road segment information corresponding to the candidate trajectory path includes the initial road segment information of the key trajectory road segment; the candidate road segment information is the road segment information of each road segment in the candidate trajectory path; and the endpoints of each road segment in the target trajectory path are used as the restored object trajectory points.

17. The trajectory data decompression device according to claim 16, characterized in that, The trajectory compression data is obtained by compressing and storing the target road segment information based on the key trajectory road segment; the target road segment information is obtained by mapping the initial road segment information represented by an initial number of bytes to a target number of bytes; the initial number is greater than the target number; The decompression module is also used to reverse map the target road segment information represented by the target number of bytes to the initial road segment information represented by the initial number of bytes.

18. The trajectory data decompression device according to claim 17, characterized in that, The trajectory compression data is obtained by compressing and storing the differential results used to characterize the key trajectory segments; the differential results used to characterize the key trajectory segments are obtained by differential processing the target segment information represented by the target number of bytes. The decompression module is also used to perform inverse differential processing on the differential results used to characterize the key trajectory segments to obtain target segment information represented by the target number of bytes.

19. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.

20. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.

21. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Traffic flow data display method and device, storage medium and electronic device

    CN108281012A

  • GPS trajectory data compression method based on LZW algorithm

    CN109286399A