# Optimization and Simulation of Literature Aided Reading System Based on Wireless Sensor Network

Authors: Jingen Jiang; Yongchun Xia
Journal: Journal of Sensors
 (2021)

---

## Abstract

This paper designs and implements an intelligent online reading platform based on wireless sensor network. The platform adopts SSM framework based on Spring architecture as the cornerstone and is oriented to ordinary users and teachers and students. Ordinary users can carry out normal online reading on the platform, and teachers and students can carry out auxiliary reading teaching on the platform. The online reading platform is an interactive reading platform system integrating online reading, EPub resource generation and management, and user reading data statistics. The whole platform is composed of registration and login module, online reading module, EPub e-book generation module, and reading data report module. Spring, Spring MVC, and Mybatis framework are used to achieve hierarchical solution and improve development efficiency. For the problems that may occur in the process of EPub generation, an intelligent EPub generation mechanism is designed and implemented to achieve intelligent error correction and improve the stability of EPub generation. Platform design and implementation of a reading data report generation system can be in the background of the report generation and download. In addition, the random extraction problem in platform business is also analyzed, the problem model is established, and the database random extraction scheme commonly used in the industry is studied. The application of wireless sensor for reading aid is less and mostly stays in theory. Based on the traditional intelligent clustering system, the system is designed to improve the system scalability and provide a feasible literature assisted reading scheme while ensuring the accuracy and efficiency of the system.


---

## Body

## 1. Introduction

As one of the most important ways for human to inherit knowledge and culture, literary reading has become more diversified in the transmission process of literary classics, which fully demonstrates the charm of literature. Under the background of network, the classic reading of Chinese language and literature has been affected to a certain extent. Classic reading used to be done using paper books and newspapers. Reading these paper books can get a lot of knowledge. However, with the advent of the Internet era and the emergence of some e-book apps and hardware devices, the classic reading of Chinese language and literature has changed [1–3]. Chinese literature is the result of thousands of years of Chinese cultural accumulation, which contains many excellent literary works and inherits the national spirit. This is usually done through bookstores, libraries, etc. [4, 5]. The Internet era provides people with a new platform for communication and communication. In the current network environment, the expansion of social media and software enables people with common interests to discuss and express their opinions on the Internet. The Internet has broken through the space limitation, and the domestic literature has received the influence of western culture in the dissemination process, which has greatly promoted the development of Chinese language and literature in the new era [2, 6]. The influence of spreading Chinese language and literature abroad through the Internet has also been strengthened.However, in the Internet age, people can quickly acquire all kinds of knowledge they need. Therefore, at present, fewer and fewer people seriously read traditional classics, and fewer and fewer people understand the knowledge of classical Chinese culture. The influence of the Internet era on reading Chinese language and literature classics is also reflected in the weakening of reading experience [7]. In the past, books were priceless, but nowadays, relevant reading information can be effectively obtained using only mobile phones or computers. However, the quality of information in the network environment is uneven, and the reading information is desultorily, which interferes with readers’ reading activities. Harmful spam tends to confuse readers, not only fails to provide useful knowledge but also reduces personal preference and cultivation. Therefore, the classical reading of Chinese language and literature should not be limited to the classroom description of the teacher but should be more guided by the students step by step. In the current network environment, teachers have enriched the classical reading forms of Chinese language and literature, so that students can understand the meaning of classical works through a variety of methods. For example, teachers assign reading topics to students, such as “Novels of Ming and Qing Dynasties” and “Shakespeare,” recommend some works to students, and ask students to independently refer to and consult relevant classics, and write down their impressions. For example, organize students to perform classical plays, divide students into small groups, and have students write plays and arrange plays together. In the creation process, students must read and experience the work repeatedly, so that students can better understand the meaning of the work and achieve a good reading effect [8]. In addition, teachers can hold classical literature recitation contests and encourage students to sign up actively, choose their favorite classic works, determine the language style, and improve students’ reading experience.Wireless sensor network (WSN) is a multihop self-organizing network system consisting of a large number of cheap microsensor nodes deployed in the monitoring area through wireless communication [9]. Its purpose is to collaboratively perceive, collect, and process the information of the perceived object in the network coverage area and send it to the observer. The application of wireless sensor network is no longer limited to military and research but extends to civilian use. Due to the limitations of capital, technology, and environment, it is difficult to construct large-scale experimental environment using real nodes. Therefore, to verify the feasibility and test performance of the protocol through simulation is the most economical and effective way to achieve [10]. At present, most researches on sensor network remain at the theoretical level, and the experimental methods and results lack universality and authority, which affects the standardization and industrialization of sensor network protocol. Online reading is different from traditional reading, and the existing intelligent clustering system of digital resources can not meet the differences of readers’ reading preferences. Network simulation can simulate a large number of nodes in a controllable environment and design a digital resource intelligent clustering system with good scalability according to readers’ reading preferences.In this paper, on the basis of detailed analysis of the existing simulation software pros and cons propose a literary supplementary reading system based on wireless sensor, using Internet technology and virtualization technology; built contains interaction center, computing center, and storage center of distributed cloud architecture; and fundamentally solve the problem facing the current intelligent era literature reading. The future development trend and development tasks of sensor network protocol simulation platform are summarized and put forward.


## 2. Related Work

