Method, device, processing equipment and storage medium for predicting human flow

By combining a multi-head attention model, a fast Fourier transform model, and a graph convolutional neural network, and using the Pearson correlation coefficient to adjust the weight values ​​for preprocessing, the problem of inaccurate pedestrian flow prediction was solved, and more accurate prediction results were achieved.

CN116822678BActive Publication Date: 2026-05-19CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
Filing Date
2022-10-27
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

The current technology for predicting pedestrian traffic is inaccurate, resulting in a poor user experience.

Method used

A multi-head attention model and a fast Fourier transform model are combined with a graph convolutional neural network to predict pedestrian flow by determining the temporal and spatial correlations between the target region and its adjacent regions. The Pearson correlation coefficient is used to adjust the weight values ​​of the degree matrix of the graph convolutional neural network for preprocessing.

Benefits of technology

It improves the accuracy of pedestrian flow prediction and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116822678B_ABST
    Figure CN116822678B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a method and device for predicting human flow, a processing device and a storage medium. The method comprises: obtaining human flow data of a target area and an adjacent area, the adjacent area being adjacent to the target area; inputting the human flow data into a trained prediction model for human flow prediction to obtain a prediction result; wherein the prediction model comprises a multi-head attention model and a fast Fourier transform model, and the multi-head attention model and the fast Fourier transform model are used to determine the time correlation and the spatial correlation between the target area and the adjacent area. In this way, the prediction model can predict the human flow of the target area by using the time correlation and the spatial correlation, and compared with a scheme that does not consider the time correlation and / or the spatial correlation, the prediction result can be more accurate, and the user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to, but is not limited to, the field of natural language processing, and particularly to a method, apparatus, processing device, and storage medium for predicting pedestrian traffic. Background Technology

[0002] Pedestrian flow prediction can forecast pedestrian traffic within a region, and the results can be widely applied in various scenarios. For example, it can predict pedestrian flow between areas throughout a city, thereby quickly understanding the public safety situation in each area, taking timely early warning measures, and improving the social security system; pedestrian flow can also be used for business district site selection and tourist attraction analysis. However, in related technologies, pedestrian flow prediction suffers from inaccurate results, which can lead to a poor user experience. Summary of the Invention

[0003] In view of this, the present disclosure provides a method, apparatus, processing device, and storage medium for predicting pedestrian traffic.

[0004] According to a first aspect of the present disclosure, a method for predicting pedestrian traffic is provided, the method comprising:

[0005] Obtain pedestrian traffic data for the target area and adjacent areas, wherein the adjacent areas are adjacent to the target area;

[0006] The pedestrian flow data is input into a trained prediction model for pedestrian flow prediction to obtain prediction results; wherein, the prediction model includes a multi-head attention model and a fast Fourier transform model, and the multi-head attention model and the fast Fourier transform model are used to determine the temporal correlation and spatial correlation between the target area and the adjacent area.

[0007] In one embodiment, the method further includes:

[0008] Determine the Pearson correlation coefficient between the pedestrian traffic data of the target area and the pedestrian traffic data of the adjacent areas;

[0009] The weight values ​​are obtained by adjusting the degree matrix of the graph convolutional neural network used for preprocessing the pedestrian flow data based on the Pearson correlation coefficient.

[0010] The pedestrian flow data is preprocessed based on the graph convolutional neural network.

[0011] The step of inputting the pedestrian flow data into the trained prediction model for pedestrian flow prediction to obtain the prediction result includes:

[0012] The preprocessed pedestrian flow data is input into the trained prediction model for pedestrian flow prediction to obtain the prediction result.

[0013] In one embodiment, the Fast Fourier Transform model is set between at least two of the multi-head attention models.

[0014] In one embodiment, the process of the prediction model processing the pedestrian flow data includes:

[0015] Perform a Fourier FFT transform on the pedestrian flow data to obtain predetermined data; wherein, the predetermined data includes: time correlation data and / or spatial correlation data between the target area and the adjacent area;

[0016] The imaginary and real numbers of the predetermined data are input into the multi-head attention model for mixing.

[0017] In one embodiment, the method further includes:

[0018] The prediction model is trained based on the pedestrian flow data sample set of the target area and the adjacent areas until the prediction model converges, thus obtaining the trained prediction model.

[0019] According to a second aspect of the present disclosure, a pedestrian flow prediction device is provided, the device comprising:

[0020] The acquisition module is used to acquire pedestrian flow data of the target area and adjacent areas, wherein the adjacent areas are adjacent to the target area;

[0021] The input module is used to input the pedestrian flow data into a trained prediction model for pedestrian flow prediction to obtain prediction results; wherein, the prediction model includes a multi-head attention model and a fast Fourier transform model, and the multi-head attention model and the fast Fourier transform model are used to determine the temporal correlation and spatial correlation between the target area and the adjacent area.

[0022] In one embodiment, the apparatus further includes a determining module, an adjusting module, and a preprocessing module, wherein,

[0023] The determination module is used to determine the Pearson correlation coefficient between the pedestrian flow data of the target area and the pedestrian flow data of the adjacent area;

[0024] The adjustment module is used to adjust the weight values ​​of the degree matrix of the graph convolutional neural network used for preprocessing the pedestrian flow data based on the Pearson correlation coefficient.

[0025] The preprocessing module is used to preprocess the pedestrian flow data based on the graph convolutional neural network.

[0026] The input module is used to input the preprocessed pedestrian flow data into the trained prediction model for pedestrian flow prediction to obtain the prediction result.

[0027] In one embodiment, the input module is further configured such that the Fast Fourier Transform model is set between at least two of the multi-head attention models.

[0028] In one embodiment, the input module is further configured to:

[0029] Perform a Fourier FFT transform on the pedestrian flow data to obtain predetermined data; wherein, the predetermined data includes: time correlation data and / or spatial correlation data between the target area and the adjacent area;

[0030] The imaginary and real numbers of the predetermined data are input into the multi-head attention model for mixing.

[0031] In one embodiment, the apparatus further includes:

[0032] The training module is used to train the prediction model based on the pedestrian flow data sample set of the target area and the adjacent area until the prediction model converges, thereby obtaining the trained prediction model.

[0033] According to a third aspect of the present disclosure, a processing apparatus is provided, the processing apparatus comprising:

[0034] Memory, used to store executable programs;

[0035] When executing an executable program stored in the memory, the processor implements the method as described in any of the embodiments of this disclosure.

[0036] According to a fourth aspect of the present disclosure, a computer storage medium is provided, the computer storage medium storing an executable program, which, when executed by a processor, implements the method described in any of the embodiments of the present disclosure.

[0037] In this embodiment, pedestrian flow data of a target area and adjacent areas are acquired, wherein the adjacent areas are adjacent to the target area. The pedestrian flow data is input into a trained prediction model for pedestrian flow prediction to obtain prediction results. The prediction model includes a multi-head attention model and a fast Fourier transform model, which are used to determine the temporal and spatial correlations between the target area and the adjacent areas. Here, since the prediction model for pedestrian flow prediction can determine the temporal and spatial correlations between the target area and the adjacent areas, the prediction model can use these temporal and spatial correlations to predict pedestrian flow in the target area. Compared to schemes that do not consider temporal and / or spatial correlations, this results in more accurate predictions and improves the user experience. Attached Figure Description

[0038] Figure 1 This is a schematic diagram illustrating a graph convolution according to an exemplary embodiment;

[0039] Figure 2 This is a schematic diagram illustrating a degree matrix according to an exemplary embodiment;

[0040] Figure 3 This is a schematic diagram illustrating an encoder and decoder according to an exemplary embodiment;

[0041] Figure 4 This is a flowchart illustrating a method for predicting pedestrian traffic according to an exemplary embodiment;

[0042] Figure 5 This is a flowchart illustrating a method for predicting pedestrian traffic according to an exemplary embodiment;

[0043] Figure 6 This is a flowchart illustrating a method for predicting pedestrian traffic according to an exemplary embodiment;

[0044] Figure 7 This is a schematic diagram illustrating a prediction model according to an exemplary embodiment;

