An intelligent detection method based on adaptive feature fusion and separable convolution

By employing multi-scale adaptive convolution and dynamic temporal pooling methods, the shortcomings of convolutional neural networks and Transformer models in local feature extraction and long-term dependency learning in time-series data processing are addressed, achieving efficient and accurate time-series data analysis.

CN120995225BActive Publication Date: 2026-01-27JIANGNAN UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511508283.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-01-27
Estimated Expiration
2045-10-22

AI Technical Summary

Technical Problem

Existing convolutional neural networks and Transformer models suffer from insufficient local feature extraction capabilities, high computational complexity, and limited ability to learn long-term dependencies when processing time-series data, posing challenges, especially in fields where data acquisition is difficult, such as the medical field.

Method used

By employing a multi-scale adaptive convolution (MASC) module, a temporal-feature separation convolution (TFSC) module, and a dynamic temporal pooling (DTP) method, combined with full-scale convolution (OS-Block), a fast Fourier transform-based ASB module, and an adaptive local filter, and through parallel processing and dynamic time warping, we can achieve multi-scale feature extraction and modeling of complex spatiotemporal dependencies in time-series data.

Benefits of technology

It significantly improves the efficiency and accuracy of the model with lower computational cost, effectively captures long and short time features, multi-scale spatial features and complex spatiotemporal dependencies, and enhances the ability to process time series data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995225B_ABST
    Figure CN120995225B_ABST
Patent Text Reader

Abstract

The application discloses an intelligent detection method based on adaptive feature fusion and separable convolution, and particularly relates to the technical field of data analysis, wherein input data enters a MASC module, the MASC module combines a full-scale convolution OS-Block and an ASB module based on fast Fourier transform; in a TFSC module, one branch extracts time dimension information by using deep convolution with one large and one small convolution kernel, and the other branch extracts feature dimension information by using a backward bottle-neck structure feedforward network composed of two grouped convolutions, then the information of the two branches is aggregated and input into a dynamic time pooling DTP module; in the dynamic time pooling DTP module, time series are first divided into multiple segments, then the time points of each segment are aligned by using a differentiable dynamic time pooling soft-DTW, then each segment is individually pooled by using weighted average pooling, and finally a classification result is output through a full connection layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, specifically to an intelligent detection method based on adaptive feature fusion and separable convolution. Background Technology

[0002] With the rapid development of deep learning technology, significant progress has been made in the field of time series data analysis. Convolutional Neural Networks (CNNs), with their local receptive fields, can effectively capture local features when processing time series data, making them suitable for preliminary feature extraction of images and time series data. However, their fixed receptive fields limit their ability to learn long-term dependencies, making it difficult to handle long-term dependencies across time steps, thus limiting their performance when dealing with complex time series data.

[0003] Long Short-Term Memory (LSTM) networks, as an improvement on Recurrent Neural Networks (RNNs), effectively capture short-term and long-term dependencies in time-series data through gating mechanisms, demonstrating excellent performance in processing time series data. However, LSTMs have high computational complexity, slow training speed, and, due to the recursive structure, incur high computational costs and are prone to training bottlenecks when processing long-term series. Furthermore, LSTMs are insufficient in local feature extraction, making it difficult to fully leverage their advantages in multi-scale data processing.

[0004] The Transformer model, relying on its self-attention mechanism, can efficiently capture long-term dependencies, avoiding the vanishing gradient problem in RNNs. Through parallel computation, it can acquire global temporal information, giving it a significant advantage in processing long-sequence data. However, its computational complexity is high, and its ability to extract local information is inferior to CNNs when processing temporal data containing local features. Furthermore, the Transformer model typically requires a large amount of labeled data for training, posing a challenge in applications where data acquisition is difficult (such as in the medical field). Summary of the Invention

[0005] To address these issues, this invention proposes an intelligent detection method based on adaptive feature fusion and separable convolution. The proposed method employs Multi-Scale Adaptive Convolution (MASC), Temporal Feature Separable Convolution (TFSC), and the introduced Dynamic Temporal Pooling (DTP) method, which effectively extracts long-term and short-term features, multi-scale spatial features, and complex spatiotemporal dependencies from the data. This significantly improves the model's efficiency and accuracy with relatively low computational cost.

[0006] The technical solution provided is as follows: An intelligent detection method based on adaptive feature fusion and separable convolution. First, the input time-series data enters the MASC module. The MASC module combines full-scale convolution OS-Block with an ASB module based on Fast Fourier Transform. OS-Block consists of three sequential convolutional layers, each equipped with multiple convolutional kernels, i.e., receptive fields. Each layer contains multiple different receptive field information (e.g., RF=1, RF=3, ..., RF=1). k After mask aggregation, the data is processed sequentially through batch normalization and ReLU activation, then concatenated. The result is then input into the ASB module to enhance the frequency domain information. The ASB module includes global and local filters to enhance the frequency domain data. The outputs of both the OS-Block and ASB modules are enhanced and then fused through residual connection before being input into the TFSC module.

[0007] In the TFSC module, the data is processed in parallel: one branch uses a deep convolution with a large and a small kernel to extract temporal dimension information, and the other branch uses an inverted bottleneck feedforward network composed of two grouped convolutions to extract feature dimension information. Then the information from these two branches is aggregated and input into the Dynamic Temporal Pooling (DTP) module.

