A method, device, electronic device and storage medium for generating a heat map of ship trajectories

By converting AIS data into multiple AIS point data and performing progressive pixel weighted averaging operation, multi-level thermal maps are generated, which solves the high computing cost and inefficiency problems of large-scale AIS data sets, and achieves fast and flexible thermal map generation.

CN120045617BActive Publication Date: 2025-07-29GUANGZHOU MARINE GEOLOGICAL SURVEY SANYA SOUTH CHINA SEA INST OF GEOLOGY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510535600.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-29
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

The prior art has high computational cost and long generation time when processing large-scale AIS data sets, which cannot meet the real-time processing needs, and lacks flexibility and efficient time aggregation capabilities.

Method used

By converting AIS data into multiple AIS point data, an initial thermal map of preset unit time is generated, and a progressive pixel weighted average method is performed, and a pixel weighted average method is performed in combination with the time range to generate a multi-level thermal map.

Benefits of technology

Significantly reduce computing costs, improve real-time processing capabilities, enhance data processing flexibility, support large-scale data set processing, and generate high-quality heat maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045617B_ABST
    Figure CN120045617B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, electronic device and storage medium for generating a ship trajectory heat map. The method includes: obtaining AIS data of a target ship and converting the AIS data into a plurality of AIS point data; projecting the AIS point data within a preset unit time onto a preset two-dimensional pixel plane for color radiation to generate an initial heat map corresponding to each segment of the preset unit time; performing a progressive pixel weighted average method operation on the initial heat maps of each segment of the preset unit time to obtain a multi-level heat map for each time interval; obtaining a time range to be searched, and performing a pixel weighted average method operation on the target-level heat map corresponding to the time interval corresponding to the time span of the time range to obtain a target heat map corresponding to the time range. The present invention can efficiently and accurately generate a ship trajectory heat map and can be widely applied to the field of data processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly to a method, device, electronic device and storage medium for generating a ship trajectory heat map. Background Art

[0002] As the core data source for ship dynamic monitoring, the spatio-temporal trajectory heat visualization analysis of Automatic Identification System (AIS) data of ships has important value in the fields of maritime traffic management, waterway planning, ecological protection, etc. Traditional heat map generation methods generally include the following steps: First, perform spatial and temporal discretization processing on AIS data, and map the longitude and latitude of ships to fixed grids or rasters; Then, based on the number or density of ships in each grid, use methods such as weighted average or distance-based Gaussian kernel to calculate the heat value of the area and generate a heat map. In this way, the activity density distribution of ships within a certain time period can be effectively displayed, helping to analyze waterway congestion, potential collision risk areas, and special ship activity trends, etc.

[0003] Although the existing technology performs well in the application of small-scale data sets or short time spans, there are significant drawbacks in processing large-scale AIS data sets. First, the existing technology usually faces the problem of high computational cost. Especially when the number of ships is large or the time span is long, traditional methods need to process the data of each ship at each time point, which leads to a sharp increase in the amount of calculation, a long result generation time, and cannot meet the requirements of real-time processing. Summary of the Invention

[0004] The present invention aims to solve the problems of related technical limitations to at least a certain extent. For this purpose, the present invention provides a method, device, electronic device and storage medium for generating a ship trajectory heat map, which can efficiently and accurately generate a ship trajectory heat map.

[0005] On the one hand, an embodiment of the present invention provides a method for generating a ship trajectory heat map, including the following steps:

[0006] Obtain the AIS data of the target ship and convert the AIS data into multiple AIS point data;

[0007] Project the AIS point data within a preset unit time onto a preset two-dimensional pixel plane for color radiation to generate an initial heat map corresponding to each preset unit time;

[0008] Perform progressive pixel weighted average method operations on the initial heat maps of each preset unit time to obtain multi-level heat maps for each time interval;

[0009] The time range to be searched is obtained, and based on the time span of the time range, the target level heat map of the corresponding time interval is calculated by pixel weighted averaging method to obtain the target heat map corresponding to the time range.

[0010] Optionally, the method further comprises the following steps:

[0011] AIS point data is cleaned based on the preset threshold range.

[0012] Optionally, the AIS point data includes the latitude and longitude, speed, and timestamp of the target vessel's corresponding position point; and performing data cleaning on the AIS point data based on a preset threshold range includes at least one of the following steps:

[0013] Based on the longitude and latitude of the AIS point data, spatial position cleaning is performed within a preset location boundary range to remove AIS point data whose longitude and latitude are not within the location boundary range; the location boundary range includes the valid longitude and latitude range and the ocean boundary range;

[0014] Based on the speed of the AIS point data, speed cleaning is performed using a preset speed threshold, and AIS point data with speeds exceeding the speed threshold are removed.

[0015] Optionally, the AIS point data includes the latitude and longitude and a timestamp of the target ship's corresponding position point; a two-dimensional pixel surface is constructed based on a preset number of pixel points divided based on the global latitude and longitude range; and the AIS point data within a preset unit time is projected onto the preset two-dimensional pixel surface for color radiation to generate an initial heat map corresponding to each preset unit time segment, comprising the following steps:

[0016] Based on the latitude, longitude and timestamp, the AIS point data within the preset unit time is projected onto the pixel points in the two-dimensional pixel plane;

[0017] With the pixel point corresponding to the longitude and latitude as the center of the circle, the color of the pixels within the preset radius is radiated based on the preset color range; the color radiation gradually changes from dark to light in the preset color range from the center of the circle to the outside;

[0018] Traverse each pixel point on the two-dimensional pixel surface, perform pixel weighted averaging on the results of all color radiation of a single pixel point, and obtain the initial heat map corresponding to the preset unit time.

