Crowd flow prediction method based on geographical similarity and federated learning

Through the crowd flow prediction method based on geographical similarity and federated learning, the neural network model is used to screen data from similar source cities for prediction, which solves the problems of personal information leakage and data islands in the existing technology, and achieves accurate crowd flow distribution. Improved prediction and model adaptability.

CN118735064AActive Publication Date: 2024-10-01SHENZHEN UNIV

Patent Information

Application Number
CN202410859563.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

Existing crowd flow distribution data prediction methods can easily lead to the leakage of personal information, and incomplete data collection and limited device coverage prevent cities from obtaining complete crowd flow data.

Method used

A crowd flow prediction method based on geographical similarity and federated learning is used to preprocess the geospatial data of the target city, and use the trained neural network model for prediction, and then screen data from similar source cities for model update to avoid personal information. Give way.

Benefits of technology

It achieves accurate prediction of crowd flow distribution data, avoids the leakage of personal information, solves the problem of data islands, and improves the adaptability and accuracy of the prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735064A_ABST
    Figure CN118735064A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of crowd flow prediction, in particular to a crowd flow prediction method based on geographical similarity and federal learning. The method comprises the following steps: firstly, performing federated learning under a deep learning model on a plurality of source city terminals by using geographic space data and crowd flow data; and the source city terminal uploads the model parameters to the central server so as to update the global neural network model. Then, geographic similarity measurement is carried out on the geographic space data of all the source cities and the target cities, and a source city set with the highest similarity is determined; and finally, performing personalized customized federated learning on the source city sets with high geographical similarity, and applying the final model to the target cities lacking the crowd flow data to complete crowd flow prediction of the target cities. According to the method, prediction difficulty caused by target city data missing is solved, personal privacy data leakage is prevented, and the precision of crowd flow prediction in personalized federated learning is improved through geographical similarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of crowd flow prediction, and in particular to a crowd flow prediction method based on geographic similarity and federated learning. Background Art

[0002] With the popularity of mobile devices and the rapid development of the Internet, human mobility has become more complex and diverse. Accurately predicting the location and flow information of crowd flow is helpful in urban planning, traffic management, public health and other fields. Due to incomplete data collection, limited equipment coverage or defects in data storage systems, many cities are unable to obtain complete crowd flow data. Existing crowd flow prediction methods are mainly based on statistical models, using historical travel data to predict future travel patterns, that is, predicting future crowd flow data. Due to the need to collect and share a large amount of personal travel data, personal privacy information is leaked.

[0003] In summary, the crowd flow distribution data prediction method in the prior art is prone to leakage of personal information.

[0004] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a crowd flow prediction method based on geographical similarity and federated learning, which solves the problem that the crowd flow distribution data prediction method in the prior art is prone to personal information leakage.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for predicting crowd flow based on geographic similarity and federated learning, which includes:

[0008] Acquire target original geospatial data of a target city, and preprocess the target original geospatial data to obtain standardized geospatial data;

[0009] The trained neural network model is applied to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city, and the crowd flow distribution prediction data is used to characterize the flow data of the crowd in each grid space within the target city.

[0010] In one implementation, the preprocessing of the target original geospatial data to obtain standardized geospatial data includes:

[0011] Dividing the target original geographic spatial data according to time to obtain local data information within each time step;

[0012] Gridding the local data information in each time step according to the geographic space to obtain the local geographic space data information in each time step, wherein the local geographic space data information corresponds to the grid space;

[0013] Normalizing the local geographic spatial data information in each time step to obtain standardized local spatial data;

[0014] Standardized geographic spatial data is obtained according to the standardized local spatial data in all the time steps.

[0015] In one implementation, applying the trained neural network model to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city includes:

[0016] Apply the trained neural network model to the standardized geographic spatial data to obtain the spatial-temporal distribution prediction data of crowd flow on each of the grid spaces in each time step output by the neural network model, and use the spatial-temporal distribution prediction data of crowd flow as the crowd flow distribution prediction data of the target city.

[0017] In one implementation, the training method of the trained neural network model includes:

