The Design and Application of Knowledge Learning System of
Criminal Procedure Law Based on NODE.JS
Miao Zhong
*a
and Qian Xu
b
Sichuan Judicial and Police Officers Peofessional College, Deyang, Sichuan 618000, China
Keywords: Node.Js, Express, Development, Study of Criminal Procedure Law.
Abstract: This paper has carried out related research on the development of knowledge learning application system of
criminal procedure law. The server side of the system breaks the tradition, chooses Node.js for
development, and combines the express framework engine and related components to use JavaScript to
realize the functions of file transfer and URL routing of the system. Then the front-end uses
HTML5+CSS3+JavaScript language and Bootstrap framework to develop a responsive dynamic page that
displays data in the browser. The system developed based on Node.js has the advantages of low R&D cost,
easy expansion and high reusability. On the basis of teaching the basic concepts and theories of criminal
procedure in the form of video media, the function of the knowledge learning system of criminal procedure
law also focuses on the various procedures of criminal procedure. In the form of video cases, the knowledge
system of criminal procedure law is displayed intuitively for students, which lays a solid foundation for
cultivating high-quality legal professionals.
a
https://orcid.org/0000-0003-2270-0166
b
https://orcid.org/0000-0003-4064-9632
1 INTRODUCTION
The criminal procedure is one of the key compulsory
courses in the law discipline of colleges and
universities in China. And colleges and universities
are the important positions of law education in our
country. The educators of law disciplines should
undertake the important mission of promoting the
legal system construction in our country. Therefore,
we should constantly push forward the process of
optimizing and reforming the course of criminal
procedure law. However, there are many
shortcomings in the current course of criminal
procedure law education. First of all, most teachers'
teaching is based on unchangeable textbooks, which
is easy to be divorced from reality, and case teaching
is insufficient. Besides, teachers are the main body
in teaching, and students passively accept it, so it is
difficult to learn according to students' own
situation. The teaching content of criminal procedure
is more complicated than other subjects, and it is
difficult for a single book teaching to present all the
key contents. (Liu, 2022)
According to the above analysis, the author of
this paper believes that the teaching form of criminal
procedure law should be reformed and optimized
digitally with the help of information technology in
the current Internet era. So, this paper studies the
knowledge learning system of criminal procedure
law based on Node.js. This systematic course takes
criminal litigation activities as the research object,
expounds the basic principles, basic systems, basic
procedures and legal basis of criminal litigation,
probes into the historical development and practical
exploration of China's criminal procedure law,
especially systematically combs the Marxist view of
criminal procedure law. The theoretical teaching of
this course includes six teaching modules: basic
theory, litigation system, pretrial procedure, trial
procedure, execution procedure and special
procedure. Through the study of various courses in
this system, students can comprehensively and
systematically grasp the basic concepts, basic
theories and specific contents of criminal
proceedings, establish the concept of procedural rule
of law, and improve their awareness of human rights
protection. They are not only familiar with the legal
Zhong, M. and Xu, Q.
The Design and Application of Knowledge Learning System of Criminal Procedure Law Based on NODE.JS.
DOI: 10.5220/0011898500003613
In Proceedings of the 2nd International Conference on New Media Development and Modernized Education (NMDME 2022), pages 73-77
ISBN: 978-989-758-630-9
Copyright
c
2023 by SCITEPRESS Science and Technology Publications, Lda. Under CC license (CC BY-NC-ND 4.0)
73
provisions of criminal proceedings, but also have the
ability to analyze and solve criminal proceedings,
and can master the basic skills of public security
organs in filing, investigating and using evidence to
try criminal cases, so as to meet the needs of public
security practice in the future.
2 KEY TECHNOLOGIES
2.1 Node.Js
The Node.js is an open source and high performance
runtime environment package based on JavaScript.
Besides enabling JavaScript code to be implemented
on the browser client, Node.js can also run on the
back-end server, and even realize functions such as
communication and file processing. Because of the
emergence of Node.js, JavaScript has become the
full-stack development language of applications
from front-end development scripts, and compared
with the traditional development methods, the built
applications of Node.js respond faster and are easier
to expand. The Node.js can not only request multiple
data sources at the same time, but also customize
different servers for the same data source, which has
high flexibility. In this paper, the back-end design of
the system is carried out by using the characteristics
of single thread, asynchronous non-blocking I/O and
event-driven of Node.js. (Wang, 2015)
2.2 Express Framework
The Expresss is a web application software
development tool framework developed based on
Node.js described above. With the advantage of
Express Node.js, it is also favored by developers,
because it has the advantages of rapid development,
flexible expansion and quick use. The powerful
functions of express include stable routing, dynamic
view helper and redirection helper. Among them, the
Node.js package manager, also known as NPM, can
keep express in the dependency list and develop the
basic template of Express by inputting only one line
of commands without requiring developers to input
too many codes. After the development of the basic
template, you can quickly add other functions to
build a complete application composed of Node.js
server through a quick expansion mechanism. The
main feature of express is that it simplifies the
processing of HTTP request parameters and has a
middleware mechanism to effectively control these
HTTP request parameters. It also maintains the
function of dynamically rendering front-end HTML
and supporting template engine that Node.js has.
(Zhang, 2018)
2.3 NoSQL Database Mongodb
NoSQL database refers to a non-relational database,
and there is no relationship between the stored data,
which will be more conducive to expansion and
more flexible. Mongodb is a typical nosql database
with high concurrency, which can be used to meet
the writing requirements of high-traffic data.
Besides, mongodb is a flexible and independent
distributed database, which stores data in different
hosts. Mongodb is also a document database. In a
common database, the basic unit of our operation is
JSON (JavaScript Object Notation), while the basic
unit of mongodb's operation is BSON strengthened
on the basis of JSON, which uses document to
organize and store data. (Zhu, 2019)
There are many similarities between Mongodb
and traditional relational databases such as mysql,
especially in data organization. The difference is that
each database on mongodb server stores collection,
while mysql is table. The record form of collection
is displayed as document, and each document is
separated and independent. Because it is a non-
relational database, the coding step of declaring the
field type is omitted, and the same field is not
required to be the same type at the same time. The
differences between Mongodb and mysql are shown
in Table 1.
Table 1 Differences between mongodb and MySQL
MongoDB MySQL
Database Database
Collection Table
Document Row
Field column
2.4 Development Environment
The knowledge learning system of criminal
procedure law is developed by separating the front
and back ends. The system chooses Linux CentOS7
version. The front-end design mainly uses
HTML5+CSS3+JavaScript language, and uses
Bootstrap framework to develop a responsive
dynamic page that displays data in the browser. In
the back-end server development of the application
system, JavaScript language is used for
development, and Node.js is used as the
environment package. And the scripting language
NMDME 2022 - The International Conference on New Media Development and Modernized Education
74
writing tool of Node.js uses Visual Studio
Code2019. Nginx load balancer can be used to
ensure the rapid response of the server. The server
adopts the relational database MySQL version
8.0.28. On the choice of the server, the mixed
database of mysql and mongodb is adopted. Mysql
can store relational data, such as the relationship
data between students and teachers, and the user
information and permission level that the system
needs to set. (Wang, 2018) The non-relational
database mongodb is used to store some more
substantial large files, pictures, videos and other
types of resources. When building a database server,
after the driver package of each database is installed,
it is necessary to use the normalization of tables as
much as possible to achieve the purpose of reducing
data redundancy and various abnormal situations of
data operation. Of course, there will be cases of
choosing the anti-normal table, such as some cases
where the query efficiency needs to be specially
optimized. In this system, the anti-normal table is
used to realize the structured data operation function
between teachers and students. However, when
deploying mongodb database server, when setting
keywords, it is necessary to avoid using _id keyword
to accurately query the required content in order to
make the query result error due to the same
attributes of name, title and day. Through the
introduction of the above key technologies, we have
determined the overall environment for the
development of the knowledge learning system of
criminal procedure law, the configuration of related
software and tools, and the technical feasibility of
the overall project.
3 PROCESSREQUIREMENT
ANALYSIS
3.1 Functional Requirements
Considering the different needs of different user
groups, the knowledge learning system of criminal
procedure law develops two types of user ports:
teacher's port and user's port. Students' clients are
required to record students' learning situation at all
stages, and they also need to have the function of
academic communication and interaction with
teachers. The most important thing is that they can
supplement their knowledge of criminal procedure
law through online video courses. The characteristic
function of the system is to simulate the trial
function, and different student users can participate
in online interaction at the same time to deepen their
knowledge and understanding of criminal
proceedings. (Chang, 2021)
The main function of teachers' users is to select
resources or make teaching resources, and submit
teaching documents in the form of external links or
uploading documents. Secondly, according to the
completion of homework and the types of academic
problems submitted by students, teachers give
corresponding guidance and suggestions, so check
the effect of online teaching and the overall learning
situation. In setting the teaching content of the
course of Criminal Procedure Law, teachers should
highlight the foundation that is easy for students to
accept, the practicality that is conducive to students'
follow-up application, and the frontier of future
discipline development. It is necessary to
systematically ensure that during online classroom
teaching by teachers, students can grasp the
principles, systems and procedures of criminal
procedure in time, and at the same time, they should
keep up with the pace of the times and accurately
grasp the latest situation of procedural law. Teachers
can update the course content at any time, so that
case teaching can keep up with current events and
maximize practicality.
3.2 Overall Design
This system is designed based on B/S architecture,
and adopts MVC mode, which divides the system
into control layer, template layer and view layer for
separate design. The system consists of three layers:
display layer, business logic layer and data access
layer. The display layer is the interface between
teachers and students, users and application systems.
It can achieve man-machine interaction between
users and computers, show teaching courses, and
display pages of various functional operations. The
business logic layer is responsible for processing the
data of teachers and students and the logic operation
of business functions, including course resource
management, user information management and
statistical analysis of students' learning situation.
The data access layer is used to realize the related
functions of querying, adding, modifying and
deleting data information of the system.
The model layer uses Modelproxy, the control
layer uses Express, and the view layer depends on
Handlebars. After the overall preliminary structure is
established, you can start to configure package.json
to unify the data language, and then execute npm
install, and the system will automatically install the
corresponding dependency packages. When all the
The Design and Application of Knowledge Learning System of Criminal Procedure Law Based on NODE.JS
75
projects are configured, execute the command npm
start to start the back-end service. The routing
function of the system is controlled by router.js The
middleware of HTTP request parameters can
provide interfaces to receive and forward all kinds of
user requests, so as to realize the function of
business processing. After the business logic module
completes the operation task, the router module
packages HTTP response packets and forwards them
to the browser client to realize the request execution
process. The server function of the system is realized
based on Node.js and mysql in intranet. The key
code of Node.js connecting to MySQL's database
server is shown in Figure 1.
Figure 1: Code of Node.js connecting mysql server
4 FUNCTION REALIZATION
4.1 Teacher Side
After the teacher logs in to the system through the
employee number and the corresponding password,
he can see that the main functional modules of the
teacher are resource uploading, homework approval,
learning situation viewing and personal information.
The resources of students' learning courses,
extracurricular exploration and other functional
modules are designed and uploaded by teachers.
According to the teaching plan and syllabus,
teachers design the course content. Teachers can
quote high-quality online courses by quoting
external links, or they can make the same recording
by themselves. The teachers need to classify and
label the courses and manage the list of courses.
Manage the teacher's course list, click the button to
trigger the system's front-end method of
loadSubjectData to load the data of each resource.
During the loading process, the system accesses the
back-end interface of the system's back-end server
by way of post request through ajax to interact.
When the data information of the management page
is loaded, the function of teachers and users to add
courses is realized by the system post requesting
access and calling the insertSubject method. The
code of managing video courses is shown in Figure
2. The courses recorded and produced by teachers
themselves need to be entered systematically by
uploading files. The function of uploading files first
requires the foreground to call loadSubjectData to
load the established course data, and then calls
loadCoursewareData method to request ajax to
perform asynchronous interaction and access the
interface to establish the data connection between
the course data and video files. Then, through the
submitUpload method, send a request instruction to
the background uploadCourseware interface to
complete the upload of video file resources.
Figure 2: Management course function code
implementation
4.2 Student Side
After logging in to the system through the account,
students can see four modules: study course,
extracurricular exploration, homework submission
and personal information. The learning course
module is the main course designed according to the
syllabus. Theoretical teaching includes six teaching
modules: basic theory, litigation system, pre-trial
procedure, trial procedure, execution procedure and
special procedure. When completing the content
study in each class, the system will automatically
jump to the homework submission page, and
students can check the homework notices issued in
each class to study the homework after class. The
extra-curricular exploration is to supplement extra-
curricular knowledge to the teaching of criminal
procedure law. The initial user information is
designed and entered when the school uniformly
registers the account. The user can make a second
modification. The core code of the creation
statement taking the user information table as an
example is shown in Figure 3. (Li, 2022)
NMDME 2022 - The International Conference on New Media Development and Modernized Education
76
Figure 3: User information table creation code
The main body of the teaching module of this
system is the video playing teaching module. This
function module is implemented in such a way that
users can watch videos stored and served online. The
developer uploads the video to the server in the way
of streaming, and the front-end player renders and
watches it. This system refers to the play online of
web player SDK technology provided by Aliplayer,
and only needs to introduce this part of SDK
configuration in the front-end code header file to
realize online viewing of teaching videos. When
students learn the relevant knowledge of trial of theft
cases in online learning videos, such as the concept
of theft cases, the constitution of crimes and the
corresponding criminal liability laws, and watch the
trial videos uploaded by teachers, they can click to
enter the mock trial in the extracurricular exploration
function module. When a teacher initiates a trial,
students can choose the corresponding roles of
investigators, criminal suspects, lawyers and
paralegals, and learn and be familiar with the
process of the first trial of a public prosecution case,
that is, court hearing, court investigation, court
debate, defendant's final statement, appraisal and
sentencing. During this period, students can have a
more intuitive feeling about the process of criminal
proceedings, and can further grasp the corresponding
rights and obligations of all parties involved.
5 CONCLUSIONS
In order to show the knowledge of criminal
procedure in various forms, realize the efficient use
of rich online resources and improve the interest of
law students in criminal procedure knowledge, this
paper designs a knowledge learning system of
criminal procedure law based on NODE. JS, which
provides an internet-based knowledge learning
platform. The back-end system of the system adopts
Node.js combined with Express framework to
realize the function of JSON data interaction. At
last, through the system test, the system can run
normally, providing a new back-end solution for the
construction of online learning applications. Due to
my limited research time, environment and ability,
there are many shortcomings in this system, which
need the help of relevant personnel to improve it.
For example, the number of servers in the system is
limited, and when as many as 100 users jointly issue
instructions, the concurrency of the system is
insufficient. At the same time, this paper only
studies the PC system, but not other devices, so it is
difficult to provide more convenient and fast
services. Subsequent improvements can be made,
mobile services with a wider audience can be
designed, and data interoperability of port-like
platforms can be realized to make the services of the
platform more perfect.
REFERENCES
Chang Jiekun. (2021) Research on the Application of
Blended Teaching Mode in Law. Journal of
Heilongjiang Administrative Cadre College of Politics
and Law. 06
Li Meng. (2022) Reflections on the Teaching Methods of
Criminal Procedure Law. Legality Vision. 03
Liu Dongmei, Zhang Congjun, Wei Xin. (2022) The
Teaching Reform and Practice Exploration of
Criminal Procedure Law Course. Heilongjiang
Education (Higher Education Research & Appraisal).
03
Wang Jinlong, Song bin, Ding Rui. (2015) The Node.js: A
New Web Application Construction Technology.
Modern electronic technology. 03
Wang Qian, Xu Chengpeng, Hui Xiaoqiang. The Design
and Implementation of Learning Management System
Based on Node.js. Electronic Design Engineering. 02.
Zhang Shudong. (2018) The research and implementation
of college teaching assistant system based on HTML5
and Node.js. Shandong Normal University. 06.
Zhu Xiaoyang, Liu Yuanru, Fan Zhongyan. (2019) The
Design and Implementation of Back-end System of
Learning Platform Based on Node.js. Computer
Knowledge and Technology. 05
The Design and Application of Knowledge Learning System of Criminal Procedure Law Based on NODE.JS
77