[0019] Optionally, performing a progressive pixel weighted average operation on the initial heat map of each preset unit time segment to obtain a multi-level heat map for each time interval includes the following steps:

[0020] At the end of the day, the initial heat map of each preset unit time within the day is calculated by pixel weighted average method to obtain the heat map of the corresponding day;

[0021] At the end of the whole month, perform pixel weighted average method operation on the daily heat maps of each day within the month to obtain the monthly heat map corresponding to the month;

[0022] Among them, the multi-level heat map includes the initial heat map corresponding to each preset unit time period, the daily heat map corresponding to each day, and the monthly heat map corresponding to each month.

[0023] Optionally, the multi-level heat map includes the initial heat map corresponding to each preset unit time period, the daily heat map corresponding to each day, and the monthly heat map corresponding to each month; performing pixel weighted average method operation on the target-level heat map of its corresponding time interval based on the time span of the time range includes the following steps:

[0024] When the time span is less than one day, perform pixel weighted average method operation on the initial heat maps of each preset unit time period in the corresponding time interval of the time range;

[0025] When the time span is greater than or equal to one day and less than one month, perform pixel weighted average method operation on the daily heat maps of each day in the corresponding time interval of the time range;

[0026] When the time span is greater than or equal to one month, perform pixel weighted average method operation on the monthly heat maps of each month in the corresponding time interval of the time range.

[0027] Optionally, the multi-level heat map includes the initial heat map corresponding to each preset unit time period, the daily heat map corresponding to each day, and the monthly heat map corresponding to each month; the method further includes the following steps:

[0028] Perform normalization processing on the preselected ship trajectory heat map to obtain the normalized heat value of each position of the ship trajectory heat map;

[0029] Based on the normalized heat value, map the corresponding position of the target heat map to RGB colors through a preset mapping table to generate a pseudo-color image corresponding to the ship trajectory heat map;

[0030] Among them, the ship trajectory heat map includes the initial heat map, the daily heat map, the monthly heat map, and the target heat map; the preset mapping table includes the mapping relationship between each numerical interval of the normalized heat value and the chromaticity of its corresponding RGB color.

[0031] On the other hand, the embodiment of the present invention provides a device for generating a ship trajectory heat map, including:

[0032] The first module is used to obtain the AIS data of the target ship and convert the AIS data into multiple AIS point data;

[0033] A second module, configured to project AIS point data within a preset unit time onto a preset two-dimensional pixel plane for color radiation, so as to generate an initial heat map corresponding to each period of the preset unit time;

[0034] A third module, configured to perform progressive pixel weighted average method operations on the initial heat maps of each period of the preset unit time to obtain multi-level heat maps for each time interval;

[0035] A fourth module, configured to obtain a time range to be searched, and perform pixel weighted average method operations on the target-level heat map of the corresponding time interval based on the time span of the time range, so as to obtain a target heat map corresponding to the time range.

[0036] Optionally, the apparatus further includes:

[0037] A fifth module, configured to perform data cleaning on the AIS point data based on a preset threshold range.

[0038] Optionally, the multi-level heat maps include the initial heat map corresponding to each period of the preset unit time, the whole-day heat map corresponding to each day, and the whole-month heat map corresponding to each month; the apparatus further includes:

[0039] A sixth module, configured to perform normalization processing on a preselected ship trajectory heat map to obtain a normalized heat value at each position of the ship trajectory heat map;

[0040] A seventh module, configured to map the corresponding position of the target heat map to an RGB color through a preset mapping table based on the normalized heat value, so as to generate a pseudo-color image corresponding to the ship trajectory heat map;

[0041] Wherein, the ship trajectory heat map includes the initial heat map, the whole-day heat map, the whole-month heat map, and the target heat map; the preset mapping table includes the mapping relationship between each numerical interval of the normalized heat value and the chromaticity of the corresponding RGB color.

[0042] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store a program; the processor executes the program to implement the above-mentioned ship trajectory heat map generation method.

[0043] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored, and the program executable by the processor is used to implement the above-mentioned ship trajectory heat map generation method when executed by the processor.

[0044] In an embodiment of the present invention, AIS data of a target ship is obtained, and the AIS data is converted into multiple AIS point data; the AIS point data within a preset unit time is projected onto a preset two-dimensional pixel plane for color radiation to generate an initial heat map corresponding to each period of the preset unit time; a progressive pixel weighted average method operation is performed on the initial heat maps of each period of the preset unit time to obtain a multi-level heat map for each time interval; a time range to be searched is obtained, and a pixel weighted average method operation is performed on the target-level heat map of the corresponding time interval based on the time span of the time range to obtain a target heat map corresponding to the time range. In the embodiment of the present invention, the calculation cost is reduced through the progressive pixel weighted average method operation, and further, the operation is combined with the target-level heat map corresponding to the time range to enhance the flexibility of data processing. The embodiment of the present invention can support large-scale data set processing, effectively solve the shortcomings of traditional AIS data processing methods, and has significant beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the technical solutions of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation to the technical solutions of the present invention.

[0046] Figure 1 is a schematic diagram of an implementation environment for generating a ship trajectory heat map provided by an embodiment of the present invention;

[0047] Figure 2 is a schematic flowchart of a method for generating a ship trajectory heat map provided by an embodiment of the present invention;

[0048] Figure 3 is a schematic diagram of an extended process of a method for generating a ship trajectory heat map provided by an embodiment of the present invention;

[0049] Figure 4 is a schematic diagram of an expanded process of step S200 provided by an embodiment of the present invention;

[0050] Figure 5 is a schematic diagram of an expanded process of step S300 provided by an embodiment of the present invention;

[0051] Figure 6 is a schematic diagram of an expanded process of performing a pixel weighted average method operation on a target-level heat map provided by an embodiment of the present invention;

