# Deep Learning Models and Social Governance Guided by Fair Policies

Authors: Kai Wang; Zhen Wang
Journal: Scientific Programming
 (2022)

---

## Abstract

With the rapid advancement of information technology, artificial intelligence and machine learning have become the central technology tools for information sharing. To speed up the efficiency of information resource transmission of national government departments and improve the informatization level of government social management and public service systems, the persona system is designed using an artificial neural network, and a social service and management resource pool system is developed. The behavior data randomly generated by users in daily life is collected and cleaned, and training samples are extracted for training an artificial neural network. Next, the demographic attribute tags and interest tags are modelled, and the social service and management resource pool system is built and tested. Results show that for the population attribute label construction, the index value using the app name is mapped to 0 or 1, and the sample sampling ratio is set to 1.0. The proposed model achieved the overall accuracies of 85.2%, 74.5%, and 99.0% for the prediction of constructed age, academic qualifications, and interest label, respectively. The constructed system greatly deepens the visualization of the characteristics of social governance elements. The system can enhance the level of resource sharing by government departments and provide the foundation for spatial decision-making in smart social governance.


---

## Body

## 1. Introduction

The sharing of program information among government agencies can help achieve important public benefits of increased productivity, improved policymaking, and integrated public services. Government information sharing allows information exchange between different government agencies as well as between public and private institutions. Sharing information enables enhanced efficiency, a better quality of processes and services, and improved transparency. The implementation of information sharing initiatives requires different types of initiatives such as technical, organizational, institutional, and political [1]. In the government resources, sensor information, public information, and Internet information continue to gather. More and more institutions or individuals use machine learning, accurate data analysis, and other controllable technologies to accurately analyze the elements of social governance. Nowadays, persona technology is increasingly used in social media, e-commerce, mobile Internet, and e-government [2].More and more researchers have researched the application of portrait technology in social governance. Elgammal et al. [3] pointed out that corporate governance and corporate social responsibility are driven by ethical practices. The relationship between corporate ethics and corporate social responsibility has been studied by many researchers. They showed that there is a significant correlation between corporate ethics and corporate social responsibility and ethical practices have a positive impact on corporate social responsibility. Qiang et al. [4] described that China, with a population of 1.4 billion, is experiencing perhaps the largest urbanization and modernization in human history. In this context, in 2014, the multidisciplinary research team of Tsinghua University launched a social governance experiment in Qinghe Street, Beijing. The goal of the project was to discover and solve social problems in urban communities and to study changes in community governance models in large cities. As an innovative model of social governance, this new rural cooperative medical system has important theoretical and practical significance. Widyawati [5] pointed out that the convergence of government information and sensor information can promote the continuous development of precision social governance.Personas are progressively used in policymaking to aid in planning more human-centred policies and services to the population [6]. In the transportation field, personas are mostly applied concerning diverse mobility behavior patterns to provide services for different types of travellers, e.g., based on vehicle driving behavior patterns defined by motives for car use or the number of annual vehicle kilometres travelled, to allow for various levels of energy consumption [7]. Other approaches use personas for expressing different types of public transport passengers, drivers, or ride-sharing customers for considering different preferences and expectations regarding vehicle design or user experience, e.g., by combining different levels of openness towards various features. Personas are a powerful tool for communication in design teams, as the technique forces designers to consider social and political aspects of design that otherwise often go unexamined. Personas also provide a shared basis for communication, e.g., between clients and designers. Aries and Faily [8] proposed the development and application personas based on empirical data relevant to the business, providing a useful means to identify audience awareness needs, communicate with a predefined security theme for the program cycle. However, the personas generated were generally based on more technical roles. Collection of data from less technical roles providing a balanced spread of the business audience would be more appropriate when fully applying this methodology in a real-world scenario of a persona-centred ongoing information security awareness solution for the workplace. Schoch et al. [9] created personas to understand social barriers and used them for prototyping a web app. One of the major limitations of personas is that they can hardly account for change, especially fast change. Even the well-constructed personas may become partially inaccurate after some time, resulting in the need for additional effort, time, and expense to repair inconsistencies and lost credibility.More and more researchers use personas and information dynamic perception technology and deep learning technology to accurately analyze the elements of social governance. However, this research work still has certain shortcomings. In this study, a persona system is designed using machine learning techniques, and a social service and management resource pool system is developed. The behavior data training samples generated by different users in their routine life is collected, cleaned, and used to train an artificial neural network. Moreover, the demographic attribute and interest tags are modelled, and the social service and management resource pool system is implemented and evaluated. The model achieved overall prediction accuracies of 85.2%, 74.5%, and 99.0% for age, education background, and interest tags, respectively. In addition, the constructed system links the data exchange channels of various departments in the government, enabling users to realize the interconnection and sharing of information through basic service interfaces.The rest of the paper is ordered as follows: Section2 provides detail about the construction of the persona model for social governance. Section 3 illustrates the obtained results and analysis, and the conclusion is presented in section 4.


## 2. Construction Method of the Persona Model of Social Governance Elements

