Development of Inventory Management System Based on Radio Frequency Identification Technology

We present an inventory management system that is utilized to automatically check the tools and equipment in industrial plants and warehouses. The system utilizes radio frequency identification (RFID), a cloud database (MySQL), an Android-based application program (app), and a PC-based computer program to construct a real-time raw material inventory system. RFID tags are attached to the tools and equipment and connected to a network via the Internet of Things (IoT). Experimental results demonstrate that the system reduces labor costs and human errors in an industrial plant.


Research motivation
In 1995, Bill Gates proposed the concept of the Internet of Things (IoT), where every device can be connected via a network. In 1999, the successful development of radio frequency identification (RFID) technology enabled device identification information to be stored in an RFID chip. After Auto-ID Technology Limited proposed the IoT architecture based on RFID technology, the International Telecommunication Union (ITU) declared the beginning of the IoT era in the Internet Report 2005. (1) The IoT has been widely used in many fields. For example, RFID technology is utilized to manage goods and materials in warehouses and logistics. The technology connects the network to a database and provides a communication interface between suppliers and consumers. Other businesses including manufacturers and medical companies also use the IoT to manage articles and staff. Recently, an increasing number of applications related to the IoT have been developed to increase efficiency and convenience in other fields.

Research background
Despite the convenience provided by the IoT, it is not suitable for all workplaces and industrial applications, but it is suitable for systems based on RFID technologies. RFID provides a convenient labeling approach where a large number of RFID labels can exist at the same time. The labels can be modified in real-time and the data can be transferred to a database for collection via different media. However, owing to its physical architecture and properties, RFID is not suitable in many environments, for example, in buildings surrounded by metallic structures or environments with strong electromagnetic interference, as well as damp and warm environments.
In this work, we propose the development of a system utilizing RFID technology on an IoT architecture and compare the properties, effects, and costs of different types of IoT architecture. The proposed system is based on the operation and inventory within an environment easily affected by electromagnetic interference. Experiments and tests were conducted to determine an optimal implementation of the system.

Literature Review
RFID is a technology for wireless communication. It identifies a specific target via wireless signals to read or write data without establishing mechanical or optical connections between the identification system and the specified target. The traditional RFID system includes electronic tags, tag readers or antennas, and application systems. (2) Domdouzis et al. reviewed examples of RFID-related applications to demonstrate the use of the technology in various fields. (3) There are many research papers related to RFID applications. Lee et al. proposed a mobilebased RFID reader to extend RFID applications. (4) The reader is composed of a dongle-type RFID reader attached to a mobile phone. The reader transfers tag information via the wireless network of the mobile phone. The design differs from that of the traditional method wherein a reader must be physically connected to the host via a network wire. The newly designed Nokia 5140 phone has a built-in RFID reader. Nokia has also developed an RFID tool kit for users to design customized applications. In recent years, the combination of RFID technologies and mobile phones has promoted the development of many new and convenient applications. (5) In 2012, a sensor-enabled RFID system was proposed for monitoring the actions and postures of a patient suffering from apoplexy and arm injuries. (6) The system utilizes an active RFID tag, an accelerometer, a radio receiver, and a radio transmitter to sense the movement of a coffee cup held by the patient. A radio transmitter and an accelerometer are attached to the coffee cup, and the RFID reader is attached to the monitored arm. The accelerometer measures the time required for the patient to move the cup between specified locations. The remote RFID reader receives the signal of the active tag after the completion of the movement and indicates which patient has performed the movement.
A position estimation method using RFID tags was proposed for indoor navigation by Nakamori et al. (7) The system estimates the positions of the RFID tags on the basis of their proximity and continuous movements. The system generates communication area models by rotating the RFID reader and utilizes the intersection of two area models to find the positions of RFID tags. A systematic scheme was proposed to provide practical guidance and increase the reliability of RFID system designs. The scheme has four major parts: estimation of the read range/capability of an RFID system, deployment of the redundant RFID components, deployment of the RFID system, and correction of the reading error. (8) The scheme helps RFID engineers or users to effectively design an RFID system with the required object detection reliability for real applications.
More RFID applications in industry, business, and medicine have been developed to improve the production capability, shorten the processing time, and reduce human errors. Hou and Huang applied RFID to the printing industry and performed cost and profit quantitative analyses to apply RFID in different logistic activities. (9) Ali and Haseeb studied the effects of applying RFID to textile and clothing industries in supply chain operations and helped operators resolve associated trade issues. (10) Janz et al. collected data via RFID tags placed on patients. The data can be used to improve medical procedures, decisions, and resource management. (11) The proposed system utilizes the RFID for inventory management. (12) It also utilizes mobile phones to connect the RFID reader used for communication with the remote cloud database via a wireless network. Bagchi et al. proposed using RFID in inventory systems for rapid data transfer, thereby avoiding overstocking or understocking and reducing the total inventory cost. (13) Neustupa et al. proposed setting the RFID system data and the internal messaging system of the asset owner's company to implement automatic inventory management and asset protection. (14) However, the complexity of the application environment compromises RFID applications.
Furthermore, we utilized a PHP: Hypertext Preprocessor (PHP) base to build a website. (15) PHP is an open source general-purpose scripting language. The website is utilized to facilitate data management and access in the cloud database. We also utilized an application programming interface (API) to ensure data security during data access. (16)