The positive significance of online literature reading for the cultivation of daily literary accomplishment cannot be ignored. A foreign study [11] shows that the analysis of online reading data can capture the results of educational approaches and social attitudes. Another study [12] also showed that collaborative online reading and writing produced higher quality articles than face-to-face reading and writing collaboration [13]. All these studies show that online reading plays an important role, not only in providing high-quality book resources to the masses but also in the cultivation of people’s cultural quality and auxiliary education. And because online reading is different from traditional reading, it also needs to be different in form to a certain extent. It is very necessary to study the classification system to relieve the massive network information search, discovery, and search. However, in the face of massive data, general clustering system is difficult to cope with, so relevant scholars design an intelligent clustering system through data clustering algorithm based on feature weighting theory according to the research of literature [14]. Some scholars put forward an improved K-means clustering algorithm according to literature [15]. On the basis of the previous system design, the improved algorithm is applied to enhance the application effect of clustering system. These clustering systems have excellent accuracy and efficiency, but the existing intelligent clustering system of digital resources is difficult to meet the differences of readers’ reading preferences [16]. Network simulation is an important part of MWSN network research. The design goal of MWSNSim simulation system is to be able to simulate a large number of nodes in a controllable environment; observe the interaction between nodes caused by unpredictable movement, interference, and noise [17]; find the security and transmission vulnerabilities that may be caused by network routing and MAC layer in time; and obtain the working details of nodes. Therefore, an intelligent clustering system of digital resources with good scalability is designed according to readers’ reading preferences [18]. The system design on the premise of the traditional intelligent clustering system, under the condition of ensure accuracy and efficiency of the system, designed to improve the system scalability, namely, when Internet data size increases, the redesigned system updated extension, dealing with larger business, for the Chinese network information used to provide more perfect technical support caused by the difference [19–21].


## 3. Cloud Aided Reading Simulation Platform Architecture Based on Wireless Sensor Network

### 3.1. Total Framework

The existing wireless sensor network simulation software generally adopts three-layer system. The bottom layer is an engine written in a high-level language, providing a series of apis for simulation scripts to call. You can declare node properties and relationships between nodes in scripts, set environment variables, and use scripts to control events. In short, the script-driven engine performs a series of events, such as node startup, hibernation, node state change, packet transfer between nodes, and other behaviors and finally records the simulation process of the entire network [19].According to the characteristics of sensor network, its simulation platform should have the following basic functions: (1) It can simulate simulated experiments. Its capabilities include customizing the environment, simulating calculations, and saving results. The environment includes hardware and software features, environment background, and network protocol types of nodes. (2) Good user interaction, hiding details that users do not care about, enabling users to focus on logical design, and reducing deployment difficulty and learning threshold. (3) Convenient debugging analysis and demonstration. (4) Dynamic allocation of system resources. The revolution of virtualization is the dynamic allocation of resources. When there is a new simulation software interview, the new simulation environment requirements, the system can be configured at any time out of one or more simulation servers to join in and to adapt to the expansion of demand, and in the process of use, these resources can be reasonably scheduled and timely recovery according to the situation.This paper attempts to build a wireless sensor network cloud simulation platform, which can be divided into three functional parts: interaction layer, computing center, and storage center. Each part can form an independent subcloud and interact with each other through interfaces. See Figure1.Figure 1
Overall structure of reading aid platform.The simulation platform of the three-layer structure cooperates with each other to complete the customization environment and simulation calculation and saves the results of the three most basic functions. Intelligent reading process can realize good user interaction, convenient debugging analysis, and demonstration and realize dynamic allocation of system resources. In the process of use, these resources can be reasonably scheduled and recycled in time according to the situation.(1)
The communication layer, also known as the application layer, assumes the function of interaction with users and provides services to users through a simple unified interface. The user’s calculation request or query request is transmitted to the computing center or storage center through the interaction layer, which carries out the next processing, and the feedback data is also transmitted to the user through the interaction layer. The application of the interaction layer is divided into the front end and the back end. The front end is built on the user’s terminal device, usually the browser. The back end consists of a series of web application servers, which deploy the main business logic of the simulation platform(2)
As the core part of the whole simulation platform, the computing center is composed of server clusters with high performance computing capability. The servers in a computing center are divided into scheduling machines and computing servers according to their functions. The servers in the computing center can be divided into scheduling machines and computing servers according to their different functions. Similar to the interaction layer in the subcloud, the scheduler is responsible for contacting with the outside. Its main work is to verify and distribute simulation requests, manage numerous computing servers, and provide a unified call interface. A variety of simulation environments are set up on the computing server to undertake simulation computing tasks. The logical structure of the computing center is shown in Figure2(3)
The storage center receives the simulation results from the computing center, saves them in the form of files or databases, and provides data query interfaces. The computing center usually outputs the simulation process to one or more text files during the simulation calculation. This information includes node startup and hibernation, packet sending and receiving, and data changes. After the simulation is completed, users can conduct statistical analysis on the experimental data. This way is suitable for experienced users, who know what they need and how to deal with these dataFigure 2
Network frame of reading aid platform.


### 3.2. System Module Design

