{'fraction_non_alphanumeric': 0.021418451537628135, 'fraction_numerical': 0.0035836319693307774, 'mean_word_length': 5.172839506172839, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design and Implementation of WeChat Mini Program for University Dormitory Based on SOA

According to the actual demand of management on university dormitory, a WeChat mini program for university dormitory based on SOA which makes teachers and students manage dormitory conveniently and efficiently is proposed. The Web-Service is adopted to encapsulate back-end functions into a series of services for front-end calls. The WeChat mini program is used as a front-end development carrier to realize the management functions of university dormitory. Experiments show that the proposed system is stable and the working efficiency is greatly increased. The results show that the application system can capture the requirements of student dormitory management, with good scalability.


Introduction
Student dormitory management, the important component of school running [1], with traditional artificial management mode, is nearly impossible for teachers and students to carry out effective management. In order to solve the management problems caused by the change of dormitory requirements in universities, the management system of student dormitory is implemented with the mode of agile development in reference [2]. Thinking about the management system based on ERP (Enterprise Resources Planning), the information platform of CPR digital campus is put forward in reference [3] to realize the integration of dormitory information resources. The dormitory management information system based on the basic principle of MIS is constructed by the C/ S model and Delphi development tools [4].
Service-Oriented Architecture (SOA) is a type of software design that can combine services into applications [5]. In reference [6], the idea of registering standardized metadata through SOA is proposed, and then a statistical metadata computing system based on SOA is developed.
WeChat mini programs are sub-applications within WeChat where WeChat users can easily gain access to other apps. Compared with mobile apps [7] [8], WeChat mini programs can be used without downloading and installing, and the user interface and operation flow can be unified [9].
Based on our past work [10][11][12], we use service-oriented viewpoints to analyze and integrate the heterogeneous system integration. The dormitory information of Huaiyin Institute of Technology is taken as the research object. The WeChat mini program is used to connect users and services, and provide diversified campus functions to implement dormitory management. In the second part, we construct the structure of the university dormitory management system. The SOA technology used in the system is introduced in the third part. In the fourth part, we introduce the WeChat mini program for university dormitory management. In the fifth part, we come to the conclusion.

System Architecture
The software architecture design of the university dormitory management system using Service-Oriented Architecture technology can encapsulate multiple systems into services [13]. The system is mainly composed of server layer, middleware layer, WeChat mini program layer and client layer fourlayer structure. Figure 1 shows the system architecture.

Students
Teachers Administrators  Server layer stores database, data interfaces and Web server data; Middleware layer is responsible for data acquisition and exchange between the server and the WeChat mini program; WeChat mini program layer provides front-end interface and operational data processing; Client layer allows users to access the WeChat mini program for university dormitory arrangement by searching or scanning QR code.

System Technology Structure
The design of the system technology architecture is shown in Figure 2.  Figure 2. System technology structure

System Functions
The system functions include user information management, dormitory evaluation management, water and electricity management, maintenance management, dormitory daily affairs management, card management, student examination arrangement and score query, etc.

Analysis and Design Based on SOA
There are many different websites for the daily management of university dormitories. Visit each website needs to be authenticated and waiting for the website to respond, which is not only a waste of time but also reduces the efficiency of dormitory management. In addition, the user data distributed in the server costs software workers a lot of time, and too scattered user data is not conducive to statistics and management. Traditional languages such as Java mainly represent objects as classes [14], while users generally focus on software functions and take functional services as interfaces. Therefore, SOA is closer to the needs of users.
In the view of the low coupling and high scalability of SOA, we integrate the service object, functional structure and process relationship on the basis of the existing independent university system. What we need to pay attention to is the call of each service interface, without involving the underlying programming interface and understanding the specific implementation of the underlying service.
The idea of hierarchical division is applied in the system. The whole system is divided into the presentation layer, business process layer, service layer, system layer and data layer. The specific architecture diagram is shown in Figure 3. From the above figure shows, the design of the system SOA structure can be divided into the following five layers: Presentation Layer. Mainly responsible for the front-end interface of dormitory management system through the WeChat mini program. The interface can be flexibly configured according to different users.
Business Process Layer. Responsible for listening and monitoring Web Service services published by service providers [15]. The requests sent from different business systems can be processed in time, and then the corresponding service modules will be properly dispatched to ensure the normal operation of the system. Service Layer. Composed of a series of service models. The systems that need to be called in the dormitory management are encapsulated into a unified standard for service interaction specification. When the service layer receives the request sent by the business process layer, the service module can be flexibly divided and assembled, then the business component will be transformed into a service model, and finally the corresponding request is completed. If other university business systems need to interact with the dormitory management system, they can operate directly at the service layer. Only need to do is to follow the uniform standard interface for data acquisition. We do not need to be concerned about the need for the technology used by the third-party systems. System Layer. Aimed at integrating systems related to daily dormitory arrangement, such as university educational administration system, student affairs department system, university personnel management system, university financial management system. Data Layer. Mainly responsible for storing and managing data, including user database and system database.
The architecture has good generality and scalability. Through applying the above architecture, the functions and business components in the system application can be extracted.

Advantages of WeChat Mini Programs
B/S structure has difficulty realizing individualized functions and requires the support of browsers, while C/S structure limits the extension of system functions and software upgrades. WeChat mini programs make up for the shortcomings of the above two structure. The system not only improves the user experience but also speeds up the loading of the dormitory management system. WeChat mini programs are more efficient for users and more cost-efficient with limited capability compared with native mobile applications. WeChat mini programs are built with a special framework which is based on JavaScript designed by Tencent.

Technical Implementation
The framework of the WeChat mini program for university dormitory is mainly divided into view layer (View) and logic layer (App Service). Among them, the view layer is used to render the page, constructed by wxml files and wxss files. The logic layer written in JavaScript is used to handle transactions, request network, and process data. Data transmission and event systems are provided to the view layer and the logic layer. The structure of the WeChat mini program for university dormitory management is shown in Figure 4. The directory structure of the WeChat mini program project for university dormitory management is shown in Figure 5. The images folder is used to provide pictures for the system interface; The pages folder mainly stores page folders, including the core function page, personal home page, dormitory news page and so on; The utils folder stores tool classes, encapsulating common methods; app.js, app.json, and app.wxss files in the root of the project are used as processing logic, public settings, and style settings. In the WeChat mini program for university dormitory management, two kinds of data interaction methods are mainly used.

Data Interaction with Local
Cache. The data locally generated by the user can be persisted. When a user logs in the mini program, the home page "index" will call the getUser () function in the app.js. The function calls the wx.setStorage() to store the data returned after the successful login in the specified key of the local cache.
Finally, the function processData () is invoked to further parse the stored data through JSON, and then return the data.
The "cache" corresponding to the key can be synchronously acquired from the local cache through wx.getStorageSync(). wx.clearStorage() will be called to asynchronously remove "cache" if the user fails to log in or the HTTP request is wrong.

Data
Interaction with Server. The data exchanges between the WeChat mini program for dormitory management and background data are Http Requests and Web Socket connections. The format for data exchange is JSON, which can be easily parsed by the client side [13]. The data interaction process between the WeChat mini program and the WeChat server is shown in Figure 6.  Figure 6. The flow chart of WeChat mini program access server The process of the data interaction is as follows: In order to reduce the impact of network latency, the WeChat mini program loads the JSON data provided by the server when teachers and students enter the system; When teachers and students access the dormitory information data, WeChat API wx.request is called to request data from the server; The data requested by the WeChat mini program is processed by the server and then the JSON data will be sent through the Web Socket connection; When teachers and students have finished, the synchronization data will be submitted to server and in other cases will be processed in the memory of the WeChat mini program.

Conclusion
In this paper, the concept of SOA is adopted to integrate multiple independent university information systems to realize the direct interaction of services and data sharing. Therefore, a university dormitory management system based on SOA is proposed. Taking system performance and user experience into account, the WeChat mini program is considered as the front-end development carrier. The dormitory arrangement system based on the WeChat mini program is a light program that does not need to be downloaded or installed. Teachers and students can open the application by scanning the QR code or searching by keywords. Through stress concurrency test and the daily use of the system, we find that the system can reach a stable and rapid response when multiple users access the system at the same time.

Acknowledgment
The work is supported by the fund from National Undergraduate Innovation and entrepreneurship training program (201711049049X). We would like to express our thanks to the anonymous reviewer for their constructive comments.