[0018] Acquire local model parameters of each pre-trained neural network model, wherein each of the pre-trained neural network models is obtained by training a neural network based on a training data set for each source city terminal, wherein the training data set includes geographic spatial data of the source city and actual population flow distribution data corresponding to the geographic spatial data;

[0019] According to each of the local model parameters, a global final parameter of the model is obtained;

[0020] Determine the similarity between each of the source cities and the target city, and based on each of the similarities, select similar source city terminals from each of the source city terminals;

[0021] Sending the global final parameters of the model to the similar source city terminal, and obtaining the personalized model parameters of the personalized neural network model sent by the similar source city terminal, wherein the personalized neural network model is a model obtained by continuing to train the neural network model based on the global final parameters of the model by the similar source city terminal;

[0022] A trained neural network model is obtained according to the personalized model parameters.

[0023] In one implementation, determining the similarity between each of the source cities and the target city, and selecting similar source city terminals from each of the source city terminals based on the similarities, includes:

[0024] The geographic spatial data of each source city is divided into grids according to time and geographic space in turn to obtain each standardized source geographic spatial data;

[0025] Calculating each cosine similarity between each of the standardized source geospatial data and the standardized geospatial data, and using each of the cosine similarities as the similarity between each of the source cities and the target city;

[0026] According to each of the similarities, a number of similar source cities are selected from each of the source cities, so as to select similar source city terminals from each of the source city terminals, and the similarity of each of the similar source cities is greater than the similarity of the remaining source cities, and the remaining source cities are cities other than the similar source cities of each of the source cities.

[0027] In one implementation, obtaining the global final parameters of the model according to the local model parameters includes:

[0028] The mean of each of the local model parameters is calculated to obtain the final global parameters of the model.

[0029] In one implementation, the personalized model parameters are updated when the similar source city terminal trains the neural network. The updating method is to update the personalized model parameters according to the loss function and the global feature vector of the similar source city. The loss function is a loss function composed of the actual population flow distribution data of the similar city and the predicted population flow distribution data of the similar city. The predicted population flow distribution data is the predicted data output by the neural network based on the geographic spatial data of the similar city. The global feature vector is the vector form of the geographic spatial data of the similar city.

[0030] In a second aspect, an embodiment of the present invention further provides a crowd flow prediction device based on geographic similarity and federated learning, wherein the device includes the following components:

[0031] A data preprocessing module is used to obtain target original geospatial data of a target city and preprocess the target original geospatial data to obtain standardized geospatial data;

[0032] A prediction module is used to apply a trained neural network model to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city, and the crowd flow distribution prediction data is used to characterize the flow data of the crowd in each grid space within the target city.

[0033] In a third aspect, an embodiment of the present invention further provides a terminal device, wherein the terminal device comprises a memory, a processor, and a crowd flow prediction program based on geographic similarity and federated learning stored in the memory and executable on the processor, and when the processor executes the crowd flow prediction program based on geographic similarity and federated learning, the steps of the above-mentioned crowd flow prediction method based on geographic similarity and federated learning are implemented.

[0034] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which is stored a crowd flow prediction program based on geographic similarity and federated learning. When the crowd flow prediction program based on geographic similarity and federated learning is executed by a processor, the steps of the above-mentioned crowd flow prediction method based on geographic similarity and federated learning are implemented.

[0035] Beneficial effect: The present invention first obtains the target original geospatial data of the target city, and then pre-processes the target original geospatial data to obtain standardized geospatial data. Finally, the trained neural network model is applied to the standardized geospatial data to obtain the crowd flow distribution prediction data of the target city. From the above analysis, it can be seen that since the geospatial data of the target city is closely related to the flow of people, the use of geospatial data can predict the crowd flow distribution data, and the geospatial data does not involve the personal information of the crowd. Therefore, the present invention can predict the crowd flow distribution data without leaking personal privacy data. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is the overall flow chart of the present invention;

[0037] Figure 2 This is a flow chart of target city population distribution prediction in an embodiment of the present invention;

[0038] Figure 3 A structural diagram of a crowd flow prediction device based on geographic similarity and federated learning provided by the present invention;