Proposed system architecture
The application scenario of the proposed system is a plant with multiple control devices and computers. The inventory period of the equipment in the plant is one quarter, and the records of the inventory results are stored in a computer. The processes of the inventory are described as follows.
(1) Generation of an inventory list: The inventory list is obtained from the purchase system, which records the equipment information such as the purchase date, period of use, price, and location. (2) Checking of the inventory list: The inventory clerk carries the list and checks the equipment on the list. The checking processes determine whether the type and the deposited location of the equipment are the same as the registered data. (3) Confirmation of the inventory: After the checking processes, the results are used to update the information of equipment or record the status of the current storage. (4) Completion of the inventory check: After comparing the results with the inventory list, a new inventory list is generated and stored for the checking of the plant equipment in the next inventory check. Figure 1 presents the proposed inventory system to check the equipment of the plant with reduced labor cost. Furthermore, we utilized the inventory list stored on a mobile phone before performing the checking processes. There is a wireless connection between the RFID reader and the mobile phone. An RFID tag is attached to each piece of equipment in the plant. The clerk performs the checking processes according to the information recorded in the inventory list. The RFID reader receives the serial number of the RFID tag after the reader sends the response signal to the tag. A tag number is associated with a specific piece of equipment. Once the reader receives a tag number, the corresponding equipment in the inventory list is labeled as "Checked" or "No such equipment".
After completing the checking processes for the equipment within the plant, all of the equipment should be checked and labeled in the inventory list. The clerk sends the checked list to the remote server via the mobile phone network. The remote system has a new list with the information of all of the equipment within the plant. The equipment manager can look up the status of the equipment and report it to their supervisor to assist in making purchase or maintenance decisions. Because almost all of the inventory processes are automatic through the use of the IoT, the proposed system architecture can reduce the labor cost and human errors.

System hardware
The proposed system consists of several hardware devices including the RFID tag and reader, mobile phone, wireless access point, and cloud database server. These devices are all deployed in the system to perform inventory functions. The communication between any two devices is via a wired or wireless network. Figure 2 shows the network connections between different devices in the proposed system. For example, the RFID reader communicates with the RFID tag attached to the equipment during the checking processes. The RFID tag returns a serial number to the RFID reader via the UHF network. The serial number read by the RFID reader is then transmitted to the mobile phone via a Bluetooth 2.0 network. A checked inventory list is transmitted to the cloud server through an 802.11 Wi-Fi wireless network. A wireless access point transfers the packets between the mobile phone and the cloud server using an 802.11 Wi-Fi network and an Ethernet network. The cloud server executes programs including the network connection program with the console and the mobile phone, webpage management interface, and inventory database. Upon initialization, the proposed system performs network connection tests between devices that need to transmit information.

