Abstract
In the information age, the rapid innovation and development of information technology plays an important supporting role in the dissemination and utilization of information. As an important concentration of literature information and knowledge resources, the library also actively introduces various advanced technologies, optimizes the service model, and transforms to intelligence. This paper expounds the development status of smart library and context-aware technology at home and abroad, analyzes the application of context-aware technology in smart library, constructs a framework of smart library based on context awareness, and puts forward some suggestions for smart library’s context-aware service.
1. Introduction
1.1. Related Concepts of Smart Library
Smart library is to use a new generation of information technology to change the way users interact with library system information resources in a smarter way, to improve the clarity, flexibility, and response speed of interaction, so as to realize intelligent service and management library mode. The smart library applies the Internet of Things technology to various services of the library and realizes the communication between users, libraries, and information resources through the Internet of Things. The advantage of this is that it will bring readers a more convenient and high-quality reading experience and improve the work efficiency and management level of the library. Its highest stage is that all parts are completed intelligently by the library, without manual intervention, to achieve a “smart” state [1].
1.2. Research Background
The smart library takes the user as the service concept, realizes the all-round perception and capture of information, innovates a variety of service modes and intelligent management methods, and effectively improves the service level of the library. Generally speaking, the “wisdom” of a smart library should include smart perception, smart communication, smart reasoning, smart discovery, and smart services. Intelligent perception is based on intelligent perception technology to sense and identify information resources. Smart communication is to use a variety of information exchange methods and advanced communication equipment of the Internet of Things to form an intelligent communication system based on the Internet of Things. Smart reasoning uses big data analysis technology as a means and is based on user data analysis. Wisdom discovery is based on knowledge management and self-learning [2]. Smart service shares independent affairs through information exchange resources, builds a service intelligence system with transaction processing and decision-making functions, and automatically carries out intelligent reader services and business optimization. In addition to the computer network, terminal, and other peripherals necessary for the informatization construction of the original library, the smart library based on the Internet of Things needs new equipment and new systems for sensing, measuring, capturing, and transmitting information. It requires high-speed network communication tools, updating network infrastructure, upgrading server storage and cloud platforms, and strengthening wireless network construction [3].
1.3. Research Significance
The rapid development of intelligent technologies such as information processing technology, artificial intelligence technology, Internet of Things, big data, and cloud computing has provided strong technical support for the innovation, development, transformation, and upgrading of library work. The subversive changes brought about by technological change have promoted the development of intelligence and brought the library to the crossroads of the change of intelligence. In the context of the information age, the library must keep up with the pace of modern social reform and development and use the Internet of Things and other intelligent sensing technologies to develop into a smart library with interconnection of all things, intelligent perception, deep integration, and individual interaction. Only in this way can the service value and functional attributes of the library be reflected. Smart library is the inevitable result of technological change [4]. Therefore, it is necessary to study the emotion perception information fusion technology of smart library in this paper.
2. Related Work
Context awareness, also known as “context awareness,” is to establish the interconnection between users and the system or various devices by managing, adjusting, and arranging the space composed of intelligent terminal equipment, context, and physical environment. It can be used to provide a unified application framework when developing services.
2.1. Research on Situational Awareness
Schilit et al. [5] believe that situational awareness is an operation method in which an application system uses sensing technology to obtain information about the surrounding environment of an object and use it to adjust the behavior of the object. Kim et al. [6] pointed out that context perception is the acquisition and application of context, and the application of context includes two links: adapting to the context and using the context. From the perspective of processing flow, Schilit et al. believe that context awareness can transmit context information to the application system, and the application system makes corresponding service adjustments according to the context to meet the transaction processing needs of the object. From the perspective of the collection process of contextual information, Hong et al. [7] believe that contextual awareness is to perceive the context and obtain contextual information through the application system, and at the same time, the user-centered and environment-centered contextual information processing methods are used to greatly improve the context validity of information and reduce uncertainty in contextual data. From the perspective of purpose, Gu [8] believes that the purpose of situational awareness is to use human-computer interaction or sensors to collect situational information, such as people, equipment, and environments, and provide it to computing equipment, so that computing equipment can respond accordingly. With the continuous development of sensing equipment and sensing technology, the conceptual category of situational awareness is also developing.
Some researchers [9] believe that the purpose of context awareness is to use RFID [10, 11], sensors, and related information technology and physical equipment to automatically perceive and collect contextual information and to use contextual information to intelligently analyze and judge users’ behaviors and needs. From the perspective of function form, situational awareness can also be divided into active situational awareness and passive situational awareness: active situational awareness is to use applications to adaptively perceive the situation, while passive situational awareness is to passively update the situation according to user requirements, and related applications are also intelligent, with an important combination of applications and machine learning [12]. Sezer et al. [13] divided context awareness into network context awareness and application context awareness according to different application purposes. Application context awareness is directly related to users or user services and can be further divided into application awareness, service awareness, and learning awareness [14].
2.2. Current Status of Situational Awareness Research
In 1992, the Olivetti Active Badge project [15] by Want et al. is deployed and implemented in an office building, using information obtained from situational awareness to achieve automatic call forwarding services. Then in 1994, Schilit and Theimer [16] defined “situational awareness” as a computer system with adaptive responses to the surrounding environment. An author defines it as follows: The system uses contextual information to provide users with relevant information or services according to user tasks. As can be seen from this definition, the goals of situational awareness are the same as those of the personalization system. The former is to provide users with information and services according to the user’s context, while the latter is to provide corresponding information and services according to the user’s personal interests. As a computing service form, context-aware computing generally has the characteristics of adaptability, reactivity, responsiveness, in-placement, context sensitivity, and environment orientation. At present, the application of situational awareness mainly focuses on the smart space. In China, in the environment of e-learning [17], through the perception of the students’ knowledge situation, social situation, technical situation, etc., they can provide students with more humanized services intelligently. The system in [17] uses the OSGi-based component service architecture in the vehicle to encapsulate heterogeneous sensors into various context-aware services. This shields the heterogeneity of sensor devices while simultaneously supporting other applications in the vehicle. This approach also facilitates the development of other context-related applications in a distributed environment. On the Internet site facing the road network environment, under the service architecture of Web Service, it provides a platform for context publishing for other smart cars in this system and also provides a simple and easy-to-use context service interface for other context-related applications. It can be seen that situational awareness will definitely play an important role in future life and work.
2.3. Research on Information Infusion
Information fusion, originally called data fusion, originated from a sonar signal processing system funded by the U.S. Department of Defense in 1973, and its concept appeared in some literature in the 1970s. In the 1990s, with the extensive development of information technology, “information fusion” with a more generalized concept was proposed. After the successful development of the sonar signal processing system in the United States, information fusion technology has been favored more and more widely in military applications.
2.4. Research Status of Information Fusion
At present, the application research of information fusion technology in the military has shifted from low-level target detection, identification, and tracking to high-level applications such as situational assessment and threat estimation. Since the 1990s, the rapid development of sensor technology and computer technology has greatly promoted the research of information fusion technology. The application field of information fusion technology has also rapidly expanded from military to civilian. At present, information fusion technology has achieved results in many civilian fields. These fields mainly include robots and intelligent instrument systems, intelligent manufacturing systems, battlefield missions and unmanned aircraft, aerospace applications, target detection and tracking, image analysis and understanding, inertial navigation, pattern recognition, and other fields. After entering the 1990s, due to strong military needs, people have done in-depth research on data fusion from many aspects. Western developed countries such as the United States, Britain, Japan, Germany, and Italy have not only made breakthroughs in some major scientific research projects they are concerned about, but also gradually developed some systems that can be put into practical applications in life and are running well. In the “Eighth Five-Year Plan,” our country also regards it as a key technical issue in the computer field, attaches great importance to it, and invests energy and funds in this area as much as possible and establishes relevant key research projects. Because the researchable problems contained in data fusion are very rich, later researchers have focused on different aspects of this field and have achieved certain research results both in theory and in practice. The design of the model is a key issue in the data fusion system. Some people divide the model into five levels according to the functional level of fusion. Since data fusion can be divided into multiple stages, and for each stage, different people study a certain detail, the proposed algorithms are also diverse. Peng et al. [18] studied the temporal registration algorithm in the fusion system. This research is necessary due to the fact that each sensor must be at the same time during fusion processing. He focused on the Taylor expansion correction method, the interpolation and extrapolation method, and the virtual fusion method. Although temporal registration is achieved, further research is needed on the synchronization with tracking, association, and fusion. Zhao and Wang [19] applied neural network to data fusion algorithm and realized multiple inputs of data fusion by using the adaptive resonance theory of neural network. Because the application of data fusion is highly targeted, each author proposes corresponding algorithms for their own actual systems.
3. Preliminaries
3.1. Matrix Factorization Recommendation Algorithm with Context Awareness
Readers’ ratings of libraries, especially in mobile environments, are context-sensitive. For example, the reader’s location and interests will affect the reader’s rating of the resource. This paper draws on the idea proposed in Baltrunas et al. [20] to incorporate contextual factors into item prediction scores and assumes that each contextual factor has the same impact on items of the same category.
For the mobile library scenario, the contextual factors involved mainly include location, interest, time, equipment, etc. Let bc be the contextual bias, which represents the influence of contextual factors on a certain category of items.
Among them, is the category to which the item belongs, and represents the influence of the contextual factor j on the item of type , which contains k contextual factors. The scoring prediction model incorporating contextual bias is as follows:
Wang et al. [21] believe that, in practice, readers’ evaluation of projects is not only determined by a certain relationship between readers and projects, but also affected by the characteristics of readers or projects themselves. For casual readers, they generally rated items above average; for serious readers, their ratings were generally low.
Similarly, for the project, the scores of literature books are generally high, and the scores of tools books are generally low. Therefore, this paper incorporates these reader- or item-independent influencers into the predicted score as a global bias. The formula for the scoring prediction model with global bias added is
Among them, is the reader bias score, and is the item bias score. The value indicates whether this reader rating is generally high or low. The value indicates that all readers generally rated the item high or low.
The objective function of the rating prediction model is
In order to optimize the objective function F, the stochastic gradient descent method is used for optimization training. For the scores in the training set, the parameters , , , , and are iteratively optimized according to the negative gradient direction of the objective function F, and finally the optimal solution is obtained.
Among them, is the update step size, formulas (5)–(9) are the calculation formulas for the negative gradient direction, and formulas (10)–(14) are the parameter update formulas.
By substituting the learned correct parameters into the prediction formula, we can get the reader’s prediction score matrix. We centralize the predicted score, as in
Among them, represents the average rating value of reader i, and represents the average rating value of item j. We use the cosine similarity formula to calculate the similarity between readers and find the nearest neighbor reader set of the target reader u in the centralized score matrix.
Calculated by the above formula, a matrix of similar readers is obtained, and |N| readers are selected from it to form the nearest neighbor set. Finally, the predicted score of reader u for item j is calculated according to the nearest neighbor set of the target reader, as shown in the following formula:
The specific flowchart of the matrix factorization recommendation algorithm fused with context awareness is shown in Figure 1.

