Method for visualizing parallel kernel density of ship trajectories based on gpu shader

Through the spatiotemporal convolution kernel density method based on GPU shaders, the problem of processing massive ship AIS data was solved, in-depth analysis and intuitive visualization of ship behavior patterns were achieved, and the efficiency of maritime traffic management was improved.

CN119600133BActive Publication Date: 2025-10-10SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411577355.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-10-10
Estimated Expiration
2044-11-06

AI Technical Summary

Technical Problem

Existing technologies are unable to efficiently process massive amounts of ship AIS data and achieve in-depth analysis and intuitive visualization of ship behavior patterns, especially in large-scale data processing and multi-dimensional feature display.

Method used

The spatiotemporal convolution kernel density method based on GPU shader is adopted to generate web visualization results of ship behavior patterns through preprocessing of AIS data, parallel calculation of spatiotemporal convolution and visualization processing.

Benefits of technology

It improves the analysis depth of ship behavior patterns and the interactivity and accuracy of data display, adapts to large-scale data processing, and enhances maritime traffic management and safety assurance capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600133B_ABST
    Figure CN119600133B_ABST
Patent Text Reader

Abstract

The application discloses a ship trajectory parallel kernel density visualization method based on a GPU shader, and the method comprises the following steps: obtaining original AIS data, and preprocessing the original AIS data to obtain target data; adopting a spatiotemporal convolution kernel density parallel calculation method to process the target data to obtain a spatiotemporal convolution kernel density processing result; and performing visualization processing on the kernel density processing result to obtain a Web visualization result of ship behavior patterns. The application embodiment improves the analysis depth of the ship behavior patterns, optimizes the interactivity and accuracy of data display, and can be widely applied to the computer technology field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a visualization method for ship trajectory parallel kernel density based on a GPU shader. Background Art

[0002] With the continued growth of cross-border trade and the shipping industry, maritime traffic has become increasingly complex, and navigation risks have significantly increased. In recent years, ship collisions, groundings, waterway congestion, and accidents caused by severe weather have become frequent. To address these challenges, maritime agencies around the world are continuously improving their maritime situational awareness (MSA) capabilities and conducting extensive research in the field of maritime intelligent services. Ship behavior pattern mining technology, as a key technology for understanding the patterns, characteristics, and semantic information hidden in a large number of ship activities, is an important foundation for developing a variety of maritime intelligent service applications such as route prediction and maritime threat warning.

[0003] The Automatic Identification System (AIS) is a radio-based ship tracking and monitoring technology that transmits key data such as a ship's identity, location, speed, and heading in real time to nearby base stations and satellites, providing maritime management personnel with reliable navigation information. It has been widely used by maritime departments in various countries. According to the International Maritime Organization, all merchant ships with a gross tonnage of more than 300 tons must be equipped with AIS on international routes to ensure sufficient coverage and data scale. This near-real-time data not only supports ship identity confirmation and collision avoidance during navigation, but also provides a data foundation for management personnel to discover valuable behavioral patterns and regularities from ship motion information, thereby enhancing maritime regulatory capabilities.

[0004] However, as real-time AIS data continues to accumulate, the overall knowledge density is relatively low, making extracting valuable behavioral information from this massive amount of ship data a challenging task. First, ships have a greater degree of freedom in navigation and generally do not strictly adhere to fixed routes. This results in more diverse and unpredictable behavioral patterns, resulting in a higher level of complexity compared to land-based transportation. Second, due to the high frequency of AIS data updates and the extremely large data volume, efficient processing places higher demands on algorithm performance. Finally, the intuitive presentation of analysis results is crucial to improving the practicality of maritime supervision. Summary of the Invention

[0005] The main purpose of the embodiment of the present invention is to propose a visualization method for ship trajectory parallel kernel density based on GPU shaders, which improves the analysis depth of ship behavior patterns and optimizes the interactivity and accuracy of data display.

[0006] To achieve the above objectives, an embodiment of the present invention provides a method for visualizing the parallel kernel density of ship trajectories based on a GPU shader, comprising the following steps:

[0007] Acquiring original AIS data and preprocessing the original AIS data to obtain target data;

[0008] The target data is processed using a spatiotemporal convolution kernel density parallel calculation method to obtain a spatiotemporal convolution kernel density processing result;

[0009] The kernel density processing result is visualized to obtain a Web visualization result of the ship behavior pattern.

[0010] In some embodiments, obtaining the original AIS data and preprocessing the original AIS data to obtain the target data includes the following steps:

[0011] Based on the raw AIS data, the position point data is sorted by time, and ships with the same unique identifier are strung together into track lines in chronological order, retaining the latitude and longitude, speed and reporting time of the position points to generate ship tracks;

[0012] Setting an error threshold, applying the Douglas Planck algorithm to the obtained ship trajectory, compressing trajectory points with little change in motion direction, obtaining a polyline set consisting of trajectory points that retain motion characteristics, and completing the compression process of the ship trajectory;

[0013] Deleting abnormal tracks from the ship track based on a preset distance threshold and an average speed of the path, thereby completing the cleaning process of the ship track;

[0014] Modeling the motion process of the trajectory using trajectory segments in the ship trajectory as units to analytically describe the motion process of the ship;

[0015] Among them, in the process of modeling the motion process of the trajectory, the calculation formula of each motion parameter is:

