Smart Ordering Application for Assigning Sequence Numbers to Customers at Offline Sites

In this paper, we propose a new smart ordering application for assigning sequence numbers to customers. This system has advantages over existing ordering systems, for example, it does not require identifying information such as phone numbers or social network IDs, and could therefore protect customer data. In this system, inaudible high frequencies between 18 kHz and 22 kHz are used for communication between speaker and microphone. To evaluate performance, the system was tested across smart devices including the Galaxy S7 and S8, and iPhones 6, 7, and 8, and the results showed a success rate of 98.7%. The proposed system could be a useful service technology for offline sites that need to assign sequence numbers to customers because of high visitor rates. Key-Words: Ordering application, Smart ordering, Smart phone, High frequency, Inaudible frequency


Introduction
Recently, delicious food and renowned local restaurants have been featured on many TV shows. Because huge numbers of people want to then visit those restaurants and eat the food, they have to wait outside the venues for over two hours. In particular, if the restaurant in question is small, with only 4 or 5 tables, large numbers of people standing around the front or side of the building can cause damage. While many well-established restaurants have used telephone booking for a long time, some smaller and more recently famous venues do not like the system, largely because some customers do not come after making a booking, known as "no shows". Therefore, these smaller restaurants will only take customer orders down on paper in front of the store and do not accept any telephone bookings.
To solve this problem, family restaurants such as Outback and TGI Fridays use vibration pagers or vibration bells. Additionally, coffee chains such as Tom N Toms and Dunkin' Donuts, as well as department store food courts, have gradually started to use vibration pagers for notifying customers in ordering sequence [1,2]. However, these pagers or bells are big and require daily charging. Moreover, if a customer loses or takes the pager away, the store manager has to assume responsibility for the loss because they are expensive. To address this problem, Starbucks Korea implemented the online to offline (O2O) Siren Order service from May 2014 [3,4]. This service replaced pagers and allows customers to order coffee, other drinks, or foods at the same time. Initially, only customers inside each Starbucks store could place orders, but the range was extended to 2 km from individual stores in February 2016 to improve user friendliness. However, extending the order distance has the disadvantage of potentially ignoring a drop-in customer's place in the sequence.
Similarly, many South Korean restaurants use turn registration systems such as Soonbuny and NowWaiting [5,6]. When customers visit a restaurant, they enter their cell phone number into the system and confirm some information, such as the number of people in the group. When it is their turn, the system sends the customer a notification using popular social network services KakaoTalk or LINE. These services can assign customer turns on a drop-in basis and can automatically call two or four customers according to seating capacity because the number of people in the group has already been provided. However, this system is somewhat inconvenient because customers have to input their phone number which may then be visible to others. Moreover, if customers do not use KakaoTalk or LINE, they cannot use this service.
Therefore, we propose a smart ordering system for assigning sequence numbers to customers at offline sites. The system uses a speaker located at the site and the internal microphone of the customer's smart device to allocate turns on a drop-in basis using the push notification of the smart device. As well as audible sounds, most speakers can also create inaudible sounds at high frequencies from 16 kHz to 22 kHz. In addition, smart device microphones can receive many frequencies from 20 Hz to 22 kHz and the device can also analyze frequencies to detect specific signals used by applications [7,8]. First, the speaker makes a specific signal using high frequencies between 18 kHz and 22 kHz and the customer's smart device detects the signal using the proposed application. Second, the customer can confirm the restaurant information and enter the number of people eating using the application. Third, the system assigns the customer a sequence number and sends a push notification via the application when it is their turn. We developed a smart ordering application and server system that can make specific signals and send push notifications to a customer's smart device. We then tested this new smart ordering notification service using ten smart devices and the results showed 98.7% accuracy. Thus, the proposed application and server system is a useful service for offline sites, such as small popular restaurants and shops that need to allocate customer turns on a drop-in basis.

Smart ordering application system using high frequencies
In this section, we explain the proposed smart ordering application and service system. The flow of the proposed application and server system is shown in Fig. 1. In Fig.  1, the speaker at the restaurant repeatedly sends a pair of specific high frequency signals over 18 kHz (①). When the customer enters the space, their smart device gathers surrounding sounds using the internal microphone. The proposed application performs fast Fourier transform (FFT) on the gathered sound data [9] and sends the high frequency values and global positioning system (GPS) information to the server when it detects a pair of signals over 18 kHz (②). The server system checks the transmitted pair of high frequencies against the pair received from the smart device and calculates the distance from the restaurant to the smart device's GPS information. Subsequently, the server system sends the restaurant's information and the number of waiting groups to the smart device (③).
The customer confirms the received information and enters the number of guests without having to enter their phone number (④). The server system adds this number of guests from the smart device and sends it to the point of sale (POS) system (⑤). When the restaurant is ready for the customer, an employee selects the customer using the POS (⑥) and the server system sends a push notification to the customer (⑦).
High frequency pairs over 18 kHz are selected, comprising two frequencies at 100 Hz values between 18 kHz and 20 kHz (n=21). To avoid interference between the paired high frequencies, the interval between each is over 600 Hz. In this system, frequencies over 20.1 kHz are not used because the recognition rate for frequencies above that point is lower than that between 18 kHz and 20 kHz when the speaker makes a sound of the same tone. Thus, 105 high frequency pairs are available, such as 18.0 kHz-18.7 kHz, 18.0 kHz-18.8 kHz, …, and 19.3 kHz-20.0 kHz. The server system constantly generates a sound from the speaker composed of a pair of these high frequencies for k seconds, as in Fig. 2.
In Fig. 2, the high frequency pair is 18.3 kHz-19.0 kHz and k is 4 seconds. Thus, the smart device of the visiting customer detects the pair of high frequencies via its internal microphone and the proposed application counts the pair when it is composed of matching high frequencies. If the application detects the same pair of frequencies multiple times, it sends the frequency values and the smart device's GPS data to the server. The server system compares the frequencies from the speaker with the detected pair of frequencies from the smart device. If these values match, the server calculates the distance from the speaker to the smart device using GPS information. Distance is calculated using the Euclidean metric [10] and the server system decides that the smart device has entered the restaurant when the distance is shorter than the threshold distance. The server then sends the restaurant's information and the number of already waiting guests to the new customer's smart device. The customer sends the number in their new group via their smart device back to the server system. Subsequently, the server adds together the total guests and sends the new waiting list numbers to the POS. Ultimately, when seats are available, the employee selects the next guest via the POS and the server system sends a push notification to the next customer's smart device.

