Prediction method, device and equipment for ship traffic flow

By acquiring and processing real-time traffic flow and weather data of ship waterways, using multi-layer neural network models for decomposition and prediction, the problem that the existing technology fails to consider the impact of adverse weather is solved, and traffic flow prediction in adverse weather is achieved. Ensures the convenience of safe navigation of ships and maritime traffic management.

CN119066414AActive Publication Date: 2024-12-03交信北斗科技有限公司 +1
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202410930465.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-12-03
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

The existing ship traffic flow prediction methods fail to effectively consider the impact of adverse weather on traffic flow, resulting in the inability to meet the actual scenario needs, affecting the safe navigation of ships and maritime traffic management.

Method used

By obtaining real-time traffic flow data and weather factor data of the ship's waterway, determining the target traffic flow characteristic data, and inputting it into the preset decomposition layer, intermediate layer and prediction layer for processing, using a multi-layer neural network model for decomposition and prediction, Extract regularity, residual and weather impact terms to make traffic flow prediction.

Benefits of technology

It achieves stable and accurate traffic flow forecasts under adverse weather conditions, helps ensure safe navigation of ships and facilitates maritime traffic management and scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066414A_ABST
    Figure CN119066414A_ABST
Patent Text Reader

Abstract

The invention provides a ship traffic flow prediction method, device and equipment. The method comprises the following steps: acquiring real-time traffic flow data and real-time weather factor data of a ship channel; determining target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data; inputting the target traffic flow feature data into a decomposition layer of a target traffic flow prediction model for decomposition processing to obtain a plurality of feature data sequences; inputting the plurality of feature data sequences into an intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate layer processing result; and inputting the intermediate layer processing result into a prediction layer of the target traffic flow prediction model to carry out traffic flow prediction processing so as to obtain a ship traffic flow prediction result. According to the scheme of the invention, traffic flow prediction under the influence of bad weather can be realized, the traffic flow can be stably and accurately predicted under the influence of bad weather, safe navigation of ships can be guaranteed, and maritime traffic management and scheduling are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship traffic flow prediction, and in particular to a ship traffic flow prediction method, device and equipment. Background Art

[0002] Maritime trade is the main form of trade, but existing transportation facilities are increasingly struggling to cope with the growing and complex traffic flow, making traditional maritime traffic management and dispatch difficult. On the other hand, collisions, groundings, oil leaks and other traffic accidents caused by irregular ship operation have occurred frequently, and how to ensure the safe navigation of ships is also a major problem.

[0003] Based on reliable and reasonable traffic forecast data, it can provide an important working basis for the traffic organization and optimization of ports and important waterways. Ship traffic flow forecast can provide a basis for maximizing the navigation capacity of waterways and provide a theoretical basis for improving traffic efficiency and traffic safety. However, the existing traffic flow forecasting methods do not consider the impact of bad weather on traffic flow and cannot meet the needs of actual scenarios. Summary of the invention

[0004] The present invention provides a method, device and equipment for predicting ship traffic flow, which can realize traffic flow prediction under the influence of adverse weather, stably and accurately predict traffic flow under the influence of adverse weather, help to ensure the safe navigation of ships, and facilitate maritime traffic management and scheduling.

[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0006] A method for predicting ship traffic flow, comprising:

[0007] Obtain real-time traffic flow data for ship channels and real-time weather factor data;

[0008] Determining target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data;

[0009] Inputting the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences;

[0010] Inputting the plurality of characteristic data sequences into the intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate layer processing result;

[0011] The intermediate layer processing result is input into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain the ship traffic flow prediction result; wherein the decomposition layer of the target traffic flow prediction model is trained according to the first preset network model, the intermediate layer is trained according to the second preset network model and the third preset network model, and the prediction layer is trained according to the fourth preset network model.

[0012] Optionally, determining target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data includes:

[0013] By formula:

[0014]

[0015] Obtaining a correlation coefficient between the weather factor data and the real-time traffic flow data;

[0016] The real-time traffic flow data with a correlation coefficient greater than a preset value is determined as target traffic flow characteristic data;

[0017] Among them, ρ X,Y is the correlation coefficient, and the sequence of the weather factor data is: X=[X1,X2,…,X N ]; is the mean of the elements in the sequence X, X i is an element in the sequence X; the sequence of the real-time traffic flow data is: Y = [Y1, Y2, ..., Y N ]; is the mean of the elements in the sequence Y, i is the element in sequence Y, and N is the number of elements in sequence X or sequence Y.

[0018] Optionally, the target traffic flow characteristic data is input into a decomposition layer of a target traffic flow prediction model for decomposition processing to obtain a plurality of characteristic data sequences, including:

[0019] The target traffic flow characteristic data is input into the decomposition layer of the target traffic flow prediction model, according to y(t)=f(t)+r(t)=exp(g'(t)+h'(t))+s(t+ε t Perform decomposition processing to obtain a regularity component characteristic data sequence and a residual component characteristic data sequence;

[0020] in,

[0021] y(t) represents the target traffic flow characteristic data; f(t) represents the regularity component; r(t) represents the residual component; g(t) represents the trend term; s(t) represents the season term; h(t) represents the weather influence term; ε tRepresents singular terms that cannot be fitted.

[0022] Optionally, the plurality of characteristic data sequences are input into an intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate layer processing result, including:

[0023] Inputting the regularity component feature data sequence into the first processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a first intermediate layer processing result;

[0024] The regularity component feature data sequence and the residual component feature data sequence are input into the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result.

[0025] Optionally, the regularity component feature data sequence is input into a first processing module of an intermediate layer of the target traffic flow prediction model for processing to obtain a first intermediate layer processing result, including:

[0026] The regularity component feature data sequence is input into the time series prediction unit of the first processing module of the intermediate layer of the target traffic flow prediction model for processing, and the obtained processing result is used as the first intermediate layer processing result.

[0027] Optionally, the regularity component feature data sequence and the residual component feature data sequence are input into a second processing module of an intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result, including:

[0028] Inputting the regularity component feature data sequence and the residual component feature data sequence into the encoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate vector;

[0029] The intermediate vector is input into the decoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result.

[0030] Optionally, the intermediate layer processing result is input into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain a ship traffic flow prediction result, including:

[0031] The intermediate layer processing result is input into the shallow fully connected neural network unit of the prediction layer of the target traffic flow prediction model for feature fitting processing to obtain the ship traffic flow prediction result.

[0032] The present invention also provides a device for predicting ship traffic flow, comprising:

[0033] An acquisition module is used to acquire real-time traffic flow data and real-time weather factor data of ship channels;

[0034] A processing module is used to determine target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data; input the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences; input the multiple characteristic data sequences into the intermediate layer of the target traffic flow prediction model for processing to obtain intermediate layer processing results; input the intermediate layer processing results into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain ship traffic flow prediction results; wherein the decomposition layer of the target traffic flow prediction model is trained according to the first preset network model, the intermediate layer is trained according to the second preset network model and the third preset network model, and the prediction layer is trained according to the fourth preset network model.

[0035] The present invention also provides a computing device, comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed.

[0036] The present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above.

[0037] The above solution of the present invention includes at least the following beneficial effects:

[0038] The above scheme of the present invention obtains real-time traffic flow data and real-time weather factor data of the ship channel; determines the target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data; inputs the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences; inputs the multiple characteristic data sequences into the middle layer of the target traffic flow prediction model for processing to obtain the middle layer processing results; inputs the middle layer processing results into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain the ship traffic flow prediction results; it can realize traffic flow prediction under the influence of adverse weather, stably and accurately predict traffic flow under the influence of adverse weather, help to ensure the safe navigation of ships, and facilitate maritime traffic management and scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a flow chart of a method for predicting ship traffic flow provided by an embodiment of the present invention;

[0040] Figure 2 It is a basic classification diagram of waterway traffic flow;

[0041] Figure 3 is a neural network structure diagram of a target traffic flow prediction model provided by an embodiment of the present invention;

[0042] Figure 4 is a schematic diagram of a neural network structure of a second processing module in a target traffic flow prediction model provided by an embodiment of the present invention;

[0043] Figure 5 is a neural network structure diagram of a recurrent neural network unit provided in an embodiment of the present invention;

[0044] Figure 6 A module diagram of a device for predicting ship traffic flow provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0046] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting ship traffic flow, comprising:

[0047] Step 11, obtaining real-time traffic flow data and real-time weather factor data of the ship channel;

[0048] Step 12, determining target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data;

[0049] Step 13, inputting the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences;

[0050] Step 14, inputting the plurality of characteristic data sequences into the middle layer of the target traffic flow prediction model for processing to obtain the middle layer processing result;

[0051] Step 15, inputting the intermediate layer processing result into the prediction layer of the target traffic flow prediction model to perform traffic flow prediction processing to obtain a ship traffic flow prediction result;

[0052] Among them, the decomposition layer of the target traffic flow prediction model is trained according to the first preset network model, the intermediate layer is trained according to the second preset network model and the third preset network model, and the prediction layer is trained according to the fourth preset network model.

[0053] In this embodiment, real-time traffic flow data and real-time weather factor data of the ship channel are obtained; according to the correlation between the weather factor data and the real-time traffic flow data, the target traffic flow characteristic data is determined; the target traffic flow characteristic data is input into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences; the multiple characteristic data sequences are input into the middle layer of the target traffic flow prediction model for processing to obtain the middle layer processing results; the middle layer processing results are input into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain the ship traffic flow prediction results; it is possible to realize traffic flow prediction under the influence of adverse weather, stably and accurately predict traffic flow under the influence of adverse weather, help to ensure the safe navigation of ships, and facilitate maritime traffic management and scheduling.

[0054] In an embodiment of the present invention, the ship traffic flow may include at least one of the following indicators:

[0055] (1) Traffic flow trajectory: the trajectory of ships in the waterway;

