An automated alarm system for food safety by using electronic invoices

Autoři: Wan-Tzu Chang aff001;  Yen-Po Yeh aff003;  Hong-Yi Wu aff002;  Yu-Fen Lin aff003;  Thai Son Dinh aff002;  Ie-bin Lian aff001
Působiště autorů: Data Science Research Center, National Changhua University of Education, Changhua, Taiwan aff001;  Institute of Statistics and Information Science, National Changhua University of Education, Changhua, Taiwan aff002;  Changhua County Public Health Bureau, Changhua, Taiwan aff003;  Innovation and Policy Center for Population Health and Sustainable Environment, College of Public Health, National Taiwan University, Taipei, Taiwan aff004
Vyšlo v časopise: PLoS ONE 15(1)
Kategorie: Research Article



Invoices had been used in food product traceability, however, none have addressed the automated alarm system for food safety by utilizing electronic invoice big data. In this paper, we present an alarm system for edible oil manufacture that can prevent a food safety crisis rather than trace problematic sources post-crisis.

Materials and methods

Using nearly 100 million labeled e-invoices from the 2013‒2014 of 595 edible oil manufacturers provided by Ministry of Finance, we applied text-mining, statistical and machine learning techniques to “train” the system for two functions: (1) to sieve edible oil-related e-invoices of manufacturers who may also produce other merchandise and (2) to identify suspicious edible oil manufacture based on irrational transactions from the e-invoices sieved.


The system was able to (1) accurately sieve the correct invoices with sensitivity >95% and specificity >98% via text classification and (2) identify problematic manufacturers with 100% accuracy via Random Forest machine learning method, as well as with sensitivity >70% and specificity >99% through simple decision-tree method.


E-invoice has bright future on the application of food safety. It can not only be used for product traceability, but also prevention of adverse events by flag suspicious manufacturers. Compulsory usage of e-invoice for food producing can increase the accuracy of this alarm system.

Klíčová slova:

Decision trees – Machine learning – Neural networks – Oils – Safety – Support vector machines – Text mining – Food chains


1. Wyber R, Vaillancourt S, Perry W, et al. Big data in global health: improving health in low- and middle-income countries. Bull World Health Organ. 2015; 93(3): 203–208. doi: 10.2471/BLT.14.139022 25767300

2. Marvin HJ, Janssen EM, Bouzembrak Y, Hendriksen PJ, Staats M. Big data in food safety: An overview. Critical Reviews in Food Science and Nutrition. 2017;57(11):2286–2295. doi: 10.1080/10408398.2016.1257481 27819478

3. Kannan V, Shapiro MA, and Bilgic M. Hindsight Analysis of the Chicago Food Inspection Forecasting Model. Presented at the AAAI Fall Symposium Series (FSS) 2019: Artificial Intelligence in Government and Public Sector. Arlington, Virginia, USA.

4. Spink J. and Moyer D. C. Defining the Public Health Threat of Food Fraud. Journal of Food Science.2011; 76(9):R157–63. doi: 10.1111/j.1750-3841.2011.02417.x 22416717

5. Fritsche J. Recent Developments and Digital Perspectives in Food Safety and Authenticity. Journal of Agricultural and Food Chemistry, 2018;66 (29), 7562–7567. doi: 10.1021/acs.jafc.8b00843 29920081

6. Marvin HJP, Bouzembrak Y, Janssen EM, van der Fels-Klerx HJ, van Asselt ED, Kleter GA. A holistic approach to food safety risks: Food fraud as an example, Food Research International. 2016; 463–470. doi: 10.1016/j.foodres.2016.08.028 28460939

7. Bouzembrak Y, Steen B, Neslo R, Linge J, Mojtahed V, Marvin H.J.P. Development of food fraud media monitoring system based on text mining, Food Control. 2018; 93; 283–296. doi: 10.1016/j.foodcont.2018.06.003

