Abstract

Aiming at the shortcomings of the existing community emergency service platform, such as single function, poor scalability, and strong subjectivity, an intelligent community emergency service platform based on convolutional neural network was constructed. Firstly, the requirements analysis of the emergency service platform was carried out, and the functional demand of the emergency service platform was analyzed from the aspects of community environment, safety, infrastructure, health management, emergency response, and so on. Secondly, through logistics network, big data, cloud computing, artificial intelligence, and all kinds of applications, the intelligent community emergency service platform was designed. Finally, a semantic matching emergency question answering system based on convolutional neural network was developed to provide key technical support for the emergency preparation stage of intelligent community. The results show that the intelligent community emergency service platform plays an important role in preventing community emergency events and taking active and effective measures to ensure the health and safety of community residents.

1. Introduction

In China’s 2021 Intelligent Community Construction and Operation Guide, intelligent community is defined as the basic unit of intelligent city, which is guided by the intelligence, green, and humanism of the community, integrates people, land, and other elements in the community scene, and promotes the communication and mutual assistance of community residents with the public interests of community residents. An innovative model of community management and service integrates various resources such as public management, public service, and commercial service, provides community management and service applications for the government, property management, residents, and enterprises, and improves the scientific, intelligent, and refined level of community management and service. Community is the basic unit of national governance system, community emergency service platform is the key to break through the “last mile” of intelligent community, and community emergency management ability is also an important issue of grass-roots governance [1]. When emergency medical treatment, extreme weather coping, and extreme emotional and psychological comfort prevent waterlogging control, mosquito control, and epidemic prevention, such as sudden event, the community often becomes the subject of prevention and treatment of sudden events, which is to prevent the forefront of sudden events and crisis. Improving the emergency management ability and responsibility of the community, building intelligence community emergency management system, we will enhance people’s awareness of disaster prevention and mitigation [2]. Improving people’s capacity for emergency response and disaster reduction plays an important role in safeguarding the safety of people’s lives and property.

Community emergency tube is to combat the threat of unexpected accidents that have community organization personnel activated within their respective areas, office, family, and society, and the measures and management mechanism, through extensive, positive, and orderly participation in emergency management work, smoothly and orderly solves emergencies, to ensure social stability and people’s happiness and property safety [3]. Community emergency management, as the cornerstone of crisis management system, has a profound impact on the grass-roots management of society, public services, and the maintenance of residents’ public interests. Throughout the COVID-19 outbreak, communities, as grass-roots units, have become the forefront of epidemic control and development, which has played a huge role in the practice of fighting the epidemic. However, at the same time, there is no participation in emergency management, no material guarantee, and the lack of correct concept guidance. Emergency management team quality is uneven; ability is not fine; community residents’ awareness of emergency is not strong, and the ability to help each other is weak. How to make up the short board of community emergency management, use advanced management ideas and modern information technology means, develop a simple, practical, and efficient community emergency service system, and enhance the community to deal with the emergency handling ability of unexpected events, for improving the level and effect of community management personnel emergency service [4]? It is of scientific and academic value and social and economic significance to reduce loss and harm as much as possible.

Therefore, by analyzing the deficiencies of the existing community emergency service platform and the needs of the intelligent community emergency service platform, this paper builds an intelligent community emergency service platform based on convolutional neural network (CNN), improves the social network of community emergency management, builds a community information resource platform, and establishes an internal information exchange system, to form the technical support and convenient service for cross-department networked collaborative problem solving, continuously improve the community’s scientific, networked and all-round service capacity and emergency response effect, realize the technical level of emergency response measures from the traditional passive defense to active early warning, and realize the improvement of community service level through information means.

2. Platform Requirement Analysis

Requirement analysis is an important link in software engineering. Requirement analysis of each application subsystem of intelligent community emergency service platform lays a foundation for subsequent system design and software implementation [5].

2.1. Functional Requirements

