AIS Mobile Base Station Data Compression Algorithm and Data Transmission Method

Through the AIS mobile base station data compression algorithm, the problem of large traffic consumption in AIS mobile base station data transmission is solved, effective compression of data volume and traffic saving is achieved, adapting to different traffic states, and data density requirements are ensured.

CN115175247BActive Publication Date: 2025-07-11XIAMEN XINNUO TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210730025.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-24
Publication Date
2025-07-11
Estimated Expiration
2042-06-24

AI Technical Summary

Technical Problem

When existing AIS mobile base stations transmit data through cellular data networks, traffic consumption is high, resulting in high operating costs. How to effectively compress data volume to save traffic becomes a difficult point.

Method used

The data compression algorithm of AIS mobile base station is adopted, including data extraction, regularization, filtering and level compression. By setting data levels and filtering mechanisms, unnecessary data transmission is reduced.

Benefits of technology

It greatly compresses the data transmission volume, effectively saves traffic, adapts to different traffic states, ensures data density requirements, and further reduces the data packet content through location and collinear filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115175247B_ABST
    Figure CN115175247B_ABST
Patent Text Reader

Abstract

The present invention discloses an AIS mobile base station data compression algorithm, including: a. The AIS mobile base station extracts data from the received AIS messages, regularizes them to form a data set, and divides the data set into at least one data level 0; b. Sequentially number the current data set and the historical data set with the same MMSI code obtained according to the time sequence, calculate the time interval between the current data set and the previous data set. If the time interval is greater than or equal to a preset first threshold, directly enter process c; otherwise, perform data filtering; c. Determine the change in the position trajectory of the ship. If the change in the position trajectory is within the preset range, set the level of the current data set to level 0; otherwise, set it to other levels. The present invention also discloses an AIS mobile base station data transmission method, including data compression and data upload steps. The present invention can greatly compress the size of the transmitted data and effectively save bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ship communication, specifically to an AIS mobile base station data compression algorithm and an AIS mobile base station data transmission method. Background Art

[0002] As the coverage of the maritime network signal becomes wider and wider, more and more ships are equipped with devices with networking functions, and many networking devices also have the function of uploading AIS data, with the same functions as AIS base stations. And the devices move with the ship, and these devices are AIS mobile base stations. The AIS mobile base station actually realizes the effect of synchronizing the navigation data of other ships in the vicinity of the ship to the server.

[0003] The common network communication method of the existing AIS mobile base station is to use the cellular data network (4G network, 5G network). When using this method for communication, it is necessary to pay traffic fees to the network operator. During the navigation of the ship, surrounding ships are constantly transmitting their dynamic data and static data, and the amount of information that the AIS mobile base station needs to synchronize is often relatively large. How to compress the uploaded data to achieve both communication with the server and save traffic has become one of the difficulties concerning the operating cost. Summary of the Invention

[0004] The purpose of the present invention is to provide an AIS mobile base station data compression algorithm and a data transmission method to reduce the amount of communication data, thereby saving traffic.

[0005] To achieve the above purpose, the present invention discloses an AIS mobile base station data compression algorithm, including the following processes:

[0006] a. Data extraction and regularization

[0007] The AIS mobile base station extracts data from the received AIS messages and regularizes them according to ship parameters to form a data set. Different data levels are set for the ship parameters according to the importance degree, and the data levels at least include data level 0 and data level 1.

[0008] b. Filtering

[0009] The current data set with the same MMSI code obtained and the historical data set are numbered in chronological order, and the previous data set closest to the time of the current data set is found; if the previous data cannot be found, the process ends. Calculate the time interval between the current data set and the previous data set. If the time interval is greater than or equal to a preset first threshold, directly enter process c. If the time interval is less than the preset first threshold, data filtering is performed. If it is determined through filtering that the data set does not need to be retained, the current data set is directly deleted and the process ends; if it is determined through filtering that the data set needs to be retained, enter process c.

[0010] c. Data level compression

[0011] Compare the change amounts of several parameters such as the speed, course over ground, and heading of the current data set's point with those of the previous data set's point to determine the change of the ship's position trajectory. If the change of the position trajectory is within the preset range, set the level of the current data set to level 0; otherwise, set the data level of the current point to other levels; retain the ship parameters under the data level and delete the remaining ship parameters.