[0016] p(t)=p(t0)+x

[0017]

[0018] Where p(t) represents the position at time t; p(t0) represents the position at time t0; x represents the displacement relative to time t0; v init Represents the initial velocity of the model fitting; a represents the acceleration of the model fitting; v1 represents the instantaneous velocity of the end point of the line segment; v0 represents the instantaneous velocity of the starting point of the line segment; dis() represents the distance function; p1 represents the coordinates of the end point of the line segment; p0 represents the coordinates of the starting point of the line segment.

[0019] In some embodiments, the kernel density parallel computing method using spatio-temporal convolution processes the target data to obtain a spatio-temporal convolution kernel density processing result, including the following steps:

[0020] According to the target data, the motion information of each trajectory point is represented as a four-dimensional vector, and an eight-bit vector composed of line segments is used as the input of each vertex shader of WebGL and loaded into a vertex buffer to complete the loading of vertex information.

[0021] According to the loaded vertex information, a directional rectangular boundary is calculated according to the line segment input by the vertex each time, which is used as the potential range of kernel density in two-dimensional space when the radius parameter is r, and geometric primitive generation is completed.

[0022] Considering the time information and the space information, kernel density calculation is performed according to the geometric primitive.

[0023] According to the result of the kernel density calculation, the calculated kernel density value is stored in the color channel of each pixel, and after the directional rectangular primitive is generated, each rectangular is rasterized through a rendering pipeline, and the kernel density calculation method using spatio-temporal convolution is implemented in a fragment shader, so that each pixel value of the rectangular primitive retains the calculated kernel density information, and a density map is generated.

[0024] wherein the final density value of the current pixel is the sum of the density contributions of all N trajectories to the current pixel, and the calculation formula is:

[0025]

[0026] wherein C(q) represents the final density value of the position of point q.

[0027] In some embodiments, according to the loaded vertex information, a directional rectangular boundary is calculated according to the line segment input by the vertex each time, which is used as the potential range of kernel density in two-dimensional space when the radius parameter is r, and geometric primitive generation is completed, including the following steps:

[0028] The direction unit vector direction and the normal unit vector n of the trajectory line segment are calculated.

[0029] The offset of the four vertices of the rectangle relative to the end points of the input line segment in the direction of the line segment and the normal direction is calculated according to the given radius parameter r, and the vertices (N1, M2, N3, N4) of the rectangular primitive are obtained, and the calculation formula is:

[0030]

[0031] n=(-direction.y,direction.x)

[0032]

[0033] Among them, p1 represents the end point of the line segment; p0 represents the starting point of the line segment; x represents the horizontal coordinate of the normal unit vector; y represents the vertical coordinate of the normal unit vector.

[0034] In some embodiments, the taking into account time information and spatial information and performing kernel density calculation based on the geometric primitives comprises the following steps:

[0035] Considering that the distance between the target point and the line segment and the time the ship stays on the line segment affect the target point q density value, according to the given kernel density parameter r, the search is performed with the target point q as the center and r as the radius. The intersection points r1 and r2 of the boundary of the search range and the trajectory line segment ((p1, p0)) are calculated. The line segment (r1, r2) is the trajectory object that actually contributes to the q density.

[0036] Considering the influence of spatial position on the density of target point q, the Gaussian kernel function is used for calculation. The calculation formula is: Among them, K(x,r) represents the Gaussian kernel function, x represents the distance from the target point q to the line segment, and r represents the bandwidth of the kernel function;

[0037] Considering the influence of time on the density of the point q, the time t(x) of each position on r1 and r2 is reversed according to the motion model and the obtained spatial position information, and the trajectory segment is calculated in [t r1 ,t r2 ]The density contribution C to q in time traj1 , the calculation formula is:

[0038]

[0039]

[0040] Among them, v init represents the initial velocity after model fitting; a represents the acceleration after model fitting.

[0041] In some embodiments, visualizing the kernel density processing result to obtain a web visualization result of the ship behavior pattern includes the following steps:

[0042] The real density value is obtained according to the color channel information of the kernel density map, and the density value is graded and colored. Specifically, the kernel density value is mapped using a logarithm, and the converted density value Density(q) is used with a linear gradient to project the density characteristics of different regions, completing the color texture generation.

[0043] Use lighting textures to characterize data features and differences between density values. Specifically, density values ​​are mapped to height features on a two-dimensional plane, and a normal map is generated from the density field. Based on the normal map, the Phong shading model is used to calculate the final lighting texture given the ambient light and light source position.

[0044] The frame buffer manages the calculation of all different textures, and finally the color texture and lighting texture are merged in the rendering pipeline to obtain the final result, which determines the web visualization result of the ship's behavior pattern.

[0045] In some embodiments, the calculation formula of the density feature is:

[0046] Density(q)=log2(C(q)+1)

[0047] The calculation formula of the normal map is:

[0048] norml(i,j)=normalize((C(i-1,j)-C(i+1,j)) / 2,(C(i,j-1)-C(i,j+1)) / 2,1.0)

[0049] The calculation formula of the lighting texture is:

[0050] Light(i,j)=normal(i,j)·DiffuseLightDirection·ObjectColot+Ambient·ObjectColor