[0039] Figure 4 This is a block diagram of the internal structure principle of the terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following is a clear and complete description of the technical solution of the present invention in combination with the embodiments and the accompanying drawings. 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.

[0041] Research has found that with the popularity of mobile devices and the rapid development of the Internet, human mobility has become more complex and diverse. Accurately predicting the location and flow information of crowd flow is helpful in urban planning, traffic management, public health and other fields. Due to incomplete data collection, limited equipment coverage or defects in data storage systems, many cities are unable to obtain complete crowd flow data. Existing crowd flow prediction methods are mainly based on statistical models, using historical travel data to predict future travel patterns, that is, predicting future crowd flow data. Due to the need to collect and share a large amount of personal travel data, personal privacy information is leaked.

[0042] In order to solve the above technical problems, the present invention provides a crowd flow prediction method based on geographic similarity and federated learning, which solves the problem that the crowd flow distribution data prediction method in the prior art is prone to personal information leakage. In specific implementation, the target original geographic spatial data of the target city is first obtained, and the target original geographic spatial data is preprocessed to obtain standardized geographic spatial data; finally, the trained neural network model is applied to the standardized geographic spatial data to obtain the crowd flow distribution prediction data of the target city, and the crowd flow distribution prediction data is used to characterize the flow data of the crowd in each grid space within the target city.

[0043] For example, the target city includes area A, area B, and area C (these three areas are three grid spaces). The geospatial data A1 of area A last month and the geospatial data A2 of the month before that are obtained. The geospatial data B1 of area B last month and the geospatial data B2 of the month before that are obtained. The geospatial data C1 of area C last month and the geospatial data C2 of the month before that are obtained. Last month and the month before that are the time steps. The geospatial data A1, geospatial data A2, geospatial data B1, geospatial data B2, geospatial data C1, and geospatial data C2 are combined together to form the target original geospatial data. The standardized geospatial data is obtained by standardizing the target original geospatial data. That is, the standardized geospatial data includes the standardized geospatial data a1, standardized Geographical space data a2, standardized geographic space data b1, standardized geographic space data b2, standardized geographic space data c1, standardized geographic space data c2, wherein a1, a2, b1, b2, c1, c2 correspond to A1, A2, B1, B2, C1, C2 respectively, a1, a2, b1, b2, c1, c2 are input into the trained neural network model, the trained neural network model outputs the crowd flow distribution prediction data of the target city, the crowd flow distribution prediction data includes the population of area A in the next month and the population of the next month, the population of area B in the next month and the population of the next month, the population of area C in the next month and the population of the next month, wherein the population of each area each month is caused by the outflow of population from the area to other areas and the inflow of population from other areas to the area. That is, the crowd flow distribution prediction data of the present invention is used to ensure the population of each area of ​​the target city in the next few months.

[0044] The crowd flow prediction method based on geographic similarity and federated learning in this embodiment can be applied to a terminal device, which can be a terminal product with data processing function, such as a computer. Figure 1 As shown in , the crowd flow prediction method based on geographic similarity and federated learning specifically includes the following steps:

[0045] S100, training neural network model.

[0046] S200, acquiring target original geographic spatial data of a target city, and preprocessing the target original geographic spatial data to obtain standardized geographic spatial data;

[0047] S300, applying a trained neural network model to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city, wherein the crowd flow distribution prediction data is used to characterize crowd flow data in each grid space within the target city.

[0048] In the first embodiment, step S100 of training the neural network model is to first train the neural network model at the source city terminal of each source city, such as Figure 2 As shown, each source city terminal uploads the model parameters obtained from its training to the central server, which aggregates the model parameters and sends them to each source city terminal. The source city terminal continues to train the neural network model until the model converges or reaches the preset number of iterations, at which time the federated model joint training is completed. Afterwards, based on the similarity between the geospatial data of each source city and the geospatial data of the target city, similar source cities are selected from each source city, and the neural network model is continued to be trained on the terminals of similar source cities.

[0049] In this embodiment, step S100 includes the following specific steps:

[0050] S101, obtaining local model parameters of each pre-trained neural network model, wherein each of the pre-trained neural network models is obtained by training a neural network for each source city terminal based on a training data set, and the training data set includes geographic spatial data of the source city and actual population flow distribution data corresponding to the geographic spatial data.