### 2.1. User Persona Technical Analysis

User personas link user data and big data applications. The purpose of user personas is to tag target users with a series of user tags such as age, gender, and educational background. The user is a complex whole, and it is difficult to describe it by a single term. Therefore, one label in the user persona is only used to describe one dimension of the user. A user needs to be described with multiple tags. The characteristic of user persona lies in the use of mathematical methods to describe the characteristics of a person in a particular business and can be interpreted by machines [10]. Machine-generated models are difficult to use for training on unprocessed log data. If the data is labeled before the model training, the data distribution can be easily analyzed, and the data operation can also be transformed. It is essential to categorize the data characteristics in the user persona and present it in a highly interpretive, multidimensional, and labeled form to meet various business needs. The purpose of user personas can be divided into two points. One is to classify users. For example, merchants can make personalized recommendations to users according to different types of users, so that users are stickier to products. The other is to analyze the characteristics of users, tap potential users, and expand the business. The role of user personas is very important. The core job of user persona is labeling, which can be processed by people and is convenient for computer processing [11]. The user persona model is shown in Figure 1. Likewise, the persona model of a person formed according to the life of a person is shown in Figure 2, and the process of establishing a user label system is shown in Figure 3.Figure 1
Five aspects of user personas.Figure 2
A persona model of a person.Figure 3
User label system establishment.In Figure1, user personas are divided into five aspects.(i)
Target: it uses specific mathematical methods to describe the characteristics of a person in a specific business(ii)
Way: the machine can interpret the way(iii)
Organization: it is to organize the data(iv)
Standard: it is to build a knowledge system related to a specific business(v)
Validation: it uses quantitative indicators to evaluate the modelFigure2 shows that the persona model of a person is related to time. The person shown in Figure 2 was born on XX Street in 1990, went to elementary school in 1996, joined a company in 2012, and got married in 2013. Figure 3 shows that the construction of the user tag system is divided into three stages. The first stage is basic data, app behavior, Internet behavior, location behavior, geographic location, voice, semantics, and text. The second stage is user tag mining, demographic attributes, online behavior, interest preferences, content preferences, and purchase intentions. The third stage is user persona, gender, age, geographical distribution, hobbies, purchase intention, purchase, and occupation [12]. Satisfying business needs is a prerequisite for establishing user personas. To build a user profile, it is necessary to clarify the data rows used in the construction of the target to lay the foundation for the specified label. User persona tags are divided into two categories, the first category is static tags, and the second category is dynamic tags. The demographic attribute tags in static tags are relatively stable and generally do not change [13]. They are often used to describe the most basic characteristics of users. There are dependencies between static tags. Using original data, what can be constructed is fact tags. Through simple statistical methods, higher-level preference tags can be constructed. Using deep learning techniques in machine learning tools can also predict labels. User persona technology is adopted to construct a persona model of social governance elements. The profile model of social governance elements is shown in Figure 4.Figure 4
Information persona model of social governance elements.Figure4 shows that the persona model of social governance elements has a three-tier structure. The function of the underlying structure is to build a persona model, which is specifically divided into basic attributes, location characteristics, behavior characteristics, and relationship networks. The middle structure is analysis algorithms, which are natural language processing, machine learning, clustering algorithms, and prediction algorithms. The top-level structure is the basic data, which are residence, life, production, and medical care. The user label system is shown in Figure 5, which shows that population attributes are divided into basic attributes and geographic locations. The basic attributes can be divided into gender, age, and educational background. Industry preferences can be divided into automobiles, real estate, tourism, and finance.Figure 5
User tag system.The priority of various label construction is shown in Figure6. It shows that from the bottom to the top are the original data, fact labels, model labels, and high-level labels. Among them, fact tags can be divided into usage times, historical trends, active days, and complaints times. Model tags are divided into demographic attributes, industry interests, geographic locations, and product preferences, and advanced tags are divided into population attributes and potential loss.Figure 6
The priority of various label construction.Jieba is a common method of word segmentation [14]. The working principle is to combine the possible words in the generated sentence into a ring graph. Next, dynamic programming is used to calculate word frequency probability. Finally, the hidden Markov model (HMM) is employed to recognize unregistered words [15]. The schematic diagram of the Jieba word segmentation principle is shown in Figure 7:Figure 7
Schematic diagram of the Jieba word segmentation principle.A complete back propagation (BP) neural network consists of an input layer, an output layer, and multiple hidden layers. In the BP neural network, the neurons between the hidden layers are connected, but the input layer and the hidden layer, and the hidden layer and the output are fully connected [16]. The BP neural network is composed of three processes:(i)
When the input signal enters the BP neural network, the signal flows through the input layer to the hidden layer and passes to the output layer. When the signal is transmitted to the neuron on the hidden layer, it is transmitted to the next hidden layer after the action of the neuron on the hidden layer, finally passed to the output layer.(ii)
The difference between the actual output and the expected output of the network is used as the error signal, and the output layer of the neural network is used to modify the connection weights layer by layer through the hidden layer item output layer.(iii)
The first two steps were performed repeatedly until the global error of the network reaches the threshold.As the network depth continues to deepen, the increase in the accuracy of network training will tend to be flat. From AlexNet to VGGNet, the number of network model layers continues to increase, and the effect is getting better and better. As the number of network layers increases, the network will have problems such as overfitting, degradation, gradient explosion, and gradient disappearance. To solve these problems, the residual network is often optimized [17]. Although the depth of this network is deeper than that of ordinary convolutional neural networks (CNNs), the computational efficiency is higher than that of ordinary CNNs. The key point of the residual network is to let the information flow through the shortcut connection to the shallow layer. The residual network solves the problems of network degradation and gradient explosion caused by the increase of the number of layers in the CNN. The recurrent neural network (RNN) performs very well in the field of neurolinguistic programming (NLP) [18]. In the RNN model, each input node corresponds to a hidden node, and the hidden nodes form a linear sequence, and the information is passed from the front to the back. A recurrent neural network is a neural network with a feedback structure. Its output is not only related to the weight of the current input network but also related to the input of the previous network. The RNN has the concept of time sequence, and the state at the next moment is affected by the state at the current moment. Some researchers have called recursive networks as deep networks [19]. Its depth can be expressed in three aspects. The first aspect is the input depth, the second is the output depth, and the third is the time step. An expanded RNN structure is shown in Figure 8.Figure 8
Schematic diagram of the RNN model.The computation of the forward propagation of the RNN network is shown in the following equations:(1)akt=∑h=1Hwhkbht,(2)aht=∑i=1Iwihxit+∑h′=1Hwh′hbh′t−1,(3)bht=θhaht,where b is the calculated value of the activation function, a is the value calculated by the aggregation, w represents the link parameter between different nodes, the output layer is wk, and the hidden layer is wh.The computation process of the backward propagation of the RNN network is shown in the following equations:(4)δht=θ′aht∑k=1Kδktwhk+∑h′=1Hδh′t+1whh′,(5)δjt=∂L∂ajt,(6)∂L∂wij=∑t=1T∂L∂ajt∂aji∂wij=∑t=1Tδjtbit.In equations (4), (5), and (6), whk is the weight matrix of l × n, connecting l hidden layer units to n output layer units, whh′ denotes the n× n weight matrix, connecting k hidden layer units to l output layer units, δjt means the hidden layer vector, wij represents the fixed parameter, aht is the fixed coefficient, bit is the weight, and L is the parameter in the matrix unit.The advantage of the RNN neural network is that the concept of timing is added to the neural network. This makes it possible to set different inputs of the RNN neural network according to the time node. In the RNN neural network, data can also be multi-input. The disadvantage of RNN is that it cannot solve the problem of long-term network dependence, gradient disappearance, and explosion. For this reason, the long short-term memory (LSTM) network is proposed in multiple studies [20, 21]. One neuron in the LSTM model contains one cell state and three gate mechanisms. The cell state in the LSTM model is the basis of the LSTM model, and its function is equivalent to the model memory. With the change of time, the cell state also changes to a certain extent. The LSTM model uses forget gates, update gates, and output gates to protect and control the state of cells. The information recorded in the LSTM network is updated and determined by the gate mechanism.Vasvani et al. [22] proposed a structural transformer that processes sequence models by the attention mechanism. BERT (bidirectional encoder representations from transformers) applies the bidirectional training of the transformer. The transformer in the BERT network refers to the complete encoder-decoder framework. The complete encoder-decoder framework includes mutihead self-attention, layer norm, skip connection, and transformer structure. The visual attention mechanism is a signal processing mechanism similar to the human brain. Humans can select local areas of focus by observing the overall picture. Then, more attention is focused on the focus area than the normal area to get more detailed features and suppress other useless information. According to the big categories, the attention mechanism can be divided into soft attention mechanism and hard attention mechanism. The calculation method of the soft attention mechanism is to pack all the components and perform weighting operations on the retained components [23]. The calculation method of hard attention is to select some components for weighting. A schematic diagram of this attention mechanism is shown in Figure 9.Figure 9
Schematic diagram of attention mechanism.The essential idea of the attention mechanism is to treat the constituent elements in the input as the composition of key-value pairs of data. The key-value pair data correspond to the element query in the output. By calculating the similarity between the query element and each key, the weight coefficient of each key corresponding to the key value can be obtained. Multiple key values is summed to obtain the final attention mechanism value. For multivariate time series forecasting, the introduction of an attention mechanism can focus on the relevant variable dimensions that are dependent on the forecast time series, instead of all input sequences.The BERT model is a pretrained model with excellent performance. When using it, there is no need to use a large amount of data to train it and fine-tune the pretraining model to be used for downstream NLP tasks. The schematic diagram of the BERT model is shown in Figure10, and the transformer encoding is shown in Figure 11, respectively.Figure 10
Schematic diagram of the BERT model.Figure 11
Transformer encoder.The transformer encoding is divided into the following three processes:Token embeddings: it is responsible for converting each word into a vector of fixed dimensions. BERT uses the WordPiece vocabulary for tokenization.Segmentation embeddings: it is responsible for separating two sentences with symbols. Each word in the first sentence is assigned 0, and the token of the second sentence is assigned 1.Position embeddings: it helps to add position coding.