[0051] Among them, Density(q) represents the density value; C(q) represents the final density value at the position of point q; norml(i,j) represents the normalized normal vector at the position (i,j); normalize() represents the vector normalization function; Light(i,j) represents the texture of the object at the position (i,j) after illumination; DiffuseLightDirection represents the diffuse light source; ObjectColor represents the original texture of the object; Ambient represents the ambient light.

[0052] Another aspect of the present invention provides a visualization system for ship trajectory parallel kernel density based on a GPU shader, including:

[0053] The first module is used to obtain raw AIS data and pre-process the raw AIS data to obtain target data;

[0054] The second module is used to process the target data using a parallel calculation method of kernel density of spatiotemporal convolution to obtain a kernel density processing result of spatiotemporal convolution;

[0055] The third module is used to visualize the kernel density processing results to obtain a Web visualization result of the ship behavior pattern.

[0056] Another aspect of an embodiment of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the aforementioned method when executing the computer program.

[0057] To achieve the above object, another aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0058] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.

[0059] Embodiments of the present invention have at least the following beneficial effects: A method and system for visualizing ship trajectory parallel kernel density using GPU shaders is provided. This solution obtains raw AIS data and preprocesses it to obtain target data. This target data is then processed using a parallel kernel density calculation method based on spatiotemporal convolution to obtain a kernel density result. This kernel density result is then visualized to produce a Web-based visualization of ship behavior patterns. This embodiment of the present invention enhances the depth of ship behavior pattern analysis and optimizes the interactivity and accuracy of data presentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present invention;

[0061] Figure 2 It is a flowchart of the overall steps provided by an embodiment of the present invention;

[0062] Figure 3 This is a flowchart of specific implementation steps provided by an embodiment of the present invention;

[0063] Figure 4 is a diagram of a parallel computation process of spatiotemporal convolution kernel density provided by an embodiment of the present invention;

[0064] Figure 5 Schematic diagram of spatiotemporal convolution kernel density calculation provided by an embodiment of the present invention;

[0065] Figure 6 This is a visualization effect diagram of an example ship trajectory moving at a reduced speed from the lower left to the upper right, provided by an embodiment of the present invention;

[0066] Figure 7 This is a visualization effect diagram of real data provided by an embodiment of the present invention;

[0067] Figure 8 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0068] In order to make the objects, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present invention. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the appended claims.

[0069] It will be understood that the terms "first," "second," and the like used in the present invention may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are merely used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present invention, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of," "when," or "in response to a determination."

[0070] The terms "at least one", "plurality", "each", "any", etc. used in the present invention include at least one, two or more, multiple, two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are for the purpose of describing embodiments of the present invention only and are not intended to limit the present invention.

[0072] Before describing the embodiments of the present invention in detail, some related technologies involved in the embodiments of the present invention are first described as follows:

[0073] Automatic Identification System (AIS): The Automatic Identification System (AIS) is an automated tracking system widely used in ship communication and navigation. AIS transmits important information such as ship identification number, position, speed and heading through the ship-mounted transmitter. These data not only help ships to identify each other and avoid collisions, but also provide important data support for maritime traffic management, search and rescue operations and navigation research.

[0074] Web Visualization Technology: Visualization is the process of converting abstract data into graphics or images for intuitive understanding and analysis. Web visualization refers to the graphical representation of data presented and interacted with in a browser through web technologies. It converts complex data sets into easily understandable charts, maps, images or other visual forms, allowing users to access and analyze data in real time through a web platform. This method combines the advantages of modern web technologies and data visualization techniques, enabling data display and analysis on any device that supports web browsers.

[0075] Kernel Density Estimation: Kernel Density Estimation (KDE) is a non-parametric statistical method for estimating unknown probability density functions. Compared with traditional histograms, KDE can provide a smooth density curve without relying on fixed interval division, thus more accurately describing the distribution of data. In KDE, each data point is centered with a smoothing function called "kernel function", which estimates the local density according to its distance weight. Common kernel functions include Gaussian kernel, etc. These kernel functions are usually symmetric and have a smooth bell-shaped curve. By superimposing these kernel functions, a smooth density curve of the entire data set is formed. Through KDE, potential distribution patterns in the data set can be identified, such as ship navigation hotspots or behavior concentration areas.

[0076] WebGL Rendering Technology: WebGL (Web Graphics Library) is a JavaScript-based graphics rendering technology that allows direct use of GPU for efficient 2D and 3D graphics rendering in browsers without additional plugins. Through real-time rendering, cross-platform compatibility and shader programming, WebGL can achieve complex graphics effects in web environments, suitable for data visualization, 3D modeling and virtual reality applications that require high-performance graphics processing.

[0077] The embodiment of the present invention provides a method and system for visualizing the parallel kernel density of ship trajectories based on a GPU shader, which relates to the field of computer technology. The method for visualizing the parallel kernel density of ship trajectories based on a GPU shader provided by the embodiment of the present invention can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the method for visualizing the parallel kernel density of ship trajectories based on a GPU shader, etc., but is not limited to the above forms.

[0078] The present invention can be used in a wide variety of general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0079] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Figure 1 , the implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to the network in a wireless or wired manner to complete data transmission and exchange.

[0080] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0081] In addition, server 101 can also be a node server in a blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0082] Terminal 102 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc. Terminal 102 may also be a vehicle-mounted terminal of the various device types described above, but is not limited thereto. Terminal 102 and server 101 may be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment of the present invention.