[0052] Figure 7 is a schematic diagram of another extended process of a method for generating a ship trajectory heat map provided by an embodiment of the present invention;

[0053] Figure 8 is a schematic diagram of the overall process of a specific application of a method for generating a ship trajectory heat map provided by an embodiment of the present invention;

[0054] Figure 9 This is a schematic structural diagram of a device for generating a heat map of ship trajectories provided by an embodiment of the present invention;

[0055] Figure 10 This is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0056] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0057] It should be noted that although functional module division is performed in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the system or the order in the flowchart. Terms such as "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence.

[0058] Referring to "embodiment" herein means that the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present invention. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0059] It can be understood that the method for generating a heat map of ship trajectories provided by the embodiment of the present invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto.

[0060] As Figure 1 shown, this is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Referring to Figure 1, the implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be network-connected wirelessly or wiredly to complete data transmission and exchange.

[0061] The server 101 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or 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), and big data and artificial intelligence platforms.

[0062] In addition, the server 101 can also be a node server in a blockchain network. Among them, the blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms.

[0063] The terminal 102 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 can be directly or indirectly connected through wired or wireless communication methods, and the embodiments of the present invention do not limit this here.

[0064] Exemplarily based on Figure 1 the shown implementation environment, the embodiments of the present invention provide a method for generating a ship trajectory heat map. Taking the application of this method for generating a ship trajectory heat map in the server 101 as an example for description, it can be understood that this method for generating a ship trajectory heat map can also be applied to the terminal 102.

[0065] Refer to Figure 2 , Figure 2 is a flowchart of the method for generating a ship trajectory heat map applied to a server provided by the embodiments of the present invention. The execution subject of this method for generating a ship trajectory heat map can be any of the aforementioned computer devices (including a server or a terminal). Refer to Figure 2 , the method includes the following steps:

[0066] S100. Obtain the AIS data of the target ship and convert the AIS data into multiple AIS point data;

[0067] For example, in some specific implementations, target vessel AIS data is obtained. This data can be historical data or dynamic data accessed through an interface. Information such as the vessel's name, MMSI, latitude and longitude, and timestamp can be read from the target vessel's AIS data. In some specific application scenarios, the latitude and longitude information in the vessel's AIS data can be converted into AIS point data in the WGS84 coordinate system.

[0068] In some embodiments, the method may further include the following steps: performing data cleaning on the AIS point data based on a preset threshold range.

[0069] For example, in order to filter out abnormal data and avoid affecting the accuracy of heat map generation, the AIS point data may be cleaned before subsequent data processing steps.

[0070] It should be noted that the AIS point data includes the latitude and longitude, speed and timestamp of the target ship's corresponding position point; in some embodiments, such as Figure 3 As shown, performing data cleaning on AIS point data based on a preset threshold range may include at least one of the following steps:

[0071] T100, based on the longitude and latitude of the AIS point data, performs spatial position cleaning through the preset location boundary range, and removes the AIS point data whose longitude and latitude are not within the location boundary range;

[0072] The location boundary range includes the valid latitude and longitude range and the ocean boundary range;

[0073] For example, in some specific implementations, spatial location cleaning can be performed. Specifically, this can be achieved as follows: First, a first location cleaning is performed on the longitude and latitude, with the longitude valid range being [-180, 180] and the latitude valid range being [-90, 90]. Data outside of the valid longitude and latitude ranges is removed. Then, a second location cleaning is performed on the longitude and latitude, using global coastline data as the ocean boundary to obtain the global ocean distribution range. By overlaying the AIS data and the global ocean distribution range in the same coordinate system, AIS data with longitude and latitude outside the ocean boundary is removed.

[0074] T200: Based on the speed of AIS point data, speed cleaning is performed using a preset speed threshold, and AIS point data with speeds exceeding the speed threshold are removed.

[0075] For example, in some specific implementations, speed scrubbing can be performed. This can be achieved by setting a speed threshold and removing data with speeds outside the threshold range. Typically, a ship's maximum speed does not exceed 35 knots, so a threshold of 35 knots is generally set (the specific speed threshold can be adjusted based on application requirements and is provided here for illustrative purposes only). Speed is calculated by dividing the distance (in nautical miles) between the ship's current and previous locations by the time difference (in hours) between the ship's movements.

[0076] S200, projecting the AIS point data within a preset unit time onto a preset two-dimensional pixel surface for color radiation, and generating an initial heat map corresponding to each preset unit time segment;

[0077] It should be noted that the AIS point data includes the latitude and longitude and timestamp of the target ship's corresponding position point; the two-dimensional pixel surface is constructed based on a preset number of pixel points divided based on the global latitude and longitude range; in some embodiments, such as Figure 4 As shown, step S200 may include the following steps: S201, based on the longitude and latitude and timestamp, projecting the AIS point data within a preset unit time to the pixel points in the two-dimensional pixel surface; S202, with the pixel point corresponding to the longitude and latitude as the center of the circle, performing color radiation on the pixel points within a preset radius based on the preset color range; the color radiation gradually changes from dark to light in the preset color range from the center of the circle to the outside; S203, traversing each pixel point in the two-dimensional pixel surface, performing pixel weighted averaging on the results of all color radiations of a single pixel point, and obtaining an initial heat map corresponding to the preset unit time.