[0012] After the data set goes through the above processes a - c, it forms a historical data set. The AIS mobile base station receives new AIS messages and repeats the above processes a - c for data compression.

[0013] Preferably, before process c, determine the traffic warning line. Determine whether the monthly traffic of the Internet of Things card to which the ship equipment belongs is lower than the traffic warning line. If it is lower than the traffic warning line, set the data level of the current point to level 0, compress the ship parameters with data level 0, delete the remaining ship parameters, and end the process; if it is higher than the traffic warning line, perform process c.

[0014] Preferably, in process c, the method for determining that the change of the ship's position trajectory is within the preset range is: simultaneously satisfy |v i -v i-1 |≤v th , |cog i -cog i-1 |≤cog th , |hdg i -hdg i-1 |≤hdg th , where v i and v i-1 are the speeds of the i-th and the (i - 1)-th data sets respectively, v th is the preset speed threshold; cog i and cog i-1 are the courses over ground of the i-th and the (i - 1)-th data sets, cog th is the preset course over ground threshold; hdg i and hdg i-1 are the headings of the i-th and the (i - 1)-th data sets, hdg th is the preset heading threshold, then set the data level of the current point to level 0.

[0015] Furthermore, the data filtering method in process b includes position filtering or / and collinearity filtering; for the position filtering, that is, the distance d i between the longitude and latitude of the i-th data set and the (i - 1)-th data set, the theoretical maximum voyage d max and the theoretical minimum voyage dmin Compare. If d i > d max it is determined that a data error has occurred, and the i-th data set is deleted; if the distance d i < d min it is determined that the ship is at anchor, and the i-th data set is deleted.

[0016] The collinear filtering is to compare the position of the i-th data set, i.e., the i-th point, with the position of the (i - 1)-th data set, i.e., the (i - 1)-th point, and the position of the (i - 2)-th data set, i.e., the (i - 2)-th point. If the perpendicular distance from the i-th point to the line connecting the (i - 1)-th point and the (i - 2)-th point is less than a preset second threshold, the three points are regarded as collinear, and the data of the (i - 1)-th data set is deleted. If the data of the (i - 1)-th data set is deleted, the data sets with the same MMSI code are renumbered and then enter process c.

[0017] Among them, the steps of the position filtering are as follows:

[0018] (1) Calculate the theoretical speed value v according to the following formula std , v std = max(v0, v1,..., v i ) + v Δ , where v Δ is the fluctuation value, v0 is the initial speed, and v i is the speed of the i-th point.

[0019] (2) Calculate the theoretical maximum voyage d according to the following formula max , d max = v std ·(t i - t i-1 ), where t i and t i-1 are the relative times of the i-th point and the (i - 1)-th point respectively; determine a theoretical minimum voyage d min .

[0020] (3) Calculate the distance d between the i-th point and the (i - 1)-th point through the following formula i

[0021] d i = arccos(sinlat i sinlat i-1 + coslat i coslat i-1 cos(lon i - lon i-1 )) × R

[0022] where lat i and lati-1 are the latitude coordinates of the i-th point and the (i - 1)-th point respectively, lon i and lon i-1 are the longitude coordinates of the i-th point and the (i - 1)-th point respectively, and R is the radius value of the earth.

[0023] (4) Compare the data: If d i > d max then it is determined that a data error has occurred, and the i-th data set is deleted; if the distance d i < d min then it is determined that the ship is at anchor, and the i-th data set is deleted.

[0024] Among them, the steps of the collinear filtering are as follows:

[0025] Furthermore, determine the speed difference between the i-th point and the (i - 1)-th point: If |v i - v i-1 | > v th , then no collinear filtering is performed. If |v i - v i-1 | ≤ v th , then the following steps are performed.

