- Open Access
The research of the application of the binary search algorithm of RFID system in the supermarket shopping information identification
EURASIP Journal on Wireless Communications and Networking volume 2019, Article number: 27 (2019)
The traditional bar code scanning in supermarkets is inefficient, which has been unable to meet the further development of a supermarket. To meet the needs of quick shopping in supermarkets, binary search algorithm has been proposed to prevent from anti-collision, which makes it faster to scan and identify the goods. On this basis, the goods which have not been checked out will be scanned again to obtain security. Besides, it plays an important role in the supermarket shopping system to achieve the functions of self-purchase and membership scheme. For the RFID supermarket shopping system, the test of the checkout efficiency, product recognition rate, and security were done. The result showed that the binary search algorithm had good accuracy in the RFID supermarket shopping system. The result also proved the rationality of the RFID supermarket shopping system, which can meet the daily needs of supermarkets. The method was applying the emerging technology into the traditional supermarket shopping system, which improved the profitability and management level of supermarkets.
Nowadays, going shopping in supermarkets has become one of the main channels for people’s daily consumption. A large number of daily necessities and household goods almost can be bought in the supermarket . But now, the low efficiency of checkout in the large-scale supermarket leads to the high labor cost. On the other hand, for customers, the low efficiency of checkout and waiting too long will make them dissatisfied with the supermarket business model, especially in the peak of shopping. For example, on December 12, 2015, a large number of customers were waiting to check out, which reduced the amount of potential goods customers would buy and restricted the footfall of supermarkets [2, 3]. To solve the problem, large-scale supermarket had no other choice but to increase the number of checkout stands. But it was still unable to meet the needs of customers.
Radio frequency identification (RFID) is an automatic identification technology, which combines wireless communication technology with LSI. The technology of bar code has been applied into the field of scanning widely and it is continuing to mature, but the finiteness of storage spaces that determines the bar code only can be applied into the identification of the type of products . Compared with bar code technology, RFID technology has some advantages of large storage space, reusability, and environmental adaptability. Even if the cost of RFID tag is higher than the bar code, as the RFID technology is becoming more and more perfect, the RFID tag will take the place of bar code and will be widely used in the commercial chain. Therefore, RFID is proposed to be used in supermarket shopping system and will take the place of bar code scanning system, but in practice, a large number of electronic tags should be identified at the same time, which there would be the problem of collisions [5,6,7]. Currently, the method to solve the problem is time division multiple access (TDMA) . In many radio technology methods to solve the problem of collisions, TDMA is widely used in the field of digital mobile radio systems. TDMA allocates all available channels to multiple users on the basis of time. The most common way to achieve anti-collision mechanism of RFI system is TDMA, which is determined by the complexity, cost control, communications, and power consumption of the RFID system. The two basic types of TDMA are reader anti-collision control method and control RF card anti-collision method. However, due to the special nature of supermarket shopping system, the efficiency of the algorithm is too low, which cannot meet the requirements .
This paper analyzed the application of RFID technology into supermarket shopping system and used the anti-collision algorithm to identify on the basis of the unique sequence code. The RFID technology identifies the customer consumption goods and sort the consultation as a list and display it on the checkout stand. The application of this mode can provide great convenience for the customer as well as a supermarket. On this basis, in order to better resolve conflicts, this paper will use the binary search algorithm.
The design of shopping system
The design of a shopping system mainly involves networking, database, and RFID technology. The system has advantages of high efficiency and high accuracy . The system mainly includes self-checkout, self-purchase, member mechanism, and anti-theft measures.
To solve the collisions of a plurality of electronic tags in the identification of shopping, the binary search algorithm is used to achieve the function of self-checkout, which can make it faster for customers to check out in a specific area.
The function of self-purchase is similar to self-checkout. The goods are identified in a specific area to count the purchased goods. This function can meet the clutter purchase of small items to avoid the trouble of artificial statistics and reduce labor costs.
In order to further expand the sales, the RFID membership cards are issued to the customers who purchase over a certain amount. Thus, it can increase the frequency of the customers’ consumption.
RFID technology also can achieve security management. In the supermarket, there are special inlet and outlet. After customers purchase goods, when they went through the outlet-installed RFID technology, the information of goods can be read again. Compared with the first time, we can know whether customers steal goods. This method is of high reliability and reduces the configuration of supermarket supervisors and operating costs (Fig. 1).
The hardware design of RFID system
Supermarket shopping system should have fast and a plurality of object recognition functions, but the traditional bar code scanning is completely unable to meet the need. On this basis, this paper will connect electronic tags with readers to achieve the function of quick checkout. On that basis, the paper will design the module of quick checkout and anti-theft function . For supermarkets, in order to carry out the anti-theft function, the two modules can be designed in the unified Internet of Things of supermarket. The two can be transmitted to each other. The hardware design of quick checkout is shown in Fig. 2.
As shown in Fig. 2, the hardware design of quick checkout includes three components: RFID system, ARM board, and peripherals.
This paper uses the PR9200 UHF RFID reader module. The amount and information of electronic tags are detected within a specified area by radio signal. On this basis, the acquired information is fed back to the ARM board. The RFID system covers the reading and writing module, antenna, and adapter base. Among them, the built-in anti-collision algorithm is mainly used in information detection. The antenna is the receiver of the signal, and the adapter base is mainly used to link up the antenna with the reader module.
ARM board uses ARMCortex-A8 processor, which is mainly used to post-process the received data and then displays it on the terminal.
The signal should be detected within a designated area. So, this paper designed peripherals (Fig. 2) to shield the information of electronic tags outside the area to ensure the accuracy of the information reader.
The hardware design process of a security area is shown in Fig. 3.
The hardware design of a security area is shown in Fig. 3. It includes RFID system, ARM board, and 80C51 microcontroller. The function of the RFID system and ARM board is the same as quick checkout, so I will not explore it in this paper. To achieve the alarm simulation, the buzzer of 80C51 microcontroller can alarm. Besides, it also needs other aided design, such as the LED display (Fig. 4).
The software design of RFID system
The supermarket shopping system uses ARMCortex-A8 intelligent terminal platform, which is equipped with a perfect Linux operating system and Qt4.7 platform. On this basis, this paper developed and designed the software system  (Fig. 5).
The design of the system includes two parts: information transformation and security processing and testing.
Information transformation is the main part of the software system. It achieves the data transmission between the RFID reader and software system. In order to achieve quick reading the information of electronic tag and ensure the accuracy of information transmission, the data can be planned in advance. After the reader receives the signals, it can store identification information according to requirements.
The anti-thief information should be processed in the checkout. In the checkout process, a lot of electronic tag data has been classified, selected characters RFID tag tagging information. When RFID reader module makes wireless search process, all tags are set. The function of anti-theft detection is mainly to detect the product again using anti-collision algorithm when leaving the area. When products which are not paid are detected, the SCM buzzer will sound the alarm. At the same time, the information will be transmitted to the LED display to guide the on-site supervision and personnel management.
The binary search algorithm
Binary search algorithm refers to a unique sequence code (UID) based on the identification tag, a set of predetermined sequences of instructions given between reader and a plurality of label, after a specific label selected for both data exchange between. The reader sends a request command to choose a set of labels; there will be data collision tag sequence code accurately transferred to the reader label channel transmission, using reader to verify the collision. If the reader test out the collision, it is necessary to do the next search in a smaller range [13,14,15,16].
Whether the signal encoding used in the reader determines the exact location of the collision bit, which plays a decisive role in the implementation process of the binary search algorithm , Manchester encoding has this advantage, as they have been from the transponder to the reader uplink baseband data encoding. Manchester encoding is a certain value level rising or falling edge of a bit window (tBIT) represented. The increase is stood by a logic “0” code, and the fall is stood by a logic “1” code (as shown in Fig. 6).
The transmission of Manchester encoding is often identified as an error, and it is not allowed to have a “no change” state. If multiple transponders simultaneously transmit different values, the result will be offset by rising and falling edges of the received. The reasons for this have not yet been specified, so it is seen as a way to query bit backtracking conflicts.
The rules and commands between the reader and transponder are the binary search algorithm. The purpose is to randomly select a transponder from multiple transponders group. And introducing four commands is to present the convenience of the algorithm [18,19,20].
Request (serial number) (REQUEST (SNR)): In this command, the reader will firstly be sent to a set of sequences code transponder. The transponder’s own serial number and reader sent from the sequence code comparison, if the two are less than or equal to, the situation where the transponder code sequence itself will return back to the reader to narrow the transponder preselected range .
Select (serial number) (SELECT (SNR)): Reader’s determined parameter sequence code is sent to the transponder; this time, the parameter code sequence identical transponders will be singled out as execute other commands cut switch.
Read data (READ-DATA): The command is sent by the selected data to the transponder reader store. The operating system also covers the command post of the Nadeng, discrimination, write, or cancel the reservation.
Exit options (UNSELECT): Cancel has been selected transponder so that the transponder back to the property is not activated under the condition “silent” state, no reply received any REQUEST command. In order to re-activate the transponder to be reset, the transponder supply voltage must be cut off and temporarily leave the scope of the reader .
Binary search algorithm is to achieve the anti-conflict
Assuming Electronic Product Code (EPC) is ten digits, the range of the reader includes four microelectronic labels (see Table 1). The process of algorithm reader for electronic identification tag is as follows:
Sending REQUEST from reader, that is, the command of “≤1111111111.” When the serial number is 1100101011, the transponders of the code sequence within the reader less than 1100101011 will be controlled. Reader decoding result is 110X1X10X1, so in the process of acceptance sequence code, the conflict will be recognized. There may be many transponders within the reader, the order received is 110X1X10X1, so the received code sequences have ten possibilities (as shown in Table 2).
The highest value of iteration (Section 4) is the first conflict that appeared in this position, which is in the range of SNR ≤ 1100101011. There is at least one transponder.
The reader again sends the command of “≤ 1100101011,” which led to a change in parameters. There is the same serial number before the collision and after receiving, assuming the highest position of the collision is 0, and another serial number after the collision is 1. Reader search is the range of “≤ 1100101011.” In such a repeated operation, the no. 4 transponder is ultimately selected.
The reader sends SELECT, the command of “1100101011.” Then, the transponder 4 serial code their own attributes transmitted to the reader, and the rest of the transponder and inactive. At this point, the reader can communicate through “READ-DATA” and the transponder 4. After the end of the program, “read/write,” the reader sends “UNSELECT” and the transponder 4, which makes the transponder 4 to re-enter the inactive state, thus achieving a complete between the reader and the transponder exchange of information. At this point take the binary arithmetic back policy, the reader resends “1111111111” command, namely, the search for the next round. This is the crux of the binary search algorithm to solve a collision problem.
In order to more clearly know the advantages of the binary search algorithm, the advantages of the binary search algorithm and the identification amount of the general anti-collision algorithm were compared in Fig. 7.
In Fig. 7, the binary search algorithm can significantly reduce the number of tag searching to reduce the time of computation. We can also evidently see that, with the increasing number of tags, the binary search algorithm has a very obvious effect of high-speed computing to meet the needs of the size of the supermarket.
Security information processing
In practice, the binary search algorithm can improve the efficiency of the system. On this basis, for the security function, anti-theft can be further identified. In the area of export commodities identification process, the electronic tag marked a bit in a fixed sequence code flag bits of information. And the status of the remaining sequence codes is “dormant” by reading this bit of information. The system will compare them based on the amount of products sold, thus improving the accuracy of the security and reduce the embarrassment of supermarket and customers.
Results and discussion
In accordance with the requirements of the paper, to build a supermarket shopping system model-based RFID system binary search algorithm, Qt software design and experimental testing are used. The purpose of the experiment is the supermarket checkout efficiency, the reliability of security, and the impact of other factors.
The efficiency of checkout
In the experiment of the efficiency of checkout, a large number of electronic tags affixed to products that have been designated area RFID, RFID system, and the recognition time for all items traditional supermarket bar code scanning time are compared; the result is shown in Fig. 8. As can be seen in Fig. 8, for the checkout efficiency, the RFID system is far superior to the traditional bar code scanning.
The test of product recognition rate
In the test of product recognition rate, the products attached to the label were brought through the specific checkout area, which all contain membership cards. At this time, the merchandise identification rate of the test result is shown in Fig. 9. In Fig. 9, we can see that the same product recognition rate reached 100%, while the rate of recognition and membership card recognition rate of goods within a certain range of types of goods, which were up to 100%, but with the types of goods continuing to increase, this time, two both would go down to a certain extent.
The result of security testing
In security testing, the goods which were not paid were taken away from the supermarket. This paper used the initial condition, which was two items were not paid. They were taken away from the supermarket with other goods containing electronic tag. The result is shown in Fig. 10. The figure shows when the number of simultaneous detection of large commodity electronic tag, there will be a lower error rate.
We can see from the test result binary search algorithm has good accuracy in RFID systems in supermarkets. It also verifies the rationality of RFID-based supermarket system to meet the daily needs of supermarkets.
In this paper, the binary search algorithm of RFID system was used in supermarket shopping system networking information for identifying. The conclusions are as follows:
For quick checkout, RFID system recognizing the results of all the goods and the time required for traditional supermarket bar code scanning time is displayed with the increasing number of goods. RFID system identifying the time required for all the goods have not been large amplitude increased and the time required to scan the bar code and is proportional to the number of items, which explains the rapidity of the RFID system.
In terms of product identification, RFID checkout in a specific area within a range of electronic identification tag of the building, while supermarkets and shopping member mechanism combining test results show that the same product obtained recognition rate reached 100%, while commodity recognition rate and recognition rate membership card within a certain range of types of goods are up 100%, but with the types of goods continued to increase, this time both to a certain extent. This indicates that the binary search algorithm to identify the RFID tag system exceeds a certain extent. Its accuracy may be reduced.
For the aspect of the anti-theft function, anti-theft function and design features combine billing through the second detector to achieve quick testing of goods not paid. The anti-theft function test results showed that when the quantity was large electronic identification tag, there will be a lower error rate, which is the test environment; the algorithm has relations.
Through experiments, the binary search algorithm has good accuracy in RFID system in supermarkets. And it also verifies the article being constructed based on the rationality of things supermarket RFID system, to meet the basic needs of supermarket. In the test identification and anti-theft features exposed goods there with a binary search algorithm to identify the number of goods increases, the accuracy of the test has not been able to reach 100%. For the improvement of the binary search algorithm, achieving the precision will be the future research focus.
Radio frequency identification
Electronic product code
- REQUEST (SNR):
Request (serial number)
- SELECT (SNR):
Select (serial number)
H. Chen, Design of the fast supermarket shopping system based on the Internet. J. Fujian Commercial Coll. 1, 203–208 (2014)
L. Luo, C. Peng, Small warehouse management system design and implementation based on the Android system. Comput. Knowl. Technol. 16, 132–137 (2015)
D.N. Lorenzo, M.G. Li, S.E. Mische, K.R. Armbrust, L.P.W. Ranum, T.S. Hays, A RFID-based intelligent warehouse management system design and implementation. Int. Conf. E-Business Eng. 189, 178–184 (2011)
Z.W. Hu, X.J. Sun, The design and implementation of smart warehouse management system (SWMS) based on ZigBee. Appl. Mech. Mater. 416-417, 1461–1465 (2013)
W. Gao, S. Li, F. Gao, et al., Design and implementation of small and medium intelligent warehouse management system based on HTML5. Electron. Technol. 97(7), 4115–4119 (2014)
H.H. Sujing, W. Lu, et al., The design and implementation of the warehouse system based on RFID and mobile devices, vol 1 (Computer and Automation Engineering (ICCAE), 2010 The 2nd International Conference, 2010), pp. 696–698. https://www.infona.pl/resource/bwmeta1.element.ieee-art-000005451285
Q. Yu, J. Ukkonen, Design of smart sign system based on RFID and mobile communication technology. Open Electr. Electron. Eng. J. 8(1), 695–699 (2014)
L. Wei, Q. Wu, M. Yang, et al., Design and implementation of smart parking management system based on RFID and Internet. Int. Conf. Control Eng. Commun. Technol. 233(1), 17–20 (2012)
B.Y. Shih, T.W. Lo, C.Y. Chen, The research of quadtree search algorithms for anti-collision in radio frequency identification systems. Sci. Res. Essays 6(25), 5342–5350 (2011)
B. Li, C. Qiao, An improved binary search anti-collision algorithm. Microelectron. Comput. 5, 023 (2014)
B.G. Kim, K.W. Kim, Modified M-ary QT algorithm to improve the performance of the anti-collision protocol for RFID tag identification. Int. J. Control Autom. 7(10), 133–144 (2013)
L. Hai, R. Wang, L. Xiao, A novel RFID anti-collision algorithm based on binary tree. J. Netw. 8(12), 2885–2892 (2013)
C. Li, H.L. Xiong, Improved binary tree search anti-collision algorithm. Appl. Mech. Mater. 2013, 397–400 (2012-2018)
H. Sheng, Y.P. Wang, X.B. Zhang, et al., An improved anti-collision algorithm in RFID system. Appl. Mech. Mater. 273, 736–740 (2013)
B. Zhi, Y. He, S. Wang, Research of RFID tag anti-collision algorithm based on binary tree. J. Netw. 9(9), 2543–2549 (2014)
M.S. Hu, G.N. Lv, Anti-collision algorithm for RFID based on dynamic packet query tree. Adv. Mater. Res. 159, 550–555 (2011)
M. Djeddou, R. Khelladi, M. Benssalah, Improved RFID anti-collision algorithm. AEU Int. J. Electron. Commun. 67(3), 256–262 (2013)
H.Y. Lee, High-tag anti-collision algorithm to improve the efficiency of tag identification in active RFID system. J. Korea Inst. Electron. Commun. Sci. 7(2), 235–242 (2012)
P. Das, P.M. Khilar, A randomized searching algorithm and its performance analysis with binary search and linear search algorithms. Int. J. Comput. Sci. Appl. 1(11), 11–18 (2013)
L. Xie, Y. Yin, A.V. Vasilakos, et al., Managing RFID data: challenges, opportunities and solutions. IEEE Commun. Surv. Tutorials 16(3), 1294–1131 (2014)
W. Zhang, J. Yang, Y. Fang, et al., Analytical fuzzy approach to biological data analysis. Saudi J. Biol. Sci. 24(3), 563–573 (2017)
H. Li, X. Li, X. Xu, et al., Modeling departure time choice of metro passengers with a smart corrected mixed logit model-a case study in Beijing. Transp. Policy 69, 106–121 (2018)
Availability of data and materials
Data sharing not applicable to this article as no datasets were generated or analysed during the current study.
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Wu, L., Liu, S., Zhao, B. et al. The research of the application of the binary search algorithm of RFID system in the supermarket shopping information identification. J Wireless Com Network 2019, 27 (2019) doi:10.1186/s13638-019-1343-2
- Binary search algorithm
- Supermarket shopping system