Users of this platform have four roles: ordinary user, student, teacher, and administrator (Figure3). Both ordinary users and students can read online. Besides online reading, teachers can also obtain students’ reading data and set recommended books for students. Administrators can obtain the reading data of all users and set recommended books for nonstudent users.Figure 3
The population distribution and relationship of literature reading.The platform generates the administrator account, while other accounts need to be registered. The registration and login module is related to the user’s confidential information, so it needs to be studied and discussed in depth. In order to provide users with better personalized service and to retain users, some websites force users to register before authorizing the use of products. This site allows users to browse a portion of the site’s resources without the need for registration and login.Online reading module has book details, book reading, book search, book review, book recommendation, and other functions. Book details include the title, author, publisher, and other information, mainly the content of the book. Reviews of the book from other registered users are displayed at the bottom of the page. Book detail is the main external display page of this platform. Through the book detail page, you can browse the general information of books, including introduction, author, publisher, and other book-related information. There is a button to jump to reading a book on the book detail page. The user can enter the book reading interface to read the book when the condition of reading the book is satisfied. In addition, the book detail page includes book reviews and book recommendations.Book search is a search function for book resources in the website and provides a variety of keyword ranges for searching, including title, author, and introduction. As shown in Figure3, the typical process of a search is in the user’s browser search content in JSON format, via HTTP/HTTPS protocol sends a request to the application background, the background will parse the JSON format data, to pick up the key words, fuzzy match in the database, search out the eligible-related content, then search for the content of the data in JSON format, returns the data to the client, which is then parsed by the browser in JSON format.


### 3.3. WSN Network Simulation

WSN consists of a series of terminals (including computers), functional nodes capable of information processing and transmission, and routing protocols between nodes. Users can configure the network through the terminal, and the information transfer in the network is completed through some functional nodes. The essence of information network is a discrete system. When discrete changes occur in the system, the state of the system will change, and the change is unpredictable. Usually, “event” is used to represent the state change, so it is also called discrete event system. By referring to the layered concept of OSI model, network simulation can be carried out. Simulation models of different functional modules can be written by computer language, and some dynamic behaviors of network system can be simulated by calling computer programs. The process of network simulation mainly includes simulation model establishment, simulation environment configuration, simulation implementation, and result output.When designing the architecture of the network simulation system, software architecture design is used to integrate the functional requirements of the real network simulation system. The architecture design is shown in Figure4.Figure 4
The architecture of system simulation.Based on the data obtained from readers’ reading preferences, the similarity is calculated. In this calculation, spectral clustering algorithm was used to classify the reading preferences with slight difference and high difference, and the reading preference sets of different readers were determined according to the proximity discriminant method.The edge weights of readers’ reading preferences [10] can be expressed as:
(1)wij=e−readeri2+readerj2/−ζ.It can be seen from Formula (1) that the edge weights of reading preference are affected by scale parameters, so the optimal scale parameter set should conform to the basic reading mode of readers. The value of this parameter can be determined [13] according to the following formula:
(2)Hζ=∑readerk2⋅lgkreader,where k represents the measurement parameter. When the calculation result of Hζ is the smallest, the value of ζ is the optimal solution of the scale parameter. Extract the eigenvectors corresponding to the first n maximum eigenvalues of matrix L, and write them as U1,U2,⋯,UN and ranking, so as to measure the similarity of reading preference, the result is
(3)Simreaderi,readerj=∑i,jri2−unr¯2∑i∈mri−unr¯2∑j∈mrj−unr¯2,where m represents the number of readers, un represents the preference feature vector corresponding to readers, and r represents benchmark preference. According to the above ideas, the following equation can be obtained:
(4)ω=m1ps⋅−lgMm2−2,where m1 represents the occurrence times of key search terms when the eigenvalue is ps, m2 represents the frequency of occurrence of characteristic value ps in all training sets, and M is all the training sets [14].
(5)ωik=limn⟶∞∑k=1nm1ps⋅−lgMm2−2ω.According to the independent weightω IK, the K-means algorithm is adopted to set up the system intelligent clustering mode. The following results are the calculation formula used to describe the middle position when determining the cluster center:
(6)cosθ=limn⟶∞∑i=1nωiksi⋅ps∑i=1nωik2si.The system intelligently clustering digital resources according to the above formula, thus completing the design of intelligent classification system for literary resources based on readers’ reading preferences [5, 9].


## 3.1. Total Framework

