Professional Documents
Culture Documents
Design and Im... Boot and Vue - 耿庆阳
Design and Im... Boot and Vue - 耿庆阳
classified
x i
'
Master's thesis
B
question head
Based on S
p ringing _ _ o ot and Vu e 's electronic mall
Professor Xu Yingzhuo
Instructor's name and title
I declare that the dissertation submitted is my personal research work and research results under the guidance of my supervisor . To the best of my
knowledge , except for those specifically marked in the text and listed in the acknowledgments , the thesis does not include research results that have been
published or written by others ; degree or certificate from a university or other educational institution . Any contribution made by the comrades who worked
I fully understand the regulations of Xi'an Shiyou University on the retention and use of dissertations , namely : graduate students studying at school
The intellectual property unit of the thesis work during the degree period belongs to Xi'an Shiyou University. The school has the right to publish ,
reproduce , openly read , borrow and apply for patents in any way . When I publish or use my dissertation or academic papers or achievements
directly related to the dissertation after leaving school , the signature unit is still Xi'an Shiyou University .
? Note : If this paper is confidential , please indicate it in the description of the authorization ( including the decryption period, etc. ) .
I
Machine Translated by Google
Chinese abstract
Thesis title: Electronic mall design and implementation based on Spring Boot and Vue Major: Computer
application technology
Summary
Since the development of e-commerce, online shopping has been integrated into people's daily life. Not only for shopping
Consumers enjoy sufficient convenience and better adapt to the needs of the modern market. But everything has advantages and disadvantages. While online
shopping brings convenience to consumers, it also brings many problems. Unreasonable product recommendations, unqualified product quality, and user
information security issues have not been effectively resolved. As a result, consumers are disturbed by a large amount of product information after entering the
electronic mall, and spend a lot of time on selecting products. Even end up buying unnecessary items. At the same time, there may be problems with the quality of
the purchased goods. Aiming at such problems, this paper designs and implements an electronic shopping mall system. First of all, aiming at the problem of
inaccurate product recommendation, a product recommendation algorithm based on collaborative filtering is proposed, and the cold start problem and sparsity
problem of the traditional collaborative filtering algorithm and the distance calculation method of the k-means clustering algorithm are improved . ,
combined with the improved k-means clustering algorithm to generate a better set of candidate commodities. Combined with the popular commodity collection
collected by the system, select Top-N commodities and recommend them to users.
Secondly, in response to the problem of unqualified product quality, a product quality and safety inspection process is proposed to strengthen the system's product
safety inspection. Ensure the safety of commodities from the inspection reports of commodities, the certification of national institutions, and the filing of anti-counterfeiting committees.
Full quality, from the source to prevent counterfeit and shoddy goods from flowing into the electronic mall system.
Then, aiming at the security of user information, the Spring Boot and Vue framework and JAVA language are used to build the electronic mall system.
The electronic shopping mall system developed in this paper enables consumers to not only recommend products that are more in line with consumers'
consumption habits, but also effectively guarantee the quality and safety of products and user personal information, which improves consumers' shopping experience.
experience.
Keywords: electronic mall, commodity recommendation, collaborative filtering algorithm, recommendation algorithm, k-means clustering algorithm
II
Machine Translated by Google
English summary
Subject ÿ Design and implementation of electronic mall based on Spring Boot and Vue
Speciality: Computer application technology
Name : Geng Qingyang (signature)
Instructor: Xu Yingzhuo (signature )
ABSTRACT
Since the development of e-commerce, online shopping has been integrated into People's
Daily life. It Not only in the shopping so that consumers enjoy enough convenience, but also
better adapt to the needs of the modern market. However, all advantages have disadvantages.
While online shopping brings convenience to the vast number of consumers, it is also
Accompanied by many problems. Commodity recommendation is unreasonable, commodity
quality is unqualified, user information security problems have not been effectively solved.
a result, after entering the electronic mall, consumers are disturbed by a large number of
Commodity information and spend a lot of time in selecting commodities. They even end up
buying things they don't need. At the same time, there may be problems with the quality of the
goods purchased. To solve this problem, this paper designs and implements an electronic mall
system.
First of all, according to recommendation inaccurate problem, put forward a kind of
based on collaborative filtering recommendation algorithm, and the traditional collaborative
filtering algorithm is owned by the cold start problem, data sparseness and k-means
clustering algorithm distance calculation is improved, and combined with the improved k
means clustering algorithm, to generate a better set of candidate items. Combined with the hot
Commodity set of system statistics, select Top-N commodities to recommend to users.
Secondly, in view of the unqualified problem of commodity quality, the article puts
forward the process of commodity quality safety inspection, and strengthens the strength of
systematic commodity safety inspection. Ensure the safety and quality of commodities from
the aspects of commodity inspection report, national organization certification and
anti-counterfeiting committee filing, and prevent fake commodities from flowing into the
e-mall system.
Then, in view of the security problem of user information, Spring Boot, Vue framework
and JAVA language are used to build the electronic mall system, and on this basis, the system
front and background interaction request, user important information, payment information
encryption processing, so that the user information can not be cracked even if stolen.
The e-mall system developed in this paper enables consumers to not only recommend
products more in line with their consumption habits, but also effectively guarantee the quality
III
Machine Translated by Google
English summary
and safety of goods and the personal information of users. Improved the shopping experience
of consumers.
IV
Machine Translated by Google
Table of contents
Chapter 3 Requirements Analysis and Outline Design of E-Mall System................................... ................................11 3.1
of the e-mall ................................... ................................................... ..... 18 3.2.2 Functional module design of the
V
Machine Translated by Google
Table of contents
Design and Implementation of the E-Mall System .................. ................................................... .................. 27 4.1 System
research and academic achievements during the degree-seeking period........ ................................................... .......... 86
VI
Machine Translated by Google
Throughout the present era, science and technology continue to advance and the economy continues to grow. On the one hand, the rapid development of
science and technology has brought the world into the information age, and the computer Internet has brought people closer together. Now with the emergence of 5G,
people's lifestyles will undergo tremendous changes, but at the same time it will also affect people's Information security and convenience for greater and more
Strict requirements, computer technology will also face greater challenges. On the other hand, the continuous economic growth is gradually changing people's
consumption patterns. Since the birth of "Internet +", all walks of life have combined with the Internet to make the industry develop rapidly and promote rapid economic
growth. Among them, the most dazzling is the combination of commercial economic activities and Internet technology.
A brand new business economic model based on computer technology - e-commerce has emerged. After continuous development, e-commerce has been integrated
into people's daily life and plays a particularly important role in promoting economic development.
However, everything has advantages and disadvantages. In the process of continuous development of e-commerce, although it has promoted the rapid
development of the economy and provided convenience for consumers, many problems have also appeared. First of all, when consumers use the e-mall for shopping,
most of the product recommendation functions of the e-mall platform are not enough
Accurate, only simple screening can be performed, the quality of similar products cannot be judged, and the products that consumers may be interested in cannot be
accurately recommended. interested product information, and these poor product information have caused consumption interference to consumers, not only did not
Buy the high-quality goods you want, but also buy many poor-quality goods. Secondly, e-shopping platforms cannot
guarantee the quality of merchants’ products. When conducting commodity transactions, buyers and sellers cannot conduct commodity inspections in person,
and sellers often shirk their responsibilities when there are quality problems with commodities. And when the product itself is
When counterfeit and shoddy products are found, it is difficult for online shopping platforms to determine the responsible party. When shopping, consumers have no way of knowing the
real information of the product. They can only know the information of the purchased product through the product pictures provided by the merchants and the text attached to the pictures.
Consumers have no way of checking the authenticity of these information. Therefore, the safety and quality monitoring of commodities on e-shopping platforms is particularly important.
Finally, the security and confidentiality of personal information is also important when conducting electronic shopping. With the continuous development of
computer technology, a large number of hackers have appeared on the Internet, invading other people's computers to obtain important information, maliciously attacking
websites to paralyze them, stealing information for sale, etc., seriously endangering the information security of others.
Therefore, based on the above problems, this paper designs and implements an e-mall shopping platform, using Spring Boot , Vue framework and JAVA
language to build the system, and on the basis of collaborative filtering algorithm, combined with k-means clustering algorithm to improve, Design and implement a
product recommendation algorithm. In addition, the quality assurance of commodities has also been added.
1
Machine Translated by Google
The comprehensive detection has effectively improved the accuracy of product recommendation, product quality and user's personal information security.
In today's information age, if e-commerce wants to develop more rapidly, it must be supported by consumers.
trust. The only way to gain consumer trust is to solve the current problems of e-commerce.
With regard to the problem of inaccurate product information recommendation, with the introduction of various recommendation algorithms, the problem has been improved to a certain extent.
However, most of the currently used recommendation algorithms only consider users or items separately, and do not combine them.
The relationship between consumers and products is not taken into account when recommending products, resulting in low product recommendation accuracy and low recommendation efficiency.
The result is not ideal. Consumers also cannot judge whether the recommended products are high-quality products. If the recommended product is inferior
products and consumers mistakenly believe that high-quality products and buy them, which not only causes economic losses to consumers, but also increases electronic
The product return rate of the mall platform. Therefore, it is imminent to improve the accuracy of recommendation algorithms.
On the issue of commodity quality and safety, most e-commerce platforms only review the business licenses of merchants in order to pursue interests.
After verification, merchants can sell products on the e-mall platform after passing the review, and the management of product quality inspection is loose.
Moreover, the e-mall platform is not clear about the responsibility for product quality problems. Therefore, in the quality and safety of commodities
The problem needs to be improved urgently. The electronic mall system needs to have detailed product quality and safety inspections, and the responsibility for product quality problems belongs to
Be clearly divided. In this way, consumers can rest assured when shopping. Effectively reduce the return rate of goods and
consumer dissatisfaction.
In terms of user information security, the research and development of the electronic mall platform needs to change from the past. Safer technical framework should be adopted
Framework and development language, using the separation of front and back for interaction, and important for requests and users during front and back interaction
Information and payment information are encrypted, and there are certain requirements for code specifications. Abandon the previous integration of front and back
The development model and the system loopholes caused by non-standard code. This not only reduces the maintenance cost of the system
cost, and minimize the coupling of modules, making deployment easier and faster. Make malicious interception requests, modify requests
Malicious attacks such as parameters are difficult to work, and user information security issues have been well improved. Also makes the system module appear
After the problem, the impact on the normal operation of the system is minimized.
With the rapid development of the information age, not only has changed the way of life of contemporary people, but also brought
convenient service. The rise of e-commerce has enabled consumers to purchase commodities from all over the world without leaving home.
Among them, foreign Amazon shopping platforms, domestic shopping platforms such as Taobao, JD.com, and Vipshop have greatly enriched people’s
daily life. But with the convenience, the risks also increase. As of June 2019, China Internet Information Center
Xinxin announced that the scale of Internet users in my country has reached 854 million. This means that the personal private information of 854 million people is online
On the Internet, once information leakage occurs, people will lose their trust in the Internet, the development of e-commerce and the global economy.
serious impact on economic development. In addition, due to the low product quality and product recommendation accuracy, the consumption
The increase in the return rate of consumers and poor consumer experience will cause consumers to lose trust in e-commerce platforms. for these three
This paper conducts a more in-depth study and conducts a comparative analysis at home and abroad. The results are as follows:
2
Machine Translated by Google
accuracy Since 1992, foreign countries began to study the recommendation system, and the Xerox company in the United States applied the Tapestry system
In the company's daily office, the system helps the company's employees deal with spam. Later, scholars extended the recommendation to the field of movies. So far,
collaborative filtering algorithms have been brought into the field of vision of researchers [1]. In 2007, large-scale data processing became possible due to the application
of restricted Boltzmann machines in collaborative filtering [1]. In recent years, with the continuous development of artificial intelligence , the development of recommendation
algorithms is also more rapid, and research results emerge in endlessly, but most of them are improved based on collaborative filtering algorithms [2]. It is used in many
fields such as e-commerce, video, social networking, etc., which shows that the research of recommendation algorithm is a hot spot at present. In my country, the e-
commerce shopping platforms represented by Taobao and JD.com all have extremely powerful accurate recommendation technology, because the design of the
recommendation algorithm used by them meets the needs of consumers. At present, the collaborative filtering algorithm is widely used in the recommendation algorithm,
which is divided into user-based collaborative filtering algorithm and item-based collaborative filtering algorithm [3]. However, there are many problems in this algorithm,
such as its sparsity, cold start, scalability and other defects, which lead to poor quality of its recommendation algorithm. Faced with the sparsity problem of the algorithm,
the currently available solutions include data filling, matrix dimension reduction, neural network, etc. [4]. However, due to different user habits, the data filled in the data
filling cannot represent the user's interest in the product, and the neural network is used to reduce the sparsity. However, due to the high learning cost of the neural
network, the system will slow down when recommending products [4] . The matrix dimensionality reduction method has a better effect on dealing with sparsity problems.
For the cold start problem, the current solution is to fill in the nearest neighbors of new users or items by some means. For the scalability problem, with the continuous
increase of system users and system products, the amount of recommended calculations will also increase, which will cause the system to recommend slowly. Improve
the performance of the algorithm so that the problem can be solved effectively. (2) Commodity quality and safety issues In my country, according to the "Analysis of
Complaints Accepted by National Consumers Association Organizations in 2015" published by the China Consumers Association, in 2015, online shopping was far ahead
of other service fields with 20,083 complaints [5]. Accounting for 69.86% of the sales service complaints, among which the phenomenon of unqualified and counterfeit
goods is more serious. It can be seen that in my country's electronic mall platform, the problem of product quality is very serious. Previously, the Taobao
counterfeit goods incident reflected the hidden dangers of product quality and safety on my country's e-commerce platforms. Such problems are mainly due to the
lack of credit system and the fluke psychology of merchants and consumers. When shopping online, consumers and merchants can complete the transaction without
contact, which provides convenience for some individual merchants who lack credit.
The division of responsibilities after quality problems are not clear, resulting in a large number of fake and inferior products pouring into the e-commerce platform. As for
the consumers themselves, when shopping, they can only learn about the products through short picture introductions and reviews, and after the merchants grasp the
consumers' greed for cheap psychology, they will give certain discounts, and consumers usually do not go deep into the products. quality
line to buy. In the end, counterfeit and shoddy goods are flooded on the electronic mall platform.
Compared with China, most foreign consumers shop online from the Amazon platform, but due to limitations in mobile payment technology and logistics speed,
most foreign consumers shop in physical stores, where the products can be experienced in person. And because the foreign credit system is relatively perfect, consumers
will enter their personal credit history and perform credit ratings after shopping. However, the quality assurance of commodities has a greater impact on its credit.
3
Machine Translated by Google
The security of personal information on the Internet is mainly affected by three aspects, which are leaks by internal personnel in the system and exposure to external networks.
In terms of leakage of internal personnel in the system, my country lacks legal protection for personal information security protection, and legal regulations lag behind.
This has led to many people who lack quality taking advantage of their positions to obtain a large amount of private information for sale, which has led to criminals taking advantage
of it. , information fraud and other phenomena. In foreign countries, because the relevant laws are more complete, the "Privacy Act" of the United States, the "Data Protection Act"
of the United Kingdom, and the "Personal Information Protection Act" of Japan
The punishment for personal information is also relatively severe, so foreign countries are relatively good at internal personnel leakage.
In terms of external network attacks, in order to deal with network attacks, relatively safe technical frameworks and development languages are usually used in system
development. As far as the most popular development languages and technical frameworks are concerned, they are all based on foreign research and development.
basis. For example, JAVA is released by the foreign Sun company, and the Spring Boot framework is based on the Spring 4.0 design.
meter, developed by the Pivotal team. However, there are relatively few development languages and technical frameworks independently developed in my country, and there
is a big difference between them and foreign countries in terms of security. On the other hand, my country has a large number of hackers and a wide variety of e-commerce
platforms, and malicious attacks on the system are more frequent than those in foreign countries. This makes my country's protection pressure on user information security much
greater than that of foreign countries. In terms of consumer safety awareness, both at home and abroad believe that good online habits are an important guarantee for their own
safety information. For example, do not visit dangerous websites, set account passwords with higher security levels, and carefully fill in online registration information,
etc. But in foreign countries, due to the early development of e-commerce and computer technology, consumers attach great importance to their personal Internet habits. In China,
e-commerce started relatively late, and computer technology is backward. Consumers lack awareness of network security, and do not pay much attention to their online habits.
Frequent visits to illegal websites lead to information leakage. With the continuous development of e-commerce, the e-mall platform pays more and more attention to the shopping
experience of consumers. Therefore, improving the performance of the recommendation algorithm and strengthening the product quality inspection of the electronic mall platform
will attract more consumers to shop online and promote the development of e-commerce.
This paper mainly studies the design and implementation of an electronic mall based on Spring Boot and Vue. specific study
(1) Investigate and study the current common problems in electronic shopping malls. Through the current domestic and foreign
Analyze the current situation, development background and its significance to understand consumers' experience and functional requirements for e-commerce malls.
(2) According to the needs of consumers, the technical framework, development language and development
(3) Based on consumers' needs for the electronic mall, analyze the architecture design and functional requirements of the electronic mall
analysis research.
(4) Analyze and study the specific functional module division and database design of the electronic mall system.
4
Machine Translated by Google
(5) Analyze the traditional collaborative filtering algorithm and k-means clustering algorithm based on user product recommendation requirements
research and improve upon it. (6) Analyze and study the
(7) Conduct test analysis and research on the functions of the electronic mall system.
This article is mainly divided into six chapters to analyze the design and implementation of the electronic mall based on Spring Boot and Vue. That
Chapter One Introduction. Through the investigation and research on the background of the current electronic mall, point out its research significance. and for electrical
The current domestic and foreign status of the sub-mall and some existing problems, and propose solutions. The research content of this thesis
Chapter Two: Introduction of related technologies. Mainly introduces the relevant technical framework involved in the process of developing the electronic mall system
Frameworks, R&D languages, databases, etc. These include: JAVA language, Spring Boot framework, Vue.Js framework, Mybatis
Framework, Mysql database, JSON data format, Redis database, and IntelliJ IDEA development tools. constitute
The technical basis for the realization of the electronic mall system.
Chapter Three: Demand Analysis and Outline Design. Put forward new requirements through the existing problems of the current electronic mall, to
The e-mall conducts a more comprehensive demand analysis. The specific method is to split the demand for the e-mall.
Analyze the functional requirements and non-functional requirements of the electronic mall. Clarify the functional requirements and non-functional requirements indicators of the electronic mall.
The second is the general design of the e-mall system, including the architecture design, module division and logarithm of the e-mall system
Database design.
Chapter Four: Detailed Design and Implementation. Mainly the system development environment and technical architecture, database table design,
Chapter Five: System Testing. It is mainly the introduction of the test environment and the test of the system's functional and non-functional requirements.
Determine whether the electronic mall system is practical and feasible through the test results.
Chapter Six: Summary and Outlook. This part mainly analyzes and summarizes the full text, and finds the deficiencies in it.
5
Machine Translated by Google
6
Machine Translated by Google
During the development of this system, various technologies, languages and development tools are involved. The following is mainly about the system development framework
Framework, system development language and system development tools are briefly introduced.
The Spring Boot framework is designed based on Spring 4.0 and is an open source lightweight framework. The framework not only retains the advantages of the
Spring framework, but also removes the XML configuration files of the Spring framework, which further simplifies the construction and development of the project in terms
of configuration. Make system developers pay more attention to business logic implementation rather than system configuration. In addition, there are two very important
strategies in the Spring Boot framework: out-of-the-box and convention over configuration [6].
The out-of-the-box strategy refers to the management of the entire object by adding the relevant dependency packages to the pom file of the MAVEN project or the
gradle file of the Gradle project during the project development process, and then using annotations instead of XML file configuration life cycle [6]. It frees developers from
complicated XML configurations and dependency conflicts, and focuses more on business
business logic.
Convention is better than configuration strategy, which is a software design paradigm in which the Spring Boot framework itself configures the target structure and
developers add information to the structure [6]. This strategy reduces the number of decisions developers need to make and
A large number of XML configurations, and the code can be automatically compiled, tested and packaged, but it also reduces some flexibility
nature, increasing the complexity of BUG location. In summary, the Spring Boot framework has the following characteristics:
(1) You can create an independent application, and use Maven or Gradle plug-ins to package the application into
(2) Built-in Tomcat container, developers do not need to configure Tomcat when developing projects.
(3) Introduce the required dependent packages through various "starters" to simplify the dependent configuration.
(4) Automatically manage the Spring container to the greatest extent and reduce manual management. (5)
Remove the complicated XML configuration files and replace them with annotations.
In the process of system development using the Spring Boot framework, the front end usually uses a template engine, the most
The Vue.js framework is a progressive framework that only focuses on the view layer, focuses on the user interface, and incrementally develops from the bottom up
frame [7]. Unlike other heavyweight frameworks, Vue.Js is very easy to integrate with other projects or front-end libraries. Its development goal is to implement responsive
data binding and composed view components with the simplest API possible [7]. Compared with other front-end frameworks, Vue.js has the following advantages: (1) Ease
of use
Vue's related syntax is similar to HTML, using CSS for page layout, and for page event response using
7
Machine Translated by Google
JavaScript is written, so developers who are familiar with traditional front-end technical languages can use Vue to start building applications just by viewing relevant
technical documents.
(2) Flexibility
Vue's core library only cares about the view layer. Compared with other heavyweight frameworks, its simple and compact core, progressive
The technology stack is sufficient to develop complex single-page components for applications of any scale [7].
(3) Performance
vue.js itself only has a running size of 20kb min+gzip, and its ultra-fast virtual DOM makes vue.js faster when processing data [7].
When the background interacts with the database, an intermediate plug-in is usually used to simplify the writing of Sql statements and its connection
configuration. MyBatis is one of them. Its customized SQL statements, stored procedures and efficient object-relational mapping
Projection, which greatly simplifies the interaction between Mybatis and the database during the development process. Using simple XML or
Annotations are used to configure and map object information, replacing the previous interactive way of obtaining result sets through JDBC code and manually
Like C++, Java is an object-oriented programming language. In May 1995, the Java object-oriented programming language and Java platform launched
by Sun Company were unanimously recognized by the industry [9]. Java absorption
Many advantages of the C++ language. For example, errors often occur when pointers in C++ language manipulate memory, so in Java
The language removes its pointer operations into object references. In terms of memory management, the C++ language requires developers to manually manage
For some operations, if the developer forgets to release the memory, it will cause memory overload. And in the Java language,
The JVM has a JC mechanism that does not require developers to manually manage memory. The GC mechanism itself has a garbage collection algorithm.
It is more prominent than the C++ language in solving memory leaks and OOM problems. Therefore, the java language is more powerful, and it also has the
following advantages:
(1) Simplicity
On the one hand, since the syntax of the JAVA language is similar to C language and C++, anyone who only needs C language or C++ foundation
Both are easy to learn and use. On the other hand, JAVA discards its dross, abandons some confusing features in C++, such as pointers, multiple inheritance,
etc., and uses references to replace pointer operations [9]. In addition, the JVM that comes with JAVA has efficient garbage
Recycling mechanism, get rid of the trouble caused by insufficient memory resources due to wrong operation.
(2) Object-oriented
Like C++ language, JAVA language provides external classes, interfaces and inheritance [9]. At the same time for its simplicity, JAVA
Only single inheritance is supported between classes, and multiple inheritance is supported between interfaces [9]. And through the implementation of the interface and dynamic binding,
8
Machine Translated by Google
(3) Robustness
Since JAVA discards pointers, the problem of memory errors caused by pointer operations is reduced. Strongly typed machine
control and exception handling, effectively improving the robustness of the program [10]. In addition, the JVM 's built-in garbage collection mechanism
effectively reduces the memory resources consumed by the program, and its security check mechanism for the program is the robustness guarantee of the
(4) Portability
The JAVA language benefits from the neutrality of its architecture, and the JAVA programs written by it are portable. JAVA program
After being compiled into a class file in bytecode format, it can be run on any system that builds on the JAVA platform.
(5) A multithreaded
thread is an object in the JAVA language. JAVA supports the simultaneous execution of multiple threads and provides a
synchronization mechanism between multiple threads [9]. But because it must be created by the Thread class or its subclasses, there
are two ways to create threads in JAVA. First, use the subclass of Thread(Runnable) to wrap the object that implements the Runnable
interface into a thread. Second, derive a subclass from the Thread class and rewrite the run method. The object created by using this
JSON is a lightweight data interchange format. Data is stored and represented in a text format that is completely independent of the programming
language [12]. While it is convenient for people to read and write, its unique writing format also effectively promotes the machine
analysis and generation. The transmission efficiency is effectively improved and the transmission cost is saved.
MySQL database is a relational database management system, and its data storage tables are different according to different data types. Doing
so can greatly improve the speed and efficiency of database operation. At the same time, the processing of data
It also appears to be more flexible and convenient. Compared with SQL server and Oracle, although it is lacking in functions, its
With most of the functions of the data management system, while fully maintaining the stability of the system, MySQL is also continuously improving in
MySQL has the feature of portability, no matter in Linux, Windows or Mac Os and other system platforms, it can run stably, and it provides various
database connection methods such as ODBC and JDBC [13]. At the same time, MySQL also supports multi-threading and has an optimized SQL query
optimization algorithm.
Generally speaking, MySQL is widely used due to its small size, fast speed, low cost, open source code, and ease of use.
The Redis database is a key-value storage system. Its data types include String, List, Set, etc.
9
Machine Translated by Google
At the same time, Redis also supports operations such as intersection, union, and difference for data types [14]. In addition, in order to ensure the operating efficiency of
Redis , data access is performed in memory. In addition, the master-slave synchronization mechanism of the Redis database effectively ensures data security. On the one
hand, data can be synchronized from the master server to any slave server, and the slave server can also be the master server of other slave servers. On the other hand,
due to the publish/subscribe mechanism of the Redis database, when the slave database synchronizes data anywhere, it only needs to subscribe to a channel and receive
IntelliJ IDEA is an integrated environment for java programming language development [15]. Because of its powerful code hint assistant and the integration of
various version tools, code analysis, J2EE, etc., it is considered the best JAVA development tool [15].
This chapter mainly introduces the technical framework, development language and development tools used in the development of the electronic mall system. root
According to the actual needs of the electronic mall system, the background of the system is developed using the Spring Boot framework and the JAVA language.
The front end is developed using the Vue.Js framework, and the persistence framework Mybatis is used to interact with the database. database
A flexible and efficient Mysql database is used. Redis is used for caching.
10
Machine Translated by Google
The main work of this chapter is to make detailed requirements for the functions and performance of the electronic mall system based on the actual needs of users.
Analysis and outline design. In the demand analysis part, the functions and performance of the electronic mall system are mainly analyzed according to the needs of users.
and data analysis in detail. In the outline design part, it mainly focuses on the overall architecture design and modules of the electronic mall system.
In the development process of the electronic mall system, it is extremely important to analyze the function, performance and data of the system. because
Because it mainly faces users, it is necessary to understand business needs and user needs, and understand how the system works in the entire environment.
With the development of e-commerce and computer technology, consumers pay more attention to user experience when shopping online.
The requirements for the quality of purchased products, the security of personal information, and the accuracy of product recommendations are increasing day by day. so at the moment
In this era, consumers have the following needs for the e-commerce platform:
(1) Consumers can log in and register in the electronic mall system anytime and anywhere, and consumers do not need any
Without any training, you will be able to proficiently place shopping orders in the e-mall system.
(2) The interface of the electronic mall system needs to be beautiful, and the product recommendation function should be accurate, so that consumers can have a good
(3) The product search function of the electronic mall system needs to be powerful, and it can quickly locate the product category that consumers search for, and the
introduction of the product in the system and the evaluation of the product by consumers need to be eye-catching, so that consumers can quickly understand
(4) The personal information, payment information and product quality and safety of the electronic mall system need to be guaranteed. Through the
above analysis, the electronic mall system not only needs to meet the multiple needs of consumers, but also has diversified functions and
To ensure the security of consumer information, but also to ensure a certain system performance. Therefore, according to the challenges faced by the e-mall system
The user roles are different, and different functional requirements are formulated to clarify the specific functions of the electronic mall system.
The goal of this thesis is to design and implement an electronic mall system. Its main function is to provide an online transaction platform for consumers, merchants and
suppliers. In this platform, consumer users can use mobile phones or browsers anytime, anywhere
Quickly access the system, view product information and make purchases. Merchants and suppliers can log on to the platform to sell goods and ensure the supply of goods in the
electronic mall system. Therefore, the user roles of the electronic mall system are divided into member users, suppliers, merchants, system administrators and tourists. The specific
11
Machine Translated by Google
4 The supply of goods in the supplier's electronic mall and the delivery of ordered goods
According to the analysis in the above table, the specific functional requirements of each role are introduced in detail below:
(1) tourists
A guest user is a general user who has not registered as a member. The system use case diagram of this type of role is shown in Figure 3-1. Since this
type of role has not been registered with the e-mall system, it can only view e-mall information and product information.
When viewing product information, tourist users can view product details by clicking on the product. Tourist users can purchase products, add shopping carts
and other operations only after registering as a member user of the e-mall system.
12
Machine Translated by Google
member user is a registered visitor user, and the system use case diagram of this type of role is shown in Figure 3-2. become
After becoming a member user, you can purchase products. In addition, member users also have the following permissions:
1 Member users can use their mobile phone number and password to log in to the electronic mall system. When a member user logs in to the system, if
he forgets the login password, he can use the forgotten password function to retrieve the login password. First, member users need to perform identity verification,
2 Member users enter the personal center to manage basic personal information, such as modifying user images, gender
Don't wait, you can also view your personal registration information.
3 Member users can add favorite products to the shopping cart when browsing products. In the shopping cart, they can modify the quantity of products
and delete unnecessary products. Member users can make product settlement after selecting the purchased products. After submitting the order, fill in the order
4 After the member user purchases the product and generates the order, he can view and maintain it in the order management center. For the unpaid
order, he can click the order to complete the payment within the payment time range. For the shipped order, check the order details To understand the logistics
5 After the member user completes the order, he can comment on the order product. When commenting, other users can
13
Machine Translated by Google
(3) Administrator
The administrator is the administrator of the e-mall system and has the highest system authority. System use cases for this type of role
The diagram is shown in Figure 3-3. The specific permissions of the administrator are as follows:
1 The administrator can manage the mall. For the page layout, topic division and carousel map content of the mall,
2 The administrator can manage the commodities, and the administrator can view all commodity information in the electronic mall system, and
The classification of the product and the basic information of the product can be modified and deleted. You can also add new items at the same time.
3 The administrator can manage the order, and the administrator can view all the order information and order details of the electronic mall
4 The administrator can manage the logistics, and the administrator can view all the courier companies that cooperate with this electronic mall
information, and manage it, you can also view the logistics information of the shipped order, and check the delivery party of the logistics distribution
Manage in different ways, such as using ordinary express delivery or air transportation.
5 The administrator can manage the users, the administrator can view the user information of all registered users, and can also
Modify and delete operations, but administrators are generally not allowed to delete and modify them, and administrators can also add new ones.
6 The administrator can manage the system, the administrator can initialize the basic data of the electronic mall system, and
System configuration, user rights, business settings and other related parameters are set.
7 The administrator can publish the system bulletins of the electronic mall, and modify and delete the published system bulletins.
14
Machine Translated by Google
8 The administrator can manage the promotional activities. The administrator can publish a series of promotional activities to stimulate the consumption
of member users, and can also modify and delete the published promotional activities. 9 The administrator can manage the suppliers, and the administrator
can delete, query and modify the suppliers that cooperate with the electronic mall system.
supplier is the supplier of the goods in this electronic mall, and the system use case diagram of this kind of role is shown in Figure 3-4. First, the
electronic mall system checks the supplier's qualifications, commodity safety and quality inspection certificate, safety certification mark and other information,
After meeting the inspection standards, the supplier needs to pay a deposit to ensure that the products provided by the supplier meet the safety standards. The
1 The supplier can deliver the logistics order. For some orders with insufficient supply, the supplier can purchase from the local supplier
warehouse. 2 Suppliers provide commodities for the e-mall platform and can manage local warehouses. 3Suppliers
must apply before entering the mall, and they can become system suppliers only after the system review is passed.
15
Machine Translated by Google
Through the above analysis of each role of the electronic mall and its main characteristics and permissions, the roles of each role are clarified.
Main functional requirements. And according to the relationship between user roles and the functional requirements of the system, the electronic mall system is defined
According to the specific needs of users, after the development of the electronic mall system is completed, its stability and reliability will directly affect the consumption
consumer shopping experience. Combined with the actual situation of the electronic mall system and consumers, when developing the electronic mall system
Developers should simulate the normal operation of the system according to the specific needs of users and technical defects, and predict the system in advance.
problems that may arise and take countermeasures. When an emergency failure occurs, the system should have an emergency plan to ensure system safety
The e-mall shall check the legality of the user's identity and login information when logging in. in user
When shopping, the user's payment information and personal information are encrypted. Misuse of administrators, evil
The operator has corresponding warning information and authority control, so that the system can run safely and smoothly.
The aesthetics of the electronic mall system interface has a certain impact on the consumer shopping experience. and on user action
This electronic mall system can still run smoothly 24 hours when faced with multiple users and a large number of concurrent orders.
16
Machine Translated by Google
In the stage of data requirements analysis, according to the specific needs of users, analyze the relevant data generated by it in detail, and
Through the data flow diagram, the flow of system data is shown to the user.
This paper analyzes the data of the e-mall system in a top-down manner [15], and combines the e-mall system with the user
The data flow between them is abstracted. The top-level data flow diagram of the specific data flow direction and user relationship is shown in Figure 3-5.
As can be seen from Figure 3-5, there are four types of users in the e-mall system, namely tourists, member users, suppliers and
System administrator. The data flow between the user and the e-mall system is as follows:
(1) Tourists can inquire about commodity information and browse commodities through the electronic mall system.
(2) In addition to obtaining product information from the e-mall system, member users also upload their own registration information and purchase information.
The order information of the purchased goods is stored in the e-mall system platform, and the basic information of itself can be modified.
(3) Suppliers can obtain order information from the e-mall system platform, and carry out some orders with insufficient supply
Shipping from supplier warehouse. The e-mall system can obtain the warehouse source information and the supplier's application letter from the supplier.
interest.
(4) Administrator users can obtain registered member information, order information of member users from the e-mall system platform.
interest. And it can be modified. In addition, administrators can also add products,
Announcement, etc.
In the development process of the e-mall system, the outline design stage is between the e-mall requirement analysis stage and the detailed design stage, a
logic model is established based on the e-mall requirement analysis, and the system use case diagram obtained in the requirement analysis stage is transferred to
17
Machine Translated by Google
Change to a specific data structure [16]. This stage is mainly to study the overall design and functional module design of the electronic mall.
In the demand analysis stage, through a detailed analysis of the characteristics of the users of the electronic mall and their functional requirements, the electronic
The mall system is suitable for B/S architecture [17]. It has the following advantages:
(1) In terms of system hardware, due to the wide range of users of the e-mall system, consumers only need to have a browser to access
Ask the electronic mall, so you don't need higher system hardware as long as you can deploy the system.
(2) For the stability and reliability of the system, the interaction mode of the B/S architecture is relatively safe, and the system overhead is relatively
(3) In terms of beautiful interface, when the e-mall system is built on a browser, the interface is more tense.
The overall architecture diagram of the e-mall system is shown in Figure 3-6. Among them, the background of the electronic mall is mainly composed of controllers, servers
Service (Service), database interaction layer, the electronic mall front is mainly composed of user layer and presentation layer. user
By clicking the button on the system interface, after sending the request to the controller, call different
Service for business processing. In the data storage layer, the Mybatis persistence framework is used to communicate with the MySql database
mutual.
18
Machine Translated by Google
As can be seen from Figure 3-6 , the overall architecture of the e-mall system is divided into two parts: the front desk and the background. The front desk includes the user layer
and the presentation layer, which are mainly represented by the system interface. The background includes the controller layer, business logic layer and data layer,
Mainly, data logic is processed. The specific functions of each layer are as follows: (1) User layer: the user
role that this e-mall faces, (2) Presentation layer: the view layer, which is mainly composed of the
system interface, and displays system information and system information to users.
(3) Controller layer: It is composed of many controllers, and different controllers are called according to the requested interface address to realize different business functions. (4)
Business logic layer: It mainly encapsulates the logic of specific business implementation, which is expressed as different services. (5) Data layer: This layer represents the data generated
by the business logic, and interacts with the database through the MyBatis framework.
Through the detailed analysis of the user requirements of the electronic mall system and its overall architecture, the functions of the electronic mall system
It is generally divided into two parts: the front desk and the background. The front desk mainly includes the personal center module, product browsing module,
Shopping cart management module and product classification module, etc. The background part mainly includes product management module, mall management module,
Order management module, logistics management module and user management, etc. The specific function module design of the foreground and background of the e-mall
Figure 3-7 shows the main functional module structure diagram of the e-mall front desk.
As can be seen from Figure 3-7, the front desk of the e-mall mainly includes the following functional modules:
19
Machine Translated by Google
this module, member users can modify their personal information through the personal information management function, such as avatar
picture, delivery address, etc. In addition, E-mall member users can check the order status of the purchased goods and check the logistics information
in the My Order module in the personal center. When users browse products on the homepage, they can add favorite products to favorites. Users can
check the information of favorite products in the My Favorites mode in the personal center. The system information pushed by the system to e-
commerce member users can be viewed in message management. . 2Home product browsing module Users can browse product information in this
module. It includes functions such as product search and product information viewing.
as follows: 1) Commodity search function: Commodity search function, whether it is a member user of the electronic mall or a tourist, can conduct business
Product search function, the user enters the name of the product to be searched and clicks Search to get the search result.
2) The basic information display function of commodities: this function can be used by both E-mall members and tourists, on the homepage of the mall
interface, the e-mall will display commodity information in different regions according to different regions.
3) Product detail information display: Both E-Mall members and tourists can view product details. user
Just click on the product picture to enter the product details page. On the product details page, users can see more product pictures and product introductions.
In addition, there are product graphic introductions, product specifications, and information about the product. Reviews, product inventory, product collection and
other information. 3 Shopping Cart Management Module Member users can maintain the products in the shopping cart through the shopping cart management
module after purchasing products. This module mainly has functions such as shopping cart generation and order generation. The details are as follows:
1) Shopping cart generation function: whether it is a member user of the e-commerce mall or a tourist, when choosing to add products to the shopping
cart
2) Order generation function: Only e-mall members can generate orders. Tourist users need to register as e-mall members to perform subsequent
operations when generating orders in the shopping cart. After confirming that the items in the shopping cart are correct, the member user of the electronic mall
generates an order, fills in the order details on the order page, submits it to the background, and waits for the background
deal with.
4. Category Management
Module The main function of this module is to display all product categories for users, and realize quick search of products by clicking on
product categories.
structure diagram of the main functional modules of the E-mall backstage is shown in Figure 3-8.
20
Machine Translated by Google
Figure 3-8 Structural diagram of the background function module of the e-mall system
As can be seen from Figure 3-8, the background functional modules of the e-mall mainly include product management, user management, order management, etc.
details as follows:
This module is mainly for product category, product evaluation, product information, brand, product classification navigation and product specification
1) Commodity category function: mainly to manage commodity classification, such as fruits, drinks, etc.
Classification, you can add and delete product categories, or modify existing product categories.
2) Commodity evaluation function: for the management of product evaluations by members and users of the e-commerce mall, it is mainly to check that the products have been
Some comments and a series of operations such as replies to comments made by members of the e-commerce mall.
3) Commodity information module function: This function is mainly for the basic information, price, inventory and commodity status of the commodity
4) Brand management function: mainly to conduct unified management of the brands settled in this e-mall, such as adding new products
brand, delete existing brands, and remove existing brands from shelves.
5) Commodity classification navigation function: mainly for quick classification and search of commodities.
The system can quickly locate the range of products according to the classification of products, and users can shop purposefully to avoid
A large number of products make the user's purchase purpose unclear and purchase unnecessary products. This function can be used for commodity categories
effective management. For example, you can create new product categories, modify existing product categories, and so on.
twenty one
Machine Translated by Google
6) Commodity specification management: The main function is to manage the specification parameters of commodities, such as modifying commodity types and
specification attributes. 2Mall management module This module is mainly to manage the mall announcements, popular products in the mall, carousel pictures on the homepage
1) E-mall announcement function: It is mainly aimed at the buyers and sellers of the e-mall, and publishes a series of announcements on the promotional activities and
management systems of the e-mall, so that users of the e-mall can keep abreast of a series of notices about the mall. Only the e-mall system administrator can publish, delete,
2) The function of popular products in the mall: the system administrator of the electronic mall can set the product as a popular product according to the background
statistics of the best-selling products, and remind users that these types of products are the most popular. Administrators can create new popular products, and can also remove,
3) Management function of carousel image on the home page of the mall: mainly to manage the content of the carousel image on the home page of the e-mall, manage
Members can add new carousel content, and can also delete, modify, and remove existing carousels.
4) Mall mobile APP management: mainly to manage the home page layout of the mobile mall. Administrators can edit the page layout to implement mobile interface with
different theme styles. 3 Order management module This module is mainly to manage the commodity orders, commodity returns and refunds, and commodity reviews generated
reason.
1) Commodity order function: The commodity orders in this e-mall mainly include two categories, one is points commodity orders, and the other is ordinary commodity
orders. The system administrator can view the basic order information, order status, order details, etc. in the commodity order. 2) Order processing function: It mainly performs
operations such as printing orders, exporting order data, and viewing order details for orders generated by the electronic mall. 3) Product return and refund function: the system
administrator can view the details of the order return and refund. Based on this, the system administrator can judge whether the return and refund conditions are met for
review. After the review is successful, the system will refund. In addition, the system management The staff can also print and export the return and refund order data. 4)
Commodity review management: mainly a series of reviews made by members of the mall on products. Administrators can view user reviews in this module and perform
operations such as rating, reviewing, pinning, deleting and replying to the reviews. In addition The administrator can also set a unified reply template, which can be used when
The main functions of this module include orders to be shipped, logistics tracking, logistics company configuration, delivery method configuration, free shipping
1) The function of orders to be shipped: mainly to show the system administrator all the undelivered orders in the orders generated by this e-mall. The system administrator
can deliver the undelivered orders one by one or batch delivery, or For unshipped
twenty two
Machine Translated by Google
The order is processed for cancellation of delivery. In addition, administrators can also view unshipped order details, print documents, etc. 2) Logistics tracking
function: mainly to display the real-time logistics information of the shipped orders to the system administrator. 3) Logistics company configuration function: It
is mainly configured for logistics companies, showing all logistics companies currently cooperating with this e-mall and logistics company query interfaces to the
system administrator. In addition, the system administrator can also edit the logistics company. For example, if a new logistics company cooperates or terminates cooperation
with some existing logistics companies, the system administrator can add, modify or delete the logistics company interface in this module.
4) Delivery method configuration function: mainly to configure the transportation method when the product is delivered. For example, a system administrator can add
Add new delivery methods such as air and sea, or delete existing delivery methods, depending on business needs.
5) Free shipping setting configuration function: mainly to set the area setting and type setting of free shipping currently provided by this e-mall
and shipping method settings. The system administrator can set different free shipping rules according to different regions.
6) Freight template setting function: Similar to the free shipping setting function, the system administrator can set different freight calculation rules for different
delivery areas in this module, for example, the freight calculation of ordinary express in Guangdong Province is 10 yuan for the first piece, and 1 yuan for each subsequent
piece rules etc. 5Marketing management module This module mainly includes the functions of snapping up for a limited time, full discount and full discount. 1) Time-limited
buying function: mainly a series of time-limited buying promotional activities launched by the electronic mall. The system administrator can set a series of panic
buying activities within a specific time range in this module. For example, from 2:00 to 3:00, all products are sold at half price, etc. In addition, the system
administrator can also manage the time-limited activities that have expired and the time-limited activities that are in progress. For example, if the price of a certain
activity is unreasonable, the system administrator can modify the price in this module. 2) Full discount and full discount function: mainly for store promotions. When an e-
commerce mall member user purchases a full amount of goods in a store and meets the full discount and full discount requirements, the store can discount the order. This
function shows the system administrator all the full and full discount activities of the e-mall system. System administrators can view details or delete the event, but cannot
modify the event itself. 6 Data Management Module This module mainly includes report management and log management. Among them, report management includes
Volume statistics, sales overview, sales ranking, purchase volume ranking, product access purchase rate, and sales analysis. Log management includes SMS sending
1) Browsing management function: it mainly displays information such as the time, location, personal user name and IP address of the e-commerce mall member
users when browsing products and stores to the administrator. 2) Advertisement click volume statistics function: mainly to show administrators the number of clicks on
And the user information, time, location, etc. of the e-store member who clicked on the advertisement.
3) Sales overview function: mainly to show the sales volume and sales amount of the electronic mall system to the system administrator,
The administrator can filter and view the sales volume and sales of a specific time period according to the conditions.
4) Purchase volume ranking function: mainly to show the system administrator the e-mall member user's ranking in this e-mall
twenty three
Machine Translated by Google
The administrator can clearly understand which users are high-quality customers of this electronic mall.
5) Product visit purchase rate function: mainly to show the system administrator the visit purchase status of the products in this electronic mall,
The administrator can obtain the popular products of this electronic mall through the number of visits, visit purchase rate and sales volume of the products.
It can effectively increase the sales volume of the electronic mall and stimulate the
purchase rate of users. 6) Sales analysis function: mainly to show the system administrator information such as the number of member orders, customer
order conversion rate, and customer order average amount of the e-commerce mall. 7) Short message sending history record function: mainly to show the
system administrator the content of short messages sent by the e-mall system to users, user information, short message sending status and other
information. 8) System log function: it mainly records the user information and operations displayed to the administrator to operate the electronic mall.
Record.
9) User login history function: mainly to show administrators the records of users who have logged into this e-mall. 7 User
management module This module is mainly to manage the user status and information of the electronic mall. It is mainly divided
1) Member user management function: the system administrator can modify the personal information, user permissions, and user login passwords of
member users. At the same time, the e-mall system has user levels, and administrators can set user level requirements in this module.
2) Administrator management function: mainly to modify the personal information, role authority and login password of the system administrator.
3) Merchant management function: mainly for store and merchant level management, administrators can check the basic information of existing stores
Information, operating status, store type, etc. are managed. In addition, the administrator can also set the requirements for the merchant level. 8 System
Management Module This module is mainly for managing system parameters, system business settings and system permissions. the functions it
contains
Specifically as follows:
1) System configuration management function: mainly to manage the system parameter values, sensitive words, and system pictures of the e-mall. For
example, the maximum uploaded file size of this system is 512Mb, and the number of records displayed on each page is 20. 2) Business setting management
function: mainly the global configuration of the e-mall system, order setting, payment management,
SMS configuration and other settings. For example, changes in the name, domain name, email address, automatic order confirmation time limit, comment
level in the e-mall system, payment method and other information of the e-mall.
3) Rights management function: This function is mainly to manage the rights and roles of users in the e-mall system. System administrators can add,
delete, modify, and query the permissions of existing roles. At the same time, the system administrator can add or delete the menu navigation of this electronic
mall. For example, the system administrator can add a partner management function module, or delete the data management function module. 4) File
management function: mainly for editing the user agreement, store opening agreement, user instructions and other documents generated by the electronic mall
system. For example, for some agreements, due to changes in business requirements, it is necessary to modify the relevant contents of the agreement.
twenty four
Machine Translated by Google
The system administrator only needs to find the corresponding protocol through the file management function to modify and submit.
Through the above detailed analysis of the foreground and background function modules of the electronic mall system, we have a full understanding of the
business logic of each module function, which is helpful for the realization of the module function.
The corresponding database schema [18]. In database design, it is mainly based on user entities and entities involved in the business
Feature extraction, logical structure design and specific physical storage structure design.
According to the user entities in the requirements analysis stage and the entities involved in the business logic of the functional modules, determine the
relationship between entities and their characteristics. There are three types of entity relationships: one-to-one, one-to-many, and many-to-many [19].
As for the feature extraction of entities, since there are many entities involved in the electronic mall system, only important entities and their feature attributes are extracted.
(1) Administrator: administrator number, name, password, department number, mobile phone number, ID number, status.
(2) Mall members: user number, user name, user password, user WeChat number, user status.
(3) Commodity: Commodity number, Merchant No., Commodity name, Commodity original price, Commodity current price, Commodity purchase price, Merchant
Product description, product picture, product status, product inventory, product type, product specification, supplier number.
(4) Order: order number, product number, order user number, order time, order serial number, order type
Type, total price, payment method, payment number, payment serial number, delivery type, delivery method number, logistics order number,
Order Status.
(5) Logistics company: logistics company number, logistics company name, logistics company official website, logistics query interface.
(6) Package: package number, supplier number, consignee number, province code, city code, district code, order
Number, logistics company number, delivery method number, delivery order number, package type, and quantity of goods.
(7) Business: business number, contact number, contact phone number, ID number, ID card front picture,
The picture on the back of the ID card, store name, store address, store status, and store type.
Other entities also include topics, announcements, comment information, shopping carts, invoice information, etc.
The main task of the database logical structure design is to convert the entity model proposed in the conceptual design stage into a
The model conforms to the logical structure [20]. The primary keys of the relational schema are marked with an underscore. details as follows:
(1) Administrator user: user number, administrator name, password, department number, mobile phone number, ID number,
state.
(2) Mall members: user number, user name, user password, user WeChat number, user status.
(3) Commodity: Commodity number, Merchant No., Commodity name, Commodity original price, Commodity current price, Commodity purchase price, Merchant
Product description, product picture, product status, product inventory, product type, product specification, supplier number, product volume
25
Machine Translated by Google
point.
(4) Order: order number, product number, order user number, order time, order serial number, order type
Type, total price, payment method, payment number, payment serial number, delivery type, delivery method number, logistics order number, order status. (5) Logistics
company: logistics company number, logistics company name, logistics company official website, logistics query interface. (6) Package: package number, supplier
number, consignee number, province code, city code, district code, order
Number, logistics company number, delivery method number, delivery order number, package type, and quantity of goods.
(7) Business: business number, contact number, contact phone number, ID number, ID card front picture,
The picture on the back of the ID card, store name, store address, store status, and store type.
(8) Shopping cart: shopping cart number, merchant number, product number, user number, product quantity in shopping cart, purchase
Item time, selected state, whether it is invalid, shelf number, shelf name.
This chapter firstly analyzes the user characteristics and functional modules of the electronic mall in detail. According to user roles,
Analyze the system requirements of various users in detail, and clarify the specific functional requirements and performance of the electronic mall system
aspect requirements.
Secondly, analyze the data flow direction of the electronic mall system, and use the system data flow diagram to analyze the data used in the electronic mall.
Next, through the system functions summarized by the requirements analysis, the overall structure and module division of the electronic mall system are carried out.
Analyze the system as a whole and divide it into foreground and background. Clarified the system structure level, and described the specific front and back of the system
body function.
Finally, according to the entity model of the electronic mall system and the relationship between entities, some entities are detailed
Database conceptual design and logical design. And abstracted the corresponding relationship model, laying the foundation for the table design.
26
Machine Translated by Google
This chapter mainly introduces the detailed design and implementation of the system, which mainly includes the system development and operation environment,
System implementation architecture, database physical structure design and detailed design and implementation of several important modules. where the data
The physical structure design of the library mainly introduces the detailed design of the database table.
In order to ensure the stable development of the e-mall system, the e-mall system adopts a relatively stable environment configuration, with
database mysql
browser Chrome
The electronic mall system is mainly based on the Spring Boot and Vue framework, and uses the JAVA language for research and development.
In the process of project construction, the background implementation architecture of the entire e-mall system is mainly divided into four layers:
filter interceptor layer, Controller layer, Service layer, and Dao layer encapsulated by mapper . Its implementation architecture diagram is
27
Machine Translated by Google
Member users can access a specific page through a browser. After the front end sends an http request, they must first enter
Filter layer, the filter layer is responsible for decoding the requests sent by the front end, filtering requests that do not meet the specifications, and
protecting the system from malicious request attacks. Send the request that conforms to the specification to the controller layer, and the controller layer
The service layer encapsulates the specific business logic code, and the controller layer calls different
service.
The Dao layer encapsulates the operation of the database, and the Service layer needs to operate the database according to business requirements. At
this time, some queries and modifications to the database can be realized by calling the Dao layer.
In the stage of database table design, it is necessary to select the optimal physical storage structure and access method according to the entities extracted by
the electronic mall system [20]. Due to the large number of entities in the e-mall system, the following is mainly about the detailed design of important entity database tables
(1) Administrator user table, the table name is ls_admin_user. The user id is the primary key of the table, and the specific structure is as follows
No. Attribute Name Chinese Description Data Type Length Null/Non-null Constraints
9 varchar 18 null
(2) Member user information table, the name of the table is ls_user, where the primary key is the user id, and the specific table structure is shown in Table 4-3
shown.
28
Machine Translated by Google
No. Attribute Name Chinese Description Data Type Length Null/Non-null Constraints
apply, 2 agree, 3
reject)
(3) Commodity information table, the table name is ls_prod, where the primary key is the product number, and the specific table structure is shown in Table 4-4. Table
No. Attribute Name Chinese Description Data Type Length Null/Non-null Constraints
6 price The original price of the product decimal (15,2) not empty
29
Machine Translated by Google
The connection to the database and the binding of the data source are the basis for the development of the electronic mall system. This system works with
When interacting with the database, use the Mybatis persistence framework to connect to the MySql database. Dynamically bind
data source and JNDI through e3p0 JDBC connection pool to realize data interaction [20]. Specifically, by establishing in this system
jdbc.properties file to achieve the database connection. The content of the file is as follows.
jdbc.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://116.62.48.150:3306/legendshop?autoReconnect=true&us
eUnicode=true&characterEncoding=utf-8&generateSimpleParameterMetadata=true
jdbc.username=root
jdbc.password=lcygqy
For the tourist users of the electronic mall, they can register as a member user of the electronic mall through their mobile phone number, and can enjoy
Member privileges such as purchasing products and viewing orders. The specific registration flow chart is shown in Figure 4-2.
30
Machine Translated by Google
When a tourist user registers, he first enters the system registration interface. If he continues to register, the user needs to fill in registration information such as mobile phone number, SMS verification
code, password, and invitation code. When the user fills in the mobile phone number, the system will judge whether the mobile phone number is legal according to the regular expression to prevent malicious
registration. After filling out the registration information, the user clicks the Register Now button and checks to agree to read the terms. If the mobile phone number does not exist in the system database, the
registration can be performed. After the registration is completed, the user information will be inserted into the member user information table. If the mobile phone number already exists in the database, the mobile
phone number cannot be registered, and the user will be prompted that the mobile phone number has been registered, and please change the mobile phone number. (2) Login module The main function of the
login module is to enable members of the e-mall to log in to the system for operation. The login method of this electronic mall is
Mobile phone number password login and mobile phone number verification code login. The specific login flow chart is shown in Figure 4-3.
When logging in, the user first enters the login interface of the electronic mall, selects the login method, and fills in the mobile phone number and password.
Code and click the login button, if the mobile phone number does not exist in the database, it will prompt that you need to register before you can log in, if the mobile phone number does not exist in the database
If the mobile phone number already exists in the database, the system will verify whether the password entered by the user is consistent with the database, and if it is consistent, log in
If the registration is successful, the user can perform operations such as shopping and checkout. If they are inconsistent, the user will be prompted that the mobile phone number or password is wrong. That
The specific realization of the login module class diagram is shown in Figure 4-4.
31
Machine Translated by Google
In Figure 4-4, the member login controller class is the AppLoginontroller class, which defines and implements the Login method and isUserCanLogin
method. The main function of the isUserCanLogin method is to check whether the user has repeatedly entered
If the wrong password is entered, if the user enters the wrong password more than ten times, the password will be locked.
First, when a user logs in, the request is passed through the filter to the login controller class AppLoginontroller, and then the login method is found
according to the URL address. In the login method, isUserCanLogin is first called to determine
Whether the user repeatedly enters the wrong password ten times, if more than ten times, the password will be locked for one hour.
After that, call the convertUserLoginName method of the UserDetailService class according to the input account information. This method will search
the account information in the database. If the account information does not exist in the database, the login will fail and prompt
account error. If there is the account information, return the user's name.
Finally, call the getUserByName method in the UserDetailService class according to the user’s last and last name. This method obtains the user’s
detailed information, login account and password through the database search, and fills in the account and password of the user.
Compared with it, if the passwords are inconsistent, the login will fail, prompting that the user account or password is wrong, if they are the same, the login will fail.
According to the implementation process of user login, the specific implementation sequence diagram of user login is obtained, as shown in Figure 4-5.
32
Machine Translated by Google
In the shopping cart module, users can add items to the shopping cart, query, update and update the items in the shopping cart
delete operation. After confirming the shopping items, the user clicks the checkout button to generate an order. its specific shopping process
33
Machine Translated by Google
When the user is shopping, after successfully logging into the electronic mall system, the user can browse product information, and finally add the
product to be purchased to the shopping cart. At this time, the system needs to check the inventory of the product. If the inventory is insufficient, it cannot be
added to the shopping cart and a warning message will be prompted to the user. If the inventory is sufficient, the user can view the item in the shopping cart
after it is added to the shopping cart. And according to their own needs to modify the number of goods and so on.
According to the user's purchase process, the specific implementation class diagram of adding a shopping cart is shown in Figure 4-7.
In Figure 4-7, the ShopCartController class is directly related to several interface classes and has several methods of its own. The interfaces mainly
There must be four methods: deleteShopCart, addShopBuy, clearShopCart and updateBasketCount. In these interface classes, all have their own
implementation classes. Taking SkuService as an example, its implementation class SkuServiceImpl contains its specific business logic.
When member users are browsing product information, they can temporarily add the products they need to buy to the shopping cart, and then through
Shopping cart, modify the quantity and type of goods according to your own needs. When a user adds an item to the shopping cart, if
If the user is not logged in, the system will temporarily put the shopping cart information in a cookie. The specific sequence diagram of adding to the shopping cart is shown in the figure
4-8 shown.
34
Machine Translated by Google
The background implementation logic for member users to add products to the shopping cart is as follows: As
can be seen from Figure 4-8, when member users add products to the shopping cart, first the request is sent from the front end, and after filtering
Go to the shopCartController controller, and then find the addShopCartBuy method according to the interface address. In this method, obtain product information by calling
Secondly, according to the product information, the number of products transmitted by the front-end request, the user number, the product inventory number and other parameters to adjust
Use the checkCartParams method of the OrderUtil tool class to check whether the product can be purchased. If the purchase cannot be made, the user will be prompted
Finally, the system checks whether the user is logged in to the system. If not, the product sent according to the front-end request
The stock number calls the getSku method of skuService to get the stock information. Call the addShopCart method of shopCartHandlerService based on the inventory
information, product number, product quantity, etc., add the product to the shopping cart and save the shopping cart information in the cookie first. If the user has already
The saveToCart method of basketService adds the product to the shopping cart, and if the product already exists in the shopping cart, directly increases the quantity of the
product. In addition, the ability to delete a single item in the cart, empty the cart, change the number of items in the cart
The business logic is similar to adding to the shopping cart, and the specific process is as
follows: (1) Empty the shopping cart Search the shopping cart table according to
the user ID, find the shopping cart information of the user and delete it. Then the user's
cart Search the shopping cart table according to the user number, product number, and product inventory number to find the corresponding shopping cart record,
35
Machine Translated by Google
Delete the product information in the shopping cart. (3) To change the quantity
commodity inventory number, modify the quantity of goods, judge whether the inventory of the commodity is sufficient, and whether it can be purchased. If the inventory is insufficient
or the quantity of the modified commodity is wrong, the corresponding error will be prompted to the user information. If you can make a purchase, then search the shopping cart table according
to the user number, find the corresponding shopping cart record and modify the corresponding product number
order module, member users can place orders through the shopping cart and view the generated orders in the order center
Order. Taking the user's order as an example, the specific flow chart is shown in Figure 4-9.
First of all, when the user places an order in the shopping cart, he must confirm the products to be purchased in the shopping cart, and then click the checkout button to jump to the
order interface. After that, the user fills in the consignee, delivery address, mobile phone number and other information on the order interface. After completing the information,
The interface displays the purchased product information and confirms the payment amount.
Finally, after confirming that the amount is correct, the user clicks the submit order button, and jumps to the payment interface after success. If the payment fails, it will prompt that
the payment failed. When the payment is successful, an order will be automatically generated, and then the order information can be queried. That
36
Machine Translated by Google
First, the background obtains the user's detailed information in the session, and then checks the product information in the shopping cart
Check to determine whether the product selected in the shopping cart is empty. If it is empty, it will prompt the user that there is no product that needs to be purchased. If it is not
empty, check whether the merchant’s product inventory is sufficient and whether the merchant’s product has been downloaded according to the product number and product purchase
quantity. shelf. Secondly, if the product cannot be purchased due to the reason that the product is off the shelf, the user will be prompted for the reason for the inability to purchase. if
possible
Make a purchase and then check the order amount. If the order amount is negative due to a promotion, it will prompt that the order amount is incorrect and the order will fail. If the
order amount is correct, then obtain the merchant’s invoice information according to the merchant number, and the user details obtained in the session Get the user's default delivery
address from the information. After the order is completed, submit the order and set the order submission token to prevent the order from being submitted repeatedly. Finally, during
the order submission process, the background first performs parameter verification to determine whether the order has been submitted repeatedly. After the parameter verification is
completed, the order enters the process of processing the freight template to calculate the freight amount. Then enter the coupon processing process. If the user uses the
coupon, calculate the discount amount, and finally confirm the order amount. If the order amount is negative, the user will be prompted that the order amount is wrong and the order
will fail. If the order amount is correct, write the order information into the order information table, and the foreground jumps to the payment page. After the user pays successfully,
modify the order status to paid. If the user chooses not to pay the order temporarily, the front page will jump to the order center page, and the user can query the order information
such as the list of unpaid orders and the list of paid orders in the order center.
When a user places an order, the system needs to query the order table in the database. The unique primary key of the order table is the order number, and the order number
is generated by the background number generator to generate a unique number, which can effectively prevent concurrency. The following describes the detailed implementation logic
First, create a system primary key generation table in the database. The main structure of the table includes number name and number start sequence. Then create a function
to obtain the serial number in the database, and the function can query the serial number opening number according to the serial number name.
start sequence.
Then, add 1 to the serial number obtained from the query, modify the record in the system primary key generation table, and return the latest serial number starting sequence.
In the background, you only need to call this function, and enter the name of the primary key number to be obtained.
First, the background obtains user information in the session, obtains the user number from it, and then queries according to the user number
Order table, get all the order information under the user number and return it to the front end.
Afterwards, the front end classifies and displays the order list returned by the background as users according to the order status. When the user clicks on an order, the
backstage will query the order table according to the order number of the order, and return the order information to the front end, which will display it to the user after rendering.
37
Machine Translated by Google
In the management background module, there are mainly user management, commodity management, order management, logistics management, etc. The specific description is as follows: (1)
User management The main functions of user management include member user management, administrator management and merchant management. 1 Member user management Member user
management is mainly to manage the basic information, authority information, and account information of member users. according to
The user ID of the user, the detailed information of the member user can be viewed and modified in the member user information table. When modifying the permissions of a member user, first search
the system role table according to the user number of the member user, find out the system role corresponding to the user, search the system permission table based on the role number, find the
permission corresponding to the role, and then jointly query System menu table, find out the system menu corresponding to the authority, and then return the result. After the foreground renders, the
administrator can view the user's corresponding authority on the system interface and perform operations such as modification and addition. 2 Administrator management Administrator management is
mainly to manage the basic information and account information of system administrators, and its implementation process is similar to that of
The management of member users is consistent, and the user number is used to query, modify, etc. in the database, and the process will not be described again.
3Business management In
business management, the background first queries the store information table, and returns all stores in a List structure, and the front-end renders to see all the store lists. If you want to view
store details, modify store information, and delete store information, then It is necessary to query, modify or delete in the store information table through the store number of the store.
main functions of product maintenance and management include product management and specification management, of which product management includes product category management,
evaluation management, warehouse management, etc. Specification management includes specification attributes, parameter attributes, parameter group attributes, and
type attribute. 1
background searches for the product category table in the database. After the query results are packaged in a tree structure and returned to the front end, after the front end renders, the
administrator can view the existing commodity categories in a tree structure style If the administrator wants to edit the product category, he only needs to query the product category table through the
for the evaluation management and warehouse management module, its main functions are similar to those of the product category management module, mainly for viewing, editing, deleting
and adding relevant information. Taking evaluation management as an example, the backend searches the product review table according to the product number, and returns all the comments of the
product to the front end, so that the administrator can see all the comments about the product. When the administrator sets the reply template, the template will be set in the background Insert the name
and template content into the product review template table. When the administrator uses the template to reply to the comment, the background will find the corresponding template content through the
template number, find the unique comment record in the product review table through the product number and review number, and then insert The template content is inserted into the item response for
this record
column.
Since the background management module has many functions and its corresponding modes are roughly the same, the following mainly focuses on order management and logistics management.
38
Machine Translated by Google
functions of order management include order viewing, order setting, order printing, order delivery, order cancellation, order review, etc. Its
In Figure 4-10, the orderAdminController class is the order management controller class, which has multiple interface classes
have a direct connection and have multiple methods in the class. Among them, such attributes mainly include methods such as orderAdminDetail,
orderSetting, orderPrint, and getOrderSub, which are mainly methods for implementing functions such as order setting, order printing, and order viewing.
The relationship between the interface class and its implementation class is described accordingly. On the other hand, when interacting with the
database, the methods in the database operation classes such as OrderDao, UserDetailDao, and SubDao all refer to the corresponding tables in the database.
Query, delete, modify and add. In these implementation classes, in addition to the attributes of the database operation class, there are some methods.
These methods are mainly to realize the specific implementation logic of functions such as order setting, order printing, order delivery, and order viewing.
details as follows:
39
Machine Translated by Google
In Figure 4-11, firstly, the front end sends a request, and the request goes to the controller class, and the corresponding party is found according to the interface address.
method, in this method, call the view order list interface in the SubService interface class, and then in the SubService
The implementation class SubServiceImpl class calls the database operation class SubDao in the view order list method, and in SubDao
The methods in are mainly to query, add, delete, and modify the database. After SubDao has finished querying the database, it will end the query
The administrator can perform conditional filtering when viewing orders, and can query through order number, order date, order status, etc.
All orders or a specific order for the date range. The specific implementation logic is as follows:
First, when the administrator chooses to view a specific order, by clicking on the order, the order number of the order will be passed to
The http request is passed to the orderAdminDetail method in the orderAdminController controller. the party
After that, find the purchaser number in the returned order information, and pass the userDetailServiceImpl
queryParentUserInfo method, associate query member user table and member user delivery address table, and then query
The received member user information and member delivery address information are returned layer by layer.
Finally, in the same way, the item information in the order and the logistics information of the order are queried, and the order information,
Buyer information, order product information, and order logistics information are packaged into a Map structure and returned to the front end, and the front end will return the result
In the order management module, administrators do not have the right to delete order information, for malicious orders of member users or
For wrong orders caused by promotional activities and other reasons, the administrator can cancel the order and search through the order number
The order table is updated to implement the function of canceling the order by modifying the status of the order.
40
Machine Translated by Google
The main functions of logistics management include order management to be shipped, logistics tracking management, logistics company configuration, delivery party
Form configuration, free shipping setting, return point configuration, and shipping template configuration. Its specific implementation class diagram is shown in Figure 4-12.
In Figure 4-12, the deliveryAdminController class is a logistics management controller class, and the attributes of this class mainly include interface class attributes such as
DeliveryCorpService, DeliveryTypeService, and DeliveryPackageService. It mainly includes logistics company service interface class, delivery method service interface class, logistics
package service interface class, etc. At the same time, the methods of this type mainly include queryDeliveryPackage, queryDeliveryPost, queryTransport, etc., which are mainly for querying
logistics company methods, querying delivery methods, and querying logistics package information methods.
In addition, Figure 4-12 also includes related interface classes and their interface implementation classes. The following is shipped by logistics
The specific implementation is taken as an example to describe in detail. The delivery sequence diagram is shown in Figure 4-13.
41
Machine Translated by Google
In Figure 4-12, when the administrator delivers the logistics order, he first needs to fill in the logistics order number and the name of the logistics company. After
completing the filling, the front desk sends the logistics order number, logistics company number, and order number to the background through HTTP requests. The
background calls the queryDeliveryCore method in DeliveryCorpService according to the logistics company number to query whether the logistics company exists. This
After that, call the queryDeliveryPackage method in DeliveryPackageService according to the order number to query all package information under the order (some
orders may have multiple packages due to the large number of items), and check the delivery method supported by the consignee locally by querying the delivery method
Go to the number of the delivery method supported locally by the consignee. Then use the queryPackagePost method to query the free shipping setting table, and obtain
the free shipping conditions and package status of the consignee's address.
postal method.
Finally, query the freight template information through the queryTransport method, obtain the freight calculation rules, and then
The freight is calculated based on information such as the number of packages, weight, and delivery method of the consignor. Once completed, the order is shipped.
Since the root of the product quality lies in the manufacturer itself, and the products in this electronic mall are all provided by the supplier, so
For the protection of product quality and safety, this e-mall adopts the method of tracing back to the source. In the supplier settled in this e-commerce
Chengshi verifies the supplier's own integrity, qualifications, production certificate, commodity safety and quality inspection and other information.
Commodities provided by a safe supplier can only be sold in this electronic mall, which eliminates counterfeit products from the root.
inflow of goods. The following is a detailed description of the process for suppliers to enter the system. Its quality and safety inspection flow chart is shown in Figure 4-14
shown.
42
Machine Translated by Google
As can be seen from Figure 4-14, in the process of commodity inspection, the supplier first submits the application materials, and then
the system first reviews the business license of the supplier. The product inspection report, product national agency certification, and anti-
counterfeiting working committee filing information of the goods provided by the supplier shall be reviewed and verified. If the supplier provides
fake certification or business license, the supplier application shall be rejected. After all certifications are passed, the supplier also needs to pay
a certain amount of deposit. If there is a quality problem with the product, the supplier will pay the compensation and cancel the supplier
qualification. According to the supplier review process, the specific implementation sequence diagram of the background is shown in Figure 4-15.
In Figure 4-15, after the supplier submits the application, the SupplierApproveController is called through the front-end request
The SupplierApprove method in the controller. In this method, the supplier application is implemented by calling the approve method
in the supplier application service interface SupplierApproveService. The business logic of this method is implemented in the
SupplierApproveServiceImpl class, and finally interacts with the database through SuplierApproveDao to insert an application record in the
When conducting a supplier audit, first look for all unapproved application records in the database supplier application form,
Then audit through the audit method in the supplierAuditService service interface. The business logic of this method is implemented in the
supplierAuditServiceImpl class, specifically including the implementation of business logic such as verification of supplier qualification
certification, business license, and product national agency certification. Finally, the audit results are returned to the supplier.
43
Machine Translated by Google
With the increase in the number of members and users of the e-mall, the number of merchants and stores in the e-mall, and the types of products, the shopping
needs of users have also increased. The products offered are single and most of them do not meet the needs of users. As a result, users spend a lot of time searching
for the products they need. This leads to problems such as the small order volume of the e-commerce mall and the increase in user return orders. In order to effectively
improve such problems, this paper improves on the collaborative filtering algorithm and proposes a new commodity recommendation algorithm. However, analyzing the
traditional item-based collaborative filtering algorithm, it is found that the way the algorithm calculates the candidate item set cannot solve the recommendation problem
of the current electronic mall. And due to the data sparsity and cold start problem of the collaborative filtering algorithm itself, the accuracy of product recommendation is
not high. Therefore, this paper mainly de-optimizes the candidate item set generated by the algorithm from the relationship between items, the relationship between users,
the design of the input matrix and the improvement of the clustering algorithm.
as follows: (1) Aiming at the problem of data sparsity, by reducing the dimensionality of the input matrix, the low-quality data in the input matrix is eliminated,
thereby generating a new input matrix. Using the optimized input matrix for calculation can effectively save calculation time and improve recommendation efficiency.
(2) For the cold start problem, since there is no behavior data for newly registered users and newly added products, traditional collaborative filtering algorithms
cannot recommend products for newly registered users, nor will they recommend newly added products to users . This paper associates products through product
classification, product evaluation and product purchase rate, and associates users according to their gender, occupation and age characteristics. And for users who have
not generated a recommended item set, the system background will recommend the hot products with the best sales to users through statistics. In this way, the cold start
In the following sections, we will focus on the design of the product recommendation algorithm in detail.
Traditional collaborative filtering recommendation algorithms are generally divided into three steps: collecting user preferences, finding similar items or users,
and calculating recommendations [22]. In this paper, data preprocessing and behavior matrix design of search data are carried out in the stage of collecting user preferences
And reduce the purchase matrix sparsity processing. In the stage of finding similar items or users, through the characteristics of users and products
Extract and calculate the user similarity and product similarity. And put forward an improvement on the basis of k-means clustering algorithm, will
The user similarity and commodity similarity are introduced into the distance calculation of the traditional k-means clustering algorithm.
Finally, the optimal candidate item set of similar items or users is obtained. In the calculation recommendation stage, according to the optimal candidate item set and
Popular product set, select Top-N and recommend it to the user as a recommended product. The specific design is as follows:
There are multiple commodities and multiple users in the electronic mall system. The input of product recommendation algorithm is user and product
constituted behavioral matrix. When constructing the purchase matrix, the rows represent users, the columns represent products, and the data in the matrix are pairs
Score the user's purchase behavior, assuming that there are n member users and m items in the e-commerce mall,
Then the behavioral relationship between the user and the product constitutes a purchase matrix A of size n*m, assuming a user purchaser
44
Machine Translated by Google
The purchase vector of the product is u, then the matrix A is expressed as follows:
ÿu ÿ
1
u2
A ÿ
ÿÿÿ
u no ÿÿ
As far as commodities are concerned, because they are affected by time, the longer the time, the lower the popularity of commodities. So when a user purchases an item
The larger the gap between , the lower the fit between the user and the product, and the product rating should also decrease accordingly. Therefore need to pass
The time decay function is used to increase the impact of the purchase time of the commodity on its purchase matrix. Since the condition fits the index
Attenuation process, so this paper adopts the following time decay function:
t
NN ÿ
ÿ
ÿt ÿ
ÿ
ÿ0ÿ (4-1)
ÿ for
Among them, Nÿ ÿt is the product rating of the product at time t, Nÿ ÿ 0 is the product rating of the product at the beginning,
Time decay constant, in the matrix A, if the user purchases the product once, the product score of the product is 1, therefore,
Set Nÿ ÿ 0 = 1, then record t as the time0when you purchased the product, and t as the current time, then the impact of the current time on the product rating of the
ÿ tt ÿ
0
ÿ ÿÿÿ
N
ÿt
ÿ
t0ÿ
ÿÿ
exp ÿ
ÿÿ
(4-2)
ÿ 7
ÿ ÿ ÿ ÿ 10*64.8
According to the survey, the product popularity cycle of the electronic mall is about one year, so after setting more than one year, the product’s
Commodity ratings are not affected by time, and the time impact value at the end of the year is 0.1. In this paper, the time impact value is below 0.1
N ÿ ÿ ÿÿ ÿ ÿ 3661.0365
N (4-3)
-3
According to the formulas (4-2) and (4-3), we can get, ÿ ÿ 10*6.3 , so the data values in matrix A are calculated as follows:
11 7
tt ÿ
ÿ
N ÿÿ ÿ
10*1536.30, 10*3.7exp ÿÿ
0
N ÿ
ÿ (4-4)
ÿt ÿ
ÿ ÿ ÿÿ ÿ
7
N 10*1536.3, 10*1536.3
ÿ t ÿ 7
Where t is the minute difference between the current time and the time of purchasing the product.
Due to the huge number of products in the e-commerce mall, and member users are limited by their purchasing power, matrix A contains multiple products
A sparse matrix with a score of 0. When the number of users and commodities in the electronic mall is huge, if the data of matrix A is directly
Processing will waste a lot of time, and the system may crash due to the huge amount of calculation. To avoid such problems
occurs, it is necessary to filter users and products first, and remove products and users with a product score of 0, thereby reducing the moment
The sparseness of the array. Assume that the matrix A after removing products with a product rating of 0 and member users becomes e*l
45
Machine Translated by Google
ÿq 1 ÿ
q
Q ÿ 2
ÿ
ÿÿq
e ÿÿ
For product feature extraction, the quotient is calculated by extracting product ratings, product purchase rates, and product category features.
product similarity.
According to the survey, when members of e-commerce malls purchase products, other users’ ratings on products are directly related to
Affects the desire of member users to purchase the product. For example, if most users purchase product A, they will be satisfied with product A after using it.
The evaluation of the product is 5 stars. At this time, user B wants to buy product A. After seeing that the evaluations are all 5 stars, he can buy it with confidence.
If user B sees that the product ratings are all 1-star or 2-star when purchasing product A, then user B has a high opinion of product A at this time.
A will feel resistance and turn to buy other products of the same type. Therefore, for the impact of product evaluation on member users
The average product evaluation is used to describe the user's evaluation similarity. The method of calculating the similarity of two commodity evaluations is as follows:
Down:
Assuming that the product evaluation similarity matrix generated by it is S, then S is as follows:
ÿS ÿ
1
S
S ÿ 2
ÿÿ Sl ÿÿ
According to the research, most of the member users of the e-commerce mall will be influenced by the popular products at that time when purchasing products.
For example, the current online celebrity products, celebrity products and other labeled products. Therefore, it is stipulated that if the difference in the purchase rate of two products is less than 10%,
, then the heat of the two items is the same. The electronic mall system can calculate the purchase price of the product according to the user's purchase of the product.
Purchase rate, and then calculate the purchase rate similarity between two products, the specific calculation method is as follows:
46
Machine Translated by Google
PP
BA
ÿ
BAP
ÿ
, ÿ ÿ (4-6)
1.0
Among them
when, ÿ ÿ BAP ÿÿ 1,0 , it means that the popularity of commodity A and commodity B are the same,
and when ÿ ÿ BAP ÿ1, the popularity of
commodity A and commodity B is not the same. Assuming that the product purchase rate matrix generated by it is D, then D is as follows:
ÿÿ 1P
P2
P ÿ
ÿÿÿÿ
Pl ÿ
where the main diagonal element of P is 1. Pi is the similarity vector between a product and other products.
the products in the electronic mall must fill in the category attributes when entering the system, and because their own categories are relatively stable, the
category similarity between products can be judged according to the category attributes of the products themselves. And when entering the product, the parent category of
the product and the subcategory of the product itself will be selected. Therefore, the similarity of the commodity category of the same subcategory is 1, the similarity of the
commodity category of the same parent category and different subcategories is 0.5, and the similarity of different parent categories is 0.5. The similarity of commodity
categories of different subcategories is 0. The specific calculation method is as follows: ÿ ,0 products belong to different parent categories and different subcategoriesÿ ÿ
,5.0 products
under belong
the same to the
parent same parent category but different subcategoriesÿ ,1 products belong to the same subcategory
categoryÿ
BAC
ÿ
, ÿ ÿ (4-7)
BA BA BA
Assuming that the product classification similarity matrix generated by it is C, then C is as follows:
ÿC
1ÿ
C2
C ÿ
ÿÿÿÿ
Cl ÿ
For user characteristics, the user similarity is calculated by extracting the user's occupation, age, and gender characteristics. Tool
When users purchase products, due to their different occupations, they may purchase different types of products. For example, when a professional
user purchases products, the purchased products may be related to his occupation. Compared with professional B users, the purchased products may be
Will not meet the needs of B professional users. In this paper, the method of calculating the occupational similarity of users is as follows:
47
Machine Translated by Google
users purchase products, users of different genders purchase different types of products. For example, female users may purchase products that are
biased towards home furnishing and cosmetics, while male users may purchase products that are biased toward sports equipment and electronic products.
6 age similarity
When users purchase products, users of different age groups purchase different products. For example, the elderly prefer health care products,
and the young people prefer trendy products. Therefore, different user groups can be better distinguished through age groups. Through the background
data analysis of this electronic mall, the similarity rate of commodity categories purchased between 5 years old and 5 years old is as high as 75%. because
In this setting, if the user's age gap is within 5 years, the similarity is 1, and the user's age span is at most 50 years old. After that, as the
user's age gap gradually increases, the user similarity also gradually decreases. The method of calculating age similarity in this paper is as follows:
Down:
5 ÿ
BAH
ÿ
ÿ ÿ ,ÿ 1min, ÿ
ÿ
ÿ (4-10)
HH ÿ
A B ÿ
For the similarity of commodity features, through the similarity of product evaluation, the similarity of product purchase rate and the similarity of product category
Based on the comprehensive weighted calculation of similarity, the total feature similarity of commodities is obtained as follows:
BAcCBAPBAaSBA
ÿ ÿ ÿ ÿ ÿÿ ÿÿÿ ,,b,,article
ÿ ÿ (4-11)
For user feature similarity, the user’s total feature similarity is obtained by comprehensively weighting the user’s occupational
, ÿ
BAHBAFBAOBApeople
ÿ ÿ ÿ , ÿ ÿ ÿ ÿ , ÿ ÿ
ÿ ÿ , ÿ (4-12)
Among ÿÿÿ
them , The range of values is ÿ ÿ , 1 0 , and ÿÿÿ
ÿÿÿ1 .
So far, the collection of user preferences has been completed, and the k-means clustering algorithm will be improved to make
After cluster analysis, it is more accurate than the traditional k-means clustering algorithm in terms of user correlation and product correlation.
Since the k-means clustering method uses the Euclidean distance calculation method to calculate the distance between other objects and the central object
method, its calculation form is not suitable for clustering between product features and user features. Therefore, this article clusters in k-means
Based on the method, the clustering calculation method is improved, the product similarity and user similarity are introduced, and a
Similarity distance index G, if the similarity difference between users or items in the similarity set is within the similarity distance index G
Within the scope, it will be classified as one category. Finally, cluster analysis is carried out according to the similarity of products and users, and the most
48
Machine Translated by Google
Excellent set of candidate items. The specific improved k-means clustering algorithm process is as follows:
1. Calculate the similarity of each product or user, and generate a similarity set of each product or a similarity set of users.
2. Randomly select K similarity values in the similarity set of a single product or user as the initial center point for aggregation
class, and then compare the difference between other similarity values and the selected K similarity values, if the difference is less than the similarity distance
3. Select the product or user with the highest similarity value as the center point among the divided K sets to re-cluster.
4. Cycle step 2 to step 3 until the selected center point does not change.
So far, the work of finding similar items or users has been completed. In the final calculation and recommendation stage, the Top-N products are
selected and recommended to users through the candidate item sets generated by cluster analysis and the popular product sets counted by the system
1. Preprocess the input user purchase rating matrix to reduce its sparsity. Get optimized purchase ratings
matrix.
2. Calculate the similarity of the products and users in the obtained purchase scoring matrix, and the specific calculation method is based on
Commodity evaluation similarity calculation method, commodity classification similarity calculation method, etc., to obtain the commodity total feature similarity matrix
Pro and
*ll
user total feature similarity matrix U
*e e
.
3. Using the improved k-means clustering algorithm, first cluster the total feature similarity matrix of the commodities until the
The minimum similarity distance of the products in the clustered item set is greater than or equal to the similarity distance index G. get the k nearest neighbors
4. Take the product set of the k nearest similar product item set, and get the purchase score matrix according to the user's purchase score matrix.
5. Use the improved k-means clustering algorithm again to cluster the obtained user set according to the user similarity
class until the minimum similarity distance of users in the generated clustering itemset is greater than or equal to the similarity distance index G.
6. Combining the nearest product item set and the user item set. In the k nearest commodity set, according to the purchase moment
The array arranges its users according to the user item sets, and selects the product item set with the highest user similarity as the candidate
7. Judging the number of products in the recommended candidate items set, if it is less than N, count the popular products in the background and add them to
A set of recommended candidate items is set so that its number is greater than or equal to N.
8. According to the input Top-N, recommend the recommended product set to the user.
In this system, the product recommendation function is based on the recommendation engine to generate a recommendation list, so the following mainly introduces the recommendation
The workflow of the engine and its specific code implementation are described. The calculation flowchart of its recommendation engine is shown in Figure 4-16 .
49
Machine Translated by Google
In the calculation process of the recommendation engine, the user purchase matrix is first constructed according to the user's purchase records, and then through the calculation
Calculate the impact of time decay on the purchase matrix score, and re-determine the value of the purchase matrix. Next, since the purchase matrix is sparse
Sparse matrix is processed to reduce its sparsity, and by calculating the total feature correlation of commodities and user
The total feature similarity, combined with the optimized user purchase matrix, uses the improved k-means clustering algorithm for cluster analysis,
Generate a set of candidate items. If the number of products in the candidate product set is greater than N, then in the candidate item set, select the nearest neighbor
product collection, select Top-N product lists to recommend to users. If the number of products in the candidate product set is less than
N, then count the popular products of the system, add them to the candidate item set, and select Top-N to recommend to users. Implementation
Figure 4-17 shows the sequence diagram for obtaining the recommended product list.
50
Machine Translated by Google
As shown in Figure 4-17, the implementation code for the system to obtain the product recommendation list is as follows:
@RequestMapping("/like")
Integer count) {
List<Object>prodIds = VisitHistoryHelper.getHotProd(request);
ProductDetailproductDetail=productService.getProdDetail(Long.parseLong(prodId.toStri
ng()));
(productDetail. getStatus())) {
products.add(productDetail);
51
Machine Translated by Google
guesLikeProdList.add(proList); //judging
for(int i = 0;i<num-proList.size();i++){
guessLikeProdList.add(products.get(i));
Return guesLikeProdList;
This article uses the product information and user information in the electronic mall project that participated in the research and development during the internship of XXX company
It is the original data, and the original data of some product information and user information are shown in Table 4-4 and Table 4-5. reuse
The product recommendation algorithm before and after the improvement calculates the recommended product set separately. Considering the shopping experience of consumers, the system is more
Pay more attention to whether the recommended products are accurate and practical. Therefore, the accuracy P and recall rate R predicted by the product recommendation algorithm are
And compare and analyze the F value calculated according to the precision P and recall rate R to verify the performance of the commodity recommendation
algorithm [23].
Product Number product name Product Category Purchase Rate Product Evaluation (Number of People)
1001 five elements grass toothpaste Toothpaste 11% 5, 4(10) 3, 2(3) 1(2)
1002 Ecological selenium-enriched rice, rice noodles, miscellaneous grains 10% 5, 4(5) 3, 2(2) 1(1)
1003 Wild blueberry wine (cellared) 12% wine 60% 5,4(50) 3,2(4) 1(0)
1004 Wild Blueberry Icewine 12% Wine 55% 5, 4(30) 3, 2(8) 1(0)
1005 Lay's Potato Chips Puffed Food 46% 5, 4(15) 3, 2(6) 1(1)
1007 Master Kong Beef Noodle Casual Snacks 50% 5, 4(60) 3, 2(6) 1(0)
1008 Amino Acid Aloe Soap Soap 10% 5, 4(8) 3, 2(5) 1(1)
1009 Master Kong 3+2 Sandwich Biscuit Casual Snack 13% 5,4(19) 3,2(7) 1(2)
52
Machine Translated by Google
Based on the product information and user information inside the above-mentioned mall system, the purchase between consumers and products is constructed
matrix. And according to the characteristics of the product and the characteristics of the user, the product recommendation algorithm before and after the improvement is used to calculate the recommended products respectively
set. And by changing the number of product recommendations, the recommendation precision rate, recall rate and F value of the product recommendation algorithm are threefold.
Analyze and evaluate its recommendation performance. The recommended performance before and after improvement is shown in Figure 4-18 and Figure 4-19.
53
Machine Translated by Google
From Figure 4-18 and Figure 4-19, it can be seen that the product recommendation algorithm has improved accuracy, recall and F
There are differences in the three aspects of the value, as shown in Table 4-6. Table 4-6
It can be seen from Table 4-6 that with the increase of the number of products recommended by the system, the accuracy of the recommendation algorithm gradually decreases, and the corresponding
In terms of recall rate, it is the most stable when the number of recommendations is 6. From the comparison of various index data, the number of recommended products
When it is equal to 6, the improved recommendation algorithm has the highest recommendation accuracy.
This chapter mainly introduces the detailed design of the electronic mall, mainly for the login and registration module of the electronic mall system, the purchase
The specific implementation process and business logic of important module functions such as the cart module and the order module are described in detail. In addition
In addition, the detailed analysis of the system's development and configuration environment, the system's overall implementation architecture and database table structure is also carried out.
In addition, the recommendation algorithm of the electronic mall system and the product quality and safety inspection process have been designed and analyzed in detail.
accomplish.
54
Machine Translated by Google
During the development process of this electronic mall system, various problems and bugs will always be encountered, which will affect system performance,
Information security, system stability, and even major defects in the initial operation of the system. And since e-commerce
The city system involves money transactions. Once a major vulnerability occurs, the consequences will be disastrous. Therefore, a large number of tests are required to
ensure the normal operation of the system. System testing is an essential part of the system development process, accompanying the entire development process [24]. And this
This chapter mainly tests the specific functional modules of the system. And the test environment configuration of the system is explained.
In order to facilitate related tests of system function modules on the local server, the test environment is mainly based on the local computer
And the corresponding software environment. The specific test environment configuration is shown in Table 5-1 .
System EnvironmentCentos 7
System EnvironmentWindows10
This functional test for this e-mall is mainly to test the main functional modules of the e-mall system, among which the front-end
module mainly tests the login registration module, user order module and shopping cart module. The background module mainly tests
the order management module, logistics delivery module, and user management module. And set up corresponding test cases for the
functions of front-end and back-end modules. The test case format used in this paper includes test type, test purpose, test role,
application scenario, precondition , data input, expected result, and test result [3]. Among them, the test types are functional test
and performance test [3], the test roles are divided into system administrators, member users and tourists, the application scenario
describes the function to be tested in a specific situation, and the preconditions describe the It is the data that needs to be prepared in
advance when performing the function test. Data input describes the prepared test data, expected results and test results describe the
normal results of the function and the results produced by the actual test. The specific tests and test cases for each module are as
follows: (1) Registration module function test When users register, they need to fill in information such as mobile phone number and
verification code according to the registration process, so the design of registration function test cases is shown in Table 5- 2
shown.
55
Machine Translated by Google
Testing purposes Check that the e-marketplace registration function is working properly
prerequisite The user successfully enters the e-mall system registration page
User clicks the register button Input data: not registered Mobile phone for registered users Unregistered mobile phone number can be correct
button, use the unregistered phone number, username, The number is normally registered, and the Regular registration and successful registration.
mobile number to register. Login password, picture verification Indicates that the registration is successful.
User clicks the register button Input data: registered mobile phone Cannot register successfully and Registered mobile phone number and user
button to register with the registered number, user name, login prompt mobile phone number or use The account name cannot be registered and
mobile phone number. Lu password, picture verification code, Account name has been registered. the prompt information is correct.
When performing the user registration function test, execute according to the test case, and the specific details of the unregistered user name and mobile phone number
56
Machine Translated by Google
For registered users, the system will prompt the corresponding information table name, the user has been registered. The specific effect diagram is shown in the figure
5-3 shown.
Through the analysis of the test result graph of the registration module, it can be seen that the tourists are registered normally in the electronic
mall system. The function of the registration module is basically realized. (2) Functional test of the login module. E-mall member users can choose SMS
login and user password login when logging in, so the login module
57
Machine Translated by Google
Testing purposes Check whether the login function of the e-mall system is working normally
prerequisite The user successfully enters the login page of the e-mall system
The user clicks the login button, making the Input data: mobile phone Registered mobile phone number, password Registered mobile phone number can
Password with registered mobile number number, login password code can log in normally, and Log in normally and merge into
code to log in. Jump to the home page. Jump to the home page.
The user clicks the login button, making the Input data: mobile phone Unregistered mobile phone number, password Unregistered mobile phone number, password
Password with an unregistered mobile number number, login password. The code cannot be logged in normally, The code cannot be logged in normally,
code to log in. And prompt an error message. And prompt error message
information is correct.
When the user forgets the password, the Input Data: User User authenticated set by the user
by clicking the forgot password button name, SMS verification After verification, you can set a new The new password can succeed
After authentication, after passing password, new password. password, and successfully logged in log in system.
When performing the user login function test, execute according to the test case, and the registered users pass the mobile phone number and user name password
The code login results are shown in Figure 5-4 and 5-5.
58
Machine Translated by Google
For unregistered users, when logging in to the system, the system will refuse to log in and prompt the user with corresponding information.
When the user forgets the password, he will not be able to log in to the system. At this time, the system will provide the function of retrieving the password.
Set a new password after verifying your identity on the Retrieve function page. The specific test effect diagrams are shown in Figure 5-7 to Figure 5-11.
59
Machine Translated by Google
60
Machine Translated by Google
By using the mobile phone number of the registered user and the mobile phone number of the unregistered user to log in to the system of the electronic mall and use the forgotten
The password function resets the password login result analysis, and the user can use the login function normally. Test login module function
can be realized.
When shopping, users can add the products they purchased to the shopping cart first, and then select in the shopping cart
Items are billed. When testing the function of the shopping cart module, it is necessary to test the increase or decrease of the number of items in the shopping cart, select
checkout, check whether the order amount is correct, and whether the product can be added to the shopping cart normally, etc., so
The test case design for the shopping cart module is shown in Table 5-4.
prerequisite The user successfully logs in and enters the home page of the e-mall system
Users browse products, click Input data: commodity information Goods can be added normally Product successfully added to
The user modifies the quantity of Input data: Products have been The quantity of items in the The quantity of items in the shopping cart
items in the shopping cart. added to the shopping cart. shopping cart can be modified. has been modified successfully.
User selects in cart Input data: in cart User chooses to settle Users can normally choose
Items are billed. Multiple items have been added. The goods go to settlement, settlement Settlement after selecting the product, settlement
The calculated amount is correct, click The calculated amount is correct and becomes
61
Machine Translated by Google
Test the shopping cart function according to this test case, and the test results are shown in Figure 5-12 to Figure 5-16.
62
Machine Translated by Google
63
Machine Translated by Google
From the above analysis, it can be seen that after browsing the product information, the user can successfully add the product to the shopping cart, and the user can
When the number of items in the shopping cart is modified, it is also successfully modified. After the user selects the product, the product
At the time of checkout, the settlement amount of the product is correct and the page for submitting the order is successfully redirected. The shopping cart function can be used normally.
After the user selects the product in the shopping cart for settlement, it will jump to the order submission page. On this page, the user
The order information needs to be filled in, and the order will take effect after the order is submitted. Table 5-5 shows the functional test cases for users to place orders. Table 5-5 User
Testing purposes Check whether the order submission function of the electronic mall system is running normally
prerequisite The member user selects the product and has settled, and enters the order submission page
User selection delivery address letter Input Data: User The user enters the delivery address letter Users can switch addresses
information, test address information can Write multiple receipts information page, you can select its information, successfully submitted the order
64
Machine Translated by Google
No success on the submit order page Address information. other delivery address information as Single page display.
successfully displayed.
The user selects the delivery method, Input Data: User Shipping information can be successfully Shipping information displayed successfully.
and tests whether the order can be submitted Choose a shipping method. displayed on the submit order page.
User clicks submit order button Input data: No user clicks submit order button User clicks to submit order
button to test whether it can jump successfully After the button, you can jump normally button, jump to branch successfully
According to this test case, the user order function is tested, and the test effect diagrams are shown in Figure 5-17 to Figure 5-22.
65
Machine Translated by Google
66
Machine Translated by Google
67
Machine Translated by Google
Based on the above analysis of the specific renderings of users purchasing goods in this e-mall and placing orders in the shopping cart, the function
of the user order module can be used normally when the user purchases goods, and the functions of this module are basically realized.
module In the order management module, the administrator checks the order list according to the status, processes the order, and can view the order
Details, cancel orders, print orders and more. The test case design for the order management module is shown in Table 5-6.
68
Machine Translated by Google
Testing purposes Check whether the function of the order management module of the e-mall system is running normally
prerequisite The administrator user logs in to the background management system and enters the order management module page
Admin user view Input Data: E-Mall The administrator enters the order management mode Order list successfully displayed
Order List. The member user has successfully downloaded When the block page is displayed, the page displays the Show.
order data.
Admin user view Input Data: E-Mall Admin clicks on an order Successfully jump to the order
order details. The member user has successfully downloaded item to jump to order details Details page, order details
single, in the background database page, and display the order details The detailed information shows positive
Admin user print Input Data: E-Mall The administrator clicks the print order button Jump to shopping successfully
Order. The member user has successfully downloaded button, successfully jump to the shopping list list interface, shopping
single, in the background database Single print interface and shopping information The information is displayed correctly.
Admin user cancel E-mall member users The administrator clicks the Cancel Order button Order successfully canceled.
Order. The order has been successfully placed, the background number After clicking the button, a prompt box will pop up.
There is order data in the database. After the administrator writes the cancellation reason, click
According to this test case, the function test of the backstage order management module of the electronic mall system is carried out, and the test effect diagram is as follows
69
Machine Translated by Google
70
Machine Translated by Google
Through the analysis of the above test renderings, in the background management order module, the order list can be displayed correctly, and the order
The detailed information of the order is correct and the order can be printed. When canceling the order, the corresponding warning message will be prompted and the cancellation will be recorded.
reason. The functions of the order management module can be used normally. The function of this module is basically realized.
In the logistics management module, the administrator checks the list of logistics orders according to the status, and processes the logistics orders.
Administrators can view the list and details of orders to be shipped, real-time logistics information of logistics orders, and deliver logistics orders
wait. The test case design for the logistics management module is shown in Table 5-7. Table
Testing purposes Check whether the function of the logistics management module of the e-mall system is running normally
Prerequisite: The administrator logs in to the background management system, and the member user's order has been paid.
Administrator enters logistics Input Data: E-Commerce The administrator enters the logistics management List of pending orders
Management module page, test City member user has become Management module interface, can be displayed correctly.
test whether to display all Place an order and complete the payment Make sure to show all pending shipments
The administrator treats the shipment Input Data: E-Commerce The administrator carries out the delivery operation Consistent with expected results.
The order is shipped, the test City member user has become After the order is ready to be shipped
Whether the trial delivery function Place an order and complete the payment The order message in the list
71
Machine Translated by Google
normal. payment, in the background database lost, and appeared in the sent
Administrator enters logistics Input data: E-mall member users The list of shipped orders is Consistent with the expected result.
Tracking page, test logistics have successfully placed an displayed correctly. When the
information and list of shipped order and completed payment, administrator clicks on the latest
Administrator enters logistics Input Data: E-Commerce The administrator clicks to view the order Consistent with expected results.
track page, view a City member user has become Single details button, jump
details of an order Place an order and complete the payment Go to the order details page,
situation, whether the test is normal payment, in the background database Display the details of the logistics order
time information.
Carry out a functional test on the logistics management module according to this test case, and the specific test effect diagram is shown in Figure 5-27 to Figure 5-27.
5-31.
72
Machine Translated by Google
73
Machine Translated by Google
Through the analysis of the test effect diagram of the above logistics management module, it can be seen that in the logistics management
module, the administrator can use the functions of querying the list of logistics orders to be shipped, querying order details, logistics delivery, and viewing
real-time logistics information of logistics orders. The function of this module is basically realized. (7) User management module function test In the user
management module, the administrator can modify and view all user information of the e-mall, and at the same time, modify the role and authority
of each user. In addition, administrators cannot easily delete member user information, and need to prompt for dangerous operations when
deleting. Table 5-8 shows the test cases for the functions of the user management module.
Testing purposes Check whether the function of the user management module of the e-mall system is running normally
prerequisite The administrator logs in to the system and enters the user management module.
Administrator enters user Input data: for registration When the administrator enters the Consistent with expected results.
Management interface, for testing account information exists. user management module, to
surface.
Admin view a Input data: for registration Administrator click to view Consistent with expected results.
User details, test account information exists. button to jump to the user
Whether the test information display details page, and correctly display
Admin view a Input data: for registration Administrator click to view Consistent with expected results.
User role information Test account information exists. User role tab, jump to user role
Whether the information can be displayed normally. table page, showing the current
can increase it
delete operation.
Admin view a Input data: for registration Administrator click to view consistent with expected results
User permission information account information exists. User Permissions tab, jump to
74
Machine Translated by Google
Whether the information can be displayed normally table page, showing the current
system permissions.
The administrator modifies a Input data: The registered user The administrator clicks on the consistent with expected results
The user's login password, the information exists, and the password Modify Password tab, jumps to the
test modification password is information is newly modified. password modification interface, and enters
Admin deletes a Input data: for registration Admin click delete Consistent with expected results.
users, test whether account information exists. button to pop up the delete prompt
success.
Carry out a functional test on the user management module according to this test case, and the specific test results are shown in Figure 5-32 to Figure 5-32.
5-38.
75
Machine Translated by Google
76
Machine Translated by Google
By analyzing the function test renderings of the user management module, the system administrator can use the user management module normally.
In the product recommendation module, the e-mall system can recommend products that meet their shopping needs through the user's consumption behavior.
behavioral goods. When the user first registered, there was no purchase behavior, so the popular products in the system are recommended to the newly registered users
household. The test case design for the product recommendation module function is shown in Table 5-9.
Testing purposes Check whether the function of the product recommendation module of the e-mall system is running normally
prerequisite The user successfully logs in to the e-mall system and enters the shopping cart page.
Member users enter the purchase Input data: No user enters cart Consistent with expected results.
product list.
77
Machine Translated by Google
For newly registered users, Input data: None. For newly registered users Consistent with expected results.
Make recommendations.
Carry out a functional test on the product recommendation module according to this test case, and the specific test effect diagram is shown in Figure 5-39.
5-40.
Through the analysis of the test effect diagram of the product recommendation module, it can better recommend products that meet their consumption
habits for users, and can recommend products to newly registered users, effectively solving the cold start problem of traditional recommendation algorithms.
The function of this module is basically realized. The system function will be tested below to ensure that the system can run normally.
For the performance of the electronic mall system, the test is mainly carried out from the four aspects of system running time, interface response
speed, server processing speed and the pressure of some interfaces [3]. Design test cases for the performance of the system according to this requirement,
78
Machine Translated by Google
Role Testers
system for a long time Input data: None. The system operates normally 24h. Consistent with expected results.
run.
The page when the user logs in Input data: None. Response speed <3 seconds, Consistent with expected results.
When the user places an order Input data: None. Response speed <3 seconds, Consistent with expected results.
After testing, the system can run normally for a long time, and respond when users log in, place orders, etc.
The speed meets the needs of users, and the system is relatively stable.
Due to the large number of system interfaces, the following takes the login interface as an example to conduct a stress test, and the test results are shown in Table 5-11.
10 25 69 12% 6%
20 40 90 26% 8%
In Table 5-11, TPS represents the number of requests sent per second. When the number of logins exceeds 40 at the same time,
The system response time increases greatly. When the number of people reaches more than 200, the system response time is timed out, and the server CPU
The utilization rate reaches more than 90%, the database utilization rate also reaches 80%, and the pressure is maximized, so the system may fail
The page is now unresponsive. But generally speaking, the access frequency and response time of the system are relatively stable, and the system pressure
79
Machine Translated by Google
This chapter mainly introduces the function test and performance test of the electronic mall system. First, a brief introduction to the basic configuration of the test environment.
The construction of the test environment is the beginning of the test work. After the test environment is set up, the next step is to
Functional testing of several important modules of the e-mall and overall performance testing of the e-mall system. For electronic mall
According to the functional requirements of the module, corresponding test cases are designed for functional and performance testing. and pass the test against
According to the analysis of the results, the functions of the electronic mall system are basically realized, and its performance reaches the expected standard. Basically satisfy the user's
Functional and performance requirements when using the e-mall system for shopping.
80
Machine Translated by Google
Through the research and analysis of the current e-commerce and online shopping platforms, this paper finds that the current e-commerce
The product recommendation function and product safety are not satisfactory. The purpose of this article is to design a product with a high
The e-mall system with high recommendation accuracy and product safety enables consumers to use this e-mall system for shopping,
They are highly satisfied with product recommendation accuracy, product quality, and personal information. During the development of this system,
Consult a large number of relevant books and materials. When encountering technical difficulties, actively seek help from others, and make a summary.
The electronic mall system developed in this paper has the following characteristics in terms of function and project structure:
The front desk of the system has login and registration functions, shopping order functions, personal center management functions, and shopping cart management functions
etc., to meet the basic needs of contemporary consumers for shopping on online shopping platforms. At the same time, in the background management of the electronic mall
The system is divided into user management, product management, order management, logistics management and many other management modules, administrators can change
The electronic mall system adopts the framework structure of spring boot+vue+mybatis, and adopts the method of separating the front and back ends
R&D is carried out in this way, which changes the previous overall packaging and enables better maintenance.
The specific work summary and results of this paper are as follows:
(1) Explain and analyze the current domestic and foreign status quo and existing problems of online shopping platforms, and introduce the current
(2) For the smooth development of the e-mall system, the technical language, framework theory, data storage and service
The knowledge of server and other aspects is fully studied, which lays the foundation for system realization.
(3) This paper designs and implements an electronic mall system based on Spring Boot and Vue. First, for the current electronic
The background of the mall, the user needs and the existing problems of domestic and foreign electronic malls are investigated and studied. Using
In terms of user needs and technical needs, this paper conducts a comprehensive analysis.
Secondly, based on the specific needs of users, this paper designs the overall architecture of the electronic mall system. which contains
Finally, this paper codes and realizes the electronic mall system, and then conducts functional testing and performance testing of the system
Test, and show the functional effect through the system test effect diagram.
This e-mall is based on the Spring Boot and Vue framework, and is coded in JAVA language. Due to the lack of investigation and research on the framework, technical
language, and user needs, there are still imperfections in the electronic mall.
81
Machine Translated by Google
(1) In terms of
functions, due to personal reasons, the design of some functions does not conform to the user's operating habits, and the design of the database
table is not comprehensive enough. When the function is expanded, the current database table may not support the expanded content, and the table
structure needs to be modified. Therefore, efforts are still needed to improve the function design and database table design. (2) In terms of security,
consumers' information security, payment security, and commodity security are problems that have always existed in online shopping platforms.
Although this article encrypts user information and network request data, and traces the origin of commodities to protect users The security of
information, payment data, and product information, but emergency measures for malicious attacks and system security problems
And database data backup security is still insufficient, therefore, need to continue to improve security.
since this system adopts the B/S architecture, but because the kernels of each browser version are different, some functions of the system will
appear in the browser when some buttons are not visible, and a large number of different versions are required. browser running with
implementation, when coding the system, the front-end style adopts the common structural style of online shopping platforms, lacking
Innovation, the backend did not follow certain code specifications when writing code, and the code was cumbersome in function implementation, and
it was not streamlined. Therefore, it needs to be improved in terms of code writing standards, simplification, and page style.
This system is based on Spring Boot and Vue framework and developed in JAVA language. It does not follow the current popular distributed
architecture, and when some functional modules are expanded or maintained, it will have a greater impact on the operation of the entire system.
Therefore, in the future, it is necessary to divide each functional module in detail, adopt a distributed architecture, and use the Spring Boot framework to
develop each functional module, and finally use the Spring Cloud framework to integrate and deploy it. When maintaining some functional modules, it
will not affect the entire system. running. And do a more detailed research on user needs, so that this electronic mall system is more in line with the
82
Machine Translated by Google
thank you
thank you
The wind bleaches the sun, and the scenery flows westward. In a blink of an eye, three years have passed, and the postgraduate study at Xi'an Petroleum University
Career will also come to an end. Looking back, the laughter and laughter on the campus are still in my ears, and the enthusiastic help of the brothers and sisters is still in my ears.
The old days are vivid. The three years of study and life in the postgraduate stage have been the period of my fastest growth so far. all the time,
I am a passive learner myself, but I have completely changed in the past three years. The pressure of society and the pressure of life have prompted
I took the initiative to choose the direction of study. In the past, I only paid attention to books but did not pay attention to practice.
society. And all of this is inseparable from my mentor, my friends and my parents.
First of all, I would like to thank my mentor, Teacher Xu Yingzhuo. The correct direction of development determines how far a person can go.
During the three years of master's degree, her guided teaching approach helped me to define my own development direction. Throwing away confusion is success
in half. Not only that, during social practice, she encouraged me to go out for internships, familiarize myself with the work process as soon as possible, and increase my skills.
able. During the research process, her rigorous work style and superb academic attainments have already been reflected in the words and sentences of my thesis.
Sentences are being revised repeatedly. So I was able to keep improving on the right path. Here, I would like to extend my best wishes to Professor Xu Yingzhuo
Secondly, I would also like to thank my internship manager Liu Shujie, my roommate Yang Yue and Sun Xiangrui. People often say that just
Stepping into the society, a good leader will benefit you for life. During my internship, my internship manager Liu Shu
Masterpiece is my social enlightenment person, technical difficulties and design patterns, he taught me everything. Job opportunities, he bothered.
While giving me great help, it also made me quickly get rid of the title of "novice" in technology. Very lucky, I came across a
Good leader. In the process of studying, looking for a job, writing a thesis, etc., my roommates selflessly shared their experiences,
So that I have rules to follow when I face the same dilemma. Thank you, I hope that in the future life, no matter how far apart, each other
I will remember that in those three years and even in the future, there were two brothers who advanced and retreated with you.
And then thanks to the two most important people in my life, my parents, and the most special people in my life, me
girlfriend Li Chenyang. In the darkest moments of my life, they lighted the way for me. When I am lazy and most slack
At this moment, they encouraged me and reminded me to keep my original intention and move on. Without their dedication without complaint or regret, there would be no
There is my struggle to develop. They made up for my lack of life experience, enlightenment knowledge and economics, and gave me endless opportunities.
Little care. I am really lucky to have you in this life. Thousands of words can't express the feelings in my eyes. mountains, rivers and seas,
Finally, I would like to thank all reviewers and scholars for providing professional guidance to students.
83
Machine Translated by Google
references
[1] Fan Zezhou. Research on Product Recommendation System of A Company’s Online Shopping Guide [D]. Beijing
Jiaotong University, 2019. [2] Fan Mingyu. Research and Implementation of Accurate Recommendation Based on Collaborative Filtering
Algorithm [D]. Xidian University, 2019 [3] Hu Feng. Design and implementation of B2C electronic mall based on JAVA [D]. Xidian University,
2017. [4] Wang Yu, Liu Dongsu. Collaborative filtering recommendation algorithm based on joint clustering and user feature extraction [J ]. Journal of
[5] Chen Jili. Research and Implementation of Product Recommendation System Based on Neural Network [D]. University of Electronic Science and
Technology of China, 2019. [6] Deng Xiao. Design and Implementation of Campus Light Blog System Based on Spring Boot [D]. Huazhong Science and
Technology University, 2018. [7] Liu Bowen. Simple Vue.js[J]. People's Posts and Telecommunications Press, 2019.
[8] Mudunuri, Srinivas. Mybatis in Practice: a step by step approach for learning mybatis
[9] Eckel, Chen Haopeng. JAVA Programming Thoughts (Fourth Edition) [J]. Mechanical Engineering Press, 2007: 105-188.
[10] Bruce Eckel, Thinking in java, Third Edition [M]. Prentice Hall PTR, 2005:145–234. [11] Li Tianqing. Design and Implementation of
Electronic Mall Project Based on SSM Framework [D]. Shandong University, 2019.
[12] Baron, Wang Xiaodong. High performance mysql (fourth edition) [J]. Electronic Industry Press, 2010:50-200.
[13] Josiah L. Carlson. Redis combat [J]. People's Posts and Telecommunications Press,
2015. [14] Liu Yang. Design and implementation of electronic mall system based on JSP [J]. Computer Knowledge and Technology, 2016,12(29) ):
270-273.
[15] Xiao Zhuoyu. Design and Implementation of Electronic Mall Based on Design Patterns [J]. Computer Knowledge and Technology, 2016,12(32):
285-289.
[16] Li Xiaoling. Design and Implementation of E-Mall System [D]. University of Electronic Science and Technology of
China, 2013. [17] Xu Shichuan. Design and Implementation of Order Module and Second Kill Module in E-Mall System [D]. Nanjing University, 2018. [ 18]
Liu Jinsheng. Design and Implementation of Campus Electronic Mall Based on SSH [D]. Inner Mongolia University, 2017. [19] Wang Xikun. Design and
Implementation of Mobile Mall Based on Distributed Internet Architecture [D]. Beijing University of Technology, 2017. [ 20] Ma Xiaoqiang. Design and
implementation of cross-border shopping mall system based on SSH framework [D]. Xidian University, 2016. [21] Chi Yuanyan. Design and implementation
of J2EE-based shopping website shopping module [D]. Electronic Science and Technology University, 2015. [22] Nian Siliang. Design and Implementation of
Electronic Mall System of Guangdong Mobile Company [D]. Shandong University, 2015. [23] Feng Xizhong. Design and Implementation of Electronic Mall
Shopping System [D]. University of Electronic Science and Technology of China ,2013. [24] Luan Peiyuan. Design and implementation of electronic shopping
mall based on recommendation subsystem [D]. University of Electronic Science and Technology of China, 2012. [25] Wang Xiaohao. Modeling and simulation
analysis of product recommendation based on reputation [J]. Computer Knowledge and Technology, 2019,15(13):294-296.
[26] Xu Hongjie. Product recommendation algorithm based on user characteristics and reinforcement learning [D]. South China University of Technology,
2019. [27] Zhang Yu. Research and implementation of recommendation system based on user ratings and comments [D]. South China University of
Technology, 2019. [28] Shen Jianping. Design and Implementation of Product Recommendation System Based on Flow Computing [D]. Shanghai Jiaotong University, 2018.
84
Machine Translated by Google
references
[29] Zhang Ling. Configure web server with Tomcat under Linux system [J]. Information and Computer: Theoretical Edition, 2010 (4): 93-95. [30] Hu
Xiaohua. The relationship between online consumer shopping behavior and traditional shopper behavior Comparison[J]. Modern Economic Information
Information, 2013(5):254-254.
[31] Zhou Yanling. Exploration and research on developing WEB applications with Spring MVC framework [J]. Science and Technology
Square, 2016(6):25-28.
[32] Shao Mei. How Strong is the Purchasing Ability of Chinese Consumers[J]. Shanghai-Hong Kong Economics,
2016(8):44-47. [33] Yingyan, Cao Yan, Mou Xiangwei. Hybrid Synergy Based on Project Score Prediction Filter recommendation[J].Modern library and information technology
Surgery, 2015(06):27-32.
[34] Wang Yong, Deng Jiangzhou, Deng Yongheng, Zhang Pu. Collaborative filtering recommendation algorithm based on item probability distribution [J]. Modern Library and Information
Li Daoguo, Li Lianjie, Shen Enping. Collaborative filtering recommendation algorithm based on user rating time improvement [J]. Modern Book Information
[36] Zhang Yu, Wang Wenjian, Zhao Shengnan. SVM Collaborative Filtering Top-N Recommendation Algorithm Based on Positive and Negative Feedback [J]. Small Microcomputer
[38] Anish Jindal, Kuljeet Kaur, Neeraj Kumar. Decision Tree and SVM-Based Data Analytics
[39] Ren L, Wang W. An SVM-based collaborative filtering approach for Top-N web services
7739X1 7300389.
[40] Wu Kang. Design and Implementation of a New Distributed Network Store Based on J2EE [D]. University of Electronic Science and Technology of China, 2010.
[41] Lai, SLLinda, M.Wai.The Emergence of China in the Internet Market[J].IT Professional
Hao He. Design and Implementation of Electronic Mall Based on MVC Mode [D]. Jilin University, 2010.
85
Machine Translated by Google
[1] Yingzhuo Xu, Qingyang Geng. Research on network load balancing method based
on simulated annealing algorithm and genetic algorithm [J]. IOP Conference Series:
Journal of Physics: Conference Series, 2019.
86
Machine Translated by Google
Fate :
Admissions 029-88382328
88382327