[0008] In the Dynamic Temporal Pooling (DTP) module, the time series is first divided into multiple segments. Then, the time points of each segment are aligned using the differentiable dynamic temporal pooling soft-DTW. Next, each segment is pooled separately using weighted average pooling. Finally, the classification results are output through a fully connected layer.

[0009] Preferably, OS-Block selects a set of convolutional kernels of different sizes for each input time series, wherein the size of the largest convolutional kernel is determined by the length of the input data, and determines the optimal convolutional kernel size;

[0010] The rule for determining the optimal convolutional kernel size is as follows: based on the relationship between different convolutional kernel lengths and the maximum convolutional kernel length, calculate the mask region (left and right zero-value regions) corresponding to each convolutional kernel, and then concatenate these masks. Simultaneously, the weights and biases of the convolutional layers are also processed and aggregated accordingly.

[0011] During convolution, information from the receptive field is aggregated using a mask to dynamically adjust the weights of the convolutional layer. The mask determines which parts of the convolutional kernel are activated or disabled during training based on the size and position of the kernel, thus ensuring targeted updates of the kernel weights. OS-Block can automatically optimize the convolutional layer parameters based on different scales and features of the input data to enhance the network's ability to model complex spatiotemporal dependencies.

[0012] The multi-scale adaptive spectral convolution (MASC) module combines parallel full-scale convolution (OS-Block) with a fast Fourier transform-based ASB module. The outputs of OS-Block and ASB are fused through residual connections to effectively capture the information contained in the spatial structure, periodic temporal features, and multi-scale characteristics of time-series data.

[0013] Preferably, the ASB module performs a Fast Fourier Transform (FFT) on the input data, transforming the input data from the time domain to the frequency domain. This allows the features of the data in the frequency domain to be highlighted, enabling the capture of periodicity and frequency-related information that are difficult to detect in the time domain. In the frequency domain, the spectral characteristics of the input data can reveal its inherent structure and regularity, providing more favorable conditions for subsequent feature extraction and processing.

[0014] The ASB module proposes an adaptive local filter that calculates the median of the frequency domain energy and normalizes it based on this median. Then, it generates an adaptive high-frequency mask by comparing the normalized energy with a threshold, which can dynamically adjust the filtering level according to the specific characteristics of the dataset.

[0015] After filtering the frequency domain data using an adaptive local filter, the ASB module applies two sets of learnable filters to further enhance the feature representation; the global filter learns from the original frequency domain data, while the local filter learns from the adaptively filtered data.

[0016] Preferably, the TFSC module consists of a deep convolutional network (DWConv) and a convolutional feedforward network (ConvFFN) and adopts a parallel structure layout to achieve independent modeling and collaborative integration of temporal and feature dimension information.

[0017] In the time dimension, DWConv uses a depthwise convolution mechanism to perform convolution operations independently for each channel. If the input features are... Let N represent the real number field, N represent the feature dimension (i.e., the number of processed features), and T represent the sequence length (i.e., the length of the time dimension). Then, the output feature matrix... element H' n The formula for calculating (t) is:

[0018]

[0019] Where K is the kernel radius, and the kernel size is expressed as 2K+1, W n (k) represents the kth weight of the depthwise convolution in channel n; t±k represents the time offset, and padding is used when the weight exceeds the sequence range.

[0020] Depthwise convolution (DWConv) is parallelized using large convolutional kernels (K). large With small convolution kernel K smallTwo sets of convolution kernels: large convolution kernel K large Expand the effective receptive field to capture long-term temporal dependencies and adapt to global relationships in the data; small convolutional kernel K small The focus is on the detailed extraction of local information to capture short-term, detailed changes. The final output is the sum of the two results after batch normalization.

