Barcodes are ubiquitous in manufacturing and logistics, but defects can reduce decoding efficiency and disrupt the supply chain. Existing studies primarily focus on a single barcode type or rely on small-scale datasets, limiting generalizability. We propose Y8-LiBAR Net, a lightweight two-stage framework for multi-type barcode defect detection. In stage 1, a YOLOv8n backbone localizes 1D and 2D barcodes in real time. In stage 2, a dual-branch network integrating ResNet50 and ViT-B/16 via hierarchical attention performs three-class classification on cropped regions of interest (ROIs): intact, defective, and non-barcode. Experiments conducted on the public BarBeR dataset, covering planar/non-planar surfaces, varying illumination, and sensor noise, show that Y8-LiBARNet achieves a detection-stage mAP@0.5 = 0.984 (1D: 0.992; 2D: 0.977) with a peak F1 score of 0.970. Subsequent defect classification attains 0.925 accuracy, 0.925 recall, and a 0.919 F1 score. Compared with single-branch baselines, our framework improves overall accuracy by 1.8–3.4% and enhances defective barcode recall by 8.9%. A Cohen’s kappa of 0.920 indicates strong label consistency and model robustness. These results demonstrate that Y8-LiBARNet delivers high-precision real-time performance, providing a practical solution for industrial barcode quality inspection.
Ultra-short-term electricity load forecasting is crucial for real-time power system operation, but its accuracy is limited by the nonstationary and multiscale characteristics of load data. To address this issue, this study proposes a multi-scale decomposition–clustering and heterogeneous gated fusion framework. The original load sequence is decomposed by ICEEMDAN and then grouped into high-, mid-, and low-frequency components using K-means clustering. MS-gTCN is used to capture high-frequency fluctuations, adaptive DLinear is used to model low-frequency trends, and a gated fusion mechanism is designed for mid-frequency components. A lightweight error correction network is further introduced to reduce residual prediction errors. Experiments on two real-world datasets show that the proposed method achieves the best performance across 1-, 4-, 8-, and 12-step horizons. For the 12-step task, it reduces MAE by 29.3% on Dataset A and 26.2% on Dataset B compared with the second-best baselines. Compared with ICEEMDAN-LSTM on Dataset A, it reduces MAE by 17.7% and improves from 0.9127 to 0.9418. Ablation, sensitivity, significance, and complexity analyses further verify the effectiveness, robustness, and real-time feasibility of the proposed framework.
Background: Implementing automatic classification of short texts in online healthcare platforms is crucial to increase the efficiency of their services and improve the user experience. A short text classification method combining the keyword expansion technique and a deep learning model is constructed to solve the problems of feature sparsity and semantic ambiguity in short text classification. Methods: First, we use web crawlers to obtain patient data from the online medical platform “Good Doctor”; then, we use TF-IWF to weight the keyword importance and Word2vec to calculate the keyword similarity to expand the short text features; and then we integrate the cue learning and deep learning models to construct a self-adaptive attention model to solve the problem of sparse features and unclear semantics in short text classification in the adaptive-attention-Prompt-BERT-RCNN model to realize effective classification of medical short texts. Results: Empirical studies show that the classification effect after keyword expansion is significantly higher than that before expansion, the accuracy of the model in classifying medical short texts after expansion is as high as 97.84%, and the model performs well in different categories of medical short texts. Conclusions: The short text expansion methods of TF-IWF and Word2vec make up for the shortcomings of not taking into account the keyword rarity and the contextual information of the subwords, and the model can achieve effective classification of medical short texts by combining them. The model further improves the classification accuracy of short text by integrating Prompt’s bootstrapping, self-adaptive attention’s keyword weight weighting, BERT’s deep semantic understanding, and RCNN’s region awareness and feature extraction; however, the model’s accuracy in individual topics still needs to be improved. The results show that the recommender system can effectively improve the efficiency of patient consultation and support the development of online healthcare.