A method and system for feature fusion and classification of water transport data that can be explained by neural networks

By employing a feature fusion and classification method based on interpretable neural networks, the problems of irrelevant feature interference and insufficient interpretability in water transport data are solved, enabling high-precision safety level prediction and reliable decision support.

CN122818274BActive Publication Date: 2026-11-17TIANJIN RES INST FOR WATER TRANSPORT ENG M O T
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611324148.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-17
Estimated Expiration
2046-08-28

AI Technical Summary

Technical Problem

Existing multi-step prediction methods for water transport data lack effective feature selection mechanisms, contain a large number of irrelevant features, suffer from severe noise interference, and have insufficient model interpretability, making it difficult to provide reliable decision-making basis in application scenarios such as ship navigation safety early warning.

Method used

An interpretable neural network is employed, which adaptively calculates the weights of input variables through gated residual network units, static covariate encoders, variable selection networks, sequence-to-sequence layers, and interpretable multi-head self-attention layers, to perform feature fusion and classification and generate interpretable security level prediction results.

Benefits of technology

It significantly improves prediction accuracy and generalization ability, can adaptively suppress interference from irrelevant features, provides interpretable analysis of key time periods and factors, and supports highly reliable security early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122818274B_ABST
    Figure CN122818274B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for feature fusion and classification of waterway transportation data using interpretable neural networks, belonging to the interdisciplinary field of waterway transportation and deep learning. The method includes: acquiring waterway transportation data containing static covariates and time-varying inputs; inputting the waterway transportation data into an improved time fusion transformer classification model, which includes gated residual network units, a static covariate encoder, a variable selection network, a sequence-to-sequence layer based on gated recurrent units, an interpretable multi-head self-attention layer, and a classification output layer; the static covariate encoder generating a context vector; the variable selection network calculating the selection weights of each input variable and performing weighted fusion, outputting a ranking of variable importance. This invention addresses the problems of ineffective fusion of static and time-varying inputs in waterway transportation data, irrelevant features interfering with prediction accuracy, and insufficient interpretability of existing models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of water transport and deep learning, and in particular to a method and system for feature fusion and classification of water transport data using interpretable neural networks. Background Technology

[0002] Long-term performance monitoring of waterway infrastructure is a crucial foundational task for understanding the service status of ports, waterways, and hydraulic structures, and ensuring the safe operation of water transport. In recent years, with the continuous construction and long-term stable operation of multi-source sensor monitoring networks such as structural health monitoring systems, hydrological and meteorological monitoring stations, and automatic identification systems for ships, the water transport sector has accumulated a vast amount of historical observation data. The data covers multiple dimensions, including hydraulic structure response, waterway hydrological conditions, and ship navigation status. It includes static attributes that remain constant over time, such as wharf structure type, design service life, structural material strength grade, foundation type, and ship's overall length, beam, and maximum draft. It also includes time-varying observation sequences that dynamically change over time, such as structural stress and strain, vibration acceleration, tilt displacement, steel corrosion potential, wind speed and direction, wave height and tidal current, water level changes, and ship course and speed.

[0003] In existing technologies, various deep learning methods have been proposed for time series forecasting. One category is iterative forecasting methods based on recurrent neural networks (RNNs), which construct a one-step forecasting model and recursively feed the forecast results back into the input to generate multi-step forecasts. A representative example is the use of long short-term memory (LSTM) networks to model temporal dependencies. Another category is direct forecasting methods based on encoder-decoder structures, which use sequence-to-sequence models to encode historical information and directly generate forecast outputs for multiple future time steps at the decoding end, avoiding the error accumulation problem in iterative methods. In recent years, the Transformer architecture based on self-attention mechanisms has also been introduced into the field of time series forecasting. By capturing the dependencies between arbitrary positions in the input sequence through self-attention layers, it compensates to some extent for the shortcomings of RNNs in long-range dependency modeling. Furthermore, some existing methods introduce gating mechanisms into the network to adaptively control information flow and mitigate the adverse effects of noise input on the forecast results. In the area of ​​water transport data processing, some existing work has attempted to combine static ship information and dynamic navigation data from AIS data, using the aforementioned deep learning models to model and predict ship trajectories or navigation states.

[0004] However, the aforementioned existing technologies have significant shortcomings in multi-step prediction scenarios for water transport data. Existing methods lack effective feature selection mechanisms. Water transport data often contains a large number of input features with weak correlation to the prediction target. These redundant features not only consume network capacity but may also introduce noise interference. Furthermore, existing technologies are mostly "black box" models, making it difficult to identify and suppress the influence of irrelevant inputs. Existing models based on traditional Transformers have limited ability to capture long-term dependencies in water transport data, and their gating mechanisms are insufficiently designed, failing to adaptively adjust network depth and nonlinear processing intensity according to the characteristics of different datasets. The interpretability of existing models is severely lacking, failing to provide users with understandable decision-making basis, such as which input variables play a dominant role in the current prediction, which historical time steps the model bases its judgments on, and whether significant changes in navigation status or sea state have been detected. This is particularly disadvantageous in application scenarios with extremely high requirements for credibility and verifiability, such as ship navigation safety early warning. Therefore, a water transport data feature fusion and multi-step prediction method that can simultaneously balance prediction accuracy and interpretability is needed. Summary of the Invention

[0005] To address the issues of ineffective fusion of static and time-varying inputs in water transport data, interference of irrelevant features with prediction accuracy, and insufficient interpretability of existing models, this invention provides a method and system for feature fusion and classification of water transport data using interpretable neural networks.

[0006] The technical solution adopted by this invention to solve its technical problem is: a method and system for feature fusion and classification of water transport data using an interpretable neural network. Preferably, S1: Acquire water transport data, which includes static covariates and time-varying inputs, and synchronously match safety classification labels for corresponding time steps. The safety classification labels refer to the true category labels corresponding to each time step, representing the safety level of the water transport system. These labels provide supervision signals to the model during the training phase, enabling the model to learn the mapping relationship from input data to safety levels. The static covariates include hydraulic structure attributes and ship static attributes. The time-varying inputs include structural safety monitoring sequences, waterway hydrological monitoring sequences, and ship dynamic sequences. S2: Input the water transport data into an improved time fusion transformer classification model. The time fusion transformer classification model includes gated residual network units, a static covariate encoder, a variable selection network, a sequence-to-sequence layer, an interpretable multi-head self-attention layer, and a classification output layer. S3: The static covariate encoder encodes the static covariates to generate a context vector for modulating subsequent variable selection, temporal encoding, and attention calculation. S4: The… The variable selection network calculates the selection weights of each input variable based on the water transport data, and performs weighted fusion of the water transport data according to the selection weights. The importance ranking of the input variables is used as the interpretability basis for the feature dimension. S5: The sequence-to-sequence layer uses a gated recurrent unit to model the local time dependency relationship of the weighted fused water transport data, captures the short-term cumulative effect and lag correlation of the water transport data, and generates time-series features. S6: The interpretable multi-head self-attention layer performs attention calculation on the time-series features, generates an attention weight matrix, and performs weighted aggregation of the time-series features according to the attention weight matrix to obtain fused features. The attention weights of each time step are output synchronously to locate the key time period with the greatest impact on the classification result. S7: The classification output layer generates multiple prediction time-step safety classification prediction results based on the fused features. The classification output layer maps the fused features to the category dimension through a fully connected layer. Based on the safety classification label, the probability of each safety level is output through the Softmax activation function, and the final classification result is determined based on the maximum probability principle. The multi-class cross-entropy loss function is used for optimization during the training phase.

