Multi-attribute target detection techniques can accurately obtain the location and attribute information of cats and dogs, thus providing a more effective means of pet management. However, it is difficult to quickly locate dogs and cats in complex environments and accurately identify their fine-grained attributes. To address these issues, this research introduces a streamlined and efficient method for multi-attribute target detection, which firstly uses a lightweight YOLOv7 network (YOLOv7-P) to quickly determine the location of cats and dogs, and excludes the influence of background and other redundant information on classification, and then uses a B-CNN (Bi-Linear Convolutional Neural Network, B-CNN) network to identify the fine-grained attributes of cats and dogs, and improve the cat and dog attribute classification accuracy. The YOLOv7-P network simplifies its structure by utilizing the PConv (partial convolution) module instead of the traditional 3x3 convolution block in the YOLOv7 ELAN structure. Additionally, it incorporates a hierarchical adaptive channel pruning technique that identifies and removes unimportant filters within the most redundant layers, thereby minimizing redundant computations and memory accesses, ultimately enhancing the speed of target detection. In comparison to the original YOLOv7 model, the YOLOv7-P network boasts a significant reduction in parameters by 17.02%, a decrease in GFLOPS by 26.44%, and an impressive 9.50% improvement in FPS. This optimization not only simplifies the network structure but also enhances its efficiency in target detection tasks. The target region localised by YOLOv7-P was fed into the B-CNN network for training and classification, resulting in 98.92% and 92.08% classification accuracy for cat and dog species and breeds in The Oxford-IIIT Pet Dataset dataset, respectively. In essence, the multi-attribute target detection method introduced in this study demonstrates swift and precise capabilities in detecting cats and dogs with multiple attributes in intricate environments. This approach holds considerable practical value and offers broad application prospects.