Django+mysql new crown epidemic visual analysis system-computer graduation project source code 08504

      Summary

The article first conducts a background analysis of the project requirements for visual analysis of the new coronavirus epidemic, then introduces the overall design idea of ​​the project, and then specifically explains the design of the epidemic database, query of epidemic data, display of epidemic data, and analyzes the core code. This article uses MySQL database to store the epidemic data crawled from the official website, uses Django technology to query the epidemic data in the MySQL database, realizes dynamic interaction between web pages and databases, uses Python technology to develop a visual analysis system for the new crown epidemic, and produces an epidemic line chart, which is used to To display the recent changing trends of the epidemic, an epidemic column chart was produced to show the comparison of the epidemic situation in various countries, allowing the public to obtain key epidemic information, understand the epidemic situation, and judge the epidemic trend more intuitively and clearly, and provide intuitive information for epidemic prevention and control. , image data support.

Keywords: COVID-19 visual analysis system; Django technology; Mysql database; 

Abstract

This paper first analyzes the background of the project requirements for the visual analysis of the COVID-19, then introduces the overall design idea of the project, and then specifically expounds the design of the epidemic database, the query of epidemic data, the display of epidemic data, and analyzes the core code. In this paper, MySQL database is used to store the epidemic data crawled from the official website, Django technology is used to query the epidemic data in MySQL database, to realize the dynamic interaction between the web page and the database, Python technology is used to carry out the visual analysis system of COVID-19 epidemic, and the epidemic line chart is made to show the recent trend of the epidemic, and the epidemic column chart is made to show the comparison of the epidemic situation in various countries, Let the public more intuitively and clearly obtain key epidemic information, understand the epidemic situation, judge the epidemic trend, and provide intuitive and visual data support for epidemic prevention and control.

Key words: COVID-19 visualization analysis system; Django technology; MySQL database;

Table of contents

Graduation Project

Python new crown epidemic visual analysis system

Student ID: xxxxxxxxxx

Summary

Abstract

1 Introduction

1.1 Research background

1.2 Research significance

1.3 Research content

2 Introduction to development technology

2.1 Development technical description:

2.2 Introduction to Python

2.3 Django framework

2.4 Mysql database

2.5 Working principle of B/S system:

3 System analysis

3.1 Feasibility analysis

3.1.1 Technical feasibility

3.1.2 Economic feasibility

3.1.3 Operational feasibility

3.2 System performance analysis

3.3 System function analysis

3.4 System process analysis

3.4.1 Login process

3.4.2 Registration process

3.4.3 Add information process

3.4.4 Deletion of information process

4 System design

4.1 System outline design

4.2 System structure design

4.3 System sequence diagram design

4.3.1 Login module sequence diagram

4.3.2 Add information module sequence diagram

4.4 Database design

4.4.1 Database ER diagram design

1. The user journey entity diagram is shown in Figure 4-5:

2. The entity diagram of epidemic data is shown in Figure 4-6:

3. The entity diagram of epidemic public opinion management is shown in Figure 4-7:

4.4.2 Database table design

5 system detailed design

5.1 Administrator function module

5.2 User function module

6 system test

6.1 Test definition

6.2 Test purpose

6.3 Test plan

(1) Module test

(2) Integration testing:

(3) Acceptance test:

1. Login test

(1) First, we call the browser and enter the login interface of the system.

6.4 System analysis

7 Conclusion

references

Thank you

1  Introduction

1.1 Research background

In 2020, the new coronavirus is raging. Since the outbreak of the epidemic, the whole country has been united and united to fight the epidemic. While the whole nation is fighting the epidemic, the public needs a channel to view current epidemic data so as to fully understand the epidemic situation across the country and even around the world. This article comprehensively uses Django technology and MySQL database technology to create epidemic trend charts and epidemic comparison charts, and visually presents epidemic data in a visual way, allowing the public to obtain key epidemic information more intuitively and clearly.

1.2 Research significance

At the end of 2019, the novel coronavirus pneumonia (COVID-19) epidemic broke out in Wuhan, Hubei Province, and quickly spread throughout China and other countries in a short period of time, causing serious impact on all walks of life, including catering and entertainment.

It has been more than a month since the outbreak of the epidemic. More and more people have devoted themselves to this battle. They are fighting on the first line of defense against the new coronavirus and even sacrificing their lives for it.

In this severe period, the professor team of the Business Big Data Experiment Center focuses on data analysis. Based on big data analysis, it displays the development of the epidemic in real time and dynamically in a visual way, and predicts the epidemic to provide support for scientific decision-making.

1.3 Research content

The development and design of the COVID-19 visual analysis system is based on the actual situation of the user, a detailed analysis of the system's needs, and then the overall design of the system. Finally, through testing, the system design is more complete and can realize all aspects of the system. Before starting to write the paper, I personally went to the library to borrow relevant books, Mysql database books and other programming books. Then, for the new coronavirus epidemic visual analysis system I developed, I searched the Internet for many systems that others had made, and referred to their design results. To carry out a more detailed system design of your own system, list all the functional results in the system one by one, then conduct demand analysis, and finally code all functional modules, and finally complete the overall test of the system to achieve the normal performance of the system run.

The paper written this time contains 6 parts, the specific contents are as follows:

Part One Introduction: The article mainly elaborates on the necessity of developing this system from the background of the subject and the current research status.

Part 2 Related Technologies: Various technologies used in system development are roughly introduced.

Part 3 System Analysis: Conduct a detailed analysis of the feasibility of the system and all functional requirements to see whether the system is possible to develop.

The fourth part, system design: functional module design and database design, are represented by special tables and pictures.