[0045] Figure 8 This is a schematic diagram illustrating a hybrid layer according to an exemplary embodiment;

[0046] Figure 9 This is a schematic diagram illustrating a multi-head attention model according to an exemplary embodiment;

[0047] Figure 10a This is a schematic diagram of a scaled-down dot product attention layer according to an exemplary embodiment;

[0048] Figure 10b This is a schematic diagram illustrating a multi-head attention layer operating in parallel, according to an exemplary embodiment.

[0049] Figure 11 This is a flowchart illustrating a method for predicting pedestrian traffic according to an exemplary embodiment;

[0050] Figure 12 This is a flowchart illustrating a method for predicting pedestrian traffic according to an exemplary embodiment;

[0051] Figure 13 This is a schematic diagram illustrating the structure of a pedestrian flow prediction device according to an exemplary embodiment. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0053] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0054] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the invention described herein can be implemented in an order other than that illustrated or described herein.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.

[0056] To better understand the embodiments of this disclosure, the following exemplary embodiments illustrate scenarios in the related art:

[0057] In one embodiment, a graph convolutional (neural network) model is used when preprocessing pedestrian traffic data. The graph convolutional model is essentially a feature extractor; see [link to relevant documentation]. Figure 1 This is an example graph convolution, mainly containing the degree matrix D (see [link to example graph convolution]). Figure 2 Let A be the adjacency matrix and L be the Laplacian matrix. The degree matrix D has values ​​only on its diagonal lines, representing the degree of the corresponding node, and zero elsewhere. Adjacency matrix A has a value of 1 only between nodes connected by an edge, and zero elsewhere. The Laplacian matrix L is DA. The general formula for graph convolution can be expressed as:

[0058] H l+1 =f(H l A);

[0059] H 0 =X is the input of the first layer, X∈R N×D N is the number of nodes in the graph, D is the dimension of the feature vector of each node, and A is the adjacency matrix. f can be implemented in different ways.

[0060] In one embodiment, the degree matrix D can be improved based on the Pearson correlation coefficient, and the weight values ​​in the graph convolution model can be dynamically calculated using the Pearson correlation coefficient. The Pearson correlation coefficient is used to measure the linear correlation between two sets of variable data. The value range of the Pearson correlation coefficient is [-1, 1], where 1 represents the maximum positive correlation, -1 represents the maximum negative correlation, and 0 represents no correlation. The Pearson correlation coefficient is used to analyze the correlation between geospatial distance and sample data.

[0061] In one embodiment, the attention mechanism (AM) has become an important concept in neural networks and has been extensively studied in various application areas. The attention model aims to mine the temporal relevance of data by allowing the decoder to access the entire encoded input sequence (h1, h2, ..., ht). Its core idea is to introduce attention weights α onto the input sequence to prioritize the set of locations where relevant information exists in the generation of the next output data. See also... Figure 3 The diagram illustrates the corresponding encoder and decoder architecture with an attention mechanism. The attention mechanism mainly consists of two processes: a first process and a second process.

[0062] The first process calculates the weight coefficients based on the Query and key, which can be represented as F(Q,K,V). The second process performs a weighted summation of the Values ​​based on these weight coefficients. In the first process, the relevance between the Query and Key values ​​is calculated first. This can be done by calculating the dot product of their vectors, the similarity of their vectors, or by introducing other neural networks. Then, the original scores are normalized using the Softmax function to obtain the weight coefficients 'a'. i ,

[0063] a i =Softmax(F(Q,K,V));

[0064] The attention module is responsible for automatically learning the attention weight α. ij It can automatically capture h i (Encoder hidden state, which can be called candidate state) and s j The correlations between the decoder's hidden states (which can be called query states) and the attention weights are used to construct the content vector Attention values, which are then passed as input to the decoder. At each decoding position j, the Attention value C... i It is the weighted sum of all hidden states of the encoder and their corresponding attention weights, where L represents the length of the input sequence.

[0065]

[0066] like Figure 4As shown in the embodiments of this disclosure, a method for predicting pedestrian flow is provided, the method comprising:

[0067] Step 41: Obtain pedestrian traffic data for the target area and adjacent areas, wherein the adjacent areas are adjacent to the target area;