The existing wireless sensor network simulation software generally adopts three-layer system. The bottom layer is an engine written in a high-level language, providing a series of apis for simulation scripts to call. You can declare node properties and relationships between nodes in scripts, set environment variables, and use scripts to control events. In short, the script-driven engine performs a series of events, such as node startup, hibernation, node state change, packet transfer between nodes, and other behaviors and finally records the simulation process of the entire network [19].According to the characteristics of sensor network, its simulation platform should have the following basic functions: (1) It can simulate simulated experiments. Its capabilities include customizing the environment, simulating calculations, and saving results. The environment includes hardware and software features, environment background, and network protocol types of nodes. (2) Good user interaction, hiding details that users do not care about, enabling users to focus on logical design, and reducing deployment difficulty and learning threshold. (3) Convenient debugging analysis and demonstration. (4) Dynamic allocation of system resources. The revolution of virtualization is the dynamic allocation of resources. When there is a new simulation software interview, the new simulation environment requirements, the system can be configured at any time out of one or more simulation servers to join in and to adapt to the expansion of demand, and in the process of use, these resources can be reasonably scheduled and timely recovery according to the situation.This paper attempts to build a wireless sensor network cloud simulation platform, which can be divided into three functional parts: interaction layer, computing center, and storage center. Each part can form an independent subcloud and interact with each other through interfaces. See Figure1.Figure 1
Overall structure of reading aid platform.The simulation platform of the three-layer structure cooperates with each other to complete the customization environment and simulation calculation and saves the results of the three most basic functions. Intelligent reading process can realize good user interaction, convenient debugging analysis, and demonstration and realize dynamic allocation of system resources. In the process of use, these resources can be reasonably scheduled and recycled in time according to the situation.(1)
The communication layer, also known as the application layer, assumes the function of interaction with users and provides services to users through a simple unified interface. The user’s calculation request or query request is transmitted to the computing center or storage center through the interaction layer, which carries out the next processing, and the feedback data is also transmitted to the user through the interaction layer. The application of the interaction layer is divided into the front end and the back end. The front end is built on the user’s terminal device, usually the browser. The back end consists of a series of web application servers, which deploy the main business logic of the simulation platform(2)
As the core part of the whole simulation platform, the computing center is composed of server clusters with high performance computing capability. The servers in a computing center are divided into scheduling machines and computing servers according to their functions. The servers in the computing center can be divided into scheduling machines and computing servers according to their different functions. Similar to the interaction layer in the subcloud, the scheduler is responsible for contacting with the outside. Its main work is to verify and distribute simulation requests, manage numerous computing servers, and provide a unified call interface. A variety of simulation environments are set up on the computing server to undertake simulation computing tasks. The logical structure of the computing center is shown in Figure2(3)
The storage center receives the simulation results from the computing center, saves them in the form of files or databases, and provides data query interfaces. The computing center usually outputs the simulation process to one or more text files during the simulation calculation. This information includes node startup and hibernation, packet sending and receiving, and data changes. After the simulation is completed, users can conduct statistical analysis on the experimental data. This way is suitable for experienced users, who know what they need and how to deal with these dataFigure 2
Network frame of reading aid platform.


## 3.2. System Module Design

Users of this platform have four roles: ordinary user, student, teacher, and administrator (Figure3). Both ordinary users and students can read online. Besides online reading, teachers can also obtain students’ reading data and set recommended books for students. Administrators can obtain the reading data of all users and set recommended books for nonstudent users.Figure 3
The population distribution and relationship of literature reading.The platform generates the administrator account, while other accounts need to be registered. The registration and login module is related to the user’s confidential information, so it needs to be studied and discussed in depth. In order to provide users with better personalized service and to retain users, some websites force users to register before authorizing the use of products. This site allows users to browse a portion of the site’s resources without the need for registration and login.Online reading module has book details, book reading, book search, book review, book recommendation, and other functions. Book details include the title, author, publisher, and other information, mainly the content of the book. Reviews of the book from other registered users are displayed at the bottom of the page. Book detail is the main external display page of this platform. Through the book detail page, you can browse the general information of books, including introduction, author, publisher, and other book-related information. There is a button to jump to reading a book on the book detail page. The user can enter the book reading interface to read the book when the condition of reading the book is satisfied. In addition, the book detail page includes book reviews and book recommendations.Book search is a search function for book resources in the website and provides a variety of keyword ranges for searching, including title, author, and introduction. As shown in Figure3, the typical process of a search is in the user’s browser search content in JSON format, via HTTP/HTTPS protocol sends a request to the application background, the background will parse the JSON format data, to pick up the key words, fuzzy match in the database, search out the eligible-related content, then search for the content of the data in JSON format, returns the data to the client, which is then parsed by the browser in JSON format.


## 3.3. WSN Network Simulation

WSN consists of a series of terminals (including computers), functional nodes capable of information processing and transmission, and routing protocols between nodes. Users can configure the network through the terminal, and the information transfer in the network is completed through some functional nodes. The essence of information network is a discrete system. When discrete changes occur in the system, the state of the system will change, and the change is unpredictable. Usually, “event” is used to represent the state change, so it is also called discrete event system. By referring to the layered concept of OSI model, network simulation can be carried out. Simulation models of different functional modules can be written by computer language, and some dynamic behaviors of network system can be simulated by calling computer programs. The process of network simulation mainly includes simulation model establishment, simulation environment configuration, simulation implementation, and result output.When designing the architecture of the network simulation system, software architecture design is used to integrate the functional requirements of the real network simulation system. The architecture design is shown in Figure4.Figure 4
The architecture of system simulation.Based on the data obtained from readers’ reading preferences, the similarity is calculated. In this calculation, spectral clustering algorithm was used to classify the reading preferences with slight difference and high difference, and the reading preference sets of different readers were determined according to the proximity discriminant method.The edge weights of readers’ reading preferences [10] can be expressed as:
(1)wij=e−readeri2+readerj2/−ζ.It can be seen from Formula (1) that the edge weights of reading preference are affected by scale parameters, so the optimal scale parameter set should conform to the basic reading mode of readers. The value of this parameter can be determined [13] according to the following formula:
(2)Hζ=∑readerk2⋅lgkreader,where k represents the measurement parameter. When the calculation result of Hζ is the smallest, the value of ζ is the optimal solution of the scale parameter. Extract the eigenvectors corresponding to the first n maximum eigenvalues of matrix L, and write them as U1,U2,⋯,UN and ranking, so as to measure the similarity of reading preference, the result is
(3)Simreaderi,readerj=∑i,jri2−unr¯2∑i∈mri−unr¯2∑j∈mrj−unr¯2,where m represents the number of readers, un represents the preference feature vector corresponding to readers, and r represents benchmark preference. According to the above ideas, the following equation can be obtained:
(4)ω=m1ps⋅−lgMm2−2,where m1 represents the occurrence times of key search terms when the eigenvalue is ps, m2 represents the frequency of occurrence of characteristic value ps in all training sets, and M is all the training sets [14].
(5)ωik=limn⟶∞∑k=1nm1ps⋅−lgMm2−2ω.According to the independent weightω IK, the K-means algorithm is adopted to set up the system intelligent clustering mode. The following results are the calculation formula used to describe the middle position when determining the cluster center:
(6)cosθ=limn⟶∞∑i=1nωiksi⋅ps∑i=1nωik2si.The system intelligently clustering digital resources according to the above formula, thus completing the design of intelligent classification system for literary resources based on readers’ reading preferences [5, 9].


