Intelligent Counterfeit Detection Through Hybrid Pattern Mining and Blockchain Traceability: A Drug Distribution Case Study

Document Type : Original Article

Authors

1 Faculty of Computer Engineering, University of Isfahan, Isfahan, Iran

2 School of Computer Science and Informatics, De Montfort University, Leicester, United Kingdom

10.22091/jdaid.2025.14633.1023

Abstract

The growing number of exchange points in distribution systems has increased the risk of counterfeit product infiltration, posing serious threats to public health and economic stability. Existing anti-counterfeiting strategies, such as blockchain-based traceability and machine learning–driven anomaly detection, remain constrained by vulnerabilities to data manipulation and limited automation. To address these challenges, this study proposes a hybrid approach that integrates sequential pattern mining with blockchain infrastructure for trajectory-based counterfeit detection. The system applies the PrefixSpan algorithm in combination with the longest common subsequence method to detect anomalous trajectories in product distribution networks. Blockchain technology ensures immutability, transparency, and decentralized validation of distribution records, while smart contracts enable automated anomaly detection. Experimental evaluation on a real-world dataset, supplemented with simulated counterfeit trajectories, achieves an overall accuracy of 87.4% and an F1-score of 0.843, outperforming existing models. Moreover, complexity analysis demonstrates the scalability of the proposed framework by offloading computationally intensive tasks to off-chain processes.

Keywords

Main Subjects