The functional requirements description focuses on what the developer needs to achieve. The functions of the intelligent community emergency service platform mainly include some functions.(a)Intelligent emergency management: using sensors, multimedia, and broadband network information tools such as access to a large number of community management and services, the people’s livelihood service, community environment, community infrastructure, community economy, such as information, based on cloud computing, big data, such as the Internet of things a new generation of information technology, data analysis, data mining, data security, and information optimize the community security service and enhance disaster prevention and mitigation capacity.(b)Scientific allocation of resources: after an emergency occurs, scientific management of community emergency resources such as community managers, community plans, shelter materials, social workers and volunteers, and safe places can realize timely allocation of resources, so that the three levels of district, street, and community can be interconnected and contribute resources, so as to meet the needs of disaster emergency response. We will improve our ability to ensure emergency resources.(c)Integration of service platforms: building owners and tenants oriented community, mobile service platform and call center are a body comprehensive service platform, through the centralized, flattening intensification of community management mode, implementation, and community service centers, community health care center, community home endowment center department of resource sharing, data exchange, information flow, and data submitted. Promote safe and intelligent communities.

According to the functional requirements of system modules in detail, including emergency safety planning and management, emergency resource management, emergency capability assessment, and the safety management of the floating population four function modules, each module has a corresponding subroutine below, and the system establishes a database to store all kinds of information related to support the operation of each function module.(a)Emergency safety planning and management: community security planning needs to consider the management objects of vulnerability and disaster in the region where the community is located. As the regional characteristics of each community are different, some common management objects of the community are selected as representatives, managing emergency safety planning. It mainly includes the management of major hazard sources, key personnel, and important infrastructure.(b)Emergency resource library management: the plan management system digitizes the plan elements, forms the emergency plan information into data fields, stores the data fields, and establishes the plan database. It mainly includes the management of community plans, community workers and volunteers, safe places, public activity areas, and other rescue resources.(c)Emergency response capacity assessment: the assessment of emergency response capacity is based on preset performance objectives of emergency management. By using scientific and reasonable evaluation system and methods, the community’s emergency response ability is monitored from all directions and from many angles under the principle of realizing the highest benefit at the lowest cost, so as to make a scientific and reasonable comprehensive evaluation. It mainly includes selection of assessment methods, establishment of assessment models, assessment of capability indicators, publicity of assessment results, and other related processes.(d)Safe management of floating population: the safe management of floating population is an important part of intelligent community emergency service platform, mainly including buildings, houses, household register, residents, and other management visualization, as well as the area of the registered population register management and other related content.

2.2. Nonfunctional Requirements Analysis

In the process of system requirement analysis, nonfunctional requirement is also a very important part, which describes the performance or way of software to complete the functions required by the service platform, so that the software platform has good promotion ability and adaptability [6]. Performance requirements, reliability, response speed, external interface requirements, design constraints, and data storage requirements fall into the category of nonfunctional requirements [7]. In order to ensure that the intelligence community emergency service platform can effectively dispose emergency disaster events and ensure achieving the goal of construction of the platform, the system of the nonfunctional requirements mainly includes the following: the response time (the system can be in the process of data management, daily office, and system management system response time less than 3 seconds), use requirement (verify system parameter configuration and management authorization mode by entering system operator user name and password), system availability (the system should support 7∗24 hour service operation, with an average trouble-free time of 23.90 hours. The average maintenance time of maintainability is less than 2 hours), failure recovery (the system is deployed in dual-system hot backup mode, which is seamless in principle. When one system is faulty, the other system automatically takes over services without affecting service running), database connection (automatic database reconnection mechanism: in the case of network interruption, the application system can proactively discover and automatically reconnect the database), manageability (the system is designed according to the requirements of expansibility, and interfaces with the external system are issued to facilitate the implementation of docking with other systems), and maintainability and safety requirements (this section describes the maintenance window, log requirements, data clearing policies, and log file clearing policies).

3. Systematic Design

Intelligent community emergency service platform is a comprehensive management application software integrating front-end information, management information, data retrieval, and analysis [8]. It can not only display the emergency data collected and analyzed by front-end collection equipment, but also serve as a link between management personnel and community residents. In this paper, intelligent community emergency management is divided into three stages: emergency preparation, response handling, and recovery and adjustment; five core levels: basic network layer, system layer, application layer, product operation layer, and user layer; and three supporting systems: system security system, infrastructure guarantee, and comprehensive operation service. Figure 1 shows the flowchart of intelligent community emergency management based on big data, in which the emergency preparation stage is the key. Therefore, with the help of convolution neural network, the efficient collection, sorting, passed throughout the community emergency management information and scattered the pieces, sorting, analysis of information, for the community monitoring, early warning and emergency resources management to provide data support and scientific basis and achieve precise, agile, efficient, and comprehensive coverage of community emergency services.