### 2.2. Research on Logistic Regression and Support Vector Machine (SVM) Model

Spark is designed to perform iterative work, which is consistent with the training process of machine learning algorithms. MLlib is a spark’s machine learning library. It supports classification, clustering, regression, and collaborative filtering. Classification is the most extensive in commercial applications. MLlib classification and regression-related algorithms are shown in Table1. The loss function and its subgradients in MLlib are shown in Table 2, and the core content of the MLlib algorithm library is shown in Figure 12, respectively.Table 1
MLlib classification and regression-related algorithms.
Problem typeAlgorithmBinary classificationLinear support vector machine (LSVM), logistic regression, decision tree, random forest, gradient descent decision tree (GBDT), and naive Bayes model (NBM)Multiple classificationsLogistic regression, decision tree, random forest, and NBMReturnLinear least squares, lasso, ridge regression, decision tree, random forest, GBDT, and isotonic regressionTable 2
Loss function and its subgradients in MLlib.
loss fuctionLw,x,ygradient or subgradientHinge lossmax0,1−ywTx,y∈−1,+1−yxifywTx<10otherwiseLogistic losslog1+exp−ywTx,y∈−1,+1−y1−1/1+exp−ywTxSquared loss1/2wTx−y2,y∈RwTx−yxFigure 12
The core content of the MLlib algorithm library.The models used are LSVM and logistic regression. The convex optimization method is used to optimize the objective function, as given in the following equation:(7)ℱw:λRw+1n∑i=1Lw;xi,yi.The objective function optimized by the logistic regression algorithm is shown in the following equation:(8)Lw=∑i−yilog1+e−wtxi−1−yilog1+ewtxi.In equation (8), xi is the i-th data vector, yi indicates the category of xi, and w∈Rn denotes the desired vector and yi∈0,1 is the category of xiw∈Rn and is the desired vector. The method of calculating the classification accuracy of LSVM is to find a hyperplane in a high-dimensional space. This hyperplane is used to classify the points in the space and calculate the distance between the points and the hyperplane to evaluate the classification accuracy. The loss function of the SVM algorithm is computed as(9)∑i=1N1−yiwxi+b++λw2.