[0078] For example, in some specific implementations, the global area (i.e., longitude [-180, 180], latitude [-90, 90]) can be divided into 2880 x 1440 pixels. Preferably, the unit time can be adjusted to a factor of a 24-hour day (specifically, in practical applications, the unit time can be adaptively adjusted based on specific accuracy requirements, such as to a higher-precision half-hour, 15-minute, or 10-minute, or to a lower-precision half-hour, two-hour, or three-hour). At the end of the hour, the cleaned AIS point data for that unit time is projected onto the global area. Each AIS point is assigned a circle with a radius of 10 pixels, centered at the longitude and latitude. A uniform gradient color is applied to each point, with the color at the center of the circle set to RGB (0.03, 0, 0) and the color at the edge of the circle uniformly gradiented to (0, 0, 0). The divided 2880*1440 pixels, the AIS point radius pixels, and the circle center position color RGB (0.03, 0, 0) can all be adjusted according to actual conditions. The values used this time are numerical examples obtained after multiple experiments to illustrate good visualization effects and are not to be construed as limiting the embodiments of the present invention.

[0079] Set the weight of each AIS point to 1, and use the pixel weighted average method to calculate the final color value of each pixel:

[0080]

[0081] In the formula, is the contribution color value of the th AIS point to the pixel (determined based on the result of color radiation. For the edge position of the circle formed by the AIS point and the pixel points not radiated by it, the contribution color value is (0, 0, 0)), is the weight of the th AIS point (taking the value 1), is the total number of AIS points in the pixel .

[0082] Traverse and calculate one by one to obtain 2880 * 1440 pixel values of the world, which is the heat map within a unit time, and save it in the tif format.

[0083] S300. Perform progressive pixel weighted average method operations on the initial heat maps of each preset unit time period to obtain multi-level heat maps for each time interval;

[0084] It should be noted that in some embodiments, as Figure 5 shown, step S300 may include the following steps: S301. At the end of the whole day, perform pixel weighted average method operations on the initial heat maps of each preset unit time period within the day to obtain the whole-day heat map for the corresponding date; S302. At the end of the whole month, perform pixel weighted average method operations on the whole-day heat maps of each day within the month to obtain the whole-month heat map for the corresponding month; where the multi-level heat maps include the initial heat maps corresponding to each preset unit time period, the whole-day heat maps corresponding to each day, and the whole-month heat maps corresponding to each month.

[0085] Exemplarily, in some specific embodiments, taking the preset unit time as 1 hour as an example, at the end of the whole day, perform pixel weighted average method operations on the hourly heat map pixels within the day, and perform operations on 24 (1 per hour) tif-format heat maps of the day to obtain the whole-day heat map; at the end of the whole month, perform pixel weighted average method operations on the whole-day heat map pixels within the month, and perform operations on 28 / 29 / 30 / 31 (1 per day) tif-format heat maps of the month to obtain the whole-month heat map. The naming format of the hourly heat map is "hour-XXXX year XX month XX day XX hour", the naming format of the whole-day heat map is "day-XXXX year XX month XX day", and the naming format of the whole-month heat map is "month-XXXX year XX month" to form a heat map data set.

[0086] S400. Obtain the time range to be searched, and perform pixel weighted average method operation on the target hierarchical heat map of its corresponding time interval based on the time span of the time range to obtain the target heat map corresponding to the time range.

[0087] It should be noted that the multi-level heat map includes the initial heat map corresponding to each preset unit time period, the whole-day heat map corresponding to each day, and the whole-month heat map corresponding to each month; in some embodiments, such as Figure 6 As shown, performing pixel weighted average method operation on the target hierarchical heat map of its corresponding time interval based on the time span of the time range may include the following steps: S401. When the time span is less than one day, perform pixel weighted average method operation on the initial heat map of each preset unit time period in the time interval corresponding to the time range; S402. When the time span is greater than or equal to one day and less than one month, perform pixel weighted average method operation on the whole-day heat map of each day in the time interval corresponding to the time range; S403. When the time span is greater than or equal to one month, perform pixel weighted average method operation on the whole-month heat map of each month in the time interval corresponding to the time range.

[0088] Exemplarily, in some specific embodiments, when calculating the heat map with specific requirements, select the time range according to the requirements. Furthermore, the optimal unit time can be selected according to the time range. If the time range is short (<24 hours), the optimal unit is hour; if the time range is long but does not exceed one month (≥1 day and <1 month), the optimal unit is day; if the time range is long (≥1 month), the optimal unit is month. For example, when calculating the heat map from 00:00 on May 1, 2024 to 12:00 on May 1, 2024, the optimal unit is hour; when calculating the heat map from May 1, 2024 to May 20, 2024, the optimal unit is day; when calculating the heat map from May 1, 2024 to December 31, 2024, the optimal unit is month. Extract the heat map data corresponding to the time range in the heat map dataset according to the optimal unit, and then perform pixel weighted average method operation on the extracted heat map data.

[0089] Among them, in some embodiments, the multi-level heat map includes the initial heat map corresponding to each preset unit time period, the whole-day heat map corresponding to each day, and the whole-month heat map corresponding to each month; such as Figure 7As shown, the method may further include the following steps: S500. Normalize the preselected ship trajectory heat map to obtain the normalized heat value at each position of the ship trajectory heat map; S600. Based on the normalized heat value, map the corresponding position of the target heat map to an RGB color through a preset mapping table to generate a pseudo-color image corresponding to the ship trajectory heat map; wherein, the ship trajectory heat map includes an initial heat map, a daily heat map, a monthly heat map, and a target heat map; the preset mapping table includes the mapping relationship between each numerical interval of the normalized heat value and the chromaticity of the corresponding RGB color.

[0090] Exemplarily, in some specific embodiments, the preselected trajectory heat map may be normalized to obtain the heat map within the required time range. Furthermore, the normalized heat value ∈[0,1] is mapped to the RGB color color mapping scheme (preset mapping table) as shown in Table 1 below:

[0091] Table 1

[0092]

[0093] The "blue → yellow → red" gradient color scheme can effectively highlight the hot spots of ship activities while maintaining the uniformity of visual perception, ensuring that users can intuitively interpret the heat map data. In addition, the preset mapping table can also be implemented through a color mapping function, specifically for converting the normalized heat value into an RGB color:

[0094]

[0095] The Colormap is a color lookup table that contains 256 levels of colors. The color index (integer value 0 - 255) is used to look up and obtain the RGB color.

[0096] Finally, a pseudo-color image is generated and visualized.

[0097] It should be noted that the embodiments of the present invention have at least the following beneficial effects:

[0098] 1. Reduce computational cost: Traditional heat map generation methods need to process the data of each ship at each time point, and the computational amount increases exponentially with the increase in the number of ships and the time span, resulting in high computational costs. In the present invention, by converting AIS data into multiple AIS point data and generating an initial heat map within a preset unit time, the amount of data for a single calculation is reduced. The progressive pixel weighted average method further reduces the computational complexity, avoids repeated calculations, and significantly reduces the computational cost.

[0099] 2. Improve real-time processing capabilities: Due to the large amount of computation, traditional methods take a long time to generate results when processing large-scale AIS data, unable to meet the requirements of real-time processing. However, the present invention can quickly generate the target heat map by generating the initial heat map and multi-level heat maps in stages and performing pixel weighted average method operations within the time range to be searched. This staged processing method improves the real-time processing capabilities of the system and can respond more quickly to the needs of maritime traffic management and waterway planning.

[0100] S. Enhance the flexibility of data processing: Traditional methods usually need to process all data at once, lacking flexibility and being difficult to adapt to the needs of different time spans and data scales. The present invention can flexibly generate the target heat map by progressively generating multi-level heat maps and can select different time spans and levels as needed. This flexibility enables the system to better meet the needs of different application scenarios, such as short-term waterway congestion analysis and long-term ecological protection research.

[0101] 4. Optimize the visualization effect of the heat map: The heat maps generated by traditional methods may have noise or be not smooth enough, affecting the visualization effect and analysis accuracy. However, the present invention can effectively smooth the heat map, reduce noise, and improve the visualization effect through pixel weighted average method operations. The progressive processing method can also retain more detailed information, making the heat map more accurate and intuitive.

[0102] 5. Support the processing of large-scale data sets: When traditional methods process large-scale AIS data sets, they often face problems such as insufficient computing resources and too long generation time. However, the present invention can effectively process large-scale AIS data sets and generate high-quality heat maps through staged processing and progressive operations. This method is not only applicable to small-scale data sets but can also be extended to large-scale data sets to meet the needs of fields such as maritime traffic management, waterway planning, and ecological protection.

[0103] To explain the principle of the technical solution of the present invention in detail, the overall process of the present invention will be described below in conjunction with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.

[0104] First of all, it should be noted that existing methods usually lack efficient time aggregation and multi-scale processing capabilities, making it difficult to effectively integrate and optimize data within different time scales (such as daily, monthly, and yearly), resulting in a lack of consistency and reliability in the comparison and analysis of heat maps between different time periods. In short, when faced with a huge amount of data, the existing technology has too much storage pressure and computing resource consumption and is difficult to meet the needs in practical applications. Therefore, how to improve the efficiency, accuracy, and flexibility of heat map generation remains an urgent problem to be solved in the existing technology.

[0105] In view of this, the present invention addresses the problems of high computational cost, low efficiency, and excessive consumption of storage and computing resources in existing ship trajectory heat map generation technologies when processing large-scale, long-time series AIS data. An optimized heat map generation algorithm is proposed. This algorithm effectively improves generation efficiency and reduces resource consumption through data preprocessing, pixel weighted average calculation, efficient time aggregation mechanism, and memory optimization strategy. It is particularly suitable for real-time processing of large-scale, long-time series data sets, and solves several key problems of existing technologies. Figure 8 As shown, the present invention can be implemented through the following process steps:

[0106] Obtain the target ship's AIS data, which can be historical data or dynamic data accessed through the interface.

[0107] Read the ship's name, MMSI, latitude and longitude, timestamp and other information from the target ship's AIS data.

[0108] Based on the longitude and latitude information in the ship's AIS data, it is converted into AIS point data in the WGS84 coordinate system and cleaned. 1) Spatial position cleaning. First, the longitude and latitude are cleaned. The valid range for longitude is [-180, 180], and the valid range for latitude is [-90, 90]. Data outside the valid range is eliminated. Then, the longitude and latitude are cleaned again. The global ocean distribution range is obtained using global coastline data as the ocean boundary. By overlaying the AIS data and the global ocean distribution range in the same coordinate system, AIS data with longitude and latitude outside the ocean boundary is eliminated. 2) Speed cleaning. A speed threshold is set to eliminate data outside the threshold range. The maximum speed of a ship is generally no more than 35 knots, so the threshold can generally be set to 35 knots. The speed is calculated by dividing the distance (in nautical miles) between the ship's current position and the previous position by the time difference (in hours) in which the ship traveled.

[0109] The global area (i.e., longitude [-180, 180], latitude [-90, 90]) is divided into 2880 x 1440 pixels. The cleaned AIS point data for each unit of time is projected onto the global area at the end of the hour. For each AIS point, a circle with a radius of 10 pixels is set centered at the longitude and latitude. A uniform gradient color is applied to each point, with the center color set to RGB (0.03, 0, 0) and the edges to (0, 0, 0). The 2880 x 1440 pixel size, the AIS point radius, and the center color (RGB (0.03, 0, 0)) can all be adjusted based on actual conditions. The values used here are those found to provide the best visualization results after multiple experiments.

[0110] Set the weight of each AIS point to 1, and use the pixel weighted average method to calculate the final color value of each pixel:

[0111]

[0112] In the formula, is the contribution color value of the i-th AIS point to the pixel , is the weight of the i-th AIS point (taking the value 1), and n is the total number of AIS points in the pixel .

