1. Trang chủ
  2. » Luận Văn - Báo Cáo

Luận văn tốt nghiệp Khoa học máy tính: A mobile application for shopping automation

77 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề A Mobile Application for Shopping Automation
Tác giả Vo Dong Ho
Người hướng dẫn Assoc. Prof Tran Minh Quang
Trường học HCMC National University, University of Technology
Chuyên ngành Computer Science
Thể loại Thesis
Năm xuất bản 2021
Thành phố Ho Chi Minh City
Định dạng
Số trang 77
Dung lượng 1,84 MB

Cấu trúc

  • 1. Research overview (10)
    • 1.1 Research reason (10)
    • 1.2 Aims of the study (11)
    • 1.3 Methods of study (12)
    • 1.4 Outline (13)
  • 2. Related works (14)
    • 2.1 Some successful automation shopping model (15)
      • 2.1.1 Amazon Go (15)
      • 2.1.2 BingoBox (17)
      • 2.1.3 Advantages and Disadvantages of Amazon Go and BingoBox (19)
    • 2.2 Background (22)
      • 2.2.1 QR code (22)
      • 2.2.2 A brief about Kotlin (24)
      • 2.2.3 About Google Firebase (25)
      • 2.2.4 Implement MoMo E-Wallet for payment (27)
      • 2.2.5 Android Studio Profiler (29)
  • 3. System Analysis and Design (30)
    • 3.1 Use case Diagram (30)
    • 3.2 Use case Descriptions (31)
    • 3.3 Flow Chart Diagrams (34)
    • 3.4 Entity Relationship Diagram (40)
    • 3.5 Class Diagram (43)
  • 4. Implementation (46)
    • 4.1 Login (46)
    • 4.2 Register (47)
    • 4.3 Change Password (48)
    • 4.4 User’s Profile (50)
    • 4.5 User main screen (51)
    • 4.6 Add Product to Cart (52)
    • 4.7 User’s Cart (53)
    • 4.8 View Receipts (54)
    • 4.9 Admin’s screen (55)
    • 4.10 Add a Product (56)
    • 4.11 List Products (57)
    • 4.12 Modify a Product (58)
    • 4.13 Search Products (59)
    • 4.14 Refund Receipt (60)
    • 4.15 Get user’s Cart (62)
    • 4.16 Sales Dashboard (63)
    • 4.17 Order from customer / Online Order (65)
    • 5.1 System Effectiveness (66)
    • 5.2 System Availability (68)
    • 5.3 System Reliability (68)
  • Appendix 1 (73)
  • Appendix 2 (74)

Nội dung

Research overview

Research reason

In the context of an increasingly competitive market, businesses and retailers are investing heavily to improve their business processes in order to offer a business model that outperforms their competitors in terms of performance or in terms of sales In addition to market analysis, changing marketing tactics, optimizing the supply chain, managing costs and staff well, improving consumer’s shopping processes have always been the top priorites of business

User’s shopping experience is what every shopping process wants to be improved It is obvious that successful retailing today comes down to obsessing about customer experience And shopping automation, with the ability to address core issues that negatively impact the shopping experience like Endless queues, overcrowded stores, waiting for hours, stressed out sale assistants, will be the defining element of retail business processes Arcording to Global Retail Automation Market 2020-2025 – a report providing a detailed overview of the major driver, opportunities, challenges, current market trends and strategy affecting the Global Retail Automation market, the retail automation market was valued at USD 12.45 billion in 2019 and is expected to reach USD 24.6 billion by 2025 at a CAGR of 11.2% over the forecast period from 2020 to

Automation has made some progress, but many still remain How to simultaneously improve customer satisfaction when shopping while still ensuring economic efficiency and scalability (so that automatic shopping models can replace the traditional model) are the problems that businesses as well as technology companies are trying to find better and better solutions And which automated model will bring economic efficiency? Which technologies should be applied and how to provide a good user experience? How can I ensure in terms of security, feasibility, response from consumers, competitiveness with other models? For the above reasons, the topic "A mobile application for automation shopping" is implemented with the aim of building a shopping automation model that can enhance the user's shopping experience but still ensure economic efficiency for retailer.

Aims of the study

Successfully design a convenience store shopping automation model, apply suitable technologies to replace people in several operations, solving the problem of customer experience and economy problems for businesses

- Identify the stages that can be automated

- Determination of suitable technology and applicability

- Determine the factors that affect the success of the model

- Conducting technology research and building a complete model

- Implement and evaluate the results achieved.

Methods of study

A shopping model is called automatic when applying technology or machines to do one or more of the following: replacing staff in several stages, changing traditional payment methods by electronic payment methods, eliminating long waiting lines and other on- site customer care services In order to be put into operation, the automatic model still has to meet the inevitable basics:

- Buyers get exactly what they want, avoiding the situation of machinery and technology errors that prevent customers from purchasing valid products

- Buyers pay exactly what they chose, neither underpaid nor overpaid

- Seller receives the exact money buyers paid

- Security and economic efficiency criteria

To meet the first three basic things, online payment has been considered and chosen to conduct research and development, with the main task of identifying the products customers choose to buy and confirming customer’s bought products before they leave the store, with absolute precision