[0026] (1) Connect the positions of the (i - 1)-th point and the (i - 2)-th point to form a line, and calculate the perpendicular point coordinates (lon s , lat s ) of the i-th point to the line. lon s = (Δlon + tanθΔlat) / (1 + tan 2 θ) + lon i-2 , lat s = (Δlat + cotθΔlon) / (1 + cot 2 θ) + lat i-2 , tanθ = (lat i-1 - lat i-2 ) / (lon i-1 - lon i-2 ), cotθ = (lon i-1 - lon i-2 ) / (lat i-1 - lat i-2 ), Δlon = lon i - lon i-2 , Δlat = lat i - lat i-2 , where lon s and lat s are the longitude and latitude of the perpendicular point respectively, lon i and lat iThey are the longitude and latitude of the $i$-th point, $lon$ i-1 and $lat$ i-1 They are the longitude and latitude of the $(i - 1)$-th point, $lon$ i-2 and $lat$ i-2 They are the longitude and latitude of the $(i - 2)$-th point respectively.

[0027] (2) Calculate the distance $h$ from the $i$-th point to the vertical point i , $h$ i $=\arccos(\sin lat$ i $\sin lat$ s $+\cos lat$ i $\cos lat$ s $\cos(lon$ i $-lon$ s $))\times R$, where $R$ is the value of the earth radius.

[0028] (3) Determine whether $h$ i is less than a preset second threshold. If it is less than the second threshold, consider the three points as collinear and delete the data of the $(i - 1)$-th dataset.

[0029] Preferably, the format of the said dataset is $\{mmsi$ i , $t$ i , $lon$ i , $lat$ i , $v$ i , $hdg$ i , $cog$ i}\}$, where $mmsi$ i , $t$ i , $lon$ i , $lat$ i , $v$ i , $hdg$ i , $cog$ i represent MMSI, time, longitude coordinate, latitude coordinate, speed, heading, course over ground, relative time respectively. The relative time $lag$ i $=t$ i $-t1$, where $t1$ is the time of the first dataset. The dataset is divided into two data levels: data level 0 and data level 1. Data level 0 includes ship parameters: MMSI code, relative time, longitude coordinate, latitude coordinate. Data level 1 includes ship parameters: MMSI code, relative time, longitude coordinate, latitude coordinate, speed, heading, course over ground.

[0030] The present invention also discloses a data transmission method for an AIS mobile base station, including the following steps: S1. Data compression: Using the above-mentioned AIS mobile base station data compression algorithm, compress the message data of AIS. S2. Data upload: The AIS mobile base station determines the time interval between the current time and the time of the last data upload. If the time interval does not exceed a preset third threshold, cache the current data and end the process; otherwise, group all the cached data according to the data level, splice them into bit strings in a compact format respectively, and upload them to the server in batches after compression.

[0031] Further, after receiving the data, the server decompresses the data into a bit string; the server groups the data according to the MMSI encoding, arranges them in chronological order respectively, and fills in the remaining ship parameters missing at all data levels 0 with the same values as the ship parameters of the previous other data levels.

[0032] The present invention has the following beneficial effects:

[0033] 1. By parsing the AIS message and extracting the required information therein, the present invention repackages and compresses it, reduces the transmission of unnecessary redundant information, greatly compresses the size of the transmitted data, and effectively saves bandwidth.

[0034] 2. By setting different data levels (at least including data level 0) for ship parameters according to the importance degree, determining the importance degree of data through an algorithm, and correspondingly modifying the data level and compressing and uploading the parameters, the present invention can further reduce the content of the transmitted data packets. Moreover, different data levels can be flexibly adjusted to adapt to and solve different states of traffic changes.

[0035] 3. The algorithm of the present invention takes into account the data density requirement, sets the maximum data interval, ensures that within a specific time threshold, there must be a set of AIS data uploaded, and ensures a reasonable data thinning interval.

[0036] 4. The present invention adopts the method of position filtering or / and collinear filtering to flexibly thin the data, that is, delete the unreasonable data points or the data points that can be represented by other point sets. Through the position filtering method, filter the data with abnormal positions, and thin the data when it is determined that the ship is in the anchored state; through the collinear filtering method, thin the data when it is determined that the track is a straight line; through these two methods, the content of the transmitted data packets can be further reduced. Description of the Drawings

[0037] Figure 1 is the flow chart of the present invention.

[0038] Figure 2 is a schematic diagram for determining whether three points are collinear.

[0039] Figure 3It is a schematic diagram of the ship navigation interface in the second embodiment. (The second position point in the figure is the jump point, outside the interface and not shown.) Detailed implementation mode