3.2. Models and Algorithms of Data Fusion
The acquisition and processing of data are the basic and key steps in ubiquitous computing. The collection of data is related to whether the system can obtain all environmental information. The quality of data processing directly affects the validity and correctness of the judgment made by the upper system. Therefore, data collection and processing are first analyzed.
3.2.1. Data Collection
According to the characteristics of the original values obtained by different sensors and devices, the data processing methods in the smart library system can be roughly divided into two types: one is the data that can be used directly without further processing by middleware, such as door disable 1 which means the door is open; the other is the data that needs to be further processed by the middleware, such as the value of the temperature sensor. Then we only need to define the format of the event that is not processed to ensure that the upper-layer system can recognize the event. For the data to be processed, we need to reanalyze each data to determine which way to process and finally describe them according to the event definition specification.
3.2.2. Data Processing
After the analysis in the previous section, we know that there are two data processing methods in the system, and now we will explain the second method. The processing of the second type of data is divided into four steps: (1) Convert the obtained data to the data type. (2) Integrate individual sensor data. (3) Process sensors in a specific area (grouping by geographic features to increase accuracy). (4) Analyze trends reflected by sensor data in that specific area.
(1) Data Value Conversion. When the system gets the data, these data are just a series of numbers, such as 228, 779, and 1199, which cannot be recognized by people, and it is even more inconvenient for people to understand the physical meaning they represent. Therefore, this paper lists several data value conversion formulas according to the physical characteristics of the equipment and some indicators. Through such a formula, the system converts the collected data into human-recognizable data with physical semantics, including temperature, light intensity, and voltage.
(2) Single Sensor Data Fusion. In a network composed of sensors, data exists in the form of massive amounts of data, and multiple data may be obtained every second. If we spend a lot of time processing the data of a single sensor here, it will consume a lot of computer resources. The processing of a single sensor is to filter out the wrong data values that may occur during the sampling process of the sensor, so that it can more correctly respond to environmental changes. Since the sensors collect this data over time, the data is independent and equal with respect to each moment in time. The fusion method used in this paper can use the method of averaging; that is, the value of a single sensor in the automatic collection time t = {t1, t2, t3, …, tk} is x, and then
This method seems simple, but it makes up for its simplicity with the shortest operation time and fastest execution speed.
(3) Fusion Processing of Sensor Data in a Specific Area. After the previous step, more reliable data has been obtained, and this step is to obtain the sensor attribute value represented by the type in the area. For some sensors, such as sound and temperature, it can be directly used as the characteristic response of the area to the upper system for further judgment. At this time, it is necessary to comprehensively consider the values obtained by the sensors in a certain area. Since the value of each sensor is relatively independent, the value plays the same role in this result. Therefore, the method of taking the average value can be applied. That is, there are j sensors S in room a, and the value of each sensor S is X, so the attribute value Troom of a certain area is
4. Context-Aware Information Fusion Design
4.1. Overall System Design
The smart library IoT data fusion middleware consists of four submodules: data receiving and processing module, knowledge inference module, user preference acquisition and update module, and service decomposition and execution module. The overall structure of the system is shown in Figure 2.