8. Verhaelen K., Bauer A., Günther F., Müller B., Nist M., Ülker Celik B., et al. Anticipation of food safety and fraud issues: ISAR—a new screening tool to monitor food prices and commodity flows. Food Control. 2018;94; 93–101. doi: 10.1016/j.foodcont.2018.06.029

9. Ko W. H. Food suppliers' perceptions and practical implementation of food safety regulations in Taiwan. Journal of Food and Drug Analysis.2015; 23: 778–787. doi: 10.1016/j.jfda.2015.05.006 28911495

10. Peng G.H., Chang M.H., Fang M., Liao C.D., Tsai C.F., Tseng S.H., et al. Incidents of major food adulteration in Taiwan between 2011 and 2015, Food Control. 2017;72: 145–152.

11. Food and Drug Administration Ministry of Health and Welfare. (2013). Sanitation standard for edible oils. = 518&lawid = 123 Accessed 08.06.19.

12. Bhattacharya A. B., Sajilata M. G., Tiwari S. R., & Singhal R. S. Regeneration of thermally polymerized frying oils with adsorbents. Food Chemistry.2008;110:562–570.

13. Li J.H., Yu W.J., Lai Y.H., Ko Y.C. Major food safety episodes in Taiwan: Implications for the necessity of international collaboration on safety assessment and management. Kaohsiung J Med Sci. 2012;28(7): S10–6. doi: 10.1016/j.kjms.2012.05.004 22871595

14. Ministry of Health and Welfare/Food Drug Association (MOHW/FDA). Act Governing Food Safety and Sanitation. 2014. Available from: = L0040001.

15. Lu, J.S. E-Invoice, Ministry of Finance/Financial Data Center. 2012. Available from:

16. Zhang J. and Bhatt T., A Guidance Document on the Best Practices in Food Traceability. Compr. Rev. Food Sci. Food Saf.2014;13:1074–1103.

17. Charlebois S., Sterling B., Haratifar S., Naing S.K., Comparison of global food tra-ceability regulations and requirements, Comprehensive Reviews in Food Science and Food Safety. 2014; 13:1104–1123.

18. Statistical Analysis System. SAS® Text Miner 14.3: Reference Help. Cary, NC: SAS Institute Inc. 2017.

19. Ministry of Health and Welfare/Food Drug Association (MOHW/FDA). Taiwan Food and Drug Administration 2015 Annual Report, page 115. = f636694230125946085 Accessed 10.26.19.

20. Bijalwan V., Kumar V., Kumari P., Pascual J. KNN based machine learning approach for text and document mining. International Journal of Database Theory and Application. 2014;7:61–70.

21. Kotsiantis S, Supervised Machine Learning: A Review of Classification Techniques, Informatica Journal. 2007; 31:249–268.

22. Farnaaz N, Jabbar MA. Random forest modeling for network intrusion detection system. Procedia Comput. Sci. 2016; 89:213–217.

23. Albukhanajer W.A., Jin Y., Briffa J.A. Classifier Ensembles for Image Identification Using Multi-objective Pareto Features. Neurocomputing. 2017: 238: 316–327.

24. Richterich A.Using Transactional Big Data for Epidemiological Surveillance: Google Flu Trends and Ethical Implications of ‘Infodemiology’. In: Mittelstadt B., Floridi L. (eds) The Ethics of Biomedical Big Data. Law, Governance and Technology Series. 2016;29: 41–72. Springer, Cham

25. Astill J, Dara RA, Campbell M, Farber JM, Fraser E.D.G, Sharif S, et al. Transparency in food supply chains: A review of enabling technology solutions, Trends in Food Science & Technology. 2019; 91:240–247. doi: 10.1016/j.tifs.2019.07.024

26. Messer KD, Costanigro M, Kaiser HM. Labeling Food Processes: The Good, the Bad and the Ugly, Applied Economic Perspectives and Policy. 2017;39(3): 407–427. doi: 10.1093/aepp/ppx028

Článek vyšel v časopise


2020 Číslo 1
Nejčtenější tento týden