## 4. Simulation and Optimization of Literature Assisted Reading System

### 4.1. Simulation Experiment

In this experiment, the performance and accuracy of the literature assisted reading system were firstly tuned. After no error was detected, the scalability of the three cluster systems was tested by obtaining the relationship between the system throughput and the number of processing nodes. Six servers were used in the experiment, among which one was Master and the other servers were Worker. It is known that the CPU of the test hardware is Intel E54002.7 GHz, and all of them are equipped with 4 GB memory, and all of them are running on Red HatEnterprise Linux 4. Use gigabit Ethernet to connect 6 servers to adjust system performance. Set the minimum input fragment size and the number of reduce nodes so that each node can execute tasks concurrently.


#### 4.1.1. Online Reading Platform Function Test

Online reading platform function test is to test whether each module of the platform has the set function. The system function test tested the login registration module, online reading module, EPub generation module, and data report generation module. The test results are shown in Figure5. All test contents are normal, and the expected goals and functional indicators of the platform can be achieved.Figure 5
Online reading platform functional test results.


#### 4.1.2. Data Random Extraction Scheme Test

The isometric extraction method was compared with the traditional RAND () function, and another group was tested using the ORDER BY RAND () method directly as the control group. The weighted dependent extraction method was compared in the next section. There are 4089087 pieces of data in the test sample, that is,N=4089087. It records the time-consuming conditions of different extraction schemes, and Figure 6 records the estimated number of scan lines of different extraction schemes.Figure 6
Estimated number of scan lines for different extraction schemes.Figure6 shows that isometric extraction is almost as efficient as using RAND () and is better than using ORDER BY RAND () directly. According to the test results, the direct use of ORDER BY RAND () has the highest randomness but is too inefficient to be of high practical value. The use of the optimized RAND () function statement has little impact on performance, but in practice, it has high latency under high concurrency. However, using isometric extraction method, which provides randomness by programming language, will not cause too much pressure on the database, and the application program ensures that randomness is more flexible and controllable.


#### 4.1.3. Weight Correlation Test

This section mainly tests the correlation between the weights of the two methods. Since the difference between the weighted correlation extraction method and the isometric extraction method mainly lies in the dependence on weights, this difference will be tested. Java is also used for implementation. The test conditions are shown in Figure7, where each different ID represents a book and T represents its corresponding weight. Two books are taken out as recommended books each time. In order to intuitively reflect the characteristics related to the extracted data and its weight, it is assumed that T is reduced by 1 after each extraction, which is equivalent to T times of recommendation for each book.Figure 7
Test conditions and results of isometric extraction method.Using the test results of isometric extraction method, it can be found that every piece of data is evenly extracted, and the data with a smallT value is obviously extracted earlier than the data with a large T value. Taking the group of data with ID 1 and 2 as an example, it can be seen from the slope that before the T value of the book with ID 2 is consumed; the probability of the extraction of the two books with ID 1 and 2 is almost the same. When the T value of ID 2 is consumed, the slope of ID 1 has an obvious change, which means that books with ID 1 are extracted every time after this inflection point. Therefore, it is proved that the isometric extraction method is independent of the weight of data.Weight correlation extraction method is a nonuniform extraction method, which is suitable for some cases of random extraction according to the weight. Heavily weighted data are more likely to be extracted, and the likelihood is not fixed. In addition, the weighted correlation extraction method has no limit on the number of extraction and does not need to satisfy the multiple relationship.


### 4.2. Optimization of Literature Reading System

#### 4.2.1. Optimization of Clustering Accuracy of Literary Resources