[0083] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a method for visualizing the parallel kernel density of ship trajectories based on a GPU shader. The following is explained using the example of applying the method for visualizing the parallel kernel density of ship trajectories based on a GPU shader to a server 101. It can be understood that the method can also be applied to a terminal 102.

[0084] Reference Figure 2 , Figure 2 The flowchart of the method for visualizing the parallel kernel density of ship trajectories based on GPU shaders applied to a server according to an embodiment of the present invention is provided. The execution subject of the method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method may include the following steps:

[0085] Acquiring original AIS data and preprocessing the original AIS data to obtain target data;

[0086] The target data is processed using a spatiotemporal convolution kernel density parallel calculation method to obtain a spatiotemporal convolution kernel density processing result;

[0087] The kernel density processing result is visualized to obtain a Web visualization result of the ship behavior pattern.

[0088] In some embodiments, obtaining the original AIS data and preprocessing the original AIS data to obtain the target data includes the following steps:

[0089] Based on the raw AIS data, the position point data is sorted by time, and ships with the same unique identifier are strung together into track lines in chronological order, retaining the latitude and longitude, speed and reporting time of the position points to generate ship tracks;

[0090] Setting an error threshold, applying the Douglas Planck algorithm to the obtained ship trajectory, compressing trajectory points with little change in motion direction, obtaining a polyline set consisting of trajectory points that retain motion characteristics, and completing the compression process of the ship trajectory;

[0091] Deleting abnormal tracks from the ship track based on a preset distance threshold and an average speed of the path, thereby completing the cleaning process of the ship track;

[0092] Modeling the motion process of the trajectory using trajectory segments in the ship trajectory as units to analytically describe the motion process of the ship;

[0093] Among them, in the process of modeling the motion process of the trajectory, the calculation formula of each motion parameter is:

[0094] p(t)=p(t0)+x

[0095]

[0096] Where p(t) represents the position at time t; p(t0) represents the position at time t0; x represents the displacement relative to time t0; v init Represents the initial velocity of the model fitting; a represents the acceleration of the model fitting; v1 represents the instantaneous velocity of the end point of the line segment; v0 represents the instantaneous velocity of the starting point of the line segment; dis() represents the distance function; p1 represents the coordinates of the end point of the line segment; p0 represents the coordinates of the starting point of the line segment.

[0097] In some embodiments, the kernel density parallel calculation method using spatiotemporal convolution is used to process the target data to obtain the spatiotemporal convolution kernel density processing result, including the following steps:

[0098] According to the target data, the motion information of each trajectory point is represented by a four-dimensional vector, and the eight-bit vector composed of line segments is used as the input of each vertex shader of WebGL, and loaded into the vertex buffer to complete the vertex information loading;

[0099] According to the loaded vertex information, a directional rectangular boundary is calculated according to the line segment input each time the vertex is used as the potential range of the kernel density in the two-dimensional space when the radius parameter is r, thereby completing the generation of the geometric primitive;

[0100] Considering time information and spatial information, performing kernel density calculation based on the geometric primitives;

[0101] Based on the result of the kernel density calculation, the calculated kernel density value is stored in the color channel of each pixel, and after generating a directional rectangular primitive, each rectangle is rasterized through the rendering pipeline, and the kernel density calculation method of the spatiotemporal convolution is implemented in the fragment shader so that each pixel value of the rectangular primitive retains the calculated kernel density information, thereby generating a density map;

[0102] The final density value of the current pixel is the sum of the density contributions of all N trajectories to the current pixel, and the calculation formula is:

[0103]

[0104] Among them, C(q) represents the final density value at the location of point q.

[0105] In some embodiments, the step of calculating a directional rectangular boundary based on the loaded vertex information and the line segments inputted at each vertex as the potential range of action of the kernel density in two-dimensional space when the radius parameter is r, thereby completing the generation of geometric primitives, includes the following steps:

[0106] Calculate the direction unit vector direction and the normal unit vector n of the trajectory segment;

[0107] Given the radius parameter r, calculate the offset of the four vertices of the rectangle relative to the input line segment endpoint in the line segment direction and normal direction, and obtain the vertices (N1, N2, N3, N4) of the rectangle primitive. The calculation formula is:

[0108]

[0109] n=(-direction.v,direction.x)

[0110]

[0111] Among them, p1 represents the end point of the line segment; p0 represents the starting point of the line segment; x represents the horizontal coordinate of the normal unit vector; y represents the vertical coordinate of the normal unit vector.

[0112] In some embodiments, the taking into account time information and spatial information and performing kernel density calculation based on the geometric primitives comprises the following steps:

[0113] Considering that the distance between the target point and the line segment and the time the ship stays on the line segment affect the target point q density value, according to the given kernel density parameter r, the search is performed with the target point q as the center and r as the radius. The intersection points r1 and r2 of the boundary of the search range and the trajectory line segment ((p1, p0)) are calculated. The line segment (r1, r2) is the trajectory object that actually contributes to the q density.

[0114] Considering the influence of spatial position on the density of target point q, the Gaussian kernel function is used for calculation. The calculation formula is: Where K(x,r) represents the Gaussian kernel function, x represents the distance from the target point q to the line segment, and r represents the bandwidth of the kernel function;

[0115] Considering the influence of time on the density of the point q, the time t(x) of each position on r1 and r2 is reversed according to the motion model and the obtained spatial position information, and the trajectory segment is calculated in [t r1 ,t r2 ]The density contribution C to q in time traj1 , the calculation formula is:

