NFC Internet of Things liquor anti counterfeiting system solution

Mondo Technology Updated on 2024-01-31

With the improvement of living standards, modern people are increasingly pursuing the quality of life, and the pursuit of safety and health is an important aspect. Nowadays, there are a large number of counterfeit and shoddy products in consumer goods that are related to people's daily life, which seriously affects people's health. In order to help consumers identify counterfeit and shoddy products on the market, and also for people's health considerations, this paper designs a set of anti-counterfeiting system for people's daily consumption of liquor, which is based on RFID, because the label has a unique electronic code since it is manufactured, which is difficult to imitate, so as to greatly help consumers improve identification, buy regular liquor, and reduce the harm of counterfeit and shoddy products to people's health.

RFID (Radio Frequency Identification) technology is a wireless communication technology that can automatically identify the target object through radio frequency signals, and obtain the relevant data of the target object, and then complete the input and further processing of the information. Due to its small size, fast scanning speed, strong anti-pollution ability, and the fact that it stores electronic information, the data content can be protected by a password set by the user, making it difficult for the data to be forged and stolen by criminals. Therefore, in recent years, it has attracted more and more attention and application.

The whole RFID system is composed of three parts: the identifier, the electronic tag and the application software used by the user. The specific working principle can be summarized as: RFID tags are divided into active and passive, when the tag enters the magnetic field, receives the RF signal sent by the recognizer, relies on the induced current to generate energy, and then the passive tag sends out a certain information stored in the chip, or the active tag actively sends a signal of a certain frequency, the recognizer reads the returned information and decodes, and then the system carries out further data acquisition and a series of operations according to the unique ID and other information obtained.

WebService is an API that can be called through the Web, that is, it exposes an interface to the outside world, which is an independent, low-coherence, programmable Web-based application. The use of the entire webservice needs to involve the client and the server, corresponding to the deployment and invocation respectively. If you look at it further, WebService is a platform for interoperable distributed applications, and of course this platform has its own standards that define how applications interact and operate on the Web. Moreover, WebService is also cross-platform, can be developed in multiple languages, and WebService can be deployed on multiple platforms, which can be called through standard output interfaces, so as to realize the interaction between different systems.

The system is mainly composed of three modules, namely the background database, the web server, and the NFC-enabled mobile terminal, which are related to each other and work together. The whole system process can be summarized as follows: liquor manufacturers paste a unique RFID tag for each bottle of liquor when the liquor leaves the factory, of course, to ensure that the label cannot be transplanted at will, and connect to the server through the terminal to add or modify the information corresponding to the RFID tag in the database, and dealers at all levels also need to add data when purchasing goods to track and trace the source of liquor. When consumers purchase this product, customers can use the terminal to scan and view the product and traceability information of this liquor to ensure that it comes from a regular manufacturer and ensure the quality of the liquor.

3.1 Backend database design

SQL Server is a relational database management system designed by Microsoft as a server-side backend database that mainly uses SQL Server. Due to its advantages of easy use, good scalability and high software integration, it has been widely used and recognized in software systems.

According to the needs of the project and the particularity of liquor packaging, the database designed after analysis is finally determined, including user information RDID label information table, liquor product information table, liquor packaging information table, and input information table.

Due to the particularity of liquor packaging, in order to facilitate user inquiry, the association between the box and the bottle is carried out, and the RFID tags of all liquor products in the box can be queried through the RFID tag of the box, and the wine product information can be further queried. The user information table includes manufacturers and distributors at all levels, and only existing users can add or modify information to the database. The RFID tag is used as a unique ID to associate with other tables, first of all, all kinds of information of the wine product are associated with the RFID tag, and the packaging information is associated with the corresponding RFID tag, and the corresponding relevant information is found through the D of the RFID: the scanning information table, including the user, time, place, remarks and other information scanned by the ID of the RFID, and is associated with the wine product information or packaging box information through the RFID, and is associated with the scanning user through the USEID. When the user scans, if the box is scanned, the box and bottle association operation is carried out, and the box and all the associated liquor product information and traceability information are queried: if the bottle of liquor is scanned, the liquor information is displayed, and the traceability and product information of the liquor are listed. If the user scans with no results, or cannot find such wine products and traceability information, it means that there is a serious problem with such wine products and should be purchased with caution.

3.2. Server-side design

The server uses web service technology, which can facilitate the efficient and fast exchange of data, and is written in j**a language, because j**a is an object-oriented language and has cross-platform characteristics, which can be run on any system. The main function of the server is to add, delete, modify and query the database, process the data according to the user's request, and return the result.

For example, when a consumer makes a liquor query, according to the request, the server needs to query the input information table and the liquor information table according to the D of the RFID tag, and the query result is divided into two parts: one is the traceability information of the liquor, and the server needs to sort the data information according to the time point: the other is the information of the liquor. It is then returned to the terminal, which displays it by category.

3.3. Mobile terminal design

The mobile terminal is mainly a mobile phone that supports NFC, and the main module functions are divided into liquor manufacturers, distributors at all levels, and consumers according to the user category. The first two use need to be logged in, and the operation can only be carried out after successful verification, and consumers only need to scan and query information, and there is no permission to add and modify.

The Android system occupies a high proportion in the mobile terminal, and according to this system, it can be developed in the mode of MVP+DAGGER2+RXJ**A+RETROFIT. MVP is an emerging software development paradigm that has stood the test of time and is a decoupled framework that everyone agrees on. It not only makes our logic clearer, but also cooperates with each other to serve our projects. The mode layer is responsible for the processing of local data and network data, the presenter layer is responsible for the processing of business logic, and the view layer is responsible for the display of the i interface, which reduces the direct interaction between the view layer and the model layer, but realizes the intermediate interaction logic through the presenter.

Dagger2 is a dependency injection framework on the Android side, according to the idea of dependency injection, you can not create objects through the new way, but through the injection to hand over the object custody rights to the container unified management, and when needed directly from the container (if the traditional way through the EW way to create instance objects, when the class constructor or internal changes, every new place needs to be changed, the workload can be seen. However, when managed by dependency injection, it can be achieved with very little overhead).

rxj**a+retrofit is constructed into a network layer framework, the two perfectly cooperate with the data interaction between the client and the server, and rxj**a is responsive programming, which is convenient to switch processing threads when retrofit provides network services, which greatly facilitates the development of the client network layer.

Source: Electronic Technology & Software Engineering.

Original title: Design of liquor anti-counterfeiting system based on RFID and Web Service.

Author: Zhao Weizhen, Tong Weijian, Gao Li.

Related Pages