E-wallet payment is a payment method used so that buyer's money can reach the seller because of the popularity and reliability of e-wallet in the market QR code technology is applied to control customer’s access to the store and for customer to make payment

To ensure the security aspect of business owners, the model requires users to register and declare their identity on the HoApp self-developed application.

Outline

In the first part of the thesis report, some successful automation shopping models will be introduced about the process and technology, along with the reasons for the choice implementation, the advantages, the intentions for the research as well The second part is the Design part, I will explain more clearly how our HoApp model works and provides a thorough look about the entire system The next part is Evaluation, and in this part, I evaluate how the app performs in testing Finally, last part is the conclusion and development direction for the thesis.

Related works

Some successful automation shopping model

The most ideal automatic shopping model, promising to become a trend in the future that I want to mention is Amazon Go, the model of the world's leading retail and technology corporation, Amazon

Amazon Go is a chain of convenience stores in the United States, operated by the online retailer Amazon The stores are partially automated, with customers able to purchase products without being checked out by a cashier or using a self-checkout station [1] Amazon uses several technologies to automate Go stores, including computer vision, deep learning algorithm, and sensor fusion for the purchase, checkout, and payment steps associated with a retail transaction [2]

Figure 2.1 Amazon Go application interfaces [3]

The shed-water event of 2018 has been the opening of the first Amazon Go store in Seattle, at the beginning of year After more than 2 years of tests the e-commerce giant opened its first store almost completely automated, where the customer can just walk out with whatever items they choose and have them charged to their Amazon Prime account [4]

No cash, no product’s code scanning, no waiting lines, all are achieved since Amazon has applied effectively computer vision, deep learning algorithms, and sensor fusion for the purchase, checkout, and payment steps associated with a retail transaction Dreams come true with Amazon Go when the shopping experience has never been so easy and convenient

A more specific description of the shopping process at Amazon Go:

- To shop at Amazon Go, you will need to first download the Amazon Go app and connect your Amazon account

- When you're ready to shop at Amazon Go, you must scan your barcode in the app as you walk into the store Then, you can take whichever items you want and simply walk out of the store

- The Amazon Go store has sensors that track what you take off or put back on the shelves When you leave the store, your Amazon account will be charged for the items you left the store with, and you can check your receipt in the app to make sure it is correct

In addition, Amazon Go also equipped with a series of smart carts with build-in cameras integrating computer vision, a display screen and a QR code reader for customers to purchase and pay right on this shopping cart, bringing familiar but still convenient and efficient shopping experience

Although successfully and efficiently completed and put into operation, the cost of the technology is still the biggest barrier for the Amazon Go model to be replicated and replace the traditional method Building and putting into operation a convenience store using the Amazon Go model costs $ 1 million [5] and it would take about two years for Amazon to break even This makes the Amazon Go model not viable for small and medium businesses

The failure to achieve absolute accuracy and the cost of the technology is too high makes computer vision models in general and Amazon Go in particular difficult to compete with RFID technology, which has been used for a long time and gained giant trust from businesses In addition, the workforce reduction issue that is not supported by people in some Western countries, especially the US, also contributes to the Amazon Go model that has not yet replicated and reached markets

Another automated shopping model that has also achieved certain success and is facing enormous growth opportunities is BingoBox

BingoBox is a brand of self-service convenience stores, which was established in 2016 by Chen Ziling.This Chinese store, which consumers enter by scanning a QR code at the door, has already been installed in more than 300 locations in 30 cities in China in April

2018 It has also expanded to Taiwan, Malaysia, and South Korea and has also started expanding to Japan

BingoBox is China’s first scalable 24-hour cashier-free convenience store and a GGV portfolio company BingoBox features a smart counter for a staff-less check-out experience, and uses RFID and computer vision to keep track of items Users scan a QR code to enter the store, and pay via Alipay or WeChat Pay

A more specific description of the shopping process at BingoBox: To enter a BingoBox, you must scan a QR code to register on its website Then to check out, you place the items on a counter, scan the QR code and then pay with WeChat Pay or AliPay which is a mobile payment As you head out, a sensor at the door can automatically detect any unpaid items The door will only unlock once all the items have been paid [6]

With a friendly, compact store design (only 800 SKUs in a store), competitive price, near crowded areas along with the thorough application of RFID technology in item identification, tracking of goods and security, BingoBox has achieved great success thanks to the reduction of rental and labor costs (only one-fifteenth of the traditional operating cost than the outside stores) as well as the response of the Chinese people BingoBox also recently started bringing computer vision, called FAN-AI, into their stores, not only to recognize products when checking out but also to communicate with customers when they need assistance

BingoBox is a good model and suitable for small and medium businesses The market in the world is still abundant and the coverage of BingoBox is not high, which is an opportunity for businesses to learn and enter the market with a similar model

BingoBox model is considered to be very potential and highly feasible when applied in the Vietnamese market for the following reasons:

- The Vietnamese market is large and potential and has not really had a shopping automation model like BingoBox applied

- The compactness, labor and rental cost saving make it competitive with traditional convenient store

- The popularity of MoMo e-wallet and young people's willingness to experience the new will be advantageous when the model is deployed

2.1.3 Advantages and Disadvantages of Amazon Go and BingoBox

- Is it the ideal automation shopping system because of its computer vision techniques applying to all of the shopping processes