[0056] (2) Traffic flow speed: the average speed of ships traveling in different areas of the waterway and at different time periods;

[0057] (3) Traffic flow density: the number of ships traveling within a unit of waterway space, which can objectively reflect the congestion of the waterway;

[0058] (4) Traffic flow width: the width of the route occupied by the macroscopic ship traffic flow in different time periods and different regions;

[0059] (5) Traffic flow: the number of ships in a waterway per unit time, or the number of ships passing through a gate line per unit time.

[0060] like Figure 2 The figure below shows the basic classification of waterway traffic flow. When counting the number of ships, it is necessary to consider the spatial characteristics of the waterway. However, the waterway in actual conditions is more complex. When conducting analysis and prediction, it is necessary to consider whether there are intersections, diversions, temporary turns, etc. of ships.

[0061] The traffic flow prediction result can be the prediction of the future ship traffic volume at one or more time steps τ, which can be expressed as:

[0062] I 1:T =[I1,I2,I3,...,I n ]→I τ | V=0 ;

[0063] In the formula, V=0.

[0064] In an optional embodiment of the present invention, the cross-sectional traffic volume is used as the target, and the cross-sectional traffic volume refers to the total number of ships passing through the waterway and the coastal navigation zone within a given time; specifically, the ship flow passing through the cross section every 30 minutes is taken to construct a data set;

[0065] The process of acquiring real-time traffic flow data of ship channels includes:

[0066] Obtain AIS (Automatic Identification System) data of ships in the ship channel;

[0067] According to the AIS data of the ship, real-time traffic flow data of the ship channel is obtained.

[0068] In this embodiment, the AIS data of the ship includes: the Maritime Mobile Service Identification Number (MMSI), latitude, longitude, speed, length, type and true heading of the ship;

[0069] Assume the coordinates of observation point A are (x a ,y a ), the coordinates of point B are (x b ,y b ), the latitude and longitude coordinates of the ship obtained from the record are (x, y);

[0070] Data cleaning: discard abnormal records and only keep records that satisfy speed≥0, 0≤trueheading<360, length>0;

[0071] Position judgment: Let S = (x a -x)(y b -y)-(y a -y)(x b -x), if S<0, the ship position is considered to be on the left side of the observation line AB, otherwise it is on the right side; the function S is calculated for all records, and the records that satisfy S<0 are saved in the set L, and the rest are saved in the set R;

[0072] Time statistics: Divide all records of L and R into 30-minute intervals, and obtain 31*24*2 small sets in each group; the divided sets are recorded as L=[L1,L2,...L 31*24*2 ] and R=R1,R2,...R 31*24*2 ];

[0073] Get the passing set: "Passing" is defined as: within a given time period, both sets L and R have records with the same MMSI number (that is, they belong to the same ship); the passing set is obtained by taking the intersection of the two sets L and R, that is, PASS i =L i ∩R i ; where i is the number of the time period, PASS i Indicates the MMSI numbers of all ships that cross the observation line during the time period; each MMSI number corresponds to a ship, and the duplicate MMSI numbers are removed to obtain a unique crossing set;

[0074] Traffic volume conversion: for PASS i All ships are converted to standard traffic volume according to the conversion coefficients in Table 1, and the sum is calculated to obtain the final traffic volume; the operation of obtaining the crossing set and converting the standard traffic volume is repeated to obtain the passing traffic volume of all time periods;

[0075] Table 1 Ship type coefficient conversion table

[0076] Ship tonnage (t) Length(m) Conversion factor <100 <30 0.25 100-499 30-49 0.5 500-2999 50-89 1 3000-5999 90-114 1.18 6000-9999 115-134 1.41 10000-19999 135-169 2 20000-29999 170-194 2.25 30000-39999 195-214 2.5 40000-59999 215-245 3 >60000 >245 4

[0077] Denoising and stabilization: Wavelet smoothing algorithm is used to reduce the noise of traffic data and improve its smoothness;

[0078] Through the above process, the total number of ships passing through the waterway and the coastal navigation zone within a given time, that is, the end traffic volume, is obtained as the real-time traffic flow data of the ship channel.

[0079] In an optional embodiment of the present invention, the acquisition interval of the real-time traffic flow data of the ship channel is 30 minutes, and the acquisition interval of the real-time weather factor data is 3 hours or 1 hour. The real-time weather factor data is preprocessed and converted to a unified 30-minute interval data. The original sampling interval of the meteorological sequence is large, so the missing data needs to be repaired; the real-time weather factor data is filled by cubic spline interpolation:

[0080] 1) For the given n+1 ordered points (x0, y0)...(x n ,y n ) is divided into n intervals, S i (x) is the function that fits the interval;

[0081] 2) For each boundary point of the interval, for any i, the interpolation condition S(x i )=y i ;

[0082] 3) S(x) is smooth and continuous, and both the first-order and second-order derivatives exist at each point;

[0083] Based on the above, the function of the i-th interval is:

[0084] S i (x) = a i +b i (xx i )+c i (xx i ) 2 +d i (xx i ) 3 ;