In the data fusion middleware, the data receiving and processing module is responsible for collecting and preliminarily processing the real-time data obtained from the Internet of Things and other related sensing devices in the smart library to prepare for further fusion processing. The knowledge reasoning module is responsible for matching the data sent by the bottom layer into corresponding events according to the rules. The event description module uniformly processes the events sent from the knowledge reasoning module to form an easy-to-deliver form. The event decomposition module is used to convert the service requirements passed down from the upper layer into instructions that the system can understand and then forward these instructions to the relevant lower-level hardware devices for execution. The functional block diagram of the system is shown in Figure 3.

When the hardware is deployed and the system is initialized, the relevant properties of the IoT sensors are manually set by the staff. For example, several sensors are installed in a room, the user’s preference value is set by the user, and some authoritative attribute values are set by the expert. For example, when the temperature is higher than certain degrees, there is a tendency to cause fire. Various attribute values set by staff, users, and experts on the system constitute constraints. The reasoning module takes the constraints as the criterion, fuses the data collected from the Internet of Things, and finally generates an event that reflects the real-time environmental state of the home and informs the upper-level module of the event. The upper-layer module will issue various instructions to the lower-layer IoT hardware, such as querying the location of a person, and so on.
4.2. Context-Aware Matrix Recommendation Algorithm Experiment
The following is an experimental verification of the proposed fusion context-aware matrix factorization recommendation algorithm (hereinafter referred to as Context-MF) using the Book-Crossing book scoring dataset, compared with the basic matrix factorization algorithm (hereinafter referred to as MF) to verify the effectiveness of the algorithm.
4.2.1. Experimental Data Set and Experimental Operating Environment
The experiments use the book rating dataset provided by Book-Crossing. The Book-Crossing dataset uses a crawler to collect 278, 858 readers’ ratings of 271, 379 books from the Book-Crossing book community. On the basis of this dataset, this paper constructs a dataset with contextual factors by incorporating context generating rules (with a university library as the background), including basic reader information (ID, age, education, and major) and location context information (classroom, research room, library, dining hall, dormitory, etc.), time context information (weekdays, weekends, and morning, noon, and evening hours), device information (mobile phone, tablet, 4G, and Wifi), etc. This experiment will randomly select 80% of the scoring data from this synthetic dataset as the training set and 20% as the test set. The experimental environment is Intel Xeon 3.06 GHz E5 CPU, 16 GB memory, Windows 8 operating system, and the program development language uses C# language to compile and run.
4.2.2. Algorithm Evaluation Metrics
In the experiment, the mean absolute error (MAE) and the accuracy (Precision) are used as the evaluation indicators of the recommendation algorithm. MAE measures the accuracy of the recommendation result by calculating the deviation between the predicted score and the actual score of the reader. The smaller the MAE value, the higher the accuracy and the higher the recommendation quality. The specific MAE calculation formula is shown in
Among them, represents the predicted rating of item i by reader u, represents the actual rating of item i by reader u, and I represents the set of evaluation items. In order to describe the accuracy evaluation index, it is assumed that Lu represents the recommended list of reader u, and Bu represents the list of books that reader u gave positive feedback ratings in the test set. Precision refers to the proportion of books that readers like in the recommendation list. The recommendation accuracy for a single reader is
The accuracy of the whole system is
4.2.3. Experimental Results and Analysis
In the experiment, the value range of the regularization coefficient λ and the update step γ in the prediction function is set to [0.01, 0.05], the dimension of the feature space is 25, the number of neighbor readers in the nearest neighbor set is set to 20, and the number of iterations is 50 times. Experiments are carried out on the influence of the two parameters λ and γ in the Context-MF algorithm and the MF algorithm on the recommendation performance, respectively, and the results are shown in Figures 4 and 5.


