A trajectory data processing method and device, and an electronic device
Patent Information
- Application Number
- CN202511646015.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2045-11-11
AI Technical Summary
缺陷一、常规抽稀算法灵活性差:现有技术通常使用固定的抽稀算法,这些算法在处理大量轨迹数据展示时存在明显不足
[0017]本申请提供的轨迹数据处理方案,获取到地图视域边界变化的响应事件后,识别获取到的原始数据中除AIS轨迹点外的预设类型数据点,并对预设类型数据点进行标记;根据视域边界变化动态调整道格拉斯-普克算法的抽稀度;依据调整后的抽稀度对原始数据中的AIS轨迹点进行初步抽稀;合并初步抽稀后的AIS轨迹点以及标记的预设类型数据点;对初步抽稀后的AIS轨迹点和预设类型数据点进行排序,得到第一数据集;采用调整后的抽稀度对第一数据集进行二次抽稀,得到第二数据集;基于第二数据集进行局部重绘,生成目标地图。通过本申请提供的轨迹数据处理方案,能够根据视域边界动态调整轨迹数据的显示,提高渲染效率,减少卡顿和响应延迟,并保持轨迹的连续性和预设类型数据点即特殊点的完整显示。
Smart Images

Figure CN121478894B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of map visualization technology, and in particular to a trajectory data processing method, apparatus, and electronic device. Background Technology
[0002] GIS (Geographic Information System) plays a vital role in modern map visualization, especially when dealing with large amounts of trajectory data, where efficient data processing and visualization are crucial. In existing map visualization systems, the display of AIS (Automatic Identification System) trajectory data for various vessels in a sea area is typically based on fixed thinning algorithms, such as the conventional Douglas-Puk algorithm and equidistant thinning algorithms.
[0003] Existing methods for processing trajectory data have the following drawbacks: Deficiency 1: Poor Flexibility of Conventional Thinning Algorithms: Existing technologies typically use fixed thinning algorithms, which have significant shortcomings when processing large amounts of trajectory data for display. For example, when using a fixed thinning threshold, if the thinning is too high, especially when the view boundary changes and it is necessary to emphasize the trajectory of a specific area, the excessively thinned data will not meet the display requirements for that area's trajectory. This not only limits the system's applicability to different view boundaries but also reduces its flexibility, making it unable to adapt to diverse user needs.
[0004] Defect 2: Response latency when the view boundary changes: When the view boundary changes dynamically, even if a conventional thinning algorithm is used to dynamically set the thinning threshold and adjust the thinning degree, all data needs to be reloaded for thinning. Local rendering is not possible, which causes system lag and response latency, seriously affecting the user experience.
[0005] Deficiency 3: Insufficient handling of special points: The handling of special points other than AIS trajectory points, such as those from news, satellite remote sensing, hot events, and relevant industry websites, is not flexible enough. It cannot guarantee that special points will not be diluted, and it cannot ensure that the entire ship's trajectory is displayed completely. Summary of the Invention
[0006] The purpose of this invention is to provide a trajectory data processing method, apparatus, and electronic device that can solve at least one of the above-mentioned problems in the prior art.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a trajectory data processing method, wherein the method includes: After receiving a response event indicating a change in the map view boundary, the system identifies preset type data points in the acquired raw data, excluding AIS trajectory points, and marks these preset type data points. The thinning degree of the Douglas-Puk algorithm is dynamically adjusted according to changes in the field of view boundary; The AIS trajectory points in the original data are initially thinned based on the adjusted thinning degree. Merge the AIS trajectory points after initial thinning and the marked data points of the preset type; The AIS trajectory points after preliminary thinning and the preset type of data points are sorted to obtain the first dataset; The first dataset is then subjected to a second thinning using the adjusted thinning degree to obtain the second dataset. Based on the second dataset, a local redraw is performed to generate the target map.
[0008] Optionally, after obtaining a response event indicating a change in the map view boundary, the step of identifying preset type data points in the obtained raw data, excluding AIS trajectory points, and marking the preset type data points includes: After receiving a response event indicating a change in the map's field of view boundary, the system identifies preset data points of a preset type from the acquired raw data, excluding AIS trajectory points, based on preset attributes of the data points. The preset attributes include: flight speed and heading. The preset data points of a preset type include: coordinate points on maps sourced from news, satellite remote sensing, trending events, or industry websites. Store and label the preset type of data points.
[0009] Optionally, the step of dynamically adjusting the thinning degree of the Douglas-Puk algorithm based on changes in the field of view boundary includes: The thinning degree of the Douglas-Puk algorithm is calculated based on the viewing height and viewport range corresponding to the viewing boundary range.
[0010] Optionally, the step of merging the initially thinned AIS trajectory points and the marked preset type data points includes: The AIS trajectory points after initial thinning and the marked preset type data points are merged, and a mapping table of the preset type data points is created, wherein the mapping table records the index position corresponding to each preset type data point.
[0011] Optionally, the step of sorting the initially thinned AIS trajectory points and the preset type of data points to obtain the first dataset includes: The AIS trajectory points after initial thinning are traversed one by one, and it is determined whether the preset type data points need to be inserted into the current position based on the index position corresponding to each preset type data point in the mapping table. If so, then insert the preset type of data point; If not, continue traversing the next initially thinned AIS trajectory point until all initially thinned AIS trajectory points have been traversed, resulting in a sequentially arranged list of initially thinned AIS trajectory points and the preset type data points.
[0012] Optionally, the step of performing a second thinning on the first dataset using the adjusted thinning degree to obtain the second dataset includes: The first dataset is thinned using the adjusted thinning degree to filter out the coordinate points within each screen. Determine the off-screen coordinate points adjacent to each of the on-screen coordinate points; The union of the first set of points composed of coordinates within the screen, the second set of points composed of coordinates outside the screen, and the set of data points of the preset type is determined as the second dataset.
[0013] Optionally, the step of locally redrawing the second dataset to generate the target map includes: A local redraw cost function is constructed based on the second dataset and the principle of minimizing local redraw cost; wherein, the local redraw cost function is a function that minimizes the sum of the number of rendering points, off-screen penalty, and special point loss penalty; Based on the local redrawing cost function and the second dataset, the local redrawing data points are determined; A target map is generated based on the locally redrawn data points.
[0014] This invention also provides a trajectory data processing device, wherein the device includes: The identification module is used to identify preset type data points in the acquired raw data, excluding AIS trajectory points, after receiving a response event of a change in the map view boundary, and to mark the preset type data points. The adjustment module is used to dynamically adjust the thinning degree of the Douglas-Puk algorithm according to changes in the field of view boundary; The first thinning module is used to perform preliminary thinning of AIS trajectory points in the original data based on the adjusted thinning degree. The merging module is used to merge the AIS trajectory points after initial thinning and the marked data points of the preset type; The sorting module is used to sort the AIS trajectory points after preliminary thinning and the preset type of data points to obtain the first dataset; The second thinning module is used to perform secondary thinning on the first dataset using the adjusted thinning degree to obtain the second dataset. The generation module is used to perform local redrawing based on the second dataset to generate the target map.
[0015] This invention provides an electronic device, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps of any of the trajectory data processing methods described above.
[0016] This invention provides a readable storage medium storing a program or instructions, which, when executed by a processor, implement the steps of any of the trajectory data processing methods described above.
[0017] The trajectory data processing scheme provided in this application, after acquiring a response event indicating a change in the map's view boundary, identifies and marks preset type data points in the acquired raw data, excluding AIS trajectory points. It then dynamically adjusts the thinning degree of the Douglas-Puk algorithm based on the view boundary change; performs initial thinning of the AIS trajectory points in the raw data using the adjusted thinning degree; merges the initially thinned AIS trajectory points with the marked preset type data points; sorts the initially thinned AIS trajectory points and preset type data points to obtain a first dataset; performs secondary thinning of the first dataset using the adjusted thinning degree to obtain a second dataset; and performs local redrawing based on the second dataset to generate the target map. This trajectory data processing scheme can dynamically adjust the display of trajectory data according to the view boundary, improving rendering efficiency, reducing stuttering and response latency, and maintaining the continuity of the trajectory and the complete display of preset type data points, i.e., special points. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the steps of a trajectory data processing method according to an embodiment of this application; Figure 2 This is a structural block diagram illustrating a trajectory data processing device according to an embodiment of this application. Detailed Implementation
[0019] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0020] The trajectory data processing scheme provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0021] As attached Figure 1 As shown, the trajectory data processing method of this application embodiment includes the following steps: Step 101: After obtaining the response event of the change in the map view boundary, identify the preset type data points in the obtained raw data other than AIS trajectory points, and mark the preset type data points.
[0022] This application addresses the problem of low efficiency and even freezing when displaying massive trajectory data on two-dimensional and three-dimensional spheres. It proposes dynamically thinning and adjusting the trajectory data and locally redrawing it when the map view boundary changes dynamically. This method is not only applicable to the visualization of ship track data but can also be widely applied to other scenarios requiring dynamic data processing and visualization, such as aircraft flight paths and vehicle driving trajectories. The trajectory data processing method provided in this application can be applied to electronic devices, which include a processor and a storage medium. The storage medium stores a computer program related to trajectory data processing, and the processor of the electronic device executes this computer program to implement the trajectory data processing flow.
[0023] The field of view boundary is the boundary of the area visible within the current map camera or viewport in map visualization. It defines the extent of the map that a user can observe under the current view height and viewport settings.
[0024] This step listens for changes in the viewport boundary during execution. Upon receiving a response event indicating a change in the viewport boundary, it triggers operations such as special point processing and dynamic thinning. This process is implemented through the event listening mechanism of the map visualization system, ensuring that the system can respond promptly and initiate subsequent data processing flows when the viewport boundary changes.
[0025] In an optional embodiment, after obtaining a response event of a change in the map view boundary, identifying preset type data points other than AIS trajectory points in the obtained raw data and marking the preset type data points can be done as follows: after obtaining a response event of a change in the map view boundary, identifying preset type data points other than AIS trajectory points from the obtained raw data based on the preset attributes of the data points; storing and marking the preset type data points.
[0026] The preset attributes include: speed and heading; the preset data points include: coordinate points on maps sourced from news, satellite remote sensing, trending events, or industry websites. These preset data points can also be referred to as special points. Preset data points can be filtered using preset rules or machine learning algorithms; however, this embodiment does not impose specific limitations on this.
[0027] This embodiment uses ship data obtained in step 101 as an example for illustration. It should be noted that the implementation is not limited to ship data; it can also include aviation flight data, vehicle driving data, etc. Identifying special points in the ship data, other than AIS data, such as data points from news, satellite remote sensing, trending events, and relevant industry websites, and storing and marking these special points, ensures that these special points are not thinned out during the thinning process. The processing of special points ensures that the trajectories of special points are displayed completely under different view boundaries, thus maintaining the integrity of the entire trajectory. More preferably, some custom point data can also be integrated into the AIS trajectory points as special points to achieve a more flexible ship track display function.
[0028] Step 102: Dynamically adjust the thinning degree of the Douglas-Puk algorithm according to the changes in the field of view boundary.
[0029] The Douglas-Puk algorithm dynamically adjusts its thinning degree based on changes in the viewport boundary to perform initial thinning of AIS trajectory points in the original data. The thinning degree can be calculated using a pre-defined mathematical model; for example, it can be expressed as a function of the viewport boundary range.
[0030] In one optional embodiment, the thinning degree of the Douglas-Puk algorithm can be calculated based on the view height and viewport range corresponding to the view boundary range. For example, the function representing the view boundary range can be expressed as: Thinning density = f(view height, viewport range) The thinning degree can be dynamically adjusted according to changes in the field of view boundary. Different thinning methods can be integrated. For example, when integrating the Douglas-Puk algorithm, the thinning threshold of the algorithm can be dynamically adjusted according to changes in the field of view boundary. When integrating the distance thinning method, the distance threshold can be dynamically set, which can significantly improve the flexibility and adaptability of the system.
[0031] The Douglas-Puk algorithm is a classic algorithm widely used for trajectory data thinning. This algorithm reduces the amount of data while preserving the main features of the trajectory by recursively filtering out key points in the trajectory data. The following is a detailed description and mathematical formula of the algorithm: The Douglas-Puk algorithm works as follows: Determine the initial line segment: Select the start and end points of the trajectory data as the two endpoints of the initial line segment. Find the farthest point: Calculate the perpendicular distance from all points in the trajectory data to the initial line segment, and find the point with the largest distance (called the farthest point). Determine whether to retain: If the distance from the farthest point to the initial line segment is greater than a preset threshold, then retain the farthest point; otherwise, do not retain the point. Recursive processing: Divide the trajectory data into two parts, and recursively repeat the above steps, using the start point and the farthest point of the initial line segment as the new start and end points respectively, until all points have been processed.
[0032] The mathematical formula for the Douglas-Puk algorithm is expressed as follows: Suppose the trajectory data is a series of points P = {P1, P2, ..., Pn}, where P i = (x i ,y i ) represents the coordinates of the i-th point.
[0033] Calculate the distance from a point to a line segment: Let the two endpoints of the line segment be Pa = (x a ,y a ) and Pb = (x b ,y b ).
[0034] Point P i to line segment P a P b The vertical distance d can be calculated using the following formula:
[0035] Determine the farthest point: Traverse all points P i Calculate the distance d from it to line segment PaPb. i .
[0036] Find the point P with the largest distance. max ,Right now:
[0037] Determine whether to retain: If d max >tolerance, then retain point P max Otherwise, the point will not be retained.
[0038] Recursive processing: The trajectory data is divided into two parts: from P a To P max and from P max To P b Repeat the above steps for both parts until all points have been processed.
[0039] Step 103: Perform preliminary thinning of the AIS trajectory points in the original data based on the adjusted thinning degree.
[0040] Data thinning is a method of filtering data. After thinning, the amount of data is greatly reduced while still largely reflecting the basic shape characteristics of the original graphic or curve, saving space and time for further processing. Data thinning has wide applications in GIS vector data processing and graphic data compression.
[0041] Step 104: Merge the AIS trajectory points after initial thinning with the marked preset type data points.
[0042] In an optional embodiment, the method for merging the initially thinned AIS trajectory points and the marked preset type data points (i.e., special points) can be as follows: merge the initially thinned AIS trajectory points and the marked preset type data points, and create a mapping table for the preset type data points, wherein the mapping table records the index position corresponding to each preset type data point.
[0043] This merging step ensures that special points remain unchanged during data updates, while being integrated with AIS track points to maintain the complete display of the entire ship's trajectory.
[0044] Step 105: Sort the AIS trajectory points and preset type data points after preliminary thinning to obtain the first dataset.
[0045] The order of the data points obtained through merging in step 104 may be inaccurate. Special points need to be appropriately inserted into the AIS trajectory points. This process involves traversing the AIS trajectory points after the first thinning, inserting them according to the created special point mapping table (i.e., the mapping table of preset data point types), checking each time to see if any special points need to be inserted into the current position. Finally, the traversal ends, resulting in the correct order of the AIS trajectory points and the set of special points. This process can be implemented using a data sorting algorithm to ensure the accuracy and completeness of the data.
[0046] In one optional embodiment, the first dataset can be obtained by sorting the initially thinned AIS trajectory points and the preset type of data points as follows: The process iterates through each of the pre-thinned AIS trajectory points, determining whether a preset type data point needs to be inserted into the current position based on the index position of each preset type data point in the mapping table. If yes, the preset type data point is inserted; otherwise, the process continues to iterate through the next pre-thinned AIS trajectory point until all pre-thinned AIS trajectory points have been traversed, resulting in a sequentially arranged list of pre-thinned AIS trajectory points and preset type data points.
[0047] This method ensures the integrity of special point trajectories and offers more flexible handling of special points. Marking special points ensures they are not filtered out during the first thinning process, maintaining their complete trajectory display. During the second filtering, it accurately guarantees the correct display of trajectory points and special points within the viewport boundary. This improvement ensures the integrity and visibility of special points across different viewport boundaries.
[0048] Step 106: Perform a second thinning on the first dataset using the adjusted thinning level to obtain the second dataset.
[0049] The first dataset includes: AIS trajectory points and a set of preset type data points (i.e., special points).
[0050] Based on the dynamic changes in the viewport boundary, the final set of AIS trajectory points and special points undergoes a second thinning process. This thinning step retains only the on-screen coordinate points and their adjacent off-screen coordinate points (including special points), obtaining local data for local redrawing. This significantly optimizes rendering performance, reduces data volume, improves rendering efficiency, and reduces stuttering and response latency. The off-screen coordinate points adjacent to the on-screen coordinate points also include special points.
[0051] In one optional embodiment, the method of performing a second thinning on the first dataset using the adjusted thinning degree to obtain the second dataset may include the following sub-steps: Sub-step 1: Thin the first dataset using the adjusted thinning degree and filter out the coordinate points within each screen; Sub-step 2: Determine the off-screen coordinates adjacent to each on-screen coordinate point; Sub-step 3: Determine the second dataset by combining the first set of points composed of coordinates within the screen, the second set of points composed of coordinates outside the screen, and the set of data points of a preset type.
[0052] The method provided in this optional embodiment can significantly reduce the rendering pressure caused by excessive amounts of trajectory point data such as AIS through two thinning filters, thereby alleviating problems such as browser rendering lag, response delay, and even crashes. It greatly improves rendering efficiency without sacrificing data accuracy, significantly enhancing the user experience.
[0053] In practical implementation, a feasible approach is as follows: For the merged point set C, define the in-screen point set I. A point p∈C is considered in-screen if the following condition is satisfied: isPointInView ( p , extent )={ p . lon ≥ extent . xminand p . lon ≤ extent . xmax and p . lat ≥ extent . ymin and p . lat ≤ extent . ymax} Therefore, the point set within the screen I and neighboring point set A It can be represented as: I ={ p ∈ C | isPointInView ( p , extent )} A ={ p ∈ C | q ∈ I ,and q The predecessor or successor point is p and p ∈ / I} Final Point Set F It is the set of points within the screen. I Adjacent point set A and special point set S The union of sets, preserving the original order: F ={ p ∈ C | p ∈ I or p ∈ A or p ∈ S} Step 107: Perform local redrawing based on the second dataset to generate the target map.
[0054] In one optional embodiment, the second dataset is partially redrawn to generate the target map in the following manner: First, a local redraw cost function is constructed based on the second dataset and the principle of minimizing local redraw cost; wherein, the local redraw cost function is a function that minimizes the sum of the number of rendering points, off-screen penalty, and special point loss penalty; In actual implementation, a screen visibility function can be defined:
[0055] in,π : S 2→R2 is the Mercator projection from the sphere to the screen.
[0056] Construct the local redraw cost function:
[0057] Final local point set F The solution can be found using a greedy forward selection algorithm:
[0058] Secondly, based on the local redrawing cost function and the second dataset, local redrawing data points are determined; finally, the target map is generated based on the local redrawing data points.
[0059] The local data obtained after the secondary thinning step is then rendered, which may include, but is not limited to, visual rendering techniques such as connecting point data, drawing arrows, adding labels, and highlighting special points. This process is implemented through the rendering engine of the map visualization system, ensuring that users can obtain a smooth and accurate map visualization experience across different view boundaries.
[0060] Even after two rounds of thinning, this application can still ensure the correct display of the trajectory while significantly reducing the amount of data. The thinning process will not cause abnormal trajectory display, thus avoiding misleading users' interpretation and intelligence work, and ensuring the accuracy and reliability of the data.
[0061] The trajectory data processing scheme provided in this application, after acquiring a response event indicating a change in the map's view boundary, identifies and marks preset type data points in the acquired raw data, excluding AIS trajectory points. It then dynamically adjusts the thinning degree of the Douglas-Puk algorithm based on the view boundary change; performs initial thinning of the AIS trajectory points in the raw data using the adjusted thinning degree; merges the initially thinned AIS trajectory points with the marked preset type data points; sorts the initially thinned AIS trajectory points and preset type data points to obtain a first dataset; performs secondary thinning of the first dataset using the adjusted thinning degree to obtain a second dataset; and performs local redrawing based on the second dataset to generate the target map. This trajectory data processing scheme can dynamically adjust the display of trajectory data according to the view boundary, improving rendering efficiency, reducing stuttering and response latency, and maintaining the continuity of the trajectory and the complete display of preset type data points, i.e., special points.
[0062] Figure 2 A structural block diagram of a trajectory data processing device according to an embodiment of this application.
[0063] The trajectory data processing device provided in this application includes the following functional modules; The identification module 201 is used to identify preset type data points in the acquired raw data, excluding AIS trajectory points, after obtaining a response event of a change in the map view boundary, and to mark the preset type data points. The adjustment module 202 is used to dynamically adjust the thinning degree of the Douglas-Puk algorithm according to the changes in the field of view boundary; The first thinning module 203 is used to perform preliminary thinning of the AIS trajectory points in the original data based on the adjusted thinning degree. The merging module 204 is used to merge the AIS trajectory points after preliminary thinning and the marked data points of the preset type; The sorting module 205 is used to sort the AIS trajectory points after preliminary thinning and the preset type data points to obtain the first dataset; The second thinning module 206 is used to perform secondary thinning on the first dataset using the adjusted thinning degree to obtain the second dataset. The generation module 207 is used to perform local redrawing based on the second dataset to generate the target map.
[0064] Optionally, the identification module is specifically used for: After receiving a response event indicating a change in the map's field of view boundary, the system identifies preset data points of a preset type from the acquired raw data, excluding AIS trajectory points, based on preset attributes of the data points. The preset attributes include: flight speed and heading. The preset data points of a preset type include: coordinate points on maps sourced from news, satellite remote sensing, trending events, or industry websites. Store and label the preset type of data points.
[0065] Optionally, the adjustment module is specifically used for: The thinning degree of the Douglas-Puk algorithm is calculated based on the viewing height and viewport range corresponding to the viewing boundary range.
[0066] Optionally, the merging module is specifically used for: The AIS trajectory points after initial thinning and the marked preset type data points are merged, and a mapping table of the preset type data points is created, wherein the mapping table records the index position corresponding to each preset type data point.
[0067] Optionally, the sorting module is specifically used for: The AIS trajectory points after initial thinning are traversed one by one, and it is determined whether the preset type data points need to be inserted into the current position based on the index position corresponding to each preset type data point in the mapping table. If so, then insert the preset type of data point; If not, continue traversing the next initially thinned AIS trajectory point until all initially thinned AIS trajectory points have been traversed, resulting in a sequentially arranged list of initially thinned AIS trajectory points and the preset type data points.
[0068] Optionally, the second thinning module includes: The first submodule is used to thin the first dataset using the adjusted thinning degree and filter out the coordinate points within each screen. The second submodule is used to determine the off-screen coordinate points adjacent to each of the on-screen coordinate points; The third submodule is used to determine the second dataset by the union of the first set of points composed of coordinate points inside the screen, the second set of points composed of coordinate points outside the screen, and the set of data points of the preset type.
[0069] Optionally, the generation module includes: The fourth submodule is used to construct a local redraw cost function based on the second dataset and the principle of minimizing local redraw cost; wherein, the local redraw cost function is a function that minimizes the sum of the number of rendering points, off-screen penalty, and special point loss penalty; The fifth submodule is used to determine the local redrawing data points based on the local redrawing cost function and the second dataset; The sixth submodule is used to generate a target map based on the locally redrawn data points.
[0070] The embodiments provided in this application Figure 2 The trajectory data processing device shown can achieve Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0071] The trajectory data processing device provided in this application embodiment can dynamically adjust the display of trajectory data according to the view boundary, improve rendering efficiency, reduce lag and response delay, and maintain the continuity of the trajectory and the complete display of preset type data points, i.e., special points.
[0072] Optionally, embodiments of this application also provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the processes executed by the trajectory data processing device described above and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0073] Memory, used to store computer programs; When the processor executes a program stored in the memory, it implements the trajectory data processing method executed by the processor as shown in the above method embodiments.
[0074] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.
[0075] The communication interface is used for communication between the aforementioned terminal and other devices.
[0076] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0077] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0078] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0079] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A trajectory data processing method, characterized in that, The method includes: After receiving a response event indicating a change in the map view boundary, the system identifies preset type data points in the acquired raw data, excluding AIS trajectory points, and marks these preset type data points. The thinning degree of the Douglas-Puk algorithm is dynamically adjusted according to changes in the field of view boundary; The AIS trajectory points in the original data are initially thinned based on the adjusted thinning degree. Merge the AIS trajectory points after initial thinning and the marked data points of the preset type; The AIS trajectory points after preliminary thinning and the preset type of data points are sorted to obtain the first dataset; The first dataset is then subjected to a second thinning using the adjusted thinning degree to obtain the second dataset. Based on the second dataset, a local redraw is performed to generate the target map; The preset data points include coordinates on maps sourced from news, satellite remote sensing, trending events, or industry websites.
2. The method according to claim 1, characterized in that, After receiving a response event indicating a change in the map view boundary, the steps of identifying preset type data points in the acquired raw data, excluding AIS trajectory points, and marking these preset type data points include: After receiving a response event indicating a change in the map view boundary, the system identifies preset data points of a preset type, excluding AIS trajectory points, from the acquired raw data based on preset attributes of the data points; wherein, the preset attributes include: speed and heading. Store and label the preset type of data points.
3. The method according to claim 1, characterized in that, The steps of dynamically adjusting the thinning degree of the Douglas-Puk algorithm based on changes in the field of view boundary include: The thinning degree of the Douglas-Puk algorithm is calculated based on the viewing height and viewport range corresponding to the viewing boundary range.
4. The method according to claim 1, characterized in that, The step of merging the initially thinned AIS trajectory points and the marked preset type data points includes: The AIS trajectory points after initial thinning and the marked preset type data points are merged, and a mapping table of the preset type data points is created, wherein the mapping table records the index position corresponding to each preset type data point.
5. The method according to claim 4, characterized in that, The steps for sorting the pre-thinned AIS trajectory points and the preset type of data points to obtain the first dataset include: The AIS trajectory points after initial thinning are traversed one by one, and it is determined whether the preset type data points need to be inserted into the current position based on the index position corresponding to each preset type data point in the mapping table. If so, then insert the preset type of data point; If not, continue traversing the next initially thinned AIS trajectory point until all initially thinned AIS trajectory points have been traversed, resulting in a sequentially arranged list of initially thinned AIS trajectory points and the preset type data points.
6. The method according to claim 1, characterized in that, The step of performing secondary thinning on the first dataset using the adjusted thinning degree to obtain the second dataset includes: The first dataset is thinned using the adjusted thinning degree to filter out the coordinate points within each screen. Determine the off-screen coordinate points adjacent to each of the on-screen coordinate points; The union of the first set of points composed of coordinates within the screen, the second set of points composed of coordinates outside the screen, and the set of data points of the preset type is determined as the second dataset.
7. The method according to claim 1, characterized in that, The steps for locally redrawing the second dataset to generate the target map include: A local redraw cost function is constructed based on the second dataset and the principle of minimizing local redraw cost; wherein, the local redraw cost function is a function that minimizes the sum of the number of rendering points, off-screen penalty, and special point loss penalty; Based on the local redrawing cost function and the second dataset, the local redrawing data points are determined; A target map is generated based on the locally redrawn data points.
8. A trajectory data processing device, characterized in that, The device includes: The identification module is used to identify preset type data points in the acquired raw data, excluding AIS trajectory points, after receiving a response event of a change in the map view boundary, and to mark the preset type data points. The adjustment module is used to dynamically adjust the thinning degree of the Douglas-Puk algorithm according to changes in the field of view boundary; The first thinning module is used to perform preliminary thinning of AIS trajectory points in the original data based on the adjusted thinning degree. The merging module is used to merge the AIS trajectory points after initial thinning and the marked data points of the preset type; The sorting module is used to sort the AIS trajectory points after preliminary thinning and the preset type of data points to obtain the first dataset; The second thinning module is used to perform secondary thinning on the first dataset using the adjusted thinning degree to obtain the second dataset. The generation module is used to perform local redrawing based on the second dataset to generate the target map; The preset data points include coordinates on maps sourced from news, satellite remote sensing, trending events, or industry websites.
9. The apparatus according to claim 8, characterized in that, The identification module is specifically used for: After receiving a response event indicating a change in the map view boundary, the system identifies preset data points of a preset type, excluding AIS trajectory points, from the acquired raw data based on preset attributes of the data points; wherein, the preset attributes include: speed and heading. Store and label the preset type of data points.
10. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions are executed by the processor using the steps of any one of the trajectory data processing methods of claims 1-7.
Citation Information
Patent Citations
Track data processing method and device, equipment, storage medium and product
CN116226301A
Map thinning system
CN117490680A