- Easy to understand, convenient, highly efficient and accuracy when applying

- Have a group of technicians and staffs to help with the technology and shopping progress

- Receipt is handled quickly and after shopping successfully, an email is sent to user’s app (in 24 hours)

- Have staffs to receive feedback and criticism

- There are smart carts to assist the shopping experience

- Is the unmanned model (model that doesn’t need human to operate)

- Quick payback time (about 10 months per store)

- Low building price for one store, affordable with small and medium enterprises

- Save on space rental cost because of small design and have no staffs

- Can move goods in store easily, even all goods to another store

- Easy to understand, can register an account in place About the disadvantages:

- Technique is complicated and high cost

- Not feasible for small and medium companies and stores when their economical efficiency is not as expected

- Need a long time to have user’s recognition and trust

- High efficiency but not 100%, relying on camera’s check and security staffs

- Human rights issues in U.S when applying technology to replace human’s work

- RFID stickers have a quite high price, not efficient when buying in small amount

- Need staffs to stamp the stickers for every products

- Can’t detect if someone remove the sticker

- If a problem happening in store, there is no one in place to solve the situation

To have a more specific view between the two models, I have implemented the following table:

Table 2.1 BingoBox RFID vs Computer Vision check-out stand

Convenient store and grocery store Convenient store

- Using high tech to enhance the efficiency of old shopping environment

- Solving waiting lines during peak hours, which may lead to the customer going to another store

- Reduce labor costs since cashier in US is very highly paid

- Creating new shop and a new environment for consumers, a new way to buy products

- Creating a new channel, a high efficiency channel, an option other than the traditional model

- Aiming towards a small cost model by reducing labor and rental cost

- Cashier-free store (still have product consultants, on-site customer support staff, security)

- Computer vision, deep learning algorithms, and sensor fusion for the purchase, checkout, and payment steps associated with a retail

- RFID and computer vision to keep track of items, QR code to enter the store

- 10,400 square feet (~1000m 2 ) with 5000 items (Go Groceries)

- Medium and large size, with areas of 12.48m 2 and 15.6m 2 respectively with 500-800 items respectively

Use of technology in process

- QR code scanning at check-in and out

- Cameras and sensors track what customer take off or put back on the shelves

- Access and make online payment via

- Amazon Go app with Amazon account

- QR code scanning at check-in and when making payment

- RFID tags on each product, RFID reader to recognize product

- Small machine called BingoBox applying computer vision to recognize product (recently)

- Online payment via Wechat or Alipay

- 1m$ on hardware and 2 years for Amazon to break even

Unknown build cost but 10 month but

- the average payback time is around

Future potential With 1b$ investment each year,

- Amazon expect to reach 3000 Go stores in 2021

Taken over and supported from Alibaba,

- BingoBox aims to expand and reach 5000 stores worldwide

Through investigation and consideration, I think that the BingoBox model is feasible and can inherit good things from this model The advantages of BingoBox appear to be much more dominant and suitable than the Amazon Go model when applied in Vietnam But then, the question is, can all of BingoBox’s superiorities be applied to my shopping application?

Background

The first technology that I apply to the HoApp model is the QR code A QR code (abbreviated from Quick Response code) is a type of matrix barcode (or two- dimensional barcode) first designed in 1994 for the automotive industry in Japan A barcode is a machine-readable optical label that contains information about the item to which it is attached In practice, QR codes often contain data for a locator, identifier, or tracker that points to a website or application QR code uses four standardized encoding modes (numeric, alphanumeric, byte/binary, and kanji) to store data efficiently; extensions may also be used

The Quick Response system became popular outside the automotive industry due to its fast readability and greater storage capacity compared to standard UPC barcodes Applications include product tracking, item identification, time tracking, document management, and general marketing

A QR code consists of black squares arranged in a square grid on a white background, which can be read by an imaging device such as a camera, and processed using Reed– Solomon error correction until the image can be appropriately interpreted The required data is then extracted from patterns that are present in both horizontal and vertical components of the image

There are different types of QR code:

QR Code Model 1 and Model 2:

Model 1 is the original QR code The largest version of this code is 14 (73 x 73 modules), which is capable of storing up to 1,167 numerals

Model 2 is QR Code created by improving Model 1 so that this code can be read smoothly even if it is distorted in some way QR Codes that are printed on a curved surface or whose reading images are distorted due to the reading angle can be read efficiently by referring to an alignment pattern embedded in them This code can encode up to 7,089 numerals with its maximum version being 40 (177 x 177 modules)

A major feature of Micro QR Code is it has only one position detection pattern, compared with regular QR Code that require a certain amount of area because position detection patterns are located at the three corners of a symbol The largest version of this code is M4 (17 x 17 modules), which can store up to 35 numerals iQR Code Model: iQR allows a wide size range of codes from ones smaller than the traditional QR Code and Micro QR Code to large ones that can store more data than these This code can be printed as a rectangular code, turned-over code, black-and-white inversion code or dot pattern code (direct part marking) as well, allowing a wide range of applications in various areas The maximum version can theoretically be 61 (422 x 422 modules), which can store about 40,000 numerals

A QR Code that has a reading restriction, can carry two types of data: public and private The private data can be read only with a dedicated reader having the cryptographic key, which provides data protection Since SQRC looks exactly the same as the regular QR Code, it can prevent forgery and tampering