It can be seen from Figure 5 that when λ = 0.02 and γ = 0.04, the average MAE of the algorithm achieves the minimum value of 1.1157, and the recommendation effect is optimal at this time. Under the same experimental parameter settings, the experimental results of the Context-MF algorithm proposed in this paper are shown in Figure 5. When λ = 0.03 and γ = 0.04, the mean value of MAE can achieve a minimum value of 0.7063, and the recommendation effect at this time is the best. It can be seen that the optimal MAE value of the Context-MF algorithm proposed in this paper is nearly 36.7% lower than that of the MF algorithm, indicating that the Context-MF algorithm has higher accuracy and better recommendation effect.
In order to verify the recommendation performance of the Context-MF algorithm under different data sparsity, the data density (that is, the proportion of the training set to the entire data set) is increased from 20% to 80%, the dimension of the feature vector is set to 25, and λ is set to 0.02 and γ is set to 0.04 (MF algorithm), and λ is set to 0.03 and γ is set to 0.04 (Context-MF algorithm). The MAE mean results of the two algorithms under different data densities are shown in Figure 6.

It can be seen from Figure 6 that the recommendation effect of the two algorithms increases with the increase of the proportion of the training set. This is due to the fact that the increase in training samples reduces the impact of the sparsity of the scoring data. Compared with the MF algorithm, the average MAE of the algorithm proposed in this paper is increased from 12.9% to 25.2%, which shows that the matrix factorization based on context awareness shows better prediction and recommendation performance than the traditional matrix factorization. This is due to the positive effect of contextual bias and global bias on readers and items to be rated, thereby better improving recommendation performance.
Experiments show that the Context-MF algorithm is suitable for complex unstructured data, such as user location context information, time context information, etc. During the recommendation process, the “suggestions” of similar users can broaden the focus of recommendation and can recommend things that are completely different from the items that users liked in the past, that is, things that users may like but have not noticed. The Context-MF algorithm does not require knowledge in professional fields, nor does it require users to locate their own points of interest, such as filling out questionnaires. Instead, it automatically makes corresponding recommendations for users based on displayed information such as user login information or implicit information such as browsing information, improving recommendation performance, and accuracy.
5. Conclusion
This paper first analyzes the feasibility of using IoT situational awareness technology in smart libraries. Secondly, the development status and main theoretical support of situational awareness and information fusion technology are discussed, and on the basis of the analysis of the status quo and influencing factors of smart libraries, the overall structure of the system, functional modules, and system use case diagrams are constructed. Finally, experiments are carried out on the matrix recommendation algorithm integrating context awareness.
Data Availability
The experimental data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
There are no potential competing interests in our paper. And all authors have seen the manuscript and approved to submit to the journal. The authors confirm that the content of the manuscript has not been published or submitted for publication elsewhere.
Acknowledgments
This work was supported by the Research Project of Liaoning Provincial Library Society in 2021 (no. 2021tsgxhqnkt-010).