[0068] Step 42: Input the pedestrian flow data into the trained prediction model for pedestrian flow prediction to obtain the prediction result; wherein, the prediction model includes a multi-head attention model and a fast Fourier transform model, and the multi-head attention model and the fast Fourier transform model are used to determine the temporal correlation and spatial correlation between the target area and the adjacent area.

[0069] The pedestrian flow prediction method disclosed herein can be applied to terminals, including but not limited to mobile phones, wearable devices, vehicle terminals, roadside units (RSUs), smart home terminals, industrial sensing devices and / or medical devices.

[0070] In one embodiment, pedestrian traffic data of a target area and adjacent areas are acquired, wherein the adjacent areas are adjacent to the target area; the Pearson correlation coefficient between the pedestrian traffic data of the target area and the pedestrian traffic data of the adjacent areas is determined; the degree matrix of the graph convolutional neural network used for preprocessing the pedestrian traffic data is adjusted based on the Pearson correlation coefficient to obtain weight values; the pedestrian traffic data is preprocessed based on the graph convolutional neural network; and the preprocessed pedestrian traffic data is input into the trained prediction model for pedestrian traffic prediction to obtain prediction results.

[0071] In one embodiment, see Figure 5 Methods for predicting pedestrian traffic include:

[0072] Step 51: Preprocess the pedestrian flow data based on the graph convolutional neural network adjusted by the Pearson correlation coefficient to obtain preprocessed pedestrian flow data;

[0073] Step 52: Input the preprocessed pedestrian flow data into the trained prediction model for pedestrian flow prediction;

[0074] Step 53: Determine if there is any unprocessed traffic data. If there is, proceed to step 51; otherwise, proceed to step 54.

[0075] Step 54: Obtain the prediction results.

[0076] In one embodiment, assuming the target region is S i Its regional population flow time series data Let z represent time series data of length z in region i, where z∈[1,n]. When predicting the flow of people in a region, it is necessary to pay attention not only to the selected region, but also to the flow of people in the surrounding regions. This makes the prediction of the flow of people in the region have the properties of a graph. In this disclosure, a graph convolution model can be used to process the flow of people data to obtain preprocessed flow of people data.

[0077] In one embodiment, see Figure 6 The preprocessing steps for pedestrian flow prediction methods include:

[0078] Step 61: Obtain the target region S i and pedestrian traffic data in adjacent areas;

[0079] Step 62, Calculate S i The Pearson correlation coefficient r between the pedestrian traffic data and that of adjacent areas;

[0080] Step 63: Improve the degree matrix D using the Picason correlation coefficient r;

[0081] Step 64: Obtain the improved graph convolutional neural network;

[0082] Step 65: Preprocess the pedestrian flow data.

[0083] It should be noted that, as described in the preceding scenario, the preprocessing process can be based on the idea that a node's features are related to all its neighboring nodes. Multiplying the adjacency matrix A by the feature X is equivalent to adding the features of the node's neighboring nodes. By stacking multiple hidden layers, information from multiple layers of neighbors can be utilized, resulting in the following formula:

[0084] H l+1 =σ(AX) l W l );

[0085] Among them, W l This is the weight parameter matrix of layer l, where σ(·) represents the ReLU nonlinear activation function. However, this method does not consider the influence of a node on itself, and the adjacency matrix A is not normalized. When extracting graph features, nodes with more neighboring nodes tend to have a greater influence. To solve this problem, a self-degree matrix is ​​introduced to address the self-transfer problem. The adjacency matrix is ​​normalized by multiplying both sides of the adjacency matrix by the square root of the node's degree and then taking the inverse. Additionally, the Pearson correlation coefficient r is introduced to eliminate the influence of weakly correlated region data. The final input result is shown below:

[0086]