This code has an area, or a frame, holding an image Since the shape and color of the frame can be changed flexibly, the code has a variety of applications Since letters and images can be inserted inside the area, FrameQR can be used for promotion, authenticity judgment and other various uses

In our model, QR code Model 2 is chosen for our project as it is popular and massively used in nowadays apps This code also has a decent size, not too small for customer to scan when checking in like iQR And because I only need tracker that points to an application like bank account, I don't need to use FrameQR which can contain images.

Kotlin is a general purpose, free, open source, statically typed “pragmatic” programming language initially designed for the JVM (Java Virtual Machine) and Android that combines object-oriented and functional programming features It is focused on interoperability, safety, clarity, and tooling support Versions of Kotlin targeting JavaScript ES5.1 and native code (using LLVM) for a number of processors are in production as well [9]

Kotlin originated at JetBrains, the company behind IntelliJ IDEA, in 2010, and has been open source since 2012

Up until May 2017, the only officially supported programming languages for Android were Java and C++ Google announced official support for Kotlin on Android at Google I/O 2017, and starting with Android Studio 3.0 Kotlin is built into the Android development toolset Kotlin can be added to earlier versions of Android Studio with a plug-in

Kotlin compiles to the same byte code as Java, interoperates with Java classes in natural ways, and shares its tooling with Java Because there is no overhead for calling back and forth between Kotlin and Java, adding Kotlin incrementally to an Android app currently in Java makes perfect sense

Why I choose Kotlin over Java and other programming languages

The question of whether to choose Kotlin or Java for new development has been coming up a lot in the Android community since the Google I/O announcement The short answer is that Kotlin code is safer and more concise than Java code, and that Kotlin and Java files can coexist in Android apps, so that Kotlin is not only useful for new apps, but also for expanding existing Java apps Since Kotlin offers a various utilities for programming and become more and more popular in the community, I think that it will be a trending in the future and why not take a step before that?

For our mobile application, I use Google Firebase as our database for easier app’s implementation and authentication progress’s simplification

Firebase is a toolset to “build, improve and grow your app”, and the tools it gives you cover a large portion of the services that developers would normally have to build themshelves, but don’t really want to build, because they’d rather be focusing on the app experience itself This includes things like analytics, authentication, databases, configuration, file storage, push messaging, and the list goes on The services are hosted in the cloud, and scale with little to no effort on the part of the developer [10]

Firebase’s tools for building HoApp

- Firebase Authentication takes care of getting your users logged in and identified This product is essential to getting some of the other products configured properly, especially if you need to restrict access to per-user data It makes easy to perform secure logins, which is incredibly difficult to implement correctly on your own

- Firebase Realtime Database and Cloud Firestore provide database services, and both tools can be considered as “realtime, cloud hosted, NoSQL databases” You use the client SDK to set up a listener at the location of the data your app wants to use, and the listener gets invoked with that data repeatedly, every time a change is observed This lets you keep your app’s display fresh, without having to poll the data of interest

- Cloud Storage provides massively scalable file storage It’s also technically a Google

System Analysis and Design

Use case Diagram

Figure 3.1 Use case Diagram for HoApp

Use case Descriptions

Table 3.1 Use case descriptions for Customer

Customer User Registration Register an account to use Account is compulsory when using the app Can be done after filling all important information

User Login Use an existing account to login and access the app’s shopping functions

Change Password Modify the password in case they forgot or wanting another password

User Functions Access functions that are available to users

Search Products Enter the product’s name to the search bar to search its information

View Receipts Show the receipts that are generated after users made a purchase Each of the receipts can be viewed with more detail

View Products Information Show the products’s information in detail

Add Products to Cart Scan the products’s QR code to add them to the app’s cart

Edit Profile Change some attributes in Profile screen by clicking “Edit”

View User Ranking Show the ranking of customers of the app based on their purchased products

Check Out Make a payment, interact with products before paying

Modify Products in Cart Change attributes of products in cart

Change Products Amount in Cart

Increase or Decrease the amount of each products in cart

Delete Products in Cart Delete products by click “Delete” or decrease the amount to 0

Select Payment Method Choose the payment options for the order

Pay by MoMo in Store Use MoMo to pay for the order when shopping in store

Pay by MoMo online Use MoMo to pay for the order and the store will deliver the products to you

Pay by Cash in Store Use cash to pay for the order when shopping in store

Pay by Cash at home Pay for the order by cash when you receive it

Table 3.2 Use case descriptions for Staff

Staff Login Use a staff account to login and access the app’s staff functions

Staff Functions Access functions that are available to staffs Get online Requests Get orders that needs to be sent to customers when they make an online order

Get Request sent to Store Get orders that needs to be prepared in store before customers come to get them

Accept Payment Scan user’s cart and accept payment as MoMo or using cash

Table 3.3 Use case descriptions for Admin

Admin Login Use a admin account to login and access the app’s admin functions

Admin Functions Access functions that are available to admins Search Products Enter the product’s name to the search bar to search its information Admin can scan the product’s barcode to search its information Add new Products Fill in necessary information about new products and add it to the database

View Products Information Show the products’s information in detail Edit Products Information Change the products’s information, usually used when increasing product’s amount View Products Sales View the sales of products in month, year and view sales of products for their categories.