Agrawal, D., Minocha, S., Namasudra, S., & Gandomi, A. H. (2022). A robust drug recall supply chain management system using hyperledger blockchain ecosystem. Computational Biology and Medicine, 140, 105100. https://doi.org/10.1016/j.compbiomed.2021.105100
Amico, A., Verginer, L., & Schweitzer, F. (2024). Tracing opioids across the US: A high-resolution pharmaceutical distribution dataset. Scientific Data, 11(1), 1-8. https://doi.org/10.1038/s41597-024-03534-3
Bapatla, A. K., Mohanty, S. P., & Kougianos, E. (2024). PharmaChain 3.0: Efficient tracking and tracing of drugs in pharmaceutical supply chain using blockchain integrated product serialization mechanism. SN Computer Science, 5(1), 22-32. https://doi.org/10.1007/s42979-023-02510-9
Benatia, M. A., Baudry, D., & Louis, A. (2022). Detecting counterfeit products by means of frequent pattern mining. Journal of Ambient Intelligence and Humanized Computing, 13(7), 3683–3692. https://doi.org/10.1007/s12652-020-02237-y
Datta, S., & Namasudra, S. (2024). Blockchain-based secure and scalable supply chain management system to prevent drug counterfeiting. Cluster Computing, 3(7), 9243–9260. https://doi.org/10.1007/s10586-024-04417-3
Dash, S., Ghugar, U., Godavarthi, D., & Mohanty, S. N. (2024). HCSRL: Hyperledger composer system for reducing logistics losses in the pharmaceutical product supply chain using a blockchain-based approach. Scientific Reports, 14(1), 1-20. https://doi.org/10.1038/s41598-024-61654-7
Ding, J., Li, Y., Li, L., & Jia, L. (2022). Prefix-pruning-based distributed frequent trajectory pattern mining algorithm. Mathematical Problems in Engineering, 2022. https://doi.org/10.1155/2022/3838147
Ghadge, A., Bourlakis, M., Kamble, S., & Seuring, S. (2023). Blockchain implementation in pharmaceutical supply chains: A review and conceptual framework. International Journal of Production Research, 61(19), 6633–6651. https://doi.org/10.1080/00207543.2022.2125595
Hohmann, N., Mikus, G., & Czock, D. (2014). Effects and risks associated with novel psychoactive substances. Deutsches Ärzteblatt International, 111(9), 139–147. https://doi.org/10.3238/arztebl.2014.0139
Jahani, M., Raji, F., & Zojaji, Z. (2025). Securing supply chain through blockchain-integrated algorithmic system: Ensuring product quality and counterfeiting tags detection. Cluster Computing, 28(1), 51. https://doi.org/10.1007/s10586-024-04764-1
Jahani, M., Zojaji, Z., & Raji, F. (2025). Blockchain-driven peer-to-peer system: Elevating trust in pharmaceutical manufacturer selection through BERT-based sentiment analysis. Peer-to-Peer Networking and Applications, 18(3), 159. https://doi.org/10.1007/s12083-025-01975-0
Kellyrx. (2024). How do counterfeit drugs enter the supply chain? https://www.idlogiq.com/how-do-counterfeit-drugs-enter-the-supply-chain/#:~:text=The
Khan, A. A., Laghari, A. A., Baqasah, A. M., et al. (2024). Blockchain-enabled infrastructural security solution for serverless consortium fog and edge computing. PeerJ Computer Science, 10, 1–34. https://doi.org/10.7717/peerj-cs.1933
Kochovski, P., Masmoudi, M., Bouhamoum, R., Stankovski, V., Baazaoui, H., Ghedira, C., Vodislav, D., & Mecharnia, T. (2024). Drug traceability system based on semantic blockchain and on a reputation method. World Wide Web, 27(5), 62. https://doi.org/10.1007/s11280-024-01301-3
Liu, S., Zhang, R., Liu, C., & Shi, D. (2023). P-PBFT: An improved blockchain algorithm to support large-scale pharmaceutical traceability. Computational Biology and Medicine, 154, 106590. https://doi.org/10.1016/j.compbiomed.2023.106590
Mackey, T. K., Liang, B. A., York, P., & Kubic, T. (2015). Counterfeit drug penetration into global legitimate medicine supply chains: A global assessment. American Journal of Tropical Medicine and Hygiene, 92(6), 59–67. https://doi.org/10.4269/ajtmh.14-0389
Mackey, T. K., & Nayyar, G. (2017). A review of existing and emerging digital technologies to combat the global trade in fake medicines. Expert Opinion on Drug Safety, 16(5), 587–602. https://doi.org/10.1080/14740338.2017.1313227
Mazumdar, N., & Sarma, P. K. D. (2025). Sequential pattern mining algorithms and their applications: A technical review. International Journal of Data Science and Analytics, 20(3), 1683–1726. https://doi.org/10.1007/s41060-024-00659-x
Naoum-Sawaya, J., Elhedhli, S., & De Carvalho, P. (2023). Strategic blockchain adoption to deter deceptive counterfeiters. European Journal of Operational Research, 311(1), 373–386. https://doi.org/10.1016/j.ejor.2023.04.031
Nguyen, H. D., Tran, K. P., Thomassey, S., & Hamad, M. (2021). Forecasting and anomaly detection approaches using LSTM and LSTM autoencoder techniques with applications in supply chain management. International Journal of Information Management, 57, 102282. https://doi.org/10.1016/j.ijinfomgt.2020.102282
Nikolic, B., Kartelj, A., Djukanovic, M., Grbic, M., Blum, C., & Raidl, G. (2021). Solving the longest common subsequence problem concerning non-uniform distributions of letters in input strings. Mathematics, 9(13). 1515. https://doi.org/10.3390/math9131515
Rajalakshmi, B., Jayashree, & Dharan, A. (2024). Fake product identification system. In 2024 5th International Conference for Emerging Technology (INCET 2024) (pp. 1–6). https://doi.org/10.1109/INCET61516.2024.10593456
Sharma, P., & Balakrishna, G. (2011). PrefixSpan: Mining sequential patterns by prefix-projected pattern. International Journal of Data Mining and Knowledge Management Process, 2(4), 111–122.
Xiao, L., Huang, G., Pedrycz, W., Pamucar, D., Martínez, L., & Zhang, G. (2022). A q-rung orthopair fuzzy decision-making model with new score function and best-worst method for manufacturer selection. Information Sciences, 608, 153–177. https://doi.org/10.1016/j.ins.2022.06.061
Zwitter, A., & Hazenberg, J. (2020). Decentralized network governance: Blockchain technology and the future of regulation. Frontiers in Blockchain, 3, 12. https://doi.org/10.3389/fbloc.2020.00012.