### 2.3. Method of Establishing the Framework of the Resource Pool of Social Governance Elements

Since user data systems require a lot of data processing work, common big data processing systems such as MapReduce and Spark are used. A common big data processing platform is the Hadoop distributed file system (HDFS). The user’s behavior on the app is collected and stored in the Hadoop distributed file system. YARN is used to manage data resources. It was introduced in Hadoop 2.0 to remove the bottleneck on job tracker which was present in Hadoop 1.0. The data processing flow is as follows: the client first sends a request and according to the corresponding protocol, the server log is stored [24]. The server log is retrieved using a script file. The engine calls the program package to load the content in the temporary file, stores the structured data in different folders, and stores the parsed data on HDFS. In the establishment of the label, the gender label and the educational background label in the population label are selected. Among them, the gender label is divided into male and female. The academic qualifications are labeled as lower, middle, and higher. The data used comes from real data from a statistical company. Two million data points are used as the gender label seed, and the behavior data in the app is intersected. 270,000 data points are retained as training samples, and 2.2 million degree labels are used as training samples. Because there are many subcategories of the interest tag, the loan category under the finance tag is selected. In this way, the framework of the social governance element resource pool was established. First, a classification system needs to be established. By sorting out 200 million pieces of information shared by 30 departments, forming an information resource directory, and establishing multiple classifications and labeling systems. Next, the rules are constructed. To study the situation of the functional department data, the data analysis method is used to obtain the similarities and differences of the population and the degree of matching. The authoritative data of the authoritative department is the rule basis of the model, which is used to compare and match all information fields. The resource pool of social governance elements by the user profile model consists of three parts: construction of resource pool data warehouse and storage mechanism, the design of persona model of social governance elements, and the design of label system rules. The experimental programs are divided into four types:Solution 1: count the names of used apps and create an index tableSolution 2: count the number of times and use the number filling featureSolution 3: map the secondary classification directory and establish a feature indexSolution 4: same as Solution 3, except that the number of uses of the secondary directory is accumulated and filled


## 2.1. User Persona Technical Analysis