To measure the similarity of readers’ reading preferences, relevant readers’ reading preference models should be used. Readers have different interests in relevant online resources. The similarity of readers’ reading preferences can be measured based on the basic data generated by data search, content browsing, information publishing, and other operations on the platform. The preference model is used to obtain the following preference data: reader browsing behavior, reader browsing page information, reader resource page visit times, reader resource page dwell time, search keywords, server logs, reader retention data or favorites, and other information.According to readers’ interest in relevant network resources, basic data generated by data search, content browsing, information publishing, and other operations are selected to measure the similarity of readers’ reading preferences. The preference model is used to obtain the following preference data: reader browsing behavior, reader browsing page information, reader resource page visit times, reader resource page dwell time, search keywords, server logs, reader retention data or favorites, and other information.Figure8 shows the influence test of three adjusting parameters on the system. According to the data in Figure 8, a slight increase in sharing can greatly increase the system throughput. When the number of tasks increases, the utilization rate of each node is improved. Therefore, the number of tasks is set according to the highest point of the image. When the number of reduce tasks is 3, the system performance is optimal. Based on the above test results, the number of fragments is set to 200; the number of concurrent tasks on nodes and the number of reduce are set to 3. At the same time, in the clustering system designed, the parameters of the clustering algorithm will also affect the system performance, so 200 digital resources are randomly set to input the system, and the algorithm parameters are adjusted to get the accuracy parameters of the system clustering effect.Figure 8
System throughput test results.The test results show that when the parameters are set atK=2 and K=3, the system can distinguish digital resources, but the number of iterations is more, and the accuracy of the system does not reach 0.8. When K=4, the accuracy of the clustering system exceeds 0.8. When K=5, the accuracy of the system also exceeds 0.8, but in comparison, when K=4, the system has fewer iterations and higher accuracy. Therefore, through repeated testing of each parameter, the cluster number of the clustering system is set as 4. After ensuring that the designed clustering system can be put into normal experimental testing, the system expansion performance comparison experiment is started. As a core task and important link in information extraction, natural language understanding, and information retrieval, entity relation extraction can extract semantic relationship between entity pairs from text. In recent years, the application of deep learning in joint learning, remote supervision, and other aspects has made rich research achievements in relation extraction task.


#### 4.2.2. System Scalability Optimization

Two traditional intelligent clustering systems were set as control group 1 and control group 2. The intelligent clustering system designed this time was the experimental group, and the volume size of the three groups of databases was set as small, moderate, and large, respectively, to test the scalability of the system. Figure9 shows the system scalability test results.Figure 9
Scalability for smaller and larger databases.According to Figure9, the intelligent clustering system designed this time will see a rapid increase in system throughput with the increase of nodes, no matter how large the digital resources are. Although the two traditional clustering systems also have certain performance, compared with the clustering system designed this time, in the face of moderate data volume and large data resources, the throughput of the traditional clustering system grows slowly, and accurate data cannot be obtained.


## 4.1. Simulation Experiment

In this experiment, the performance and accuracy of the literature assisted reading system were firstly tuned. After no error was detected, the scalability of the three cluster systems was tested by obtaining the relationship between the system throughput and the number of processing nodes. Six servers were used in the experiment, among which one was Master and the other servers were Worker. It is known that the CPU of the test hardware is Intel E54002.7 GHz, and all of them are equipped with 4 GB memory, and all of them are running on Red HatEnterprise Linux 4. Use gigabit Ethernet to connect 6 servers to adjust system performance. Set the minimum input fragment size and the number of reduce nodes so that each node can execute tasks concurrently.


### 4.1.1. Online Reading Platform Function Test

Online reading platform function test is to test whether each module of the platform has the set function. The system function test tested the login registration module, online reading module, EPub generation module, and data report generation module. The test results are shown in Figure5. All test contents are normal, and the expected goals and functional indicators of the platform can be achieved.Figure 5
Online reading platform functional test results.


### 4.1.2. Data Random Extraction Scheme Test

The isometric extraction method was compared with the traditional RAND () function, and another group was tested using the ORDER BY RAND () method directly as the control group. The weighted dependent extraction method was compared in the next section. There are 4089087 pieces of data in the test sample, that is,N=4089087. It records the time-consuming conditions of different extraction schemes, and Figure 6 records the estimated number of scan lines of different extraction schemes.Figure 6
Estimated number of scan lines for different extraction schemes.Figure6 shows that isometric extraction is almost as efficient as using RAND () and is better than using ORDER BY RAND () directly. According to the test results, the direct use of ORDER BY RAND () has the highest randomness but is too inefficient to be of high practical value. The use of the optimized RAND () function statement has little impact on performance, but in practice, it has high latency under high concurrency. However, using isometric extraction method, which provides randomness by programming language, will not cause too much pressure on the database, and the application program ensures that randomness is more flexible and controllable.


### 4.1.3. Weight Correlation Test

This section mainly tests the correlation between the weights of the two methods. Since the difference between the weighted correlation extraction method and the isometric extraction method mainly lies in the dependence on weights, this difference will be tested. Java is also used for implementation. The test conditions are shown in Figure7, where each different ID represents a book and T represents its corresponding weight. Two books are taken out as recommended books each time. In order to intuitively reflect the characteristics related to the extracted data and its weight, it is assumed that T is reduced by 1 after each extraction, which is equivalent to T times of recommendation for each book.Figure 7
Test conditions and results of isometric extraction method.Using the test results of isometric extraction method, it can be found that every piece of data is evenly extracted, and the data with a smallT value is obviously extracted earlier than the data with a large T value. Taking the group of data with ID 1 and 2 as an example, it can be seen from the slope that before the T value of the book with ID 2 is consumed; the probability of the extraction of the two books with ID 1 and 2 is almost the same. When the T value of ID 2 is consumed, the slope of ID 1 has an obvious change, which means that books with ID 1 are extracted every time after this inflection point. Therefore, it is proved that the isometric extraction method is independent of the weight of data.Weight correlation extraction method is a nonuniform extraction method, which is suitable for some cases of random extraction according to the weight. Heavily weighted data are more likely to be extracted, and the likelihood is not fixed. In addition, the weighted correlation extraction method has no limit on the number of extraction and does not need to satisfy the multiple relationship.