Flow Chart Diagrams

Figure 3.4 Flowchart for Change password

Figure 3.5 Flowchart for Search Products

Figure 3.6 Flowchart for View Product Information

Figure 3.7 Flowchart for Add Product to Cart

Figure 3.8 Flowchart for View Receipts

Figure 3.9 Flowchart for Edit Profile

Figure 3.10 Flowchart for View User Ranking

Figure 3.11 Flowchart for Modify Products in Cart

Figure 3.12 Flowchart for Check Out

Figure 3.13 Flowchart for Get Request from Customer

Figure 3.14 Flowchart for Accept Payment from Customer

Figure 3.15 Flowchart for Admin Search Products

Figure 3.16 Flowchart for Admin Add a product

Figure 3.17 Flowchart for Admin View Product’s Information

Figure 3.18 Flowchart for Admin Edit Product Information

Figure 3.19 Flowchart for Admin View Products Sales

Entity Relationship Diagram

Figure 3.20 Entity Relationship Diagram for HoApp System

Table 3.4 Entity Relationship Diagram Description

- user_ID: identifier of user

- user_email: email of user, uses for login

- user_password: password of user, uses for login

- user_image: URL of user’s avatar

- user_firstName: first name of user

- user_lastName: last name of user

- user_gender: gender of user

- user_address: address of user

- user_location: location of user in attitude

- user_mobile: mobile number of user

- user_coupon: coupon of user for buying products

- admin_ID: identifier of the administrator

- admin_email: email of admin, uses for login

- admin_image: URL of admin’s avatar

- admin_firstName: first name of admin

- admin_lastName: last anme of admin

- admin_gender: gender of admin

- admin_address: address of admin

- admin_mobile: mobile number of admin

- admin_password: password of admin, uses for login

- product_ID: identifier of a product

- product_barcode: barcode of a product

- product_amount: the number of that product that are available to sell

- product_price: a list of available prices for a product

- product_name: name of a product

- product_category: category of a product

- product_brand: brand of a product

- product_made_in: country where the product made

- product_image: image of a product

- product_date: date of when product data is created

- comment_list: a list of comments made by users

- comment_users: a list of users that make comment

- cart_ID: identifier of the cart

- user_ID: user’s identifier that cart belongs to

- cart_total_products: number of items in the cart

- cart_totalPrice: cart total price

- cart_products_list: a list of product’s barcodes

- cart_product_amount: a list of numbers of each products

- store_ID: identifier of store

- online_order_ID_list: a list of the identifiers for the online order

- online_products_list: a list of products’s barcodes that sent to store

- online_users_list: a list of users that make the online order

- store_ID: identifier of store

- store_order_ID_list: a list of the identifiers for the store order

- store_products_list: a list of products’s barcodes that sent to store

- store_prices_list: a list of prices of the order

- store_amount_list: a list of numbers of products

- store_dates_list: a list of dates that the order is made

- store_users_list: a list of users that make the store order

- sale_ID: identifier of sales

- sale_prices: total benefits since the first product was sold

- sale_products: a list of products that are sold in the system

- sale_products_amount: a list of the amount of products that are sold in sale_products

- sale_products_category_amount: numbers of products in each category

- sale_months: a list of times in month/year format

- sale_months_amount: a list of numbers of products that are in sales in sale_months

- sale_total_products: a total of products in sales

- receipt_ID: identifier of a receipt

- user_ID: identifier of a user

- receipt_price: total price of all products

- receipt_products_list: a list of products bought in the purchase

- receipt_products_amount: the amount of each product in the receipt

- receipt_total_products: the total products in the purchase

- receipt_date: the date of the purchases time

Class Diagram

+ login(email, password): Use the email and password to login

+ register(): fill in necessary information to register an account

+ changePassword(): change the current password into new one

+ searchProduct(productName: String): enter the product’s name to search it

+ scanProduct(barcode: Long): scan product’s barcode to add them to cart

+ payCart(cart: Cart): pay the products in cart After paying, all products in cart is clear + viewProduct(): show the details of the product

+ viewReceipt(): show the details of the receipts you receive when making a purchase + viewRanking(): show the ranking of all users based on their shopping points

+ viewProfile(): show your information when registered

+ editProfile(): change your profile’s information

+ addCartItem(): add the product that users scan in the app or add in product’s screen + modifyAmountInCart(): increase or decrease the product’s amount

+ deleteProductInCart(): remove the product by pressing “X” or decrease its amount to

+ sendPaymentRequest(): send data of the orders to the appropriate store

+ login(email, password): Use the email and password to login

+ register(): fill in necessary information to register an account

+ changePassword(): change the current password into new one

+ addProduct(): add new product by filling in necessary information

+ modifyProduct(): change the product’s properties

+ viewProductList(): show the list of all available products to sell

+ viewProduct(): show the properties of a product

+ viewSales(): view the sales of the products in many types

+ login(email, password): Use the email and password to login

+ register(): fill in necessary information to register an account

+ changePassword(): change the current password into new one

+ getOnlineRequest(): get a list of requests that need to deliver to customers when they order them online

+ getStoreRequest(): get a list of requests that need to be prepared before customers come to get them