[0021] H DWConv =BN(H') large )+BN(H' small (2);

[0022] Among them, H' large H' represents the output of a large convolution kernel. small This represents the output of the small convolution kernel;

[0023] This multi-scale parallel design enables DWConv to simultaneously model detailed and global features while maintaining low computational complexity, greatly enhancing its ability to perceive detailed features in the time dimension.

[0024] In terms of feature dimension, the Convolutional Feedforward Network (ConvFFN) further enhances the capture of detailed information and efficient expression of grouped convolutions by introducing grouped convolutions and an inverted bottleneck structure. Grouped convolutions reduce the number of parameters and computational burden by dividing channels into multiple subgroups and performing convolution operations independently within each group, while more accurately capturing subtle correlations between local features. ConvFFN first expands the input features through an initial 1×1 grouped convolution, providing a wider space for learning high-dimensional features. Specifically, the calculation is as follows:

[0025]

[0026] Where r is the expansion ratio, and GroupConv1 represents the first 1×1 grouped convolution;

[0027] Subsequently, the features are transformed nonlinearly using the GeLU activation function to introduce nonlinear factors and improve the network's ability to fit complex data relationships.

[0028] H”=GeLU(H') (4);

[0029] Finally, a second 1×1 grouped convolution is used to restore the number of channels to the original dimension to ensure the connection between the output features and subsequent network modules;

[0030]

[0031] This grouped convolutional design not only preserves the fine representation of local features, but also enhances the flexibility and diversity of feature extraction through independent grouping operations.

[0032] The final output of the module is the sum of the results from the depthwise convolutional network (DWConv) and the convolutional feedforward network (ConvFFN), after layer normalization.

[0033] H = H DWConv +H ConvFFN (6);

[0034] Preferably, the Dynamic Time Pooling (DTP) module introduces Dynamic Time Warping (DTW), which can adaptively adjust the pooling range according to the temporal order of the data.

[0035] To effectively preserve key information in time-series data and reduce information loss that may occur with traditional pooling operations, this invention introduces a Dynamic Temporal Pooling (DTP) method. Traditional pooling operations, such as max pooling and average pooling, are typically calculated using a fixed window size. While this can effectively reduce data dimensionality, it often loses temporal information from high-level features, especially when dealing with complex temporal dependencies.

[0036] In contrast, Dynamic Temporal Pooling (DTP) introduces Dynamic Temporal Warping (DTW) technology, which adaptively adjusts the pooling range based on the temporal order of the data. The DTP module divides the entire time series into multiple segments and aligns the time points of each segment using DTW, optimizing the features of each segment. This approach not only effectively aggregates information from different time periods but also ensures that the model fully considers the context of each time point during pooling, preserving more temporal features.

[0037] The main purpose of dynamic pooling is to reduce the length of the feature vector after feature extraction while preserving the integrity of the features as much as possible.

[0038] The Dynamic Temporal Pooling (DTP) module divides the hidden feature sequence into M segments (usually MT), then performs a pooling operation on each segment, and finally aggregates the results of each segment to generate an output feature vector.

[0039] Let the final pooling output vector be... Where M is the number of segments, and the vector corresponding to the i-th segment is... Represented as:

[0040]

[0041] in This indicates a pooling operation. It is the set of the i-th time series, and when i takes the values ​​1 and M, t0 = 0, t M =T. Pooling operations support a variety of options, such as calculating the mean, minimum, or maximum value for each potential dimension.

[0042] The simplest way to divide the hidden vector into M segments is to divide the entire sequence evenly into M parts. However, this method has two problems: first, the time dimension of the input sequence is usually unaligned, making it difficult to find a uniform and fixed dividing point to segment all features; second, for multivariate data, the optimal time length for each feature segment may not be consistent.

[0043] To address these issues, the DTP method introduces dynamic time warping, which uses a dynamic alignment strategy to adaptively adjust the boundaries of time segments based on feature patterns, thereby capturing key temporal features more accurately. First, a prototype hidden sequence of length M is introduced. High-level features are used to summarize the M segment, and then time-wise they are compared with the hidden vectors using DTW. Align on the time axis to generate M segments of results corresponding to the pooling operation in formula (7); N represents the feature dimension; T represents the time dimension; H is an N*T two-dimensional matrix;

[0044] DTW uses the concept of dynamic programming, based on the cumulative distance matrix. To find the optimal path, the formula for each item is as follows:

[0045] r i,j =δ i,j +min{r i,j-1 ,r i-1,j ,r i-1,j-1} (8);

[0046] Where, r i,j This represents the element in row r and column j of the cumulative distance matrix R;

[0047]

[0048] Where, δ i,j Represents the prototype feature p i With distance vector h j The distance between them Calculate prototype feature p i and distance vector h j The cosine similarity, taking values ​​in the range [-1, 1]. δ i,j The value range is [0,2], where 0 represents complete similarity and 2 represents complete opposites. Compared with traditional distance measures, this cosine similarity-based definition is more suitable for quantifying the differences in features while reducing potential information loss.

[0049] As can be seen from formula (8), the calculation process of DTW is discrete and non-differentiable. Since the neural network calculates the loss and updates the parameters through the gradient descent method, the loss function must be differentiable, so the traditional DTW algorithm cannot be used directly.

[0050] To address this issue, this invention employs soft-DTW, a smoothed dynamic time warping (DTW) method. Similar to standard DTW, it incorporates differentiability processing to make it more suitable for optimization within neural network frameworks. The distance calculation formula is as follows:

[0051]

[0052] Where min γ {r i,j-1 ,r i-1,j ,r i-1,j-1 By using the smooth function concept of max and introducing γ to control the smoothness of path selection, the originally non-differentiable process of finding the maximum value is transformed into a differentiable calculation process. The specific transformation process is as follows:

[0053]

[0054] Therefore, formula (10) expands to:

[0055]

[0056] When γ = 0 It's just a regular DTW, otherwise, It is a differentiable expression;

[0057] In the soft-DTW method, the optimal alignment matrix A of the prototype hidden sequence P and the hidden vector H is... * Calculated using the following formula:

[0058]

[0059] in It is the cost matrix, and the (i,j)th term is δ. i,j , representing the prototype feature p i and distance vector h j The distance relationship between them is defined by the alignment matrix A, which represents a path from the start to the end of the sequence, where only elements along the path are 1 and all others are 0. A is the set containing all alignment matrices, and the matrix dot product is...<A,Δ(P,H)> This represents the cost along this path;

[0060] For a given training set, the prototype hidden sequence is obtained by minimizing its soft-DTW distance with all data hidden representations. The specific objective function is as follows:

[0061]

[0062] Where N represents the number of time series instances in the training set; specifically, it is the total number of samples in the training data, used to average the soft-DTW distance of all time series instances, thereby ensuring the normalization of the optimization objective and making it unaffected by the size of the training set; f(X n W) represents the sum of the hidden vectors of all training samples, where X n Let W represent the training data set, and let W represent the processing matrix of the dataset from the original input to the pooling output.

[0063] The present invention has the following advantages:

[0064] 1) By cleverly integrating the unique advantages of the full-scale convolutional block OS-Block and the Fast Fourier Transform-based ASB module, a multi-scale adaptive spectral convolutional module (MASC) is proposed. The MASC module possesses excellent adaptive capabilities, automatically optimizing convolutional layer parameters based on the varying scales and features of the input data, effectively overcoming the limitation of the receptive field in traditional convolutions. Simultaneously, through the synergistic effect of Fast Fourier Transform and adaptive high-frequency noise filtering, the MASC module not only accurately captures frequency domain information but also skillfully removes noise interference. This combination significantly enhances the model's efficiency in extracting multi-scale features and its ability to understand and model complex data, providing a more powerful feature representation capability for processing time-series data.

[0065] 2) This invention proposes a TFSC module, which is constructed in parallel by a deep convolutional network (DWConv) and a convolutional feedforward network (ConvFFN). This module can extract features synchronously and efficiently in both the temporal and feature dimensions. In the temporal dimension, the TFSC module, with its unique design, can accurately capture long-term and short-term dependencies as well as subtle changes in features. In the feature dimension, the TFSC module can efficiently construct a fine-grained model of the relationships between local features. The parallel processing and subsequent addition of these two modules successfully achieves more detailed and comprehensive spatiotemporal information fusion, effectively compensating for the latency and feature loss defects inherent in traditional serial structures during information transmission. This significantly improves the model's ability to extract detailed features from time-series data and enhances its modeling of global dependencies, resulting in stronger performance and accuracy when processing complex time-series data.

[0066] 3) This invention introduces the Dynamic Temporal Pooling (DTP) method. This method, by incorporating Dynamic Temporal Warping (DTW) technology, enables adaptive adjustment of the pooling range based on the temporal order of the data. The DTP method not only efficiently aggregates information from different time periods but also fully considers the contextual relationships of each time point during pooling, thus effectively preserving more temporal features. Compared to traditional pooling operations, the DTP method successfully reduces information loss, providing the model with richer and more accurate feature information when processing time-series data, further improving the model's processing capabilities and performance. Attached Figure Description