[0113] Traverse and calculate one by one to obtain 2880*1440 pixel values globally, which is the heat map within a unit time, and save it in the tif format.

[0114] Select whether to calculate the heat map for the whole day or the whole month according to specific requirements. Specific requirements usually only view the heat map across months. For example, from September 1, 2024 to January 31, 2025, you can choose to calculate the monthly heat map; specific requirements usually only view the heat map across days. For example, from September 5, 2024 to September 12, 2024, you can choose to calculate the daily heat map; specific requirements usually only view the heat map across hours, and you can choose not to calculate the daily or monthly heat map. If you are unsure of the requirements or have all the requirements, you can select all.

[0115] Taking all selections as an example, at the end of the whole day, perform the pixel weighted average method operation on the hourly heat map pixels within the day, and perform the operation on 24 (1 per hour) tif-format heat maps of the day to obtain the daily heat map; at the end of the whole month, perform the pixel weighted average method operation on the daily heat map pixels within the month, and perform the operation on 28 / 29 / 30 / 31 (1 per day) tif-format heat maps of the month to obtain the monthly heat map.

[0116] Perform normalization processing on the hourly, daily, and monthly heat maps so that the numerical range is 0-1. The normalization processing formula:

[0117]

[0118] In the formula, is the normalized value at the longitude and latitude of , is the heat value calculated at the longitude and latitude of , and are the maximum and minimum values in the heat map respectively.

[0119] The naming format of the hourly heat map is "Hour-YYYY / MM / DD HH:00"; the naming format of the daily heat map is "Day-YYYY / MM / DD"; the naming format of the monthly heat map is "Month-YYYY / MM", forming a heat map data set.

[0120] When there is a specific need to calculate the heat map, select the time range according to the need.

[0121] Select the optimal unit time according to the time range. If the time range is short (<24 hours), the optimal unit is hour; if the time range is long but does not exceed one month (≥1 day and <1 month), the optimal unit is day; if the time range is long (≥1 month), the optimal unit is month. For example, to calculate the heat map from 00:00 on May 1, 2024 to 12:00 on May 1, 2024, the optimal unit is hour; to calculate the heat map from May 1, 2024 to May 20, 2024, the optimal unit is day; to calculate the heat map from May 1, 2024 to December 31, 2024, the optimal unit is month. Extract the heat map data corresponding to the time range from the heat map data set according to the optimal unit.

[0122] Perform pixel weighted average method operation on the extracted heat map data and perform normalization processing to obtain the heat map within the required time range.

[0123] The normalized heat value ∈[0,1] is mapped to RGB colors. This method adopts the following color mapping scheme as shown in Table 1 above. The gradient color scheme of "blue → yellow → red" can effectively highlight the hot spots of ship activities, while maintaining the uniformity of visual perception, ensuring that users can intuitively interpret the heat map data.

[0124] Color mapping function Used to convert the normalized heat value to RGB colors:

[0125]

[0126] Colormap is a color lookup table containing 256 levels of colors. Color index (integer value 0-255), used to look up and obtain RGB colors.

[0127] Finally, generate a pseudocolor image and visualize it.

[0128] In some specific application scenarios, for the traditional method of the existing technology and the method of the embodiment of the present invention, heat map generation tests are compared under the same test configuration. An example of the test result comparison is shown in Table 2 below:

[0129] Table 2

[0130]

[0131] In summary, the present invention enables efficient time aggregation and adaptive time unit selection: The present invention proposes to adaptively select the optimal time unit (such as hour, day, month) according to requirements for generating heatmaps. This technology can dynamically select the most suitable aggregation granularity according to the time range of the data, improving the calculation efficiency. Moreover, when dealing with cross-hour, cross-day or cross-month requirements, it can respond quickly, avoiding repeated calculations and resource waste in traditional methods. In addition, the present invention enables adaptive time unit selection and efficient time aggregation mechanism: The present invention provides a technology for selecting the optimal time unit based on the time range, flexibly handling heatmap calculation requirements of different time scales (hour, day, month), and avoiding redundant calculations on the data.

[0132] Compared with the disadvantages of the prior art, the beneficial effects of the present invention are compared as follows:

[0133] Problems of the prior art: Traditional heatmap generation methods need to process a large amount of ship AIS data. Especially when the number of ships is large and the time span is long, the calculation cost is very high, and the generation process is slow, unable to meet the needs of real-time monitoring.

[0134] Advantages of the present invention: The present invention significantly reduces the consumption of computing resources and improves the efficiency of generating heatmaps by optimizing data cleaning and aggregation algorithms. Through adaptive selection of the optimal unit time and efficient algorithm design, even when dealing with large-scale data, the system can respond quickly, reducing the calculation time and storage requirements.

[0135] Problems of the prior art: When generating large-scale heatmaps, existing methods usually require a large amount of computing resources and storage space. Especially in the calculation of long-term data or large-scale areas, it is easy to cause bottlenecks in memory and computing power.

[0136] Advantages of the present invention: The present invention effectively reduces the consumption of computing and storage resources through technologies such as reasonable adaptive selection, efficient data storage structure, and block processing. In the face of large amounts of data, the system can operate efficiently without being affected by resource bottlenecks in terms of calculation efficiency, ensuring the stability and scalability of the system.

[0137] On the other hand, as Figure 9 shown, an embodiment of the present invention provides a ship trajectory heatmap generation device 900, which may include:

[0138] A first module 901, configured to obtain AIS data of a target ship and convert the AIS data into a plurality of AIS point data;

[0139] The second module 902 is configured to project the AIS point data within a preset unit time onto a preset two-dimensional pixel plane for color radiation, and generate an initial heat map corresponding to each segment of the preset unit time;