+ scanCart(): scan users’s QR code to get their cart’s information and do the payment.

Implementation

Login

After the splash screen, a Login screen appear If users have an account and fill in the correct username and password, the screen changes to main screen However, if users login for the first time, it changes to user’s profile screen instead so that user can modify their information

Register

In case users didn’t have an account, they can create a new one by clicking “Register” in Login screen After users fulfill the require information, a new account is created and a notification appears

Figure 3.23 Register Screen Figure 3.24 Register Successfully

In registering progress, if users don’t fulfill all of the requirements, a Toast will appear to

Change Password

Users can access this screen by clicking “Forgot Password?” in Login screen After entering a valid email and clicking “SUMMIT”, users receive an email to create a new password After summitting, the app automatically returns to Login screen

If users receive the reset password email, they can click the link sent and it redirects them to the reset password page

User’s Profile

If this is the first time that user logins by a new account, a profile screen will appear for user to fill in all important information And this screen can be access at any time for modification later Since the first name, last name and email are filled in when users register their accounts, they only need to fill in the mobile number, address and choose their gender

Figure 3.29 User’s profile information if they login for the first time

User main screen

After login, the app changes to main screen This screen contains three components: Product screen – which is the first screen appears after login, Receipt screen – containing the receipts and some sales-relating functions, and Order screen – which is used for purchasing products

Add Product to Cart

User can click the QR icon in the above of the app’s Product screen to get to Barcode/QR scanning screen User uses the function by scanning the product’s barcode, and a message appears if the product is scanned and added to cart If user scans a product that is already in cart, its amount increases by one in cart

Figure 3.31 User’s barcode scanning screen

User’s Cart

The cart on the Order screen contains all the products that user has scanned In this screen, user can modify the amount of products or delete them After finishing to choose the products, user can press “Thanh toán” to pay the cart

View Receipts

Can be access by clicking “Hóa đơn” in the main screen This screen shows all the receipts for all of user’s orders User can click each receipt to view the product’s info and click the product to open their information screen

Admin’s screen

After logging in using admin account, admin can access the admin screen, which lists all of admin functions

Add a Product

Admin can add a product by hand if that product is not in the database If admin has the product, he/she can click the QR-scanning icon and scan the barcode in the product to retrieve it and add to the screen

List Products

Admin accesses List all products function In this screen, admin can view product’s information, search products and modify its properties

Modify a Product

Admin can access this by pressing “Modify” in any product In this screen, admin can modify product’s name, price, category, amount, barcode, brand, made in and image

Search Products

Admin can click the search icon in List products screen to access this function By filling the name or the barcode, it will search the product arcording to that field Admin can click the QR icon to scan the product and search it

Figure 3.38 Search product screen Figure 3.39 Search product successfully

Refund Receipt

Sellers can refund a users’s order if they has a user’s receipt Users’s receipt can be access in the User Order screen, through the QR code Sellers can access receipts by using function “Refund Receipt”, scan the QR code and get users’s receipts

Figure 3.40 Scan QR code screen Figure 3.41 Get user’s receipt successfully

After getting the list of receipts, by choosing the receipt that users want to refund, sellers can view the products, total price and even do the refund if any users ask them

Get user’s Cart

This function can only be used when users make a shopping in the store Similar to refund receipt, sellers first scan users’s QR code to get their cart After getting the cart, sellers can ask users if they want to use their coupon for the purchase or not, then do the purchase of users choice and get their cash

Figure 3.43 Get user’s Cart screen

Sales Dashboard

This function help admin view the dashboard for each category of products The unit used for counting is the amount

Figure 3.44 Dashboard for each category of products

This function also provides the dashboard for sales in some specific time of a year The unit used for counting is also the amount

Figure 3.45 Dashboard for sales in a year

Order from customer / Online Order

When customers make an order in the app, the request is then sent to the store Depending on the situation, the store staff can prepare products in the order and wait for customers to get them or having shippers to do the delivery

Figure 3.46 User’s online order Figure 3.47 User’s Order information

System Effectiveness

For testing the loading time between pages, I use Android Studio Profiler to test on a Samsung Galaxy J7 plus, which version is Android 8.1.0

Table 5.1: Loading time between pages in Admin application

Pages Page first load time (ms) Page average load time (ms)

Table 5.2: Loading time between pages in User application

Pages Page first load time (ms) Page average load time (ms)

From the above tables, the loading pages speed in both admin and user application is pretty fast in average, with an exception of “View store location” page since the phone may have an overloaded Google Maps data cache or the application doesn’t too work well with the older device

Table 5.3: Time for actions in Admin application

Actions Time for the first action (ms) Average time for the action

Table 5.4: Time for actions in User application

Actions Time for the first action (ms) Average time for the action

Add product to cart from

From table 5.3 and 5.4, the only actions taking much time of users are login and register, which are usually one of the most time-consuming actions in any application Admin’s

“Add new products” action may takes a long time at first, but since this action depends on the Internet connection speed, it can take a pretty short time later

Although slow login and register speed are common for an application, the amount of time for users to login or register in HoApp is higher than the current popular market apps like Shopee, Tiki or Lazada.

System Availability