[0116]

[0117] Among them, v init represents the initial velocity after model fitting; a represents the acceleration after model fitting.

[0118] In some embodiments, visualizing the kernel density processing result to obtain a web visualization result of the ship behavior pattern includes the following steps:

[0119] The real density value is obtained according to the color channel information of the kernel density map, and the density value is graded and colored. Specifically, the kernel density value is mapped using a logarithm, and the converted density value Density(q) is used with a linear gradient to project the density characteristics of different regions, completing the color texture generation.

[0120] Use lighting textures to characterize data features and differences between density values. Specifically, density values ​​are mapped to height features on a two-dimensional plane, and a normal map is generated from the density field. Based on the normal map, the Phong shading model is used to calculate the final lighting texture given the ambient light and light source position.

[0121] The frame buffer manages the calculation of all different textures, and finally the color texture and lighting texture are merged in the rendering pipeline to obtain the final result, which determines the web visualization result of the ship's behavior pattern.

[0122] In some embodiments, the calculation formula of the density feature is:

[0123] Density(q) = log2(C(q) + 1)

[0124] The calculation formula of the normal map is:

[0125] norml(i,j) = normalize((C(i-1,j) - C(i+1,j)) / 2, (C(i,j-1) - C(i,j+1)) / 2, 1.0)

[0126] The calculation formula of the light texture is:

[0127] Light(i,j) = norml(i,j) cdot DiffuseLightDirection cdot ObjectColor + Ambient cdot ObjectColor

[0128] Wherein, Density(q) represents a density value; C(q) represents the final density value of the position of q point; norml(i,j) represents the normalized normal vector at the (i,j) position; normalize() represents a vector normalization function; Light(i,j) represents the texture of the object after lighting at the (i,j) position; DiffuseLightDirection represents the diffuse light source; ObjectColor represents the original texture of the object; Ambient represents the ambient light.

[0129] The specific implementation process of the embodiment of the application will be described in detail below taking specific application scenarios as examples:

[0130] In view of the problems existing in the prior art, the embodiment of the application proposes a ship behavior pattern visualization method based on AIS data, which combines data mining and visualization technology to provide a powerful and intuitive analysis framework for maritime management. This method not only improves the analysis depth of ship behavior patterns, but also optimizes the interactivity and accuracy of data display, thereby effectively improving the maritime traffic management and safety guarantee capability in complex marine environments.

[0131] In the field of ship dynamic behavior analysis and mining, the following problems mainly exist:

[0132] 1. Most of the existing technologies and visualization systems only mine the surface of ship behavior rules, and are usually limited to displaying the updated information and basic attributes of the ship, or the feature analysis of a certain dimension (such as geographical distribution). Although the academic field has proposed a variety of complex algorithms in combination with advanced technologies, these methods are still insufficient in terms of expression ability and practical application. At present, there is no unified workflow that can comprehensively analyze the correlation between multi-dimensional attributes of ships, correctly express data features and maintain good visual effects.

[0133] 2. In practical applications, existing systems often pay less attention to ease of use, real-time performance, and scalability, and have difficulty processing large-scale data sets. They are mainly limited to processing specific small-scale data sets.

[0134] The purpose of this invention is to provide a technology that is suitable for effectively mining large-scale ship behavior and can obtain the behavioral characteristics and distribution patterns of ships. This technology has the following characteristics:

[0135] 1. Taking into account potential performance challenges, the technology integrates GPU acceleration technology into algorithms and visualization methods to cope with larger-scale data and more complex offshore environments, ensuring smooth user interaction and exploration processes.

[0136] 2. This technology not only considers spatial position but also deeply mines key motion features such as speed, effectively integrating these spatiotemporal features into the visualization system. This design not only enhances the depth of mining but also improves the intuitiveness of the system, making it more suitable for maritime traffic analysis and data mining tasks.

[0137] refer to Figure 3 In an embodiment of the present invention, the method for visualizing ship behavior patterns based on AIS data specifically includes the following steps:

[0138] Step 1: AIS data preprocessing. This stage mainly performs trajectory generation, compression, cleaning, and motion modeling on the original AIS data, laying the foundation for subsequent visualization. The specific steps are as follows:

[0139] Step 1: Track generation: Sort the position point data by time, and string the ships with the same unique identifier into track lines in chronological order, retaining the latitude and longitude, speed and reporting time of the position points, for example, any track point p0 = (lng0, lat0, v0, t0).

[0140] Step 2: Trajectory compression: Set the error threshold δ and use the Douglas Planck algorithm (DP) on the obtained trajectory data to compress the trajectory points with little change in motion direction, and obtain a broken line set composed of trajectory points that retain motion characteristics.

[0141] Step 3: Track cleaning: Based on the set distance threshold dmax and the average speed vmax of the path, abnormal tracks with drift and speed abnormalities are deleted to deal with errors caused by GPS positioning accuracy and message transmission. For any two adjacent track points p0 and p1 on the polyline, the following rules apply:

[0142]

[0143] Step 4: Motion modeling: Model the motion process of the trajectory using the trajectory segment as the unit, so as to analytically describe the motion process of the ship. Here we mainly use the uniform acceleration motion model. The calculation formula of its position p(t) at any time is as follows, where v init ,a is the motion parameter calculated based on the original data.