[0087] Where r is the Pearson correlation coefficient, D is the degree matrix, A is the connectivity matrix, X is the regional data feature, and W is a random weighting parameter. 0 =X is the input of the first layer. During graph convolution processing, the Pearson correlation coefficient is used to mine the spatiotemporal correlation of the data. From the basic concepts of graph convolution known above, the more nodes connected in the degree matrix D, the more influenced that region is by its surrounding regions. The more connected surrounding regions, the easier it is for people to flow out, which aligns with the reality of inter-regional population movement. A large number of neighboring regions leads to a large influence, but not all neighboring regions have a significant impact on the selected region; overly concentrated weights cannot accurately reflect the actual situation. To improve S... i The weights of regions with high regional correlation are increased, while the weights of regions with low correlation are decreased. In this embodiment, the Pearson correlation coefficient is used to dynamically calculate the weight values ​​in graph convolution, reducing the impact of invalid neighboring regions on the weights. The Pearson correlation coefficient r is shown below:

[0088]

[0089] As mentioned above, the Pearson correlation coefficient ranges from -1 to 1, where 1 represents the most relevant correlation, -1 represents a negative correlation, and 0 represents no correlation. For the calculated correlation coefficient, regions with |r| > 0.5 are selected as their adjacent nodes. r > 0.5 indicates a moderate or higher degree of correlation, reducing the influence of weakly correlated, very weakly correlated, or unrelated data.

[0090] In one embodiment, pedestrian flow data of a target area and adjacent areas are acquired, wherein the adjacent areas are adjacent to the target area; the pedestrian flow data is input into a trained prediction model for pedestrian flow prediction to obtain a prediction result; wherein the prediction model includes a multi-head attention model and a fast Fourier transform model, the multi-head attention model and the fast Fourier transform model are used to determine the temporal correlation and spatial correlation between the target area and the adjacent areas; the fast Fourier transform model is set between at least two of the multi-head attention models.

[0091] In one embodiment, pedestrian flow data of a target area and adjacent areas are acquired, wherein the adjacent areas are adjacent to the target area; the pedestrian flow data is input into a trained prediction model for pedestrian flow prediction to obtain a prediction result; wherein the prediction model includes a multi-head attention model and a fast Fourier transform model, wherein the multi-head attention model and the fast Fourier transform model are used to determine the temporal and spatial correlation between the target area and the adjacent areas; the processing of the pedestrian flow data by the prediction model includes: performing a Fourier FFT transform on the pedestrian flow data to obtain predetermined data; wherein the predetermined data includes: temporal correlation data and / or spatial correlation data between the target area and the adjacent areas; and inputting the imaginary and real numbers of the predetermined data into the multi-head attention model for mixing.

[0092] In one embodiment, see Figure 7 The prediction model includes a data preprocessing module, an embedding layer, a location encoding module, an encoder, and a decoder. Figure 7 In this context, "Sorce data" corresponds to the raw data module; "Encoder Input" corresponds to the encoding input module; "Embedding Layer" corresponds to the embedding layer; "attention" corresponds to the attention mechanism module; and "MHT" corresponds to the multi-head attention model.

[0093] In one embodiment, an embedding learning model using an embedding layer maps the input and output labels to feature dimensions d via a fully connected layer. model The vector is used. A linear transformation and a softmax function are used to transform the decoder output into the probability of predicting the next data. In the model, the same weight matrix and softmax linear transformation are shared between the two embedding layers. In the embedding layer, these weights are multiplied by d. model .

[0094] In one embodiment, the encoder in the multi-head attention model incorporates a Fast Fourier Transform to obtain a hybrid layer. For example, see [link to example]. Figure 8 The encoder mainly consists of multiple multi-head attention layers (MHT) and multiple fast Fourier transforms (FFT). The fast Fourier transform is mixed between two MHT layers. The dashed line represents the imaginary number calculation process.

[0095] In one embodiment, the data is feature-transformed using Fast Fourier Transform (FFT). The first FFT transforms the pedestrian flow data over X days of historical data to extract the temporal correlation of the target area. The second FFT transforms the pre-processed pedestrian flow data of highly correlated areas at time t to extract the spatial correlation between the target area and adjacent areas. Since the real numbers in the Fourier transform are even functions, while the imaginary numbers are odd functions, both real and imaginary numbers contain information. To preserve this information, the model incorporates both real and imaginary number calculations. Please refer to [link to relevant documentation]. Figure 9 The real and imaginary numbers after the Fast Fourier Transform are mixed using a cross-attention mechanism, which avoids the loss of information and improves the prediction accuracy.