[0085] S' i (x) = b i +2c i (xx i )+3d i (xx i ) 2 ;

[0086] S” i (x) = 2c i +6d i (xx i );

[0087] Among them, a, b, c, d are polynomial coefficients;

[0088] m i =S” i (x), h i =x i+1 -x i ; It can be seen that h i By i+1 Draw out; c i and d i By m i and h i roll out;

[0089] When a natural boundary is specified (the second-order derivatives of both end points are 0), the solution process of the function is:

[0090]

[0091] After the above steps, a fitting curve is obtained, completing the processing and conversion of real-time weather factor data.

[0092] In an optional embodiment of the present invention, step 12 includes:

[0093] Step 121, by formula:

[0094]

[0095] Obtaining a correlation coefficient between the weather factor data and the real-time traffic flow data;

[0096] Step 122, determining the real-time traffic flow data with a correlation coefficient greater than a preset value as target traffic flow characteristic data;

[0097] Among them, ρ X,Y is the correlation coefficient, and the sequence of the weather factor data is: X=[X1,X2,…,X N ]; is the mean of the elements in the sequence X, X i is an element in the sequence X; the sequence of the real-time traffic flow data is: Y = [Y1, Y2, ..., Y N ]; is the mean of the elements in the sequence Y, i is the element in sequence Y, and N is the number of elements in sequence X or sequence Y.

[0098] In this embodiment, in actual processes, weather factors have different effects on traffic flow. In order to accurately obtain traffic flow data under the influence of weather factors, the correlation coefficient between weather factors such as rainfall, wind speed, temperature, visibility and traffic flow is obtained through the above formula;

[0099] Specifically, a correlation coefficient less than 0.1 indicates no correlation, a correlation coefficient greater than 0.1 and less than 0.3 indicates weak correlation, a correlation coefficient greater than 0.3 and less than 0.5 indicates correlation, and a correlation coefficient greater than 0.5 indicates strong correlation. In this embodiment, the implemented traffic flow data with a correlation coefficient greater than 0.3 is determined as the target traffic flow characteristic data.

[0100] In an optional embodiment of the present invention, step 13 includes:

[0101] Step 131, input the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model, according to y(t)=f(t)+r(t)=exp(g'(t)+h'(t))+s(t+ε t Perform decomposition processing to obtain a regularity component characteristic data sequence and a residual component characteristic data sequence;

[0102] in,

[0103] y(t) represents the target traffic flow characteristic data; f(t) represents the regularity component; r(t) represents the residual component; g(t) represents the trend term; s(t) represents the season term; h(t) represents the weather influence term; ε t represents the singular terms that cannot be fitted and can be considered as Gaussian white noise.

[0104] In this embodiment, the decomposition formula is: y(t)=g(t)+s(t)+h(t)+εt Transform and obtain the first decomposition: y(t)=g(t)*(1+h(t))+s(t)+ε t ; Perform logarithmic transformation on the first decomposition formula to obtain the decomposition formula of the present application; by processing the decomposition formula of the present application, the calculation accuracy can be improved, and the loss of value transmission between subsequent layers can be reduced;

[0105] According to y(t)=f(t)+r(t)=exp(g'(t)+h'(t))+s(t)+ε t Decomposition processing is performed to obtain a regularity component characteristic data sequence and a residual component characteristic data sequence; y(t) is the value of the target traffic flow characteristic data at time t;

[0106] Trending items:

[0107] g(t)=-k(t)(tm(t))

[0108] Among them, k(t) is the growth rate function; m(t) is the compensation rate function;

[0109]

[0110] m(t)=m+a(t) T γ;

[0111] Where k is the growth rate; the growth rate changes at a specific time node j∈{1,2,...,n}; for a sequence y(t) of length N, the specific time node is set at the At the equal division point; the rate of change at node j is δ j ; a(t)=[a1(t),...a n (t)] T ,sta j ∈{0,1};γ=[γ1,γ2,...γ n ], and γ j =-s j δ j ;

[0112] Among them, δ j It obeys the Laplace distribution Laplace(0,τ), and its probability density function is:

[0113]

[0114] Considering the needs of subsequent prediction tasks, since no new change points are added, k(t) remains unchanged, which will reduce the uncertainty of the prediction and thus reduce the prediction accuracy. To ensure the prediction accuracy, the future change point distribution is obtained through maximum likelihood estimation.

[0115] The results of the maximum likelihood estimation are as follows:

[0116]

[0117] Future change points are randomly distributed with the following probabilities:

[0118]

[0119] The fitting of g(t) is completed by setting n, k, m and τ;

[0120] Seasonal items:

[0121] s(t) = X(t)β;

[0122] in, β=[a1,b1,...,b n ] T , β has a mean of 0 and a variance of σ 2 Normal distribution of; P is the period;

[0123] Weather influence items:

[0124] Assume that there are N weather impact items in the time period T, and the time period of each weather impact item is T i (1≤i≤N);

[0125] h(t)=Z(t)κ;

[0126] where Z(t)=[1(t∈T1),0,...,1(t∈T2),...,1(t∈T N ),];κ~Normal(0,v 2 ); specifically, v 2 The larger the value of is, the greater the impact of the emergency event on the entire model, and vice versa. In this embodiment, the impact of the emergency event of meteorological factors is mainly considered, so v is set 2 =0.7.

[0127] In this embodiment, one of the difficulties of the ship traffic flow prediction problem lies in its "plausible" periodicity and trend: the sequence itself has a fixed upward or downward trend, and a more obvious periodic characteristic can be observed when calculated on a daily, weekly, or monthly basis, but the specific periodic properties keep changing all the time; in order to facilitate feature processing by the subsequent target traffic flow prediction model, the target traffic flow feature data is decomposed through the decomposition layer of the target traffic flow prediction model to extract the potential periodic changes in the target traffic flow feature data.

[0128] In an optional embodiment of the present invention, step 14 includes:

[0129] Step 141, inputting the regularity component feature data sequence into the first processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a first intermediate layer processing result;

[0130] Step 142: input the regularity component feature data sequence and the residual component feature data sequence into the second processing module of the middle layer of the target traffic flow prediction model for processing to obtain a second middle layer processing result.

[0131] In this embodiment, the middle layer of the target traffic flow prediction model is horizontally divided into two processing modules: a first processing module and a second processing module;

[0132] The first processing module uses a time series prediction unit, whose principle and processing process are the same as the decomposition layer of the target traffic flow prediction model;

[0133] The second processing module adopts a sequence-to-sequence model structure. The encoder unit and the decoder unit of the second processing module both adopt a double-layer multi-level recurrent neural network unit, and the first double-layer multi-level recurrent neural network unit of the encoder unit of the second processing module adopts an attention mechanism to output an intermediate vector, such as Figure 4 As shown;

[0134] Among them, the recurrent neural network unit adopts the GRU (gated recurrent unit) structure, as shown in the following figure: Figure 5 As shown in the figure, the GRU structure is simpler, with fewer parameters calculated during forward and backward propagation, and faster convergence;

[0135] The recurrent neural network unit includes: input layer, hidden layer and output layer; X t is the input unit; S t is a hidden unit; O t is the output unit; L t is the loss function; Y t is the true value; the weight parameter W of the hidden layer s It will be output to the next layer along with the input cycle; the input of the recurrent neural network unit is a time series: X = [X1, X2, ..., X n ]; the output is the prediction result; W represents the connection weight matrix between each unit; at time t, the state S of the hidden layer satisfies the following update method: S t =σ(X t ·W x +S t-1 ·W s +b s );

[0136] Among them, b s is the bias term; σ is the activation function, usually sigmoid or tanh;

[0137] The output at time t is: Q t =S t ·W o +b s ;

[0138] The predicted value output is:

[0139] The total loss function is:

[0140] The above is the forward propagation process of the recurrent neural network unit;

[0141] The calculation of each parameter is done by back propagation; where W o and b s Calculated by chain rule; where W s and W x Calculated by the derivative rule of multivariate functions;

[0142]

[0143] The GRU structure includes: reset gate and update gate;

[0144] The reset gate is used to control how much previous data is retained, using r t Represents the reset gate, when r t =0, it means forgetting all previous data and resetting to the state of the current input data;

[0145] r t =σ(W r x t +U r h t-1 +b r );

[0146] Where σ is the sigmoid function; x t is the input data; h t-1 is the candidate data of the previous moment; W r and U r is to reset the weight of the gate; b r To reset the gate bias;

[0147] The update gate is used to control the update and retention of data. t represents the update gate, when z t =0, it means to keep all previous data;

[0148] z t =σ(W z x t +U z h t-1 +bz );

[0149] Where σ is the sigmoid function; x t is the input data; h t-1 is the candidate data of the previous moment; W z and U z is the weight of the update gate; b r is the bias of the update gate;

[0150] Current candidate values:

[0151] r t is the data for resetting the gate; x t is the input data; h t-1 is the candidate data of the previous moment; W and U are learnable parameters; b is the bias; ⊙ is the element product;

[0152] Output data:

[0153] (1-z t )⊙h t-1 For previously retained data; For updated data;

[0154] Among them, the first double-layer multi-level recurrent neural network unit of the encoder unit of the second processing module adopts the attention mechanism to output the intermediate vector, and the intermediate vector is input into the decoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain the second intermediate layer processing result. The specific process is:

[0155] The encoder unit input of the second processing module is a multivariate sequence of length n and dimension k The output is a sequence y of length T t =[y1,y2,...,y T ], the hidden layer output of the encoder at time t is h t , the hidden state of the decoder is s t , the correlation between historical input and current moment is: e tj =a(s t-1 ,h j ), where a is the correlation function used to calculate s t-1 and h j The correlation between

[0156] For tj Perform softmax and regularization processing to quantize it into values ​​with a sum of 1 and unequal weights; thus obtaining the contribution of the historical sequence to the current moment:

[0157]

[0158] The intermediate vector is:

[0159] The next moment input of the decoder is: s t =f(s t-1 ,y t-1 ,c t );

[0160] The predicted output of the decoder is:

[0161] Where W is the weight, Represents the predicted value, act is the activation function, usually tanh.

[0162] In an optional embodiment of the present invention, step 141 includes:

[0163] Step 1411, input the regularity component feature data sequence into the time series prediction unit of the first processing module of the intermediate layer of the target traffic flow prediction model for processing, and the obtained processing result is used as the first intermediate layer processing result.

[0164] In this embodiment, the processing principle and process of the time series prediction unit of the first processing module of the intermediate layer of the target traffic flow prediction model are the same as the processing principle and process of the decomposition layer of the target traffic flow prediction model, and have been described in the above content and will not be repeated here.

[0165] In an optional embodiment of the present invention, step 142 includes:

[0166] Step 1421, inputting the regularity component feature data sequence and the residual component feature data sequence into the encoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate vector;

[0167] Step 1422: input the intermediate vector into the decoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result.

[0168] In this embodiment, the regularity component feature data sequence and the residual component feature data sequence are input into the input layer of the first double-layer multi-level recurrent neural network unit of the encoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model as the first input layer output result; the first input layer output result and the first input layer target parameter are input into the hidden layer of the first double-layer multi-level recurrent neural network unit of the encoder unit of the second processing module for processing to obtain the first hidden layer output result; the first hidden layer output result and the first hidden layer target parameter are input into the output layer of the first double-layer multi-level recurrent neural network unit of the encoder unit of the second processing module for processing, and the output result obtained is used as the intermediate vector;

[0169] The intermediate vector is input into the input layer of the second double-layer multi-level recurrent neural network unit of the decoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model as the second input layer output result; the second input layer output result and the second input layer target parameter are input into the hidden layer of the second double-layer multi-level recurrent neural network unit of the decoder unit of the second processing module for processing to obtain the second hidden layer output result; the second hidden layer output result and the second hidden layer target parameter are input into the output layer of the second double-layer multi-level recurrent neural network unit of the decoder unit of the second processing module for processing, and the output result obtained is used as the second intermediate layer processing result.

[0170] In an optional embodiment of the present invention, step 15 includes:

[0171] Step 151, input the intermediate layer processing result into the shallow fully connected neural network unit of the prediction layer of the target traffic flow prediction model for feature fitting processing to obtain the ship traffic flow prediction result.

[0172] In this embodiment, the first intermediate layer processing result and the second intermediate layer processing result are input into the input layer of the shallow fully connected neural network unit of the prediction layer of the target traffic flow prediction model as the input layer result, the input layer result and the first target parameter are input into the hidden layer of the shallow fully connected neural network unit of the prediction layer for processing to obtain the hidden layer result, the hidden layer result and the second target parameter are input into the output layer of the shallow fully connected neural network unit of the prediction layer for regression processing, and the output result obtained is used as the ship traffic flow prediction result. Specific embodiment:

[0174] Receive AIS data of ships in a certain waterway area and the local weather data;

[0175] Process the ship's AIS data to obtain real-time traffic flow data;

[0176] Process and convert meteorological data to obtain real-time weather factor data;

[0177] Obtaining a correlation coefficient between the weather factor data and the real-time traffic flow data;

[0178] The real-time traffic flow data with a correlation coefficient greater than a preset value is determined as target traffic flow characteristic data;

[0179] Inputting the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain a regularity component characteristic data sequence and a residual component characteristic data sequence;

[0180] Inputting the regularity component feature data sequence into the time series prediction unit of the first processing module of the intermediate layer of the target traffic flow prediction model for processing, and obtaining the processing result as the first intermediate layer processing result;

[0181] Input the regularity component feature data sequence and the residual component feature data sequence into the input layer of the first double-layer multi-level recurrent neural network unit of the encoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model as the first input layer output result; input the first input layer output result and the first input layer target parameter into the hidden layer of the first double-layer multi-level recurrent neural network unit of the encoder unit of the second processing module for processing to obtain the first hidden layer output result; input the first hidden layer output result and the first hidden layer target parameter into the output layer of the first double-layer multi-level recurrent neural network unit of the encoder unit of the second processing module for processing, and the obtained output result is used as the intermediate vector;

[0182] Input the intermediate vector into the input layer of the second double-layer multi-level recurrent neural network unit of the decoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model as the second input layer output result; input the second input layer output result and the second input layer target parameter into the hidden layer of the second double-layer multi-level recurrent neural network unit of the decoder unit of the second processing module for processing to obtain the second hidden layer output result; input the second hidden layer output result and the second hidden layer target parameter into the output layer of the second double-layer multi-level recurrent neural network unit of the decoder unit of the second processing module for processing, and the obtained output result is used as the second intermediate layer processing result;

[0183] The first intermediate layer processing result and the second intermediate layer processing result are input into the input layer of the shallow fully connected neural network unit of the prediction layer of the target traffic flow prediction model as the input layer result, the input layer result and the first target parameter are input into the hidden layer of the shallow fully connected neural network unit of the prediction layer for processing to obtain the hidden layer result, the hidden layer result and the second target parameter are input into the output layer of the shallow fully connected neural network unit of the prediction layer for regression processing, and the output result obtained is used as the ship traffic flow prediction result.

[0184] Aiming at two problems of short-term prediction of ship traffic flow: multi-step prediction and prediction under adverse weather conditions, a target traffic flow prediction model is proposed, which adopts a three-layer architecture; the influence of weather factors is quantified as an attenuation coefficient through the decomposition layer, and a feature-rich intermediate matrix is ​​constructed; through the intermediate layer composed of a first processing module consisting of a time series prediction unit and a second processing module consisting of a sequence-to-sequence model structure using an attention mechanism, the long-term and short-term characteristics of the traffic flow sequence and the nonlinear mapping relationship of multiple variables can be captured, which greatly improves the feature expression ability of the model in long and short sequence inputs; the target traffic flow prediction model of the present application has excellent versatility, can be applied to single-step prediction and multi-step prediction tasks, and can make reasonable and accurate predictions in adverse weather conditions.

[0185] like Figure 6 As shown, an embodiment of the present invention further provides a ship traffic flow prediction device 60, comprising:

[0186] An acquisition module 61 is used to acquire real-time traffic flow data and real-time weather factor data of a ship channel;

[0187] The processing module 62 is used to determine the target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data; input the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences; input the multiple characteristic data sequences into the intermediate layer of the target traffic flow prediction model for processing to obtain the intermediate layer processing results; input the intermediate layer processing results into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain the ship traffic flow prediction results; wherein the decomposition layer of the target traffic flow prediction model is trained according to the first preset network model, the intermediate layer is trained according to the second preset network model and the third preset network model, and the prediction layer is trained according to the fourth preset network model.

[0188] Optionally, determining target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data includes:

[0189] By formula:

[0190]

[0191] Obtaining a correlation coefficient between the weather factor data and the real-time traffic flow data;

[0192] The real-time traffic flow data with a correlation coefficient greater than a preset value is determined as target traffic flow characteristic data;

[0193] Among them, ρ X,Y is the correlation coefficient, and the sequence of the weather factor data is: X=[X1,X2,…,X N ]; is the mean of the elements in the sequence X, X i is an element in the sequence X; the sequence of the real-time traffic flow data is: Y = [Y1, Y2, ..., Y N ]; is the mean of the elements in the sequence Y, i is the element in sequence Y, and N is the number of elements in sequence X or sequence Y.

[0194] Optionally, the target traffic flow characteristic data is input into a decomposition layer of a target traffic flow prediction model for decomposition processing to obtain a plurality of characteristic data sequences, including:

[0195] The target traffic flow characteristic data is input into the decomposition layer of the target traffic flow prediction model, according to y(t)=f(t)+r(t)=exp(g'(t)+h'(t))+s(t+ε t Perform decomposition processing to obtain a regularity component characteristic data sequence and a residual component characteristic data sequence;

[0196] in,

[0197] y(t) represents the target traffic flow characteristic data; f(t) represents the regularity component; r(t) represents the residual component; g(t) represents the trend term; s(t) represents the season term; h(t) represents the weather influence term; ε t Represents singular terms that cannot be fitted.

[0198] Optionally, the plurality of characteristic data sequences are input into an intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate layer processing result, including:

[0199] Inputting the regularity component feature data sequence into the first processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a first intermediate layer processing result;

[0200] The regularity component feature data sequence and the residual component feature data sequence are input into the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result.

[0201] Optionally, the regularity component feature data sequence is input into a first processing module of an intermediate layer of the target traffic flow prediction model for processing to obtain a first intermediate layer processing result, including:

[0202] The regularity component feature data sequence is input into the time series prediction unit of the first processing module of the intermediate layer of the target traffic flow prediction model for processing, and the obtained processing result is used as the first intermediate layer processing result.

[0203] Optionally, the regularity component feature data sequence and the residual component feature data sequence are input into a second processing module of an intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result, including:

[0204] Inputting the regularity component feature data sequence and the residual component feature data sequence into the encoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate vector;

[0205] The intermediate vector is input into the decoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result.

[0206] Optionally, the intermediate layer processing result is input into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain a ship traffic flow prediction result, including:

[0207] The intermediate layer processing result is input into the shallow fully connected neural network unit of the prediction layer of the target traffic flow prediction model for feature fitting processing to obtain the ship traffic flow prediction result.

[0208] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.

[0209] The embodiment of the present invention further provides a computing device, including: a processor, a memory storing a computer program, and when the computer program is executed by the processor, the method described in the above embodiment is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0210] In an embodiment of the present invention, a computer-readable storage medium is further provided, which stores instructions, and when the instructions are executed on a computer, the computer executes the method described in the above embodiment. All implementations in the above method embodiment are applicable to this embodiment, and can also achieve the same technical effect.

[0211] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0212] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

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