[0040] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The ship navigation data used in the embodiments is virtual data constructed to illustrate and explain the algorithm of the present invention. The AIS messages of the actual navigation data need to be published according to the message interval specified by relevant regulations.

[0041] Embodiment 1

[0042] As Figure 1 shown, this embodiment discloses an AIS mobile base station data compression algorithm, including the following processes

[0043] a. Data extraction and regularization

[0044] The AIS mobile base station extracts the data of the received AIS message (message No. 18) and regularizes it according to the ship parameters to form a data set. The format of the data set is: {mmsi i ,t i ,lon i ,lat i ,v i ,hdg i ,cog i ,lag i}. Among them, MMSI (mmsi), time (t), longitude coordinate (lon), latitude coordinate (lat), speed (v), heading (hdg), course over ground (cog), relative time (lag).

[0045] The data set is divided into at least one data level. In this embodiment, the data set is divided into two data levels as follows

[0046] The ship parameters of data level 0 {mmsi i ,lag i ,lon i ,lat i}, that is, MMSI code (mmsi), relative time (lag), longitude coordinate (lon), latitude coordinate (lat).

[0047] The ship parameters of data level 1 {mmsi i ,lag i ,lon i ,lat i ,v i ,hdg i ,cog i}, namely MMSI code (mmsi), relative time (lag), longitude coordinate (lon), latitude coordinate (lat), speed (v), heading (hdg), course over ground (cog).

[0048] The structures and attributes of each ship parameter are shown in Table 1 below.

[0049] Table 1

[0050]

[0051] b. Filtering

[0052] Number the current data set with the same MMSI code and the historical data set obtained in chronological order, and find the previous data set closest to the time of the current data set; if the previous data cannot be found, end the process.

[0053] Calculate the time interval (t i -t i-1 ) between the time of the current data set (the i-th data set) and the time of the previous data set (the i - 1-th data set). If the time interval is greater than or equal to the preset first threshold (e.g., the first threshold is 10 min), directly enter process d;

[0054] If the time interval is less than the preset first threshold, data filtering is performed.

[0055] The data filtering method includes position filtering or / and collinearity filtering. In this embodiment, position filtering is performed first, and then collinearity filtering. The steps of the two filtering methods are described in detail below.

[0056] 1. Position filtering

[0057] The basic principle of this filtering is as follows: Compare the distance d i between the longitude and latitude of the i-th data set and the (i - 1)-th data set with the theoretical maximum voyage distance d max and the theoretical minimum voyage distance d min . If d i >d max , it is determined that a data error has occurred, and this i-th data set is deleted; if the distance d i <d min , it is determined that the ship is at anchor, and the i-th data set is deleted. The steps are as follows:

[0058] (1) Calculate the theoretical speed value v according to the following formula std ,

[0059] v std =max(v0, v1, …, v i ) + v Δ

[0060] Among them, v Δ is the fluctuation value; the fluctuation value is obtained according to actual experience. In this embodiment, the fluctuation value v Δ takes 15 knots (knot, the unit symbol is kn, that is, nautical miles per hour, which is a speed unit used for navigation).

[0061] (2) Calculate the theoretical maximum range d according to the following formula max

[0062] d max = v std ·(t i - t i-1 )

[0063] Determine a theoretical minimum range d min , in this embodiment, the theoretical minimum range takes 0.1 nautical miles (nautical mile, the unit symbol is nm, which is a length unit used for navigation).

[0064] (3) Calculate the distance d between two points through the following formula i ,

[0065] d i = arccos(sinlat i sinlat i-1 + coslat i coslat i-1 cos(lon i - lon i-1 )) × R

[0066] Among them, lat i , lat i-1 are the latitude coordinates of the i-th point and the (i - 1)-th point respectively, lon i and lon i-1 are the longitude coordinates of the i-th point and the (i - 1)-th point respectively, and R is the value of the earth's radius.

[0067] (4) Compare the data: If d i > d max then it is determined that there is a data error (skipping point), and the i-th data set is deleted; if the distance d i < d min then it is determined that the ship is in the anchored state, and the i-th data set is deleted.

[0068] 2. Collinear filtering

[0069] The basic principle of collinear filtering is to determine whether three points are collinear. If they are collinear, it means that only the data of the two end points are retained, and the data of the middle point is deleted.