User personas link user data and big data applications. The purpose of user personas is to tag target users with a series of user tags such as age, gender, and educational background. The user is a complex whole, and it is difficult to describe it by a single term. Therefore, one label in the user persona is only used to describe one dimension of the user. A user needs to be described with multiple tags. The characteristic of user persona lies in the use of mathematical methods to describe the characteristics of a person in a particular business and can be interpreted by machines [10]. Machine-generated models are difficult to use for training on unprocessed log data. If the data is labeled before the model training, the data distribution can be easily analyzed, and the data operation can also be transformed. It is essential to categorize the data characteristics in the user persona and present it in a highly interpretive, multidimensional, and labeled form to meet various business needs. The purpose of user personas can be divided into two points. One is to classify users. For example, merchants can make personalized recommendations to users according to different types of users, so that users are stickier to products. The other is to analyze the characteristics of users, tap potential users, and expand the business. The role of user personas is very important. The core job of user persona is labeling, which can be processed by people and is convenient for computer processing [11]. The user persona model is shown in Figure 1. Likewise, the persona model of a person formed according to the life of a person is shown in Figure 2, and the process of establishing a user label system is shown in Figure 3.Figure 1
Five aspects of user personas.Figure 2
A persona model of a person.Figure 3
User label system establishment.In Figure1, user personas are divided into five aspects.(i)
Target: it uses specific mathematical methods to describe the characteristics of a person in a specific business(ii)
Way: the machine can interpret the way(iii)
Organization: it is to organize the data(iv)
Standard: it is to build a knowledge system related to a specific business(v)
Validation: it uses quantitative indicators to evaluate the modelFigure2 shows that the persona model of a person is related to time. The person shown in Figure 2 was born on XX Street in 1990, went to elementary school in 1996, joined a company in 2012, and got married in 2013. Figure 3 shows that the construction of the user tag system is divided into three stages. The first stage is basic data, app behavior, Internet behavior, location behavior, geographic location, voice, semantics, and text. The second stage is user tag mining, demographic attributes, online behavior, interest preferences, content preferences, and purchase intentions. The third stage is user persona, gender, age, geographical distribution, hobbies, purchase intention, purchase, and occupation [12]. Satisfying business needs is a prerequisite for establishing user personas. To build a user profile, it is necessary to clarify the data rows used in the construction of the target to lay the foundation for the specified label. User persona tags are divided into two categories, the first category is static tags, and the second category is dynamic tags. The demographic attribute tags in static tags are relatively stable and generally do not change [13]. They are often used to describe the most basic characteristics of users. There are dependencies between static tags. Using original data, what can be constructed is fact tags. Through simple statistical methods, higher-level preference tags can be constructed. Using deep learning techniques in machine learning tools can also predict labels. User persona technology is adopted to construct a persona model of social governance elements. The profile model of social governance elements is shown in Figure 4.Figure 4
Information persona model of social governance elements.Figure4 shows that the persona model of social governance elements has a three-tier structure. The function of the underlying structure is to build a persona model, which is specifically divided into basic attributes, location characteristics, behavior characteristics, and relationship networks. The middle structure is analysis algorithms, which are natural language processing, machine learning, clustering algorithms, and prediction algorithms. The top-level structure is the basic data, which are residence, life, production, and medical care. The user label system is shown in Figure 5, which shows that population attributes are divided into basic attributes and geographic locations. The basic attributes can be divided into gender, age, and educational background. Industry preferences can be divided into automobiles, real estate, tourism, and finance.Figure 5
User tag system.The priority of various label construction is shown in Figure6. It shows that from the bottom to the top are the original data, fact labels, model labels, and high-level labels. Among them, fact tags can be divided into usage times, historical trends, active days, and complaints times. Model tags are divided into demographic attributes, industry interests, geographic locations, and product preferences, and advanced tags are divided into population attributes and potential loss.Figure 6
The priority of various label construction.Jieba is a common method of word segmentation [14]. The working principle is to combine the possible words in the generated sentence into a ring graph. Next, dynamic programming is used to calculate word frequency probability. Finally, the hidden Markov model (HMM) is employed to recognize unregistered words [15]. The schematic diagram of the Jieba word segmentation principle is shown in Figure 7:Figure 7
Schematic diagram of the Jieba word segmentation principle.A complete back propagation (BP) neural network consists of an input layer, an output layer, and multiple hidden layers. In the BP neural network, the neurons between the hidden layers are connected, but the input layer and the hidden layer, and the hidden layer and the output are fully connected [16]. The BP neural network is composed of three processes:(i)
When the input signal enters the BP neural network, the signal flows through the input layer to the hidden layer and passes to the output layer. When the signal is transmitted to the neuron on the hidden layer, it is transmitted to the next hidden layer after the action of the neuron on the hidden layer, finally passed to the output layer.(ii)
The difference between the actual output and the expected output of the network is used as the error signal, and the output layer of the neural network is used to modify the connection weights layer by layer through the hidden layer item output layer.(iii)
The first two steps were performed repeatedly until the global error of the network reaches the threshold.As the network depth continues to deepen, the increase in the accuracy of network training will tend to be flat. From AlexNet to VGGNet, the number of network model layers continues to increase, and the effect is getting better and better. As the number of network layers increases, the network will have problems such as overfitting, degradation, gradient explosion, and gradient disappearance. To solve these problems, the residual network is often optimized [17]. Although the depth of this network is deeper than that of ordinary convolutional neural networks (CNNs), the computational efficiency is higher than that of ordinary CNNs. The key point of the residual network is to let the information flow through the shortcut connection to the shallow layer. The residual network solves the problems of network degradation and gradient explosion caused by the increase of the number of layers in the CNN. The recurrent neural network (RNN) performs very well in the field of neurolinguistic programming (NLP) [18]. In the RNN model, each input node corresponds to a hidden node, and the hidden nodes form a linear sequence, and the information is passed from the front to the back. A recurrent neural network is a neural network with a feedback structure. Its output is not only related to the weight of the current input network but also related to the input of the previous network. The RNN has the concept of time sequence, and the state at the next moment is affected by the state at the current moment. Some researchers have called recursive networks as deep networks [19]. Its depth can be expressed in three aspects. The first aspect is the input depth, the second is the output depth, and the third is the time step. An expanded RNN structure is shown in Figure 8.Figure 8
Schematic diagram of the RNN model.The computation of the forward propagation of the RNN network is shown in the following equations:(1)akt=∑h=1Hwhkbht,(2)aht=∑i=1Iwihxit+∑h′=1Hwh′hbh′t−1,(3)bht=θhaht,where b is the calculated value of the activation function, a is the value calculated by the aggregation, w represents the link parameter between different nodes, the output layer is wk, and the hidden layer is wh.The computation process of the backward propagation of the RNN network is shown in the following equations:(4)δht=θ′aht∑k=1Kδktwhk+∑h′=1Hδh′t+1whh′,(5)δjt=∂L∂ajt,(6)∂L∂wij=∑t=1T∂L∂ajt∂aji∂wij=∑t=1Tδjtbit.In equations (4), (5), and (6), whk is the weight matrix of l × n, connecting l hidden layer units to n output layer units, whh′ denotes the n× n weight matrix, connecting k hidden layer units to l output layer units, δjt means the hidden layer vector, wij represents the fixed parameter, aht is the fixed coefficient, bit is the weight, and L is the parameter in the matrix unit.The advantage of the RNN neural network is that the concept of timing is added to the neural network. This makes it possible to set different inputs of the RNN neural network according to the time node. In the RNN neural network, data can also be multi-input. The disadvantage of RNN is that it cannot solve the problem of long-term network dependence, gradient disappearance, and explosion. For this reason, the long short-term memory (LSTM) network is proposed in multiple studies [20, 21]. One neuron in the LSTM model contains one cell state and three gate mechanisms. The cell state in the LSTM model is the basis of the LSTM model, and its function is equivalent to the model memory. With the change of time, the cell state also changes to a certain extent. The LSTM model uses forget gates, update gates, and output gates to protect and control the state of cells. The information recorded in the LSTM network is updated and determined by the gate mechanism.Vasvani et al. [22] proposed a structural transformer that processes sequence models by the attention mechanism. BERT (bidirectional encoder representations from transformers) applies the bidirectional training of the transformer. The transformer in the BERT network refers to the complete encoder-decoder framework. The complete encoder-decoder framework includes mutihead self-attention, layer norm, skip connection, and transformer structure. The visual attention mechanism is a signal processing mechanism similar to the human brain. Humans can select local areas of focus by observing the overall picture. Then, more attention is focused on the focus area than the normal area to get more detailed features and suppress other useless information. According to the big categories, the attention mechanism can be divided into soft attention mechanism and hard attention mechanism. The calculation method of the soft attention mechanism is to pack all the components and perform weighting operations on the retained components [23]. The calculation method of hard attention is to select some components for weighting. A schematic diagram of this attention mechanism is shown in Figure 9.Figure 9
Schematic diagram of attention mechanism.The essential idea of the attention mechanism is to treat the constituent elements in the input as the composition of key-value pairs of data. The key-value pair data correspond to the element query in the output. By calculating the similarity between the query element and each key, the weight coefficient of each key corresponding to the key value can be obtained. Multiple key values is summed to obtain the final attention mechanism value. For multivariate time series forecasting, the introduction of an attention mechanism can focus on the relevant variable dimensions that are dependent on the forecast time series, instead of all input sequences.The BERT model is a pretrained model with excellent performance. When using it, there is no need to use a large amount of data to train it and fine-tune the pretraining model to be used for downstream NLP tasks. The schematic diagram of the BERT model is shown in Figure10, and the transformer encoding is shown in Figure 11, respectively.Figure 10
Schematic diagram of the BERT model.Figure 11
Transformer encoder.The transformer encoding is divided into the following three processes:Token embeddings: it is responsible for converting each word into a vector of fixed dimensions. BERT uses the WordPiece vocabulary for tokenization.Segmentation embeddings: it is responsible for separating two sentences with symbols. Each word in the first sentence is assigned 0, and the token of the second sentence is assigned 1.Position embeddings: it helps to add position coding.