[0215] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0216] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0217] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.

[0218] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.

[0219] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for predicting ship traffic flow, It is characterized in that include: Obtain real-time traffic flow data for ship channels and real-time weather factor data; Determining target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data; Inputting the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences; Inputting the plurality of characteristic data sequences into the intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate layer processing result; The intermediate layer processing result is input into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain the ship traffic flow prediction result; wherein the decomposition layer of the target traffic flow prediction model is trained according to the first preset network model, the intermediate layer is trained according to the second preset network model and the third preset network model, and the prediction layer is trained according to the fourth preset network model.

2. The method for predicting ship traffic flow according to claim 1, It is characterized in that According to the correlation between the weather factor data and the real-time traffic flow data, target traffic flow characteristic data is determined, including: By formula: Obtaining a correlation coefficient between the weather factor data and the real-time traffic flow data; The real-time traffic flow data with a correlation coefficient greater than a preset value is determined as target traffic flow characteristic data; Among them, ρ X,Y is the correlation coefficient, and the sequence of the weather factor data is: X = [X 1 ,X 2 ,…,X N ]; is the mean of the elements in the sequence X, X i is an element in the sequence X; the sequence of the real-time traffic flow data is: Y = [Y 1 ,Y 2 ,…,Y N ]; is the mean of the elements in the sequence Y, i is the element in sequence Y, and N is the number of elements in sequence X or sequence Y.