[0140] The third module 903 is configured to perform progressive pixel weighted average method operations on the initial heat maps of each segment of the preset unit time to obtain multi-level heat maps for each time interval;

[0141] The fourth module 904 is configured to obtain the time range to be searched, and perform pixel weighted average method operations on the target level heat map of the corresponding time interval based on the time span of the time range to obtain the target heat map corresponding to the time range.

[0142] In some embodiments, the device may further include:

[0143] The fifth module is configured to perform data cleaning on the AIS point data based on a preset threshold range.

[0144] In some embodiments, the multi-level heat maps include the initial heat map corresponding to each segment of the preset unit time, the whole-day heat map corresponding to each day, and the whole-month heat map corresponding to each month; the device may further include:

[0145] The sixth module is configured to perform normalization processing on the preselected ship trajectory heat map to obtain the normalized heat value at each position of the ship trajectory heat map;

[0146] The seventh module is configured to map the corresponding position of the target heat map to an RGB color through a preset mapping table based on the normalized heat value, and generate a pseudo-color image corresponding to the ship trajectory heat map;

[0147] Wherein, the ship trajectory heat map includes the initial heat map, the whole-day heat map, the whole-month heat map, and the target heat map; the preset mapping table includes the mapping relationship between each numerical interval of the normalized heat value and the chromaticity of its corresponding RGB color.

[0148] The content of the method embodiments of the present invention is applicable to the device embodiments of the present invention. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above methods.

[0149] On the other hand, the embodiments of the present invention further provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the above-mentioned ship trajectory heat map generation method. The electronic device may be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.

[0150] It can be understood that the content in the above method embodiments is applicable to the present device embodiment. The functions specifically implemented by the present device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.

[0151] As Figure 10 shown, Figure 10 FIG. schematically shows the hardware structure of an electronic device 1000 according to another embodiment. The electronic device 1000 includes:

[0152] A processor 1001, which can be implemented in a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention;

[0153] A memory 1002, which 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), etc. The memory 1002 can store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1002 and are called by the processor 1001 to execute the network node population optimization method of the embodiments of the present invention;

[0154] An input / output interface 1003, which is used to implement information input and output;

[0155] A communication interface 1004, which is used to implement communication and interaction between the present device and other devices, and can implement communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.);

[0156] A bus 1005, which transmits information between the various components of the device (such as the processor 1001, the memory 1002, the input / output interface 1003, and the communication interface 1004);

[0157] Among them, the processor 1001, the memory 1002, the input / output interface 1003, and the communication interface 1004 are communicatively connected to each other inside the device through the bus 1005.

[0158] The embodiments of the electronic device described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] The content of the method embodiments of the present invention is applicable to the embodiments of this electronic device. The functions specifically implemented by the embodiments of this electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method.

[0160] Another aspect of the embodiments of the present invention also provides a computer-readable storage medium. The storage medium stores a program, and the program is executed by a processor to implement the foregoing method.

[0161] It should be noted that the computer-readable medium shown in the embodiments of the present invention may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, apparatus, or device. In the present invention, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium can send, propagate, or transmit a program for use by or combined with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0162] The content of the method embodiments of the present invention is applicable to the embodiments of this computer-readable storage medium. The functions specifically implemented by the embodiments of this computer-readable storage medium are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method.

[0163] The embodiments of the present invention also disclose a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the foregoing method.

[0164] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0165] It should be noted that although several modules of the devices for action execution are mentioned in the foregoing detailed description, this division is not mandatory. In fact, according to the embodiments of the present invention, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0166] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present invention.

[0167] In some alternative embodiments, the functions / operations recited in the block diagrams may not occur in the order presented in the operational illustrations. For example, depending on the functions / operations involved, two consecutive blocks shown may actually be executed substantially simultaneously or the blocks may sometimes be executed in the reverse order. Further, the embodiments presented and described in the flowcharts of the present invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and in which sub-operations described as part of a larger operation are performed independently.

[0168] In addition, although the present invention has been described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated in a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It should also be understood that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, given the attributes, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the modules will be understood within the ordinary skill of an engineer. Thus, those of ordinary skill in the art can implement the present invention as set forth in the claims without undue experimentation. It should also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0169] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or part of the technical solution can be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may 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 invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.

[0170] The logic and / or steps represented in the flowchart or otherwise described herein can, for example, be considered as a definitional sequence of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by or in connection with an instruction execution apparatus, device or equipment, such as a computer-based device, a device including a processor, or other devices that can fetch and execute instructions from the instruction execution apparatus, device or equipment. As used in this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with the instruction execution apparatus, device or equipment or in connection with these instruction execution apparatus, devices or equipment.

[0171] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection part (electronic device) having one or more wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other appropriate processing as necessary, and then stored in a computer memory.

[0172] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution apparatus. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0173] In the description of this specification, the description referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0174] Although embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the claims and their equivalents.

[0175] The above has specifically described the preferred embodiments of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present invention.

Claims