## 4.1.1. Online Reading Platform Function Test

Online reading platform function test is to test whether each module of the platform has the set function. The system function test tested the login registration module, online reading module, EPub generation module, and data report generation module. The test results are shown in Figure5. All test contents are normal, and the expected goals and functional indicators of the platform can be achieved.Figure 5
Online reading platform functional test results.


## 4.1.2. Data Random Extraction Scheme Test

The isometric extraction method was compared with the traditional RAND () function, and another group was tested using the ORDER BY RAND () method directly as the control group. The weighted dependent extraction method was compared in the next section. There are 4089087 pieces of data in the test sample, that is,N=4089087. It records the time-consuming conditions of different extraction schemes, and Figure 6 records the estimated number of scan lines of different extraction schemes.Figure 6
Estimated number of scan lines for different extraction schemes.Figure6 shows that isometric extraction is almost as efficient as using RAND () and is better than using ORDER BY RAND () directly. According to the test results, the direct use of ORDER BY RAND () has the highest randomness but is too inefficient to be of high practical value. The use of the optimized RAND () function statement has little impact on performance, but in practice, it has high latency under high concurrency. However, using isometric extraction method, which provides randomness by programming language, will not cause too much pressure on the database, and the application program ensures that randomness is more flexible and controllable.


## 4.1.3. Weight Correlation Test

This section mainly tests the correlation between the weights of the two methods. Since the difference between the weighted correlation extraction method and the isometric extraction method mainly lies in the dependence on weights, this difference will be tested. Java is also used for implementation. The test conditions are shown in Figure7, where each different ID represents a book and T represents its corresponding weight. Two books are taken out as recommended books each time. In order to intuitively reflect the characteristics related to the extracted data and its weight, it is assumed that T is reduced by 1 after each extraction, which is equivalent to T times of recommendation for each book.Figure 7
Test conditions and results of isometric extraction method.Using the test results of isometric extraction method, it can be found that every piece of data is evenly extracted, and the data with a smallT value is obviously extracted earlier than the data with a large T value. Taking the group of data with ID 1 and 2 as an example, it can be seen from the slope that before the T value of the book with ID 2 is consumed; the probability of the extraction of the two books with ID 1 and 2 is almost the same. When the T value of ID 2 is consumed, the slope of ID 1 has an obvious change, which means that books with ID 1 are extracted every time after this inflection point. Therefore, it is proved that the isometric extraction method is independent of the weight of data.Weight correlation extraction method is a nonuniform extraction method, which is suitable for some cases of random extraction according to the weight. Heavily weighted data are more likely to be extracted, and the likelihood is not fixed. In addition, the weighted correlation extraction method has no limit on the number of extraction and does not need to satisfy the multiple relationship.


## 4.2. Optimization of Literature Reading System

### 4.2.1. Optimization of Clustering Accuracy of Literary Resources

To measure the similarity of readers’ reading preferences, relevant readers’ reading preference models should be used. Readers have different interests in relevant online resources. The similarity of readers’ reading preferences can be measured based on the basic data generated by data search, content browsing, information publishing, and other operations on the platform. The preference model is used to obtain the following preference data: reader browsing behavior, reader browsing page information, reader resource page visit times, reader resource page dwell time, search keywords, server logs, reader retention data or favorites, and other information.According to readers’ interest in relevant network resources, basic data generated by data search, content browsing, information publishing, and other operations are selected to measure the similarity of readers’ reading preferences. The preference model is used to obtain the following preference data: reader browsing behavior, reader browsing page information, reader resource page visit times, reader resource page dwell time, search keywords, server logs, reader retention data or favorites, and other information.Figure8 shows the influence test of three adjusting parameters on the system. According to the data in Figure 8, a slight increase in sharing can greatly increase the system throughput. When the number of tasks increases, the utilization rate of each node is improved. Therefore, the number of tasks is set according to the highest point of the image. When the number of reduce tasks is 3, the system performance is optimal. Based on the above test results, the number of fragments is set to 200; the number of concurrent tasks on nodes and the number of reduce are set to 3. At the same time, in the clustering system designed, the parameters of the clustering algorithm will also affect the system performance, so 200 digital resources are randomly set to input the system, and the algorithm parameters are adjusted to get the accuracy parameters of the system clustering effect.Figure 8
System throughput test results.The test results show that when the parameters are set atK=2 and K=3, the system can distinguish digital resources, but the number of iterations is more, and the accuracy of the system does not reach 0.8. When K=4, the accuracy of the clustering system exceeds 0.8. When K=5, the accuracy of the system also exceeds 0.8, but in comparison, when K=4, the system has fewer iterations and higher accuracy. Therefore, through repeated testing of each parameter, the cluster number of the clustering system is set as 4. After ensuring that the designed clustering system can be put into normal experimental testing, the system expansion performance comparison experiment is started. As a core task and important link in information extraction, natural language understanding, and information retrieval, entity relation extraction can extract semantic relationship between entity pairs from text. In recent years, the application of deep learning in joint learning, remote supervision, and other aspects has made rich research achievements in relation extraction task.


### 4.2.2. System Scalability Optimization

