Design, Implementation, and Benefit Analysis of the Intelligent Online Canteen Ordering Platform
Design, Implementation, and Benefit Analysis of the Intelligent Online Canteen Ordering Platform
Volume 8 Issue 6, Nov-Dec 2024 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470
I. INTRODUCTION
In the current digital era, online ordering has become dining queues is becoming increasingly prominent,
an essential part of daily life. However, for campus affecting not only the dining experience but also
canteens, traditional ordering methods still present constraining the improvement of canteen service
many inconveniences, such as long queue times and efficiency. Inspired by the online food delivery model,
low service efficiency. These problems not only affect this project has decided to develop an online ordering
students' dining experiences but also restrict the mini-program. Students can order online in advance,
improvement of canteen service quality. Therefore, and the canteen can prepare meals based on order
developing an intelligent online canteen ordering information, achieving a dining model of "come and
platform is particularly important. take, eat and go."
This project aims to innovate technically, combining III. System Design
big data technology, to design and implement an 3.1. Data Model Design
online ordering mini-program based on Python to To clearly depict user data, this project has designed
optimize the dining process in canteens and enhance an Entity-Relationship (E-R) diagram as the data
the comfort and convenience of the dining model. The model includes six entities: manager, chef,
environment. Additionally, the project will explore waiter, cashier, food, and seat, as well as their
how to address potential issues with online ordering, relationships and attributes. For example, the manager
such as stacking orders, to ensure the smooth is responsible for managing food preparation, cashier
operation of the online ordering system. operations, and staff; the chef is responsible for
preparing food; the waiter is responsible for
II. Project Background and Industry Analysis
displaying the menu, taking orders, and submitting
Against the backdrop of digital transformation,
campuses, as nurseries for future talents, are actively them; the cashier is responsible for querying
embracing change. Currently, the problem of student consumption and checking out; and the seat is
associated with the order information.
@ IJTSRD | Unique Paper ID – IJTSRD71617 | Volume – 8 | Issue – 6 | Nov-Dec 2024 Page 668
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
3.2. Functional Model Design primary keys, foreign keys, and constraints, the
The functional model describes in detail the user accuracy and reliability of the data were ensured.
requirements that the software system must fulfill. In Additionally, to improve the efficiency of database
this project, we carefully designed a data flow queries, index optimization design was also carried
diagram to visually represent the entire process of data out.
flow and change within the ordering system. This data
IV. System Implementation
flow diagram starts with the waiter successfully
This project was developed using the Flask framework
logging into the system and details the entire ordering
and SQLite database technology under the Python
process: after logging in, the system displays the menu
environment, achieving an intelligent online canteen
for customers to choose from; after browsing the
ordering platform. The following is a description of
menu, customers place their orders; once the order is
the implementation of the system's main functions:
placed, the waiter submits it; the order information is
then passed to the chef who begins preparing the from flask import Flask, request, jsonify
dishes according to the order; once the dishes are from flask_sqlalchemy import SQLAlchemy
prepared, the cashier receives the information and
queries the customer's consumption, finally app = Flask(__name__)
performing the checkout operation. The entire data app.config['SQLALCHEMY_DATABASE_URI'] =
flow diagram clearly shows the complete process from
waiter login to checkout, ensuring that the data flow 'sqlite:///marketplace.db'
and change at each stage are accurately represented. db = SQLAlchemy(app)
3.3. Hierarchical Structure Design #Business Model
The hierarchical structure diagram of the ordering
class Restaurant(db.Model):
system shows the calling relationships between
various modules. The ordering system designed in this id = db.Column(db.Integer, primary_key=True)
project first calls the login module, and then, name = db.Column(db.String(80), nullable=False)
depending on the logged-in user, calls different
functional modules such as the manager module, menu = db.relationship('MenuItem',
ordering module, preparation module, and cashier backref='restaurant', lazy=True)
module. def __repr__(self):
3.4. Program Flowchart Design return f'<Restaurant {self.name}>' class
The program flowchart details the specific MenuItem(db.Model):
implementation steps of the ordering system. In this
system, the designed ordering program flowchart id = db.Column(db.Integer, primary_key=True)
covers multiple key stages, including user login name = db.Column(db.String(80), nullable=False)
verification, operation guidance for the ordering
price = db.Column(db.Float, nullable=False)
interface, order submission, real-time display of the
preparation process, and the checkout 环节等. restaurant_id = db.Column(db.Integer,
db.ForeignKey('restaurant.id'), nullable=False)
Through the detailed guidance of these flowcharts, the
entire system can achieve comprehensive management def __repr__(self):
and control of the ordering process, ensuring that each return f'<MenuItem {self.name}>'
step proceeds smoothly, thereby improving ordering
efficiency and user experience. db.create_all()
3.5. Database Design @app.route('/restaurants', methods=['POST'])
Database design aims to provide an information def add_restaurant():
infrastructure and efficient operating environment for
users and various application systems. The ordering data = request.get_json()
system database designed for this project includes six new_restaurant = Restaurant(name=data['name'])
tables: manager, waiter, chef, cashier, food, and seat.
db.session.add(new_restaurant)
Each table contains corresponding fields and attributes
to support the normal operation of the ordering db.session.commit()
system. return jsonify({'message': 'Restaurant created
In the database design, particular attention was paid to successfully.'}), 201
data consistency and integrity. By reasonably setting
@ IJTSRD | Unique Paper ID – IJTSRD71617 | Volume – 8 | Issue – 6 | Nov-Dec 2024 Page 669
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
Get all merchants PostgreSQL or MySQL, and you would need to add
@app.route('/restaurants', methods=['GET']) features like user authentication, order processing, and
payment integration.
def get_restaurants():
4.1. Implementing Login Functionality
restaurants = Restaurant.query.all() The system first implements a login feature where
output = [] users must enter the correct username and password to
access the system. Upon successful login, depending
for restaurant in restaurants: on the user's role, the system will display different
restaurant_data = {'id': restaurant.id, 'name': functional interfaces.
restaurant.name} 4.2. Implementing the Ordering Functionality
Once the waitstaff successfully logs into the system,
output.append(restaurant_data) they will be directed to the main interface of the
return jsonify({'restaurants': output}) ordering system. In this interface, customers can
choose to enter their table number and the number of
# 添加菜单项
people dining. After filling in this information,
@app.route('/restaurants/<int:restaurant_id>/menu', customers can place their orders themselves or with
methods=['POST']) the assistance and guidance of the waitstaff. The
ordering interface is designed to be intuitive and user-
def add_menu_item(restaurant_id):
friendly, displaying basic information about the
data = request.get_json() various foods offered by the restaurant, including dish
new_menu_item = MenuItem(name=data['name'], names, prices, ingredients, and images. Additionally,
price=data['price'], restaurant_id=restaurant_id) the ordering interface will display the dishes that
customers have selected in real-time, allowing them to
db.session.add(new_menu_item) easily view and modify their orders. Customers can
db.session.commit() carefully browse through the dish information, select
their favorite dishes, and add them to their shopping
return jsonify({'message': 'Menu item created cart. The entire ordering process is convenient and
successfully.'}), 201 fast, ensuring that customers can easily place their
@app.route('/restaurants/<int:restaurant_id>/menu', orders and enjoy a pleasant dining experience.
methods=['GET']) 4.3. Implementing the Production Management
def get_menu(restaurant_id): Functionality
The production management functionality is primarily
menu_items =
for the convenience of the chefs' operations and
MenuItem.query.filter_by(restaurant_id=restaurant_i management. Once chefs successfully log into the
d).all() output = [] system, they will be able to enter a dedicated
for item in menu_items: production management interface. On this interface,
chefs can view all the food information from customer
item_data = {'id': item.id, 'name': item.name, 'price': orders in real-time. Whenever a new order is
item.price} submitted, the corresponding food information will
immediately appear on the chef's production
output.append(item_data) management interface, ensuring that chefs can stay
return jsonify({'menu': output}) up-to-date with the latest orders.
if __name__ == '__main__': Through this production management interface, chefs
can efficiently manage the production of dishes based
app.run(debug=True) on the detailed information in the orders. They can
This simple ordering platform utilizes the Flask view the specific requirements of each order, such as
framework and SQLAlchemy ORM. It defines two special preparation methods and ingredient needs, to
models: Restaurant and MenuItem. Via a RESTful ensure that each dish is prepared accurately according
API, it allows for adding restaurants, retrieving a list to customer requests. Moreover, the production
of restaurants, adding menu items, and obtaining the management interface can help chefs better arrange
menu for a specific restaurant. This example uses a the production sequence, optimize workflow, and
SQLite database, which is suitable for rapid improve overall production efficiency and customer
prototyping. In a production environment, you would satisfaction.
likely need a more robust database system such as
@ IJTSRD | Unique Paper ID – IJTSRD71617 | Volume – 8 | Issue – 6 | Nov-Dec 2024 Page 670
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
4.4. Implementing the Cashier Functionality freshness of the dishes, meeting customers' daily
The cashier functionality is an important service used needs and increasing the competitiveness of the
by cashiers when dining customers need to check out. restaurant. In summary, these three management
When customers have finished dining and are ready to functions provide the manager with comprehensive
leave, the cashier only needs to know the table number management tools to better operate the restaurant.
used by the customers during their meal to quickly
V. Benefit Analysis
retrieve the detailed consumption information. This
5.1. Economic Benefits
consumption information includes the dishes, drinks,
The successful implementation of this project has
and any other items consumed by the customers,
brought significant economic benefits to the cafeteria,
ensuring that the cashier can accurately perform the
which are reflected in several aspects. First, by
checkout operation.
introducing online ordering and reservation pickup
During the checkout service, the cashier will calculate functions, the cafeteria has significantly reduced labor
the total amount due based on the customer's and time costs. This innovative measure not only
consumption information. To better meet the payment improves the operational efficiency of the cafeteria
needs of different customers, the cashier interface is but also provides a more convenient dining experience
designed to be very flexible, supporting various for customers. Second, the introduction of an
payment methods. Common payment methods include intelligent ordering system has further improved
cash, credit or debit card payments, mobile payments service quality and attracted more customer traffic and
such as Alipay and WeChat Pay, and some restaurants revenue. The intelligent system not only reduces
may also support other emerging payment methods queuing time but also increases customer satisfaction
such as e-wallets and membership card payments. By through precise dish recommendations. Finally,
providing multiple payment options, the cashier through data analysis and management optimization,
functionality ensures that customers can choose the the cafeteria can more accurately grasp customer
payment method that best suits them during checkout, needs and market trends. This enables the cafeteria to
thereby enhancing the customer's payment experience develop more effective sales strategies and dish
and satisfaction. combinations, better meeting market demands and
4.5. Implementing the Manager Functionality increasing overall revenue. In summary, the successful
Once the manager successfully logs into the system, implementation of this project has brought all-around
they will have three main management functions: economic benefits to the cafeteria, enhancing
employee management, revenue inquiry, and dish operational efficiency and service quality, and laying a
management. In the employee management interface, solid foundation for the cafeteria's long-term
the manager can view detailed information about all development.
registered employees, including but not limited to the 5.2. Social Benefits
employee's name, employee number, position, and In addition to economic benefits, this project has also
contact information. In addition, the manager can brought significant social benefits. First, the intelligent
perform data 增删改查 (CRUD) operations on online cafeteria ordering platform not only enhances
the convenience and comfort of campus life but also
employee data to better manage employee
provides students and staff with a more efficient and
information.
convenient dining experience. With this platform,
The revenue inquiry function provides the manager users can order food anytime and anywhere without
with flexible data analysis tools. The manager can the need to queue, saving a significant amount of time
choose to query sales data for each dish on a daily, and effort. Furthermore, the intelligent ordering
monthly, or annual basis. This allows the manager to system can provide personalized recommendations
easily understand which dishes are most popular based on users' dietary preferences and historical
during specific time periods and the details of the total orders, further enhancing the dining experience.
sales. These data help the manager perform sales
Second, by optimizing the cafeteria's dining process
analysis and develop corresponding marketing
and service quality, this project helps promote the
strategies.
healthy development of campus dining culture. The
In the dish management interface, the manager can introduction of the intelligent ordering system enables
make targeted adjustments and optimizations to the the cafeteria to arrange dish supply and inventory
dishes. This includes but is not limited to adding new management more scientifically, reducing waste and
dishes, modifying the recipes or prices of existing improving ingredient utilization. At the same time, the
dishes, and deleting dishes that are no longer popular. cafeteria can adjust dishes and services based on user
By doing so, the manager can ensure the variety and feedback and evaluations, continuously improving
@ IJTSRD | Unique Paper ID – IJTSRD71617 | Volume – 8 | Issue – 6 | Nov-Dec 2024 Page 671
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
service quality and creating a more harmonious dining user experience, adding more personalized options
environment. and intelligent recommendation features to make the
ordering process more humanized and intelligent.
Finally, the promotion and application of the
intelligent ordering system can also promote the in- Furthermore, we will actively explore the application
depth practice of campus digital transformation, and promotion of the intelligent ordering system in
providing useful references and insights for the other fields, such as corporate cafeterias, school
intelligent transformation of other fields. With this dining halls, hospital catering, etc., injecting new
system, campus management departments can monitor momentum into digital transformation. Through
the cafeteria's operations in real-time, promptly continuous technological innovation and market
identify and resolve issues. In addition, the intelligent expansion, we believe that the intelligent ordering
ordering system can be integrated with other campus system will play a more significant role in the future,
information systems to achieve data sharing and providing more users with a convenient and efficient
collaborative work, further enhancing campus ordering experience.
management efficiency and standards. References:
In summary, the implementation of this project has [1] Ye Mengjun, Jiao Bing. Design and
not only brought economic benefits but, more Implementation of an Ordering System Based
importantly, has played a positive role in improving on Linux[J]. Computer Knowledge and
the quality of campus life, promoting the development Technology, 2023, 19(3): 44-46, 50.
of dining culture, and advancing campus digital [2] Zhong Qianqian, Sun Liying, Chen Bin, et al.
transformation, holding profound social significance. Design and Development of an Ordering
VI. Conclusion and Outlook System Based on WeChat Mini-Program[J].
Computer Knowledge and Technology, 2022,
In this project, we carefully designed and successfully
implemented an intelligent online cafeteria ordering 18(19): 66-69, 73.
platform based on the Python language. The launch of [3] Xu Hao. Design and Implementation of a
this platform effectively alleviated the long-standing Recommended Ordering System Based on the
queue problem in the cafeteria, significantly improved Random Forest Model[D]. Lanzhou: Lanzhou
service efficiency, and greatly enhanced customer University, 2023.
satisfaction. Through detailed analysis of project
[4] Gu Yanshuo, Shi Zhentao, Sun Shenying, et al.
requirements, careful planning of system design, and
Design and Implementation of an Ordering
detailed descriptions of the implementation process,
System Based on Content Recommendation
along with in-depth analysis of project benefits, we
Algorithm[J]. Computer Knowledge and
can clearly see that the successful implementation of
Technology, 2022, 18(10): 48-49.
this project has brought significant economic and
social benefits to the cafeteria. [5] Li Dan. Design and Implementation of a
Wireless Ordering System Based on the
Specifically, the platform has reduced the time
Android Platform[D]. Beijing: Beijing
customers spend waiting in line at the cafeteria
University of Posts and Telecommunications,
through an intelligent ordering process, making the
2012.
ordering process more convenient and efficient. At the
same time, the efficiency of cafeteria staff has also [6] Yu Yonghong, Zhao Weibin. Design and
been improved because they can process orders and Implementation of an Intelligent Terminal
prepare dishes more quickly. In addition, the platform Electronic Ordering System[J]. Computer
provides a variety of payment methods, further Technology and Development, 2015, 25(5):
enhancing the customer's ordering experience. 187-191.
Looking to the future, we will continue to optimize [7] Shen Yanping, He Menglei. Ordering System
and improve the ordering system, enrich its Based on WeChat Mini-Program[J]. Computer
functionality, and enhance its performance to meet the Knowledge and Technology, 2018, 14(4): 62-
needs of more users. We will focus on improving the 63, 83.
@ IJTSRD | Unique Paper ID – IJTSRD71617 | Volume – 8 | Issue – 6 | Nov-Dec 2024 Page 672