## 3 PQD Classification Model Based on Lightweight DenseNet
### Overall Framework Construction for PQD Classification  
Leveraging the imaging advantages of the LT-based visualization method and the high training efficiency and strong deep feature extraction capability of the L-DenseNet-CBAM fusion model, this paper proposes a novel PQD classification algorithm based on LT and lightweight DenseNet. The overall classification framework is illustrated in Figure 5 and consists of four main components: the signal visualization module, the dense connected learning module, the attention mechanism module, and the classification module. 1. Signal visualization module: Firstly, the ideal reference signal UISP is constructed using (1). The values of the UISP and the PQD temporal sequence sampling signal at the same time point serve as the horizontal and vertical coordinates in a Cartesian coordinate system, respectively, for curve synthesis, thereby generating the LT representation corresponding to the target PQD signal. Then, the synthesized LT is mapped onto a fixed-size image space and normalized using a unified coordinate range to generate a two-dimensional image with a resolution of 128 \(\times\) 128 pixels and three RGB channels. This method indirectly enhances the classification accuracy of PQDs at the data representation level by generating two-dimensional trajectory images with clear and distinguishable features. 2. Dense connected learning module: This module comprises DBs and transition layers. RGB feature maps undergo convolution and dimension reduction via \(7\times 7\) convolution layers and \(3\times 3\) max-pooling layers to extract shallow feature information. Following feature extraction, the feature information needs to traverse three sets of DBs, with a transition layer connecting every two sets of DBs. When passing through DBs, feature reuse is performed on feature maps from different layers in the channel dimension based on a dense connection mechanism, which is conducive to the extraction of deeper feature information and the combination of shallow- and deep-layer information in the network, which greatly improves feature utilization. Meanwhile, transition layers are introduced to reduce feature dimensions, which reduces network parameter redundancy and enhances the overall efficiency of the model's learning and computation. Figure 4: Structure of the CBAM attention mechanism module. Attention mechanism module: Adding the CBAM attention module between the dense connection learning module and the classification module of DenseNet-S can effectively enhance the network's recognition precision, as evidenced by extensive experimentation. The feature map, \(F\), output by Dense Block 3 enters the CAM module, where max-pooling and average-pooling operations are performed, resulting in two \(1\times 1\times 552\) one-dimensional feature vectors. Then, the two feature vectors are sent into the full connection layer for calculation and the sum operation. After the activation operation, the CAM module generates channel attention weights, \(M_{\text{CAM}}\), which are then multiplied with the feature map, \(F\), to derive \(F_{1}\), which is the input feature map for the SAM module. In the SAM module, the feature map, \(F_{1}\), undergoes separate max-pooling and average-pooling operations according to spatial position, and the two results are spliced to generate an \(8\times 8\times 2\) feature map. Subsequently, this map undergoes dimensional reduction through a 1-channel convolution layer. The spatial attention weight, \(M_{\text{SAM}}\), is then obtained via Sigmoid function activation. Ultimately, the feature obtained by multiplying the weights, \(M_{\text{SAM}}\), with the input feature map, \(F_{1}\), represents the feature enhanced by CBAM. 4. Classification module: This module consists of an adaptive average-pooling layer, two fully connected layers, and a Softmax classifier. Firstly, the feature maps enhanced by CBAM are converted into one-dimensional feature vectors using adaptive average pooling, which are then input into the fully connected layer.