[0007] Preferably, the gated residual network unit receives a main input and an optional context vector, performs gated filtering on the nonlinear transformation result of the main input through a gated linear unit, and adds the gated result to the original main input and generates an output after layer normalization; wherein, the context vector is used to modulate the intensity of the nonlinear transformation according to external static information, and is regarded as a zero vector when the context vector is not received.

[0008] Preferably, the gated linear unit generates gate signals and transforms information for the input features, and modulates the information transformation results element-wise through the gate signals to selectively retain or suppress different components in the input information; wherein the gate signals are generated by the Sigmoid activation function and are used to control the openness of information transmission.

[0009] Preferably, the variable selection network calculates the selection weights of each input variable in the following manner: converting each input variable into a feature vector of uniform dimension, wherein the input variables include monitoring indicators from the structural safety monitoring sequence, the waterway hydrological monitoring sequence, and the ship dynamic sequence; and concatenating all feature vectors into a flattened vector. The flattened vector and context vector are input into a gated residual network, and after normalization, the selection weight vectors of each input variable are output. The feature vectors of each input variable are processed by their respective gated residual networks and then weighted and summed according to the selection weights to obtain the weighted fused features. The selection weights, after normalization, form a probability distribution, which is used to characterize the relative importance of each monitoring indicator to the safety classification result. The variable selection network also outputs the selection weight sequence of each input variable simultaneously to generate the importance ranking of each monitoring indicator to the safety classification result.

[0010] Preferably, the context vector includes four: a first context vector for time variable selection. The second context vector used for local processing of temporal features and the third context vector A fourth context vector used to enrich temporal features with static information. The static covariate encoder generates the four context vectors through multiple gated residual network units. The static covariates include hydraulic structure attributes and ship static attributes. The first context vector is used to guide the variable selection network to adaptively weight the three types of sequences: structural safety monitoring, waterway hydrological monitoring, and ship dynamics. The second and third context vectors are used to initialize the hidden state of the gated cyclic unit in the sequence layer. The fourth context vector is provided to the static enrichment layer as a modulation signal to modulate the nonlinear transformation process of the temporal features through the gated residual network unit. Static information such as wharf structure type and ship tonnage is injected into the temporal features of each time step, so that the same time-varying input generates differentiated enrichment features under different static information modulation, thereby dynamically correcting the judgment criteria for safety classification.

[0011] Preferably, the interpretable multi-head self-attention layer employs a shared value weight multi-head attention mechanism. The average of the attention weights calculated for each head is used as the aggregated attention weight matrix. The value features are then weighted and aggregated based on the aggregated attention weight matrix to obtain fused features. The shared value weight matrix enables each attention head to project the feature values ​​uniformly, thereby allowing the aggregated attention weight matrix to directly reflect the relative importance between different time steps. The interpretable multi-head self-attention layer also synchronously outputs the aggregated attention weight matrix to locate the key historical periods that have the greatest impact on security level determination, forming an interpretable basis in the time dimension.

[0012] Preferably, the classification output layer generates multiple security classification prediction results for each prediction time step in the following manner: the feature vector output by the temporal fusion decoder at the prediction step is input to the fully connected layer and mapped to the category dimension corresponding to the security classification label; the category score is converted into a probability distribution of each security level through the Softmax activation function, the probability distribution is generated based on the security classification label, and is used to learn the discrimination boundary between different security levels; the security level with the highest prediction probability is selected from the probability distribution based on the maximum probability principle as the final classification result; the classification output layer supports single-step prediction and multi-step prediction, and outputs a security level classification result independently for each prediction time step.

[0013] Preferably, a multi-class cross-entropy loss function is used during the training phase. The model parameters are updated in reverse by minimizing the negative log-likelihood between the model's predicted probability and the safe classification label, thereby optimizing the safe classification decision boundary. For multi-label anomaly type classification scenarios, the loss function is replaced with multi-label binary cross-entropy loss, which optimizes the model parameters by minimizing the negative log-likelihood between the predicted probability of each anomaly type and its true label.

[0014] Preferably, the method further includes the following interpretability analysis steps specifically for safety classification: Based on the selection weights of each input variable output by the variable selection network, analyze the contribution of each monitoring indicator to the safety classification result, generate a ranking of key features that dominate the safety level determination, and identify the main driving factors of the current safety classification; based on the attention weight matrix output by the interpretable multi-head self-attention layer, identify persistent time patterns and key historical periods in the water transport data that have a decisive impact on safety level changes, and mark the time steps corresponding to high attention weights as safety risk induction periods; calculate the Batachalia distance between the attention weight distribution of each time step and the average attention weight distribution, detect significant transition moments and abnormal event occurrence nodes in the safety status based on the Batachalia distance, and trigger a safety level transition alarm when the distance exceeds a preset threshold.

[0015] On the other hand, an interpretable neural network-based water transport data feature fusion and classification system includes: a data acquisition module for acquiring multi-source water transport data, which includes static covariates and time-varying inputs, and synchronously matching safety classification labels for corresponding time steps; the safety classification labels represent the safety level of the water transport system at each time step, and are used to provide supervision signals during the model training phase, enabling the model to learn the mapping relationship from multi-source heterogeneous input data to discrete safety levels; the static covariates include hydraulic structure attributes and ship static attributes, and the time-varying inputs include structural safety monitoring sequences, waterway hydrological monitoring sequences, and ship dynamic sequences; a static covariate encoder for encoding the static covariates and generating context vectors for modulating subsequent variable selection, temporal coding, and attention calculation; and a variable selection network for calculating the selection weights of each input variable based on the multi-source water transport data, performing weighted fusion of the multi-source water transport data based on the selection weights, and synchronously outputting the importance ranking of each input variable. The system comprises the following modules: a sequence-to-sequence layer, which uses gated recurrent units to model local temporal dependencies in the weighted fusion of multi-source water transport data, capturing short-term cumulative effects and lag correlations to generate temporal features; an interpretable multi-head self-attention layer, which performs attention calculations on the temporal features to generate an attention weight matrix, weights and aggregates the temporal features based on the attention weight matrix to obtain fused features, and simultaneously outputs the attention weights for each time step; a classification output layer, which generates safety classification prediction results for multiple prediction time steps based on the fused features, maps the fused features to the category dimension through a fully connected layer, outputs the probability of each safety level based on the safety classification label using a Softmax activation function, and determines the final classification result based on the maximum probability principle; and a training module, which uses a multi-class cross-entropy loss function during the training phase to back-update model parameters by minimizing the negative log-likelihood between the model's predicted probability and the safety classification label, thereby optimizing the safety classification decision boundary.