HoApp uses Firebase, a database which is real-time, available 24/24 and has fast, stable update speed so the app can be used at any time, with all the data available in Firebase And because the app doesn’t have fatal errors, the maintenance time will be used for updating new features and fixing layout errors Although HoApp’s amount of products database is not very large (over 1000 products available in database), it can easily updates new product data if it is available.

System Reliability

To measure the reliability of the application, 30 times of testing is made to calculate the probabilities of success and failure actions in both Admin and User application

Table 5.5: Probabilities for success and failure actions in Admin application

Actions Number of failure actions

From the probabilities table of admin, the ratio for success and actions is calculated:

+ R S is the probability of system success or reliability

+ Q S is the probability of system failure

In table 5.5, the only failure actions are “Get User’s Cart” and “Refund receipt” and they are both uses QR scanner to scans User’s QR code The reason these actions fails is because they take too long to scan product’s barcode in the first time So the failure here is not unable to scan a product, but consuming a large time in scanning And I think 6.55% of system failure is acceptable for a time-consuming scanning reason

Table 5.6: Probabilities for successful and failure actions in User application

Actions Number of failure actions

Add product to cart from

From table 5.6, the ratio for success and actions is calculated: operation due to Google Maps implementation and slow connection

With the probabilities from Admin and User application, although the app works almost perfectly for user, the admin part sometimes encounters some issues related to system Also, this app depends on the Internet connection so if the connection is unstable, the app performance will be drastically slower in most parts of the system

The HoApp model, with the application of barcodes and QR codes for product’s management and making payments, surely achieves a certain progress in solving the problems of automating the shopping process Not only HoApp provides using cash as payment method, but also provides MoMo for online payment make the shopping experience easier in this day In addition, the advantages of saving labors and new shopping experience that HoApp model brings out, compared to the traditional model, is an opportunity for HoApp to grow

HoApp is created with the purpose to deliver e-commerce with an old and new experience, so it provides users all the trading services with minimum requirements Besides, some side features are implemented to help increasing users’s shopping experience at store and at home It also provides an easy-to-use layout, so users will not be confused even if they haven’t read the user’s manual In authorization part, likes login or register, if users enter error data, the app sends a toast to user to notify them about the error, so this part will not cause fatal error

HoApp is surely having drawbacks First, this app is 100% online so users must have Internet connection to use, which makes shopping online at home is preferred Second, the only version available for users now is Android, so IOS or web users cannot use it The other downside of HoApp, although having an easy-to-interact layout, is that it isn’t well-designed since the layout is a bit bland and uninteresting, but this problem can be improved in the future update

To make this project workable, knowledges from various aspects of technologies must be learned First, I need to understand what is retail automation and how it works After defining how my system should be, I begin to implement my application in Android Studio, from applying Kotlin as programming language of the application to research Firebase and apply it as database Google Maps and MoMo are also interesting to invest and apply

Although the app has finished its basic functions, it still has a lot of potentials to developped In the future, I will continue to fix the app minimal errors and implement additional functions And of course, I will redesign my application’s look and make it more delightful but still easy to use so that it can attract people to use

Certainly, the app will still face many difficulties: from the application design, to the implementation of the model, the estimated technology cost (though feasible for real- scale businesses, but may be difficult for us students, so this must be process with attention and there is a high change of needing a sponsor) But with the enthusiastic help and dedicated guidance from our teachers, I believe that HoApp will become better and better with time

[1] Nick Wingfield (December 5, 2016) “Amazon Moves to Cut Checkout Line, Promoting a Grab- and-Go Experience” The New York Times Retrieved March 8, 2017

[2] “Introducing Amazon Go and the world’s most advanced shopping technology” Amazon December 5,

2016 – via Youtube [3] ”Amazon Go app now available for you to shop in most advanced store”, Mobilescout, 22 January

2018, https://www.mobilescout.com/android/news/n103072/Amazon-Go-app-available-download- android.html#comments

[4] Ilaria Gasparo, “A-Retail The automated future of shopping, from fashion to grocery store”, Medium, 2 April 2019, https://medium.com/gobeyond-ai/call-it-a-retail-call-it-retail-automation-call-it- automated-retail- whatever

[5] Andria Cheng, “Amazon Go Looks To Expand As Check Out – Free Shopping Starts to Catch On Across The Retail Landscape”, Forbes, 21 November 2019, https://www.forbes.com/sites/andriacheng/2019/11/21/thanks-to-amazon-go-checkout-free-shopping- may-become-a-real-trend/

[6] “BingoBox leads the space race in cashierless convenience retail”, RETAIL INSIGHT NETWORK,

1 March 2019, https://www.retail-insight-network.com/comment/bingobox-cashierless-stores/

[7] “Bingo Box: on the brink of success”, Altavia Shoppermind, 7 July 2017, https://www.altavia- shoppermind.com/bingo-box-the-brink-success/

[8] Beaconstac, https://www.beaconstac.com/types-of-qr-codes-examples, [accessed at 11/12/2020] [9] Martin Heller, “What is Kotlin? The Java alternative explained”, InfoWorld, 23 March 2020, https://www.infoworld.com/article/3224868/what-is-kotlin-the-java-alternative-explained.html [10] Doug Stevenson, “What is Firebase? The complete story, abridged.”, Medium, 25 September 2018, https://medium.com/firebase-developers/what-is-firebase-the-complete-story-abridged- bcc730c5f2c0#:~:text=Firebase%20is%20Google%27s%20mobile%20application,improve%2C%20and