1. A method for generating a heat map of ship trajectories, characterized in that, The following steps are involved: Acquire AIS data of a target ship, and convert the AIS data into a plurality of AIS point data; wherein the AIS point data includes the latitude and longitude and a timestamp of the location point corresponding to the target ship; Projecting the AIS point data within a preset unit time onto a preset two-dimensional pixel plane for color radiation to generate an initial heat map corresponding to each segment of the preset unit time; wherein the two-dimensional pixel plane is constructed based on a preset number of pixel points divided based on the global longitude and latitude range; projecting the AIS point data within the preset unit time onto a preset two-dimensional pixel plane for color radiation to generate an initial heat map corresponding to each segment of the preset unit time, including the following steps: Projecting the AIS point data within the preset unit time to the pixel point in the two-dimensional pixel plane based on the latitude and longitude and the timestamp; Taking the pixel point corresponding to the longitude and latitude as the center of the circle, the pixel points within a preset radius are radiated with colors based on a preset color range; the color radiation gradually changes from dark to light within the preset color range from the center of the circle outward; Traversing each pixel point of the two-dimensional pixel surface, performing a pixel weighted average operation on all color radiation results of a single pixel point, and obtaining the initial thermal map corresponding to the preset unit time; Performing a progressive pixel weighted average operation on the initial heat map of each preset unit time segment to obtain a multi-level heat map for each time interval; The time range to be searched is obtained, and based on the time span of the time range, a pixel weighted average operation is performed on the target level heat map corresponding to the time interval to obtain the target heat map corresponding to the time range.

2. The method for generating a heat map of a ship's trajectory according to claim 1, wherein The method further comprises the following steps: The AIS point data is cleaned based on a preset threshold range.

3. The method for generating a heat map of a ship's trajectory according to claim 2, wherein The performing data cleaning on the AIS point data based on a preset threshold range includes at least one of the following steps: Based on the longitude and latitude of the AIS point data, spatial position cleaning is performed using a preset position boundary range to remove the AIS point data whose longitude and latitude are not within the position boundary range; the position boundary range includes a valid longitude and latitude range and an ocean boundary range; Based on the speed of the AIS point data, speed cleaning is performed using a preset speed threshold, and the AIS point data having a speed exceeding the speed threshold is removed.

4. The method for generating a ship trajectory heat map according to claim 1, wherein The step of performing a progressive pixel weighted average operation on the initial heat map of each preset unit time segment to obtain a multi-level heat map for each time interval includes the following steps: At the end of the day, the pixel weighted average method is performed on the initial heat map of each preset unit time within the day to obtain the heat map of the whole day of the corresponding date; At the end of the month, the pixel weighted average method is performed on the daily heat map of each day in the month to obtain the heat map of the corresponding month; The multi-level heat map includes the initial heat map corresponding to each preset unit time, the full-day heat map corresponding to each day, and the full-month heat map corresponding to each month.

5. The method for generating a heat map of a ship's trajectory according to claim 1, characterized in that, The multi-level heat map includes the initial heat map corresponding to each period of the preset unit time, the all-day heat map corresponding to each day, and the all-month heat map corresponding to each month; the operation of performing pixel weighted average method on the target-level heat map corresponding to the time interval based on the time span of the time range includes the following steps: When the time span is less than one day, perform pixel weighted average method operation on the initial heat maps of each period of the preset unit time in the time interval corresponding to the time range; When the time span is greater than or equal to one day and less than one month, perform pixel weighted average method operation on the all-day heat maps of each day in the time interval corresponding to the time range; When the time span is greater than or equal to one month, perform pixel weighted average method operation on the all-month heat maps of each month in the time interval corresponding to the time range.

6. The method for generating a heat map of a ship's trajectory according to claim 1, wherein The multi-level heat map includes the initial heat map corresponding to each period of the preset unit time, the all-day heat map corresponding to each day, and the all-month heat map corresponding to each month; the method further includes the following steps: Perform normalization processing on the preselected ship trajectory heat map to obtain the normalized heat value of each position of the ship trajectory heat map; Based on the normalized heat value, map the corresponding position of the target heat map to RGB color through a preset mapping table to generate a pseudo-color image corresponding to the ship trajectory heat map; Wherein, the ship trajectory heat map includes the initial heat map, the all-day heat map, the all-month heat map and the target heat map; the preset mapping table includes the mapping relationship between each numerical interval of the normalized heat value and the chromaticity of the corresponding RGB color.

7. A device for generating a heat map of a ship's trajectory, characterized in that, Including: The first module is used to obtain the AIS data of the target ship and convert the AIS data into a plurality of AIS point data; wherein, the AIS point data includes the longitude, latitude and timestamp of the position point corresponding to the target ship; The second module is used to project the AIS point data within the preset unit time onto a preset two-dimensional pixel plane for color radiation to generate an initial heat map corresponding to each period of the preset unit time; wherein, the two-dimensional pixel plane is constructed based on a preset number of pixel points divided according to the global longitude and latitude range; the operation of projecting the AIS point data within the preset unit time onto the preset two-dimensional pixel plane for color radiation to generate an initial heat map corresponding to each period of the preset unit time includes the following steps: Based on the longitude, latitude and timestamp, project the AIS point data within the preset unit time onto the pixel points in the two-dimensional pixel plane; Taking the pixel point corresponding to the longitude and latitude as the center, perform color radiation on the pixel points within a preset radius range based on a preset color interval; the color radiation gradually changes from deep to shallow in the preset color interval from the center outwards; Traverse each pixel point of the two-dimensional pixel plane, and perform pixel weighted average method operation on the results of all the color radiations of a single pixel point to obtain the initial heat map corresponding to the preset unit time; A third module, configured to perform progressive pixel weighted average method operations on the initial heatmaps of each of the preset unit times, to obtain multi-level heatmaps for each time interval; A fourth module, configured to obtain a time range to be searched, and perform pixel weighted average method operations on the target-level heatmaps corresponding to the time intervals within the time span of the time range, to obtain a target heatmap corresponding to the time range.

8. An electronic device, characterized in that, It includes a processor and a memory; The memory is used for storing programs; The processor executes the program to implement the method according to any one of claims 1 to 6.

9. A computer storage medium storing a program executable by a processor, characterized in that, The program executable by the processor, when executed by the processor, is used to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Ship distribution thermodynamic diagram construction method based on VTS system

    CN106844852A

  • Global route thermodynamic diagram generation method and system

    CN113961660A