[0016] The beneficial effects of this invention are as follows: By combining gated residual network units and variable selection networks, this invention can adaptively calculate the selection weights of each input variable at each time step, effectively suppressing the interference of irrelevant or noisy features in water transport data. This allows the model to focus its learning capacity on the most critical predictive factors, significantly improving prediction accuracy and generalization ability. This invention generates multiple context vectors through a static covariate encoder, which are used for modulating variable selection, local temporal processing, and feature enrichment, respectively. This enables static attribute information to effectively influence and guide the extraction process of temporal dynamic features, achieving full fusion of heterogeneous input types. This invention uses gated recurrent units instead of long short-term memory networks as the core component of sequence-to-sequence layers. While ensuring local temporal modeling capabilities, this reduces network parameters, lowers the risk of overfitting, and can adaptively control the intensity of nonlinear processing according to the characteristics of the dataset. Attached Figure Description

[0017] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of the optimal embodiment of the water transport data feature fusion and classification method of the present invention, which can explain neural networks; Figure 2 This is a schematic diagram of the optimal embodiment of the water transport data feature fusion and classification system of the present invention, which can interpret neural networks. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] like Figure 1 As shown, this invention provides a method and system for feature fusion and classification of water transport data using interpretable neural networks. This method is based on a time-fusion transformer classification model. In this invention, the sequence-to-sequence layer of the time-fusion transformer classification model uses gated recurrent units instead of long short-term memory networks to reduce the number of network parameters and decrease the risk of overfitting. The specific implementation methods and systems of this invention are described in detail below.

[0021] S1: Acquire water transport data, which includes static covariates and time-varying inputs, and synchronously match the safety classification labels for the corresponding time steps. The safety classification labels are the true category labels that represent the safety level of the water transport system corresponding to each time step. The safety classification labels are used to provide supervision signals to the model during the training phase, so that the model can learn the mapping relationship from input data to safety level. The static covariates include hydraulic structure attributes and ship static attributes. The time-varying inputs include structural safety monitoring sequences, waterway hydrological monitoring sequences, and ship dynamic sequences.

[0022] Water transport data originates from multi-source sensor monitoring networks deployed in the water transport environment, including but not limited to: Automatic Identification Systems (AIS), Structural Health Monitoring Systems (SHS), hydro-meteorological monitoring stations, and Global Positioning Systems (GPS). These data sources provide multi-dimensional information on ship status, hydraulic structure response, and external environmental conditions in structured or semi-structured formats.

[0023] The static covariates refer to characteristic information that remains unchanged over time, without altering its value throughout the entire prediction period. In this embodiment, the static covariates specifically include hydraulic structure attributes and ship static attributes. Hydraulic structure attributes include, but are not limited to, wharf structure type, wharf design service life, structural material strength grade, and foundation type. Ship static attributes include, but are not limited to, ship type, overall length, beam, maximum draft, gross tonnage, and net tonnage. For example, a specific wharf may have a high-pile beam-slab structure with a design service life of fifty years; this information remains unchanged during the monitoring period. A ship may have an overall length of 105 meters and a beam of 18 meters; this characteristic is a fixed value throughout its lifespan and does not change due to variations in sailing time.

[0024] The time-varying input refers to an information sequence that changes over time along the time axis, and its values ​​may change at different time steps. Specifically, the time-varying input includes structural safety monitoring sequences, waterway hydrological monitoring sequences, and vessel dynamic sequences. Structural safety monitoring sequences include, but are not limited to, structural stress-strain monitoring values, structural vibration acceleration, structural tilt displacement, and steel reinforcement corrosion potential. Waterway hydrological monitoring sequences include, but are not limited to, real-time wind speed, real-time wind direction, real-time wave height, real-time tidal current speed, real-time tidal current direction, and water level changes. Vessel dynamic sequences include, but are not limited to, heading, track heading, ground speed, longitude, latitude, and turning rate.

[0025] The safety classification label refers to the true category label corresponding to each time step, representing the safety level of the water transport system. The safety level is defined according to actual application requirements; in this embodiment, the safety level is divided into four levels: "Safe," "Caution," "Warning," and "Danger." The safety classification label is used to provide supervisory signals to the model during the training phase, enabling the model to learn the mapping relationship from input data to safety levels.

[0026] In this embodiment, all real-valued input variables are Z-score standardized for each entity before being input into the model, transforming each variable into a standard normal distribution with zero mean and unit variance. Categorical variables are converted into dense vector representations using entity embedding, with the entity embedding dimension set to be equal to the hidden state dimension of the model.

[0027] S2: Input the water transport data into the improved time fusion transformer classification model, which includes a gated residual network unit, a static covariate encoder, a variable selection network, a sequence-to-sequence layer, an interpretable multi-head self-attention layer, and a classification output layer.

[0028] The improved time fusion transformer classification model is a deep learning-based sequence classification model, and its overall architecture is as follows: Figure 1 As shown in the figure, the model takes the water transport data obtained by S1 as input, and after a series of hierarchical feature extraction and transformation, finally outputs the safety classification prediction results of the water transport system at multiple time steps in the future.

[0029] In this invention, the gated residual network unit is the fundamental building block for constructing all other advanced modules. This unit can adaptively control the flow of information, and when deep nonlinear transformations are not required, it can skip complex processing steps through its residual connections and gating mechanism, thereby dynamically adjusting the effective depth of the network according to the data characteristics.

[0030] In this embodiment, the hidden state dimension of the improved temporal fusion transformer classification model is set to 160, and the number of attention heads is set to four. The number of historical time steps is determined based on the specific prediction task and data sampling frequency, ranging from 90 to 252 time steps. The maximum prediction step size ranges from five to 30 time steps. For example, for daily sampled data, the historical time steps are set to 90, and the maximum prediction step size is set to 30; for hourly sampled data, the historical time steps are set to 168, and the maximum prediction step size is set to 24.

[0031] S3: The static covariate encoder encodes the static covariates to generate a context vector for modulating subsequent variable selection, temporal coding, and attention calculation.

[0032] In S3, the static covariate encoder encodes the static covariates to generate a context vector for modulating subsequent variable selection, temporal coding, and attention calculation.

[0033] The static covariate encoder receives static feature vectors as input after embedding or linear transformation. Specifically, categorical variables in the static feature vectors, such as wharf structure type and ship type, are transformed into dense vectors through entity embedding; continuous variables, such as ship length and design service life, are projected onto the hidden state dimension of the model through linear transformation. All transformed static feature vectors are concatenated along the feature dimension to form a complete static feature representation.