The user roles of the intelligent community emergency service platform mainly include community worker and administrator [9], where community workers are the main users of the platform, completing the responsibilities of planning management, resource database management, emergency response capacity platform, and migrant management. An administrator is a specific type of user who has the maximum management rights for the platform. The system example is shown in Figure 2.

As an important view of system architecture design, development view is mainly used to describe the organization and management of software modules [10]. As shown in Figure 3, this paper divides each module of the platform from three levels: presentation layer, business logic layer, and foundation construction layer. The presentation layer consists of Windows UI user interface module. The middle layer is the business application layer, mainly including user management, information management, ability assessment, and other system service modules, through the form of service access interaction with the presentation layer; the bottom layer is database layer, which is the data source of platform operation, including spatial database, plan database, planning database, and population database. The business application layer invokes data from the data layer to respond to requests from business applications.

The scene view can be used to describe the user’s activity interaction process of the same operation or the activity interaction process of different scenarios, which is the dynamic description of user activity components [11]. Taking the preparation of emergency plan as an example, the interactive process of each activity is described, as shown in Figure 4. Users enter the information page, fill in the plan preparation information, save and submit to the review stage, and return to the system to process the information; users review the basic information of the plan, fill in the review opinion, and return the processing message, so as to realize the in-depth analysis and comprehensive application of massive data by the intelligent community.

Through the research and development of community emergency service platform, a perfect community emergency coordination network system has been built, as shown in Figure 5. A wide coordination governance platform has been built, a real-time sharing interactive relationship has been formed, and the centralized and unified leadership model has been followed [12].

4. Design of Emergency Q&A System Based on CNN

4.1. Basic Theory of CNN

A typical CNN model is composed of multiple convolutional layers and pooling layers, followed by one or more full connection layers. There are four core ideas behind it: local connection, weight sharing, pooling, and multilevel [13]. The overall structure of CNN is shown in Figure 5. Each convolution operation will be followed by a pooling operation until the size of the feature graph is reduced to 1, followed by multiple fully connected layers.

4.1.1. Input Layer

Figure 6 shows the shape of the input layer. Consider the input of a channel number of data , the standard image processing , exactly corresponding to the computer red, green, and blue three color channels. The size of each graph of a single channel is defined as (width × height), and the input data can be written as , where represents the index of each data, . Set the input after processing as , and the specific calculation process can be expressed aswhere and .

4.1.2. Padding

In the convolution operation of each layer, in order to keep the width and height of the feature graph unchanged, a very convenient way is to complete the operation, which is essentially to add 0 around the original image [14]. In the completion operation of size , 1 is added to the beginning and end of each row and column of the feature graph. As shown in Figure 7, the red part represents the part of completion, where .

4.1.3. Convolution

The output feature graph is obtained by convolution operation of input data and weight matrix [15]. The weight matrix is actually a tensor with dimension 4, where one dimension (size is ) represents the number of channels for input data in a certain layer, and the other dimension (size is ) represents the number of channels for output data in this layer. The remaining two dimensions define the size (width and height) of the Receptive Field (mathematically known as the convolution kernel), and in practice, the width and height are usually equal [16]. The receptive field enables the input image to be divided into multiple subsets for sequential processing, so similar features can be searched in the input image without considering the location distribution of these features. The width and height of the output image are also determined by the step size. Figure 8 illustrates the above process graphically.

represents the size of the convolution receptive field, and represents the convolution step. Set the width of the input data as and the height as , and then the width and height of the output image can be calculated by the following formula:

For the convolution operation of the first layer, input data is , output is , weight matrix is , and the symbol “” is used to mark different parameters with the same meaning (for example, it represents the number of channels of the output layer and input, respectively). Then, the operation can be expressed aswhere , , , . After each hidden layer, an activation function is required to introduce nonlinear features. After counting completion operation, the input of the next layer is .

