Intelligent detection method based on adaptive feature fusion and separable convolution
By employing multi-scale adaptive convolution and dynamic temporal pooling, the limitations of convolutional neural networks and Transformer models in temporal data processing are overcome, enabling efficient and accurate feature extraction and spatiotemporal dependency modeling, thereby improving model performance.
Patent Information
- Application Number
- CN202511508283.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-22
Smart Images

Figure CN120995225A_ABST
Abstract
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 data enters the MASC module. The MASC module combines a full-scale convolution OS-Block with an ASB module based on fast Fourier transform. The OS-Block contains multiple different receptive fields (e.g., RF=1, RF=3, ..., RF=1).k Information from multiple receptive fields is aggregated by a mask, then batch normalized and ReLU activated sequentially, followed by splicing. The result is then input into the ASB module to extract frequency domain information. Finally, the time domain and frequency domain information are aggregated so that the result from the MASC module is input into the TFSC module. In the TFSC module, the data is processed in parallel in two parts: one branch uses a deep convolution with a large and a small kernel to extract the temporal dimension information, and the other branch uses a feedforward network with an inverted bottleneck structure composed of two grouped convolutions to extract the 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. Preferably, OS-Block consists of three serial convolutional layers, each equipped with multiple convolutional kernels, i.e., receptive fields. A set of convolutional kernels of different sizes is selected for each input time series, wherein the size of the largest convolutional kernel is determined by the length of the input data, and the optimal convolutional kernel size is determined. 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.
[0007] 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.
[0008] 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. 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. 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. 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. 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. 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... elements The calculation formula is: (1); in, It is the kernel radius, and the kernel size is expressed as... , Indicates depthwise convolution in channels The Weights This indicates the time offset; padding is used if the offset exceeds the sequence range. Depthwise convolution (DWConv) uses large convolution kernels in parallel. With small convolution kernel Two sets of convolution kernels: large convolution kernel Expand the effective receptive field to capture long-term temporal dependencies and adapt to global relationships in the data; small convolutional kernels. 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. (2); in, This represents the output of a large convolution kernel. This represents the output of the small convolution kernel; 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.
[0009] In terms of feature dimension, the Convolutional Feedforward Network (ConvFFN) further enhances the capture of detailed information and efficient expression by introducing grouped convolutions and an inverted bottleneck structure. Grouped convolutions, by dividing channels into multiple subgroups and performing convolution operations independently within each group, reduce the number of parameters and computational burden, while more accurately capturing subtle correlations between local features. ConvFFN first expands the input features through the first 1×1 grouped convolution, providing a wider space for learning high-dimensional features. Specifically, the calculation is as follows: (3); in It's an expansion ratio. This 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; (4); Finally, a second 1×1 grouped convolution is used to restore the number of channels to the original dimensions to ensure the continuity of the output features with subsequent network modules; (5); 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.
[0010] 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. (6); 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. 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.
[0011] In contrast, Dynamic Temporal Pooling (DTP) introduces Dynamic Temporal Warping (DTW) technology, which adaptively adjusts the pooling range according to 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. 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.
[0012] Dynamic temporal pooling divides the hidden feature sequence into Section, (usually) Then, pooling is performed on each segment, and finally the results of each segment are aggregated to generate an output feature vector.
[0013] Let the final pooling output vector be... Where M is the number of segments, the th segment... The vector corresponding to the segment Represented as: (7); in This indicates a pooling operation. It is the first A set of time series, where i takes values of 1 and M. , Pooling operations support a variety of options, such as calculating the mean, minimum, or maximum value for each potential dimension.
[0014] How to divide hidden vectors The simplest way is to divide the entire sequence into segments. 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 be inconsistent.
[0015] 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 time warp of length is introduced. Prototype hidden sequence Used to summarize The high-level features of the segment are then combined with the hidden vectors in time using DTW. Align on the timeline to generate the pooling operation corresponding to that in formula (7). Segment results; 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: (8); in, Represents the cumulative distance matrix middle OK Column elements; (9); in, Representing prototype features With distance vector The distance between them Calculate prototype features and distance vector The cosine similarity is taken in the range [-1, 1]. 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.
[0016] 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.
[0017] 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: (10); in By using the idea of a smooth function of max, we introduce... To control the smoothness of path selection, the original non-differentiable process of finding the maximum value is transformed into a differentiable computation process. The specific transformation process is as follows: (11); Therefore, formula (10) expands to: (12); when When =0, It's just a regular DTW, otherwise, It is a differentiable expression; Prototype hidden sequence in the soft-DTW method and hidden vectors Optimal alignment matrix Calculated using the following formula: (13); in It is the cost matrix, the first... Item , representing prototype features and distance vector Distance relationship between them, alignment matrix This represents a path from the start to the end of a sequence, where only the elements on the path are 1, and the rest are 0; It is a set containing all aligned matrices, and the matrix inner product. 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: (14); in This 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 so that it is not affected by the size of the training set. Let represent the sum of the hidden vectors of all training samples, where Represents the training data set. This represents the processing matrix of the dataset from the original input to the pooled output.
[0018] The present invention has the following advantages: 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 convolution 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.
[0019] 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.
[0020] 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
[0021] Figure 1 Flowchart provided for this invention; Figure 2 This is a schematic diagram of the DTP method provided by the present invention. Detailed Implementation
[0022] 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.
[0023] like Figure 1 As shown, this invention proposes an intelligent detection method based on adaptive feature fusion and separable convolution. First, input data enters the MASC module, which combines a full-scale convolution OS-Block with an ASB module based on Fast Fourier Transform. The OS-Block contains multiple receptive fields (e.g., RF=1, RF=3, ..., RF=1). k Information from multiple receptive fields is aggregated by a mask, then processed sequentially through batch normalization (BatchNorm) and ReLU activation operations, followed by concatenation. The results are then input into the ASB module to extract frequency domain information. Finally, the time domain and frequency domain information are aggregated so that the results from the MASC module are input into the TFSC module. In the TFSC module, the data is processed in parallel in two parts: one branch uses a deep convolution with a large and a small kernel to extract the temporal dimension information, and the other branch uses a feedforward network with an inverted bottleneck structure composed of two grouped convolutions to extract the 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. Preferably, OS-Block consists of three serial convolutional layers, each equipped with multiple convolutional kernels, i.e., receptive fields. A set of convolutional kernels of different sizes is selected for each input time series, wherein the size of the largest convolutional kernel is determined by the length of the input data, and the optimal convolutional kernel size is determined. 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.
[0024] 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.
[0025] 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. 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. The ASB module proposes an adaptive local 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. From raw frequency domain data Learning in China, represented as Local filters Then from the adaptively filtered data Learning in China, represented as The final result is the sum of the two. .
[0026] 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. 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. 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... elements The calculation formula is: (1); in, It is the kernel radius, and the kernel size is expressed as... , Indicates depthwise convolution in channels The Weights This indicates the time offset; padding is used if the offset exceeds the sequence range. Depthwise convolution (DWConv) uses large convolution kernels in parallel. (i.e., depthwise convolution 1) and small convolution kernel (i.e., depthwise convolution 2) Two sets of convolution kernels: large convolution kernel Expand the effective receptive field to capture long-term temporal dependencies and adapt to global relationships in the data; small convolutional kernels. 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. (2); in, This represents the output of a large convolution kernel. This represents the output of the small convolution kernel; 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.
[0027] In terms of feature dimension, the Convolutional Feedforward Network (ConvFFN) further enhances the capture of detailed information and efficient expression by introducing grouped convolutions and an inverted bottleneck structure. Grouped convolutions, by dividing channels into multiple subgroups and performing convolution operations independently within each group, reduce the number of parameters and computational burden, while more accurately capturing subtle correlations between local features. ConvFFN first expands the input features through the first 1×1 grouped convolution, providing a wider space for learning high-dimensional features. Specifically, the calculation is as follows: (3); in It's an expansion ratio. This 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; (4); Finally, a second 1×1 grouped convolution is used to restore the number of channels to the original dimensions to ensure the continuity of the output features with subsequent network modules; (5); 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.
[0028] 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. (6); 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. 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.
[0029] In contrast, Dynamic Temporal Pooling (DTP) introduces Dynamic Temporal Warping (DTW) technology, which adaptively adjusts the pooling range according to 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. 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.
[0030] Dynamic temporal pooling divides the hidden feature sequence into Section, (usually) Then, pooling is performed on each segment, and finally the results of each segment are aggregated to generate an output feature vector.
[0031] Let the final pooling output vector be... Where M is the number of segments, the th segment... The vector corresponding to the segment Represented as: (7); in This indicates a pooling operation. It is the first A set of time series, where i takes values of 1 and M. , Pooling operations support a variety of options, such as calculating the mean, minimum, or maximum value for each potential dimension.
[0032] How to divide hidden vectors The simplest way is to divide the entire sequence into segments. 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 be inconsistent.
[0033] 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 time warp of length is introduced. Prototype hidden sequence Used to summarize The high-level features of the segment are then combined with the hidden vectors in time using DTW. Align on the timeline to generate the pooling operation corresponding to that in formula (7). Segment results; 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: (8); in, Represents the cumulative distance matrix middle OK Column elements; (9); in, Representing prototype features With distance vector The distance between them Calculate prototype features and distance vector The cosine similarity is taken in the range [-1, 1]. 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.
[0034] 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.
[0035] 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: (10); in By using the idea of a smooth function of max, we introduce... To control the smoothness of path selection, the original non-differentiable process of finding the maximum value is transformed into a differentiable computation process. The specific transformation process is as follows: (11); Therefore, formula (10) expands to: (12); when When =0, It's just a regular DTW, otherwise, It is a differentiable expression; Prototype hidden sequence in the soft-DTW method and hidden vectors Optimal alignment matrix Calculated using the following formula: (13); in It is the cost matrix, the first... Item , representing prototype features and distance vector Distance relationship between them, alignment matrix This represents a path from the start to the end of a sequence, where only the elements on the path are 1, and the rest are 0; It is a set containing all aligned matrices, and the matrix inner product. 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: (14); in This 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 so that it is not affected by the size of the training set. Let represent the sum of the hidden vectors of all training samples, where Represents the training data set. This represents the processing matrix of the dataset from the original input to the pooled output.
[0036] Example: 1. Evaluation Indicators 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.
[0037] Table 1. Calculation Method of Indicators
[0038] (1) Precision 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: ; (2) Accuracy 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: ; (3) F1Score 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: ; 2. Experimental Environment 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 RTX 4090 (24GB) graphics card. The experimental code was developed using Python, and the model was implemented based on the PyTorch framework.
[0039] 3. Experimental Results 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, comparing it to other models. Table 3 shows the classification results of this embodiment's model on other publicly available time-series datasets.
[0040] Table 2 Experimental results (%) of the COPD dataset
[0041] Table 3 Results of the AFSCN model on other datasets (%)
[0042] Table 4 shows the accuracy (%) of this model compared to other models on public datasets.
[0043] Among them, datasets 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 in Tables 3 and 4 are respectively: EthanolConcentration, FaceDetection, Handwriting, Heartbeat, JapaneseVowels, PEMS-SF, SelfRegulationSCP1, SelfRegulationSCP2, SpokenArabicDigits, and UWaveGestureLibrary.
[0044] 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.
[0045] 4. Number of model parameters The model in this embodiment is a lightweight model, with the following specific parameter count and computational cost: Number of parameters: 5.39M; Calculation time: 509.82M; 5. Dataset Source 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. Table 5 Quantity of each type of data
[0046] Table 6. Number of samples in the split dataset
[0047] 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 input data enters 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 contains multiple different receptive fields. The information from the multiple different receptive fields 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 extract frequency domain information. Finally, the time domain and frequency domain information are aggregated so that the result of the MASC module is input into the TFSC module. In the TFSC module, the data is processed in parallel in two parts: one branch uses a deep convolution with a large and a small kernel to extract the temporal dimension information, and the other branch uses a feedforward network with an inverted bottleneck structure composed of two grouped convolutions to extract the 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 consists of three sequential convolutional layers, each equipped with multiple convolutional kernels, or receptive fields. A set of convolutional kernels of different sizes are selected for each input time series, with the size of the largest convolutional kernel 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 fields is aggregated using a mask to dynamically adjust the weights of the convolutional layers.
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... elements The calculation formula is: (1); in, It is the kernel radius, and the kernel size is expressed as... , Indicates depthwise convolution in channels The Weights This indicates the time offset; padding is used if the offset exceeds the sequence range. Depthwise convolution (DWConv) uses large convolution kernels in parallel. With small convolution kernel Two sets of convolution kernels: large convolution kernel Expand the effective receptive field to capture long-term temporal dependencies and adapt to global relationships in the data; small convolutional kernels. It focuses on the detailed extraction of local information to capture short-term, detailed changes, and the final output is the result of batch normalization of both. The result after adding: (2); in, This represents the output of a large convolution kernel. 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: (3); in It's an expansion ratio. This 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; (4); Finally, a second 1×1 grouped convolution is used to restore the number of channels to the original dimensions to ensure the continuity of the output features with subsequent network modules; (5); 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. (6)。 4. The intelligent detection method based on adaptive feature fusion and separable convolution according to claim 1, characterized in that: Dynamic temporal pooling divides the hidden feature sequence into The algorithm first divides the data into segments, then 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, the th segment... The vector corresponding to the segment Represented as: (7); in This indicates a pooling operation. It is the first A set of time series, where i takes the values 1 and M. , ; First, we introduce a length of... Prototype hidden sequence Used to summarize The high-level features of the segment are then combined with the hidden vectors in time using DTW. Align on the timeline to generate the pooling operation corresponding to that in formula (7). Segment results; 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: (8); in, Represents the cumulative distance matrix middle OK Column elements; (9); in, Representing prototype features With distance vector The distance between them Calculate prototype features and distance vector The cosine similarity, with values ranging from [-1, 1], 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: (10); in By using the idea of a smooth function of max, we introduce... To control the smoothness of path selection, the original non-differentiable process of finding the maximum value is transformed into a differentiable computation process. The specific transformation process is as follows: (11); Therefore, formula (10) expands to: (12); when When =0, It's just a regular DTW, otherwise, It is a differentiable expression; Prototype hidden sequence in the soft-DTW method and hidden vectors Optimal alignment matrix Calculated using the following formula: (13); in It is the cost matrix, the first... Item , representing prototype features and distance vector Distance relationship between them, alignment matrix This represents a path from the start to the end of a sequence, where only the elements on the path are 1, and the rest are 0; It is a set containing all aligned matrices, and the matrix inner product. 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: (14); in This represents the number of time series instances in the training set, which is also the total number of samples in the training data. It is used to calculate the average soft-DTW distance of all time series instances. Let represent the sum of the hidden vectors of all training samples, where Represents the training data set. This represents the processing matrix of the dataset from the original input to the pooled 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
Multi-channel speech enhancement method based on multi-scale spatial information and spectrum feature fusion
CN119889338A
Static IR Drop intelligent prediction system based on heterogeneous feature fusion
CN120046508A