[0144] p(t)=p(t0)+x

[0145]

[0146] Step 2: Parallel calculation method of kernel density of spatiotemporal convolution. In this stage, a kernel density method of spatiotemporal convolution targeting ship motion characteristics is proposed, and the implementation of the algorithm in GPU is given. The algorithm involved is mainly written in shader language. The specific steps are as follows: Figure 4 shown.

[0147] Step 1: Vertex information loading: The motion information of each trajectory point is represented by a four-dimensional vector (same as step 1), and the eight-bit vector (lng0, lat0, v0, t0, lng1, lat1, v1, t1) composed of line segments is used as the input of each vertex shader in WebGL and loaded into the vertex buffer.

[0148] Step 2: Geometric primitive generation: Calculate a directional rectangular boundary based on the line segment input each time the vertex is used as the potential range of the kernel density in two-dimensional space when the radius parameter is r. The calculation process of this step is still performed in the fixed-point shader. Specifically, first calculate the direction unit vector direction of the trajectory segment and the normal unit vector n. The offset of the four vertices of the rectangle relative to the input line segment endpoint in the line segment direction and normal direction is calculated based on the given radius parameter r, and finally the vertices of the rectangular primitive (N1, N2, N3, N4) are obtained. The specific calculation formula is as follows:

[0149]

[0150] n=(-direction.y,direction.x)

[0151]

[0152] Step 3: Kernel density calculation: We propose a kernel density calculation method that takes into account time and space information, which can reflect the motion characteristics of the ship in the density map. Specifically, for any point q in the rectangular element (N1, N2, N4, N3) generated by the trajectory segment ((p1, p0), the calculation method of the density contribution of the trajectory segment ((p1, p0)) to it is as follows: Figure 5 shown.

[0153] (1) According to the given kernel density parameter r, a search is performed with q as the center and r as the radius. The intersection points r1 and r2 of the boundary of the search range and the trajectory line segment ((p1, p0)) are calculated. The line segment (r1, r2) is the trajectory object that actually contributes to the q density. The main starting point of our method is that the distance between the target point and the line segment and the time the ship stays on the line segment affect the q density value of the target point.

[0154] (2) Considering the influence of spatial position on the density of the point q, the kernel function is used for calculation. The Gaussian kernel function is mainly used in the method, and its formula is as follows:

[0155]

[0156] (3) Considering the influence of time on the density of the point q, through the motion model mentioned in step 1, the time t(x) at each position on r1 and r2 can be reversed based on the obtained spatial position information, so that the trajectory segment (traj1) can be calculated at [t r1 ,t r2 ]The density contribution C to q in time traj1 , the relevant calculation formula is as follows:

[0157]

[0158] Step 4: Generation of density map: The calculated kernel density value is stored in the color channel (RGBA) of each pixel. After generating the directional rectangular primitive, the rendering pipeline will rasterize each rectangle, and this process is also parallel. The kernel density calculation method of spatiotemporal convolution is implemented in the fragment shader, so that each pixel value of the rectangular primitive can retain the calculated kernel density information and ensure the efficiency of the calculation process. In this stage, the final density value of the current pixel is the sum of the density contributions of all N trajectories to the current pixel. The calculation formula is as follows:

[0159]

[0160] Step 3: Kernel density visualization method for spatiotemporal convolution. In this stage, a visualization method for the calculated kernel density map is proposed. The process involved is also performed on the GPU. The specific steps are as follows: Figure 6 shown.

[0161] Step 1: Color Texture Generation: We obtain the actual density values ​​based on the color channel information of the kernel density map and assign color to these values. We use a logarithmic mapping to support a wider data range. The converted density values, Density(q), are applied using a linear gradient to reflect the density characteristics of different regions.

[0162] Density(q)=log2(C(q)+1)

[0163] Step 2: Lighting texture generation: Use the lighting texture to further characterize the data features and the differences between density values. First, map the density values ​​to height features on a two-dimensional plane, and generate a normal field from the density field. The normal map is calculated as follows:

[0164] norml(i,j)=normalize((C(i-1,j)-C(i+1,j)) / 2,(C(i,j-1)-C(i,j+1)) / 2,1.0) Based on the normal map, the Phong shading model is used to calculate the final lighting texture given the ambient light and light source position. The experiment mainly considers diffuse light (Diffuse) and ambient light (Ambient), including the incident angle DiffuseLightDirection of the parallel light source and the material color (ObjectColor). The specific calculation formula is as follows:

[0165] Light(i,j)=normal(i,j)·DiffuseLightDirection·ObjectColor+Ambient·ObjectColor

[0166] Step 3: Final visualization: All the calculations of different textures are managed through the frame buffer, and finally the color texture and the lighting texture are merged in the rendering pipeline to get the final result. The test results on the real ship trajectory dataset are as follows: Figure 7 shown.

[0167] In summary, the present invention implements a ship behavior pattern analysis technology, which models ship behavior through a probability distribution model and uses visualization technology to enhance the performance of the results, thereby improving the efficiency of maritime supervision.

[0168] The present invention has the following characteristics:

[0169] 1. Spatiotemporal Convolution Density Calculation Method: This method improves upon traditional kernel density statistics by considering the spatiotemporal aspects of ship behavior. It not only considers the spatial distribution of ships but also factors in the impact of the temporal persistence of moving objects on the region. This allows the results to reflect in detail the dynamic characteristics of ships within the region (e.g., slow or high speed). This approach enables more refined and accurate analysis of ship behavior at sea.

[0170] 2. Parallel Computing of the Algorithm: We propose a WebGL-based parallel computing method that significantly improves the performance of algorithm calculations and visualization of results, making it particularly suitable for interactive visualization scenarios. Through parallel processing, this technology can effectively support more complex analytical tasks, enabling real-time data processing and display, significantly improving system responsiveness and user experience.

[0171] Compared with the prior art, the present invention has the following advantages:

[0172] 1. Identifying a vessel's dynamic characteristics: Compared to traditional point-based kernel density methods, this technology utilizes a line-based kernel density approach as its analysis basis, effectively preserving the continuity of a vessel's motion. Furthermore, this technology incorporates temporal convolution of the kernel density, factoring not only spatial distance but also the vessel's dwell time within a specific area into the kernel density calculation. This allows for more accurate identification and differentiation of various dynamic behaviors, such as differentiating between low- and high-speed zones.

[0173] 2. Rich information expression: This paper proposes a visualization method for spatiotemporal convolution kernel density, which utilizes the graded coloring and lighting effects in graphics technology to significantly enhance the expression of data differences and improve the efficiency and accuracy of visual analysis.

[0174] 3. Higher Computing Performance: By implementing the spatiotemporal convolution kernel density method in WebGL, this technology leverages GPU-accelerated computing and rendering, significantly improving performance. This enables real-time, interactive data exploration and analysis, allowing users to more flexibly adjust perspectives, filter data, and explore details compared to traditional offline analysis methods.

[0175] 4. Support for Web integration: This technology, implemented based on WebGL, fully utilizes the convenience of the Web and is easy to integrate into network applications. At the same time, it overcomes the shortcomings of traditional technologies in computing efficiency and provides users with a seamless and efficient maritime navigation behavior analysis platform.

[0176] Another aspect of the present invention provides a visualization system for ship trajectory parallel kernel density based on a GPU shader, including:

[0177] The first module is used to obtain raw AIS data and pre-process the raw AIS data to obtain target data;

[0178] The second module is used to process the target data using a parallel calculation method of kernel density of spatiotemporal convolution to obtain a kernel density processing result of spatiotemporal convolution;

[0179] The third module is used to visualize the kernel density processing results to obtain a Web visualization result of the ship behavior pattern.

[0180] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0181] An embodiment of the present invention further provides an electronic device comprising a memory and a processor. The memory stores a computer program, and the processor, when executing the computer program, implements the aforementioned method for visualizing the parallel kernel density of ship trajectories using a GPU shader. The electronic device can be any intelligent terminal, including a tablet computer and an in-vehicle computer.