Part 5: System Implementation: Interface display of the main functional modules of the system.

Part Six System Testing: Test whether each function of the system can operate normally and meet people's needs.

2 Introduction to development technology

2.1 Development technical description:

The front-end part of this system is developed based on the MVVM model, using the B/S mode, and the back-end part is developed based on the python Django framework.

Front-end part: The front-end framework uses the popular progressive JavaScript framework Vue.js. Use Vue-Router and Vuex to realize dynamic routing and global state management, Ajax to realize front-end and back-end communication, Element UI component library to quickly prototype the page, and the project front-end to achieve responsiveness through grid layout, which can be adapted to PC, tablet, mobile phone, etc. Perfect layout display for different screen sizes.

Back-end part: Use Django as the development framework and integrate Redis and other related technologies.

2.2 Introduction to Python

Python is a high-level scripting language that combines interpreted, compiled, interactive, and object-oriented programming. Python's design, compared to other languages ​​that often use English keywords and some punctuation marks from other languages, has a more distinctive grammatical structure than other languages ​​and is highly readable.

Interpreted languages: Similar to Python and Perl languages, this means that there is no compilation link in the development process.

Interactive languages: code can be executed directly after a Python prompt >>>.

Object-oriented language: Python supports object-oriented style or programming technique in which code is encapsulated in objects.

2.3 Django framework

The Django project is a Python custom framework that originated from an online news Web site and was released as open source in 2005. The core components of the Django framework are:

  1. Object-relational mapping     for creating models
  2.     Perfect management interface designed for end users
  3.     Top-notch URL design
  4.     Designer-friendly template language
  5.     Caching system.