[0051] The geospatial data in the training dataset include population density, GDP (economic capacity data), transportation network, transportation hubs, elevation, POI (infrastructure data) and other types of geospatial data. Each type of geospatial data for each source city is standardized to obtain

[0052]

[0053] In the formula, is the standardized source geospatial data of the ith source city, is the local data information of the i-th source city in the j-th time step, and N is the total number of time steps. They all include population density, GDP (economic capacity data), transportation network, transportation hubs, elevation, POI (infrastructure data), etc.

[0054]

[0055] Where F(x, y, j) is the local geographic spatial data information in the grid space (the coordinates of the grid space are (x, y)) in the jth time step, W is the maximum horizontal coordinate, and H is the maximum vertical coordinate.

[0056] There are M types of geospatial data in total. Each type of data is processed by formulas (1) and (2). The standardized source geospatial data corresponding to the M types of data of the i-th source city are: Using the matrix represents the multi-class standardized geospatial data of the i-th source city, then:

[0057]

[0058] The actual population flow distribution data of the i-th source city is used

[0059]

[0060]

[0061] f(x,y,j) is the population in the grid space (the coordinates of the grid space are (x,y)) in the jth time step.

[0062] The central server selects a convolutional neural network (CNN) to initialize a global model as the training starting point, and the initial parameter of the global model is W0. The initialized global model will then be downloaded to each source city terminal, and each source city terminal will train the local model based on this. The specific training process is as follows:

[0063] The terminal of the i-th source city will be D i g M Divide into training set and test set, the training set is input into the neural network model, and multiple convolution kernels of the neural network model are compared with D i g M Perform feature extraction and generate multiple feature maps to capture local patterns in the data. Process the feature maps through a series of nonlinear transformations and activation functions to increase the nonlinear expression ability of the model. Use the data in the test set to evaluate the performance of the model. Use the crowd flow data as the true value of the model, compare the predicted results with the true value, and perform model parameter adjustment and loss calculation.

[0064] The terminal in each source city updates the model parameters during the model training process, and the update rules are as shown in formula (6).

[0065]

[0066] is the model parameter obtained by the terminal in source city i at the r+1th update in the tth round (a round includes several trainings of the model by the source city terminal. After each round of training, the source city terminal uploads the model parameters obtained from the training to the central server, which aggregates the model parameters of each source city terminal and sends them to each source city terminal for the next round of model training). is the model parameter obtained when the terminal of the i-th source city is updated for the r-th time in the t-th round, is to use batch gradient descent to Find the gradient; K represents the total number of terminals in the source city; is the loss function, and F(x, y, n) represent the predicted value (that is, the predicted population flow distribution data) and actual value (that is, the actual population flow distribution data) of the population flow in the source city respectively. η is the learning rate, which is used to control the size of the update step.

[0067] S102, obtaining final global model parameters according to the local model parameters.

[0068] After each round of training, all source city terminals upload the model parameters obtained from the training to the central server for aggregation to obtain

[0069]

[0070] Indicates the global model parameters after updating t+1 rounds; It is the model parameter (that is, the local model parameter) of the source city after the last local update in the tth round (that is, the Rth time in the tth round).

[0071] The central server will It is sent to each source city terminal and the adjustment steps are repeated until the model converges or reaches the preset number of iterations. That is, when it converges or reaches the preset number of iterations, the global final parameters of the model are obtained.

[0072] S103, gridding the geographic spatial data of each source city according to time and geographic space in turn to obtain each standardized source geographic spatial data

[0073] That is, formula (1) is used to obtain the standardized source geospatial data of each source city.

[0074] S104, calculating the difference between each of the standardized source geospatial data and the standardized geospatial data The cosine similarity d of iTAnd each of the cosine similarities is used as the similarity between each of the source cities and the target city.

[0075] In formula (1), Replace it with the target city's geospatial data to get

[0076]