[0067] Figure 1 Flowchart provided for this invention;

[0068] Figure 2 This is a schematic diagram of the DTP method provided by the present invention. Detailed Implementation

[0069] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.

[0070] like Figure 1 As shown, this invention proposes an intelligent detection method based on adaptive feature fusion and separable convolution. First, temporal data is input into the MASC module. The MASC module combines a full-scale convolutional OS-Block with an ASB module based on Fast Fourier Transform. The OS-Block consists of three sequential convolutional layers, each equipped with multiple convolutional kernels, i.e., receptive fields. Each layer contains multiple different receptive field information (e.g., RF=1, RF=3, ..., RF=1). k After mask aggregation, the data is processed sequentially through BatchNorm and ReLU activation operations, then concatenated. The results are then input into the ASB module to enhance the frequency domain information. The ASB module includes global and local filters to enhance the frequency domain data. The outputs of both the OS-Block and ASB modules are enhanced and then fused through residual connection before being input into the TFSC module.

[0071] In the TFSC module, the data is processed in parallel: one branch uses a deep convolution with a large and a small kernel to extract temporal dimension information, and the other branch uses an inverted bottleneck feedforward network composed of two grouped convolutions to extract feature dimension information. Then the information from these two branches is aggregated and input into the Dynamic Temporal Pooling (DTP) module.

[0072] In the Dynamic Temporal Pooling (DTP) module, the time series is first divided into multiple segments. Then, the time points of each segment are aligned using the differentiable dynamic temporal pooling soft-DTW. Next, each segment is pooled separately using weighted average pooling. Finally, the classification results are output through a fully connected layer.

[0073] Preferably, OS-Block selects a set of convolutional kernels of different sizes for each input time series, wherein the size of the largest convolutional kernel is determined by the length of the input data, and determines the optimal convolutional kernel size;

[0074] The rule for determining the optimal convolutional kernel size is as follows: based on the relationship between different convolutional kernel lengths and the maximum convolutional kernel length, calculate the mask region (left and right zero-value regions) corresponding to each convolutional kernel, and then concatenate these masks. Simultaneously, the weights and biases of the convolutional layers are also processed and aggregated accordingly.

[0075] During convolution, information from the receptive field is aggregated using a mask to dynamically adjust the weights of the convolutional layer. The mask determines which parts of the convolutional kernel are activated or disabled during training based on the size and position of the kernel, thus ensuring targeted updates of the kernel weights. OS-Block can automatically optimize the convolutional layer parameters based on different scales and features of the input data to enhance the network's ability to model complex spatiotemporal dependencies.