[0182] It can be understood that the contents of the above method embodiments are applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0183] See also Figure 8 , Figure 8 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:

[0184] The processor 801 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention.

[0185] The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 802 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 802 and is called by the processor 801 to execute the method for visualizing the parallel kernel density of ship trajectories based on GPU shaders according to the embodiment of the present invention.

[0186] Input / output interface 803, used to implement information input and output;

[0187] Communication interface 804, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0188] Bus 805 , which transmits information between various components of the device (e.g., processor 801 , memory 802 , input / output interface 803 , and communication interface 804 );

[0189] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .

[0190] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the computer program implements the above-mentioned method for visualizing the parallel kernel density of ship trajectories based on a GPU shader.

[0191] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0192] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0193] It should be noted that in various specific embodiments of the present invention, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present invention needs to obtain the user's sensitive personal information, it will obtain the user's separate permission or consent through a pop-up window or jump to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present invention will be obtained.

[0194] The embodiments described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.

[0195] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present invention, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0196] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0197] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0198] The terms "first," "second," "third," "fourth," and the like (if any) in the description of the present invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in orders other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products, or apparatus.

[0199] It should be understood that in the present invention, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0200] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0201] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0202] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0203] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0204] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A method for visualizing ship trajectory parallel kernel density based on GPU shader, characterized in that: The following steps are involved: Acquiring original AIS data and preprocessing the original AIS data to obtain target data; The target data is processed using a spatiotemporal convolution kernel density parallel calculation method to obtain a spatiotemporal convolution kernel density processing result; Visualizing the kernel density processing results to obtain a web visualization result of the ship behavior pattern; The kernel density parallel calculation method using spatiotemporal convolution is used to process the target data to obtain the kernel density processing result of spatiotemporal convolution, including the following steps: According to the target data, the motion information of each trajectory point is represented by a four-dimensional vector, and the eight-bit vector composed of line segments is used as the input of each vertex shader of WebGL, and loaded into the vertex buffer to complete the vertex information loading; According to the loaded vertex information, a directional rectangular boundary is calculated according to the line segment input each time the vertex is used as the kernel density with a radius parameter of The potential scope of action in two-dimensional space is used to complete the generation of geometric primitives; Considering time information and spatial information, performing kernel density calculation based on the geometric primitives; Based on the result of the kernel density calculation, the calculated kernel density value is stored in the color channel of each pixel, and after generating a directional rectangular primitive, each rectangle is rasterized through the rendering pipeline, and the kernel density calculation method of the spatiotemporal convolution is implemented in the fragment shader so that each pixel value of the rectangular primitive retains the calculated kernel density information, thereby generating a density map; Among them, the final density value of the current pixel is all N The sum of the density contributions of the trajectories to the current pixel is calculated as follows: , in, represent q The final density value at the point location; The process of visualizing the kernel density processing result to obtain a Web visualization result of the ship behavior pattern includes the following steps: The real density value is obtained according to the color channel information of the kernel density map, and the density value is graded and colored. Specifically, the kernel density value is mapped using a logarithm, and the converted density value Density(q) is used with a linear gradient to project the density characteristics of different regions, completing the color texture generation. Use lighting textures to characterize data features and differences between density values. Specifically, density values ​​are mapped to height features on a two-dimensional plane, and a normal map is generated from the density field. Based on the normal map, the Phong shading model is used to calculate the final lighting texture given the ambient light and light source position. The frame buffer manages the calculation of all different textures, and finally the color texture and lighting texture are merged in the rendering pipeline to obtain the final result, which determines the web visualization result of the ship's behavior pattern.