Django (pronounced: [`dʒæŋɡəʊ]) is an open source web development framework (open source web framework) written in python language. It encourages rapid development and follows MVC design. Django abides by BSD copyright, was first released in July 2005, and released the first official version 1.0 in September 2008.

Django is named after the Belgian jazz musician Django Reinhardt . He is a gypsy who mainly plays guitar and also plays violin.

Due to the rapid development of Django in recent years, its applications have become more and more widespread. It was selected as the 2013 SD Times 100 by the famous IT development magazine SD Times, ranking 6th in the "API, Library and Framework" category, and is considered the leader in this field. By.

2.4 Mysql database

After many updates, Mysql has become very rich and complete in terms of functionality. It has undergone relatively large updates from version 4 to version 5, and has achieved good practical application results in actual commercial use. The latest version of Mysql supports information compression and encryption, which can better meet the needs for information security. At the same time, after multiple updates of the system, the mirroring function of the database itself has also been greatly enhanced, the smoothness of operation and ease of use have been greatly improved, and the use and creation of drivers have become more efficient and faster. The biggest change is the optimization of the display of spatial information, which makes it easier to label and calculate coordinates on application maps. The powerful backup function also ensures that users will feel more at ease during use. At the same time, the supported Office features also support users’ self-installation and use. The display form of information has also been greatly updated. Two very commonly used display areas have been added. One is the information area, where tables and texts have been classified, and the interface display is more refreshing and specific. The second is the information control of the instrument, which can display information in the instrument information area and compare multiple pieces of information at the same time, which brings great convenience to users' actual use [8][9].

In the actual implementation process of the COVID-19 epidemic visual analysis system designed in this article, the main reason for finally choosing the Mysql database is that there will be a large number of database operations in the application and development process of the enterprise's application system, and the data Safety requirements are also very high. Based on these factors, Mysql, which has a relatively high security factor, was finally chosen to store the background data of the Cube News website.

The overall structure diagram of the database management system is shown in the figure below.

Figure 2-1 Database structure

 2.5 Working principle of B/S system:

The B/S architecture adopts the working mode of browser request and server response.

Users can access text, data, pictures, animations, video on demand, sounds and other information generated by Web servers on the Internet through a browser;

Each Web server can be connected to the database server in various ways, and a large amount of data is actually stored in the database server;

Download the program from the Web server to the local for execution. If you encounter instructions related to the database during the download process, the Web server will hand it over to the database server for interpretation and execution, and return it to the Web server, and the Web server will return it to the user. In this structure, many networks are connected together to form a huge network, that is, the global network. Each enterprise can build its own Internet based on this structure.

In the B/S mode, the user requests access through the browser to many servers distributed on the network. The browser's request is processed by the server, and the processing results and corresponding information are returned to the browser. Other data All processing and requests are completed by the Web Server. Through this framework structure and the browser embedded inside the operating system, this structure has become the mainstream structure pattern of today's software applications.

3 System analysis

3.1 Feasibility analysis

At the beginning of system development, system feasibility analysis must be carried out. The purpose of this is to solve the biggest problem with the minimum cost. Once the program development meets the needs of users, the benefits will be many. Next, we will consider whether this system is worth developing from technical, operational and economic aspects.

3.1.1 Technical feasibility

This new coronavirus epidemic visual analysis system is developed and designed using Django technology, Python programming language and Mysql database. As a computer major student, I have been exposed to a lot of knowledge about programming during school, including various programming software. I have an understanding of them. The degree is also relatively systematic, so I still have a certain degree of confidence in technology development.

3.1.2 Economic feasibility

When I designed the system, I mainly started with cost savings, and then designed the specific system. During the system design process, all the tools and technical support used were free, so there was no need to incur any cost. The system can be designed. All resources used are free and can be downloaded and used as long as there is an Internet connection. There is no need to pay corresponding fees, so the project is completely feasible in economic terms.

3.1.3 Operational feasibility

I am a student myself and have insufficient experience in program development. The interface design should not be too complicated. It should be simple and beautiful, easy to operate, and should not make users feel unsmooth. Once the user enters the operation interface, there will be corresponding prompts on the interface. Following the operation prompts, the corresponding functional operation module can be found, which can be used by the user without training.

From the feasibility analysis of the above parts, it can be concluded that the new coronavirus epidemic visual analysis system developed this time has no major problems in development and is worthy of development.

3.2 System performance analysis

(1) System response efficiency: The page response time should be within 3 seconds, no longer than 4 seconds, and support at least 10,000 people online at the same time on all systems.

(2) Simple and clear interface: The system interface is required to be simple and clear, easy to operate, and consistent with user operating habits.

(3) High storage: Because there is a lot of information that needs to be stored in the COVID-19 visual analysis system, there are great requirements for the storage capacity of the system. It needs the support of a powerful database to ensure that all information is safe and stable. for storage.

(4) Ease of learning: The system must be easy to operate and easy to use. There are not many complicated operations and only simple learning is required to operate the system.

(5) Stability requirements: The developed COVID-19 visual analysis system requires stable operation and no unclear interface or blurred fonts during operation.

(6) Stability: The developed visual analysis system for the COVID-19 epidemic is required to operate stably, and there should be no unclear interface, blurred fonts, etc. during operation.

3.3 System function analysis

This new coronavirus epidemic visual analysis system mainly includes two major functional modules, namely the administrator and employee user modules.

(1) Administrator module: The core user in the system is the system administrator. After the administrator logs in, he manages the backend system through the administrator menu. The main functions are: homepage, site management (carousel, bulletin board), user management (administrators, system users), content management (epidemic public opinion, public opinion classification), and more management (daily check-in, risk areas, epidemic data , daily new additions, user schedules, variant epidemics) and other functions. The administrator use case diagram is shown in Figure 3-1.

Figure 3-1 Administrator use case diagram

(2) System users: Home page, personal center, more management (daily check-in, epidemic data, user itinerary) and other functions. A user example is shown in Figure 3-2.

Figure 3-2 User use case diagram

3.4 System process analysis

3. 4.1 Login process

The login module mainly meets the permission login of administrators and users. The user login flow chart is shown in Figure 3-4.

Figure 3-4 Login flow chart

3.4.2 Registration process

Users who do not have an account can enter the registration interface to register. The user registration flow chart is shown in Figure 3-5.

Figure 3-5 Registration flow chart

3. 4.3 Add information process

When the user adds information, the information number is automatically generated. The system will verify the added information. If the verification passes, it will be added to the database. If the information is added successfully, the addition will fail. The process of adding information is shown in Figure 3-6.

Figure 3-6 Add information flow chart

3. 4.4 Deletion of information process

The user can select the information to be deleted and perform the information deletion operation. When deleting the information, the system prompts whether you are sure to delete the information. If yes, the information is deleted successfully and the system database deletes the information. The flow chart of deleting information is shown in Figure 3-7.

Figure 3-7 Deletion information flow chart

4 system design

4.1 System outline design

This new coronavirus epidemic visual analysis system chooses two modes: B/S structure (Browser/Server, browser/server structure) and Web service-based model. It is suitable for operation on the Internet. As long as the user can connect to the Internet, the system can be operated at any time and anywhere. The system working principle diagram is shown in Figure 4-1:

Figure 4-1 System working principle diagram

4.2 System structure design

The entire system is composed of multiple functional modules. All functional modules should be listed one by one, and then functional design should be carried out one by one so that each module has a corresponding functional design, and then the overall system design should be carried out. .

The structure diagram of this COVID-19 visual analysis system is shown in Figure 4-2 .

Figure 4-2 System functional structure diagram

4.3 System sequence diagram design

4.3.1 Login module sequence diagram

The login module mainly meets the permission login of administrators and users . The login module sequence diagram is shown in Figure 4-3 .

Figure 4-3 Login sequence diagram

4.3.2 Add information module sequence diagram

Administrators and users can add information after logging in. The sequence diagram of the add information module is shown in Figure 4-4 .

Figure 4-4 Sequence diagram for adding information

4.4 Database design

A good database can be related to the quality of program development. Database design is inseparable from the design of table structures, the connections between tables, and the content of data tables that need to be designed for system development. During the database design, the database should be developed and designed in a targeted manner based on the actual situation.

4.4.1 Database ER diagram design

This new coronavirus epidemic visual analysis system uses the Mysql database, which has fast data storage. Because the new coronavirus epidemic visual analysis system is mainly about the management of information, and there is a lot of information content, which requires a good database design and clear classification. , when information cannot be added, the information will be too confusing. A well-designed database must first clearly express the relationship between each entity. The ER diagram of the system is as shown below:

1. The user journey entity diagram is shown in Figure 4-5:

     Figure 4-5 User journey entity diagram

2. The entity diagram of epidemic data is shown in Figure 4-6:

Figure 4-6 Epidemic data entity diagram

3. The entity diagram of epidemic public opinion management is shown in Figure 4-7:

Figure 4-7 Entity diagram of epidemic public opinion management

4. 4.2 Database table design

Convert ER diagram of database conceptual design into relational database. In a relational database, data relationships are composed of data tables, but the structure of the table is represented by the fields of the table.

Table access_token (login access duration)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

token_id

int

10

0

N

Y

Temporary access badge ID

2

token

varchar

64

0

Y

N

temporary access badge

3

info

text

65535

0

Y

N

4

maxage

int

10

0

N

N

2

Maximum lifespan: Default 2 hours

5

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

6

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

7

user_id

int

10

0

N

N

0

user ID:

Table add_daily (new daily)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

add_daily_id

int

10

0

N

Y

New IDs added daily

2

date

date

10

0

Y

N

date

3

province

varchar

64

0

Y

N

province

4

number_of_new_employees

int

10

0

Y

N

0

New people

5

case_type

varchar

64

0

Y

N

Case type

6

source_of_cases

text

65535

0

Y

N

Source of cases

7

travel_path

longtext

2147483647

0

Y

N

Travel trajectory

8

hits

int

10

0

N

N

0

Clicks

9

recommend

int

10

0

N

N

0

Intelligent Recommendation

10

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

11

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table article (article: article for content management system)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

article_id

mediumint

8

0

N

Y

Article id: [0,8388607]

2

title

varchar

125

0

N

Y

Title: [0,125] is used in the title tag of articles and html

3

type

varchar

64

0

N

N

0

Article classification: [0,1000] is used to search for articles of the specified type

4

hits

int

10

0

N

N

0

Number of clicks: [0,1000000000] Number of people who visited this article

5

praise_len

int

10

0

N

N

0

Number of likes

6

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

7

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

8

source

varchar

255

0

Y

N

Source: [0,255] Source of article

9

url

varchar

255

0

Y

N

Source address: [0,255] used to jump to the website where the article was published

10

tag

varchar

255

0

Y

N

Tag: [0,255] is used to mark the relevant content of the article. Multiple tags are separated by spaces.

11

content

longtext

2147483647

0

Y

N

Text: the main content of the article

12

img

varchar

255

0

Y

N

cover picture

13

description

text

65535

0

Y

N

Article description

Table article_type (article classification)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

type_id

smallint

5

0

N

Y

Category ID: [0,10000]

2

display

smallint

5

0

N

N

100

Display order: [0,1000] determines the order in which categories are displayed.

3

name

varchar

16

0

N

N

Category name: [2,16]

4

father_id

smallint

5

0

N

N

0

Parent category ID: [0,32767]

5

description

varchar

255

0

Y

N

Description: [0,255] describes the role of this classification

6

icon

text

65535

0

Y

N

分类图标:

7

url

varchar

255

0

Y

N

外链地址:[0,255]如果该分类是跳转到其他网站的情况下,就在该URL上设置

8

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表auth (用户权限管理)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

auth_id

int

10

0

N

Y

授权ID:

2

user_group

varchar

64

0

Y

N

用户组:

3

mod_name

varchar

64

0

Y

N

模块名:

4

table_name

varchar

64

0

Y

N

表名:

5

page_title

varchar

255

0

Y

N

页面标题:

6

path

varchar

255

0

Y

N

路由路径:

7

position

varchar

32

0

Y

N

位置:

8

mode

varchar

32

0

N

N

_blank

跳转方式:

9

add

tinyint

3

0

N

N

1

是否可增加:

10

del

tinyint

3

0

N

N

1

是否可删除:

11

set

tinyint

3

0

N

N

1

是否可修改:

12

get

tinyint

3

0

N

N

1

是否可查看:

13

field_add

text

65535

0

Y

N

添加字段:

14

field_set

text

65535

0

Y

N

修改字段:

15

field_get

text

65535

0

Y

N

查询字段:

16

table_nav_name

varchar

500

0

Y

N

跨表导航名称:

17

table_nav

varchar

500

0

Y

N

跨表导航:

18

option

text

65535

0

Y

N

配置:

19

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

20

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表clock_in_every_day (每日打卡)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

clock_in_every_day_id

int

10

0

N

Y

每日打卡ID

2

user_no

int

10

0

Y

N

0

用户名

3

user_name

varchar

64

0

Y

N

用户姓名

4

clock_in_date

date

10

0

Y

N

打卡日期

5

temperature_today

varchar

64

0

Y

N

今日体温

6

is_it_uncomfortable

varchar

64

0

Y

N

是否不适

7

unwell_state

text

65535

0

Y

N

不适状态

8

health_code

varchar

255

0

Y

N

健康码

9

recommend

int

10

0

N

N

0

智能推荐

10

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

11

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表collect (收藏)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

collect_id

int

10

0

N

Y

收藏ID:

2

user_id

int

10

0

N

N

0

收藏人ID:

3

source_table

varchar

255

0

Y

N

来源表:

4

source_field

varchar

255

0

Y

N

来源字段:

5

source_id

int

10

0

N

N

0

来源ID:

6

title

varchar

255

0

Y

N

标题:

7

img

varchar

255

0

Y

N

封面:

8

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表comment (评论)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

comment_id

int

10

0

N

Y

评论ID:

2

user_id

int

10

0

N

N

0

评论人ID:

3

reply_to_id

int

10

0

N

N

0

回复评论ID:空为0

4

content

longtext

2147483647

0

Y

N

内容:

5

nickname

varchar

255

0

Y

N

昵称:

6

avatar

varchar

255

0

Y

N

头像地址:[0,255]

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

9

source_table

varchar

255

0

Y

N

来源表:

10

source_field

varchar

255

0

Y

N

来源字段:

11

source_id

int

10

0

N

N

0

来源ID:

表epidemic_data (疫情数据)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

epidemic_data_id

int

10

0

N

Y

疫情数据ID

2

particular_year

varchar

64

0

Y

N

年份

3

date

varchar

64

0

Y

N

日期

4

country

varchar

64

0

Y

N

国家

5

province

varchar

64

0

Y

N

省份

6

accumulated_number_of_confirmed_cases

int

10

0

Y

N

0

累计确诊数

7

accumulated_deaths

int

10

0

Y

N

0

累计死亡数

8

cumulative_number_of_cures

int

10

0

Y

N

0

累计治愈数

9

new_diagnosis

int

10

0

Y

N

0

新增确诊

10

new_cure

int

10

0

Y

N

0

新增治愈

11

new_death

int

10

0

Y

N

0

新增死亡

12

recommend

int

10

0

N

N

0

智能推荐

13

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

14

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表hits (用户点击)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

hits_id

int

10

0

N

Y

点赞ID:

2

user_id

int

10

0

N

N

0

点赞人:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

表notice (公告)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

notice_id

mediumint

8

0

N

Y

公告id:

2

title

varchar

125

0

N

N

标题:

3

content

longtext

2147483647

0

Y

N

正文:

4

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

5

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表praise (点赞)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

praise_id

int

10

0

N

Y

点赞ID:

2

user_id

int

10

0

N

N

0

点赞人:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

8

status

bit

1

0

N

N

1

点赞状态:1为点赞,0已取消

表risk_area (风险地区)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

risk_area_id

int

10

0

N

Y

风险地区ID

2

province

varchar

64

0

Y

N

省份

3

region

varchar

64

0

Y

N

地区

4

cover

varchar

255

0

Y

N

封面

5

risk_level

varchar

64

0

Y

N

风险等级

6

adjust_time

date

10

0

Y

N

调整时间

7

epidemic_prevention_policy

text

65535

0

Y

N

防疫政策

8

hits

int

10

0

N

N

0

点击数

9

praise_len

int

10

0

N

N

0

点赞数

10

recommend

int

10

0

N

N

0

智能推荐

11

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

12

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表slides (轮播图)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

slides_id

int

10

0

N

Y

轮播图ID:

2

title

varchar

64

0

Y

N

标题:

3

content

varchar

255

0

Y

N

内容:

4

url

varchar

255

0

Y

N

链接:

5

img

varchar

255

0

Y

N

轮播图:

6

hits

int

10

0

N

N

0

点击量:

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表system_user (系统用户)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

system_user_id

int

10

0

N

Y

系统用户ID

2

user_no

varchar

64

0

N

N

用户名

3

examine_state

varchar

16

0

N

N

已通过

审核状态

4

recommend

int

10

0

N

N

0

智能推荐

5

user_id

int

10

0

N

N

0

用户ID

6

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

7

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表upload (文件上传)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

upload_id

int

10

0

N

Y

上传ID

2

name

varchar

64

0

Y

N

文件名

3

path

varchar

255

0

Y

N

访问路径

4

file

varchar

255

0

Y

N

文件路径

5

display

varchar

255

0

Y

N

显示顺序

6

father_id

int

10

0

Y

N

0

父级ID

7

dir

varchar

255

0

Y

N

文件夹

8

type

varchar

32

0

Y

N

文件类型

表user (用户账户:用于保存用户登录信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

user_id

mediumint

8

0

N

Y

用户ID:[0,8388607]用户获取其他与用户相关的数据

2

state

smallint

5

0

N

N

1

账户状态:[0,10](1可用|2异常|3已冻结|4已注销)

3

user_group

varchar

32

0

Y

N

所在用户组:[0,32767]决定用户身份和权限

4

login_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

上次登录时间:

5

phone

varchar

11

0

Y

N

手机号码:[0,11]用户的手机号码,用于找回密码时或登录时

6

phone_state

smallint

5

0

N

N

0

手机认证:[0,1](0未认证|1审核中|2已认证)

7

username

varchar

16

0

N

N

用户名:[0,16]用户登录时所用的账户名称

8

nickname

varchar

16

0

Y

N

昵称:[0,16]

9

password

varchar

64

0

N

N

密码:[0,32]用户登录所需的密码,由6-16位数字或英文组成

10

email

varchar

64

0

Y

N

邮箱:[0,64]用户的邮箱,用于找回密码时或登录时

11

email_state

smallint

5

0

N

N

0

邮箱认证:[0,1](0未认证|1审核中|2已认证)

12

avatar

varchar

255

0

Y

N

头像地址:[0,255]

13

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

表user_group (用户组:用于用户前端身份和鉴权)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

group_id

mediumint

8

0

N

Y

用户组ID:[0,8388607]

2

display

smallint

5

0

N

N

100

显示顺序:[0,1000]

3

name

varchar

16

0

N

N

名称:[0,16]

4

description

varchar

255

0

Y

N

描述:[0,255]描述该用户组的特点或权限范围

5

source_table

varchar

255

0

Y

N

来源表:

6

source_field

varchar

255

0

Y

N

来源字段:

7

source_id

int

10

0

N

N

0

来源ID:

8

register

smallint

5

0

Y

N

0

注册位置:

9

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

10

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表user_journey (用户行程)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

user_journey_id

int

10

0

N

Y

用户行程ID

2

user_no

int

10

0

Y

N

0

用户名

3

user_name

varchar

64

0

Y

N

用户姓名

4

contact_number

varchar

64

0

Y

N

联系电话

5

travel_date

date

10

0

Y

N

出行日期

6

place_of_departure

varchar

64

0

Y

N

出发地

7

destination

varchar

64

0

Y

N

目的地

8

travel_mode

varchar

64

0

Y

N

出行方式

9

peers

text

65535

0

Y

N

同行人员

10

travel_details

text

65535

0

Y

N

行程详情

11

trip_code

varchar

255

0

Y

N

行程码

12

recommend

int

10

0

N

N

0

智能推荐

13

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

14

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表varietal_epidemic (变种疫情)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

varietal_epidemic_id

int

10

0

N

Y

变种疫情ID

2

mutant_virus

varchar

64

0

Y

N

变异病毒

3

discovery_time

date

10

0

Y

N

发现时间

4

infectivity

varchar

64

0

Y

N

传染力

5

latency_time

varchar

64

0

Y

N

潜伏时间

6

route_of_transmission

text

65535

0

Y

N

传播途径

7

symptoms_of_infection

text

65535

0

Y

N

感染症状

8

hits

int

10

0

N

N

0

点击数

9

recommend

int

10

0

N

N

0

智能推荐

10

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

11

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

5系统详细设计

5.1管理员功能模块

管理员登录,通过填写注册时输入的用户名、密码、角色进行登录,如图5-1所示。

图5-1管理员登录界面图

管理员登录进入新冠疫情可视化分析系统 可以查看后台首页、站点管理(轮播图、公告栏)、用户管理(管理员、系统用户)、内容管理(疫情舆情、舆情分类)、更多管理(每日打卡、风险地区、疫情数据、每日新增、用户行程、变种疫情)等信息,如图5-2所示。

图5-2管理员功能界面图

轮播图管理,在轮播图管理页面中可以查看轮播图、标签等内容,还可以根据需要进行修改或删除等操作,如图5-3所示。

图5-3轮播图管理界面图

用户管理,在用户管理页面中可以查看昵称、用户名、图像、手机号码、手机认证、状态、密码、邮箱认证等信息,还可以根据需要进行修改或删除等操作,如图5-4所示。

图5-4用户管理界面图

疫情分类管理,在疫情分类管理页面中可以查看类型名称等信息,还可以根据需要进行修改或删除等操作,如图5-5所示。

图5-5疫情分类管理界面图

风险地区管理,在风险地区管理页面中可以查看省份、地区、封面、风险等级、调整时间、防疫政策等信息,还可以根据需要进行修改或删除等操作,如图5-6所示。

图5-6风险地区管理界面图

每日新增管理,在每日新增管理页面中可以查看日期、省份、新增人数、病例类型、病例来源等信息,还可以根据需要进行评论、修改或删除等操作,如图5-7所示。

图5-7风险地区管理界面图

5.2用户功能模块

用户注册,在用户注册页面可以填写账号、密码、昵称、邮箱、手机号码、身份、性别、身份证号码等详细内容进行注册,如图5-8所示。

图5-8用户注册界面图

用户登录进入新冠疫情可视化分析系统 可以查看后台首页、个人中心、更多管理(每日打卡、疫情数据、用户行程)等信息,如图5-9所示。

图5-9用户功能界面图

每日打卡,在每日打卡页面中可以查看用户名、用户姓名、打卡日期、今日体温、是否不适、不适状态、健康码等信息,还可以根据需要进行修改或删除等操作,如图5-10所示。

图5-10疫情政策列表界面图

用户行程,在用户行程页面中可以查看用户名、用户姓名、联系电话、出行日期、出发地、目的地、出行方式等信息,还可以根据需要进行修改或删除等操作,如图5-11所示。

图5-11用户行程界面图

疫情数据,在疫情数据页面中可以查看年份、日期、国家、省份累计确诊数、累计死亡数、累计治愈数等信息,还可以根据需要进行修改或删除等操作,如图5-12所示。

图5-12疫情数据界面图

6 系统测试

一个系统设计好后,就会进入测试阶段,测试的目标是检验设计好的网站是否可以正常无误的运行,尽可能的发现网站的问题,已使后期网站投入使用后网站尽少出错。

6.1 测试定义

系统测试主要是判断系统是否可以正常运行,功能模块是否可以实现操作。程序代码中是否有错误出现。测试程序是开发过程中的一个主要问题。就算系统完成的再好,再进行程序测试时也会也会发现一个重来没有被发现的错误信息。

测试不仅是系统开发的开始,而且应该贯穿整个系统的整个生命周期。评估系统质量的方法不局限于系统编码和过程,应该与软件设计工作和历史需求分析密切相关。系统错误,不一定是代码错误,可能是阶段的设计摘要和设计细节存在问题,问题也可能出现在需求分析阶段。从实际情况来看,最初的问题很可能是一个小错误,根据按钮的原理,按钮后的按钮位错将是所有位错。该系统的原因也同样适用,随着后续的开发工作,误差将越来越严重。因此就应该对系统进行测试,在一开始就发现系统中存在的问题,就能保证以后系统能够正常稳定的运行。在测试系统中,开发人员应该站在用户的角度来处理测试工作,而现在主要的测试方法是黑盒测试。测试的目的可以概括为以下几点:首先,用户界面和用户需求是一致的,设置界面和设计风格统一;第二,创新设计接口规范设计标准,具有独特的审美特征;最后,人类传统的接口以满足审美需求,不能盲目地追求一种独特的,合理的规划布局,符合审美标准。

6.2 测试目的

测试的目的在于要对系统的稳定和可操作性能进行对照检查。对于软件的开发利用最终的目的在最后的测试和试用,这是一个不可缺少的重要环节。对于软件开发者而言,在对每一个单独的功能进行编排时候,都要有单独的测试,并通过测试阶段才可以研发多个功能性软件,这样既缩短了研发时间,也可以在的单个的早期测试中发现问题,以免融合后的软件,在查找问题时就很难快速解决或者急速定位问题。

新冠疫情可视化分析系统 开发设计完成后,需要对其进行系统测试,测试的主要目的就是发现并找出系统中存在的问题,并及时的进行解决,确保系统可以正常稳定的运行下去,在进行系统测试的时候,在一定要非常的认真、仔细,切记不能粗心,不能放过一个漏洞,测试时候一定不要着急,要按照之前指定好的测试步骤一步一步进行,并且将测试的结果进行详细的记录,我们在进行测试的时候做好选择自动化的测试,这样既可以节省时间而且也能确保测试的准确性,如果采用人工测试的方法就不会这么的方便,由于人工测试有很多不确定的因素,在测试过程中很可能会出现一些问题,用机器测试就不会出现任何的问题,而且机器不会疲惫会一直二等工作下去。在测试的时候一定要非常专注,时刻关注着测试的结果,一但发现异常及时进行修改,最后,测试完之后的文档应该保存下来,方便以后测试时用到。系统测试的方法有很多,对于本新冠疫情可视化分析系统 的测试,我们使用了测试用得最多的黑盒测试方法来对该系统进行测试。

6.3测试方案

对测试计划的把握是测试方案的重中之重。所有的技术难点应该都被包含在这个测试计划之中。而且我们要保证能与目标形成一致性,以至于能够测试出一些主要存在的错误和一些错误的漏洞。可以完美解决这些问题就只有白盒测试或者黑盒测试[14]。

构造测试是白盒测试的另一个名字,了解与分析程序的结构以及性能功用的,从而我们可以得到最终想要的结果并且观察出是不是每一条程序都能得到。

性能测试是黑盒测试别称,程序本身的运作通过程序的进程来观察,主要是看一下程序是不是能够像我们预期的目标那样发展,看一看我们的程序最终能不能完整的得到我们最后想要的功能和储存想得到的数据,到最后看一下我们的这个程序完整性能不能达到要求。

1)模块测试

单元测试就是模块测试,顾名思义就是测试每个模块所承担的功能是否能够实现,这个测试就是为了找出代码在实际的设计运转中某一些小的程序所出现的偏差,很好地改正这些错误,就说明我们模块测试进行很成功过。

2)集成测试:

集成测试就是对系统的测试以及对他子系统的一些性能测试,他检查的事系统的包装程序信息。找出其中的问题。他的优势主要有以下这几点:

软件耗费较少。

可以提前发现端口的错误。

更好的地位系统中错误的位置。

从底部往上面进行的方案针对于偏下层的结构,而中间的结构就采用折中的方法。

3)验收测试:

终于到了结尾性的工作了。就是为了给用户看一下我们的系统功能是否达到了预期的效果。我采用了性能测试也就是黑盒测试对系统进行测试。

其结果是分别是:

有一定的差异在用户的需求。

再者就是结果与之差不了多少。

到了最后了,我们发现的问题都是与用户的需求存在一定的关联。

1、登录测试

 测试点:登录

测试的目标:输入账号密码以及验证码后系统会自动进行验证是否正确。

所用的环境:Windows10和IE浏览器。

输入信息:用户名、密码。

步骤:

(1)首先我们打来浏览器,进入该系统的登录界面。

(2)在进入页面登录部分以后可以进行对用户名、密码进行测试,具体测试输入情况如下表6.1所示。

表6.1 登录测试

情况

用户名输入

密码输入

期望结果

(1)

15546219225

1244566

提示用户名或者密码错误,或账号未经审核

(2)

aaaaa

123456

提示用户名或密码错误,或者账号未经审核

(3)

15546219225

hangguowei

登陆成功

6.4系统分析

本新冠疫情可视化分析系统 设计要求基本都可以达到,此系统具有完整的软件功能,良好的用户界面,能够正确的处理错误信息,而且能够准确的提出错误的种类。但是系统测试时也出现了一些系统的不足和缺陷,所以在今后的日子里我会对其视觉上的不足作出修改,其次系统的代码和数据库出现了非常多的冗余现象,都是因为对编程技术的应用不够熟练,在日后我会加强自己的自身学习和能力,减少这样的冗余现象。

经过对上述的测试结果分析,本新冠疫情可视化分析系统 无论是在技术方面,还是操作方面,还是经济方面都是完全可以实行的,并且经过测试,该系统操作简单,所有的功能都可以实现,因此该系统可以满足人们的使用需求,值得被推广。

总体说来,软件通过测试。

7 结论

本文研究了新冠疫情可视化分析系统 的设计与实现,在文章开端首先对个研究目的及内容、研究方法和研究内容作了简单的介绍,然后通过系统分析,引申出本系统研究的主要内容。

通过对Django技术和Mysql数据库的简介,从硬件和软件两反面说明了新冠疫情可视化分析系统 的设计与实现的可行性,本文结论及研究成果如下:实现了Django与Mysql相结合构建的新冠疫情可视化分析系统 ,通过本次新冠疫情可视化分析系统 的设计与实现的研究与实现,我感触到学习一门新技术,最重要的是实践,只有多动手才能尽快掌握它,一个系统的开发,经验是最重要的,经验不足,就难免会有许多考虑不周之处。要想吸引更多的用户,系统的界面必须要美观、有特色、友好,功能要健全。

由于在此之前对于Django知识并不了解,所以从一开始就碰到许多困难,例如一开始的页面显示不规范、数据库连接有问题已经无法实现参数的传递等等,不过通过我不断的查阅相关的资料,以及向老师同学请教,最后出现的所有的问题都得到了解决,通过这次的系统开发,我学到了很多的知识,也明白了自己在哪些方面有不足的地方,尤其是学会如何从大量的信息中筛选出所需有用的信息,同时我更加深刻的体会到了,虽然书本上的大部分知识都是有价值,正确的,但实际上每个人编程的思路和对数据处理的方法、思想都是不同的,这就要求我们一定要通过实践才能找到解决问题的方案。在此次毕业设计活动中,我不断的提高了自己,也得到了宝贵的经验,我相信这些对我以后的发展都会有很大帮助。

通过这次新冠疫情可视化分析系统 的开发,让我学到了更多的知识,同时通过这次系统的设计也让我明白了自己在哪方面有不足,以后加以学习争取可以开发住更多有用的适用的系统软件,本次系统的设计提高了我的编程水平,为了我今后系统的开发打下了结实的基础。

参考文献

[1]史秋晶,李羽荟.基于Python的矢量数据批处理方法研究[J].测绘与空间地理信息,2023,46(02):105-107.

[2]何秋秀,李晓蓉,邵杰,卓琳.基于Python的级联半带滤波器RTL自动生成方法[J].电子与封装,2023,23(02):60-65.DOI:10.16257/j.cnki.1681-1070.2023.0013.

[3]张丽英,张岩,孙玉发.新工科背景下Python课程混合式教学模式的研究[J].计算机时代,2023(02):125-127.DOI:10.16644/j.cnki.cn33-1094/tp.2023.02.030.

[4]尹江涛.基于Python的漏洞扫描软件设计[J].山西电子技术,2023(01):87-88+98.

[5]任夏荔.基于Python+PyEcharts的数据可视化应用[J].山西电子技术,2023(01):83-86.

[6]练洪铭.基于Python的MCM法评定加油机示值误差测量不确定度[J].石油工业技术监督,2023,39(01):42-46.DOI:10.20029/j.issn.1004-1346.2023.01.009.

[7]Paul Krill. JavaScript, Java, and Python skills top demand[J]. InfoWorld.com,2023.

[8]文雪巍,邢婷,李鹏,孙杰.基于网络爬虫疫情数据分析及可视化系统的设计与实现[J].黑龙江工程学院学报,2022,36(05):32-37.DOI:10.19352/j.cnki.issn1671-4679.2022.05.006.

[9]丰霜,孔华锋.基于微服务的疫情可视化分析系统设计与实现[J].电脑编程技巧与维护,2022(10):62-65.DOI:10.16184/j.cnki.comprg.2022.10.003.

[10]Leaf Andrew T,Fienen Michael N. Flopy-the Python interface for MODFLOW.[J]. Ground water,2022,60(6).

[11]Diaz H.Francisco,Meng Li. Design and Implementation of LDAR management and control platform based on Python and YOLOv3[A]. 东北大学、中国自动化学会信息物理系统控制与决策专业委员会.第34届中国控制与决策会议论文集(9)[C].东北大学、中国自动化学会信息物理系统控制与决策专业委员会:《控制与决策》编辑部,2022:5.DOI:10.26914/c.cnkihy.2022.021062.

[12]Serdar Yegulalp. Python removes ‘dead batteries’ from standard library[J]. InfoWorld.com,2022.

[13]Paul Krill. Google releases differential privacy pipeline for Python[J]. InfoWorld.com,2022.

[14]袁飘,李广伟.新冠肺炎疫情下中国抗疫形象研究综述——基于CiteSpace的可视化分析[J].昆明理工大学学报(社会科学版),2021,21(06):62-70.DOI:10.16112/j.cnki.53-1160/c.2021.06.333.

[15]李相霏,韩珂.基于Flask框架的疫情数据可视化分析[J].计算机时代,2021(12):60-63+68.DOI:10.16644/j.cnki.cn33-1094/tp.2021.12.014.

[16]邱敏,梁婷婷,梁天友.基于Echarts数据分析的校园疫情防控系统设计[J].物联网技术,2021,11(10):100-102.DOI:10.16667/j.issn.2095-1302.2021.10.030.

[17]黄伟,王雅洁,吴洪宇,张明龙,杨冰.基于大数据的新冠疫情研判预测系统设计与实现[J].数字技术与应用,2021,39(08):148-151.DOI:10.19695/j.cnki.cn12-1369.2021.08.48.

[18]张文静.疫情影响下我国体育领域前沿热点可视化分析[J].文体用品与科技,2021(04):88-90.

谢    辞

This graduation project ended successfully. Through this graduation project, I learned a lot of knowledge and improved my software development capabilities. During the system development and design process, many problems arose, but through the teachers and classmates With help, all the problems were finally solved, so I would like to thank the teachers and classmates who helped me in this process. I would also like to thank the instructor for helping me choose the topic, giving me detailed explanations, and providing me with the design requirements. various equipment, and often asked me about my progress and results, and gave me solutions when I encountered difficulties to help me complete it successfully. Without his guidance, I wouldn't be where I am today.

First of all, I would like to thank my instructor. Despite his busy teaching workload, the instructor took time to help me correct the problems that occurred in my design and patiently corrected my thesis. It was his regular inspection and guidance that made it possible. Our graduation projects are completed with high quality. During the entire process of my project development and design, he provided a lot of valuable advice on program design, framework design, code writing, and thesis framework design, and recommended many useful materials and literature to me. I have benefited a lot from his guidance and suggestions. With the guidance and guidance of my instructor, I was able to successfully complete my thesis. The teacher’s serious and responsible work attitude and rigorous academic approach have greatly benefited us graduates who are about to enter the society.

Then I would like to thank my classmates for helping me with this graduation project. I also want to thank you for accompanying me in my college life, which made my college life very happy.

In addition, I would also like to thank my parents for their continued support so that I can successfully complete my studies. Without you, I would not be where I am today. Thank you for your selfless dedication. I will definitely repay you in the future.

Finally, I would like to thank all the teachers here who participated in my thesis defense. Thank you for listening. You have worked hard.

To get the project source code for free, please follow ❥ Like, collect and send a private message to the blogger, thank you~

Guess you like

Origin blog.csdn.net/vx2_Biye_Design/article/details/132897240