[0076] The multi-scale adaptive spectral convolution (MASC) module combines parallel full-scale convolution (OS-Block) with a fast Fourier transform-based ASB module. The outputs of OS-Block and ASB are fused through residual connections to effectively capture the information contained in the spatial structure, periodic temporal features, and multi-scale characteristics of time-series data.

[0077] Preferably, the ASB module performs a Fast Fourier Transform (FFT) on the input data, transforming the input data from the time domain to the frequency domain. This allows the features of the data in the frequency domain to be highlighted, enabling the capture of periodicity and frequency-related information that are difficult to detect in the time domain. In the frequency domain, the spectral characteristics of the input data can reveal its inherent structure and regularity, providing more favorable conditions for subsequent feature extraction and processing.

[0078] The ASB module proposes an adaptive local filter, Filter, which calculates the median of the frequency domain energy and normalizes it. Then, it generates an adaptive high-frequency mask by comparing the normalized energy with a threshold, dynamically adjusting the filtering level according to the specific characteristics of the dataset. After adaptively filtering the frequency domain data, two sets of learnable filters are applied to further enhance the feature representation. Global filter W GLearned from the original frequency domain data F, denoted as F G =W G F, local filter W L Then from the adaptively filtered data F filtered Learning in the middle, denoted as F L =W L F filtered The final result is the sum of the two, F. out =F G +F L .

[0079] After filtering the frequency domain data using an adaptive local filter, the ASB module applies two sets of learnable filters to further enhance the feature representation; the global filter learns from the original frequency domain data, while the local filter learns from the adaptively filtered data.

[0080] Preferably, the TFSC module consists of a deep convolutional network (DWConv) and a convolutional feedforward network (ConvFFN) and adopts a parallel structure layout to achieve independent modeling and collaborative integration of temporal and feature dimension information.

[0081] In the time dimension, DWConv uses a depthwise convolution mechanism to perform convolution operations independently for each channel. If the input features are... Let N represent the real number field, N represent the feature dimension (i.e., the number of processed features), and T represent the sequence length (i.e., the length of the time dimension). Then, the output feature matrix... element H' n The formula for calculating (t) is:

[0082]

[0083] Where K is the kernel radius, and the kernel size is expressed as 2K+1, W n (k) represents the kth weight of the depthwise convolution in channel n; t±k represents the time offset, and padding is used when the weight exceeds the sequence range.

[0084] Depthwise convolution (DWConv) is parallelized using large convolutional kernels (K). large (i.e., depthwise convolution 1) and small convolution kernel K small (i.e., depthwise convolution 2) Two sets of convolution kernels: large convolution kernel K large Expand the effective receptive field to capture long-term temporal dependencies and adapt to global relationships in the data; small convolutional kernel K small The focus is on the detailed extraction of local information to capture short-term, detailed changes. The final output is the sum of the two results after batch normalization.