[0034] The static covariate encoder contains multiple gated residual network units. Each gated residual network unit independently performs nonlinear transformation and feature extraction on the complete static feature representation. By using multiple parallel gated residual network units, the static covariate encoder can extract multiple different modulation signals, i.e., context vectors, from the same static feature representation.

[0035] In this embodiment, the static covariate encoder generates four different context vectors through four independent gated residual network units. The four context vectors are as follows: The first context vector is denoted as This vector is used for time variable selection. It is provided to the variable selection network to guide it in fully considering the influence of static attributes when calculating the selection weights for each input variable.

[0036] The second context vector is denoted as This vector is used for local processing of temporal features. It is provided to the encoder portion of the sequence-to-sequence layer to initialize the cell states of the gated recurrent units.

[0037] The third context vector is denoted as This vector is used for local processing of temporal features. It is provided to the encoder portion of the sequence-to-sequence layer to initialize the hidden states of the gated recurrent units. The second context vector... and the third context vector The combined effect of these factors allows static covariate information to control the initial conditions of the sequence into the internal state of the sequence layer, thereby affecting the temporal feature extraction process of all subsequent time steps.

[0038] The fourth context vector is denoted as This vector is used to enrich temporal features with static information. It is provided to the static enrichment layer to inject static attribute information into the temporal features of each time step, thereby correcting the judgment criteria for safe classification.

[0039] The dimensions of all four context vectors are equal to the dimensions of the model's hidden states. After each context vector is generated, it is passed to the corresponding module in the improved time fusion transformer classification model to modulate the subsequent calculation process.

[0040] In this invention, the gated residual network unit is a fundamental component for constructing the improved time fusion transformer classification model. The gated residual network unit receives the main input. and optional context vector Main input This represents any feature vector to be processed. Context vector. This is an optional modulation signal used to adjust the behavior of the nonlinear transformation based on external information. When the context vector is absent, it is treated as a zero vector in the computation.

[0041] The gated residual network element calculates its output according to the following formula: ; in, This represents the main input vector, with dimension 1. , Represents an optional context vector with dimensions of . . This represents the output vector of a gated residual network unit, with dimension . . The representation layer normalization operation standardizes the input features along the feature dimension, giving them a stable mean and variance distribution, which helps accelerate model training and improve generalization performance. This represents a gated linear unit, which is used to gate and filter the output of intermediate layers, selectively passing or suppressing information.

[0042] intermediate variables in the above formula Calculate using the following formula: ; in, This represents the output vector of the first intermediate layer, with dimension . . This represents the first weight matrix, with dimensions of . . This represents the output vector of the second intermediate layer, with dimension . . This represents the first bias vector, with dimension . .

[0043] intermediate variables in the above formula Calculate using the following formula: ; in, This represents the output vector of the second intermediate layer, with dimension . . This represents the exponential linear unit activation function, which outputs a linear relationship with the input when the input is positive, and outputs an exponentially decaying negative value when the input is negative. This can accelerate model convergence and reduce the gradient vanishing problem. This represents the second weight matrix, with dimensions of . . This represents the third weight matrix, with dimensions of . . This represents the main input vector. This represents the context vector. This represents the second bias vector, with dimension . .

[0044] The working mechanism of the gated residual network unit is as follows: First, the main input is... and context vector After linear transformation, they are added together, and then... The activation function performs a nonlinear transformation to obtain the output of the second intermediate layer. Then, regarding Perform a linear transformation to obtain the output of the first intermediate layer. Next, Input-gated linear unit Information is selectively transmitted or suppressed through a gating mechanism. Finally, the output of the gated linear unit is compared with the original main input. Add them together and normalize them by layer. The process is performed to obtain the final output.

[0045] This structural design gives the gated residual network unit the following characteristics: when When the calculation result is much greater than zero, The activation function approximates an identity mapping, and the entire unit exhibits linear transformation behavior; when the above calculation result is much less than zero... The activation function produces a near-constant negative output, and the unit behaves as a simplified linear layer. This adaptive nonlinear adjustment capability allows the gated residual network unit to flexibly control its nonlinear processing intensity according to the data characteristics.

