## 1 Introduction
One study [20] combined visible-near-infrared spectra with LSTM and CNN to propose a prediction model for orange quality, which generally outperformed the CNN-based DeepSpectra and CNN-AT models in predicting five quality aspects of oranges, except for vitamin C content prediction, where it was slightly inferior to DeepSpectra. The Transformer model, emerging and widely applied in various natural language processing tasks, has made significant progress and success in deep learning. Compared with CNNs, Transformers perform better in tasks requiring long-distance dependencies [21]. In recent years, Transformer-based methods have also been proposed for one-dimensional signal classification [22; 23; 24]. Compared with CNNs, Transformers more easily leverage the self-attention mechanism, compensating for CNNs' inherent limitations in long-range dependencies. One study proposed the SpectraTr [11] model based on Transformers for spectral classification, but Transformers have significantly more parameters than CNNs, slower inference speeds, and require more training samples. The combination of CNNs and Transformers has shown significant advantages in recent research. CNNs excel at extracting local features, while Transformers can capture long-range dependencies and global information. This combination has achieved remarkable results and widespread application in image classification and recognition, natural language processing, medical image analysis, and multimodal fusion. One study [25] proposed a lightweight CNN-Transformer model to solve the traveling salesman problem (TSP), combining CNN embedding layers and partial self-attention mechanisms to better learn spatial features from input data and reduce redundancy in fully connected attention models, showing clear performance and accuracy advantages over other deep learning models. Another study [26] similarly combined the strengths of CNNs and Transformers, modeling the time-frequency features of EEG signals through alternating model structures, capturing both local features and long-range dependencies, achieving an ROC curve area (AUC) of 93.5% on the CHB-MIT database. Although spectral data have properties similar to time-frequency sequences, there are currently no models combining CNNs and Transformers applied to spectral analysis tasks. Spectral data characterized by wavelength or frequency amplitudes have properties similar to time-frequency sequences. A hybrid CNN-Transformer spectral classification model, SpectraViT, has been proposed. On a jade ultraviolet spectral dataset, this model outperformed traditional SVM and PLS_DA methods as well as other deep learning classification methods, proving the proposed model to be an effective solution. The model not only has a higher performance but also consumes less computational resources and memory compared to the Transformer model, balancing performance and accuracy. The rest of this paper is organized as follows: the second part introduces the jade ultraviolet spectral dataset and the architecture of the hybrid model, including the inverted residual structure and Transformer. The third part presents the application experiments of the model and discusses the experimental results in detail. The final section provides the conclusion.