## 2.2. Research on Logistic Regression and Support Vector Machine (SVM) Model

Spark is designed to perform iterative work, which is consistent with the training process of machine learning algorithms. MLlib is a spark’s machine learning library. It supports classification, clustering, regression, and collaborative filtering. Classification is the most extensive in commercial applications. MLlib classification and regression-related algorithms are shown in Table1. The loss function and its subgradients in MLlib are shown in Table 2, and the core content of the MLlib algorithm library is shown in Figure 12, respectively.Table 1
MLlib classification and regression-related algorithms.
Problem typeAlgorithmBinary classificationLinear support vector machine (LSVM), logistic regression, decision tree, random forest, gradient descent decision tree (GBDT), and naive Bayes model (NBM)Multiple classificationsLogistic regression, decision tree, random forest, and NBMReturnLinear least squares, lasso, ridge regression, decision tree, random forest, GBDT, and isotonic regressionTable 2
Loss function and its subgradients in MLlib.
loss fuctionLw,x,ygradient or subgradientHinge lossmax0,1−ywTx,y∈−1,+1−yxifywTx<10otherwiseLogistic losslog1+exp−ywTx,y∈−1,+1−y1−1/1+exp−ywTxSquared loss1/2wTx−y2,y∈RwTx−yxFigure 12
The core content of the MLlib algorithm library.The models used are LSVM and logistic regression. The convex optimization method is used to optimize the objective function, as given in the following equation:(7)ℱw:λRw+1n∑i=1Lw;xi,yi.The objective function optimized by the logistic regression algorithm is shown in the following equation:(8)Lw=∑i−yilog1+e−wtxi−1−yilog1+ewtxi.In equation (8), xi is the i-th data vector, yi indicates the category of xi, and w∈Rn denotes the desired vector and yi∈0,1 is the category of xiw∈Rn and is the desired vector. The method of calculating the classification accuracy of LSVM is to find a hyperplane in a high-dimensional space. This hyperplane is used to classify the points in the space and calculate the distance between the points and the hyperplane to evaluate the classification accuracy. The loss function of the SVM algorithm is computed as(9)∑i=1N1−yiwxi+b++λw2.