4.1.4. Pooling

Pooling operation is essentially a dimensionality reduction process. By taking the average or maximum value of each small area (pooling receptive field, size and step size ) of the input feature graph, an output with the same number of channels, but smaller width and height, can be obtained [17]. It is worth noting that pooling does not take into account the completed data, so the subscript of the symbol is shown in the formula below. Figure 9 is the pooling operation diagram.

The average pooling operation can be expressed as

Maximum pooling is widely used in various studies, so the subsequent pooling operations in this paper are maximum pooling [18]. Setting , represents the pixel index with the largest value in the pooled perception field, and get the input of the next layer:

4.1.5. Convolved to the Full Connection Layer

The last convolution layer of CNN usually makes the convolution receptive field the same size as the input feature graph [19]. In this case, the convolution operation becomes a weighted average process and transforms the two-dimensional input data into one-dimensional output. This process can be expressed as

The next level of input is obtained by activating the function . Figure 10 is the one-dimensional output obtained by convolution.

4.1.6. Fully Connected Layer

After the above operations, the rest of the model looks like a traditional fuzzy neural network (FNN) [20]. Its weighted average process is

4.1.7. Output Layer

The last layer of the model is the output layer:where is the total number of layers of the model. is the output function, and the following Softmax [21] function is usually used when the model is used to classify tasks:

4.2. Backpropagation Calculation Method of CNN

In traditional FNN, only two gradients from the output layer to FC and FC to the upper layer FC need to be calculated, while, in a typical CNN, four new gradients need to be calculated: FC=>Pool, Pool=>Conv, Conv=>Conv, Conv=>Pool [22, 23]. Set the CNN model of a layer, whose input layer is 0, hidden layer is , and output layer is .

4.2.1. Error Calculation

Define the total error rate for a layer relative to the output:where only appears when completion operation is required, and is the mutual entropy Loss Function of the model, expressed aswhere is the Dirac function, and is the label value corresponding to the input data. The error calculation methods between different network layers are calculated as follows:

Output layer to full connection layer:

Take the partial derivative of formula (9)

Take the partial derivative of equation (11)

Substitute the above two equations into equation (12) to obtain

The following mathematical derivation is similar to this process and is not explained step by step.

Full connection layer to full connection layer:where is the derivative of the activation function.

Full connection layer to pooling layer:

Pooling layer to convolution layer:

According to the sampling theorem,

Convolution layer to convolution layer:

Convolution layer to pooling layer:

4.2.2. Weights Update

For weight update calculation, let , where and respectively represent the weights before and after the update [24]. Also, consider the following situations:Full connection layer to full connection layer: Full connection layer to pool layer: Convolution layer to convolution layer, convolution layer to pooling layer, and convolution layer to input layer:

4.3. Emergency Q&A System Based on CNN

In the intelligent community emergency service platform, intelligent question answering is very critical [25]. It is the core of data sharing and data interaction, and the key element of accurately and comprehensively obtaining external data such as comprehensive community governance, community hospitals, intelligent city operation, and management and emergency resources [26], the premise of intelligent question answering is the design of semantic matching algorithm, so as to grasp the real-time information of danger sources, the classification and management of vulnerable groups such as the old and the weak, the sick and the young, and the timely deployment of spatial information such as traffic roads, public places, and water supply and power facilities.

Studies at home and abroad show that convolutional neural network has outstanding advantages in text feature extraction, and the work of sentiment analysis, text classification, semantic matching, and intelligent recognition based on convolutional neural network has achieved remarkable results in open data sets and evaluation [27]. A typical convolutional neural network structure used for sentence modeling is shown in Figure 11.

Convolutional neural network needs to process two sentences and finally combine the two sentences for classification [28]. Therefore, this paper uses a parallel convolutional neural network architecture to process the two sentences. The overall structure of the network is shown in Figure 12. The figure shows two parallel convolution neural network frameworks to deal with two sentences, each sentence word vector of two-dimensional matrix, respectively, as two convolution of the neural network inputs, and then the convolutional neural network through the layers of convolution and pooling high-level abstract composition feature extracting operation, after the last convolution and pooling feature vectors of two sentences, Then, input to a nonlinear hidden layer for nonlinear mapping, and finally input to a logistic regression classifier for classification. The output of the network is a class standard of 0 or 1 and the confidence degree of classification.