[0096] It should be noted that, please refer to Figure 10a and Figure 10b A multi-head attention model can consist of multiple scaled dot-product attention modules. Each scaled dot-product attention module calculates the dot product of all queries and keys and divides by 1 / 2. The weights of the values ​​obtained by applying the Softmax function can then be expressed as:

[0097]

[0098] The Query, Key, and Value are each linearly projected h times, and then linearly projected onto d. k and d v Dimensions. On each projected version of these queries, keys, and values, attention functions are performed in parallel to generate d. v The output values ​​of each dimension are concatenated and projected again to obtain the final value.

[0099] MultiHead(Q,K,V)=Concat(head1,...,headh)W O ;

[0100]

[0101] Wherein, the projection parameter matrix Multi-head attention enables the model to focus on information from different representation subspaces at different locations.

[0102] In addition to the attention sublayer, each layer in the encoder and decoder of this module's multi-head attention model contains a fully connected feedforward network applied between two linear transformations with a ReLU activation function.

[0103] FFN(x)=max(0,xW1+b1)W2+b2;

[0104] It should be noted that although the linear transformations are the same at different locations, they use different parameters between different layers.

[0105] In one embodiment, the decoder also consists of multiple identical layers. In addition to two sub-layers in each encoder layer, the decoder inserts a third fully connected feedforward sub-layer that performs multi-head attention on the output of the encoder stack. Similar to the encoder, residual connections are used around each sub-layer, followed by layer normalization. The decoder takes data from the past and future empty data as input, incorporating positional encoding at the data input to ensure the accuracy of the prediction results.

[0106] In one embodiment, the multi-head attention model does not include recursion and convolution. To enable the model to utilize the sequence order, some information about relative or absolute position is injected. The multi-head attention model uses sine and cosine functions of different frequencies to represent positional information:

[0107]

[0108]

[0109] Using sine and cosine functions to represent positional information eliminates the need for training, reducing the number of training parameters. Furthermore, this method allows the model to extend beyond the longest position in the training set, and it can still produce results even if larger positional information appears in the test set.

[0110] In one embodiment, the prediction model is trained based on a sample set of pedestrian traffic data from the target area and the adjacent areas until the prediction model converges, thus obtaining the trained prediction model. Pedestrian traffic data from the target area and the adjacent areas, wherein the adjacent areas are adjacent to the target area, are obtained.

[0111] The pedestrian flow data is input into a trained prediction model for pedestrian flow prediction to obtain prediction results; wherein, the prediction model includes a multi-head attention model and a fast Fourier transform model, and the multi-head attention model and the fast Fourier transform model are used to determine the temporal correlation and spatial correlation between the target area and the adjacent area.

[0112] In this embodiment, pedestrian flow data of a target area and adjacent areas are acquired, wherein the adjacent areas are adjacent to the target area. The pedestrian flow data is input into a trained prediction model for pedestrian flow prediction to obtain prediction results. The prediction model includes a multi-head attention model and a fast Fourier transform model, which are used to determine the temporal and spatial correlations between the target area and the adjacent areas. Here, since the prediction model for pedestrian flow prediction can determine the temporal and spatial correlations between the target area and the adjacent areas, the prediction model can use these temporal and spatial correlations to predict pedestrian flow in the target area. Compared to schemes that do not consider temporal and / or spatial correlations, this results in more accurate predictions and improves the user experience.

[0113] like Figure 11 As shown in the embodiments of this disclosure, a method for predicting pedestrian flow is provided, the method comprising:

[0114] Step 111: Determine the Pearson correlation coefficient between the pedestrian traffic data of the target area and the pedestrian traffic data of the adjacent area;

[0115] Step 112: Adjust the degree matrix of the graph convolutional neural network used to preprocess the pedestrian flow data based on the Pearson correlation coefficient to obtain the weight values;

[0116] Step 113: Preprocess the pedestrian flow data based on the graph convolutional neural network.