System software
Hardware devices are deployed to transfer the equipment information for the inventory processes. Software programs are also used to check the equipment types and quantities in the plant. Figure 3 shows the software architecture of the proposed system. The inventory list generation program gathers the equipment information of the plant and generates the checklist for the clerk to perform the inventory processes. The mobile-based application program (app) downloads the checklist from the remote computer and displays it on the mobile phone for the clerk. A new inventory list is used to update the database in the cloud server after the inventory processes.
The three major parts of the software application related to the proposed system are described as follows.
(1) Database Management Interface: The interface is designed for the manager to process the equipment information and provides functions such as searching, recording, and updating the equipment information in the database of MySQL.

System security
The operation of the proposed system requires a wireless network connection, which may be attacked by hackers. The proposed system performs data write and read via an API to avoid data breaches, as shown in Fig. 4. The system uses the Representational State Transfer (REST) for API development. The API can access resources via a URL.
Personnel authentication is required for resource access via the API. Data access is denied when the authentication fails to ensure the security of back-end data. Personnel authentication is achieved using a JSON Web Token to ensure the identity of the personnel. In addition, we examine the source code to check for vulnerabilities and perform improvements to guarantee system security.

Hardware operation procedures
The inventory system's hardware structures include a Bluetooth RFID reader, RFID tags, tablets (or smartphones), wireless network routers, and server hosts. More specifically, a tablet and a Bluetooth RFID reader can be combined into a single handheld inventory device. When using the system to perform inventory operations, the tablet and Bluetooth RFID reader conduct wireless communications over the Bluetooth network. The handheld inventory device and the server host communicate via the wireless network. The wireless network router is used to send the data from the handheld inventory device to the server host or download the checklist file to the tablet for inventory operations.
The RFID tags are activated by the electromagnetic signals from the handheld RFID reader and transmit data back to the handheld RFID reader for collection and processing. The hardware operation procedures are shown in Fig. 5.

Software operation procedures
The main core of the inventory system is its software; therefore, the selected RFID readers and tags are all programmable and can be adapted according to reading approaches and efficiencies. The software programs developed in this work includes mobile and computer apps.

A. Mobile app procedures
In this work, tablets or smartphones with the Android operation system are selected for development and Android Studio is chosen as the development environment. The application enables users performing inventory operations in the warehouse to connect to and control the handheld reader.
The user is connected to the handheld RFID reader through the program's UI, which also allows the user to access the inventory task list via the network. The task list is downloaded and saved automatically by the system before the inventory operations so that the user can conveniently access the inventory tasks. The reduction in the number of user operations further reduces the possibility of human errors. The procedures are shown in Fig. 6.

B. Computer app procedures
The computer app is developed using Windows Server 2019 as the server host and Microsoft Visual Studio 2017 as the development platform. The computer app allows the selection and addition of the required inventory and tools from the program's UI before the user begins the inventory operations in a warehouse. The updated inventory is automatically generated and uploaded to the web server by the app. Once the inventory operations have been completed, the application program can print out the list. The main function of the program is to automatically fill in the list of inventories for the raw materials or tools on the basis of the company's corresponding standard templates. The entire process is performed electronically and the procedures are shown in Fig. 7.

RFID tag types
Several industrially designed and manufactured RFID tags are selected for testing to determine their differences and effects. The features of UHF RFID allow one or multiple RFID tags to be read by a single RFID reader simultaneously. The handheld RFID reader used in this work is the AWID HB-2000 reader and Table 1 shows the RFID tags selected for testing.

RFID tag reading range
The experiment is performed specifically for a single RFID tag, where the handheld reader scans the tag multiple times to determine the readability of the tag. Six different types of tag are tested with each scan lasting 5 s and the tag remaining stationary during the scan. A successful read is determined if the RFID tag is read during the scan; otherwise, it is a failed read. The reading distance is defined as the distance between the RFID reader and the tag. There are 10 different reading distances in the experiment: 1, 5, 10, 20, 30, 40, 50, 60, 70, 80, and 90 cm. The RFID reader attempts to read the tag 10 times for each reading distance. Figure 8 shows the experimental results for the six different types of RFID tag.  Short reading range, can be applied to short-range inventory and storage systems.
Anti-metal Has a longer antenna but cannot be used for long-range applications.
Metallic material, can be used for short-range applications with anti-metal interference requirements.

