Table of contents
3.1 The Status Quo of Android Application Development Abroad
3.2 The Status Quo of Android Application Development in China
3.3 System construction target analysis
3.4 System construction function analysis
3.4.1 The overall structure of the system
3.4.3 Application Function Planning Diagram
4.1 Detailed design of the sub-system for backing word display at the front desk
4.1.2 Statistics function module
4.1.3 Dictionary function module
4.1.4 Setting function modules
4.2 Detailed Design of Background Data Management Subsystem
5.1.1 Database table summary table
1. About this topic
This design is mainly a consolidated review and application of Android technology development, database and other courses learned in college. According to the word book determined by the user and the amount of learning customized in the settings, this design requires the system to help the user arrange word review every day in a planned way; the user can freely choose to replace the word book and reset the learning records; it can be provided through major translation platforms API to find words and example sentences, you can understand your own learning records and memory, and you can customize the system theme;
2. Development platform
The development platform of this subject is:
-
Operating system: Microsoft Windows 10
-
Programming languages: Java, XML
-
IDE tool: AndroidStudio 4.1.1
-
IDE plugin: Database browser
-
Database server: SQLite
-
Other tools: smartphones or emulators with Android 7.0 or higher
3. System analysis
This chapter mainly conducts more detailed requirement analysis, target analysis and function analysis on system construction.
3.1 The Status Quo of Android Application Development Abroad
According to the survey, the number of Internet users in the United States in 2019 has reached no less than 290 million, the Internet usage rate has reached 89.4%, and the average daily use of mobile phones exceeds three hours. Among the free apps, the more popular types are social networking, games, office and online video; among the paid apps, the more popular types are tools and online games. On the Android platform, GooglePlay has a huge number of applications; its number and downloads are far more than any domestic application store, which shows that the tide of using mobile applications abroad has already arrived, stimulating the development needs of more mobile applications. [17] Unlike most domestic developers who still use Java as a development language in the choice of application development language, most foreign developers generally choose Kotlin as a development language. [18]
3.2 The Status Quo of Android Application Development in China
Domestic Android development is still mainly based on application development, which is mainly divided into three categories: application development for enterprises, game development and general application development.
- Enterprises develop applications. Such applications are generally required by large-scale companies. These companies mainly design overall solutions for mobile phones or tablet computers for their own brands or other brands.
- There are two main profit methods for developing general-purpose applications: outsourcing development for foreign companies, obtaining advertising share through embedded advertisements, and making profits through paid purchases[19].
- Game development is currently similar to the second type of developer. Such applications can not only make users feel fresh about the application but also make it easier to make money through paid purchases by correctly utilizing the various psychology of most users.
3.3 System construction target analysis
The development of word memorizing App requires users to be able to operate user data at any time and automatically adjust the frequency of daily tasks and words that appear in each word, so as to meet the needs of users to recite words efficiently; The calculation of word frequency is particularly important. The goal of this system is to maximize the efficiency of user word recitation by arranging review according to the combination of Ebbinghaus forgetting curve and user familiarity [20]. In addition, the application also needs to provide intuitive user familiarity statistics and completion status maps in real time:
- Realize familiarity calculation word frequency
The familiarity of each word should be selected by the user when reviewing the word; the familiarity includes four options: memorization, understanding, fuzzy and forgetting. Each familiarity will be judged by the system and the review will be arranged again under the condition of ensuring today's task. To ensure that the user's recitation memory on the day can be more consolidated and reliable.
- Realize Ebbinghaus forgetting curve to calculate word frequency
This application makes full use of the Ebbinghaus forgetting curve to enable users to do a reasonable review of non-today tasks; the calculation method of the Ebbinghaus forgetting curve only depends on the system timestamp; it is arranged for user review due to the Ebbinghaus forgetting curve The word will refresh the forgetting rate of the word (this has nothing to do with the user's familiarity); thus ensuring that the user's recitation memory of the words learned in the past is more consolidated and reliable.
- Realize learning statistics
Through the database statistics and using the API to visually display to the user in the form of a graph. Statistical graphs include current vocabulary learning progress graphs, Ebbinghaus forgetting curve graphs and learning status graphs; among them, the learning status graphs provide users with clear user familiarity, remaining plans and word collections.
- Implement user data manipulation
Through the user interface settings, the user can customize the amount of daily tasks, the user can learn task management and system themes, etc., and further improve the user experience and learning efficiency.
3.4 System construction function analysis
3.4.1 The overall structure of the system
The system consists of two subsystems: the foreground display and memorization word subsystem and the background data management subsystem. At the same time, it mainly includes two kinds of JSON data parsing and one XML data parsing process: Phantom back word API vocabulary book and vocabulary data parsing, iciba dictionary API data parsing. Among them, the data analysis of the ghost memorizing word API is the key part, and it is the data source of all related vocabulary.
3.4.2 System function modules
The front desk displays the memorizing word subsystem
A brief description of the word back subsystem displayed at the front desk
- Review module: the main function of the app for reciting words, arrange users to recite corresponding words, update user information and vocabulary information database;
- Statistical module: display fan-shaped statistical chart of user learning progress, histogram of user learning status and line statistical chart of Ebbinghaus' forgotten data;
- Vocabulary module: Change the current English vocabulary, view favorite vocabulary and search words;
- Setting module: set the theme of the app for reciting words, the daily task of reciting words and operating user data;
- Navigation bar module: help users quickly switch to the corresponding functional modules, and display the module switching style;
Background data management subsystem
Brief description of background data management subsystem
- User data initialization: Initialize the current user information database, including user ID, dictionary ID used by the user, user task volume, user today's task progress, timestamp and other information;
- Glossary data initialization: Initialize all vocabulary information databases, including vocabulary data request information, vocabulary ID, vocabulary quantity, whether there is vocabulary data, etc.;
- Vocabulary data initialization: initialize all vocabulary information databases, including vocabulary ID, vocabulary data request information, vocabulary book ID, vocabulary phonetic symbols, vocabulary pronunciation address, vocabulary name, vocabulary definition, whether the vocabulary is saved, vocabulary timestamp, vocabulary memory level, vocabulary Familiarity and vocabulary example sentences and other information;
- Vocabulary example sentence initialization: use the iciba API to query the word example sentence of the corresponding vocabulary and update the vocabulary information database;
3.4.3 Application Function Planning Diagram
The main functional planning of the system is shown in Figure 3-3. What is shown here is only a general link of the main process of the system. The detailed description will be involved in the detailed design of the functional modules later.
4. System design
4.1 Detailed design of the sub-system for backing word display at the front desk
4.1.1 Review function module
The review function module is the first fragment shown to the user. Its working principle and user interface are the most critical parts of the Word Memorizing App, which play a very important role in motivating users to continue using the app. Therefore, the design of the review function module needs to pay attention to user experience and art design, and at the same time, it needs to be easy to use and comprehensive in information. In the review function module, the main body of the fragment is divided into three frames from top to bottom. The first frame displays the user's progress and word task information for the day; the second frame is the user's operation frame for the current word (for example word collection, word pronunciation and familiarity selection, etc.); the third frame is word definition, phonetic symbols, example sentences and other information.
For the convenience of description, we start with the introduction of the second frame and the third frame.
For the user, if no operation is performed, the visible parts of the second frame and the third frame only have words, word phonetic symbols, word pronunciations and word collections. The part of speech, definition, and example sentences of the word and the familiarity selection part of the word are completely hidden. This project will set the click event on the word example sentence and word part of speech control and click on the text by prompting. After the user performs the corresponding operation, the user familiarity selection of the second frame and the third frame, the word of speech and the example sentence of the word will be displayed. Among them, there are four options for user familiarity, which are memorization, understanding, fuzzy and forgetting. The functions of word operation and familiarity selection are as follows:
- Memorization: The user vocabulary data table records the memorization flag for the current word, and there is a 0% possibility that the word will be scheduled for review again regardless of today's task load.
- Recognition: The user vocabulary data table records the recognition flag of the current word, and there is a 20% possibility that the word will be scheduled for review again regardless of today's task load.
- Fuzzy: The user vocabulary data table records the fuzzy flag of the current word, and there is a 40% possibility that the word will be scheduled for review again without counting today's task load.
- Forget: the user vocabulary data table records the forget flag for the current word, and there is a 60% possibility that the word will be scheduled for review again regardless of today's task load.
- Word collection: the user vocabulary data table records the flag of the current word as favorite or unfavorite, and you can check the favorite and unfavorite operations again in the "My Favorites" in the word book function module.
- Pronunciation of words: Play the pronunciation of real people according to the address in the vocabulary data table;
While initializing the data, the application will prepare wordList and hitList. Among them, the wordList contains all the words that the user needs to complete today, and the hitList contains all the hit words (here, all the words that are scheduled to be reviewed again due to familiarity become the hit words, the same below). Users must choose one of these four familiarity levels to review the next word. When preparing to arrange the next word review, there will be a 50% probability that the word comes from the hitList;
The data of today's progress and daily tasks in the first frame come from the user data table. When the user is making familiarity selection and the next word comes from the wordList, today's progress is incremented by one. The maximum value of today's progress is not greater than the amount of daily tasks, otherwise the message that the task has been completed will be prompted. When the user has not completed yesterday's task, today's progress will be reset to 1, but when arranging review, the calculation will still start from the word that has not been selected for familiarity yesterday. When the user resets the task amount in the setting function module, it is divided into the following situations:
- The daily task amount set by the user is greater than the original daily task amount: the review function module will add newly expanded vocabulary to the wordList and update the value of the daily task amount according to the newly set value;
- The daily task amount newly set by the user is smaller than the original daily task amount: the review function module will delete redundant words in the wordList from the back to the front in order and update the value of the daily task amount according to the newly set value. If the new value is less than today's progress, reset today's progress to the maximum daily task amount, and prompt that today's task has been completed. But tomorrow will still start counting from the word that has not been selected for familiarity.
Review function module demo (day theme and night theme)
4.1.2 Statistics function module
The statistical function module is a fragment designed to intuitively reflect the user's learning situation, and its statistical data all come from the database and are updated in real time. Therefore, except for certain click response events (such as fan-shaped statistical graphs that can rotate in place with user gestures), users cannot directly edit or modify statistical graphs. It uses the HelloChart graphics drawing framework, which can draw various beautiful statistical charts. Through HelloChart, this module includes user learning progress fan chart, Ebbinghaus forgetting data line chart and user learning status column chart:
- Fan-shaped statistical chart of learning progress: Statistics made for the current vocabulary, including the remaining planned vocabulary, unfinished vocabulary today, completed vocabulary, brief information of the current vocabulary and learning progress;
- Ebbinghaus forgetting data line chart: German psychologist Ebbinghaus made a systematic study on the phenomenon of forgetting. He used meaningless syllables as memory materials, and drew the experimental data into a curve, called Ebbinghaus Forgetting curve. The ordinate of the curve represents the amount of memory retention, which shows a law of forgetting development: the process of forgetting is unbalanced. At the beginning of memorization, forgetting is very fast, and then it gradually slows down. After a certain period of time, it is almost no longer forgotten. That is, the development of forgetting is "fast first and then slow". Each word in this project has a corresponding memory value and a time stamp when reviewing, which is used to represent the ordinate of the Ebbinghaus forgetting curve. It should be noted that the value of the ordinate is only related to its corresponding time stamp.
- Histogram of learning status: statistics are made for all the words the user has learned. The vertical axis is the number of words, and the horizontal axis includes user familiarity statistics, word favorites and today's remaining unfinished volume.
Long screenshot of statistical function module demo (day theme and night theme)
4.1.3 Dictionary function module
The word book function module is also one of the core modules of the word reciting app. Its main function is to help users replace the current word book. After performing this operation, return to the review function module and you will find that today's progress will be reset, but The user's daily tasks remain unchanged, and the fan-shaped statistical data of the learning progress of the currently learned vocabulary in the statistical function module also changes. In addition, the word book function also has a "My Favorites" option to view all favorite words and users can cancel a word at will. There is also a search box to query related words in the database and network queries. Here only the most important switching words are introduced. This function. All data in the word book is preloaded and directly synchronized to the database and application interface through AsyncTask, but each word book may not have word data, because if all the data is preloaded, frequent API access errors will occur. The final solution is that the user must select a vocabulary, and then AsyncTask will synchronize the vocabulary data in the corresponding vocabulary to the database and review function module fragment. When the user is using this application for the first time, all the controls in the review function module will be unavailable and a prompt for word selection will be given, as shown in the figure;
It is also very simple to realize the user's operation of selecting a vocabulary. All the book columns can be slid, and there are click events; therefore, the user only needs to directly click on the name of the listed vocabulary. At this time, the interface of the function module will have a prompt of switching success. Of course, the corresponding data as mentioned above will also be automatically added and updated to the database and major functional modules. The dictionary function module interface is shown in the figure:
Wordbook selection (day theme and night theme)
4.1.4 Setting function modules
The functions of the setting function module mainly include user daily task setting, user data reset and application theme switching, in addition to user switching and current vocabulary update functions; their functions are:
- User daily task setting: User task setting is defined by the user and is an important basis for the operation of the user vocabulary data table in the review function module; its function has been explained in the review function module, so it will not be repeated here.
- User data reset: This operation will reset all the data in the user data table and user vocabulary data table. After the reset, the user will no longer have any learning records like a new user, but the content in the relevant database does not need to be downloaded and downloaded again. parse. Relevant data changes will also be synchronized to the statistical data module in real time, so checking the content of the statistical function module is also the basis for judging whether the user data has been reset.
- Application theme switching: There are two themes, night and day, available. The introduction of the night theme caters to the development trend of Android development and the increasing user needs. Application theme switching is also a field in the user data table, which can automatically switch to the corresponding theme according to different user needs.
- User switching: Since all lexical data sources come from the ghost data API, the user ID and user key provided by the API are already very unique and private. Therefore, the user account and password are directly configured as the user ID and key provided by the API. As mentioned in the function of the vocabulary module, you can use the preloading of the vocabulary data. When you use it for the first time, you can judge whether there is a login status before the main activity uses the loading fragment. If there is a login status, load various fragments directly; if If not, judge whether the login is successful or not based on the returned data. If it is successful, it will be recorded in the user data table and the fragment will be loaded; otherwise, the login will be refused, and the fragment will not be loaded, and it will only stay on the login page of the main activity (Figure 4-7). Therefore, the user registration function is no longer provided.
- Current vocabulary update: This operation will abolish the user vocabulary data table corresponding to the current user vocabulary, and then re-apply for API data and re-initialize the user vocabulary data table.
Set the function module diagram as shown in the figure (day theme and night theme):
User login interface:
Code interface, pro-test correct
4.2 Detailed Design of Background Data Management Subsystem
Realization of Ebbinghaus Forgetting Curve
There is a recommended formula for the Ebbinghaus forgetting curve. But in order to make the system more efficient, the Ebbinghaus forgetting curve is used by the method of taking points. When updating the timestamp in the background data management subsystem, the current timestamp will be compared with the original timestamp. If the difference reaches the value in the table below, it will be updated to the current timestamp and the corresponding memory value will be updated. Table 4-1 shows the processing method of timestamp difference update:
Table 4-1 Processing methods for updating timestamp difference
difference | just | 15min | 20min | 1h | 8h | 1 day | 2 days | 6 days | 30 days |
---|---|---|---|---|---|---|---|---|---|
memory value | 100 | 58 | 44 | 36 | 34 | 28 | 25 | twenty one | 15 |
In the review function module, first select the words contained in the current book, and the memory value is less than 40 and greater than 0 (that is, the words have been learned and the forgetting value is greater than 60), and the forgetting value is passed to the hit function. If the word is hit, it will be put into the wordList; in this way, the process of reviewing all the learned words in the current vocabulary book is realized by using the Ebbinghaus forgetting curve.
5. Database design
5.1 Table summary
5.1.1 Database table summary table
Table Name | Function Description |
---|---|
logs | Login log table, user login success record |
users | User information table, record specific user information |
word list | User vocabulary data table, which records user vocabulary usage information and vocabulary information |
booklist | User vocabulary data table, which records user vocabulary usage information and vocabulary information |
5.2 Show details
login log table
Table Name | logs | logs |
---|---|---|
field | type of data | illustrate |
user_id | integer | non empty |
user | text | non empty |
appkey | text | non empty |
date_num | integer | date |
User Information Form
Table Name | users | users |
---|---|---|
field | type of data | illustrate |
user_id | integer | PK |
user | text | non empty |
appkey | text | non empty |
class_id | text | book id |
word_position | integer | default 100 |
today_progress | integer | default 1 |
date_num | integer | date |
theme_night | integer | 1—dark theme; 0—day theme; default 0 |
user
Table Name | booklist | booklist |
---|---|---|
field | type of data | illustrate |
msg | text | default failure |
title | text | book title |
class_id | text | book id |
word_num | integer | default 0 |
course_num | integer | default 0 |
existence_item | integer | 1—lexical data exists; 0—lexical data does not exist; default 0 |
User Vocabulary Data Table
Table Name | word list | word list |
---|---|---|
field | type of data | illustrate |
word_id | integer | PK, self-increment |
msg | integer | default failure |
class_id | integer | book id |
course_num | integer | default 0 |
symbol | text | phonetic symbols |
sound | text | pronunciation address |
name | text | English vocabulary |
descrimination | text | paraphrase |
favorites | integer | 1—favorite word; ;0—not favorite word;;default 0 |
time_stamp | integer | Timestamp; default 1618674655870 |
memory | integer | Memory value, default 0 |
word_operation | integer | 3—memory; 2—knowledge; 1—fuzzy; 0—forget;;default 0 |
example_sentence | text | Example sentences |