[0117] In one embodiment, pedestrian traffic data of a target area and adjacent areas are acquired, wherein the adjacent areas are adjacent to the target area; the Pearson correlation coefficient between the pedestrian traffic data of the target area and the pedestrian traffic data of the adjacent areas is determined; the degree matrix of the graph convolutional neural network used for preprocessing the pedestrian traffic data is adjusted based on the Pearson correlation coefficient to obtain weight values; the pedestrian traffic data is preprocessed based on the graph convolutional neural network; and the preprocessed pedestrian traffic data is input into the trained prediction model for pedestrian traffic prediction to obtain prediction results.

[0118] like Figure 12 As shown in the embodiments of this disclosure, a method for predicting pedestrian flow is provided, the method comprising:

[0119] Step 121: Train the prediction model based on the pedestrian flow data sample set of the target area and the adjacent area until the prediction model converges to obtain the trained prediction model; wherein, the prediction model includes a multi-head attention model and a fast Fourier transform model, the multi-head attention model and the fast Fourier transform model are used to determine the temporal correlation and spatial correlation between the target area and the adjacent area.

[0120] In one embodiment, a prediction model is trained based on a sample set of pedestrian flow data from the target area and the adjacent areas until the prediction model converges, resulting in a trained prediction model. The prediction model includes a multi-head attention model and a fast Fourier transform model, which are used to determine the temporal and spatial correlations between the target area and the adjacent areas. Pedestrian flow data from the target area and adjacent areas (where the adjacent areas are adjacent to the target area) is acquired; the pedestrian flow data is then input into the trained prediction model for pedestrian flow prediction to obtain prediction results.

[0121] like Figure 13 As shown, this disclosure provides a pedestrian flow prediction device, the device comprising:

[0122] The acquisition module 131 is used to acquire pedestrian flow data of the target area and adjacent areas, wherein the adjacent areas are adjacent to the target area;

[0123] The input module 132 is used to input the pedestrian flow data into a trained prediction model for pedestrian flow prediction to obtain prediction results; wherein, the prediction model includes a multi-head attention model and a fast Fourier transform model, and the multi-head attention model and the fast Fourier transform model are used to determine the temporal correlation and spatial correlation between the target region and the adjacent region.

[0124] In one embodiment, the apparatus further includes a determining module 133, an adjusting module 134, and a preprocessing module 135, wherein,

[0125] The determining module 133 is used to determine the Pearson correlation coefficient between the pedestrian flow data of the target area and the pedestrian flow data of the adjacent area;

[0126] The adjustment module 134 is used to adjust the weight values ​​of the degree matrix of the graph convolutional neural network used for preprocessing the traffic flow data based on the Pearson correlation coefficient.

[0127] Preprocessing module 135 is used to preprocess the pedestrian flow data based on the graph convolutional neural network;

[0128] The input module 132 is used to input the preprocessed pedestrian flow data into the trained prediction model for pedestrian flow prediction to obtain the prediction result.

[0129] In one embodiment, the input module 132 is further configured such that the Fast Fourier Transform model is set between at least two of the multi-head attention models.

[0130] In one embodiment, the input module 132 is further configured to:

[0131] Perform a Fourier FFT transform on the pedestrian flow data to obtain predetermined data; wherein, the predetermined data includes: time correlation data and / or spatial correlation data between the target area and the adjacent area;

[0132] The imaginary and real numbers of the predetermined data are input into the multi-head attention model for mixing.

[0133] In one embodiment, the apparatus further includes:

[0134] Training module 136 is used to train the prediction model based on the pedestrian flow data sample set of the target area and the adjacent area until the prediction model converges, thereby obtaining the trained prediction model.

[0135] This disclosure provides a processing apparatus, the processing apparatus comprising:

[0136] Memory, used to store executable programs;

[0137] When executing an executable program stored in the memory, the processor implements the method as described in any of the embodiments of this disclosure.

[0138] It is understood that memory can be volatile or non-volatile, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.

[0139] The method disclosed in this invention can be applied to or implemented by the processor. The processor can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the speech conversion method can be completed by integrated logic circuits in the processor's hardware or by software instructions. The processor can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps, and logic block diagrams disclosed in this invention. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules can be located in a storage medium, specifically a memory. The processor reads information from the memory and, in conjunction with its hardware, completes the steps of the speech conversion method provided in this application.