[0077] d iT is the cosine similarity between the i-th source city and the target city T, that is, the similarity. iT Based on the similarity calculated for one type of geospatial data, formula (8) is applied to the above M types of geospatial data to obtain M d iT , for M d iT Finding the mean gives All source cities corresponding to It is combined into the matrix S T :

[0078]

[0079] S105, based on each of the similarities, a number of similar source cities are selected from each of the source cities, so as to select similar source city terminals from each of the source city terminals, wherein the similarity of each of the similar source cities is greater than the similarity of the remaining source cities, and the remaining source cities are cities other than the similar source cities of each of the source cities.

[0080] S T All Arrange them in descending order to get the sorting of all source city terminals, and select the first c source city terminals. The S′ corresponding to the first c source city terminals T :

[0081] is the mean cosine similarity corresponding to the first source city terminal, is the mean cosine similarity corresponding to the first two source city terminals, S′ T Weighted to get the global eigenvector

[0082]

[0083] Where, d i′T S′ T The mean of the i′th cosine similarity in .

[0084] S106, sending the global final parameters of the model to the similar source city terminal, and obtaining the personalized model parameters of the personalized neural network model sent by the similar source city terminal, wherein the personalized neural network model is a model obtained by continuing to train the neural network model by the similar source city terminal based on the global final parameters of the model.

[0085] The CPU will The final parameters of the global model are sent to the first c source city terminals respectively. and each of the first c source city terminals All of them are used as training data sets. Each of the first c source city terminals continues to train the neural network model on the basis that the neural network model has the global final parameters of the model, so that each of the first c source city terminals can be trained to obtain a set of personalized model parameters.

[0086] When training the model for the first c source city terminals, the update rules for the model parameters are as follows:

[0087]

[0088] is the model parameter of the i-th source city terminal among the first c source city terminals at the r+1th update in the tth round, represents the model parameters of the i-th source city terminal among the first c source city terminals at the r-th update in the t-th round, Yes Find the gradient, is a regularization term used to limit the size of model parameters, and λ is a regularization parameter used to limit the size of model parameters to prevent overfitting.

[0089] The global model parameters after geographic similarity measurement and the model parameters of the first c source cities Upload to the central server to aggregate global model parameters. By using different geographic similarity weights S T Assign different weights to updates from different source cities, and then aggregate the weighted updates with the global model parameters. Update the weight parameters of the global model to As shown in formula (12), the updated weight parameters are sent to each client, and the adjustment steps are repeated until the model converges or reaches the preset number of iterations. When the model converges or reaches the preset number of iterations, the personalized model parameters of each source city terminal are obtained.

[0090]

[0091] in, Indicates the global model parameters after t+1 rounds of personalized model training update; It is the model parameter after the last local update of source city i in round t (that is, the Rth time).

[0092] S107, obtaining a trained neural network model according to the personalized model parameters.

[0093] The model training is completed by weighting all personalized model parameters, and a trained neural network model is obtained.

[0094] Embodiment 2, based on embodiment 1, each time the model is trained, the model is also evaluated. In this embodiment, three evaluation indicators, namely mean absolute error (MAE), root mean square error (RMSE) and correlation coefficient (CC), are used to evaluate the trained model.

[0095] The mean absolute error (MAE) is the average of all absolute errors between the predicted values ​​and their corresponding actual values:

[0096]

[0097] In the formula, is the predicted value of the population flow in the source city, and F(x,y,n) is the actual value of the population flow in the source city.

[0098] The root mean square error (RMSE) measures the deviation between the predicted values ​​and their respective actual values:

[0099]

[0100] The correlation coefficient (CC) is used to verify the correlation between variables:

[0101]

[0102] Embodiment 3, based on embodiment 1, in this embodiment, step S200 includes the following specific steps S201 to S204:

[0103] S201, the target original geospatial data Divide by time to get local data information in each time step

[0104] is the local data information in the kth time step, k∈N, N is the total number of time steps.

[0105] S202, the local data information in each time step Grid division is performed according to geographic space to obtain local geographic space data information within each time step The local geographic space data information corresponds to the grid space.

[0106] is the local geographic spatial data information with grid space coordinates (x, y) in the kth time step, x∈[1,W], y∈[1,H], W is the maximum horizontal coordinate, and H is the maximum vertical coordinate.