[0046] In this invention, the gated linear unit is a core component constituting the gated residual network unit. The gated linear unit receives input. And calculate the output according to the following formula: ; in, The input vector of the gated linear unit has dimension . . ( GLU(γ) represents the output vector of the gated linear unit, with dimension γ. . This represents the Sigmoid activation function, which maps input values ​​to the range of zero to one, and its output value is used to control the openness of information transmission. This represents the fourth weight matrix, with dimensions of . . This represents the fourth bias vector, with dimension . . This represents the fifth weight matrix, with dimensions of . . This represents the fifth bias vector, with dimension . . This represents the element-wise multiplication operation, which is the multiplication of corresponding elements of two vectors.

[0047] The working mechanism of the gated linear unit is as follows: the Sigmoid activation function... The calculation results are processed to generate a gating vector, where each element of the gating vector has a value between zero and one. Meanwhile, The calculation result is used as the information vector to be transmitted. Then, the gate vector and the information vector are multiplied element-wise. When an element of the gate vector is close to one, the information at the corresponding position in the information vector is completely preserved; when an element of the gate vector is close to zero, the information at the corresponding position in the information vector is completely suppressed. Through this mechanism, the gated linear unit can selectively transmit or suppress different components in the input information. When the output of the gated linear unit is all zero, the nonlinear transformation of the entire gated residual network unit is completely skipped, and its output is equal to the original main input after layer normalization. .

[0048] In this embodiment, the dimensions of all weight matrices are based on the hidden state dimensions of the model. Sure, The value is 160. The initial values ​​of each weight matrix are initialized using the Xavier uniform distribution initialization method, and all bias vectors are initialized to zero vectors.

[0049] S4: The variable selection network calculates the selection weight of each input variable based on the water transport data, and performs weighted fusion of the water transport data based on the selection weight, and uses the importance ranking of the input variables as the interpretable basis of the feature dimensions.

[0050] Variable selection networks are applied to three types of data: static covariates, time-varying inputs observed in the past, and time-varying inputs known in the future. Each type of data uses an independent variable selection network with its own network parameters. The following detailed explanation uses the variable selection process for time-varying inputs observed in the past as an example; the variable selection processes for static covariates and time-varying inputs known in the future are exactly the same.

[0051] For the The input variables at time step The original values ​​are first transformed using feature transformation. Different transformation methods are applied to each input variable based on its data type: categorical variables are converted into dense vectors using entity embedding techniques, and continuous variables are projected onto the hidden state dimension of the model through linear transformation. After these transformations, each input variable is converted to a dimension of... The eigenvectors of are denoted as . .in, This is a variable index, and its value ranges from one to... Integers between [a certain range]. This represents the total number of input variables. For time steps.

[0052] All The feature vectors of the input variables are concatenated along the feature dimension to form a flattened vector. . The dimension is .

[0053] Flatten vector and the first context vector A gated residual network unit, denoted as , is used as the common input. . The structure is completely consistent with the structure of the aforementioned gated residual network unit. The output After normalization, the selection weight vectors of each input variable are obtained. The formula for calculating the weight vector is as follows: ; in, This indicates the selection of a weight vector, whose dimension is... . The element Indicates the first The input variables at time step The selection weights. The values ​​of all selection weights are between zero and one, and the sum of all selection weights is one. Normalization ensures that the selection weights form an effective probability distribution, which facilitates the interpretation of the relative importance of each input variable. This represents a flattened vector. This represents the first context vector.

[0054] At the same time, the original feature vectors of each input variable Each input variable is processed by its own independent gated residual network. Each input variable has its own dedicated gated residual network, denoted as . The parameters of this network are shared across all time steps. Each gated residual network performs a nonlinear transformation on its corresponding eigenvector to obtain the processed eigenvector. .

[0055] Then, the processed feature vectors are summed according to the selection weights to obtain the weighted fused features. The formula for calculating the weighted sum is as follows: ; in, This represents the weighted fused feature vector, with dimension . This feature vector integrates information from all input variables, but the contribution of each variable is determined by its selection weight; variables with lower importance have their contributions to the fused feature suppressed accordingly. This represents the total number of input variables. For the first Each variable at time step Selection weights. For the first The feature vector of each variable after being processed by a gated residual network.

[0056] The variable selection network also synchronously outputs the selection weight sequence of each input variable, i.e., the sequence of weights across all time steps. These selection weight sequences are recorded and used to subsequently rank the importance of each monitoring indicator to the safety classification results, providing interpretable basis for the model in terms of feature dimensions.

[0057] In this embodiment, for time-varying inputs observed in the past, the input variables include real-valued variables such as heading, speed, longitude, latitude, wind speed, wind direction, wave height, and tidal current, as well as categorical variables such as ship type and heading status. For static covariates, the input variables include ship length, ship width, and ship draft. For future time-varying inputs known in the future, the input variables include calendar variables such as day of the week, month, and holiday identifiers. The selection weights output by the variable selection network can be directly used to analyze the importance of each input variable to the prediction results.

[0058] S5: The sequence-to-sequence layer uses a gated cyclic unit to model the local time dependency of the weighted fused water transport data, capture the short-term cumulative effect and lag correlation of the water transport data, and generate time series features.

[0059] The sequence-to-sequence layer consists of two parts: an encoder and a decoder. The encoder processes the weighted fusion features from past observations, i.e., historical information. The decoder processes the known input features from future prediction time steps.

[0060] Features after weighted fusion It is organized chronologically into two parts: a historical sequence and a future sequence. The historical sequence includes the past. The fusion features at each time step are denoted as to The future sequence includes the predicted range. The known input features at each time step are denoted as . to .

[0061] The encoder receives the aforementioned historical sequence as input. The encoder employs a gated recurrent unit as its core recurrent component, processing the fused features of each time step sequentially. The initial cell state of the encoder's gated recurrent unit is determined by the second context vector. Initialization is performed, and its initial hidden state is determined by the third context vector. Initialization is performed. Through this initialization method, information in static covariates, such as the static properties of the ship and the fixed properties of the hydraulic structure, can influence the modeling process of local time dependencies.

[0062] The decoder receives the aforementioned future sequence as input. The decoder also employs a gated recurrent unit as its core recurrent component, processing the known input features at each future time step sequentially. The initial state of the decoder's gated recurrent unit is inherited from the encoder's final state after processing the entire historical sequence. This encoder-decoder structure allows historical information to influence feature extraction in the future prediction process through state propagation.

[0063] The output of a sequence-to-sequence layer is a set of unified temporal features. ,in To predict the start time, For location index. The range of values ​​is to Integers between [a certain value] and [a certain value], where negative numbers represent historical positions and positive numbers represent future positions. (Time series characteristics) It also includes local contextual information for both historical and future sequences.

[0064] Above the sequence-to-sequence layer, a gated residual skip connection is employed. This skip connection takes the original input from the sequence-to-sequence layer, i.e., the weighted fused features. The output of the sequence-to-sequence layer is directly related to the sequence output. The fusion process is then performed. The formula for calculating skip connections is as follows: ; in, This represents the temporal feature vector enhanced by skip connections, with dimension 1. . Indicates position index The original weighted fusion feature vector corresponding to the location. This indicates a gated linear unit used for jump connections, whose structure is consistent with the aforementioned gated linear unit. This represents the layer normalization operation. The skip connection creates a residual path between the output of the sequence-to-sequence layer and its original input. This layer can be effectively skipped when the output of the gated linear unit is suppressed, thus simplifying the model structure and preventing overfitting.

[0065] Following the sequence-to-sequence layer, a static enrichment layer is applied. The function of the static enrichment layer is to integrate static information into the temporal features, allowing the extraction of temporal dynamic features to be modulated by static attributes. The static enrichment layer is implemented using gated residual network units, whose weights are shared across the entire time dimension. For position indexing... Temporal characteristics at the location The static enrichment layer is calculated according to the following formula: ; in, This represents the temporal feature vector after static enrichment, with dimension 1. . This represents a gated residual network unit used for static enrichment, whose structure is completely identical to the aforementioned gated residual network unit. This represents the temporal feature vector enhanced by skip connections. This is the fourth context vector, derived from the output of the static covariate encoder in S3. (Fourth context vector) It carries the comprehensive information of static covariates and modulates the nonlinear transformation process of temporal features through gated residual network units. Through the static enrichment layer, the information in the static covariates is injected into the temporal features of each time step, so that static attributes can affect the feature representation of all time steps, rather than being used only once in the input stage.

[0066] S6: The interpretable multi-head self-attention layer performs attention calculation on the temporal features, generates an attention weight matrix, and performs weighted aggregation on the temporal features according to the attention weight matrix to obtain fused features. It synchronously outputs the attention weights of each time step to locate the key time period that has the greatest impact on the classification results.

[0067] In S6, the interpretable multi-head self-attention layer performs attention calculation on the temporal features to generate an attention weight matrix, and performs weighted aggregation on the temporal features according to the attention weight matrix to obtain fused features. At the same time, it synchronously outputs the attention weights of each time step to locate the key time period that has the greatest impact on the classification result.

[0068] The time series features after all static enrichment are first organized into a matrix. The rows of the matrix correspond to different position indices. The columns of the matrix correspond to the feature dimensions. The dimension is Multiply List.

[0069] In this invention, the interpretable multi-head self-attention layer employs a multi-head attention mechanism with shared value weights. The key difference from the standard multi-head attention mechanism is that the value weight matrix is ​​shared among all heads. This design allows the attention weights to directly reflect the importance of each time step, facilitating interpretability analysis.

[0070] The output of the interpretable multi-head self-attention layer is calculated according to the following formula: ; in, For query matrix, equal to , The key matrix is ​​equal to , For a value matrix, equal to This design is called self-attention, where the query, key, and value all come from the same input sequence, allowing each position to focus on information from other positions in the sequence. The value weight matrix is ​​shared by all heads, with dimension 1. ,in Let be the dimension of the value subspace. In this embodiment, equal Both are equal to .

[0071] The aggregate attention weight matrix is ​​calculated using the following formula: ; in, The number of attention heads is taken as one to four in this embodiment. The index of the head, with values ​​ranging from one to... , For the first The query weight matrix for each head, with dimensions [missing information]. , For the first The key weight matrix of the head, with dimension [missing information]. , The dimension of the attention subspace is equal to .

[0072] The function is the scaled dot product attention, calculated as follows: ; The input to this function is the first... The query matrix and key matrix are used to calculate the attention score matrix. The query matrix is ​​multiplied by the transpose of the key matrix to obtain the attention score matrix. The attention score matrix is ​​then divided by... Scaling is performed to stabilize the gradient. After scaling... Normalization yields the attention weight matrix.

[0073] Based on the aggregated attention weight matrix Sum matrix V and shared value weight matrix The calculation interprets the output of the multi-head self-attention layer. The attention weight matrix of each head is calculated independently and then averaged to form a single aggregated attention weight matrix. Each element of this aggregated attention weight matrix represents the attention intensity between corresponding positions, which can be directly used to interpret the attention relationships between different time steps of the model.

[0074] Gated residual connections are applied above the interpretable multi-head self-attention layer. The formula for calculating the gated residual connections is as follows: ; in, This is the output of the attention layer after gated residual connection. This is the output of the static enrichment layer. To explain the position index of the multi-head self-attention layer The output at that location, This is a gated linear unit used to control the degree of contribution to the attention output. As a layer normalization operation, the entire self-attention layer can be skipped when the output of the gated linear unit is suppressed, simplifying the model complexity.

[0075] A position feedforward layer is applied after the interpretable multi-head self-attention layer. The position feedforward layer performs an additional non-linear transformation on the output of the self-attention layer, improving the model's representational power. The position feedforward layer is implemented using gated residual network units, whose weights are shared across the entire time dimension. For position indexing... The output of the self-attention layer at the location The location of the feedforward layer is calculated using the following formula: ; in, The features are those processed by the position feedforward layer. It is a gated residual network unit, and its structure is consistent with the aforementioned gated residual network unit.

[0076] A gated residual skip connection is applied above the position feedforward layer. This skip connection directly spans the entire transformer block, providing a direct path from the sequence to the sequence layer output. The calculation formula for the skip connection is as follows: ; in, For the final time fusion decoder output The temporal features are enhanced by skip connections from sequence to sequence layer. The output of the position feedforward layer, This is a gated linear unit used to control the contribution level of the converter block. As a layer normalization operation, when the output of the gated linear unit is suppressed, the entire transformer block is skipped, and the model degenerates into a simplified structure containing only sequence-to-sequence layers.

[0077] S7: The classification output layer generates multiple safety classification prediction results for prediction time steps based on the fusion features. The classification output layer maps the fusion features to the category dimension through a fully connected layer. Based on the safety classification label, the probability of each safety level is output through the Softmax activation function. The final classification result is determined based on the maximum probability principle. The multi-class cross-entropy loss function is used for optimization during the training phase.

[0078] In step S7, the classification output layer generates multiple safe classification prediction results for different prediction time steps based on the fused features. The classification output layer maps the fused features to the category dimension through a fully connected layer, outputs the probability of each safety level after passing through a Softmax activation function, and determines the final classification result based on the maximum probability principle. The multi-class cross-entropy loss function is used for optimization during the training phase.

[0079] The classification output layer affects the temporal fusion decoder in terms of prediction step size. The final feature vector output at the point Linear transformations and probability mappings are performed. The classification output layer is calculated as follows: First, the temporal fusion decoder is adjusted at the prediction step size. The feature vector output at the location The input is fed into a fully connected layer. This fully connected layer maps the feature vector from the hidden state dimension of the model to the class dimension. ,in This represents the total number of security level categories. The mapping process is calculated using the following formula: ; in, The unnormalized category score vector has dimensions of . For the temporal fusion decoder at the prediction step size The output feature vector has a dimension of . . It is a linear coefficient matrix with dimension 1. . Let be the bias vector, and its dimension is... . To predict the start time. To predict the step size, its value ranges from one to... Integers between [a certain range].

[0080] Then, the above category score vectors are transformed into probability distributions for each security level using the Softmax activation function. The formula for calculating the Softmax activation function is as follows: ; in, This indicates the model's prediction at the prediction start time. Predicting step size The water transport system belongs to the first category. The probability value of the security level. Represents the unnormalized category score vector The first in Each element. This represents the total number of security level categories. This is a category index, and its value ranges from one to... Integers between [a certain range].

[0081] Finally, the final classification result is determined based on the principle of maximum probability. That is, the safety level with the highest predicted probability is selected as the model's output category. This process is calculated according to the following formula: ; in, The model predicts at the prediction start time. Predicting step size The results of the security level classification at the location. For the first The predicted probability of a class of security levels. This formula represents the probability of predicting all... Among the various safety levels, the category with the highest predicted probability is selected as the final output. This classification output layer supports single-step prediction, i.e. This situation also supports multi-step prediction, that is... In this case, it can independently output a security level classification result for each prediction time step.

[0082] During the training phase of the improved time fusion transformer classification model, a multi-class cross-entropy loss function is used for optimization. The formula for the multi-class cross-entropy loss function is: ; in, This represents the cross-entropy loss value. This represents the total number of security level categories. This represents the maximum prediction step size. To predict the start time Predicting step size Place, No. The true label for the security level, which takes a value of either zero or one. When the true security level is [number missing]... When class, It equals one, otherwise it equals zero. The model predicts the first The probability value of the class safety level. This loss function optimizes the model parameters by minimizing the negative log-likelihood of the true label.

[0083] For multi-label anomaly classification scenarios, where a single time step may belong to multiple anomaly types simultaneously, the loss function is replaced with multi-label binary cross-entropy loss. The formula for this loss function is: ; in, This represents the multi-label binary cross-entropy loss value. This represents the total number of exception types. To predict the start time Predicting step size Place, No. The true label of the exception class, which takes the value of zero or one. The model predicts the first The probability of occurrence of each class of anomaly. This loss function decomposes multi-class problems into... For each independent binary classification problem, calculate the binary cross-entropy loss for each class and sum them.

[0084] Example 2 Another aspect of the present invention provides a water transport data feature fusion and classification system with interpretable neural networks, the system being equipped with the aforementioned water transport data feature fusion and classification method with interpretable neural networks.

[0085] The system includes the following functional modules. The data acquisition module acquires water transport data, including static covariates, time-varying inputs from past observations, and time-varying inputs known for the future. The data acquisition module connects to the Automatic Identification System (AIS) receiving equipment and the meteorological and hydrological monitoring network server via wired or wireless communication interfaces to receive real-time ship dynamic messages and environmental monitoring data. The data acquisition module parses the received raw data into a structured format, organizing it by entity identifier and timestamp to form the input for subsequent modules.

[0086] A static covariate encoder is used to encode static covariates and generate context vectors. The static covariate encoder consists of multiple gated residual network units. It receives the embedded static feature vectors as input, performs nonlinear transformations through each gated residual network unit, and outputs four context vectors. These context vectors are then output to the static enrichment sublayers in the variable selection network, sequence-to-sequence layer, and interpretable multi-head self-attention layer, respectively.

[0087] The variable selection network is used to calculate the selection weights of each input variable based on waterway data, and then performs weighted fusion of the waterway data according to these selection weights. The variable selection network includes a feature transformation submodule, a feature concatenation submodule, a selection weight generation submodule, and a weighted fusion submodule. The feature transformation submodule converts each input variable into a feature vector of a uniform dimension. The feature concatenation submodule concatenates all feature vectors into a flattened vector. The selection weight generation submodule inputs the flattened vector and the first context vector into a gated residual network, performs Softmax normalization, and outputs the selection weights of each input variable. The weighted fusion submodule processes the feature vectors of each input variable separately through the gated residual network and then performs a weighted sum according to the selection weights.

[0088] The sequence-to-sequence layer is used to model local temporal dependencies in the weighted and fused water transport data using gated recurrent units (ROUs), generating temporal features. The sequence-to-sequence layer includes an encoder and a decoder. The encoder uses GUs to process historical sequences, and the decoder uses GUs to process future sequences. The initial cell state of the encoder is determined by the second context vector. Initialization, the encoder's initial hidden state is determined by the third context vector. Initialization. The output of the sequence-to-sequence layer is a temporal feature sequence containing historical and future positions.

[0089] An interpretable multi-head self-attention layer is used to calculate attention for temporal features, generate an attention weight matrix, and then weight and aggregate the temporal features based on the attention weight matrix to obtain fused features. The interpretable multi-head self-attention layer employs a multi-head attention mechanism with shared-value weights, and the average of the attention weights of each head is used as the final attention weight matrix. The interpretable multi-head self-attention layer outputs the aggregated attention weight matrix and the fused feature sequence after weighted aggregation.

[0090] The quantile prediction output layer generates quantile prediction results for multiple prediction time steps based on the fusion features. It performs a linear transformation on the output features of the temporal fusion decoder to generate predicted values ​​for the 10th, 50th, and 90th percentiles, forming prediction intervals and point prediction results.

[0091] The modules described above are connected sequentially. The output of the data acquisition module is connected to the input of the static covariate encoder and the input of the variable selection network. The context vector outputs of the static covariate encoder are connected to the variable selection network, the sequence-to-sequence layer, and the interpretable multi-head self-attention layer, respectively. The output of the variable selection network is connected to the input of the sequence-to-sequence layer. The output of the sequence-to-sequence layer is connected to the input of the interpretable multi-head self-attention layer. The output of the interpretable multi-head self-attention layer is connected to the input of the quantile prediction output layer.

[0092] In this embodiment, the system further includes a training module. The training module calculates the training loss based on the multi-class cross-entropy loss function and updates all trainable parameters of the time fusion transformer classification model using the backpropagation algorithm. During training, the training module jointly minimizes the quantile loss across all quantile outputs until the validation set loss converges.

[0093] In this embodiment, the system further includes an interpretability analysis module. The interpretability analysis module includes a variable importance analysis submodule, a temporal pattern recognition submodule, and a state transition detection submodule. The variable importance analysis submodule generates a statistical distribution description of the importance of each input variable based on the selection weights of each input variable output by the variable selection network. The temporal pattern recognition submodule identifies and visualizes the distribution patterns of attention weights at historical locations based on the attention weight matrix output by the interpretable multi-head self-attention layer. The state transition detection submodule calculates the Batachalia distance between the attention weight distribution at each time step and the average attention weight distribution, and uses this distance to mark the occurrence times of state transitions and significant events.

[0094] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. The above descriptions are only preferred embodiments of this application. It should be noted that due to the limitations of written expression, while there are objectively infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner. These improvements, modifications, changes, or combinations, or the direct application of the inventive concept and technical solution to other situations without modification, should all be considered within the scope of protection of this application.

Claims

1. A water transportation data feature fusion and classification method of an interpretable neural network, characterized in that, include: S1: Acquire water transport data, which includes static covariates and time-varying inputs, and synchronously match the safety classification labels for the corresponding time steps. The safety classification labels are the true category labels that represent the safety level of the water transport system corresponding to each time step. The safety classification labels are used to provide supervision signals to the model during the training phase, so that the model can learn the mapping relationship from input data to safety level. The static covariates include hydraulic structure attributes and ship static attributes. The time-varying inputs include structural safety monitoring sequences, waterway hydrological monitoring sequences, and ship dynamic sequences. S2: Input the water transport data into the improved time fusion transformer classification model, which includes a gated residual network unit, a static covariate encoder, a variable selection network, a sequence-to-sequence layer, an interpretable multi-head self-attention layer, and a classification output layer. S3: The static covariate encoder encodes the static covariates to generate a context vector for modulating subsequent variable selection, temporal coding, and attention calculation; S4: The variable selection network calculates the selection weight of each input variable based on the water transport data, and performs weighted fusion of the water transport data based on the selection weight, and uses the importance ranking of the input variables as the interpretable basis of the feature dimensions. S5: The sequence-to-sequence layer uses a gated cyclic unit to model the local time dependency of the weighted fused water transport data, captures the short-term cumulative effect and lag correlation of the water transport data, and generates time series features; S6: The interpretable multi-head self-attention layer performs attention calculation on the temporal features, generates an attention weight matrix, and performs weighted aggregation on the temporal features according to the attention weight matrix to obtain fused features. It synchronously outputs the attention weights of each time step to locate the key time period that has the greatest impact on the classification results. S7: The classification output layer generates multiple safe classification prediction results for prediction time steps based on the fusion features. The classification output layer maps the fusion features to the category dimension through a fully connected layer. Based on the safe classification label, the probability of each safety level is output through the Softmax activation function. The final classification result is determined based on the maximum probability principle. The multi-class cross-entropy loss function is used for optimization during the training phase.

2. The water transportation data feature fusion and classification method of the interpretable neural network according to claim 1, characterized in that, The gated residual network unit receives a main input and an optional context vector. It performs gated filtering on the nonlinear transformation result of the main input through a gated linear unit, and adds the gated result to the original main input and then performs layer normalization to generate the output. The context vector is used to modulate the intensity of the nonlinear transformation according to external static information. When the context vector is not received, it is regarded as a zero vector.

3. The water transportation data feature fusion and classification method of an interpretable neural network according to claim 2, characterized in that, The gated linear unit generates gate signals and transforms information for the input features, and modulates the information transformation results element by element through the gate signals to selectively retain or suppress different components in the input information; wherein, the gate signals are generated by the Sigmoid activation function and are used to control the openness of information transmission.

4. The water transportation data feature fusion and classification method of an interpretable neural network according to claim 1, characterized in that, The variable selection network calculates the selection weights for each input variable in the following manner: Each input variable is converted into a feature vector of a unified dimension. The input variables include each monitoring indicator in the structural safety monitoring sequence, the waterway hydrological monitoring sequence, and the ship dynamic sequence. concatenating all feature vectors into a flattened vector ; The flattened vector and context vector are input into the gated residual network, and after normalization, the selection weight vector of each input variable is output. After the feature vectors of each input variable are processed by their respective gated residual networks, they are weighted and summed according to the selected weights to obtain the weighted fused features. The selection weights, after normalization, form a probability distribution, which is used to characterize the relative importance of each monitoring indicator to the safety classification result. The variable selection network also synchronously outputs the selection weight sequence of each input variable, which is used to generate a ranking of the importance of each monitoring indicator to the safety classification result.

5. The water transport data feature fusion and classification method according to claim 1, characterized in that, The context vector includes four: First context vector for time variable selection The second context vector used for local processing of temporal features and the third context vector A fourth context vector used to enrich temporal features with static information. The static covariate encoder generates the four context vectors respectively through multiple gated residual network units; The static covariates include hydraulic structure attributes and ship static attributes. The first context vector is used to guide the variable selection network to adaptively weight the three types of sequences: structural safety monitoring, waterway hydrological monitoring, and ship dynamics. The second and third context vectors are used to initialize the hidden state of the gated recurrent unit in the sequence layer. The fourth context vector is provided to the static enrichment layer as a modulation signal through the gated residual network unit to modulate the nonlinear transformation process of the temporal features. Static information such as wharf structure type and ship tonnage is injected into the temporal features of each time step, so that the same time-varying input generates differentiated enrichment features under different static information modulation, thereby dynamically correcting the judgment criteria for safety classification.

6. The water transport data feature fusion and classification method according to claim 1, characterized in that, The interpretable multi-head self-attention layer adopts a multi-head attention mechanism with shared value weights. The average value of the attention weights calculated for each head is taken as the aggregated attention weight matrix. The value features are then weighted and aggregated based on the aggregated attention weight matrix to obtain the fused features. The shared value weight matrix enables each attention head to project the feature value in a unified manner, thereby allowing the aggregated attention weight matrix to directly reflect the relative importance between different time steps. The interpretable multi-head self-attention layer also synchronously outputs an aggregated attention weight matrix, which is used to locate the key historical periods that have the greatest impact on the security level determination, forming an interpretable basis in the time dimension.

7. The water transport data feature fusion and classification method according to claim 1, characterized in that, The classification output layer generates safe classification prediction results for multiple prediction time steps in the following manner: The feature vector output by the temporal fusion decoder at the prediction step is input into the fully connected layer and mapped to the category dimension corresponding to the security classification label. The category scores are converted into probability distributions for each security level using the Softmax activation function. The generation of these probability distributions is based on the security classification labels and is used to learn the discrimination boundaries between different security levels. Based on the principle of maximum probability, the security level with the highest predicted probability is selected from the probability distribution as the final classification result; the classification output layer supports single-step prediction and multi-step prediction, and outputs a security level classification result independently for each prediction time step.

8. The water transport data feature fusion and classification method according to claim 1, characterized in that, During the training phase, a multi-class cross-entropy loss function is used to back-update the model parameters by minimizing the negative log-likelihood between the model's predicted probability and the safe classification label, thereby optimizing the safe classification decision boundary. For multi-label anomaly type classification scenarios, the loss function is replaced with multi-label binary cross-entropy loss, and the model parameters are optimized by minimizing the negative log-likelihood between the predicted probability of each anomaly type and its true label.

9. The water transport data feature fusion and classification method according to claim 1, characterized in that, It also includes the following interpretability analysis steps specific to safety classifications: Based on the selection weights of each input variable in the network output, the contribution of each monitoring indicator to the safety classification result is analyzed, a ranking of key features that dominate the safety level determination is generated, and the main driving factors of the current safety classification are identified. Based on the attention weight matrix output by the interpretable multi-head self-attention layer, identify the persistent time patterns and key historical periods in water transport data that have a decisive impact on changes in safety level, and mark the time steps corresponding to high attention weights as safety risk induction periods. Calculate the Batachalia distance between the attention weight distribution at each time step and the average attention weight distribution. Detect significant transition moments and abnormal event occurrence nodes based on the Batachalia distance. Trigger a security level transition alarm when the distance exceeds a preset threshold.

10. A water transport data feature fusion and classification system with interpretable neural networks, equipped with the water transport data feature fusion and classification method with interpretable neural networks as described in any one of claims 1-9, characterized in that, include: The data acquisition module is used to acquire multi-source water transport data, which includes static covariates and time-varying inputs, and synchronously matches safety classification labels for corresponding time steps. The safety classification labels represent the safety level of the water transport system at each time step and are used to provide supervision signals during the model training phase, enabling the model to learn the mapping relationship from multi-source heterogeneous input data to discrete safety levels. The static covariates include hydraulic structure attributes and ship static attributes, and the time-varying inputs include structural safety monitoring sequences, waterway hydrological monitoring sequences, and ship dynamic sequences. A static covariate encoder is used to encode the static covariates and generate a context vector for modulating subsequent variable selection, temporal coding and attention calculation. A variable selection network is used to calculate the selection weight of each input variable based on the multi-source water transport data, perform weighted fusion of the multi-source water transport data based on the selection weight, and simultaneously output the importance ranking of each input variable. The sequence-to-sequence layer is used to model the local time dependency of the weighted fused multi-source water transport data using gated cyclic units, capture the short-term cumulative effect and lag correlation of water transport data, and generate time series features. An interpretable multi-head self-attention layer is used to perform attention calculation on the temporal features, generate an attention weight matrix, perform weighted aggregation on the temporal features according to the attention weight matrix to obtain fused features, and synchronously output the attention weights of each time step. The classification output layer is used to generate security classification prediction results for multiple prediction time steps based on the fused features. The fused features are mapped to the category dimension through a fully connected layer. Based on the security classification label, the probability of each security level is output through the Softmax activation function. The final classification result is determined based on the maximum probability principle. The training module is used to employ a multi-class cross-entropy loss function during the training phase. It updates the model parameters in reverse by minimizing the negative log-likelihood between the model's predicted probability and the safe classification label, thereby optimizing the safe classification decision boundary. The interpretability analysis module is used to generate feature importance ranking based on the selection weights of the variable selection network, identify key influencing periods based on the attention weight matrix of the interpretable multi-head self-attention layer, and detect the moment of safety state transition based on the Batachalia distance.