3. The method for predicting ship traffic flow according to claim 1, It is characterized in that The target traffic flow characteristic data is input into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences, including: The target traffic flow characteristic data is input into the decomposition layer of the target traffic flow prediction model, according to y(t)=f(t)+r(t)=exp(g'(t)+h'(t))+s(t+ε t Perform decomposition processing to obtain a regularity component characteristic data sequence and a residual component characteristic data sequence; in, y(t) represents the target traffic flow characteristic data; f(t) represents the regularity component; r(t) represents the residual component; g(t) represents the trend term; s(t) represents the season term; h(t) represents the weather influence term; ε t Represents singular terms that cannot be fitted.

4. The method for predicting ship traffic flow according to claim 3, It is characterized in that Inputting the plurality of characteristic data sequences into the intermediate layer of the target traffic flow prediction model for processing to obtain the intermediate layer processing result, including: Inputting the regularity component feature data sequence into the first processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a first intermediate layer processing result; The regularity component feature data sequence and the residual component feature data sequence are input into the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result.

5. The method for predicting ship traffic flow according to claim 4, It is characterized in that Inputting the regularity component feature data sequence into the first processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain the first intermediate layer processing result, including: The regularity component feature data sequence is input into the time series prediction unit of the first processing module of the intermediate layer of the target traffic flow prediction model for processing, and the obtained processing result is used as the first intermediate layer processing result.

6. The method for predicting ship traffic flow according to claim 4, It is characterized in that Inputting the regularity component feature data sequence and the residual component feature data sequence into the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain the second intermediate layer processing result, including: Inputting the regularity component feature data sequence and the residual component feature data sequence into the encoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain an intermediate vector; The intermediate vector is input into the decoder unit of the second processing module of the intermediate layer of the target traffic flow prediction model for processing to obtain a second intermediate layer processing result.

7. The method for predicting ship traffic flow according to claim 4, It is characterized in that Inputting the intermediate layer processing result into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain the ship traffic flow prediction result, including: The intermediate layer processing result is input into the shallow fully connected neural network unit of the prediction layer of the target traffic flow prediction model for feature fitting processing to obtain the ship traffic flow prediction result.

8. A device for predicting ship traffic flow, It is characterized in that include: An acquisition module is used to acquire real-time traffic flow data and real-time weather factor data of ship channels; A processing module is used to determine target traffic flow characteristic data according to the correlation between the weather factor data and the real-time traffic flow data; input the target traffic flow characteristic data into the decomposition layer of the target traffic flow prediction model for decomposition processing to obtain multiple characteristic data sequences; input the multiple characteristic data sequences into the intermediate layer of the target traffic flow prediction model for processing to obtain intermediate layer processing results; input the intermediate layer processing results into the prediction layer of the target traffic flow prediction model for traffic flow prediction processing to obtain ship traffic flow prediction results; wherein the decomposition layer of the target traffic flow prediction model is trained according to the first preset network model, the intermediate layer is trained according to the second preset network model and the third preset network model, and the prediction layer is trained according to the fourth preset network model.

9. A computing device, It is characterized in that include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is performed.

10. A computer-readable storage medium, It is characterized in that Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Ship flow prediction method based on improved EEMD-IndRNN

    CN110222826A

  • Short-term traffic flow prediction method based on time series decomposition

    CN111161538A

  • Traffic flow prediction method of deep network based on fusion of spatiotemporal features

    CN111243269A

  • Weather traffic correlation analysis system

    CN112102640A

  • Electricity sales prediction method and system based on load characteristics and model fusion

    CN112418545A