[0070] Determine the speed difference between the i-th point and the (i - 1)-th point before collinear filtering: If |v i -v i-1 |>v th , then collinear filtering is not performed. If |v i -v i-1 |≤v th , where v th is taken as 1 kn, and the steps are as follows:

[0071] (1) As Figure 2 shown, connect the positions of the (i - 1)-th point and the (i - 2)-th point to form a line l, and calculate the coordinates (lon s , lat s ) of the perpendicular point O from the i-th point to the line

[0072] lon s =(Δlon + tanθΔlat) / (1 + tan 2 θ)+lon i-2

[0073] lat s =(Δlat + cotθΔlon) / (1 + cot 2 θ)+lat i-2

[0074] tanθ=(lat i-1 -lat i-2 ) / (lon i-1 -lon i-2 )

[0075] cotθ=(lon i-1 -lon i-2 ) / (lat i-1 -lat i-2 )

[0076] Δlon = lon i -lon i-2

[0077] Δlat = lat i -lat i-2

[0078] where lon s and lat s are the longitude and latitude of the perpendicular point respectively, lon i and lat i are the longitude and latitude of the i-th point respectively, lon i-1 and lat i-1 are the longitude and latitude of the (i - 1)-th point respectively, lon i-2 and lat i-2They are respectively the longitude and latitude of the (i - 2)-th point.

[0079] (2) Calculate the distance h from the i-th point to the perpendicular point i

[0080] h i = arccos(sin lat i sin lat s + cos lat i cos lat s cos(lon i - lon s )) × R

[0081] where R is the value of the Earth's radius. In this embodiment, the average radius value of the Earth is taken, i.e., R = 6371 km.

[0082] (3) Determine whether h i is less than a preset second threshold, and the preset second threshold is taken as 10 m. If h i < 10 m, the three points are regarded as collinear, and the data of the (i - 1)-th data set is deleted.

[0083] After position filtering and collinearity filtering, if the current data set is deleted, the process ends. If data remains after filtering, the remaining data is renumbered and process d is entered.

[0084] c. Judgment of flow warning line: Determine whether the monthly flow of the IoT card to which the ship equipment belongs is lower than the flow warning line. If it is lower than the flow warning line, the data level of the current point is set to level 0, the ship parameters with data level 0 are compressed, and the remaining ship parameters are deleted, and the process ends; if it is higher than the flow warning line, the following process is carried out:

[0085] Calculate the speed, course over ground, and heading of the i-th point, which is the position of the i-th data set, and the (i - 1)-th point, which is the position of the (i - 1)-th data set. If |v i - v i-1 | ≤ v th , |cog i - cog i-1 | ≤ cog th , |hdg i - hdg i-1 | ≤ hdg th are all satisfied at the same time, the data level of the current point is set to level 0; otherwise, the data level of the current point is set to level 1.

[0086] where v i and v i-1 are respectively the speeds of the i-th and (i - 1)-th data sets, and v this a preset speed threshold, taking 1 knot. cog i and cog i-1 are the track headings of the i-th and (i - 1)-th data sets, cog th is a preset track heading threshold, taking 5 degrees. hdg i and hdg i-1 are the bow headings of the i-th and (i - 1)-th data sets, hdg th is a preset bow heading threshold, taking 5 degrees.

[0087] Embodiment 2

[0088] This embodiment elaborates on the data compression algorithm of the present invention in combination with specific ship data.

[0089] As Figure 3 shown, in this embodiment, a ship (MMSI number "413867345") sails a certain distance at sea. The initial point is numbered 0. When passing through positions 1 - 20, it sends AIS messages to the AIS mobile base station respectively. The AIS mobile base station obtains the AIS messages of the ship through the AIS module.

[0090] 1. Compression process of the first position data

[0091] a. Data extraction and regularization

[0092] The AIS mobile base station extracts the data from the received AIS message (message No. 18) and regularizes it according to the ship parameters to form a data set. For example, after the AIS mobile base station receives the message of the first position, the sorted data set is shown in Table 2 below.

[0093] Table 2

[0094]

[0095] b. Filtering

[0096] b1. Time interval calculation