%20grow%20your%20app.&text=letters%2C%20for%20impact%3A- ,Firebase%20is%20Google%27s%20mobile%20application%20development%20platform%20that%20h elps%20you,improve%2C%20and%20grow%20your%20app

[11] “Firebase Authentication”, Firebase, https://firebase.google.com/docs/auth/, [accessed at 22/02/2021] [12] MoMo | Developers, https://developers.momo.vn/v1/#thanh-toan-pos, [accessed at 24/02/2021]

MoMo’s API reference: using app-in-app payment API from MoMo, which allows other application to open MoMo for payment:

Figure A.2 MoMo linking sequence diagram

Significantly shorter code but more documentation comments compared to competing libraries

Supports encoding all 40 versions (sizes) and all 4 error correction levels, as per the QR Code Model 2 standard

Output formats: Raw modules/pixels of the QR symbol Detects finder-like penalty patterns more accurately than other implementations Encodes numeric and special-alphanumeric text in less space than general text

# Simple operation qr0 = QrCode.encode_text("Hello, world!", QrCode.Ecc.MEDIUM) svg qr0.to_svg_str(4)

# Manual operation segs = QrSegment.make_segments("3141592653589793238462643383") qr1 QrCode.encode_segments(segs, QrCode.Ecc.HIGH, 5, 5, 2, False) for y in range(qr1.get_size()): for x in range(qr1.get_size()):

TRƯỜNG ĐẠI HỌC BÁCH KHOA CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM

KHOA KH & KT MÁY TÍNH Độc lập - Tự do - Hạnh phúc

PHIẾU CHẤM BẢO VỆ LVTN

(Dành cho người hướng dẫn/phản biện)

Ngành (chuyên ngành): Khoa học Máy tính

2 Đề tài: A mobile application for shopping automation

3 Họ tên người hướng dẫn: PGS TS Trần Minh Quang

4 Tổng quát về bản thuyết minh:

Số bảng số liệu: Số hình vẽ:

Số tài liệu tham khảo: 12 Phần mềm tính toán: Hiện vật (sản phẩm):

5 Tổng quát về các bản vẽ:

- Số bản vẽ: Bản A1: Bản A2: Khổ khác:

- Số bản vẽ vẽ tay Số bản vẽ trên máy tính:

6 Những ưu điểm chính của LVTN (Advantages):

- Analyze and design a mobile application for shopping automation

- Investigate well the literature reviews, select suitable methods for system analysis and designs and appropriate technologies for the systems implementation

- A mobile application has been developed with basic functions for a retail system

- Some evaluations have been conducted and analyzed

7 Những thiếu sót chính của LVTN (Weakness):

- The functionalities of the mobile app can be improved

- The automation features should can be improved as well

- The evaluations are still in a synthetic environment, no real-field experiment has been conducted

8 Đề nghị: Được bảo vệ  Bổ sung thêm để bảo vệ  Không được bảo vệ 

9 3 câu hỏi SV phải trả lời trước Hội đồng:

- Please clarify the main contributions of the thesis and the plant to bring this app to the real- world application?

10 Đánh giá chung (bằng chữ: giỏi, khá, TB): Giỏi; Điểm: 8.0/10

Ký tên (ghi rõ họ tên)

TRƯỜNG ĐẠI HỌC BÁCH KHOA CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM

KHOA KH & KT MÁY TÍNH Độc lập - Tự do - Hạnh phúc

PHIẾU CHẤM BẢO VỆ LVTN

(Dành cho người phản biện)

1 Họ và tên SV: Võ Đông Hồ MSSV: 1752219 Ngành (chuyên ngành): Khoa học Máy tính

2 Đề tài: Mobile application for shopping automation

3 Họ tên người phản biện: TS Phan Trọng Nhân

4 Tổng quát về bản thuyết minh:

Số bảng số liệu Số hình vẽ:

Số tài liệu tham khảo: Phần mềm tính toán: Hiện vật (sản phẩm)

5 Tổng quát về các bản vẽ:

- Số bản vẽ: Bản A1: Bản A2: Khổ khác:

- Số bản vẽ vẽ tay Số bản vẽ trên máy tính:

6 Những ưu điểm chính của LVTN:

-The student has developed an Android-based mobile application that supports users shopping at home and at store The application runs fine with core features such as online order and delivery

-The student proposes a way that solves the queue problem at the cashier desk In this case, a customer has to scan his or her purchased items by mobile application and then show the QR code to the cashier for payment

-The student has employed modern technologies for development and performed some basic empiriments

7 Những thiếu sót chính của LVTN:

-The main points of shopping automation have not been actually analyzed and developed

-The proposed solution for line bottle-neck at the cashier desk might not be convenient for users because they have to scan the QR code one by one

-Some features did not make sense or work (e.g., Momo payment, store location)

-The report needs to be improved with usecase, ERD, and testing

8 Đề nghị: Được bảo vệ  Bổ sung thêm để bảo vệ  Không được bảo vệ 

9 3 câu hỏi SV phải trả lời trước Hội đồng: a How does your system support users for shopping automation? b What are your big challenges? c.

Ngày đăng: 31/07/2024, 10:17

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w