Experiments and evaluation
This section explains the proposed application and we describe the experiment for assigning sequence numbers to customers using the proposed smart ordering application system. We developed iOS and Android applications and tested the assignment of sequence numbers using ten smart devices, such as iPhones 6, 7, and 8, as well as Galaxy S7 and Galaxy S8, all installed with the proposed application. The server system which generated the high frequency pairs and which received the detected pairs from the smart devices used Apache 2.2.14, PHP 5.2.12, and MySQL 5.1.39. The specifications of the server system were Intel (R) Core (TM) i5-750 CPU and 8 G RAM. The screen composition of the proposed smart device application is illustrated in Fig. 3.
In Fig. 3, graph ① shows the bin values of frequencies collected by the smart device's microphone, confirming that 18.3 kHz-19.0 kHz was a remarkable pair among the other high frequencies. The right hand text (②) displays GPS information, maximum high frequency, second maximum high frequency, and the time taken m to detect the frequencies. In this application, the user can set the m value from 0.7 to 4.0 seconds to achieve the optimum time for detecting high frequencies. If the smart device detects a high frequency pair twice during m, the application moves to the next phase and sends the pair of values and GPS information to the server system. For example, if the user sets m at 0.7 seconds, the application spends 0.1 seconds collecting frequency data, 0.5 seconds sleeping, and 0.1 seconds collecting again.
To begin, we tested 100 times using 10 smart devices for optimum m value. The distance between the speaker and the smart devices was 5 meters and the k value (how long the speaker transmitted the frequencies) was 5 seconds. Fig. 4 illustrates the frequency detection results to identify the optimum m. As shown, the accuracy of detecting high frequency pairs is over 95% when m reaches 2.4 seconds and is similar when m exceeds 2.4 seconds. Therefore, m was set at 2.4 seconds when testing the smart ordering application system for assigning sequence numbers to customers at an experimental restaurant.
The experiment space was 7 × 5 meters, set up as a small restaurant, as in Fig. 5. The space contained five tables, each with four chairs. The entrance was located at the bottom left corner and the speaker was set in the bottom right corner of the space. Participants and their smart devices entered at the bottom left corner, and waited for around 60 seconds for detection of the high frequency pairs. The number of instances that moved to the next phase of the application, thereby indicating pair detection, was counted. In this experiment, the distance from speaker to entrance was 5 meters and we tested each of 10 devices 100 times (n=1,000). The detection accuracy is shown in Fig. 6. As illustrated, the accuracy of the iPhone 6 was 99.5%, of the iPhone 7 was 98%, and of the iPhone 8 was 100%. The accuracies of the Galaxy S7 and S8 were 97% and 99%, respectively. Thus, the average accuracy of the 10 smart devices was 98.7%. Matching the server's high frequency pairs with those detected by the smart devices was 100%. The detection accuracy of the iPhone 7 and the Galaxy S7 appears lower than the other smart devices, and this may be a result of each device experiencing interference from external noises when the entrance door was opened during detection time.
The GPS information relating to the 987 detected high frequency pairs was then checked to be under the threshold distance using the Euclidean metric. For this experiment time, the threshold distance was set at 5 meters. The results show that the GPS information of all smart devices was correct because they began detecting as they entered the restaurant from outside. The results show that the proposed application and server system is useful technology for stores that need to allocate customer turns on a drop-in basis.

Conclusion
In this paper, we have outlined a smart ordering application system for assigning sequence numbers to customers at offline locations using a speaker located on site and the internal microphones of smart devices. We developed iOS and Android applications and a server system. An experiment using the developed application and server system demonstrated that they could be used to allocate sequence positions on a drop-in basis at a small restaurant. Thus, the proposed application and server system is useful technology at offline sites and should be applied more widely.
In future research, we will study new technology that can support events and promotional information using the proposed application and server design. We will also study how the accuracy of the proposed solutions could be improved. Moreover, we will explore various service technology applications using high frequency pairs, and will study a new communication algorithm also using the pairs.  Fig. 6. Accuracy of detecting high frequency pairs by each smart device