However, in the above basic parallel convolutional neural network, there is a lack of interaction between the two sentences at the convolutional layer and the pooling layer, and the low-dimensional vector finally obtained only contains the high-level information of the sentence [29]. In this process, some relevant information of the sentence itself may be lost. In this paper, an improved attention mechanism is added after each pooling layer to modify the model structure. The overall structure of convolutional neural network with attention mechanism is shown in Figure 13. The figure shows that, after each convolution operation to join focus attention mechanism, and the network has been unearthed in the underlying computation of the semantic relationship between two sentences, through constant weight highlighting the correlation and difference between the two sentences to get an effective sentence said after the information, so in the actual experiments, it will also obtain a good effect.

Question answering engine is a control module of the whole question answering system, which is mainly responsible for the system input processing and some external information application. The semantic matching module is mainly CNN algorithm [30]. In this paper, the offline way is used to train the semantic matching model first, and the model code is designed abstractly. A matching interface is directly provided to the question and answer engine module. The system construction process is divided into system architecture and online deployment. Figure 14 shows the overall system architecture. The automatic question answering system based on CNN can digitally decompose the elements of emergency plan, form the information of emergency plan into data fields, store the data fields, and establish the plan database. The system provides personnel database input for emergency volunteers by function, profession, industry, and region. At the same time, maintain the personnel, with the function of adding, deleting, modifying, and querying personnel information, and train emergency volunteers. The system provides the functions of emergency training plan and training knowledge base. When people need to evacuate and take refuge, the system can take measures to arrange people’s refuge according to the evacuation route provided by the system, forming a linkage whole.

Four different speech signals are selected to realize effective speech classification and recognition through CNN. The parameters of model training are set as follows: Learning Rate: 0.0001; Batch Size: 420, that is, full data set input; iteration times (Epoch): 8 0. After each iteration, the model parameters were updated, and the loss value and accuracy of the model on the test set and the accuracy of the model on the verification set were calculated. In the training process, the training loss, training accuracy, and test accuracy of the model are shown in Figure 15.

It can be seen from the figure that the loss function decreases with the increase of iteration times and finally approaches 0 after 80 iterations. The classification accuracy of training set and verification set fluctuates with the increase of iterations and converges stably to 100% after the number of iterations exceeds 60. The samples in the test set were used to test the trained model, and the classification accuracy was shown in Table 1.

It can be seen from the classification results of CNN that the speech recognition algorithm has high accuracy and can accurately identify the categories of speech signals, effectively avoiding artificial subjective arbitrariness.

5. Conclusion

This paper developed the wisdom of the community emergency service platform based on CNN, fully used the Internet, cloud computing and big data, artificial intelligence cutting-edge technology, and had realized the display of all kinds of sensors, running state, and the distribution of testing data, based on the analysis of speech recognition, the wisdom, creating various warning strategies, as well as the trend of changes of unexpected events of the community to make predictions, and the factors affecting the health of community residents would be eliminated as soon as possible. The main work and conclusions are summarized as follows:(1)Through the analysis of the requirements of the emergency service platform of intelligent community, the design principles of the emergency service platform are clarified. The used case view, development view, and scene view are designed to solve the problem of data interaction and provide a basis for the subsequent module development.(2)Through the emergency question answering system designed by CNN, the semantic matching algorithm has high precision, the automatic question answering system construction is reasonable and feasible, and the system speech recognition and return accuracy is high, thus providing strong technical support for the community emergency response.(3)The developed intelligent community emergency service platform has the characteristics of high security, wide scalability, and strong stability. It is of great significance to optimize and improve the community emergency management ability and promote the construction of safe intelligent community. It provides a refined, easy to operate, efficient, and all-round information tool for community emergency management.

Data Availability

The dataset can be accessed upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This study was supported by Health and Economic and Social Development Research Center of Guangxi University Humanities and Social Sciences Key Research Base: The practical mechanism of social work in public health emergencies in Guangxi (no. 2021RWB05).