Waterway freight volume prediction method
By constructing a multi-scale historical water level sample and a prediction model combining meteorological factors, the problem of low prediction accuracy of water freight volume is solved, and water level prediction with higher accuracy and timeliness is achieved.
Patent Information
- Application Number
- CN202411496515.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has the problem of low prediction accuracy in water freight volume prediction, especially in integrating meteorological, environmental changes and historical water level data.
By constructing historical water level samples, including historical month water level sequences, historical matching water level sequences and neighborhood historical multi-day water level sequences, and using water level prediction models and water level change prediction models, combining predicting rainfall and temperature, water level predictions are carried out to finally determine the water path Freight volume.
It improves the accuracy and timeliness of water level prediction, and can more accurately predict water level changes in the short term, thereby more accurately determining water freight volume.
Smart Images

Figure CN119398251A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of waterway freight volume prediction, and in particular to a waterway freight volume prediction method. Background Art
[0002] The current prediction of water freight volume faces many challenges, especially in terms of how to effectively integrate meteorological, environmental changes and historical water level data. Existing technologies usually rely on simple statistical models or linear regression analysis, which often show low prediction accuracy when faced with continuously changing water levels and climate conditions. In addition, traditional water level prediction models often ignore the differences in local hydrological conditions and cannot fully capture the complex factors that affect water level fluctuations, such as rainfall, temperature changes and historical trends in water levels. Many existing methods fail to effectively integrate information from real-time weather forecasts, resulting in low accuracy in water freight volume prediction results. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, a method for predicting waterway freight volume provided by the present invention solves the problem of low accuracy of waterway freight volume prediction results in the prior art.
[0004] In order to achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a method for predicting waterway freight volume, comprising the following steps:
[0005] S1. Construct historical water level samples, where the historical water level samples include: historical monthly water level sequence, historical matching water level sequence and neighborhood historical multi-day water level sequence;
[0006] S2. Process the historical water level samples using the water level prediction model to obtain a first water level estimate;
[0007] S3, according to the predicted rainfall and predicted temperature between the time to be predicted and the current time, based on the water level change prediction model, obtain the changed water level;
[0008] S4, combining the current water level with the changed water level to obtain a second water level estimate, taking the average of the first water level estimate and the second water level estimate to obtain a predicted water level;
[0009] S5. Find the water freight volume based on the predicted water level.
[0010] Furthermore, the method for obtaining the historical monthly water level series in S1 is:
[0011] A1. Mark the month in which the prediction time is as the target month;
[0012] A2. Find the waterway water level in different historical target months and calculate the average waterway water level in different historical target months;
[0013] A3. The average water level of the waterway in the target month of each historical year is used to form a historical monthly water level sequence: X month ={x1, ..., x i , ..., x I}, where X month is the historical monthly water level sequence, x1 is the mean water level of the waterway in the target month of the first historical year, and x i is the mean water level of the waterway in the target month of the i-th historical year, x I is the mean water level of the waterway in the target month of the Ith historical year, i is a positive integer, and I is the number of historical years counted.
[0014] Furthermore, the method for obtaining the historical matching water level sequence in S1 is:
[0015] B1. Construct the water level of the waterway in the neighborhood of the current time for multiple consecutive days as a comparison water level vector;
[0016] B2, mark the neighborhood of the current time for multiple consecutive days as comparison time periods;
[0017] B3, extracting the waterway water level in the comparison time period of each historical year to form a historical candidate water level vector;
[0018] B4, calculating the similarity between the comparison water level vector and the historical candidate water level vector;
[0019] B5. Mark the historical year where the historical candidate water level vector with the greatest similarity is located to match the historical year;
[0020] B6. Mark the time period between the current time and the time to be predicted as the predicted time period;
[0021] B7. Find the multi-day waterway water level corresponding to the forecast time period from the matching historical years and obtain the historical matching water level sequence: R h,day = {r h,1 , ..., r h,n , ..., x h,N}, where R h,day is the historical matching water level sequence, r h,1 To match the waterway water level on the first day of the forecast period in the historical year, r h,n To match the waterway water level on day n in the forecast period of the historical year, r h,N To match the waterway water level on day N in the forecast period of the historical year, N is the length of the forecast period and n is a positive integer.
[0022] Furthermore, the method for obtaining the neighborhood historical multi-day water level sequence in S1 is: extract the neighborhood multi-day waterway water level at the current time, and construct the neighborhood historical multi-day water level sequence: R C,day = {r c,1, ..., r c,n , ..., x c,N}, where R c,day is the historical multi-day water level sequence of the neighborhood, r c,1 is the water level of the waterway on the first day within the neighborhood at the current time, r c,m is the water level of the waterway on the mth day within the neighborhood at the current time, r c,M It is the water level of the waterway on the Mth day within the neighborhood range of the current time, m is a positive integer, and M is the length of the selected neighborhood range.
[0023] Furthermore, the structure of the water level prediction model in S2 includes: a first sequence feature extraction channel, a second sequence feature extraction channel, a third sequence feature extraction channel, a first Concat layer, a second Concat layer, a first classification layer, a second classification layer and an output layer;
[0024] The input end of the first sequence feature extraction channel is used to input the historical monthly water level sequence; the input end of the second sequence feature extraction channel is used to input the historical matching water level sequence; the input end of the third sequence feature extraction channel is used to input the neighborhood historical multi-day water level sequence;
[0025] The input end of the first Concat layer is connected to the first output end of the first sequence feature extraction channel, the first output end of the second sequence feature extraction channel, and the first output end of the third sequence feature extraction channel respectively; the input end of the second Concat layer is connected to the second output end of the first sequence feature extraction channel, the second output end of the second sequence feature extraction channel, and the second output end of the third sequence feature extraction channel respectively; the input end of the first classification layer is connected to the output end of the first Concat layer; the input end of the second classification layer is connected to the output end of the second Concat layer; the input end of the output layer is connected to the output end of the first classification layer and the output end of the second classification layer respectively, and its output end serves as the output end of the water level prediction model.
[0026] Furthermore, the first sequence feature extraction channel, the second sequence feature extraction channel and the third sequence feature extraction channel all include: a convolution layer, a matrix construction layer, a maximum pooling layer, an average pooling layer, a first CNN network and a second CNN network;
[0027] The input end of the convolution layer serves as the input end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel, and its output end is connected to the input end of the matrix construction layer; the output end of the matrix construction layer is respectively connected to the input end of the maximum pooling layer and the input end of the average pooling layer; the input end of the first CNN network is connected to the output end of the maximum pooling layer, and its output end serves as the first output end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel; the input end of the second CNN network is connected to the output end of the average pooling layer, and its output end serves as the second output end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel.
[0028] Furthermore, the expression of the matrix construction layer is: A = a T a, where A is the matrix output by the matrix construction layer, a is the eigenvalue sequence output by the convolutional layer, and T is the transpose operation.
[0029] Furthermore, S3 includes the following sub-steps:
[0030] S31, forming an original rainfall sequence from the predicted rainfall of multiple days between the time to be predicted and the current time;
[0031] S32, forming an original temperature sequence with the predicted temperatures of multiple days between the time to be predicted and the current time;
[0032] S33, extracting elements greater than the rainfall threshold in the original rainfall sequence to form an over-threshold rainfall sequence;
[0033] S34, extracting elements greater than the temperature threshold in the original temperature sequence to form an over-threshold temperature sequence;
[0034] S35. Use the water level change prediction model to process the original rainfall sequence, the original temperature sequence, the over-threshold rainfall sequence and the over-threshold temperature sequence to obtain the changed water level.
[0035] Further, the water level change prediction model in S35 includes: a first tanh layer, a second tanh layer, a third tanh layer, a fourth tanh layer, a first fully connected layer, a second fully connected layer, a third fully connected layer, a fourth fully connected layer, a first water level difference calculation layer, a second water level difference calculation layer and a water level change weighted layer;
[0036] The input end of the first tanh layer is used to input the original rainfall sequence, and its output end is connected to the input end of the first fully connected layer; the input end of the second tanh layer is used to input the original temperature sequence, and its output end is connected to the input end of the second fully connected layer; the input end of the third tanh layer is used to input the super-threshold rainfall sequence, and its output end is connected to the input end of the third fully connected layer; the input end of the fourth tanh layer is used to input the super-threshold temperature sequence, and its output end is connected to the input end of the fourth fully connected layer; the input end of the first water level difference calculation layer is respectively connected to the output end of the first fully connected layer and the output end of the second fully connected layer; the input end of the second water level difference calculation layer is respectively connected to the output end of the third fully connected layer and the output end of the fourth fully connected layer; the input end of the water level change weighted layer is respectively connected to the output end of the first water level difference calculation layer and the output end of the second water level difference calculation layer, and its output end serves as the output end of the water level change prediction model.
[0037] Furthermore, the expression of the tanh layer is: k =tanh(ω k s k +b k ), where h k is the kth eigenvalue output by the tanh layer, tanh is the hyperbolic tangent function, s k is the kth element of the tanh layer input, ω k For k The weight of b k For k Bias of , k is a positive integer;
[0038] The first fully connected layer is used to obtain the first increasing water level according to the eigenvalues output by the first tanh layer; the second fully connected layer is used to obtain the first decreasing water level according to the eigenvalues output by the second tanh layer; the first water level difference calculation layer is used to subtract the first increasing water level from the first decreasing water level to obtain the first water level difference; the third fully connected layer is used to obtain the second increasing water level according to the eigenvalues output by the third tanh layer; the fourth fully connected layer is used to obtain the second decreasing water level according to the eigenvalues output by the fourth tanh layer; the second water level difference calculation layer is used to subtract the second increasing water level from the second decreasing water level to obtain the second water level difference; the water level change weighted layer is used to weight the first water level difference and the second water level difference to obtain the changing water level.
[0039] The beneficial effects of the present invention are as follows: the present invention reflects the water level development trend of the month in different historical years through the historical monthly water level sequence, reflects the water level development trend in the historical year that is most similar to the current situation through the historical matching water level sequence, and reflects the current neighboring historical multi-day water level development trend through the neighborhood historical multi-day water level sequence. The present invention combines water level data of different time scales (monthly, matching history, recent neighborhood) so that the water level prediction model can simultaneously consider long-term trends, similar historical situations and recent changes, thereby improving the water level prediction accuracy.
[0040] The present invention takes into account the predicted rainfall and predicted temperature in the prediction process, which have a direct impact on water level changes. Taking meteorological factors into consideration can more accurately predict water level changes in the short term, improving the timeliness and accuracy of the prediction.
[0041] The present invention combines the predictions of the water level prediction model and the water level change prediction model to achieve a more accurate prediction of the water level, thereby being able to more accurately determine the waterway freight volume. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of a method for predicting waterway freight volume;
[0043] Figure 2 It is a schematic diagram of the structure of the water level prediction model;
[0044] Figure 3 It is a schematic diagram of the structure of the first sequence feature extraction channel, the second sequence feature extraction channel, and the third sequence feature extraction channel;
[0045] Figure 4 This is a structural diagram of the water level change prediction model. DETAILED DESCRIPTION
[0046] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0047] like Figure 1 As shown, a method for predicting waterway freight volume includes the following steps:
[0048] S1. Construct historical water level samples, where the historical water level samples include: historical monthly water level sequence, historical matching water level sequence and neighborhood historical multi-day water level sequence;
[0049] S2. Process the historical water level samples using the water level prediction model to obtain a first water level estimate;
[0050] S3, according to the predicted rainfall and predicted temperature between the time to be predicted and the current time, based on the water level change prediction model, obtain the changed water level;
[0051] S4, combining the current water level with the changed water level to obtain a second water level estimate, taking the average of the first water level estimate and the second water level estimate to obtain a predicted water level;
[0052] S5. Find the water freight volume based on the predicted water level.
[0053] In this embodiment, in step S4, the current water level is added to the changed water level to obtain a second water level estimate, and in step S5, the water freight volume that can be carried by the corresponding water level is searched from historical data based on the predicted water level.
[0054] In this embodiment, the method for obtaining the historical monthly water level sequence in S1 is:
[0055] A1. Mark the month in which the prediction time is as the target month;
[0056] A2. Find the waterway water level in different historical target months and calculate the average waterway water level in different historical target months;
[0057] A3. The average water level of the waterway in the target month of each historical year is used to form a historical monthly water level sequence: X month ={x1,…,x i , …, x I}, where X month is the historical monthly water level sequence, x1 is the mean water level of the waterway in the target month of the first historical year, and x i is the mean water level of the waterway in the target month of the i-th historical year, x I is the mean water level of the waterway in the target month of the Ith historical year, i is a positive integer, and I is the number of historical years counted.
[0058] In this embodiment, it is set to predict the water freight volume on July 15, 2024, and each element in the historical monthly water level sequence is the average water level data in July of the past 10 years.
[0059] The present invention constructs a sequence of the mean water level values of waterways in target months of each historical year, which facilitates the analysis of long-term trend changes and helps the prediction model capture the periodicity and variation of water levels. By focusing on specific months, the impact of seasonal factors on water levels is fully considered.
[0060] In this embodiment, the method for obtaining the historical matching water level sequence in S1 is:
[0061] B1. Construct the water level of the waterway in the neighborhood of the current time for multiple consecutive days as a comparison water level vector;
[0062] B2, mark the neighborhood of the current time for multiple consecutive days as comparison time periods;
[0063] B3, extracting the waterway water level in the comparison time period of each historical year to form a historical candidate water level vector;
[0064] B4, calculating the similarity between the comparison water level vector and the historical candidate water level vector;
[0065] B5. Mark the historical year where the historical candidate water level vector with the greatest similarity is located to match the historical year;
[0066] B6. Mark the time period between the current time and the time to be predicted as the predicted time period;
[0067] B7. Find the multi-day waterway water level corresponding to the forecast time period from the matching historical years and obtain the historical matching water level sequence: R h,day = {r h,1 ,…,r h,n , …, x h,N}, where R h,day is the historical matching water level sequence, r h,1 To match the waterway water level on the first day of the forecast period in the historical year, r h,n To match the waterway water level on day n in the forecast period of the historical year, r h,N To match the waterway water level on day N in the forecast period of the historical year, N is the length of the forecast period and n is a positive integer.
[0068] In this embodiment, it is set to predict the waterway freight volume on July 15, 2024, and the current time is July 10, 2024. July 10, 2024 to July 1, 2024 are taken as neighborhoods, and the waterway water level from July 10, 2024 to July 1, 2024 is extracted as a comparison water level vector, and July 10 to July 1 is marked as a comparison time period. The waterway water levels of historical years such as July 10, 2023 to July 1, 2023, July 10, 2022 to July 1, 2022, and July 10, 2021 to July 1, 2021 are extracted to form a historical candidate water level vector. One historical year corresponds to one historical candidate water level vector. The most similar historical year is selected as the matching historical year. The multi-day waterway water levels from July 11 to July 15 in the matching historical year are extracted to obtain a historical matching water level sequence.
[0069] The present invention finds the year with the most similar water level development trend by comparing the similarity between the water level vector and the historical candidate water level vector. The development situation of this historical year provides a reference for the predicted year.
[0070] In this embodiment, the method for obtaining the neighborhood historical multi-day water level sequence in S1 is: extract the neighborhood water level for multiple days at the current time, and construct the neighborhood historical multi-day water level sequence: R c,day = {r c,1 , ..., r c,m , ..., x c,M}, where R c,day is the historical multi-day water level sequence of the neighborhood, r c,1 is the water level of the waterway on the first day within the neighborhood at the current time, r c,m is the water level of the waterway on the mth day within the neighborhood at the current time, r c,M It is the water level of the waterway on the Mth day within the neighborhood range of the current time, m is a positive integer, and M is the length of the selected neighborhood range.
[0071] In this embodiment, the current time is July 10, 2024, and the extracted waterway water levels of the neighborhood for multiple days include waterway water levels on July 10, 2024, July 9, 2024, July 8, 2024, and July 7, 2024.
[0072] The present invention ensures that the prediction model can utilize the latest hydrological information by extracting water level data in the neighborhood at the current time, thereby improving the timeliness and accuracy of the prediction. By using water level data in the neighborhood for multiple days, the recent changing trend of the water level can be effectively captured, which is particularly important for short-term predictions.
[0073] like Figure 2 As shown, the structure of the water level prediction model in S2 includes: a first sequence feature extraction channel, a second sequence feature extraction channel, a third sequence feature extraction channel, a first Concat layer, a second Concat layer, a first classification layer, a second classification layer and an output layer;
[0074] The input end of the first sequence feature extraction channel is used to input the historical monthly water level sequence; the input end of the second sequence feature extraction channel is used to input the historical matching water level sequence; the input end of the third sequence feature extraction channel is used to input the neighborhood historical multi-day water level sequence;
[0075] The input end of the first Concat layer is connected to the first output end of the first sequence feature extraction channel, the first output end of the second sequence feature extraction channel, and the first output end of the third sequence feature extraction channel respectively; the input end of the second Concat layer is connected to the second output end of the first sequence feature extraction channel, the second output end of the second sequence feature extraction channel, and the second output end of the third sequence feature extraction channel respectively; the input end of the first classification layer is connected to the output end of the first Concat layer; the input end of the second classification layer is connected to the output end of the second Concat layer; the input end of the output layer is connected to the output end of the first classification layer and the output end of the second classification layer respectively, and its output end serves as the output end of the water level prediction model.
[0076] The water level prediction model of the present invention processes historical monthly water level sequences, historical matching water level sequences and neighborhood historical multi-day water level sequences at the same time, fully utilizes water level data of different time scales and characteristics, improves the comprehensiveness and accuracy of the prediction, and sets an independent feature extraction channel for each water level sequence, which can extract the features of each type of sequence in a targeted manner and retain their respective unique information. The hierarchical fusion of features is achieved through two Concat layers, allowing the model to learn the relationship between features at different levels and enhance the expression ability of the model.
[0077] In this embodiment, the expressions of the two classification layers are: Among them, y is the output of the classification layer, c j Input the jth feature value for the classification layer, ω j c j The weight of b j c j The output layer is used to weight the output of the first classification layer and the output of the second classification layer to obtain the first water level estimation value.
[0078] like Figure 3 As shown, the first sequence feature extraction channel, the second sequence feature extraction channel and the third sequence feature extraction channel all include: a convolution layer, a matrix construction layer, a maximum pooling layer, an average pooling layer, a first CNN network and a second CNN network;
[0079] The input end of the convolution layer serves as the input end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel, and its output end is connected to the input end of the matrix construction layer; the output end of the matrix construction layer is respectively connected to the input end of the maximum pooling layer and the input end of the average pooling layer; the input end of the first CNN network is connected to the output end of the maximum pooling layer, and its output end serves as the first output end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel; the input end of the second CNN network is connected to the output end of the average pooling layer, and its output end serves as the second output end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel.
[0080] In the present invention, the convolution layer is a one-dimensional convolution. The one-dimensional time series data is reconstructed into a two-dimensional matrix form through the matrix construction layer, and then the peak features and the overall trend in the matrix are captured respectively through the maximum pooling and average pooling in parallel. Two CNN networks are used to process different features respectively, and two types of features are provided, so that the first Concat layer combines one type of features of the three sequences, and the second Concat layer combines another type of features of the three sequences. The classification layer is used to perform evaluation respectively, and the evaluation of the two classification layers is combined to improve the prediction accuracy.
[0081] The expression of the matrix construction layer is: A = a T a, where A is the matrix output by the matrix construction layer, a is the eigenvalue sequence output by the convolutional layer, and T is the transpose operation.
[0082] In this embodiment, S3 includes the following sub-steps:
[0083] S31, forming an original rainfall sequence from the predicted rainfall of multiple days between the time to be predicted and the current time;
[0084] S32, forming an original temperature sequence with the predicted temperatures of multiple days between the time to be predicted and the current time;
[0085] S33, extracting elements greater than the rainfall threshold in the original rainfall sequence to form an over-threshold rainfall sequence;
[0086] S34, extracting elements greater than the temperature threshold in the original temperature sequence to form an over-threshold temperature sequence;
[0087] S35. Use the water level change prediction model to process the original rainfall sequence, the original temperature sequence, the over-threshold rainfall sequence and the over-threshold temperature sequence to obtain the changed water level.
[0088] In this embodiment, the rainfall threshold and the temperature threshold are set according to demand, and the over-threshold rainfall sequence and the over-threshold temperature sequence can be empty.
[0089] like Figure 4 As shown, the water level change prediction model in S35 includes: a first tanh layer, a second tanh layer, a third tanh layer, a fourth tanh layer, a first fully connected layer, a second fully connected layer, a third fully connected layer, a fourth fully connected layer, a first water level difference calculation layer, a second water level difference calculation layer and a water level change weighted layer;
[0090] The input end of the first tanh layer is used to input the original rainfall sequence, and its output end is connected to the input end of the first fully connected layer; the input end of the second tanh layer is used to input the original temperature sequence, and its output end is connected to the input end of the second fully connected layer; the input end of the third tanh layer is used to input the super-threshold rainfall sequence, and its output end is connected to the input end of the third fully connected layer; the input end of the fourth tanh layer is used to input the super-threshold temperature sequence, and its output end is connected to the input end of the fourth fully connected layer; the input end of the first water level difference calculation layer is respectively connected to the output end of the first fully connected layer and the output end of the second fully connected layer; the input end of the second water level difference calculation layer is respectively connected to the output end of the third fully connected layer and the output end of the fourth fully connected layer; the input end of the water level change weighted layer is respectively connected to the output end of the first water level difference calculation layer and the output end of the second water level difference calculation layer, and its output end serves as the output end of the water level change prediction model.
[0091] The present invention sets four channels to process the original rainfall sequence, the original temperature sequence, the over-threshold rainfall sequence and the over-threshold temperature sequence respectively. By specially processing the over-threshold sequence, the model is more sensitive to the drastic changes in water level caused by extreme weather events (such as heavy rain or high temperature).
[0092] The expression of the tanh layer is: k =tanh(ω k s k +b k ), where h k is the kth eigenvalue output by the tanh layer, tanh is the hyperbolic tangent function, s k is the kth element of the tanh layer input, ω k For k The weight of b k For k Bias of , k is a positive integer;
[0093] The first fully connected layer is used to obtain the first increasing water level according to the eigenvalues output by the first tanh layer; the second fully connected layer is used to obtain the first decreasing water level according to the eigenvalues output by the second tanh layer; the first water level difference calculation layer is used to subtract the first increasing water level from the first decreasing water level to obtain the first water level difference; the third fully connected layer is used to obtain the second increasing water level according to the eigenvalues output by the third tanh layer; the fourth fully connected layer is used to obtain the second decreasing water level according to the eigenvalues output by the fourth tanh layer; the second water level difference calculation layer is used to subtract the second increasing water level from the second decreasing water level to obtain the second water level difference; the water level change weighted layer is used to weight the first water level difference and the second water level difference to obtain the changing water level.
[0094] In this embodiment, the expression of the fully connected layer is: Where g is the output of the fully connected layer, for the first fully connected layer g is the first increase level, for the second fully connected layer g is the first decrease level, for the third fully connected layer g is the second increase level, for the fourth fully connected layer g is the second decrease level, ω h,k h k The weight of b h,k h k The bias of K is h k The number of
[0095] In this embodiment, the weights and biases in the water level prediction model and the water level change prediction model can be obtained by training through the gradient descent method.
[0096] The present invention divides the influence of rainfall and temperature on water level into positive (increase) and negative (decrease) effects, thereby determining the influence of water level on each channel.
[0097] In the present invention, the water level development trend of the month in different historical years is reflected by the historical monthly water level sequence, the water level development trend in the historical year that is most similar to the current situation is reflected by the historical matching water level sequence, and the water level development trend of the current neighboring historical multi-day water level sequence is reflected by the neighborhood historical multi-day water level sequence. The present invention combines water level data of different time scales (monthly, matching history, recent neighborhood) so that the water level prediction model can simultaneously consider long-term trends, similar historical situations and recent changes, thereby improving the water level prediction accuracy.
[0098] The present invention takes into account the predicted rainfall and predicted temperature in the prediction process, which have a direct impact on water level changes. Taking meteorological factors into consideration can more accurately predict water level changes in the short term, improving the timeliness and accuracy of the prediction.
[0099] The present invention combines the predictions of the water level prediction model and the water level change prediction model to achieve a more accurate prediction of the water level, thereby being able to more accurately determine the waterway freight volume.
[0100] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for predicting waterway freight volume, characterized in that: The following steps are included: S1. Construct historical water level samples, where the historical water level samples include: historical monthly water level sequence, historical matching water level sequence and neighborhood historical multi-day water level sequence; S2. Process the historical water level samples using the water level prediction model to obtain a first water level estimate; S3, according to the predicted rainfall and predicted temperature between the time to be predicted and the current time, based on the water level change prediction model, obtain the changed water level; S4, combining the current water level with the changed water level to obtain a second water level estimate, taking the average of the first water level estimate and the second water level estimate to obtain a predicted water level; S5. Find the water freight volume based on the predicted water level.
2. The method for predicting waterway freight volume according to claim 1, characterized in that: The method for obtaining the historical monthly water level sequence in S1 is: A1. Mark the month in which the prediction time is as the target month; A2. Find the waterway water level in different historical target months and calculate the average waterway water level in different historical target months; A3. The average water level of the waterway in the target month of each historical year is used to form a historical monthly water level sequence: X month ={x1,…,x i , …, x I }, where X month is the historical monthly water level sequence, x1 is the mean water level of the waterway in the target month of the first historical year, and x i is the mean water level of the waterway in the target month of the i-th historical year, x I is the mean water level of the waterway in the target month of the Ith historical year, i is a positive integer, and I is the number of historical years counted.
3. The method for predicting waterway freight volume according to claim 1, characterized in that: The method for obtaining the historical matching water level sequence in S1 is: B1. Construct the water level of the waterway in the neighborhood of the current time for multiple consecutive days as a comparison water level vector; B2, mark the neighborhood of the current time for multiple consecutive days as comparison time periods; B3, extracting the waterway water level in the comparison time period of each historical year to form a historical candidate water level vector; B4, calculating the similarity between the comparison water level vector and the historical candidate water level vector; B5. Mark the historical year where the historical candidate water level vector with the greatest similarity is located to match the historical year; B6. Mark the time period between the current time and the time to be predicted as the predicted time period; B7. Find the multi-day waterway water level corresponding to the forecast time period from the matching historical years and obtain the historical matching water level sequence: R h,day = {r h,1 ,…,r h,n ,…,x h,N }, where R h,day is the historical matching water level sequence, r h,1 To match the waterway water level on the first day of the forecast period in the historical year, r h,n To match the waterway water level on day n in the forecast period of the historical year, r h,N To match the waterway water level on day N in the forecast period of the historical year, N is the length of the forecast period and n is a positive integer.
4. The method for predicting waterway freight volume according to claim 1, characterized in that: The method for obtaining the neighborhood historical multi-day water level sequence in S1 is: extract the neighborhood water level for multiple days at the current time, and construct the neighborhood historical multi-day water level sequence: R c,day = {r c,1 …, r c,m , …, x c,M }, where R c,day is the historical multi-day water level sequence of the neighborhood, r c,1 is the water level of the waterway on the first day within the neighborhood at the current time, r c,m is the water level of the waterway on the mth day within the neighborhood at the current time, r c,M It is the water level of the waterway on the Mth day within the neighborhood range of the current time, m is a positive integer, and M is the length of the selected neighborhood range.
5. The method for predicting waterway freight volume according to claim 1, characterized in that: The structure of the water level prediction model in S2 includes: a first sequence feature extraction channel, a second sequence feature extraction channel, a third sequence feature extraction channel, a first Concat layer, a second Concat layer, a first classification layer, a second classification layer and an output layer; The input end of the first sequence feature extraction channel is used to input the historical monthly water level sequence; the input end of the second sequence feature extraction channel is used to input the historical matching water level sequence; the input end of the third sequence feature extraction channel is used to input the neighborhood historical multi-day water level sequence; The input end of the first Concat layer is connected to the first output end of the first sequence feature extraction channel, the first output end of the second sequence feature extraction channel, and the first output end of the third sequence feature extraction channel respectively; the input end of the second Concat layer is connected to the second output end of the first sequence feature extraction channel, the second output end of the second sequence feature extraction channel, and the second output end of the third sequence feature extraction channel respectively; the input end of the first classification layer is connected to the output end of the first Concat layer; the input end of the second classification layer is connected to the output end of the second Concat layer; the input end of the output layer is connected to the output end of the first classification layer and the output end of the second classification layer respectively, and its output end serves as the output end of the water level prediction model.
6. The method for predicting waterway freight volume according to claim 5, characterized in that: The first sequence feature extraction channel, the second sequence feature extraction channel and the third sequence feature extraction channel all include: a convolution layer, a matrix construction layer, a maximum pooling layer, an average pooling layer, a first CNN network and a second CNN network; The input end of the convolution layer serves as the input end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel, and its output end is connected to the input end of the matrix construction layer; the output end of the matrix construction layer is respectively connected to the input end of the maximum pooling layer and the input end of the average pooling layer; the input end of the first CNN network is connected to the output end of the maximum pooling layer, and its output end serves as the first output end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel; the input end of the second CNN network is connected to the output end of the average pooling layer, and its output end serves as the second output end of the first sequence feature extraction channel, the second sequence feature extraction channel or the third sequence feature extraction channel.
7. The method for predicting waterway freight volume according to claim 6, characterized in that: The expression of the matrix construction layer is: A = a T a, where A is the matrix output by the matrix construction layer, a is the eigenvalue sequence output by the convolutional layer, and T is the transpose operation.
8. The method for predicting waterway freight volume according to claim 1, characterized in that: The S3 comprises the following sub-steps: S31, forming an original rainfall sequence from the predicted rainfall of multiple days between the time to be predicted and the current time; S32, forming an original temperature sequence with the predicted temperatures of multiple days between the time to be predicted and the current time; S33, extracting elements greater than the rainfall threshold in the original rainfall sequence to form an over-threshold rainfall sequence; S34, extracting elements greater than the temperature threshold in the original temperature sequence to form an over-threshold temperature sequence; S35. Use the water level change prediction model to process the original rainfall sequence, the original temperature sequence, the over-threshold rainfall sequence and the over-threshold temperature sequence to obtain the changed water level.
9. The method for predicting waterway freight volume according to claim 8, characterized in that: The water level change prediction model in S35 includes: a first tanh layer, a second tanh layer, a third tanh layer, a fourth tanh layer, a first fully connected layer, a second fully connected layer, a third fully connected layer, a fourth fully connected layer, a first water level difference calculation layer, a second water level difference calculation layer and a water level change weighted layer; The input end of the first tanh layer is used to input the original rainfall sequence, and its output end is connected to the input end of the first fully connected layer; the input end of the second tanh layer is used to input the original temperature sequence, and its output end is connected to the input end of the second fully connected layer; the input end of the third tanh layer is used to input the super-threshold rainfall sequence, and its output end is connected to the input end of the third fully connected layer; the input end of the fourth tanh layer is used to input the super-threshold temperature sequence, and its output end is connected to the input end of the fourth fully connected layer; the input end of the first water level difference calculation layer is respectively connected to the output end of the first fully connected layer and the output end of the second fully connected layer; the input end of the second water level difference calculation layer is respectively connected to the output end of the third fully connected layer and the output end of the fourth fully connected layer; the input end of the water level change weighted layer is respectively connected to the output end of the first water level difference calculation layer and the output end of the second water level difference calculation layer, and its output end serves as the output end of the water level change prediction model.
10. The method for predicting waterway freight volume according to claim 9, characterized in that: The expression of the tanh layer is: k =tanh(ω k s k +b k ), where h k is the kth eigenvalue output by the tanh layer, tanh is the hyperbolic tangent function, s k is the kth element of the tanh layer input, ω k For k The weight of b k For k Bias of , k is a positive integer; The first fully connected layer is used to obtain a first increasing water level according to the eigenvalues output by the first tanh layer; the second fully connected layer is used to obtain a first decreasing water level according to the eigenvalues output by the second tanh layer; the first water level difference calculation layer is used to subtract the first increasing water level from the first decreasing water level to obtain a first water level difference; the third fully connected layer is used to obtain a second increasing water level according to the eigenvalues output by the third tanh layer; the fourth fully connected layer is used to obtain a second decreasing water level according to the eigenvalues output by the fourth tanh layer; the second water level difference calculation layer is used to subtract the second increasing water level from the second decreasing water level to obtain a second water level difference; the water level change weighted layer is used to weight the first water level difference and the second water level difference to obtain a changing water level.
Citation Information
Patent Citations
Water level prediction method, system and device, electronic equipment and medium
CN116822722A
Method, system and equipment for predicting railway freight volume and medium
CN116843050A
Reservoir inflow runoff forecasting method and forecasting model construction method thereof
CN117034779A
Water storage capacity data processing method and device and storage medium
CN117454778A
Ship trajectory prediction method and system
CN117688366A
Cited By
Drainage basin pollution monitoring method based on drainage basin non-point source pollution monitoring model
CN119918814A