A method, system and device for predicting commercial district passenger flow based on graph neural network
By constructing a business district customer flow prediction method based on graph neural network, combined with graph convolutional neural network and multi-layer perception machine, the problem of inaccurate prediction of business district customer flow in the existing technology is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202510384845.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-03-28
AI Technical Summary
The existing business district passenger flow prediction methods cannot effectively capture the nonlinear and irregular human flow patterns, ignore the structural characteristics of the spatial interaction network and the economic attributes of the customer source, resulting in the inability to accurately predict the passenger flow from the transportation community to the business district under a fine scale.
A business district passenger flow prediction method is built based on graph neural network. By constructing a business district passenger flow prediction feature space, using graph neural network and graph embedding technology, combining the characteristics of traffic communities and business districts, including OD flow, business district features and traffic district features, the graph convolutional neural network is used for feature embedding, and a multi-layer perceptron is used for prediction, to build a multi-graph structure to improve prediction accuracy.
It improves the accuracy of the prediction of customer flow in business districts, and can accurately predict the passenger flow from traffic communities to business districts under a precise scale, taking into account the influence of spatial interaction network and economic attributes.
Smart Images

Figure CN119887280B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of commercial district passenger flow prediction, and in particular to a commercial district passenger flow prediction method, system and device based on graph neural network. Background Art
[0002] Currently, methods for predicting passenger flow in shopping districts have evolved from traditional models to machine learning models. The most commonly used traditional models, such as the gravity model and Poisson regression, offer good interpretability. However, due to their simple formulas and empirically derived parameters, they cannot effectively capture nonlinear and irregular patterns. This makes it difficult to accurately model complex human mobility patterns and predict passenger flow in different urban areas.
[0003] Although existing machine learning models can simulate the complex patterns of passenger flow to a certain extent, they often ignore the structural characteristics of the spatial interaction network formed by the flow of people within the city and the spatial proximity effect between locations. They also do not consider the impact of the economic attributes of the source of customers on the passenger flow in the business district. Therefore, they cannot accurately predict the passenger flow from transportation areas to business districts at a fine scale. Summary of the Invention
[0004] The purpose of the present invention is to provide a method, system and device for predicting customer flow in a shopping district based on a graph neural network to solve at least one of the above-mentioned technical problems existing in the prior art.
[0005] In a first aspect, to solve the above technical problems, the present invention provides a method for predicting customer flow in a shopping district based on a graph neural network, comprising the following steps:
[0006] Step 1: Based on the set of traffic zones and business districts, a feature space for predicting business district passenger flow is constructed, including OD flow features, business district features, and traffic zone features.
[0007] In a feasible embodiment, the OD flow characteristics include OD flow and OD distance; the OD flow is the first Traffic Zone To business districts The average number of passengers per hour (i.e. OD pairs); the OD distance is and The Euclidean distance between .
[0008] Preferably, the average number of passengers per hour is obtained by calculating the average passenger flow from each traffic zone to the business district every hour of each day based on mobile phone signaling data (of a preset year).
[0009] In a feasible implementation, the business district characteristics include the average daily passenger flow of the business district, the land area of the business district, the business type diversity index of the business district, and the number of parking lots;
[0010] The average daily passenger flow of the business district is obtained by querying (SQL language) based on the user daily residence anonymized information table provided by a big data platform (such as the Smart Footprint Jizhi DaaS platform); the user daily residence anonymized information table includes residence time, residence location, etc.
[0011] The commercial area is collected from building outline data provided by navigation platforms (such as Amap);
[0012] The business district diversity index is calculated based on the number of POIs (points of interest) provided by the navigation platform using the HillNumbers index formula. The specific formula is:
[0013] ;
[0014] in, represents the business diversity index of the business district; Indicates the total number of business types in the business district; Indicates the first The proportion of POIs of a certain business type to the total number of POIs in the business district; Representation parameters, which can take into account the richness of POIs and the uniformity of different business types;
[0015] The number of parking lots refers to the number of parking lots within a preset buffer zone of the business district, which can be collected from the navigation platform.
[0016] In a feasible implementation, the traffic community characteristics include the average housing price in the community, the average consumption amount in the community, the distance from the community to the urban center, the residential population in the community, and the employed population in the community;
[0017] The average housing price of the community can be collected from second-hand housing price data of a residential transaction platform (such as Lianjia Company) and processed by the inverse distance weighted interpolation method;
[0018] The average consumption amount in a community can be collected from consumption statistics provided by financial institutions (such as UnionPay) (such as consumption statistics of various categories in a 1km grid in a city, which are spatially aggregated and do not involve personal consumption privacy) and processed using the inverse distance weighted interpolation method;
[0019] The distance from the cell to the urban center can be the Euclidean distance from the center point of each traffic cell polygon to the nearest urban center;
[0020] The residential population and the employed population of the community can be obtained through (SQL language) query based on the user daily resident desensitized information table provided by the big data platform; the residence types of the user daily resident desensitized information table include residence, work and visit.
[0021] Step 2: Embed the traffic zone features into the graph neural network to obtain the traffic zone embedding vector; embed the business district features into the first multi-layer perceptron to obtain the business district embedding vector; connect the embedding vector with the corresponding OD flow features to obtain the OD flow comprehensive representation vector.
[0022] In a feasible implementation, the specific method of embedding the traffic zone into the graph neural network includes:
[0023] The traffic zone features are embedded through a first graph convolutional neural network (GCN) module and a second graph convolutional neural network module set in parallel to obtain a first embedding vector and a second embedding vector respectively;
[0024] The first graph convolutional neural network includes a neighborhood graph , the second graph convolutional neural network includes the consumption level similarity graph ,in, Represents the nodes of the graph, i.e., the traffic sub-district; Indicates the number of nodes; Indicates the number of traffic zones, equal ; An adjacency matrix representing weighted edges in a neighborhood graph; An adjacency matrix representing weighted edges in a consumption level similarity graph;
[0025] First embedding vector The specific expression is:
[0026] ;
[0027] in, Represents the dimension of the vector; express rank matrix;
[0028] Second embedding vector The specific expression is:
[0029] ;
[0030] Then and Fusion is performed to obtain the third embedding vector , the specific formula can be:
[0031] ;
[0032] in, and are all trainable weight parameters and belong to Matrix of order.
[0033] In one possible implementation, The definition formula of the median is:
[0034] ;
[0035] in, A trainable distance decay parameter representing the neighborhood graph; Indicates the Traffic Zone With the Traffic Zone The Euclidean distance between express Middle Traffic Zone With the Traffic Zone The edge between Express the remaining conditions; in this way, the graph can be constructed by the proximity of two transportation cells (irregular geographical units) and information can be passed through edges.
[0036] In one possible implementation, The definition formula of the median is:
[0037] ;
[0038] in, Trainable distance decay parameters representing the consumption level similarity graph; express consumption level; express consumption level; express and Similarity of consumption levels between them; express middle and The reason for designing the formula in this way is that two areas with similar consumption levels may have similar shopping options even if they are far apart in space, and the housing prices and consumption amounts in a transportation community can reflect the differences in consumption levels of different groups of people to a certain extent. Therefore, this application uses housing prices and consumption amounts as evaluation indicators of transportation community consumption levels, and uses cosine similarity to calculate the similarity of consumption levels of two transportation communities.
[0039] In a feasible implementation, each graph convolutional neural network module is configured with a multi-layer conventional structure, i.e., an input layer, a graph convolutional layer, and an output layer connected in sequence, so as to reduce the amount of computation while ensuring the embedding effect.
[0040] In a feasible implementation, the first multi-layer perceptron has a two-layer structure, so as to reduce the amount of computation while ensuring the embedding effect.
[0041] Step 3: Based on the OD flow comprehensive representation vector, a training set and a validation set are constructed. Based on the training set, a second multi-layer perceptron is trained to predict the passenger flow between each traffic zone and each business district. Based on the validation set, the second multi-layer perceptron is iteratively verified until the performance of the validation set no longer improves, thereby avoiding overfitting. The OD flow comprehensive representation vector that performs best on the validation set is used as input to a fully connected neural network (FCN). Based on external prediction requirements, a test set is constructed, and the fully connected neural network is used to predict the passenger flow of the business district.
[0042] In one feasible embodiment, the second multi-layer perceptron has a batch-normalized multi-layer structure (eg, four layers) so as to learn embedding through back-propagation.
[0043] In a feasible implementation, the loss function of the second multi-layer perceptron is is the mean square error function, and the specific formula is:
[0044] ;
[0045] in, Indicates the number of pairs between transportation districts and business districts; Indicates the Traffic Zone To business districts The actual calculated value of the average number of passengers per hour; Indicates the Traffic Zone To business districts The predicted value of the average number of passengers per hour.
[0046] In the second aspect, based on the same inventive concept, the present application also provides a shopping district passenger flow prediction system based on graph neural network, including a data receiving module, a data processing module and a result generation module;
[0047] The data receiving module is used to receive traffic area sets, business district sets and external forecast demands;
[0048] The data processing module includes a feature space unit, a feature embedding unit and a traffic prediction unit;
[0049] The feature space unit constructs a feature space for predicting passenger flow in a commercial district based on a set of traffic districts and a set of commercial districts, including OD flow features, commercial district features, and traffic district features;
[0050] The feature embedding unit embeds the traffic zone feature into the graph neural network to obtain the traffic zone embedding vector; embeds the business district feature into the first multi-layer perceptron to obtain the business district embedding vector; and connects the embedding vector with the corresponding OD flow feature to obtain the OD flow comprehensive representation vector;
[0051] The traffic prediction unit constructs a training set and a validation set based on the OD flow comprehensive representation vector; trains a second multi-layer perceptron based on the training set to predict the passenger flow between each traffic zone and each business district; it iteratively verifies the second multi-layer perceptron based on the validation set until the performance of the validation set no longer improves; uses the OD flow comprehensive representation vector that performs best on the validation set as input to a fully connected neural network (FCN); constructs a test set based on external prediction requirements, and predicts the passenger flow of the business district using the fully connected neural network;
[0052] The result generation module is used to send the customer flow of the business district outward.
[0053] On the third aspect, based on the same inventive concept, the present application also provides a shopping district passenger flow prediction device based on graph neural network, including a processor, a memory and a bus, the memory stores instructions and data read by the processor, the processor is used to call the instructions and data in the memory to execute the shopping district passenger flow prediction method based on graph neural network as described above, and the bus connects the functional components for transmitting information.
[0054] By adopting the above technical solution, the present invention has the following beneficial effects:
[0055] The present invention provides a method, system and device for predicting customer flow in a business district based on a graph neural network. The system incorporates geographic semantic information such as the socioeconomic attributes of a plot of land into the model for feature embedding, constructs a multi-graph structure combining two spatial dependencies, and predicts the OD flow of a business district through graph neural networks and graph embedding technology, which can achieve a higher prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0057] Figure 1 A flowchart of a method for predicting customer flow in a shopping district based on a graph neural network provided by an embodiment of the present invention;
[0058] Figure 2 A diagram illustrating the principles of the CDFPM model provided in an embodiment of the present invention;
[0059] Figure 3 A diagram of a shopping district passenger flow prediction system based on a graph neural network provided by an embodiment of the present invention;
[0060] Figure 4 A comparison chart of the MAE values of the CDFPM model and the baseline model provided in an embodiment of the present invention;
[0061] Figure 5 A comparison chart of the RMSE values of the CDFPM model provided by an embodiment of the present invention and the baseline model;
[0062] Figure 6 A comparison chart of CPC values between the CDFPM model and the baseline model provided in this embodiment of the present invention. DETAILED DESCRIPTION
[0063] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0064] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0065] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0066] To facilitate understanding of the following embodiments, the specific inventive concept of this application is briefly described as follows: Based on a graph neural network and a graph embedding algorithm, this application constructs a commercial district passenger flow (OD flow) prediction model, referred to as CDFPM. First, feature selection is performed on the prediction model from three dimensions: commercial district OD flow, commercial district, and transportation zone. Then, a graph neural network is used to represent the spatial proximity and consumption similarity of transportation zones. Two GCN modules are used for feature embedding, and the final transportation zone embedding vector is obtained through weight fusion. A two-layer multi-layer perceptron is used to embed the commercial district. Finally, a four-layer multi-layer perceptron network with batch normalization is used to predict commercial district passenger flow, and the model is trained using commercial district OD flow data derived from mobile phone signaling data. In this way, this application takes into account the structural characteristics of the spatial interaction network formed by the flow of people within the city, the spatial proximity effect between locations, and the impact of the economic attributes of the source of customers on commercial district passenger flow, facilitating accurate prediction of passenger flow from transportation zones to commercial districts at a fine scale.
[0067] The present invention will be further explained below with reference to specific embodiments.
[0068] It should also be noted that the following specific embodiments or specific implementations are a series of optimized settings listed in the present invention to further explain the specific content of the invention, and these settings can be combined or used in association with each other.
[0069] Example 1:
[0070] like Figure 1-2 As shown, this embodiment provides a method for predicting customer flow in a shopping district based on a graph neural network, comprising the following steps:
[0071] Step 1: Based on the set of traffic zones (1,374 traffic zones in a certain city) and the set of business districts (198 business districts in the city), a feature space for business district passenger flow prediction is constructed, including OD flow features, business district features, and traffic zone features.
[0072] Furthermore, the OD flow features include two features: Traffic Zone To business districts The average number of passengers per hour and and The Euclidean distance between .
[0073] Preferably, the average number of passengers per hour is based on the mobile phone signaling data (of China Unicom) in 2019, and is obtained by calculating the average flow of people from each traffic zone to the business district every hour of every day.
[0074] Furthermore, the business district characteristics include four characteristics, namely: the average daily passenger flow of the business district, the land area of the business district, the business type diversity index of the business district and the number of parking lots;
[0075] The average daily passenger flow of the business district is based on the user daily resident anonymized information table provided by the big data platform (Smart Footprint Jizhi DaaS platform), which is obtained through common SQL language command queries; the user daily resident anonymized information table includes the residence time, residence location, etc.
[0076] The commercial district land area is collected from the 2019 building outline data provided by the navigation platform (AutoNavi Map);
[0077] The business district diversity index is calculated based on the number of POIs (points of interest) provided by the navigation platform using the HillNumbers index formula. The specific formula is:
[0078] ;
[0079] in, represents the business diversity index of the business district; Indicates the total number of business types in the business district (e.g., catering services, shopping services, education and training, life services, cultural and sports leisure services, and accommodation services, a total of 6 types); Indicates the first The proportion of POIs of a certain business type to the total number of POIs in the business district; Represents the parameters, which can take into account the richness of POI and the uniformity of different business types. For example, The value is 2;
[0080] The number of parking lots refers to the number of parking lots within a preset buffer zone of the business district, which can be collected from a navigation platform. For example, the preset buffer zone is a 500-meter circular zone centered on the business district.
[0081] Furthermore, the traffic community characteristics include five characteristics, namely: average housing price in the community, average consumption amount in the community, distance from the community to the urban center, residential population in the community and employed population in the community;
[0082] The average housing price of the residential area can be collected from the second-hand housing price data of the residential transaction platform (Lianjia) and processed by the inverse distance weighted interpolation method;
[0083] The inverse distance weighted interpolation method specifically includes:
[0084] Step a1: Calculate the Euclidean distance between the current traffic zone and other traffic zones. The specific formula is:
[0085] ;
[0086] in, Indicates the current cell to the The Euclidean distance between traffic zones; and Respectively represent The two-dimensional coordinates of each traffic zone; and Respectively represent the two-dimensional coordinates of the cell to be found;
[0087] Step a2: Calculate the inverse distance weight. The specific formula is:
[0088] ;
[0089] in, Indicates the The inverse distance weight of each traffic zone; Indicates the number of traffic zones;
[0090] Step a3: Calculate the average housing price of the community at the interpolation point. The specific formula is:
[0091] ;
[0092] in, Indicates the average housing price of the community to be found; Indicates the The average housing price of each traffic community; in this way, the average housing price of the community can be assigned to the traffic community, and it can be reflected that the closer the distance between communities, the closer the housing prices;
[0093] The average residential area consumption amount can be collected from 2019 consumption statistics provided by financial institutions (UnionPay) (consumption statistics for various categories in a 1km grid in the city, which are spatially aggregated and do not involve personal consumption privacy) and processed using the inverse distance weighted interpolation method. For the specific calculation method, please refer to the formula for the average residential area housing price.
[0094] The distance from the cell to the urban center can be the Euclidean distance from the center point of each traffic cell polygon to the nearest urban center;
[0095] The residential population of the community and the employed population of the community can be obtained through common SQL language command queries based on the user daily resident desensitized information table provided by the big data platform; the residence types of the user daily resident desensitized information table include residence, work and visit.
[0096] Step 2: Embed the traffic zone features into the graph neural network to obtain the traffic zone embedding vector; embed the business district features into the first multi-layer perceptron to obtain the business district embedding vector; connect the embedding vector with the corresponding OD flow features to obtain the OD flow comprehensive representation vector.
[0097] Furthermore, the specific methods for embedding traffic zones into graph neural networks include:
[0098] The traffic zone features are embedded through a first graph convolutional neural network (GCN) module and a second graph convolutional neural network module set in parallel to obtain a first embedding vector and a second embedding vector respectively;
[0099] The first graph convolutional neural network includes a neighborhood graph , the second graph convolutional neural network includes the consumption level similarity graph ,in, Represents the nodes of the graph, i.e., the traffic sub-district; Indicates the number of nodes; Indicates the number of traffic zones, equal ; An adjacency matrix representing weighted edges in a neighborhood graph; An adjacency matrix representing weighted edges in a consumption level similarity graph;
[0100] First embedding vector The specific expression is:
[0101] ;
[0102] in, Represents the dimension of the vector; express rank matrix;
[0103] Second embedding vector The specific expression is:
[0104] ;
[0105] Then and Fusion is performed to obtain the third embedding vector , the specific formula can be:
[0106] ;
[0107] in, and are all trainable weight parameters and belong to Matrix of order.
[0108] Furthermore, The definition formula of the median is:
[0109] ;
[0110] in, A trainable distance decay parameter representing the neighborhood graph; Indicates the Traffic Zone With the Traffic Zone The Euclidean distance between express Middle Traffic Zone With the Traffic Zone The edge between Express the remaining conditions; in this way, the graph can be constructed by the proximity of two transportation cells (irregular geographical units) and information can be passed through edges.
[0111] Furthermore, The definition formula of the median is:
[0112] ;
[0113] in, Trainable distance decay parameters representing the consumption level similarity graph; express consumption level; express consumption level; express and Similarity of consumption levels between them; express middle and The reason for designing the formula in this way is that two areas with similar consumption levels may have similar shopping options even if they are far apart in space. In addition, the housing prices and consumption amounts in a transportation community can, to a certain extent, reflect the differences in consumption levels of different groups of people. Therefore, this application uses housing prices and consumption amounts as evaluation indicators of transportation community consumption levels, and uses cosine similarity to calculate the similarity of consumption levels between two transportation communities.
[0114] The cosine similarity The specific calculation formula includes:
[0115] ;
[0116] in, represents the average housing price in the community; Indicates the average consumption amount in the community.
[0117] Furthermore, each graph convolutional neural network module is set up with a multi-layer conventional structure, that is, the input layer, graph convolution layer (multi-layer stacked) and output layer are connected in sequence, so as to reduce the amount of calculation while ensuring the embedding effect.
[0118] Furthermore, the first multi-layer perceptron has a two-layer structure, namely an input layer, a hidden layer and an output layer connected in sequence, so as to reduce the amount of calculation while ensuring the embedding effect.
[0119] Step 3: Based on the OD flow comprehensive representation vector, construct a training set and a validation set; based on the training set, train the second multi-layer perceptron to predict the passenger flow between each traffic zone and each business district; based on the validation set, iteratively verify the second multi-layer perceptron until the performance of the validation set no longer improves, thereby avoiding overfitting; the OD flow comprehensive representation vector with the best performance on the validation set is used as input and passed into the conventional fully connected neural network; based on external prediction requirements, construct a test set, and predict the passenger flow of the business district through the fully connected neural network; the second multi-layer perceptron has a four-layer structure with batch normalization, namely the input layer, the first hidden layer, the second hidden layer and the output layer connected in sequence, so as to learn embedding through back propagation; the loss function of the second multi-layer perceptron is is the mean square error function, and the specific formula is:
[0120] ;
[0121] in, Indicates the number of pairs between transportation districts and business districts; Indicates the Traffic Zone To business districts The actual calculated value of the average number of passengers per hour; Indicates the Traffic Zone To business districts The predicted value of the average number of passengers per hour.
[0122] Example 2:
[0123] like Figure 3As shown, this embodiment provides a shopping district passenger flow prediction system based on graph neural network, including a data receiving module, a data processing module and a result generation module;
[0124] The data receiving module is used to receive traffic area sets, business district sets and external forecast demands;
[0125] The data processing module includes a feature space unit, a feature embedding unit and a traffic prediction unit;
[0126] The feature space unit constructs a feature space for predicting passenger flow in a commercial district based on a set of traffic districts and a set of commercial districts, including OD flow features, commercial district features, and traffic district features;
[0127] The feature embedding unit embeds the traffic zone feature into the graph neural network to obtain the traffic zone embedding vector; embeds the business district feature into the first multi-layer perceptron to obtain the business district embedding vector; and connects the embedding vector with the corresponding OD flow feature to obtain the OD flow comprehensive representation vector;
[0128] The traffic prediction unit constructs a training set and a validation set based on the OD flow comprehensive representation vector; trains a second multi-layer perceptron based on the training set to predict the passenger flow between each traffic zone and each business district; it iteratively verifies the second multi-layer perceptron based on the validation set until the performance of the validation set no longer improves; uses the OD flow comprehensive representation vector with the best performance on the validation set as input and passes it into the fully connected neural network; constructs a test set based on external prediction requirements, and predicts the passenger flow of the business district through the fully connected neural network; the second multi-layer perceptron has a batch-normalized four-layer structure; the loss function of the second multi-layer perceptron is a mean square error function, and the specific formula is:
[0129] ;
[0130] in, Indicates the number of pairs between transportation districts and business districts; Indicates the Traffic Zone To business districts The actual calculated value of the average number of passengers per hour; Indicates the Traffic Zone To business districts The predicted value of the average number of passengers per hour;
[0131] The result generation module is used to send the customer flow of the business district outward.
[0132] Example 3:
[0133] This embodiment provides a device for predicting customer flow in a shopping district based on a graph neural network, including a processor, a memory, and a bus. The memory stores instructions and data read by the processor. The processor is used to call the instructions and data in the memory to execute the above-mentioned method for predicting customer flow in a shopping district based on a graph neural network. The bus connects the functional components to transmit information.
[0134] In another embodiment, this solution can be implemented as an integrated device that can include corresponding modules for performing each or several steps in each of the above embodiments. The modules can be one or more hardware modules specifically configured to perform the corresponding steps, or implemented by a processor configured to perform the corresponding steps, or stored in a computer-readable medium for implementation by the processor, or implemented by some combination thereof.
[0135] The processor performs the various methods and processes described above. For example, the method implementation in this solution can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods by any other appropriate means (e.g., by means of firmware).
[0136] The device can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus connects various circuits including one or more processors, memories, and / or hardware modules. The bus can also connect various other circuits such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0137] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0138] Example 4:
[0139] A comparative experiment was conducted between the model in Example 1 and the baseline model.
[0140] Experimental environment:
[0141] Operating system: Windows 10;
[0142] Development language: Python, using PyTorch library;
[0143] Development environment: PyCharm;
[0144] CPU: i9;
[0145] Memory: 32G;
[0146] Graphics card: NVIDIA RTX2060.
[0147] Test set: Contains four fields: traffic area ID, business district ID, OD flow (true value), and OD distance.
[0148] Baseline models: Gravity model, Poisson regression, and Geographic Context Multi-Task Embedding Learning (GMEL) model;
[0149] The gravity model is the Huff model, which is a gravity model based on spatial interaction and is often used to predict the probability of customers visiting a certain business district. The attractiveness of a business district is represented by the average of the daily passenger flow, area, business diversity, and number of parking lots. The resistance is represented by the average of the Euclidean distance of the OD pair and the distance to the nearest urban center. and Set to 1 and 2 respectively;
[0150] Poisson regression is a generalized linear model widely used in count data prediction. It is often used for count data prediction and can flexibly handle various types of feature variables. OD flow characteristics, traffic area characteristics, and business district characteristics are directly used as input features for each OD pair. The validation set is merged into the training set for the experiment.
[0151] The GMEL model uses a graph attention network (GAT) to generate embeddings for regional supply and demand, and mostly adopts a multi-task learning framework to improve prediction performance. The embedding dimension of the two GATs is set to 48, and the final OD flow regression is implemented using a fully connected layer. In this experiment, the GMEL-noMul variant is specifically used, which does not use multi-task learning. This is mainly because in the context of business district OD flow prediction, the inflow and outflow of the region are unknown, thus simplifying the complexity of the model.
[0152] Evaluation criteria: Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Common Part of Commuters (CPC).
[0153] Specific comparison results, such as Figure 4-6 As shown in the figure; among them, the RMSE value of the model of this scheme (CDFPM) is 1.2204, which is the lowest among all the compared models and is 42.84% lower than that of GMEL-noMul, indicating that the model has high accuracy in prediction; the MAE value of the model of this scheme is 0.6913, which is also the lowest among all the compared models; the CPC value of the model of this scheme is 0.9490, which is the highest among all the compared models; in summary, the model of this scheme performs best among all the compared models.
[0154] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting customer flow in a shopping district based on graph neural network, characterized in that: include: Step 1: Based on the set of traffic zones and business districts, a feature space for predicting business district passenger flow is constructed, including OD flow features, business district features, and traffic zone features. The business district characteristics include the average daily passenger flow of the business district, the land area of the business district, the business type diversity index of the business district and the number of parking lots; The average daily passenger flow of the business district is obtained by querying the user daily resident desensitized information table provided by the big data platform; The commercial area is collected from the building outline data provided by the navigation platform; The business district diversity index is calculated based on the number of points of interest provided by the navigation platform using the HillNumbers index formula. The specific formula is: ; in, represents the business diversity index of the business district; Indicates the total number of business types in the business district; Indicates the first The proportion of the number of points of interest of each business type to the total number of points of interest in the business district; Represents parameters; The number of parking lots mentioned refers to the number of parking lots within the preset buffer zone of the business district; Step 2: Embed the traffic zone features into the graph neural network to obtain the traffic zone embedding vector; embed the business district features into the first multi-layer perceptron to obtain the business district embedding vector; concatenate the traffic zone embedding vector and the business district embedding vector with the corresponding OD flow features to obtain the OD flow comprehensive representation vector; Step 3. Based on the OD flow comprehensive representation vector, a training set and a validation set are constructed; based on the training set, a second multi-layer perceptron is trained to predict the passenger flow between each traffic zone and each business district; based on the validation set, the second multi-layer perceptron is iteratively verified until the performance of the validation set no longer improves; the OD flow comprehensive representation vector that performs best on the validation set is used as input and passed into the fully connected neural network; based on external prediction requirements, a test set is constructed, and the passenger flow of the business district is predicted through the fully connected neural network.
2. The method according to claim 1, characterized in that The OD flow characteristics include OD flow and OD distance; the OD flow is the Traffic Zone To business districts The average number of passengers per hour; the OD distance is and The Euclidean distance between .
3. The method according to claim 1, characterized in that The characteristics of the transportation community include the average housing price in the community, the average consumption amount in the community, the distance from the community to the urban center, the residential population in the community and the employed population in the community; The average housing price of the residential area is collected from the second-hand housing price data of the residential transaction platform and processed by the inverse distance weighted interpolation method; The average consumption amount of the community is collected from consumption statistics provided by financial institutions and processed using the inverse distance weighted interpolation method; The distance from the community to the urban center is the Euclidean distance from the center point of each traffic community polygon to the nearest urban center; The residential population and the employed population of the community are obtained through query based on the user daily resident desensitized information table provided by the big data platform.
4. The method according to claim 1, wherein The specific methods for embedding traffic zones into graph neural networks include: The traffic zone features are embedded through the first graph convolutional neural network module and the second graph convolutional neural network module respectively set in parallel to obtain a first embedding vector and a second embedding vector respectively; The first graph convolutional neural network includes a neighborhood graph , the second graph convolutional neural network includes the consumption level similarity graph ,in, Represents the nodes of the graph, i.e., the traffic sub-district; Indicates the number of nodes; Indicates the number of traffic zones, equal ; An adjacency matrix representing weighted edges in a neighborhood graph; An adjacency matrix representing weighted edges in a consumption level similarity graph; First embedding vector The specific expression is: ; in, Represents the dimension of the vector; express rank matrix; Second embedding vector The specific expression is: ; Then and Fusion is performed to obtain the third embedding vector , the specific formula is: ; in, and are all weight parameters and belong to Matrix of order.
5. The method according to claim 4, characterized in that The definition formula of the middle edge is: ; in, represents the distance decay parameter of the neighborhood graph; Indicates the Traffic Zone With the Traffic Zone The Euclidean distance between express Middle Traffic Zone With the Traffic Zone The edge between Indicates the remaining conditions; The definition formula of the middle edge is: ; in, represents the distance decay parameter of the consumption level similarity graph; express consumption level; express consumption level; express and Similarity of consumption levels between them; express middle and The edge between.
6. The method according to claim 1, characterized in that The second multi-layer perceptron is a four-layer structure with batch normalization, including an input layer, a first hidden layer, a second hidden layer and an output layer connected in sequence.
7. The method according to claim 1, characterized in that The loss function of the second multilayer perceptron is is the mean square error function, and the specific formula is: ; in, Indicates the number of pairs between transportation districts and business districts; Indicates the Traffic Zone To business districts The actual calculated value of the average number of passengers per hour; Indicates the Traffic Zone To business districts The predicted value of the average number of passengers per hour.
8. A commercial district passenger flow prediction system based on graph neural network, characterized by: It includes a data receiving module, a data processing module and a result generating module; The data receiving module is used to receive traffic area sets, business district sets and external forecast demands; The data processing module includes a feature space unit, a feature embedding unit and a traffic prediction unit; The feature space unit constructs a feature space for predicting passenger flow in a commercial district based on a set of traffic districts and a set of commercial districts, including OD flow features, commercial district features, and traffic district features; The business district characteristics include the average daily passenger flow of the business district, the land area of the business district, the business type diversity index of the business district and the number of parking lots; The average daily passenger flow of the business district is obtained by querying the user daily resident desensitized information table provided by the big data platform; The commercial area is collected from the building outline data provided by the navigation platform; The business district diversity index is calculated based on the number of points of interest provided by the navigation platform using the HillNumbers index formula. The specific formula is: ; in, represents the business diversity index of the business district; Indicates the total number of business types in the business district; Indicates the first The proportion of the number of points of interest of each business type to the total number of points of interest in the business district; Represents parameters; The number of parking lots mentioned refers to the number of parking lots within the preset buffer zone of the business district; The feature embedding unit embeds the traffic zone feature into the graph neural network to obtain a traffic zone embedding vector; embeds the business district feature into the first multi-layer perceptron to obtain a business district embedding vector; and concatenates the traffic zone embedding vector and the business district embedding vector with the corresponding OD flow feature to obtain a comprehensive OD flow representation vector; The traffic prediction unit constructs a training set and a validation set based on the OD flow comprehensive representation vector; trains a second multi-layer perceptron based on the training set to predict the passenger flow between each traffic zone and each business district; it iteratively verifies the second multi-layer perceptron based on the validation set until the performance of the validation set no longer improves; uses the OD flow comprehensive representation vector that performs best on the validation set as input and passes it into a fully connected neural network; constructs a test set based on external prediction requirements, and predicts the passenger flow of the business district using the fully connected neural network; The result generation module is used to send the customer flow of the business district outward.
9. A device for predicting customer flow in a shopping district based on a graph neural network, characterized in that: It includes a processor, a memory and a bus, the memory stores instructions and data read by the processor, the processor is used to call the instructions and data in the memory to execute the method according to any one of claims 1 to 7, and the bus connects the functional components to transmit information.
Citation Information
Patent Citations
Consumer travel prediction method and device based on commercial link degree
CN119227930A