[0097] The currently obtained data set with the same MMSI code and the historical data set are numbered in chronological order. The data set with serial number 0 in the table is the initial data set, representing the initial position of the ship. The serial number of the message received at the first position is 1. Find the initial data set closest to the current point, that is, the time of the first data set, as the reference data. If no new message is received, the current point is the initial point. If no reference data can be found, the process ends.

[0098] Compare the first data set with the initial data set. Calculate the time interval, t1 - t0 = 1min. It can be seen that the time interval is less than the first threshold of 10min, so data filtering is performed.

[0099] b2. Position filtering

[0100] The calculation process is as follows:

[0101] (1) Theoretical speed value v std , v std = max(v0, v1)+v Δ = 15.3 (kn)

[0102] (2) Theoretical maximum range d max , d max = v std ·(t1 - t0)= 0.255 (nm)

[0103] Theoretical minimum range d min = 0.1 (nm).

[0104] (3) Calculate the distance d1 between two points through the following formula

[0105] d1 = arccos(sinlat1sinlat0 + coslat1coslat0cos(lon1 - lon0))×R

[0106] = 0.0052 (nm)

[0107] (4) Compare the data: d1 < d min , determine that the ship is in the anchored state, and delete the first dataset.

[0108] Since the dataset at the first position is deleted, the historical dataset still only has the data with the initial point number 0, and this round of data compression process ends.

[0109] The AIS mobile base station continues to receive AIS messages, and makes a determination for each received AIS message. The determination result is that the dataset at the second position is deleted during position filtering, the dataset at the third position is retained as data level 1, the datasets at the fourth to sixth positions are deleted during collinearity filtering, and the dataset at the seventh position is temporarily retained. The following details the compression process for the dataset at the eighth position.

[0110] 2. Compression process for the dataset at the eighth position

[0111] a. Data extraction and regularization

[0112] The AIS mobile base station extracts the AIS messages at the eighth position received and regularizes them according to the ship parameters to form a dataset.

[0113] b. Filtering

[0114] The data sets at the 8th position and the historical data set are numbered in chronological order. After several rounds of data compression, the data in the historical data set at this time are the initial data set, the data set at the 3rd position, and the data set at the 7th position, as shown in Table 3 below.

[0115] Table 3

[0116]

[0117] b1. Time interval calculation

[0118] Compare the time interval between the 3rd point (the data with serial number 3 in Table 3) and the 2nd point (the data with serial number 2 in Table 3). t3 - t2 = 1 min. It can be seen that the time interval of 1 min is less than the first threshold of 10 min, so data filtering is performed.

[0119] b2. Location filtering

[0120] Through calculation, d min <d3 < d max , the data is retained.

[0121] b3. Collinearity filtering

[0122] Determine the speed difference between the 3rd point and the 2nd point: |v i -v i-1 | = 0 < 1 kn, so collinearity filtering is performed.

[0123] (1) Connect the positions of the 1st point and the 2nd point to form a line, and calculate the perpendicular point coordinates (lon s , lat s ) of the 3rd point to the line.

[0124] lon s = (Δlon + tanθΔlat) / (1 + tan 2 θ) + lon i-2 = 24.3818°N

[0125] lat s = (Δlat + cotθΔlon) / (1 + cot 2 θ) + lat i-2 = 118.2590°E

[0126] ==(2) Calculate the distance h3 from the 3rd point to the perpendicular point.

[0127] h3 = arccos(sinlat3sinlat s + coslat3coslat s cos(lon3 - lon s )) × R

[0128] = 0.00005 (nm) = 0.0926 m

[0129] (3) It is obtained that h3 < 10 m (the second threshold), so it is determined that the three points of the 3rd point, the 2nd point, and the 1st point are collinear. Then, the 2nd data set is deleted, the data is renumbered, Table 4 is obtained, and then the process c is entered.

[0130] Table 4

[0131]

[0132] c. Data level compression

[0133] Judgment of the traffic warning line. If it is determined that the monthly traffic of the IoT card to which the ship equipment belongs is higher than the traffic warning line, data level filtering is performed:

[0134] |v2 - v1| = |10 kn - 5 kn| = 5 kn > 1 kn, |cog2 - cog1| = |155° - 135°| = 20° > 5°, |hdg i -hdg i-1 | = |180.3° - 134.9°| = 45.4° > 5°

