Trajectory stream thinning method, electronic device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- AEROSPACE INFORMATION RES INST CAS
- Filing Date
- 2026-05-15
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]此类算法虽然压缩率较高,但本质上是“批处理”模式,必须等待整条轨迹收集完毕后才能开始计算,无法满足实时流式场景的需求
Smart Images

Figure CN122524104A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of trajectory thinning, and more particularly, to a method for thinning a trajectory stream, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of satellite navigation, Internet of Things, and aviation surveillance technologies, mobile objects such as unmanned aerial vehicles, general aircraft, and ground vehicles continuously generate high-frequency three-dimensional position data (longitude, latitude, and altitude). To reduce storage and transmission overhead while retaining the key morphological features of the trajectory, trajectory simplification technology is widely used.
[0003] Traditional trajectory simplification techniques mainly include the Douglas-Peucker (DP) algorithm. The Douglas-Peucker algorithm and its improved algorithms first cache all points of the entire trajectory in memory, and then, based on the line segment formed by the first and last points, recursively find the point farthest from the line segment; if the perpendicular / orthogonal distance of the farthest point exceeds a given threshold, the point is retained and processed recursively in segments.
[0004] Although such algorithms have a high compression rate, they are essentially in a "batch processing" mode and must wait until the entire trajectory is collected before starting the calculation, which cannot meet the requirements of real-time streaming scenarios. Summary of the Invention
[0005] In view of this, the present disclosure provides a method for thinning a trajectory stream, an electronic device, and a storage medium, which are used to at least partially solve the above technical problems.
[0006] One aspect of the present disclosure provides a method for thinning a trajectory stream, including: receiving a trajectory stream to be thinned of a mobile object, the trajectory stream including N trajectory points arranged in chronological order, where N is an integer greater than 2; taking the first trajectory point in the trajectory stream as an initial anchor point and adding it to the initialized thinning point set, and taking the second trajectory point in the trajectory stream as an initial candidate point; for the i-th trajectory point sequentially received in the trajectory stream, 2 < i ≤ N and i is an integer, perform the following operations: respectively determine a first motion parameter between the current anchor point and the current candidate point, and a second motion parameter between the current candidate point and the i-th trajectory point; in the case where the change amount between the first motion parameter and the second motion parameter is greater than a preset change amount threshold, adding the current candidate point to the thinning point set, taking the current candidate point as the new current anchor point, and taking the i-th trajectory point as the new current candidate point; in the case where the trajectory stream reception is completed, if there is a new current candidate point, adding the new current candidate point to the thinning point set, and the thinning point set is used to represent the thinning result of the trajectory stream.
[0007] According to embodiments of this disclosure, after determining the first motion parameter between the current anchor point and the current candidate point, and the second motion parameter between the current candidate point and the i-th trajectory point, the method further includes: if the change between the first motion parameter and the second motion parameter is less than or equal to a preset change threshold, determining the vertical distance of the current candidate point relative to the straight line formed by the current anchor point and the i-th trajectory point; if the vertical distance is greater than a preset distance threshold, adding the current candidate point to the sparse point set, and using the current candidate point as the new current anchor point and the i-th trajectory point as the new current candidate point; if the vertical distance is less than or equal to the distance threshold, using the i-th trajectory point as the new current candidate point.
[0008] According to an embodiment of this disclosure, determining the perpendicular distance of the current candidate point relative to the straight line formed by the current anchor point and the i-th trajectory point includes: determining a first distance between the current anchor point and the current candidate point, a second distance between the current candidate point and the i-th trajectory point, and a third distance between the current anchor point and the i-th trajectory point; and determining the perpendicular distance of the current candidate point relative to the straight line formed by the current anchor point and the i-th trajectory point based on the first distance, the second distance, and the third distance.
[0009] According to embodiments of this disclosure, the first motion parameter includes velocity; acquiring the first longitude, first latitude, and first altitude of the current anchor point in a geographic coordinate system, and the second longitude, second latitude, and second altitude of the current candidate point; determining the great circle distance between the current anchor point and the current candidate point based on the first longitude, first latitude, second longitude, and second latitude; determining the altitude difference between the current anchor point and the current candidate point based on the first altitude and second altitude; determining the spatial distance between the current anchor point and the current candidate point based on the great circle distance and the altitude difference; and determining the velocity between the current anchor point and the current candidate point based on the receiving time interval and spatial distance between the current anchor point and the current candidate point in the trajectory stream.
[0010] According to embodiments of this disclosure, the first motion parameter includes a heading angle; determining the first motion parameter between the current anchor point and the current candidate point includes: obtaining the first longitude and first latitude of the current anchor point in a geographic coordinate system, and the second longitude and second latitude of the current candidate point; performing radian conversion on the first longitude, first latitude, second longitude, and second latitude to obtain first longitude radians, first latitude radians, second longitude radians, and second latitude radians; calculating the longitude radian difference between the first longitude radian and the second longitude radian, and the latitude radian difference between the first latitude radian and the second latitude radian, respectively; and determining the heading angle between the current anchor point and the current candidate point based on the longitude radian difference, the latitude radian difference, the first latitude radian, and the second latitude radian.
[0011] According to an embodiment of the present disclosure, the method further includes: normalizing the value of the heading angle to obtain a normalized heading angle, and the value of the normalized heading angle is , including: adding a preset first constant to the heading angle and then performing a modulo operation on a preset second constant to obtain an operation result; subtracting the first constant from the operation result to obtain the normalized heading angle; wherein, the first constant is π and the second constant is 2π.
[0012] According to an embodiment of the present disclosure, the first motion parameter includes: a height change rate; determining the first motion parameter between the current anchor point and the current candidate point includes: determining a first height value of the current anchor point and a second height value of the current candidate point in the geographic coordinate system; based on the first height value and the second height value, determining the height difference between the current anchor point and the current candidate point; based on the reception time interval and the height difference between the current anchor point and the current candidate point in the trajectory stream, determining the height change rate between the current anchor point and the current candidate point.
[0013] According to an embodiment of the present disclosure, the method further includes: starting timing when the i-th trajectory point is received; when the (i + 1)-th trajectory point is not received within a preset timing time, determining that the trajectory stream reception is completed.
[0014] Another aspect of the present disclosure provides a thinning device for a trajectory stream, including: a receiving module, configured to receive a trajectory stream to be thinned of a moving object, the trajectory stream including N trajectory points arranged in chronological order, N being an integer greater than 2; an initialization module, configured to use the first trajectory point in the trajectory stream as an initial anchor point and add it to the initialized thinning point set, and use the second trajectory point in the trajectory stream as an initial candidate point; an execution module, configured to, for the i-th trajectory point sequentially received in the trajectory stream, 2 < i ≤ N and i being an integer, perform the following operations: respectively determine a first motion parameter between the current anchor point and the current candidate point, and a second motion parameter between the current candidate point and the i-th trajectory point; in the case where the change amount between the first motion parameter and the second motion parameter is greater than a preset change amount threshold, adding the current candidate point to the thinning point set, using the current candidate point as a new current anchor point, and using the i-th trajectory point as a new current candidate point; a thinning module, configured to, when the trajectory stream reception is completed, if there is a new current candidate point, add the new current candidate point to the thinning point set, and the thinning point set is used to represent the thinning result of the trajectory stream.
[0015] A third aspect of the present disclosure provides an electronic device, including: one or more processors; a memory, configured to store one or more computer programs, wherein, the above one or more processors execute the above one or more computer programs to implement the steps of the above method.
[0016] A fourth aspect of this disclosure also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0017] The fifth aspect of this disclosure also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0018] According to the trajectory stream thinning method, electronic device, and storage medium provided in this disclosure, initialization is completed by using the first point of the trajectory stream as the initial anchor point and the second point as the initial candidate point, ensuring the integrity of the trajectory starting point. Subsequently, for each new trajectory point received in sequence, the changes in motion parameters between the current anchor point and the current candidate point, and between the current candidate point and the new trajectory point, are compared. Only when the change exceeds a threshold is the current candidate point included in the thinning point set and the current anchor point and the current candidate point are updated. This can filter redundant points in smooth motion segments and retain feature points corresponding to key morphologies such as turning and acceleration. Finally, after the trajectory stream is received, the new current candidate point is added to the thinning point set to avoid missing the endpoint. Thus, while effectively reducing the number of trajectory points, the key morphological features of the trajectory are completely preserved, and real-time processing of streaming data is supported without caching the full trajectory data. Attached Figure Description
[0019] The above and other objects, features, and advantages of this disclosure will become clearer from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0020] Figure 1 A flowchart illustrating a trajectory flow thinning method according to an embodiment of the present disclosure is shown schematically.
[0021] Figure 2 A flowchart illustrating the vertical distance determination according to an embodiment of the present disclosure is shown schematically.
[0022] Figure 3A A flowchart illustrating the determination of kinematic characteristics according to an embodiment of the present disclosure is shown schematically.
[0023] Figure 3B A flowchart illustrating geometric error determination according to an embodiment of the present disclosure is shown schematically;
[0024] Figure 4 A block diagram of a trajectory flow thinning apparatus according to an embodiment of the present disclosure is shown schematically;
[0025] Figure 5 A block diagram of an electronic device suitable for implementing the methods described above, according to embodiments of the present disclosure, is illustrated schematically. Detailed Implementation
[0026] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0027] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0028] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0029] In the embodiments disclosed herein, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.
[0030] In this disclosure, thinning is used to mean removing redundant trajectory points using a specific method while maintaining the shape of the trajectory flow, thereby representing the motion process of a moving object with as few trajectory points as possible.
[0031] In real-time business scenarios such as general aviation surveillance and drone swarm management, trajectory data arrives continuously in a streaming manner. Terminal devices or edge servers have limited computing and storage resources, and data thinning must be performed in real-time during processing for real-time transmission, display, and storage. Existing offline batch processing algorithms have been excluded because they cannot meet the low-latency requirements of "receiving and processing simultaneously."
[0032] It is evident that existing offline global geometric thinning algorithms are not suitable for streaming data scenarios. They require caching all trajectory points before outputting results, resulting in poor real-time performance and a linear increase in memory usage with trajectory length.
[0033] In view of this, this disclosure proposes a trajectory stream thinning method, electronic device and storage medium, which can effectively reduce the number of trajectory points while fully preserving the key morphological features of the trajectory, and supports real-time processing of streaming data without caching the full trajectory data.
[0034] refer to Figure 1 , Figure 1 A flowchart illustrating a trajectory flow thinning method according to an embodiment of the present disclosure is shown, including steps 101 to 104.
[0035] Step 101: Receive the trajectory stream of the moving object to be thinned. The trajectory stream includes N trajectory points arranged in chronological order, where N is an integer greater than 2.
[0036] The moving object can be, for example, a drone, a ship, or a mobile terminal. This step aims to acquire a trajectory stream representing the continuous motion state of the moving object in real-time or near real-time.
[0037] The trajectory stream consists of a series of discrete trajectory points (sampling points). The trajectory points are arranged in chronological order to form a continuous spatiotemporal sequence, providing the basic input for subsequent thinning processing.
[0038] Step 102: Take the first trajectory point in the trajectory stream as the initial anchor point and add it to the initialized sparse point set, and take the second trajectory point in the trajectory stream as the initial candidate point.
[0039] For example, for a trajectory stream of a moving object to be processed, a unique session identifier is assigned to the trajectory stream, and a corresponding instance is created in memory. This instance internally maintains the following state data:
[0040] Anchor points are reference points used to represent the movement trend or deviation of subsequent trajectory points; for example, the coordinates of anchor point A are represented as follows: ,in, Indicates the longitude of anchor point A. Indicates the latitude of anchor point A. Indicates the height of anchor point A;
[0041] Candidate points are used to represent trajectory points that need to be determined whether to retain them; for example, the coordinates of candidate point C are represented as follows: ,in, Indicates the longitude of candidate point C. Indicates the latitude of candidate point C. Indicates the height of candidate point C;
[0042] The thinned point set is used to represent the set of trajectory points (anchor points) retained after thinning in the trajectory flow. This set is the result of thinning the trajectory flow.
[0043] In this step 102, initialize the thinned point set. For example, create a thinned point set corresponding to the moving object trajectory stream.
[0044] When the first trajectory point in the trajectory stream arrives, set the first trajectory point as both the initial anchor point and the first element of the thinned point set;
[0045] When the second trajectory point in the trajectory stream arrives, set the second trajectory point as the initial candidate point. At this time, no determination and output are triggered.
[0046] Step 103, for the i-th trajectory point received in sequence in the trajectory stream, where 2 < i ≤ N and i is an integer, perform the following steps 1031 to 1032.
[0047] Step 1031, respectively determine the first motion parameter between the current anchor point and the current candidate point, and the second motion parameter between the current candidate point and the i-th trajectory point.
[0048] The first motion parameter is used to quantify the relative motion state between the current anchor point and the current candidate point. For example, the first motion parameter may include at least two of the following: the speed between the current anchor point and the current candidate point, the heading angle between the current anchor point and the current candidate point, and the height change rate between the current anchor point and the current candidate point.
[0049] The second motion parameter is used to quantify the relative motion state between the current candidate point and the i-th trajectory point. For example, the second motion parameter may include at least two of the following: the speed between the current candidate point and the i-th trajectory point, the heading angle between the current candidate point and the i-th trajectory point, and the height change rate between the current candidate point and the i-th trajectory point.
[0050] Step 1032, when the change amount between the first motion parameter and the second motion parameter is greater than the preset change amount threshold, add the current candidate point to the thinned point set, use the current candidate point as the new current anchor point, and use the i-th trajectory point as the new current candidate point.
[0051] If the first motion parameter and the second motion parameter respectively include parameter components of multiple preset dimensions, in this step, the change amounts of the corresponding dimension parameter components in the first motion parameter and the second motion parameter can be calculated respectively.
[0052] For example, the first motion parameter and the second motion parameter respectively include: speed, heading angle, and height difference. Calculate the speed change amount, heading angle change amount, and height change rate change amount respectively. Among them, the speed change amount is represented by the following formula:
[0053]
[0054] Among them, Represents velocity in the second motion parameter. This represents the velocity in the first motion parameter.
[0055] Change in heading angle This can be expressed by the following formula:
[0056]
[0057] in, This represents the heading angle in the second motion parameter. This represents the heading angle in the first motion parameter. This represents the angle normalization function, which maps the change in heading angle to... This is to eliminate the pseudo-mutations introduced by the heading angle rotation (±π jump).
[0058] The change in the rate of change of altitude, dc, is expressed by the following formula:
[0059]
[0060] in, The rate of change of height in the second motion parameter This represents the rate of change of height in the first motion parameter.
[0061] Based on the above formulas, the changes in speed, heading angle, and altitude rate of change can be compared with preset thresholds for speed change, heading angle change, and altitude rate of change, respectively. If any of these thresholds is greater than the corresponding threshold, the current candidate point is added to the thinned point set, and this candidate point is used as the new current anchor point, with the i-th trajectory point becoming the new current candidate point. If all three thresholds are less than or equal to the corresponding thresholds, the current candidate point is considered redundant (e.g., located on an approximately straight trajectory) and is not added to the thinned point set. In this case, only a state update is performed, keeping the current anchor point unchanged, and the i-th trajectory point is set as the new current candidate point, continuing the next round of judgment.
[0062] It should be noted that, in addition to using the combination of parameters such as speed, heading angle, and rate of change of altitude, any two or more parameters can be selected according to actual needs, or more than three parameters (for example, further adding acceleration, rate of change of heading angle, turning rate, etc.) for combination and judgment.
[0063] This process is repeated until all N trajectory points in the trajectory stream have been traversed sequentially.
[0064] Step 104: If a new current candidate point exists after the trajectory stream reception is completed, the new current candidate point is added to the thinned point set. The thinned point set is used to represent the thinning result of the trajectory stream.
[0065] When the trajectory stream reception is completed, that is, when it is confirmed that all N trajectory points in the trajectory stream have been received (for example, when the stream end flag is received, or when the data source connection is detected to be disconnected, or when the preset end time is reached), a termination operation is performed to determine the final sparse point set.
[0066] After traversing the Nth trajectory point and executing the corresponding step 103, there must exist a new current candidate point that has not yet been finally processed. This is because during the entire iteration process, only current candidate points that are determined to have undergone significant changes in motion state are added to the sparse point set, while the last received trajectory point is usually set as the latest current candidate point, or becomes a new current candidate point left over after the last round of comparison.
[0067] To prevent the loss of the trajectory endpoint and ensure the integrity of the trajectory, if a new current candidate point exists, regardless of whether the change in its corresponding motion parameters meets the preset threshold, the new current candidate point will be added to the sparse point set.
[0068] Specifically, the new current candidate point is the last trajectory point of the moving object in the trajectory stream. By performing this step, it is ensured that the endpoint position of the moving object can be explicitly recorded in the thinning result.
[0069] Ultimately, the thinned point set includes the initial anchor point, all intermediate trajectory points selected due to significant changes in motion state, and the final endpoint position. This thinned point set serves as the thinning result of the trajectory flow, significantly reducing data storage and transmission bandwidth while preserving key morphological features.
[0070] In this embodiment, the trajectory flow is initialized by using the first point as the initial anchor point and the second point as the initial candidate point, ensuring the integrity of the trajectory starting point. Subsequently, for each new trajectory point received in sequence, the changes in motion parameters between the current anchor point and the current candidate point, and between the current candidate point and the new trajectory point, are compared. Only when the changes exceed a threshold is the current candidate point included in the sparse point set and the current anchor point and the current candidate point are updated. This can filter redundant points in smooth motion segments and retain feature points corresponding to key morphologies such as turning and acceleration. Finally, after the trajectory flow is received, the new current candidate point is added to the sparse point set to avoid missing the endpoint. Thus, while effectively reducing the number of trajectory points, the key morphological features of the trajectory are fully preserved, and real-time processing of streaming data is supported without caching the full trajectory data.
[0071] Figure 2A flowchart illustrating the vertical distance determination according to an embodiment of the present disclosure is shown schematically. It includes steps 201 to 203.
[0072] In some embodiments, after determining the first motion parameter between the current anchor point and the current candidate point, and the second motion parameter between the current candidate point and the i-th trajectory point, the method further includes:
[0073] Step 201: If the change between the first motion parameter and the second motion parameter is less than or equal to a preset change threshold, determine the vertical distance of the current candidate point relative to the straight line formed by the current anchor point and the i-th trajectory point.
[0074] In step 1031 above, when the first motion parameter and the second motion parameter are determined, and the change between the two is less than or equal to the preset change threshold, it indicates that the motion trend of the moving object at the current candidate point has not changed significantly (for example, the azimuth angle difference between the two trajectories is very small, and they are approximately on the same straight line).
[0075] In this case, to further refine the determination of whether the current candidate point is a necessary node for constituting the trajectory flow, a secondary judgment mechanism based on geometric distance is introduced. The perpendicular distance of the current candidate point relative to the reference line formed by the current anchor point and the i-th trajectory point is calculated.
[0076] The vertical distance is the shortest geometric distance from the current candidate point to the straight line segment passing through the current anchor point and the i-th trajectory point. This distance quantifies the degree to which the current candidate point deviates from the predicted straight line trajectory.
[0077] Step 202: When the vertical distance is greater than the preset distance threshold, add the current candidate point to the sparse point set, and use the current candidate point as the new current anchor point, and use the i-th trajectory point as the new current candidate point.
[0078] If the vertical distance is greater than a preset distance threshold, it is determined that although the current candidate point does not show significant changes in motion parameters (such as heading angle), its spatial position deviates significantly from the straight line determined by the first and last points, belonging to the obvious curved or jittery part of the trajectory, and needs to be retained. In this case, the following operations are performed:
[0079] Update the sparse point set: Add the current candidate point to the sparse point set.
[0080] Update anchor point: Use the current candidate point as the new current anchor point.
[0081] Update candidate points: Take the i-th trajectory point as the new current candidate point.
[0082] Step 203: When the vertical distance is less than or equal to the distance threshold, the i-th trajectory point is taken as the new current candidate point.
[0083] If the vertical distance is less than or equal to the distance threshold, the current candidate point is determined to be close to the straight line formed by the current anchor point and the i-th trajectory point. That is, the point is geometrically redundant and can be replaced by a linear fit between the start and end points without causing significant contour distortion.
[0084] At this point, the current candidate point is determined to be discardable and is not added to the sparse point set. Only the following operations are performed:
[0085] Update candidate points: Keep the current anchor point unchanged, directly use the i-th trajectory point as the new current candidate point, and enter the next round of iteration judgment.
[0086] refer to Figure 3A , Figure 3A A flowchart illustrating the kinematic feature determination according to an embodiment of the present disclosure is shown, including steps 301 to 304, 309 and 3010.
[0087] It should be noted that, after step 102, the preferred logic for the complete determination based on the joint criteria of kinematic features and geometric errors in this disclosure is as follows:
[0088] Step 301: Determine the first motion parameter between the current anchor point and the current candidate point, and the second motion parameter between the current candidate point and the i-th trajectory point.
[0089] Step 302: Calculate the change between the first motion parameter and the second motion parameter.
[0090] Step 303: Determine whether the change between the first motion parameter and the second motion parameter is greater than a preset change threshold.
[0091] If yes, proceed to step 304; otherwise, proceed to step 305.
[0092] Step 304: Add the current candidate point to the sparse point set, and use the current candidate point as the new current anchor point, and use the i-th trajectory point as the new current candidate point.
[0093] After step 304, proceed to step 309.
[0094] refer to Figure 3B , Figure 3B A flowchart illustrating geometric error determination according to an embodiment of the present disclosure is shown, including steps 303, 305 to 308.
[0095] Step 305: Determine the perpendicular distance of the current candidate point relative to the straight line formed by the current anchor point and the i-th trajectory point.
[0096] Step 306: Determine whether the vertical distance is greater than the preset distance threshold.
[0097] If yes, proceed to step 307; otherwise, proceed to step 308.
[0098] Step 307: Add the current candidate point to the sparse point set, and use the current candidate point as the new current anchor point, and use the i-th trajectory point as the new current candidate point.
[0099] After step 307, proceed to step 309.
[0100] Step 308: Select the i-th trajectory point as the new current candidate point.
[0101] Step 309: Determine whether the trajectory stream has been received completely.
[0102] If yes, proceed to step 3010; otherwise, wait for the (i+1)th trajectory point and return to step 301.
[0103] Step 3010: If there is a new current candidate point, add the new current candidate point to the sparse point set.
[0104] Existing pure kinematic thresholding schemes, lacking geometric constraints, struggle to achieve a good balance between compression ratio and fidelity.
[0105] Through the embodiments of this disclosure, based on the above combined judgment, both the dynamic characteristics of the trajectory (changes in motion parameters) and the static geometric characteristics (spatial positional relationships) are considered, thereby effectively compressing the amount of data while preserving the true shape of the trajectory to the greatest extent.
[0106] In some embodiments, determining the perpendicular distance of the current candidate point relative to the straight line formed by the current anchor point and the i-th trajectory point includes:
[0107] Determine the first distance between the current anchor point and the current candidate point, the second distance between the current candidate point and the i-th trajectory point, and the third distance between the current anchor point and the i-th trajectory point, respectively;
[0108] Based on the first distance, the second distance, and the third distance, determine the perpendicular distance of the current candidate point relative to the straight line formed by the current anchor point and the i-th trajectory point.
[0109] After determining that the change between the first motion parameter and the second motion parameter is less than or equal to a preset change threshold, the vertical distance of the current candidate point relative to the straight line segment formed by the current anchor point and the i-th trajectory point is further calculated.
[0110] For example, the first distance Used to indicate the current anchor point Compared with the current candidate points The three-dimensional spatial distance between the two points is calculated by fusing the longitude, latitude, and altitude of the two points.
[0111] Second distance Used to represent the current candidate point With the i-th trajectory point The three-dimensional spatial distance between them is calculated in the same way as the first distance.
[0112] Third distance Used to indicate the current anchor point Between the i-th trajectory point The three-dimensional spatial distance is calculated in the same way as the first distance.
[0113] The three-dimensional geometric deviation error (i.e., vertical distance) is calculated based on the above three distances: the sum of the first distance and the second distance is taken, the third distance is subtracted, and then the absolute value of the difference is calculated.
[0114] For example, the perpendicular distance of the current candidate point relative to the straight line formed by the current anchor point and the i-th trajectory point is expressed by the following formula:
[0115]
[0116] in, This represents the vertical distance (i.e., geometric deviation error). Indicates the first distance. Indicates the second distance. Indicates the third distance.
[0117] The physical meaning of this calculation method is as follows: if the current candidate point is located on the straight line segment from the current anchor point to the i-th trajectory point, then the sum of the first distance and the second distance is equal to the third distance. At this time, the approximate three-dimensional geometric deviation error is 0, indicating that the candidate point has no geometric deviation. If the current candidate point deviates from the straight line segment, the absolute value of the difference between the three will increase as the degree of deviation increases. The larger the error value, the more significant the geometric deviation of the candidate point relative to the reference straight line.
[0118] It should be noted that this disclosure may also use strict three-dimensional point-to-line segment perpendicular distance, triangle area method, vector cross product method or angle deviation method to make equivalent substitutions for the above-mentioned perpendicular distance calculation methods.
[0119] Through the embodiments of this disclosure, vertical distance is calculated based on three-dimensional spatial distance without the need for complex trigonometric function operations. The calculation efficiency is high and the values are stable. It can accurately measure the degree of spatial deviation of the candidate point relative to the line connecting the anchor point and the i-th trajectory point, effectively adapting to large-scale geographic spatial trajectories and improving the geometric fidelity of the thinning results.
[0120] In some embodiments, the first motion parameter includes velocity;
[0121] Determine the first motion parameters between the current anchor point and the current candidate point, including:
[0122] Obtain the first longitude, first latitude, and first altitude of the current anchor point in the geographic coordinate system, and the second longitude, second latitude, and second altitude of the current candidate point;
[0123] Based on the first longitude, first latitude, second longitude, and second latitude, determine the great circle distance between the current anchor point and the current candidate point;
[0124] Based on the first altitude and the second altitude, determine the altitude difference between the current anchor point and the current candidate point;
[0125] Based on the difference between the great circle distance and the height, determine the spatial distance between the current anchor point and the current candidate point;
[0126] The velocity between the current anchor point and the current candidate point is determined based on the receiving time interval and spatial distance between the current anchor point and the current candidate point in the trajectory flow.
[0127] Since longitude and latitude coordinates are located on the Earth's ellipsoid, simple planar Euclidean distance will suffer from scale distortion with latitude. The embodiments disclosed in this disclosure use Haversine spherical distance (i.e., great circle distance) as the horizontal projection reference, and then fuse the height difference to obtain the (three-dimensional) spatial distance.
[0128] For example, let the current anchor point be: ,in, Let these represent the first longitude, first latitude, and first altitude, respectively; and let the current candidate point be... , These represent the second longitude, second latitude, and second altitude, respectively.
[0129] Convert latitude and longitude to radians using the following formula:
[0130]
[0131]
[0132] in, Indicates the first longitude in radians. Indicates the first latitude in radians. Indicates the second longitude in radians. It represents the second latitude in radians.
[0133] The difference in longitude in radians and the difference in latitude in radians are calculated using the following formula:
[0134]
[0135]
[0136] in, Indicates the difference in longitude in radians. This represents the difference in latitude in radians.
[0137] The first intermediate quantity and the second intermediate quantity are calculated using the following formula:
[0138]
[0139]
[0140] in, Indicates the first intermediate quantity. This indicates the second intermediate quantity.
[0141] The ground distance (great circle distance) of Haversine is:
[0142]
[0143] in, This represents the great circle distance between the current anchor point and the current candidate point. Let R be the average radius of the Earth, which is 6,371,000 meters.
[0144] The (3D) spatial distance between the current anchor point and the current candidate point is calculated using the following formula:
[0145]
[0146] in, This represents the spatial distance between the current anchor point and the current candidate point.
[0147] The velocity between the current anchor point and the current candidate point is calculated using the following formula:
[0148]
[0149] in, This indicates the velocity between the current anchor point and the current candidate point. This represents the reception time interval between the current anchor point and the current candidate point in the trajectory stream.
[0150] It should be noted that, It can be explicitly passed in from outside, or it can be automatically calculated by difference based on the timestamp fields of the two trajectory points.
[0151] Correspondingly, the second motion parameter can also include velocity, and the velocity between the current candidate point and the i-th trajectory point is obtained by using the same method as that used to determine the velocity in the first motion parameter.
[0152] In some embodiments, the second motion parameter includes velocity; determining the second motion parameter between the current candidate point and the i-th trajectory point includes:
[0153] Obtain the third longitude, third latitude, and third altitude of the current candidate point in the geographic coordinate system, and the fourth longitude, fourth latitude, and fourth altitude of the i-th trajectory point;
[0154] Based on the third longitude, third latitude, fourth longitude, and fourth latitude, determine the great circle distance between the current candidate point and the i-th trajectory point;
[0155] Based on the third and fourth altitudes, determine the altitude difference between the current candidate point and the i-th trajectory point;
[0156] Based on the difference between the great circle distance and the height, determine the spatial distance between the current candidate point and the i-th trajectory point;
[0157] Based on the reception time interval and spatial distance between the current candidate point and the i-th trajectory point in the trajectory flow, the velocity between the current candidate point and the i-th trajectory point is determined.
[0158] Through the embodiments of this disclosure, the three-dimensional spatial distance is calculated based on the difference between the great circle distance and the height, which overcomes the error of planar projection over long distances. Combined with the speed parameters determined by the time interval, the three-dimensional dynamic features of moving objects are effectively captured, and the accuracy of thinning judgment is improved.
[0159] In some embodiments, the first motion parameter includes the heading angle;
[0160] Determine the first motion parameters between the current anchor point and the current candidate point, including:
[0161] Obtain the first longitude and first latitude of the current anchor point in the geographic coordinate system, and the second longitude and second latitude of the current candidate point;
[0162] Convert the first longitude, first latitude, second longitude, and second latitude to radians to obtain the first longitude radians, the first latitude radians, the second longitude radians, and the second latitude radians;
[0163] Calculate the difference in longitude radians between the first longitude radian and the second longitude radian, and the difference in latitude radians between the first latitude radian and the second latitude radian, respectively;
[0164] Based on the difference in longitude radians, the difference in latitude radians, and the first and second latitude radians, the heading angle between the current anchor point and the current candidate point is determined.
[0165] For example, let the current anchor point be: ,in, Let the first longitude and the first latitude be respectively; let the current candidate point be... , These represent the second longitude and the second latitude, respectively.
[0166] Convert latitude and longitude to radians using the following formula:
[0167]
[0168]
[0169] in, Indicates the first longitude in radians. Indicates the first latitude in radians. Indicates the second longitude in radians. It represents the second latitude in radians.
[0170] The difference in longitude in radians and the difference in latitude in radians are calculated using the following formula:
[0171]
[0172]
[0173] in, Indicates the difference in longitude in radians. This represents the difference in latitude in radians.
[0174] The heading angle between the current anchor point and the current candidate point is calculated using the following formula:
[0175]
[0176]
[0177]
[0178] in, The numerator represents the sine direction of the heading angle. The numerator represents the cosine direction of the heading angle. This represents the heading angle between the current anchor point and the current candidate point.
[0179] Correspondingly, the second motion parameter may also include the heading angle. The heading angle between the current candidate point and the i-th trajectory point is obtained by using a method that is completely consistent with the method used to determine the heading angle in the first motion parameter.
[0180] In some embodiments, the second motion parameter includes a heading angle; determining the second motion parameter between the current candidate point and the i-th trajectory point includes:
[0181] Obtain the third longitude and third latitude of the current candidate point in the geographic coordinate system, and the fourth longitude and fourth latitude of the i-th trajectory point;
[0182] Convert the third longitude, third latitude, fourth longitude, and fourth latitude in radians to obtain the third longitude radians, third latitude radians, fourth longitude radians, and fourth latitude radians;
[0183] Calculate the difference in longitude between the third and fourth longitudes in radians, and the difference in latitude between the third and fourth latitudes in radians, respectively.
[0184] Based on the difference in longitude radians, the difference in latitude radians, and the radians of the third and fourth latitudes, the heading angle between the current candidate point and the i-th trajectory point is determined.
[0185] The present invention provides an embodiment for calculating the heading angle based on a spherical model, which more accurately reflects the actual direction of travel compared to planar projection; and eliminates periodic jumps in longitude through radian conversion, ensuring stable angle difference calculation.
[0186] In some embodiments, the method further includes:
[0187] The heading angle is normalized to obtain the normalized heading angle, which has the following values: ,include:
[0188] Add a preset first constant to the heading angle, and then perform a modulo operation on the preset second constant to obtain the calculation result;
[0189] Subtract the first constant from the calculation result to obtain the normalized heading angle;
[0190] The first constant is π, and the second constant is 2π.
[0191] Normalize the heading angle to It can be expressed by the following formula:
[0192]
[0193] in, This represents the normalized heading angle. This function represents the heading angle and ensures that the absolute value of the heading angle difference is within the range of [0, π], eliminating false triggering caused by periodic jumps of ±2π.
[0194] The embodiments disclosed herein eliminate the periodic jumps in the heading angle ±2π, ensure accurate angle difference calculation, avoid false triggering, and improve the stability and reliability of motion trend judgment.
[0195] In some embodiments, the first motion parameter includes: the rate of change of height;
[0196] Determine the first motion parameters between the current anchor point and the current candidate point, including:
[0197] Determine the first elevation value of the current anchor point and the second elevation value of the current candidate point in the geographic coordinate system;
[0198] Based on the first height value and the second height value, determine the height difference between the current anchor point and the current candidate point;
[0199] Based on the reception time interval and height difference between the current anchor point and the current candidate point in the trajectory stream, the height change rate between the current anchor point and the current candidate point is determined.
[0200] Obtain the first elevation value of the current anchor point in the geographic coordinate system, and the second elevation value of the current candidate point in the geographic coordinate system. The elevation values are typically provided by positioning devices (such as GPS, barometers, or radar altimeters) and represent the vertical distance of the moving object relative to a reference ellipsoid or mean sea level.
[0201] Based on the first height value and the second height value, the difference between the two is calculated to obtain the height difference. This height difference reflects the absolute magnitude of the movement of the object during the time period from the current anchor point to the current candidate point.
[0202] Obtain the reception time interval (i.e., the difference in sampling time between the current anchor point and the current candidate point) in the trajectory stream. By dividing the height difference by the reception time interval, calculate the change in height per unit time, thereby determining the height change rate.
[0203] For example, the rate of change of height between the current anchor point and the current candidate point is calculated using the following formula:
[0204]
[0205] in, This represents the rate of change of height between the current anchor point and the current candidate point. Indicates the first height value. This indicates the second altitude value. This represents the reception time interval between the current anchor point and the current candidate point in the trajectory stream.
[0206] The height change rate is used to quantify the activity level of a moving object in the vertical direction.
[0207] Correspondingly, the second motion parameter may also include the height change rate. The height change rate between the current candidate point and the i-th trajectory point is obtained by using a method that is completely consistent with the method used to determine the height change rate in the first motion parameter.
[0208] In some embodiments, the second motion parameter includes: the rate of change of height; determining the second motion parameter between the current candidate point and the i-th trajectory point includes:
[0209] Determine the third elevation value of the current candidate point and the fourth elevation value of the i-th trajectory point in the geographic coordinate system;
[0210] Based on the third and fourth height values, determine the height difference between the current candidate point and the i-th trajectory point;
[0211] Based on the reception time interval and height difference between the current candidate point and the i-th trajectory point in the trajectory stream, the height change rate between the current candidate point and the i-th trajectory point is determined.
[0212] In this embodiment, the height change rate is used as the first motion parameter to effectively capture the maneuvering behavior of a moving object in the vertical dimension. By quantifying the intensity of climbing or diving, it helps to identify height change points, avoids missing key vertical maneuvering features when only focusing on planar motion, and improves the fidelity of the thinning results for three-dimensional motion morphology.
[0213] In some embodiments, the method further includes:
[0214] The timing begins when the i-th trajectory point is received.
[0215] If the (i+1)th trajectory point is not received within the preset time interval, the trajectory stream reception is considered complete.
[0216] In order to accurately identify the end of the trajectory of a moving object, prevent it from getting stuck indefinitely while waiting for subsequent data points, and output the final thinning result in a timely manner, this disclosure introduces a trajectory point timing mechanism.
[0217] Specifically, a timer and a preset timeout threshold are configured. The timeout threshold is the maximum allowable interval set according to the operational characteristics of the moving object. For example, for high-speed moving aircraft, this time can be set to several sampling periods (such as 10 seconds); for low-speed moving ground vehicles, it can be appropriately extended.
[0218] Once the i-th trajectory point is successfully received and the corresponding thinning judgment operation is completed, the timer is immediately triggered to start or reset, and the countdown begins. Then, it enters the listening state, waiting to receive the next trajectory point (i.e., the (i+1)-th trajectory point).
[0219] If a new trajectory point is detected before the countdown ends (i.e. within the preset time), it is determined that the trajectory flow is still ongoing, the timer is canceled, and the normal processing flow for the (i+1)th point is resumed.
[0220] Conversely, if the (i+1)th trajectory point is not received by the time the preset timeout expires, it is determined that the moving object has stopped moving, the communication link is interrupted, or the task has ended, thus confirming that the trajectory stream reception is complete.
[0221] At this point, the current thinning loop is immediately terminated, and step 104 (adding the last candidate point to the thinning point set) is triggered to generate the final thinning result.
[0222] Through the embodiments disclosed herein, the trajectory stream is automatically determined based on a timing mechanism, avoiding infinite waiting, ensuring timely output of thinning results and release of resources, and effectively improving the real-time performance and reliability of streaming processing.
[0223] The embodiments described above achieve at least the following technical effects:
[0224] Real-time advantage: Compared to offline global algorithms such as Douglas-Peucker, which require caching all trajectory points before processing, this disclosure adopts a single-pass streaming scan, which completes the judgment and outputs the confirmed key points in milliseconds after each new data point arrives, making it suitable for real-time monitoring and edge computing scenarios.
[0225] Balancing geometric fidelity and kinematic sensitivity: Compared to pure kinematic threshold filtering schemes, this disclosure introduces a three-dimensional geometric error threshold (i.e., distance threshold) to constrain the shape deviation of candidate points on smooth curve segments, avoiding oversimplification or redundancy caused by relying solely on velocity / heading angle thresholds;
[0226] 3D spatial adaptability: The spherical 3D distance model based on Haversine is adopted to overcome the scale distortion problem of 2D plane Euclidean distance in high-latitude regions, which is more in line with the movement law of aircraft and drones in real Earth space.
[0227] Figure 4 A block diagram of a trajectory flow thinning apparatus according to an embodiment of the present disclosure is shown schematically.
[0228] like Figure 4 As shown, the trajectory stream thinning device according to this embodiment includes a receiving module 401, an initialization module 402, an execution module 403, and a thinning module 404.
[0229] The receiving module 401 is used to receive the trajectory stream of the moving object to be thinned. The trajectory stream includes N trajectory points arranged in chronological order, where N is an integer greater than 2.
[0230] The initialization module 402 is used to take the first trajectory point in the trajectory flow as the initial anchor point and add it to the initialized sparse point set, and take the second trajectory point in the trajectory flow as the initial candidate point.
[0231] Execution module 403 is configured to perform the following operations on the i-th trajectory point sequentially received in the trajectory stream, where 2 < i ≤ N and i is an integer:
[0232] Determine the first motion parameter between the current anchor point and the current candidate point, and the second motion parameter between the current candidate point and the i-th trajectory point, respectively;
[0233] In the case where the change amount between the first motion parameter and the second motion parameter is greater than a preset change amount threshold, add the current candidate point to the decimated point set, use the current candidate point as the new current anchor point, and use the i-th trajectory point as the new current candidate point;
[0234] Decimation module 404 is configured to, when the reception of the trajectory stream is completed, if there is a new current candidate point, add the new current candidate point to the decimated point set, and the decimated point set is used to represent the decimation result of the trajectory stream.
[0235] It should be noted that the embodiments of the device part are similar to the embodiments of the method part, and the achieved technical effects are also similar. For specific details, please refer to the method embodiment part above and will not be elaborated here.
[0236] Any multiple of the modules, sub-modules, units, and sub-units in the embodiments of the present disclosure, or at least part of the functions of any of them, can be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units in the embodiments of the present disclosure can be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, and sub-units in the embodiments of the present disclosure can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or can be implemented by any other reasonable way of integrating or packaging the circuit in hardware or firmware, or implemented in any one or a suitable combination of the three implementation ways of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, and sub-units in the embodiments of the present disclosure can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding functions can be executed.
[0237] For example, any plurality of the receiving module 401, initialization module 402, execution module 403, and thinning module 404 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, at least one of the receiving module 401, initialization module 402, execution module 403, and thinning module 404 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the receiving module 401, initialization module 402, execution module 403, and thinning module 404 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0238] Figure 5 A block diagram of an electronic device suitable for implementing the methods described above, according to embodiments of the present disclosure, is illustrated schematically. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0239] like Figure 5 As shown, an electronic device 500 according to an embodiment of this disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage portion 508 into a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0240] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 502 and / or RAM 503. It should be noted that programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
[0241] According to embodiments of this disclosure, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to a bus 504. The system 500 may also include one or more of the following components connected to the input / output (I / O) interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0242] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0243] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0244] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0245] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.
[0246] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the methods provided in the embodiments of this disclosure.
[0247] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0248] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0249] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0250] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0251] Those skilled in the art will understand that the features described in the various embodiments of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0252] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended documents and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for thinning trajectory flow, characterized in that, including: receiving a trajectory stream of a moving object to be thinned, the trajectory stream including N trajectory points arranged in chronological order, where N is an integer greater than 2; taking the first trajectory point in the trajectory stream as an initial anchor point and adding it to the initialized thinned point set, and taking the second trajectory point in the trajectory stream as an initial candidate point; for the i-th trajectory point sequentially received in the trajectory stream, where 2 < i ≤ N and i is an integer, perform the following operations: respectively determining a first motion parameter between the current anchor point and the current candidate point, and a second motion parameter between the current candidate point and the i-th trajectory point; when the change amount between the first motion parameter and the second motion parameter is greater than a preset change amount threshold, adding the current candidate point to the thinned point set, taking the current candidate point as the new current anchor point, and taking the i-th trajectory point as the new current candidate point; when the reception of the trajectory stream is completed, if there is a new current candidate point, adding the new current candidate point to the thinned point set, and the thinned point set is used to represent the thinning result of the trajectory stream.
2. The trajectory flow thinning method according to claim 1, characterized in that, after respectively determining the first motion parameter between the current anchor point and the current candidate point, and the second motion parameter between the current candidate point and the i-th trajectory point, the method further includes: when the change amount between the first motion parameter and the second motion parameter is less than or equal to a preset change amount threshold, determining the perpendicular distance of the current candidate point with respect to the straight line formed by the current anchor point and the i-th trajectory point; when the perpendicular distance is greater than a preset distance threshold, adding the current candidate point to the thinned point set, taking the current candidate point as the new current anchor point, and taking the i-th trajectory point as the new current candidate point; when the perpendicular distance is less than or equal to the distance threshold, taking the i-th trajectory point as the new current candidate point.
3. The trajectory flow thinning method according to claim 2, characterized in that, the determining the perpendicular distance of the current candidate point with respect to the straight line formed by the current anchor point and the i-th trajectory point includes: respectively determining a first distance between the current anchor point and the current candidate point, a second distance between the current candidate point and the i-th trajectory point, and a third distance between the current anchor point and the i-th trajectory point; based on the first distance, the second distance, and the third distance, determining the perpendicular distance of the current candidate point with respect to the straight line formed by the current anchor point and the i-th trajectory point.
4. The trajectory flow thinning method according to claim 1, characterized in that, the first motion parameter includes speed; the determining the first motion parameter between the current anchor point and the current candidate point includes: obtaining a first longitude, a first latitude, and a first altitude of the current anchor point, and a second longitude, a second latitude, and a second altitude of the current candidate point in a geographic coordinate system; based on the first longitude, the first latitude, the second longitude, and the second latitude, determining a great circle distance between the current anchor point and the current candidate point; based on the first altitude and the second altitude, determining an altitude difference between the current anchor point and the current candidate point; based on the great circle distance and the altitude difference, determining a spatial distance between the current anchor point and the current candidate point; Based on the receiving time interval between the current anchor point and the current candidate point in the trajectory stream and the spatial distance, the velocity between the current anchor point and the current candidate point is determined.
5. The trajectory flow thinning method according to claim 1, characterized in that, The first motion parameter includes the heading angle; Determining the first motion parameter between the current anchor point and the current candidate point includes: Obtain the first longitude and first latitude of the current anchor point in the geographic coordinate system, and the second longitude and second latitude of the current candidate point; Convert the first longitude, first latitude, second longitude, and second latitude into radians to obtain the first longitude radians, the first latitude radians, the second longitude radians, and the second latitude radians; Calculate the difference in longitude radians between the first longitude radian and the second longitude radian, and the difference in latitude radians between the first latitude radian and the second latitude radian, respectively; Based on the longitude difference in radians, the latitude difference in radians, the first latitude radian and the second latitude radian, the heading angle between the current anchor point and the current candidate point is determined.
6. The trajectory flow thinning method according to claim 5, characterized in that, The method further includes: The value of the heading angle is normalized to obtain a normalized heading angle, wherein the normalized heading angle is... ,include: After adding a preset first constant to the heading angle, perform a modulo operation on the preset second constant to obtain the calculation result; Subtract the first constant from the calculation result to obtain the normalized heading angle; Wherein, the first constant is π, and the second constant is 2π.
7. The trajectory flow thinning method according to claim 1, characterized in that, The first motion parameter includes: the rate of change of height; Determining the first motion parameter between the current anchor point and the current candidate point includes: Determine the first elevation value of the current anchor point and the second elevation value of the current candidate point in the geographic coordinate system; Based on the first height value and the second height value, determine the height difference between the current anchor point and the current candidate point; Based on the reception time interval between the current anchor point and the current candidate point in the trajectory stream and the height difference, the height change rate between the current anchor point and the current candidate point is determined.
8. The trajectory flow thinning method according to claim 1, characterized in that, The method further includes: The timing begins when the i-th trajectory point is received; If the (i+1)th trajectory point is not received within the preset time period, the trajectory stream reception is determined to be complete.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 6.
10. A computer-readable storage medium having executable instructions stored thereon, characterized in that, When executed by the processor, this instruction causes the processor to implement the method of any one of claims 1 to 6.