2. The method for visualizing the parallel kernel density of ship trajectories based on GPU shaders according to claim 1, characterized in that: The obtaining of original AIS data and preprocessing of the original AIS data to obtain target data comprises the following steps: Based on the raw AIS data, the position point data is sorted by time, and ships with the same unique identifier are strung together into track lines in chronological order, retaining the latitude and longitude, speed and reporting time of the position points to generate ship tracks; Setting an error threshold, applying the Douglas Planck algorithm to the obtained ship trajectory, compressing trajectory points with little change in motion direction, obtaining a polyline set consisting of trajectory points that retain motion characteristics, and completing the compression process of the ship trajectory; Deleting abnormal tracks from the ship track based on a preset distance threshold and an average speed of the path, thereby completing the cleaning process of the ship track; Modeling the motion process of the trajectory using trajectory segments in the ship trajectory as units to analytically describe the motion process of the ship; Among them, in the process of modeling the motion process of the trajectory, the calculation formula of each motion parameter is: in, represent Position at the moment; represent Position at the moment; Relative displacement of moments; represents the initial velocity of the model fitting; represents the acceleration of the model fitting; represents the instantaneous velocity of the end point of the line segment; Represents the instantaneous velocity at the beginning of the line segment; represents the distance function; Represents the coordinates of the end point of the line segment; Represents the coordinates of the starting point of the line segment.

3. The method for visualizing the parallel kernel density of ship trajectories based on GPU shaders according to claim 1, characterized in that: According to the loaded vertex information, a directional rectangular boundary is calculated according to the line segment input each time the vertex is used as the kernel density with a radius parameter of The potential scope of action in two-dimensional space is used to complete the generation of geometric primitives, including the following steps: Calculate the direction unit vector of the trajectory segment , and the normal unit vector ; Given radius parameter Calculate the offset of the four vertices of the rectangle relative to the input line segment endpoint in the line segment direction and normal direction to obtain the vertices of the rectangle primitive ( , , , ), the calculation formula is: in, Represents the end point of the line segment; Represents the starting point of the line segment; Represents the horizontal coordinate of the normal unit vector; Represents the vertical coordinate of the normal unit vector.

4. The method for visualizing the parallel kernel density of ship trajectories based on GPU shaders according to claim 1, characterized in that: The method of considering time information and space information and performing kernel density calculation according to the geometric primitives includes the following steps: Considering the distance between the target point and the line segment and the time the ship stays on the line segment, the target point q Density value, according to the given kernel density parameter r , with the target point q is the center of the circle, r Search for the radius and calculate the boundary of the search range and the trajectory segment ( ) r 1, r 2. Line segment ( r 1, r 2) For actual q trajectory object for density contribution; Consider the spatial position of the target point q The density effect is calculated using the Gaussian kernel function, and the calculation formula is: , in, represents the Gaussian kernel function, x Representing the target point q The distance to the line segment, r Represents the bandwidth of the kernel function; Consider the time to this point q The density of r 1, r 2 Moments at each position t ( x ), calculate the trajectory segment in [ , Within time q Density contribution , the calculation formula is: in, represents the initial velocity after model fitting; Represents the acceleration after model fitting.

5. The method for visualizing the parallel kernel density of ship trajectories based on GPU shaders according to claim 1, characterized in that: The calculation formula of the density feature is: The calculation formula of the normal map is: The calculation formula of the lighting texture is: in, represents the density value; represent q The final density value at the point location; represent Normalized normal vector at position; represents the vector normalization function; Represents the object after being illuminated Positional texture; Represents diffuse light source; The original texture representing the object; Represents ambient light.

6. A system for implementing the method for visualizing the parallel kernel density of ship trajectories based on GPU shaders according to any one of claims 1 to 5, characterized in that: include: The first module is used to obtain raw AIS data and pre-process the raw AIS data to obtain target data; The second module is used to process the target data using a parallel calculation method of kernel density of spatiotemporal convolution to obtain a kernel density processing result of spatiotemporal convolution; The third module is used to visualize the kernel density processing results to obtain a Web visualization result of the ship behavior pattern.

7. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Industrial manufacturing process and production operation and maintenance optimization method and system based on digital twinning

    CN118884908A

  • Inversion-based workflow for consistent interpretation of nuclear density images in horizontal wells

    US20160252648A1