Method for predicting crowd density in key area based on big data
The crowd behavior data is processed through the adaptive graph attention network and the heterogeneous graph convolutional neural network to generate multi-dimensional feature representation, which solves the problem of inaccurate crowd density prediction in the existing technology and improves the accuracy and accuracy of the prediction results. Model robustness.
Patent Information
- Application Number
- CN202410721670.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-06-05
AI Technical Summary
Existing crowd density prediction technology has the problems of single data source and low data dimension, making it difficult to make accurate predictions using massive, complex and multi-dimensional crowd movement data.
Adaptive graph attention network and heterogeneous graph convolutional neural network are used to align and fuse crowd behavior data. Through data enhancement and multi-scale feature representation learning, multi-dimensional feature representation is generated, which is input to the density prediction module for processing to obtain crowd information. Density prediction results.
It improves the accuracy of crowd density prediction, enhances the robustness of the model, can better capture complex relationships and patterns between data, and reduces errors caused by single data features.
Smart Images

Figure CN118690133A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of crowd density prediction, and in particular relates to a method for predicting crowd density in key areas based on big data. Background Art
[0002] With the rapid development of information technology, big data technology has become an important tool for extracting insights from large-scale data. At the same time, with the popularization of mobile devices and the increasing accuracy of positioning systems, people's location data has become easier to obtain. Therefore, how to process massive crowd movement data to determine changes and trends in crowd density is becoming increasingly important.
[0003] Accurate crowd density prediction can help optimize multiple aspects of problems and improve people's quality of life. For example, in urban planning, it helps to plan the location of urban infrastructure, housing layout and public service facilities. In security monitoring, it helps to better arrange surveillance cameras and timely discover and respond to safety hazards. In traffic management, it helps to better plan road traffic and improve urban transportation efficiency. In business decision-making, it helps merchants choose better store locations, increase sales and customer satisfaction, etc. The existing crowd density prediction has defects such as single data source and low data dimension. How to use massive complex and multi-dimensional crowd mobility data, combined with advanced machine learning and deep learning technologies, to establish a model for accurately predicting crowd density, so as to accurately predict crowd density, has become a key issue at present. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a method for predicting crowd density in key areas based on big data, the method comprising: collecting crowd behavior data and inputting it into a trained crowd density prediction model for processing to obtain a crowd density prediction result;
[0005] The training process of the crowd density prediction model includes:
[0006] S1: Obtain training crowd behavior data, use adaptive graph attention network to align and fuse crowd behavior data, and obtain fused crowd behavior features;
[0007] S2: Perform data enhancement on the fused crowd behavior features to obtain enhanced data;
[0008] S3: Perform multi-scale convolution, fusion and mapping on the enhanced data to obtain multi-scale feature representation;
[0009] S4: Use heterogeneous graph convolutional neural network to learn multi-scale feature representation and obtain multi-dimensional feature representation;
[0010] S5: Input the multi-dimensional feature representation into the density prediction module for processing to obtain the crowd density prediction result;
[0011] S6: Calculate the total model loss and adjust the model parameters according to the total model loss to obtain a trained crowd density prediction model.
[0012] Preferably, in step S1, the process of aligning and fusing crowd behavior data includes:
[0013] S11: Represent the crowd behavior data as a dynamic graph, and obtain the node features and adjacency matrix of the dynamic graph;
[0014] S12: iteratively normalize the adjacency matrix according to node features;
[0015] S13: Extract behavioral features from the adjacency matrix using an adaptive feature learning network; map the behavioral features into high-dimensional feature vectors;
[0016] S14: Use nonlinear transformation function and mapping matrix to map the high-dimensional feature vector into semantic space to obtain initial semantic features;
[0017] S15: Use a multi-layer perceptron to transform the initial semantic features to obtain extended semantic features;
[0018] S16: Calculate similarity scores between different extended semantic features, classify features with similarity scores greater than a threshold into similar features, and integrate similar features to generate a feature matrix Y;
[0019] S17: Calculate the attention weight sequence of the feature matrix Y, and fuse the feature matrix Y according to the attention weight sequence to obtain a fused feature vector;
[0020] S18: Calculate a gating mechanism vector according to the current fused feature vector, and use the gating mechanism vector to recursively fuse the current fused feature vector to obtain a fused crowd behavior feature.
[0021] Furthermore, the formula for calculating the similarity score is:
[0022]
[0023] Among them, match represents the similarity score, L represents the number of attention matrix layers, and W l is the learning weight matrix of the lth layer, b l is the bias vector of the lth layer, represents the similarity calculation of heterogeneous patterns, sim(·) is the similarity function, and σ(·) is the activation function; They represent the i-th extended semantic feature and the j-th extended semantic feature respectively.
[0024] Preferably, in step S2, the process of data enhancement of the fused crowd behavior features includes: processing the fused crowd behavior features using a generator and a discriminator of alternating adversarial training to obtain enhanced data.
[0025] Preferably, in step S3, the process of obtaining the multi-scale feature representation includes:
[0026] S31: Convolve the enhanced data with convolution kernels of different scales to obtain multi-scale feature maps;
[0027] S32: Perform an average pooling operation on the multi-scale feature map to obtain a pooled feature map;
[0028] S33: Use multiple channels to process the pooled feature map to obtain multiple feature tensors;
[0029] S34: Use linear mapping to map multiple feature tensors to a new space, and calculate attention weights based on the mapped feature tensors;
[0030] S35: Fuse the multi-scale feature maps according to the attention weights to obtain a multi-scale feature representation.
[0031] Preferably, in step S4, the process of obtaining the multi-dimensional feature representation includes:
[0032] S41: Representing multi-scale features as heterogeneous graphs;
[0033] S42: Aggregate information of nodes in the heterogeneous graph to obtain a first aggregate feature of each node; perform a weighted and convolution operation on the first aggregate features of neighboring nodes of the node to obtain a second aggregate feature of the node;
[0034] S43: using a feature extractor to process the second aggregated feature to obtain an extracted feature of the node;
[0035] S44: Adopt adaptive attention mechanism to process the extracted features of nodes and obtain multi-dimensional feature representation.
[0036] Preferably, in step S5, the process of obtaining the crowd density prediction result includes:
[0037] S51: performing a convolution operation on the multi-dimensional feature representation to obtain a multi-dimensional feature map;
[0038] S52: performing a maximum pooling operation on the multidimensional feature map to obtain a pooled multidimensional feature map;
[0039] S53: Input the pooled multi-dimensional feature map into the fully connected layer for processing to obtain the crowd density prediction result.
[0040] Preferably, the formula for calculating the total loss of the model is:
[0041]
[0042] Among them, L represents the total loss of the model, N represents the total number of samples, and y i represents the i-th true result, θ t represents the prediction parameter, ign(·) represents the sign function, represents the i-th prediction result, ∈ represents a small constant, β represents the adjustment parameter, L align represents heterogeneous graph convolution loss, and Myloss represents data enhancement loss.
[0043] The beneficial effects of the present invention are:
[0044] 1. The present invention uses a generator and a discriminator dual-device network to perform alternating adversarial training on some data with a small amount of data to increase the amount of data, so that the prediction effect is better;
[0045] 2. The present invention adopts a series of models such as adaptive graph attention network and heterogeneous graph convolutional neural network to better realize the alignment and fusion of heterogeneous data;
[0046] 3. The present invention uses multidimensional feature representation as the input of the prediction model to provide richer features for prediction and better capture the complex relationships and patterns between data, thereby reducing the error caused by a single data feature and enhancing the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a training flow chart of the crowd density prediction model in the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] This paper proposes a method for predicting population density in key areas based on big data, such as Figure 1 As shown, the method includes the following contents:
[0050] Crowd behavior data is collected and input into the trained crowd density prediction model for processing to obtain crowd density prediction results.
[0051] The training process of the crowd density prediction model includes:
[0052] S1: Obtain crowd behavior data, use adaptive graph attention network to align and fuse the crowd behavior data, and obtain fused crowd behavior features.
[0053] Obtain crowd behavior data, including device location data, video surveillance data, traffic flow data, crowd statistics, and other data at the current moment in multiple key areas.
[0054] Adaptive graph attention network is used to align and fuse crowd behavior data. Specifically:
[0055] S11: Represent the crowd behavior data as a dynamic graph, and obtain the node features and adjacency matrix of the dynamic graph.
[0056] In the dynamic graph, nodes represent regional locations, edges represent the connection strength between regions, node features are crowd behavior data in the region, and the value of each element in the adjacency matrix represents the weight value of the edge, i.e., the connection strength.
[0057] The calculation rule of the connection strength w′ is as follows:
[0058]
[0059] Among them, T ij Represents the weighted sum of the crowd behavior feature values used in the calculation of nodes i and j; α ij represents the weight value of the crowd behavior feature between nodes i and j, which can be selected according to the T ij Make changes.
[0060] S12: Iteratively normalize the adjacency matrix based on node features.
[0061] The normalization calculation rules are as follows:
[0062]
[0063] Where k is the number of iterations, and is a learnable weight matrix, LeakyReLU is the activation function, ReLU is a linear rectified unit, X is the input node feature matrix, A (k) is the normalized adjacency matrix after the kth round, A (0) is the original adjacency matrix.
[0064] S13: Adopting an adaptive feature learning network to extract behavioral features from the adjacency matrix; mapping the behavioral features into high-dimensional feature vectors.
[0065] The adaptive feature learning network is used to extract behavioral features from the adjacency matrix and is expressed as:
[0066]
[0067] Among them, F i Indicates that the i-th data x from the adjacency matrix i , σ(·) is the activation function, T is the total number of data in the adjacency matrix; W and b are the weights and bias parameters of the adaptive feature learning network, x k represents the kth data in the adjacency matrix, α k Represents x i With other data samples x k The association weight is the weight value of the two data in the adjacency matrix, γ i Represents the sample’s own weight, that is, the weight value of the data on the diagonal of the adjacency matrix, which is 1.
[0068] A multi-layer neural network is used to map behavioral features into high-dimensional feature vectors.
[0069] S14: Use nonlinear transformation function and mapping matrix to perform semantic space mapping on the high-dimensional feature vector to obtain initial semantic features.
[0070] The mapping calculation is expressed as:
[0071]
[0072] in, represents the i-th initial semantic feature of the l-th layer, represents the mapping matrix, v s (F i ) indicates F i is the high-dimensional feature vector of , and φ(·) is the nonlinear transformation function.
[0073] S15: Use a multi-layer perceptron to transform the initial semantic features to obtain extended semantic features.
[0074]
[0075] in, represents the i-th extended semantic feature of the l+1 layer, is the weight connecting layer l+1 and layer l, f(·) is the activation function, is the bias term of the lth layer, and L is the number of perceptron layers.
[0076] S16: Calculate the similarity scores between different extended semantic features, classify the features with similarity scores greater than a threshold into similar features, and integrate the similar features to generate a feature matrix Y.
[0077] The similarity score match calculation rules are as follows:
[0078]
[0079] Among them, match represents the similarity score, L represents the number of attention matrix layers, and W l is the learning weight matrix of the lth layer, b l is the bias vector of the lth layer, represents the similarity calculation of heterogeneous patterns, sim(·) is the similarity function, and σ(·) is the activation function; They represent the i-th extended semantic feature and the j-th extended semantic feature respectively.
[0080] The features with similarity scores greater than the threshold θ are aligned and divided into similar features, and the similar features are integrated to generate the feature matrix Y (duplicate features are deleted during the integration process).
[0081] S17: Calculate the attention weight sequence of the feature matrix Y, and fuse the feature matrix Y according to the attention weight sequence to obtain a fused feature vector.
[0082] The calculation rules of the attention weight sequence are as follows:
[0083]
[0084] Among them, a i represents the attention weight of the i-th eigenvector in the feature matrix Y, ReLU(·) is the rectified linear unit, W and b are the weight and bias parameters of the attention model, w is the learnable attention weight vector, the softmax function is used for normalization, N is the number of eigenvectors in the feature matrix Y, y i is the i-th eigenvector in the aligned feature matrix Y.
[0085] Using the adaptive gated attention unit, the feature matrix Y is fused according to the attention weight sequence, which is expressed as:
[0086]
[0087] in, represents the fused feature matrix, and S is the attention matrix composed of the attention weights of each element in the feature matrix Y.
[0088] S18: Calculate a gating mechanism vector according to the current fused feature vector, and use the gating mechanism vector to recursively fuse the current fused feature vector to obtain a fused crowd behavior feature.
[0089] The calculation rule of the gate control mechanism vector g is as follows:
[0090]
[0091] Where σ(·) is the sigmoid function, Wg is the combined input feature matrix The gating mechanism weight matrix after Gaussian distribution processing, b g is the gating mechanism bias parameter, Represents the fusion feature matrix at the current time step
[0092] Use the gating mechanism vector to recursively fuse the current fused feature vector:
[0093]
[0094] Among them, σ(·) is the sigmoid function, α t is the weight parameter at the current time step, that is, the attention matrix S at the current time step. As a fusion of crowd behavior characteristics.
[0095] S2: Perform data enhancement on the fused crowd behavior features to obtain enhanced data.
[0096] The present invention uses a generator and a discriminator of alternating adversarial training to perform data enhancement on the fusion crowd behavior features, including:
[0097] Step 1: Align and fuse the fused crowd behavior features Send it to the generator network and output the generated data sample
[0098] Step 2: Real data and generate data Send it to the discriminator network and finally output Indicates the probability of authenticity of the data generated by the generator;
[0099] The calculation rules are as follows:
[0100]
[0101] Among them, k represents the number of network layers, W i represents the weight value of the i-th generated data, which is obtained by calculating the attention coefficient, b i represents the bias term of the i-th layer, σ i (·) represents the activation function of the i-th layer, Represents the i-th generated data.
[0102] Step 3: Alternately train the generator and the discriminator in an adversarial manner, and continuously update the training parameters according to the Myloss function, i.e., the data enhancement loss. Ultimately, the fidelity of the samples generated by the generator will continue to improve, thus achieving the purpose of data enhancement.
[0103]
[0104] Where N is the number of samples, i and j represent the index of the samples, and are the i-th and j-th samples in the real data, and is the i-th and j-th sample in the generated sample, ||·|| 2 represents the Euclidean norm, and cosine_sim(·) represents the cosine similarity.
[0105] S3: Perform multi-scale convolution, fusion and mapping on the enhanced data to obtain multi-scale feature representation.
[0106] S31: Convolve the enhanced data with convolution kernels of different scales to obtain a multi-scale feature map.
[0107] The calculation rules of the convolution kernel are as follows:
[0108]
[0109] Among them, σ S is the standard deviation of the Gaussian kernel of size S, Q S is a feature map of scale S, is the input data, i.e., the enhanced data. (i, j, k) represents the pixel position and channel index in the feature map. m, n, and l represent the offsets in three dimensions.
[0110] The number of convolution kernels is the same as the number of regions, that is, the number of feature maps with the same scale as the number of regions is obtained.
[0111] S32: Perform an average pooling operation on the multi-scale feature map to obtain a pooled feature map.
[0112] The calculation rules of the average pooling operation are as follows:
[0113]
[0114] Among them, M is the feature map after pooling, Q is the input feature map, (i, j, k) represents the pixel position and channel index in the feature map, m and n represent the size of the pooling layer, and p and q represent the offset of the pooling window in the vertical and horizontal directions, respectively.
[0115] S33: Use multiple channels to process the pooled feature map to obtain multiple feature tensors.
[0116] Divide the feature map into multiple small feature maps M according to the number of channels c , the calculation rules of the feature tensor are as follows:
[0117]
[0118] Among them, σ is a nonlinear activation function, D is the number of convolutional layers, k is a calculation parameter, and W c,i is the i-th convolution kernel parameter, b c,i is the i-th bias term, P c Represents the c-th feature tensor.
[0119] S34: Use linear mapping to map multiple feature tensors to a new space, and calculate attention weights based on the mapped feature tensors.
[0120] The calculation rules of attention weight are as follows:
[0121]
[0122] Among them, P 1 P 2 …P C is the feature tensor, W is the learnable weight matrix parameter, is the corresponding mapped feature tensor, C is the number of feature tensors, softpromax(·) is a multi-category classifier, and d k represents the dimension of the attention key and N represents the number of samples.
[0123] S35: Fuse the multi-scale feature maps according to the attention weights to obtain a multi-scale feature representation.
[0124] The calculation rules for obtaining multi-scale feature representation are as follows:
[0125]
[0126] Among them, Q′ is the obtained multi-scale feature representation, σ is the activation function, W′ is the matrix composed of attention weights, β i is the attention weight of the feature map of the i-th scale, Q i is the feature map representation at the i-th scale, b is the bias term, and N is the number of scales.
[0127] S4: A heterogeneous graph convolutional neural network is used to learn multi-scale feature representations and obtain multi-dimensional feature representations.
[0128] S41: Representing multi-scale features as heterogeneous graphs.
[0129] In a heterogeneous graph, node V = {v 1 ,v 2 ,……,v N} represents the feature representation at different scales, and edge E = {e 1 ,e 2 ,……,e M} indicates the correlation between features.
[0130] Calculate the correlation sim_value between nodes, connect the nodes that are greater than the threshold θ, and the similarity calculation rules are as follows:
[0131]
[0132] Among them, sim(·) is the similarity function, σ(·) is the activation function, and v i With v j is the feature representation of nodes i and j, and b is the bias term.
[0133] S42: Aggregate information of nodes in the heterogeneous graph to obtain a first aggregate feature of each node; perform weighted and convolution operations on the first aggregate features of neighboring nodes of the node to obtain a second aggregate feature of the node.
[0134] The calculation rules for information aggregation are as follows:
[0135]
[0136] Where W″ represents the weight tensor, which is obtained from sim_value, softmax(v i ·W″) ij represents the normalization of the weight between node i and its neighbor node j, v i represents the feature representation of the i-th node in the heterogeneous graph, v j represents the feature representation of the jth node in the heterogeneous graph, h i ′ represents the first aggregation feature of the i-th node obtained after information aggregation.
[0137] Perform weighted and convolution operations on the first aggregated features of the node’s neighbor nodes:
[0138]
[0139] in, represents the second aggregate feature of node i in layer l, N(v i ) represents node v i The set of neighbor nodes, t(e i ) represents the set of connection strength values corresponding to the edges connected to node i, w′ k represents the weight value of the kth edge, obtained by sim_value, σ represents the activation function, For the i-th node v i The first aggregated feature of the j-th neighbor node.
[0140] After multiple layers of aggregation, the second aggregation feature of the final node is obtained.
[0141] S43: Process the second aggregated features using a feature extractor to obtain extracted features of the node.
[0142] The calculation rules of the feature extractor are as follows:
[0143]
[0144] in, is the second aggregate feature of node i in layer l, σ i is the activation function, and is the weight and bias of node i in layer l, and the weight is obtained by calculating the attention coefficient; F i (l) is the extracted feature of node i.
[0145] S44: Adopt adaptive attention mechanism to process the extracted features of nodes and obtain multi-dimensional feature representation.
[0146] Adopt adaptive attention mechanism to process the extracted features of nodes:
[0147]
[0148] in, and is the query and key weight matrix of the lth layer, softpromax(·) multi-class classifier, represents the extracted features of the input node i, N represents the total number of nodes, and F (l) Represents the matrix composed of the extracted features of all nodes, H (l) It is a multi-dimensional feature representation.
[0149] Calculate the heterogeneous graph convolution loss L align :
[0150]
[0151] Among them, λ align represents the calculated parameter value, λ align ∈{1,2,……,N}, and Represents the i-th and j-th multidimensional eigenvectors in a multidimensional matrix.
[0152] S5: Input the multi-dimensional feature representation into the density prediction module for processing to obtain the crowd density prediction result.
[0153] S51: Perform a convolution operation on the multi-dimensional feature representation to obtain a multi-dimensional feature map.
[0154] The calculation rules of the convolution kernel are as follows:
[0155]
[0156] Among them, σ is the standard deviation, G is the feature map, is the input data, i.e., the multidimensional feature representation H (l) , (i, j, k) represents the pixel position and channel index in the feature map, and m, n and l represent the offsets in three dimensions.
[0157] S52: Perform a maximum pooling operation on the multi-dimensional feature map to obtain a pooled multi-dimensional feature map.
[0158] The calculation rules of the maximum pooling operation are as follows:
[0159] G′(i,j,k)=maxG(i×m+p,j×n+q,k)
[0160] Among them, G′ is the multidimensional feature map after pooling, G is the input feature map, (i, j, k) represents the pixel position and channel index in the feature map, m and n represent the size of the pooling layer, and p and q represent the offset of the pooling window in the vertical and horizontal directions, respectively.
[0161] S53: Input the pooled multi-dimensional feature map into the fully connected layer for processing to obtain the crowd density prediction result.
[0162] The calculation of the prediction result is expressed as:
[0163]
[0164] in, represents the predicted value of the population density in area i, y i is the eigenvector of the i-th feature graph G′, W * is the weight matrix of the fully connected layer, b * is the bias vector and ReLU(·) is the activation function.
[0165] S6: Calculate the total model loss and adjust the model parameters according to the total model loss to obtain a trained crowd density prediction model.
[0166] The model prediction results are sent to the multi-dimensional loss optimizer to calculate the loss, and the training is iterated repeatedly to retain a set of parameters with the smallest loss to obtain a trained crowd density prediction model.
[0167] The formula for calculating the total loss of the model is:
[0168]
[0169] Among them, L represents the total loss of the model, N represents the total number of samples, and y i represents the i-th true result, θt represents the prediction parameter, ign(·) represents the sign function, represents the i-th prediction result, ∈ represents a small constant, β represents the adjustment parameter, L align represents heterogeneous graph convolution loss, and Myloss represents data enhancement loss.
[0170] By collecting crowd behavior data and inputting it into the trained crowd density prediction model for processing, the crowd density prediction result can be obtained.
[0171] The present invention uses a crowd density prediction model to effectively solve the problem of inaccurate crowd density prediction, improves the accuracy of prediction results, helps relevant staff quickly obtain information on the location of the occurrence and the flow of people in the area, and quickly formulates solutions.
[0172] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting population density in key areas based on big data, It is characterized in that include: Collect crowd behavior data and input it into the trained crowd density prediction model for processing to obtain crowd density prediction results; The training process of the crowd density prediction model includes: S1: Obtain training crowd behavior data, use adaptive graph attention network to align and fuse crowd behavior data, and obtain fused crowd behavior features; S2: Perform data enhancement on the fused crowd behavior features to obtain enhanced data; S3: Perform multi-scale convolution, fusion and mapping on the enhanced data to obtain multi-scale feature representation; S4: Use heterogeneous graph convolutional neural network to learn multi-scale feature representation and obtain multi-dimensional feature representation; S5: Input the multi-dimensional feature representation into the density prediction module for processing to obtain the crowd density prediction result; S6: Calculate the total model loss and adjust the model parameters according to the total model loss to obtain a trained crowd density prediction model.
2. According to the method for predicting population density in key areas based on big data according to claim 1, It is characterized in that In step S1, the process of aligning and fusing crowd behavior data includes: S11: Represent the crowd behavior data as a dynamic graph, and obtain the node features and adjacency matrix of the dynamic graph; S12: iteratively normalize the adjacency matrix according to node features; S13: Extract behavioral features from the adjacency matrix using an adaptive feature learning network; map the behavioral features into high-dimensional feature vectors; S14: Use nonlinear transformation function and mapping matrix to map the high-dimensional feature vector into semantic space to obtain initial semantic features; S15: Use a multi-layer perceptron to transform the initial semantic features to obtain extended semantic features; S16: Calculate similarity scores between different extended semantic features, classify features with similarity scores greater than a threshold into similar features, and integrate similar features to generate a feature matrix Y; S17: Calculate the attention weight sequence of the feature matrix Y, and fuse the feature matrix Y according to the attention weight sequence to obtain a fused feature vector; S18: Calculate a gating mechanism vector according to the current fused feature vector, and use the gating mechanism vector to recursively fuse the current fused feature vector to obtain a fused crowd behavior feature.
3. According to the method for predicting population density in key areas based on big data as described in claim 2, It is characterized in that The formula for calculating the similarity score is: Among them, match represents the similarity score, L represents the number of attention matrix layers, and W l is the learning weight matrix of the lth layer, b l is the bias vector of the lth layer, represents the similarity calculation of heterogeneous patterns, sim(·) is the similarity function, and σ(·) is the activation function; They represent the i-th extended semantic feature and the j-th extended semantic feature respectively.
4. According to the method for predicting population density in key areas based on big data as described in claim 1, It is characterized in that In the step S2, the process of data enhancement of the fused crowd behavior features includes: using a generator and a discriminator of alternating adversarial training to process the fused crowd behavior features to obtain enhanced data.
5. According to the method for predicting population density in key areas based on big data as described in claim 1, It is characterized in that In step S3, the process of obtaining the multi-scale feature representation includes: S31: Convolve the enhanced data with convolution kernels of different scales to obtain multi-scale feature maps; S32: Perform an average pooling operation on the multi-scale feature map to obtain a pooled feature map; S33: Use multiple channels to process the pooled feature map to obtain multiple feature tensors; S34: Use linear mapping to map multiple feature tensors to a new space, and calculate attention weights based on the mapped feature tensors; S35: Fuse the multi-scale feature maps according to the attention weights to obtain a multi-scale feature representation.
6. According to the method for predicting population density in key areas based on big data as described in claim 1, It is characterized in that In step S4, the process of obtaining the multi-dimensional feature representation includes: S41: Representing multi-scale features as heterogeneous graphs; S42: Aggregate information of nodes in the heterogeneous graph to obtain a first aggregate feature of each node; perform a weighted and convolution operation on the first aggregate features of neighboring nodes of the node to obtain a second aggregate feature of the node; S43: using a feature extractor to process the second aggregated feature to obtain an extracted feature of the node; S44: Adopt adaptive attention mechanism to process the extracted features of nodes and obtain multi-dimensional feature representation.
7. According to the method for predicting population density in key areas based on big data as described in claim 1, It is characterized in that In step S5, the process of obtaining the crowd density prediction result includes: S51: performing a convolution operation on the multi-dimensional feature representation to obtain a multi-dimensional feature map; S52: performing a maximum pooling operation on the multidimensional feature map to obtain a pooled multidimensional feature map; S53: Input the pooled multi-dimensional feature map into the fully connected layer for processing to obtain the crowd density prediction result.
8. According to the method for predicting population density in key areas based on big data as described in claim 1, It is characterized in that The formula for calculating the total loss of the model is: Among them, L represents the total loss of the model, N represents the total number of samples, and y i represents the i-th true result, θ t represents the prediction parameter, ign(·) represents the sign function, represents the i-th prediction result, ∈ represents a small constant, β represents the adjustment parameter, L align represents heterogeneous graph convolution loss, and Myloss represents data enhancement loss.
Citation Information
Patent Citations
Node classification method for realizing heterogeneous primitive path aggregation based on graph convolution and self-attention mechanism
CN115828143A
Intelligent sports video classification method and system based on multi-attribute learning
CN117271831A
Heterogeneous graph node relation prediction method based on graph transformation network and graph decomposition
CN117524299A
Cited By
Feature enhancement processing method and device, computer equipment and computer readable storage medium
CN121459119A
Feature enhancement processing method and apparatus, computer device, and computer-readable storage medium
CN121459119B