## 2.3. Method of Establishing the Framework of the Resource Pool of Social Governance Elements

Since user data systems require a lot of data processing work, common big data processing systems such as MapReduce and Spark are used. A common big data processing platform is the Hadoop distributed file system (HDFS). The user’s behavior on the app is collected and stored in the Hadoop distributed file system. YARN is used to manage data resources. It was introduced in Hadoop 2.0 to remove the bottleneck on job tracker which was present in Hadoop 1.0. The data processing flow is as follows: the client first sends a request and according to the corresponding protocol, the server log is stored [24]. The server log is retrieved using a script file. The engine calls the program package to load the content in the temporary file, stores the structured data in different folders, and stores the parsed data on HDFS. In the establishment of the label, the gender label and the educational background label in the population label are selected. Among them, the gender label is divided into male and female. The academic qualifications are labeled as lower, middle, and higher. The data used comes from real data from a statistical company. Two million data points are used as the gender label seed, and the behavior data in the app is intersected. 270,000 data points are retained as training samples, and 2.2 million degree labels are used as training samples. Because there are many subcategories of the interest tag, the loan category under the finance tag is selected. In this way, the framework of the social governance element resource pool was established. First, a classification system needs to be established. By sorting out 200 million pieces of information shared by 30 departments, forming an information resource directory, and establishing multiple classifications and labeling systems. Next, the rules are constructed. To study the situation of the functional department data, the data analysis method is used to obtain the similarities and differences of the population and the degree of matching. The authoritative data of the authoritative department is the rule basis of the model, which is used to compare and match all information fields. The resource pool of social governance elements by the user profile model consists of three parts: construction of resource pool data warehouse and storage mechanism, the design of persona model of social governance elements, and the design of label system rules. The experimental programs are divided into four types:Solution 1: count the names of used apps and create an index tableSolution 2: count the number of times and use the number filling featureSolution 3: map the secondary classification directory and establish a feature indexSolution 4: same as Solution 3, except that the number of uses of the secondary directory is accumulated and filled


## 3. Results

### 3.1. Analysis of Population Attribute Mining

Experiments found that using the app name mapping index table and filling it with 1 is the best choice. During the experiment, the sampling ratio and the model are changed, and the results are shown in Table3. It is evident that for a sampling ratio of 1, the LR obtained an accuracy (AUC) of 0.82%, and precision (PRE) of 0.77%, respectively. When the sampling ratio is reduced to 0.4, the model reported 0.81% AUC and 0.77% PRE, respectively. In the case of SVM, when the sampling ratio is 0.2, the highest AUC and PRE reported are 0.73% and 0.66%, respectively. However, the performance of the SVM model is not as good as the LR model.Table 3
Results of changing the sampling ratio and model.
ModelSample sampling ratioAUCPRELR10.820.770.40.810.770.20.890.850.10.890.860.010.910.82SVM10.720.660.50.720.660.20.730.66The result of education qualification prediction is shown in Figure13.Figure 13
Educational qualification prediction results.Figure13 shows that the overall accuracy rate of academic qualification prediction reaches 74.5%, and the constructed system has the highest accuracy rate for predicting low academic qualifications. In the survey samples, the proportion of people with high education is relatively low, the proportion of people with high education in the training set is low, and the model learns fewer characteristics of people with high education. The accuracy rate of the constructed system for predicting high degrees is lower than that for a low degree.