[0140] The present invention also provides a computer storage medium storing an executable program, which, when executed by a processor, implements the method described in any of the embodiments of this disclosure. Specifically, it may be a computer-readable storage medium, such as a memory including a computer program, which can be executed by a processor of a processing device to complete the steps described in the embodiments of this application. The computer-readable storage medium may be a ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM, etc.

[0141] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for predicting pedestrian traffic, characterized in that, The method includes: Obtain pedestrian traffic data for the target area and adjacent areas, wherein the adjacent areas are adjacent to the target area; The pedestrian flow data is input into a trained prediction model for pedestrian flow prediction to obtain prediction results. The prediction model includes a multi-head attention model and a fast Fourier transform model, which are used to determine the temporal and spatial correlations between the target region and its adjacent regions. The fast Fourier transform model is set between at least two of the multi-head attention models. The processing of the pedestrian flow data by the prediction model includes: performing a Fourier FFT transform on the pedestrian flow data to obtain predetermined data; wherein the predetermined data includes: temporal correlation data and / or spatial correlation data between the target region and its adjacent regions; and inputting the imaginary and real numbers of the predetermined data into the multi-head attention model for mixing. The method further includes: Determine the Pearson correlation coefficient between the pedestrian flow data of the target area and the pedestrian flow data of the adjacent areas; adjust the degree matrix of the graph convolutional neural network used to preprocess the pedestrian flow data based on the Pearson correlation coefficient to obtain the weight values; preprocess the pedestrian flow data based on the graph convolutional neural network; The step of inputting the pedestrian flow data into the trained prediction model for pedestrian flow prediction to obtain the prediction result includes: inputting the preprocessed pedestrian flow data into the trained prediction model for pedestrian flow prediction to obtain the prediction result.

2. The method according to claim 1, characterized in that, The method further includes: The prediction model is trained based on the pedestrian flow data sample set of the target area and the adjacent areas until the prediction model converges, thus obtaining the trained prediction model.

3. A device for predicting pedestrian flow, characterized in that, The device includes: The acquisition module is used to acquire pedestrian flow data of the target area and adjacent areas, wherein the adjacent areas are adjacent to the target area; An input module is configured to input the pedestrian flow data into a trained prediction model for pedestrian flow prediction to obtain prediction results. The prediction model includes a multi-head attention model and a fast Fourier transform model, which are used to determine the temporal and spatial correlations between the target region and its adjacent regions. The input module is also configured to input preprocessed pedestrian flow data into the trained prediction model for pedestrian flow prediction to obtain prediction results. The input module is further configured to have the fast Fourier transform model positioned between at least two of the multi-head attention models. The input module is also configured to perform a Fourier FFT transform on the pedestrian flow data to obtain predetermined data, which includes temporal correlation data and / or spatial correlation data between the target region and its adjacent regions. The imaginary and real numbers of the predetermined data are then input into the multi-head attention model for mixing. The device further includes a determining module, an adjusting module, and a preprocessing module, wherein... The determination module is used to determine the Pearson correlation coefficient between the pedestrian flow data of the target area and the pedestrian flow data of the adjacent area; The adjustment module is used to adjust the weight values ​​of the degree matrix of the graph convolutional neural network used for preprocessing the pedestrian flow data based on the Pearson correlation coefficient. The preprocessing module is used to preprocess the pedestrian flow data based on the graph convolutional neural network.

4. The apparatus according to claim 3, characterized in that, The device further includes: The training module is used to train the prediction model based on the pedestrian flow data sample set of the target area and the adjacent area until the prediction model converges, thereby obtaining the trained prediction model.

5. A processing device, characterized in that, The processing equipment includes: Memory, used to store executable programs; A processor, when executing an executable program stored in the memory, implements the method as described in any one of claims 1 to 2.

6. A computer storage medium, characterized in that, The computer storage medium stores an executable program, which, when executed by a processor, implements the method as described in any one of claims 1 to 2.