[0135] Then, the data level of the 2nd point is set to level 1, that is, all parameters of the 2nd data set in Table 4 are retained. The data compression process of this round ends.

[0136] The position data of 20 points are compressed in sequence, and the deletion situation of the data set is shown in Table 5 below.

[0137] Table 5

[0138]

[0139]

[0140]

[0141] As can be seen from Table 5, among the original message data of 20 positions, after being compressed by the present invention, only 5 pieces of data remain. Moreover, for the message data at the 20th position, since the level is 0, three ship parameters are discarded, greatly compressing the data volume and reducing the transmission of unnecessary redundant information.

[0142] Embodiment 3

[0143] This embodiment discloses a data transmission method for an AIS mobile base station, including the following steps:

[0144] S1. Data compression

[0145] Adopt the AIS mobile base station data compression algorithm of Embodiment 1 to compress the message data of AIS.

[0146] S2. Data upload

[0147] The AIS mobile base station determines the time interval between the current time and the previous data upload. If the time interval does not exceed the preset third threshold (the third threshold is taken as 10 min), the current data is cached and the process ends. Otherwise, all the cached data is grouped according to the data level, respectively spliced into a bit string in a compact format, and uploaded to the server in batches after compression.

[0148] After the server receives the data, it decompresses the data into a bit string; the server groups the data according to the MMSI encoding, arranges them in chronological order respectively, and fills in the remaining ship parameters with missing data level 0 to the same values as the ship parameters of the previous other data level.

[0149] For the data set at the 20th position of data level 0 in Table 5 of Embodiment 2, the server fills in the speed, heading, and course over ground data with the data of the data set at the 18th position of the previous level 1: speed v = 15 kn, heading (hdg) = 180.1°, course over ground (cog) = 180°.

[0150] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. AIS mobile base station data compression algorithm, characterized in that: It includes the following processes: a. Data extraction and regularization The AIS mobile base station extracts data from the received AIS messages and regularizes them according to ship parameters to form a data set. Different data levels are set for the ship parameters according to their importance. The data levels at least include data level 0 and data level 1; b. Filtering The current data set with the same MMSI code obtained is sequentially numbered with the historical data set in chronological order, and the previous data set closest to the time of the current data set is found; if the previous data cannot be found, the process ends; Calculate the time interval between the current data set and the previous data set. If the time interval is greater than or equal to a preset first threshold, directly enter process c; If the time interval is less than the preset first threshold, data filtering is performed. If it is determined through filtering that the data set does not need to be retained, the current data set is directly deleted and the process ends; If it is determined through filtering that the data set needs to be retained, enter process c; c. Data level compression Compare the change amounts of several parameters such as the speed, course over ground, and heading of the current data set's position with those of the previous data set's position to determine the change in the ship's position trajectory. If the change in the position trajectory is within the preset range, set the level of the current data set to level 0; otherwise, set the data level of the current point to other levels; retain the ship parameters under the data level and delete the remaining ship parameters; The data set after the above processes a - c forms a historical data set. The AIS mobile base station receives new AIS messages and repeats the above processes a - c for data compression.

2. The AIS mobile base station data compression algorithm according to claim 1, characterized in that: Before process c, a traffic warning line determination is first performed to determine whether the monthly traffic of the Internet of Things card to which the ship equipment belongs is lower than the traffic warning line. If it is lower than the traffic warning line, set the data level of the current point to level 0, compress the ship parameters of data level 0, delete the remaining ship parameters, and end the process; if it is higher than the traffic warning line, perform process c.

3. The AIS mobile base station data compression algorithm according to claim 1, characterized in that: In process c, the method for determining that the change in the position trajectory of the ship is within a preset range is as follows: simultaneously satisfying , , , where and are the speeds of the i-th and (i - 1)-th data sets respectively, is the preset speed threshold; and are the track directions of the i-th and (i - 1)-th data sets, is the preset track direction threshold; and are the headings of the i-th and (i - 1)-th data sets, is the preset heading threshold, then the data level of the current point is set to level 0.