### 3.2. Model Performance Analysis

To compare the performance of different machine learning models, the comparative results of each deep learning model on the verification set on each epoch are shown in Figure14.Figure 14
Accuracy of deep learning model validation set.It can be seen that the accuracy of the BERT in the first epoch is 92%, and the accuracy of the BERT in the fifth epoch is 0.94%. The accuracy of the CNN in the first and second epochs are 89% and 0.90%, respectively. Likewise, the accuracy of bidirectional long short-term memory (Bi-LSTM) + attention in the first epoch is 85%, and that in the fifth epoch is 87%, respectively. Similarly, the accuracy of the transformer block in the first epoch is 81% and in the fifth epoch is 84%. Comparing the performance of the four models, it is evident that the BERT model provides the highest performance. In addition, the CNN also has a good performance on the dataset. Although the accuracy of the CNN is slightly lower than the BERT model, the training speedt is faster. The test results of the deep learning model are shown in Figure 15, and the training process of each model is shown in Figure 16.Figure 15
Deep learning model test set results.Figure 16
The training process of each model. (a) Bert. (b) Transformer. (c) Bi-LSTM + attention. (d) CNN.
(a)(b)(c)(d)Figure16 shows that there is no need to use complex functions to construct location information on a smaller dataset; therefore, the BERT pretrained model is used. The migration fine-tuning model on the Chinese intention recognition subtask has a very good effect and can accurately judge the user’s intention.


## 3.1. Analysis of Population Attribute Mining

Experiments found that using the app name mapping index table and filling it with 1 is the best choice. During the experiment, the sampling ratio and the model are changed, and the results are shown in Table3. It is evident that for a sampling ratio of 1, the LR obtained an accuracy (AUC) of 0.82%, and precision (PRE) of 0.77%, respectively. When the sampling ratio is reduced to 0.4, the model reported 0.81% AUC and 0.77% PRE, respectively. In the case of SVM, when the sampling ratio is 0.2, the highest AUC and PRE reported are 0.73% and 0.66%, respectively. However, the performance of the SVM model is not as good as the LR model.Table 3
Results of changing the sampling ratio and model.
ModelSample sampling ratioAUCPRELR10.820.770.40.810.770.20.890.850.10.890.860.010.910.82SVM10.720.660.50.720.660.20.730.66The result of education qualification prediction is shown in Figure13.Figure 13
Educational qualification prediction results.Figure13 shows that the overall accuracy rate of academic qualification prediction reaches 74.5%, and the constructed system has the highest accuracy rate for predicting low academic qualifications. In the survey samples, the proportion of people with high education is relatively low, the proportion of people with high education in the training set is low, and the model learns fewer characteristics of people with high education. The accuracy rate of the constructed system for predicting high degrees is lower than that for a low degree.


## 3.2. Model Performance Analysis

To compare the performance of different machine learning models, the comparative results of each deep learning model on the verification set on each epoch are shown in Figure14.Figure 14
Accuracy of deep learning model validation set.It can be seen that the accuracy of the BERT in the first epoch is 92%, and the accuracy of the BERT in the fifth epoch is 0.94%. The accuracy of the CNN in the first and second epochs are 89% and 0.90%, respectively. Likewise, the accuracy of bidirectional long short-term memory (Bi-LSTM) + attention in the first epoch is 85%, and that in the fifth epoch is 87%, respectively. Similarly, the accuracy of the transformer block in the first epoch is 81% and in the fifth epoch is 84%. Comparing the performance of the four models, it is evident that the BERT model provides the highest performance. In addition, the CNN also has a good performance on the dataset. Although the accuracy of the CNN is slightly lower than the BERT model, the training speedt is faster. The test results of the deep learning model are shown in Figure 15, and the training process of each model is shown in Figure 16.Figure 15
Deep learning model test set results.Figure 16
The training process of each model. (a) Bert. (b) Transformer. (c) Bi-LSTM + attention. (d) CNN.
(a)(b)(c)(d)Figure16 shows that there is no need to use complex functions to construct location information on a smaller dataset; therefore, the BERT pretrained model is used. The migration fine-tuning model on the Chinese intention recognition subtask has a very good effect and can accurately judge the user’s intention.


## 4. Conclusions

With rapid development, artificial intelligence has become the central technique for intelligent resources information. In this study, the persona system is designed to speed up the efficiency of information resource transmission of national government departments and improve the informatization level of government social management, and a social service and management resource pool system is proposed. Based on the collected data, the tags for demographic attributes and interest are modelled and the social service and management resource pool system is built and tested using a deep learning model. In the experiment, the overall accuracies of the constructed age, academic qualifications, and interest label reported are 85.2%, 74.5%, and 99.0%, respectively. The constructed system greatly deepens the visualization of the characteristics of social governance elements. Its visualization and vividness have been significantly enhanced, the level of resource sharing by government departments has been greatly improved, and the foundation for spatial decision-making in smart social governance has been laid.



---

*Source: 8376325-2022-03-18.xml*