[0107] S203, normalizing the local geographic spatial data information in each time step to obtain standardized local spatial data

[0108] S204, obtaining standardized geographic spatial data according to the standardized local spatial data in all the time steps

[0109]

[0110]

[0111] In this embodiment, the specific process of step S300 is as follows: applying the trained neural network model to the standardized geographic spatial data, obtaining the crowd flow spatial-temporal distribution prediction data on each of the grid spaces within each time step output by the neural network model, and using the crowd flow spatial-temporal distribution prediction data as the crowd flow distribution prediction data of the target city.

[0112] That is, standardizing geospatial data Input to the neural network trained in Example 1

[0113] The neural network model outputs the prediction data of the spatial and temporal distribution of crowd flow.

[0114]

[0115]

[0116] It is the predicted data of spatial and temporal distribution of crowd flow in the grid space with position (x, y) in the kth time step.

[0117] In summary, the present invention adjusts the model to adapt to the characteristics of different regions by considering geographical factors, fully utilizes the knowledge of the source city, adapts to the specific characteristics of the target city, and improves the model prediction ability in a targeted manner. By conducting federated learning in multiple source cities and uploading the model parameters of each city to a central server for aggregation, the problem of privacy protection is solved, the sharing of a large amount of personal travel data is avoided, and the problem of data islands is effectively solved. By using advanced model training methods, the present invention can still effectively predict crowd flows even in an environment where complete data is lacking. This method does not rely on data filling or data interpolation, but instead makes effective predictions by directly analyzing and utilizing other existing geographically relevant data.

[0118] This embodiment also provides a crowd flow prediction device based on geographical similarity and federated learning, such as Figure 3 As shown, the device comprises:

[0119] Training module 01 is used to train the neural network model.

[0120] The data preprocessing module 02 is used to obtain the target original geographic spatial data of the target city and preprocess the target original geographic spatial data to obtain standardized geographic spatial data;

[0121] Prediction module 03 is used to apply the trained neural network model to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city, and the crowd flow distribution prediction data is used to characterize the flow data of the crowd in each grid space within the target city.

[0122] Based on the above embodiments, the present invention further provides a terminal device, whose principle block diagram can be shown as follows: Figure 4 As shown. The terminal device includes a processor, a memory, a network interface, and a display screen connected through a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a crowd flow prediction method based on geographic similarity and federated learning is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen.

[0123] Those skilled in the art will understand that Figure 4The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0124] In one embodiment, a terminal device is provided. The terminal device includes a memory, a processor, and a crowd flow prediction program based on geographic similarity and federated learning stored in the memory and executable on the processor. When the processor executes the crowd flow prediction program based on geographic similarity and federated learning, the following operation instructions are implemented:

[0125] Acquire target original geospatial data of a target city, and preprocess the target original geospatial data to obtain standardized geospatial data;

[0126] The trained neural network model is applied to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city, and the crowd flow distribution prediction data is used to characterize the flow data of the crowd in each grid space within the target city.