[0085] H DWConv =BN(H') large )+BN(H'small (2);

[0086] Among them, H' large H' represents the output of a large convolution kernel. small This represents the output of the small convolution kernel;

[0087] This multi-scale parallel design enables DWConv to simultaneously model detailed and global features while maintaining low computational complexity, greatly enhancing its ability to perceive detailed features in the time dimension.

[0088] In terms of feature dimension, the Convolutional Feedforward Network (ConvFFN) further enhances the capture of detailed information and efficient expression of grouped convolutions by introducing grouped convolutions and an inverted bottleneck structure. Grouped convolutions reduce the number of parameters and computational burden by dividing channels into multiple subgroups and performing convolution operations independently within each group, while more accurately capturing subtle correlations between local features. ConvFFN first expands the input features through an initial 1×1 grouped convolution, providing a wider space for learning high-dimensional features. Specifically, the calculation is as follows:

[0089]

[0090] Where r is the expansion ratio, and GroupConv1 represents the first 1×1 grouped convolution;

[0091] Subsequently, the features are transformed nonlinearly using the GeLU activation function to introduce nonlinear factors and improve the network's ability to fit complex data relationships.

[0092] H”=GeLU(H') (4);

[0093] Finally, a second 1×1 grouped convolution is used to restore the number of channels to the original dimension to ensure the connection between the output features and subsequent network modules;

[0094]

[0095] This grouped convolutional design not only preserves the fine representation of local features, but also enhances the flexibility and diversity of feature extraction through independent grouping operations.

[0096] The final output of the module is the sum of the results from the depthwise convolutional network (DWConv) and the convolutional feedforward network (ConvFFN), after layer normalization.

[0097] H = H DWConv +H ConvFFN (6);

[0098] Preferably, the Dynamic Time Pooling (DTP) module introduces Dynamic Time Warping (DTW), which can adaptively adjust the pooling range according to the temporal order of the data.

[0099] To effectively preserve key information in time-series data and reduce information loss that may occur with traditional pooling operations, this invention introduces a Dynamic Temporal Pooling (DTP) method. Traditional pooling operations, such as max pooling and average pooling, are typically calculated using a fixed window size. While this can effectively reduce data dimensionality, it often loses temporal information from high-level features, especially when dealing with complex temporal dependencies.

[0100] In contrast, Dynamic Temporal Pooling (DTP) introduces Dynamic Temporal Warping (DTW) technology, which adaptively adjusts the pooling range based on the temporal order of the data. The DTP module divides the entire time series into multiple segments and aligns the time points of each segment using DTW, optimizing the features of each segment. This approach not only effectively aggregates information from different time periods but also ensures that the model fully considers the context of each time point during pooling, preserving more temporal features.

[0101] The main purpose of dynamic pooling is to reduce the length of the feature vector after feature extraction while preserving the integrity of the features as much as possible.

[0102] The Dynamic Temporal Pooling (DTP) module divides the hidden feature sequence into M segments (usually MT), then performs a pooling operation on each segment, and finally aggregates the results of each segment to generate an output feature vector.

[0103] Let the final pooling output vector be... Where M is the number of segments, and the vector corresponding to the i-th segment is... Represented as

[0104]

[0105] in This indicates a pooling operation. It is the set of the i-th time series, and when i takes the values ​​1 and M, t0 = 0, t M =T. Pooling operations support a variety of options, such as calculating the mean, minimum, or maximum value for each potential dimension.

[0106] The simplest way to divide the hidden vector into M segments is to divide the entire sequence evenly into M parts. However, this method has two problems: first, the time dimension of the input sequence is usually unaligned, making it difficult to find a uniform and fixed dividing point to segment all features; second, for multivariate data, the optimal time length for each feature segment may not be consistent.

[0107] To address these issues, the DTP method introduces dynamic time warping, which uses a dynamic alignment strategy to adaptively adjust the boundaries of time segments based on feature patterns, thereby capturing key temporal features more accurately. First, a prototype hidden sequence of length M is introduced. High-level features are used to summarize the M segment, and then time-wise they are compared with the hidden vectors using DTW. Align on the time axis to generate M segments of results corresponding to the pooling operation in formula (7); N represents the feature dimension; T represents the time dimension; H is an N*T two-dimensional matrix;

[0108] DTW uses the concept of dynamic programming, based on the cumulative distance matrix. To find the optimal path, the formula for each item is as follows:

[0109] r i,j =δ i,j +min{r i,j-1 ,r i-1,j ,r i-1,j-1} (8);

[0110] Where, r i,j This represents the element in row r and column j of the cumulative distance matrix R;

[0111]

[0112] Where, δ i,j Represents the prototype feature p i With distance vector h j The distance between them Calculate prototype feature p i and distance vector h j The cosine similarity, taking values ​​in the range [-1, 1]. δ i,j The value range is [0,2], where 0 represents complete similarity and 2 represents complete opposites. Compared with traditional distance measures, this cosine similarity-based definition is more suitable for quantifying the differences in features while reducing potential information loss.

[0113] As can be seen from formula (8), the calculation process of DTW is discrete and non-differentiable. Since the neural network calculates the loss and updates the parameters through the gradient descent method, the loss function must be differentiable, so the traditional DTW algorithm cannot be used directly.

[0114] To address this issue, this invention employs soft-DTW, a smoothed dynamic time warping (DTW) method. Similar to standard DTW, it incorporates differentiability processing to make it more suitable for optimization within neural network frameworks. The distance calculation formula is as follows:

[0115]

[0116] Where min γ {r i,j-1 ,r i-1,j ,r i-1,j-1 By using the smooth function concept of max and introducing γ to control the smoothness of path selection, the originally non-differentiable process of finding the maximum value is transformed into a differentiable calculation process. The specific transformation process is as follows:

[0117]

[0118] Therefore, formula (10) expands to:

[0119]

[0120] When γ = 0 It's just a regular DTW, otherwise, It is a differentiable expression;

[0121] In the soft-DTW method, the optimal alignment matrix A of the prototype hidden sequence P and the hidden vector H is... * Calculated using the following formula:

[0122]

[0123] in It is the cost matrix, and the (i,j)th term is δ. i,j , representing the prototype feature p i and distance vector h j The distance relationship between them is defined by the alignment matrix A, which represents a path from the start to the end of the sequence, where only elements along the path are 1 and all others are 0. A is the set containing all alignment matrices, and the matrix dot product is...<A,Δ(P,H)> This represents the cost along this path;

[0124] For a given training set, the prototype hidden sequence is obtained by minimizing its soft-DTW distance with all data hidden representations. The specific objective function is as follows:

[0125]

[0126] Where N represents the number of time series instances in the training set; specifically, it is the total number of samples in the training data, used to average the soft-DTW distance of all time series instances, thereby ensuring the normalization of the optimization objective and making it unaffected by the size of the training set; f(X n W) represents the sum of the hidden vectors of all training samples, where X n Let W represent the training data set, and let W represent the processing matrix of the dataset from the original input to the pooling output.

[0127] Example: 1. Evaluation Indicators

[0128] The experiment used the following three evaluation metrics to comprehensively assess the model's performance on the image segmentation task: Precision, Accuracy, and F1 Score. Table 1 shows the calculation methods for the four metrics used.

[0129] Table 1. Calculation Method of Indicators

[0130]

[0131] (1)Precision

[0132] Precision represents the percentage of correctly predicted defect labels out of all predicted labels of that type; in other words, it indicates how many of the positive predictions are correct. A value of 1 indicates no false positives. Its formula is:

[0133]

[0134] (2) Accuracy

[0135] Accuracy measures the overall accuracy of a model in a multi-class classification task. It represents the proportion of correctly predicted samples out of the total number of samples, i.e., the percentage of samples correctly predicted by the model. The formula is:

[0136]

[0137] (3) F1Score

[0138] The F1 score is the harmonic mean of precision and accuracy. This metric aims to balance the precision and accuracy of a model, seeking the optimal balance between the two. By comprehensively considering these two performance metrics, the F1 score provides a holistic measure of the overall effectiveness of a model. Its calculation formula is as follows:

[0139]

[0140] 2. Experimental Environment

[0141] The experimental environment is a fundamental requirement for conducting experiments. In this embodiment, the experiment was conducted on a server with an i9-13900K CPU and an RTX4090 (24GB) graphics card. The experimental code was developed using Python, and the model was implemented based on the PyTorch framework.

[0142] 3. Experimental Results

[0143] This embodiment uses the AFSCN model (the present invention). To illustrate the model's performance, several mainstream methods are used as comparison algorithms. These include convolution-based MICN (Model 1), TimeNet (Model 2), Transformer-based Paraformer (Model 3), PatchTST (Model 4), linear layer-based DLINEAR (Model 5), and lightweight LightTS (Model 6). Table 2 shows the classification results of this embodiment's model on the COPD dataset compared to other models. Table 3 shows the classification results of this embodiment's model on other publicly available time-series datasets.

[0144] Table 2. Experimental results (%) of the COPD dataset

[0145] Model Model 1 Model 2 Model 3 Model 4 Model 5 Model 6 This invention accuracy 86.91 95.30 97.32 63.42 88.93 89.60 99.56

[0146] Table 3 Results of the AFSCN model on other data (%)

[0147]

[0148]

[0149] Table 4 shows the accuracy (%) of this model compared to other models on public datasets.

[0150]

[0151] Among them, datasets 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 in Tables 3 and 4 are respectively: Ethanol Concentration, FaceDetection, Handwriting, Heartbeat, JapaneseVowels, PEMS-SF, SelfRegulationSCP1, SelfRegulationSCP2, SpokenArabicDigits, and UWaveGestureLibrary.

[0152] The model in this embodiment has an average accuracy of 76.1, compared to the average accuracy of 73.6 for the more advanced TimesNet model. This model demonstrates better performance in classifying time-series data.

[0153] 4. Number of model parameters

[0154] The model in this embodiment is a lightweight model, with the following specific parameter count and computational cost:

[0155] Number of parameters: 5.39M;

[0156] Calculation time: 509.82M;

[0157] 5. Dataset Source

[0158] The data used was EIT data from COPD patients provided by the Second Affiliated Hospital of a university. The collected data was unlabeled. Based on the case reports and the GOLD criteria, the data was divided into five categories. The specific dataset is shown in Table 5. The specific data after data processing and classification is shown in Table 6.

[0159] Table 5 Quantity of each type of data

[0160] category normal Mild moderate Severe Extremely severe quantity 28 145 203 59 12

[0161] Table 6. Number of samples in the split dataset

[0162] category training set Validation set test set quantity 767 219 114

[0163] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. An intelligent detection method based on adaptive feature fusion and separable convolution, characterized in that: First, the time-series data is input into the MASC module. The MASC module combines the full-scale convolution OS-Block with the ASB module based on fast Fourier transform. The OS-Block consists of three serial convolutional layers, each equipped with multiple convolutional kernels, i.e., receptive fields. The information from multiple different receptive fields in each layer is aggregated by a mask, and then sequentially subjected to batch normalization and ReLU activation operations, followed by concatenation. The result is then input into the ASB module to enhance the frequency domain information. The ASB module includes global and local filters to enhance the frequency domain data. The outputs of the OS-Block and ASB modules are fused through residual connection and then input into the TFSC module. In the TFSC module, the data is processed in parallel: one branch uses a deep convolution with a large and a small kernel to extract temporal dimension information, and the other branch uses an inverted bottleneck feedforward network composed of two grouped convolutions to extract feature dimension information. Then the information from these two branches is aggregated and input into the Dynamic Temporal Pooling (DTP) module. In the Dynamic Temporal Pooling (DTP) module, the time series is first divided into multiple segments. Then, the time points of each segment are aligned using the differentiable dynamic temporal pooling soft-DTW. Next, each segment is pooled separately using weighted average pooling. Finally, the classification results are output through a fully connected layer.

2. The intelligent detection method based on adaptive feature fusion and separable convolution according to claim 1, characterized in that: OS-Block selects a set of convolutional kernels of different sizes for each input time series. The size of the largest convolutional kernel is determined by the length of the input data, and the optimal convolutional kernel size is determined. During the convolution process, the information of the receptive field is aggregated with the help of a mask to dynamically adjust the weights of the convolutional layer.

3. The intelligent detection method based on adaptive feature fusion and separable convolution according to claim 1, characterized in that: The TFSC module consists of a deep convolutional network (DWConv) and a convolutional feedforward network (ConvFFN) and adopts a parallel structure layout to achieve independent modeling and collaborative integration of temporal and feature dimension information. In the time dimension, DWConv uses a depthwise convolution mechanism to perform convolution operations independently for each channel. If the input features are... Let N represent the real number field, N represent the feature dimension (i.e., the number of processed features), and T represent the sequence length (i.e., the length of the time dimension). Then, the output feature matrix... element H' n The formula for calculating (t) is: Where K is the kernel radius, and the kernel size is expressed as 2K+1, W n (k) represents the kth weight of the depthwise convolution in channel n; t±k represents the time offset, and padding is used when the weight exceeds the sequence range. Depthwise convolution (DWConv) is parallelized using large convolutional kernels (K). large With small convolution kernel K small Two sets of convolution kernels: large convolution kernel K large Expand the effective receptive field to capture long-term temporal dependencies and adapt to global relationships in the data; small convolutional kernel K small The focus is on the detailed extraction of local information to capture short-term changes. The final output is the sum of the two results after batch normalization (BN). H DWConv =BN(H' large )+BN(H' small ) (2); Among them, H' large H' represents the output of a large convolution kernel. small This represents the output of the small convolution kernel; In terms of feature dimension, the Convolutional Feedforward Network (ConvFFN) introduces grouped convolutions and an inverted bottleneck structure. This involves dividing the channels into multiple subgroups and performing convolution operations independently within each group. The ConvFFN first expands the input features through a first 1×1 grouped convolution. For the input features... Specifically, the calculation is as follows: Where r is the expansion ratio, and GroupConv1 represents the first 1×1 grouped convolution; Subsequently, the features are transformed nonlinearly using the GeLU activation function to introduce nonlinear factors and improve the network's ability to fit complex data relationships. H”=GeLU(H') (4); Finally, a second 1×1 grouped convolution is used to restore the number of channels to the original dimension to ensure the connection between the output features and subsequent network modules; The final output of the module is the sum of the results from the depthwise convolutional network (DWConv) and the convolutional feedforward network (ConvFFN), after layer normalization. H=H DWConv +H ConvFFN (6)。 4. The intelligent detection method based on adaptive feature fusion and separable convolution according to claim 1, characterized in that: The Dynamic Temporal Pooling (DTP) module divides the hidden feature sequence into M segments, performs pooling operations on each segment, and finally aggregates the results of each segment to generate an output feature vector. Let the final pooling output vector be... Where M is the number of segments, and the vector corresponding to the i-th segment is... Represented as: in This indicates a pooling operation. It is the set of the i-th time series, and when i takes the values ​​1 and M, t0 = 0, t M =T; First, we introduce a prototype hidden sequence of length M. High-level features are used to summarize the M segment, and then time-wise they are compared with the hidden vectors using DTW. Align the results on the time axis to generate M segments corresponding to the pooling operation in formula (7); N represents the feature dimension; T represents the time dimension; H is an N*T two-dimensional matrix; DTW uses the concept of dynamic programming, based on the cumulative distance matrix. To find the optimal path, the formula for each item is as follows: r i,j =d i,j +min{r i,j-1 ,r i-1,j ,r i-1,j-1 } (8); Where, r i,j This represents the element in row i and column j of the cumulative distance matrix R; Where, δ i,j Represents the prototype feature p i With distance vector h j The distance between them Calculate prototype feature p i and distance vector h j The cosine similarity, with values ​​ranging from [-1, 1], δ i,j The range is [0,2], where 0 represents complete similarity and 2 represents complete oppositeness; Using soft-DTW, differentiability processing is incorporated to make it suitable for optimization within a neural network framework. The calculation formula is as follows: Where min γ {r i,j-1 ,r i-1,j ,r i-1,j-1 By using the smooth function concept of max and introducing γ to control the smoothness of path selection, the originally non-differentiable process of finding the maximum value is transformed into a differentiable calculation process. The specific transformation process is as follows: Therefore, formula (10) expands to: When γ = 0 It's just a regular DTW, otherwise, It is a differentiable expression; In the soft-DTW method, the optimal alignment matrix A of the prototype hidden sequence P and the hidden vector H is... * Calculated using the following formula: in It is the cost matrix, and the (i,j)th term is δ. i,j , representing the prototype feature p i and distance vector h j The distance relationship between them is defined by the alignment matrix A, which represents a path from the start to the end of the sequence, where only elements along the path are 1 and all others are 0. A is the set containing all alignment matrices, and the matrix dot product is...<A,Δ(P,H)> This represents the cost along this path; For a given training set, the prototype hidden sequence is obtained by minimizing its soft-DTW distance with all data hidden representations. The specific objective function is as follows: Where N represents the number of time series instances in the training set, which is also the total number of samples in the training data, and is used to calculate the average soft-DTW distance of all time series instances; f(X n W) represents the sum of the hidden vectors of all training samples, where X n Let W represent the training data set, and let W represent the processing matrix of the dataset from the original input to the pooling output.

Citation Information

Patent Citations

  • Multivariable time series data anomaly detection method and system based on dynamic graph learning and long and short term convolution

    CN117251731A

  • Maize irrigation and fertilization decision-making method and system based on future meteorological data

    CN119578947A