Anti-metal, ceramic
Outer casing is non-conducting, can be used on PCB.
Ceramic material, can be used for mid-to long-range applications where the medium may be conductive.

Anti-metal, ceramic (lengthened)
Outer casing is non-conducting, can be used on PCB, easy to read but with short reading ranges.
Ceramic material, can be used in medium-and longdistance environments where the medium may conduct electricity.
Flexible, long-range, anti-metal Outer casing is non-conducting, can be used on PCB, easy to read with a long reading range.
Suitable for applications with long reading ranges.

Sticker
Flexible label for easy attachment, short reading ranges.
Suitable for attachment onto irregularly shaped casings but can only be used for short-to mid-range applications.
The differences in the reading distances with respect to the material and type of RFID tag are shown in the collected data. We summarize the properties and suitable applications of each type of RFID tag in Table 2.

Base material reading distance
The experiment is performed specifically for a single RFID tag attached to a particular type of material and the handheld reader scans the tag multiple times to determine the readability of the tag. Six different types of tag are attached to three different materials: plastic casing, metallic casing, and a PCB. Each scan lasts 5 s and the tag remains stationary during the scan. A successful read is determined if the RFID tag is read during the scan; otherwise, it is a failed read. There are 10 reading distances in the experiment: 1,5,10,20,30,40,50,60,70,80, and 90 cm. The RFID reader attempts to read the tag 10 times for each reading distance. Figures 9-14    show the experimental results for the different types of base material with respect to the reading distance for each of the six types of tag.
The differences in the reading distances among the base materials and types of RFID tag are shown in the collected data. We summarize the effectiveness of each type of RFID tag and its suitable environments and applications in Table 3.

Maintenance for security vulnerabilities
We discuss the security vulnerabilities commonly encountered during the development of the proposed system and how these vulnerabilities are managed.

A. Reflected XSS cline
Reflected cross-site scripting (XSS) attackers use social engineering techniques to rewrite web pages and insert malicious scripts disguised as the original website. We modify the  program's transmission type to object to avoid modifications and prevent this type of vulnerability.

B. Second-order SQL injection
Database queries need to use SQL query statements to communicate with the database engine. As a result, an attacker can directly access or delete all sensitive data from the system and bypass identification authentications. We use parameterized strings to deal with this vulnerability. C. Stored XSS This type of vulnerability is mainly due to not encoding the data embedded into the database. As a result, the attacker can legally access the applications and submit data to the database, and the malicious data is accessed by subsequent users. We deal with this type of vulnerability by objectifying the text returned by the program.

Conclusions
The proposed inventory system efficiently checks equipment while reducing the labor requirement. The system is a low-cost, high-efficiency system that generates the inventory list from the cloud server database and performs the inventory processes using RFID technology. The system reduces the time required for the inventory process as well as human errors by automatically comparing the inventory list against the equipment information stored in the database. Extremely small and difficult to read but suitable for embedding into small items.

Anti-metal
Anti-metal, anti-electromagnetic interference, outer casing is conductive, unsuitable for attaching to devices with conduction risks.
Metallic materials, environments with strong electromagnetic interference.
Suitable for attaching to PCBs or devices with conduction risks, can also be used for metallic materials. Anti-metal, ceramic (lengthened) Anti-metal, anti-electromagnetic interference.
Suitable for attachment to PCBs or devices with conduction risks. Flexible, long-range, anti-metal Anti-metal, anti-electromagnetic interference.
Suitable for attachment to PCBs or devices with conduction risks; can be used for long-range reading.

Sticker
Flexible label for easy attachment.
Suitable for attachment onto irregularly shaped casings but not resistant to metallic or noise interference.