4. The AIS mobile base station data compression algorithm according to claim 1, wherein: The data filtering method in process b includes position filtering or / and collinearity filtering; The position filtering, i.e., the distance between the longitude and latitude of the i-th data set and the (i-1)-th data set and the theoretical maximum voyage and the theoretical minimum voyage are compared. If it is determined that a data error has occurred, and this i-th data set is deleted; if the distance it is determined that the ship is at anchor, and the i-th data set is deleted; For the collinearity filtering, that is, compare the position of the i-th data set, namely the i-th point, with the position of the (i - 1)-th data set, namely the (i - 1)-th point, and the position of the (i - 2)-th data set, namely the (i - 2)-th point. If the perpendicular distance from the i-th point to the line connecting the (i - 1)-th point and the (i - 2)-th point is less than a preset second threshold, consider the three points collinear and delete the data of the (i - 1)-th data set; if the data of the (i - 1)-th data set is deleted, re-number the data sets with the same MMSI code and then enter process c.

5. The AIS mobile base station data compression algorithm according to claim 4, wherein: The steps of the position filtering are as follows: (1) Calculate the theoretical speed value according to the following formula , Among them, is the fluctuation value, is the initial speed, is the speed at the i-th point; (2)Calculate the theoretical maximum range according to the following formula and determine a theoretical minimum range ; t i 、t i-1 are the times of the i-th point and the (i - 1)-th point respectively, and the theoretical minimum voyage is taken as 0.1 nautical miles; (3) Calculate the distance between the i-th point and the (i - 1)-th point by the following formula , Wherein, and are the latitude coordinates of the i-th point and the (i - 1)-th point respectively, are the longitude coordinates of the i-th point and the (i - 1)-th point respectively, and R is the value of the Earth's radius; (4) Compare data: If it is determined that a data error has occurred, and the i-th data set is deleted; if the distance it is determined that the ship is at anchor, and the i-th data set is deleted.

6. The AIS mobile base station data compression algorithm according to claim 4, characterized in that: Determine the speed difference between the i-th point and the (i - 1)-th point: If , then no collinearity filtering is performed. If , then collinearity filtering is performed; The steps of the collinearity filtering are as follows: (1) Connect the position of the (i - 1)-th point and the (i - 2)-th point to form a connecting line, and calculate the coordinates of the perpendicular point from the i-th point to the connecting line ( ) wherein are respectively the longitude and latitude of the vertical point, are respectively the longitude and latitude of the i-th point, are respectively the longitude and latitude of the (i - 1)-th point, are respectively the longitude and latitude of the (i - 2)-th point; (2)Calculate the distance from the i-th point to the foot of the perpendicular Where R is the value of the earth's radius; (3)Determine h i whether it is less than a preset second threshold. If it is less than the second threshold, consider the three points as collinear and delete the data of the (i - 1)-th dataset.

7. The AIS mobile base station data compression algorithm according to any one of claims 1 to 6, characterized in that: The format of the described dataset is , where represent MMSI, time, longitude coordinate, latitude coordinate, speed over ground, true heading, course over ground, and relative time respectively. The relative time , where t0 is the initial time.

8. The AIS mobile base station data compression algorithm according to claim 7, wherein: The data set is divided into two data levels: namely data level 0 and data level 1. Data level 0 includes ship parameters: MMSI code, relative time, longitude coordinate, latitude coordinate; data level 1 includes ship parameters: MMSI code, relative time, longitude coordinate, latitude coordinate, speed, heading, course over ground.

9. A data transmission method for an AIS mobile base station, characterized in that, It includes the following steps: S1. Data Compression Adopt the AIS mobile base station data compression algorithm described in any one of claims 1 to 8 to compress the message data of AIS; S2. Data Upload The AIS mobile base station determines the time interval between the current time and the time of the last data upload. If the time interval does not exceed the preset third threshold, the current data is cached and the process ends. Otherwise, all cached data is grouped by data level, respectively spliced into a bit string in a compact format, and uploaded to the server in batches after compression.

10. The data transmission method of the AIS mobile base station according to claim 9, characterized in that: After receiving the data, the server decompresses the data into a bit string; the server groups the data according to the MMSI encoding, arranges them in chronological order respectively, and completes the remaining ship parameters with missing data level 0 to the same values as the ship parameters of the previous other data levels.

Citation Information

Patent Citations

  • Ship trajectory compression method based on course and navigational speed change rate

    CN110990504A

  • Self-adaptive threshold compression ship track compression method

    CN111353010A