Two traditional intelligent clustering systems were set as control group 1 and control group 2. The intelligent clustering system designed this time was the experimental group, and the volume size of the three groups of databases was set as small, moderate, and large, respectively, to test the scalability of the system. Figure9 shows the system scalability test results.Figure 9
Scalability for smaller and larger databases.According to Figure9, the intelligent clustering system designed this time will see a rapid increase in system throughput with the increase of nodes, no matter how large the digital resources are. Although the two traditional clustering systems also have certain performance, compared with the clustering system designed this time, in the face of moderate data volume and large data resources, the throughput of the traditional clustering system grows slowly, and accurate data cannot be obtained.


## 4.2.1. Optimization of Clustering Accuracy of Literary Resources

To measure the similarity of readers’ reading preferences, relevant readers’ reading preference models should be used. Readers have different interests in relevant online resources. The similarity of readers’ reading preferences can be measured based on the basic data generated by data search, content browsing, information publishing, and other operations on the platform. The preference model is used to obtain the following preference data: reader browsing behavior, reader browsing page information, reader resource page visit times, reader resource page dwell time, search keywords, server logs, reader retention data or favorites, and other information.According to readers’ interest in relevant network resources, basic data generated by data search, content browsing, information publishing, and other operations are selected to measure the similarity of readers’ reading preferences. The preference model is used to obtain the following preference data: reader browsing behavior, reader browsing page information, reader resource page visit times, reader resource page dwell time, search keywords, server logs, reader retention data or favorites, and other information.Figure8 shows the influence test of three adjusting parameters on the system. According to the data in Figure 8, a slight increase in sharing can greatly increase the system throughput. When the number of tasks increases, the utilization rate of each node is improved. Therefore, the number of tasks is set according to the highest point of the image. When the number of reduce tasks is 3, the system performance is optimal. Based on the above test results, the number of fragments is set to 200; the number of concurrent tasks on nodes and the number of reduce are set to 3. At the same time, in the clustering system designed, the parameters of the clustering algorithm will also affect the system performance, so 200 digital resources are randomly set to input the system, and the algorithm parameters are adjusted to get the accuracy parameters of the system clustering effect.Figure 8
System throughput test results.The test results show that when the parameters are set atK=2 and K=3, the system can distinguish digital resources, but the number of iterations is more, and the accuracy of the system does not reach 0.8. When K=4, the accuracy of the clustering system exceeds 0.8. When K=5, the accuracy of the system also exceeds 0.8, but in comparison, when K=4, the system has fewer iterations and higher accuracy. Therefore, through repeated testing of each parameter, the cluster number of the clustering system is set as 4. After ensuring that the designed clustering system can be put into normal experimental testing, the system expansion performance comparison experiment is started. As a core task and important link in information extraction, natural language understanding, and information retrieval, entity relation extraction can extract semantic relationship between entity pairs from text. In recent years, the application of deep learning in joint learning, remote supervision, and other aspects has made rich research achievements in relation extraction task.


## 4.2.2. System Scalability Optimization

Two traditional intelligent clustering systems were set as control group 1 and control group 2. The intelligent clustering system designed this time was the experimental group, and the volume size of the three groups of databases was set as small, moderate, and large, respectively, to test the scalability of the system. Figure9 shows the system scalability test results.Figure 9
Scalability for smaller and larger databases.According to Figure9, the intelligent clustering system designed this time will see a rapid increase in system throughput with the increase of nodes, no matter how large the digital resources are. Although the two traditional clustering systems also have certain performance, compared with the clustering system designed this time, in the face of moderate data volume and large data resources, the throughput of the traditional clustering system grows slowly, and accurate data cannot be obtained.


## 5. Conclusion

In this paper, a literature assisted reading system based on wireless sensor network is developed, and the system is optimized and simulated. Through in-depth analysis and comparison of their advantages and disadvantages, the problems existing in current sensor network simulation tools and test methods are found. The development of sensor network simulation software should focus on solving the above problems and make breakthroughs in compatibility, scalability, and availability. On this basis, this paper proposes a wireless sensor network cloud simulation platform architecture. The architecture divides the platform functions into three subclouds: independent interaction center, storage center, and computing center. The loose coupling between different parts improves the scalability of the system. Using the Internet technology, the details of the platform operation are hidden, and the user is provided with a simple and easy-to-use interface, which improves the availability of the system and greatly reduces the difficulty of deployment and use. This platform in order to increase the user’s reading interest, when users browse books increased the books recommend section, in order to avoid the ordinary users and students for fixed recommended books appear fatigue, this paper designed a set of random solutions; it abandoned the traditional use of structured query language (SQL) database generate random way. Instead, the random number generation algorithm within the application program is used to provide randomness, which reduces the pressure on the database to a certain extent and provides the possibility to improve the efficiency of the system as a whole. In wireless sensor network, simulation experiments through simulation are rarely used to assist reading, and the researches on sensor network are mostly theoretical, so the experimental methods and results are not universal and authoritative. In this paper, a literature assisted reading system based on wireless sensor is proposed to fundamentally solve the problems of literature reading in the current intelligent era, and the future development trend and development tasks of the sensor network protocol simulation platform are summarized and put forward. This reading assistance platform can meet the accompanying demands of users in using media to the greatest extent and realize the real accompanying reading of mobile terminals. The intelligent auxiliary reading function will promote the formation of reading habits of all people.



---

*Source: 3467411-2021-10-06.xml*