[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A crowd flow prediction method based on geographic similarity and federated learning, characterized in that: include: Acquire target original geospatial data of a target city, and preprocess the target original geospatial data to obtain standardized geospatial data; The trained neural network model is applied to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city, and the crowd flow distribution prediction data is used to characterize the flow data of the crowd in each grid space within the target city.

2. The method for predicting crowd flow based on geographic similarity and federated learning according to claim 1, characterized in that: The preprocessing of the target original geospatial data to obtain standardized geospatial data includes: Dividing the target original geographic spatial data according to time to obtain local data information within each time step; Gridding the local data information in each time step according to the geographic space to obtain the local geographic space data information in each time step, wherein the local geographic space data information corresponds to the grid space; Normalizing the local geographic spatial data information in each time step to obtain standardized local spatial data; Standardized geographic spatial data is obtained according to the standardized local spatial data in all the time steps.

3. The method for predicting crowd flow based on geographic similarity and federated learning according to claim 2, characterized in that: The applying the trained neural network model to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city includes: Apply the trained neural network model to the standardized geographic spatial data to obtain the spatial-temporal distribution prediction data of crowd flow on each of the grid spaces in each time step output by the neural network model, and use the spatial-temporal distribution prediction data of crowd flow as the crowd flow distribution prediction data of the target city.

4. The method for predicting crowd flow based on geographic similarity and federated learning according to claim 1, characterized in that: The training methods of the trained neural network model include: Acquire local model parameters of each pre-trained neural network model, wherein each of the pre-trained neural network models is obtained by training a neural network based on a training data set for each source city terminal, wherein the training data set includes geographic spatial data of the source city and actual population flow distribution data corresponding to the geographic spatial data; According to each of the local model parameters, a global final parameter of the model is obtained; Determine the similarity between each of the source cities and the target city, and based on each of the similarities, select similar source city terminals from each of the source city terminals; Sending the global final parameters of the model to the similar source city terminal, and obtaining the personalized model parameters of the personalized neural network model sent by the similar source city terminal, wherein the personalized neural network model is a model obtained by continuing to train the neural network model based on the global final parameters of the model by the similar source city terminal; A trained neural network model is obtained according to the personalized model parameters.

5. The method for predicting crowd flow based on geographic similarity and federated learning according to claim 4, characterized in that: The determining of the similarity between each of the source cities and the target city, and selecting similar source city terminals from each of the source city terminals according to the similarities, includes: The geographic spatial data of each source city is divided into grids according to time and geographic space in turn to obtain each standardized source geographic spatial data; Calculating each cosine similarity between each of the standardized source geospatial data and the standardized geospatial data, and using each of the cosine similarities as the similarity between each of the source cities and the target city; According to each of the similarities, a number of similar source cities are selected from each of the source cities, so as to select similar source city terminals from each of the source city terminals, and the similarity of each of the similar source cities is greater than the similarity of the remaining source cities, and the remaining source cities are cities other than the similar source cities of each of the source cities.

6. The method for predicting crowd flow based on geographic similarity and federated learning according to claim 4, characterized in that: The step of obtaining the global final parameters of the model according to the local model parameters includes: The mean of each of the local model parameters is calculated to obtain the final global parameters of the model.

7. The method for predicting crowd flow based on geographic similarity and federated learning according to claim 4, characterized in that: The personalized model parameters are updated when the similar source city terminal trains the neural network. The updating method is to update according to the loss function and the global feature vector of the similar source city. The loss function is a loss function composed of the actual population flow distribution data of the similar city and the predicted population flow distribution data of the similar city. The predicted population flow distribution data is the predicted data output by the neural network based on the geographic spatial data of the similar city. The global feature vector is the vector form of the geographic spatial data of the similar city.

8. A crowd flow prediction device based on geographic similarity and federated learning, characterized in that: The device comprises the following components: A data preprocessing module is used to obtain target original geospatial data of a target city and preprocess the target original geospatial data to obtain standardized geospatial data; A prediction module is used to apply a trained neural network model to the standardized geographic spatial data to obtain crowd flow distribution prediction data of the target city, and the crowd flow distribution prediction data is used to characterize the flow data of the crowd in each grid space within the target city.

9. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a crowd flow prediction program based on geographic similarity and federated learning stored in the memory and executable on the processor. When the processor executes the crowd flow prediction program based on geographic similarity and federated learning, the steps of the crowd flow prediction method based on geographic similarity and federated learning as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a crowd flow prediction program based on geographic similarity and federated learning. When the crowd flow prediction program based on geographic similarity and federated learning is executed by a processor, the steps of the crowd flow prediction method based on geographic similarity and federated learning as described in any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Urban people flow prediction method based on space-time dynamic neural network

    CN112257934A

  • Cross-city federal migration model training method, device, system and equipment

    CN115935189A

  • Cross-city crowd flow trend prediction method based on city function area matching

    CN117649028A

  • People flow prediction device, people flow prediction method, and people flow prediction program

    US20230030127A1

  • Optimization method for modeling based on federated learning, and electronic device, storage medium and program product

    WO2023092792A1

Cited By

  • Urban multi-dimensional profile prediction method integrating multi-source spatio-temporal data and federated graph learning

    WO2026194123A1