CN113240179A - Method and system for predicting orbital pedestrian flow by fusing spatio-temporal information - Google Patents

Method and system for predicting orbital pedestrian flow by fusing spatio-temporal information Download PDF

Info

Publication number
CN113240179A
CN113240179A CN202110541130.6A CN202110541130A CN113240179A CN 113240179 A CN113240179 A CN 113240179A CN 202110541130 A CN202110541130 A CN 202110541130A CN 113240179 A CN113240179 A CN 113240179A
Authority
CN
China
Prior art keywords
time
data
prediction
result
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110541130.6A
Other languages
Chinese (zh)
Other versions
CN113240179B (en
Inventor
王豪
陈欣
秦杰
肖弋杭
夏英
张旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202110541130.6A priority Critical patent/CN113240179B/en
Publication of CN113240179A publication Critical patent/CN113240179A/en
Application granted granted Critical
Publication of CN113240179B publication Critical patent/CN113240179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Abstract

The invention relates to a method and a system for predicting orbital pedestrian flow by fusing spatio-temporal information, and belongs to the field of data mining. Firstly, preprocessing operations such as cleaning, integration, transformation, stipulation and the like are carried out on subway pedestrian flow original data, and the subway flow data are converted into a two-channel flow matrix with time and space attributes; then modeling a flow change sequence with time proximity, periodicity and trend change of the spatio-temporal data, designing three residual error unit branches, capturing regional relevance of each branch by adopting a convolutional neural network, and building a prediction model based on deep learning; and finally, extracting the characteristics of the established model and the real-time data set by using a transfer learning method, and issuing a prediction result to the mobile terminal through the real-time model prediction, thereby realizing the instantaneity and the light weight of the subway people flow prediction system. The invention solves the problems of low prediction accuracy and poor real-time performance of the traditional subway pedestrian flow prediction system, thereby reducing the bearing pressure of urban traffic.

Description

Method and system for predicting orbital pedestrian flow by fusing spatio-temporal information
Technical Field
The invention belongs to the field of data mining, and relates to a method and a system for predicting orbital pedestrian flow by fusing spatio-temporal information.
Background
The traditional subway people flow prediction system usually ignores the relevance of the change of subway people flow and time and space, or can only singly predict the flow change of a specific subway station. However, in the real world, the pedestrian volume of the subway is influenced by various space-time environmental factors. From the space perspective, subway population has high mobility, inflow and outflow of population in different areas are mutually influenced, and peripheral areas also have great influence on the population; from the time perspective, the crowd flow in one area is influenced by the adjacent time intervals and the fixed time periods, and the fixed time periods are also influenced by social events and seasons. In addition to this, some external factors (weather, social events, etc.) may also greatly alter subway demographics. Therefore, the traditional single people flow prediction model has the problem of low accuracy under the current actual operation system.
Although the present researchers have recognized this problem and improved from the perspective of both CNN convolutional neural network modeling, RNN/LSTM recurrent neural network modeling, there are still some drawbacks. Although the CNN model can well capture the spatial dependence, the prediction model does not consider the temporal dependence and external influence factors, and still faces the problem of low prediction precision; in the RNN/LSTM recurrent neural network modeling mode, the RNN model can well process time sequence data and predict the trend and peak value of human flow in a future period of time according to known data. However, the RNN/LSTM neural network prediction model can only process time series of a short time period and spatial attributes of a nearby area, and still faces the problems of low space-time dependency, low prediction accuracy and the like. Therefore, the existing methods cannot well improve the accuracy of subway people flow prediction, and still face the problems of low accuracy and high time delay of the constructed prediction model.
In order to make up for the defects, enable the subway pedestrian flow prediction model to have accuracy and real-time performance and achieve light model weight, the invention provides a subway pedestrian flow real-time prediction system fusing space-time information. In the aspect of data processing of subway pedestrian flow, time, space dependence and external factors are comprehensively considered, and unique space-time attributes of subway pedestrian flow data are captured; in the aspect of building a neural network structure, a residual convolutional neural network structure is adopted, so that the problem of gradient disappearance when the depth of the deep neural network structure is deeper is avoided, and the prediction effect of the subway pedestrian flow prediction system is more accurate and efficient; in the aspect of a subway people flow prediction model, a transfer learning method is adopted, and real-time data is effectively utilized to optimize the model. Common features between the real-time data and the model prediction data are migrated through feature extraction, so that the model strengthens the real-time prediction effect of the model through continuous mapping learning of the real-time data, and the model has good real-time performance. Meanwhile, the prediction result is fed back to the mobile terminal in real time through the prediction of the server terminal, so that the convenience conversion of the model is realized while the real-time performance of the system is ensured, and a user can use the system more conveniently and timely.
Disclosure of Invention
In view of the above, the present invention provides a method and a system for predicting an orbital pedestrian volume by fusing spatio-temporal information. The method comprises the steps of firstly carrying out preprocessing operations such as cleaning, integration, transformation, specification and the like on subway pedestrian flow original data, and converting the subway traffic data into a two-channel flow matrix with time and space attributes. And then, modeling three different flow change sequences of time proximity, periodicity and trend change of the space-time data by using a residual error neural network, designing three residual error unit branches, simulating regional relevance by adopting a convolutional neural network for each branch, further fusing external influence factors by using independent thermal coding and embedding technologies, and building a prediction model based on deep learning. In the transfer learning part, feature extraction is carried out on the established model and the real-time data set, feature mapping is carried out to obtain a target model, parameter fine tuning is carried out on the target model to obtain a final model, and a prediction result is issued to a mobile terminal through real-time model prediction, so that the instantaneity and the light weight of the subway people flow prediction system are realized.
In order to achieve the purpose, the invention provides the following technical scheme:
the orbit pedestrian flow prediction method based on fusion of the spatio-temporal information comprises the following steps:
s1: carrying out preprocessing operation on subway card swiping data records;
s2: building a residual error neural network structure, and modeling time attributes, space attributes and external influence factors of subway pedestrian flow data;
s3: performing migration learning, and performing migration optimization on the established model by using real-time data;
s4, carrying out prediction work of the pedestrian flow at the server end;
s5: and the prediction result of the server side is sent to the mobile side.
Optionally, the S1 includes the following steps:
s1-1: reading data and deleting irrelevant data; reading an original subway card swiping data set R, deleting irrelevant data of the card swiping equipment number and the card swiping type of a user in the data set R, and obtaining a data set Y ═ Y { (Y)1,Y2,…,Yi,YnIn which Y isi=(s,u,t,c),YiThe card swiping state c of the user u at the subway station s at the time t is shown;
s1-2: processing the missing value; judging whether a missing value exists in the data set Y or not, and processing a null value Y at the time ti tUsing data Y near time ti t-1And Yi t+1Mean value interpolation of the spaceValue, and update data set Y;
s1-3: deleting the outlier; retrieving the data set Y and comparing YiUser account u in (1)iInformation retrieval is carried out on the times of the user entering and exiting the subway station in a time interval T; retention of Yi TFinishing the cleaning operation of the data and updating the data set Y when the related data with even number of times appears;
s1-4: partitioning the data set by time period; defining a time interval T, and dividing subway flow data Y of different time periods by the time interval T; traversing the user account u in the data of each time interval TiTime of card swiping field tiAdditionally generating a field v representing a time interval; dividing the data into m groups according to the time interval v to obtain a data set Y' ═ { Y ═ Y1',Y'2,…,Y'mIn which Y isi(s, u, c, v) m is the number of v;
s1-5: data reduction; according to the card swiping time period v, retrieving the state c of the user account u entering and exiting the subway station, and exchanging the sequence of the first-out and last-in data in the data set Y' to finish the reduction operation of the data;
s1-6: data integration transformation; initializing m k 2 two-channel flow matrix X ═ { X with "0t,Xt+T,…,Xt+(m-1)TH, wherein k is the number of sites; retrieving a data set, traversing u in different time periods, and writing data into a corresponding matrix X in 2 dimensions in a form of '+ 1', namely an in-matrix or an out-matrix, according to the condition that the state c of a station s taken by a user and the state c of an in-out station are 1 and 0; wherein xT(i, j) represents the number of subway people coming in from subway station i to subway station j during time interval T.
Optionally, the S2 includes the following steps:
s2-1: modeling the time proximity; using adjacent time periodscA two-channel stream matrix for simulating time proximity, the proximity time correlation sequence being
Figure BDA0003071844260000031
Connecting them with the time axis to form a tensor
Figure BDA0003071844260000032
Wherein k is the number of subway stations; followed by a convolutional neural network, according to
Figure BDA0003071844260000033
Capturing spatial attributes of each region;
where denotes convolution, f is an activation function,
Figure BDA0003071844260000034
is a learnable parameter of the first layer convolution;
s2-2: a residual error superposition unit; under each convolution network, an L residual error unit is superposed according to a following formula;
Figure BDA0003071844260000035
wherein F is a residual function,
Figure BDA0003071844260000036
represents all learnable parameters in the ith residual unit;
s2-3: obtaining a proximity result; carrying out batch treatment normalization, and then adding a ReLu correction function; after the residual error network, a convolution layer is added to obtain a proximity output result
Figure BDA0003071844260000037
S2-4: obtaining periodic and trending results; simulating the period and trend time attributes according to the steps S2-1 and S2-2; constructing a cyclic correlation sequence
Figure BDA0003071844260000038
Trend correlated sequences
Figure BDA0003071844260000039
Wherein p represents a day describing a temporal periodicity and q represents a week describing a temporal trend; according to step S2-3, step AThe output of the two layers of convolutional neural networks and L layers of residual error neural networks is respectively a human flow periodic variation sequence
Figure BDA00030718442600000310
And a trending sequence of pedestrian traffic
Figure BDA00030718442600000311
S2-5: training an external factor group; let ETFeature vectors that are external factors within the prediction time interval T; using a time interval of [ T-T, T]Weather prediction of time slots [ T, T + T]Weather of a time period; then E isTVector superposition of two completely connected neural network layers, and training to obtain result E of external factor groupExt
S2-6: fusing the matrixes; fusing the three matrixes obtained in the step S2-3 and the step S2-4 by using a fusion method based on the parameter matrix
Figure BDA0003071844260000041
Namely, it is
Figure BDA0003071844260000042
Finally fusing the external factor group and XResThe matrix, which yields the predicted value of the t time interval, i.e.
Xt=tanh(XExt+XRes)
Wherein, Wc、Wp、WqRespectively, the learnable parameters for adjusting the influence degrees of the proximity, the period and the trend, tanh is a hyperbolic tangent function, and the value range is [ -1,1]。
Optionally, the S3 includes the following steps:
s3-1: extracting characteristics; deleting the final layer and the full-connection layer of the trained people flow prediction network as a feature extractor of the people flow real-time prediction task, and extracting the time attribute t of the prediction networksourceSpatial attribute ssourceOther external attribute features osource
S3-2: mapping the characteristics; observation source model prediction transformed image SsourceImage S transformed with real-time dataobjectAnd using the observed common feature, time attribute tmutualSpatial attribute smutualAnd other ambient attributes omutualAutomatically transferring among the features of different levels, projecting the features into the same feature space F to obtain a target model P needing fine-tuning parametershalf
S3-3: fine-tuning parameters; solving a target model parameter theta by adopting an EM algorithm to obtain a final target domain model P, wherein the algorithm measures the difference between two domains by utilizing KL divergence; maximization of l (theta )j) To obtain
θj+1=argmaxl(θ,θj)
Repeating iteration until convergence finally, and ending the iteration;
s3-4: obtaining a target model; and the real-time performance of the prediction model is effectively improved by using the target model result P obtained by the transfer learning.
Optionally, the S4 includes the following steps:
s4-1: transmitting the relevant factors; transmitting real-time factor t to be predicted to server sidefactSpace factor SfactAnd external influencing factor Ofact
S4-2: predicting the result; relevant factors are led into the target model P for prediction to obtain a prediction result Sresult
Optionally, the S5 includes the following steps:
s5-1: transmitting the result; predicting result S of server side by means of on-line networkresultTransmitting to the mobile terminal;
s5-2: displaying the result; finishing the real-time quick display of the flow prediction result S of the mobile terminalresult
The orbit pedestrian flow prediction system fusing the spatio-temporal information comprises the following modules,
the data preprocessing module processes the people flow data to form a matrix, and comprises the following subunits:
a first unit reading data and deleting irrelevant data; reading an original subway card swiping data set R, deleting irrelevant data of the card swiping equipment number and the card swiping type of a user in the data set R, and obtaining a data set Y ═ Y { (Y)1,Y2,…,Yi,YnIn which Y isi=(s,u,t,c),YiThe card swiping state c of the user u at the subway station s at the time t is shown;
a second unit that processes the missing value; judging whether a missing value exists in the data set Y or not, and processing a null value Y at the time ti tUsing data Y near time ti t-1And Yi t+1Interpolating the null value and updating the data set Y;
a third unit that deletes the abnormal value; retrieving the data set Y and comparing YiUser account u in (1)iInformation retrieval is carried out on the times of the user entering and exiting the subway station in a time interval T; retention of Yi TFinishing the cleaning operation of the data and updating the data set Y when the related data with even number of times appears;
a fourth unit that divides the data set by time period; defining a time interval T, and dividing subway flow data Y of different time periods by the time interval T; traversing the user account u in the data of each time interval TiTime of card swiping field tiAdditionally generating a field v representing a time interval; dividing the data into m groups according to the time interval v to obtain a data set Y' ═ { Y ═ Y1',Y'2,…,Y'mIn which Y isi(s, u, c, v) m is the number of v;
a fifth unit, data reduction; according to the card swiping time period v, retrieving the state c of the user account u entering and exiting the subway station, and exchanging the sequence of the first-out and last-in data in the data set Y' to finish the reduction operation of the data;
a sixth unit for data integration transformation; initializing m k 2 two-channel flow matrix X ═ { X with "0t,Xt+T,…,Xt+(m-1)TH, wherein k is the number of sites; retrieving the data set, traversing u for different time periods, and riding the station according to the userWhen the state c of the point s and the station entrance/exit is 1 and 0, writing data into a corresponding matrix X in the dimension 2 in the form of +1, namely an entrance matrix or an exit matrix; wherein xT(i, j) represents the number of subway pedestrian volumes entering from subway station i to subway station j during time interval T;
the prediction model building module is used for modeling the time attribute, the space attribute and the external influence factor of the subway pedestrian flow data and comprises the following subunits:
a first unit, time proximity modeling; using adjacent time periodscA two-channel stream matrix for simulating time proximity, the proximity time correlation sequence being
Figure BDA0003071844260000051
Connecting them with the time axis to form a tensor
Figure BDA0003071844260000052
Wherein k is the number of subway stations; followed by a convolutional neural network, according to
Figure BDA0003071844260000053
Capturing spatial attributes of each region;
where denotes convolution, f is an activation function,
Figure BDA0003071844260000054
is a learnable parameter of the first layer convolution;
a second unit for superimposing the residual error unit; under each convolution network, an L residual error unit is superposed according to a following formula;
Figure BDA0003071844260000055
wherein F is a residual function,
Figure BDA0003071844260000061
represents all learnable parameters in the ith residual unit;
third unitObtaining a proximity result; carrying out batch treatment normalization, and then adding a ReLu correction function; after the residual error network, a convolution layer is added to obtain a proximity output result
Figure BDA0003071844260000062
A fourth unit for obtaining periodic and trending results; simulating the period and trend time attributes according to the steps S2-1 and S2-2; constructing a cyclic correlation sequence
Figure BDA0003071844260000063
Trend correlated sequences
Figure BDA0003071844260000064
Wherein p represents a day describing a temporal periodicity and q represents a week describing a temporal trend; according to the step S2-3, the periodically changing sequences of the human traffic are respectively output through the two layers of convolution neural networks and the L layer of residual error neural network
Figure BDA0003071844260000065
And a trending sequence of pedestrian traffic
Figure BDA0003071844260000066
A fifth unit training an external factor group; let ETFeature vectors that are external factors within the prediction time interval T; using a time interval of [ T-T, T]Weather prediction of time slots [ T, T + T]Weather of a time period; then E isTVector superposition of two completely connected neural network layers, and training to obtain result E of external factor groupExt
A sixth unit fusing the matrices; fusing the three matrixes obtained in the step S2-3 and the step S2-4 by using a fusion method based on the parameter matrix
Figure BDA0003071844260000067
Namely, it is
Figure BDA0003071844260000068
Finally fusing the external factor group and XResThe matrix, which yields the predicted value of the t time interval, i.e.
Xt=tanh(XExt+XRes)
Wherein, Wc、Wp、WqRespectively, the learnable parameters for adjusting the influence degrees of the proximity, the period and the trend, tanh is a hyperbolic tangent function, and the value range is [ -1,1];
The migration learning module performs migration optimization on the established model by utilizing real-time data, and comprises the following subunits:
a first unit for feature extraction; deleting the final layer (full connection layer) of the trained people flow prediction network to be used as a feature extractor of the people flow real-time prediction task, and extracting the time attribute t of the prediction networksourceSpatial attribute ssourceOther external attribute features osource
A second unit, feature mapping; observation source model prediction transformed image SsourceImage S transformed with real-time dataobjectAnd using the observed common feature, time attribute tmutualSpatial attribute smutualAnd other ambient attributes omutualAutomatically transferring among the features of different levels, projecting the features into the same feature space F to obtain a target model P needing fine-tuning parametershalf
A third unit for fine-tuning the parameters; solving a target model parameter theta by adopting an EM algorithm to obtain a final target domain model P, wherein the algorithm measures the difference between two domains by utilizing KL divergence; in this process, < theta > is greatly increasedj) To obtain
θj+1=argmaxl(θ,θj)
Repeating iteration until convergence finally, and ending the iteration;
a fourth unit that obtains a target model; the real-time performance of the prediction model is effectively improved by using a target model result P obtained by transfer learning;
the prediction and issuing module is used for predicting and issuing the pedestrian flow data to the mobile terminal and comprises the following subunits:
a first unit for transmitting the relevant factors; transmitting real-time factor t to be predicted to server sidefactSpace factor SfactAnd external influencing factor Ofact
A second unit to predict the result; relevant factors are led into the target model P for prediction to obtain a prediction result Sresult
A third unit for transmitting the result; predicting result S of server side by means of on-line networkresultTransmitting to the mobile terminal;
a fourth unit for displaying the result; finishing the real-time quick display of the flow prediction result S of the mobile terminalresult
Optionally, the time proximity is modeled as: by means ofcA two-channel flow matrix simulates time proximity, and the proximity time correlation sequence is
Figure BDA0003071844260000071
Connecting the time axis with the time axis to form tensor
Figure BDA0003071844260000072
Wherein k is the number of subway stations; followed by a convolutional neural network, according to
Figure BDA0003071844260000073
Capturing spatial attributes of each region; this is also the method used for subsequent periodic, trending modeling; where denotes convolution, f is an activation function,
Figure BDA0003071844260000074
is a learnable parameter of the first layer convolution.
Optionally, the residual superposition unit is: under each convolution network, an L residual error unit is superposed according to a following formula;
Figure BDA0003071844260000075
wherein F is a residual function,
Figure BDA0003071844260000076
representing all learnable parameters in the ith residual unit.
Optionally, the feature mapping is: observation source conversion image SsourceAnd transforming the image S in real timeobjectAnd using the observed common feature, time attribute tmutualSpatial attribute smutualAnd other ambient attributes omutualAutomatically migrating among features of different levels to obtain a target model P only needing fine adjustment of parametershalf
The invention has the beneficial effects that:
(1) the method comprehensively considers the time proximity, periodicity, trend, dependence on space and external influence factors of the space-time data, adopts a residual convolutional neural network structure, effectively models the unique attributes of the space-time data, and enables the subway pedestrian flow prediction result to be more accurate and efficient;
(2) by adopting the transfer learning method, the established model is optimized by effectively utilizing the real-time data, the common characteristics between the real-time data and the model prediction data are transferred, and the prediction result of the server is transmitted to the mobile terminal in real time, so that the convenience and the convenience of the model are converted while the real-time performance of the system is ensured.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow diagram of an overall method provided by the practice of the present invention;
FIG. 2 is a flow chart of the steps involved in the implementation of the present invention;
FIG. 3 is a general schematic diagram of a publication system provided by the implementation of the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention in a schematic way, and the features in the following embodiments and examples may be combined with each other without conflict.
Wherein the showings are for the purpose of illustrating the invention only and not for the purpose of limiting the same, and in which there is shown by way of illustration only and not in the drawings in which there is no intention to limit the invention thereto; to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there is an orientation or positional relationship indicated by terms such as "upper", "lower", "left", "right", "front", "rear", etc., based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not an indication or suggestion that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes, and are not to be construed as limiting the present invention, and the specific meaning of the terms may be understood by those skilled in the art according to specific situations.
The specific implementation steps of the method are described by taking 7000 ten thousand card swiping data records of 25-day subway in a certain city as training data and training the existing subway passenger flow data by building a subway station passenger flow prediction model. The method aims to construct a system capable of efficiently and accurately predicting the subway population flow so as to reduce the pressure of smart city traffic, avoid city traffic congestion and trample accidents, and realize the light weight of the system by using transfer learning.
The method provided by the technical scheme of the invention can adopt a computer software technology to realize an automatic operation process, fig. 1 and 3 are general method flow charts of the embodiment of the invention, and referring to fig. 1, and combining the specific step flow chart of the embodiment of the invention in fig. 2, the specific steps of the embodiment of the subway flow real-time prediction method fusing the spatio-temporal information provided by the invention comprise:
step S1, preprocessing the subway card swiping data record, which comprises the following steps:
in the embodiment, the subway swiping card data set to be processed is 7000 ten thousand swiping card data records of 25-day subways in a certain city, is set as a data set R, and is subjected to data preprocessing to obtain an n x 81 x 2 matrix. Wherein n represents the time interval of the information, 81 × 81 represents the population flow relationship between 81 subway stations, and 2 represents two modes of entering and exiting a subway station in each time period, and the specific implementation is as follows:
step S1-1, reads the data and deletes the extraneous data. Reading an original subway card swiping data set R, deleting irrelevant data such as card swiping equipment number and user card swiping type in the data set R, and obtaining a data set Y ═ Y { (Y)1,Y2,…,Yi,YnIn which Y isi=(s,u,t,c),YiThe card swiping state c of the user u at the subway station s at the time t is shown;
in the example, the python library function pandas was used to read 7000 ten thousand swipe data records of 25-day metro in Hangzhou City. Deleting irrelevant data such as the card swiping equipment number, the card swiping type of the user and the like in the data set R to obtain a data set Y ═ Y1,Y2,…,Y70000000};
Step S1-2, missing values are processed. Determining if there is a miss in data set YValue, null value Y at processing time ti tUsing data Y near time ti t-1And Yi t+1Interpolating the null value and updating the data set Y;
in an embodiment, both the issull () and notull () functions in python can be used to determine whether null and missing values exist in a data set. According to the experimental results, all false values indicate that no null value or missing value exists, the data provided by the subway population data set are clean, and subsequent processing can be directly performed.
And step S1-3, deleting the abnormal value. Retrieving the data set Y and comparing YiUser account u in (1)iInformation retrieval the number of times a user enters or exits a subway station within a time interval T. Retention of Yi TFinishing the cleaning operation of the data and updating the data set Y when the related data with even number of times appears;
in an embodiment, a data set Y is retrieved and for YiUser account u in (1)iAnd (4) information retrieval is carried out according to the number of times that the user enters or exits the subway station within the time interval T of 30 min. Deleting Yi TAnd finishing the cleaning operation of the data and updating the data set Y when the related data with odd number of times appears in the data.
Step S1-4, the data set is divided by time period. Defining a time interval T, and dividing subway flow data Y of different time periods by the time interval T. Traversing the user account u in the data of each time interval TiTime of card swiping field tiAnd additionally generates a field v representing a time interval. Dividing the data into m groups according to the time interval v to obtain a data set Y' ═ { Y ═ Y1',Y'2,…,Y'mIn which Y isi(s, u, c, v) m is the number of v;
in the embodiment, the subway flow data Y of different time periods is divided by a time interval T of 30 min. Traversing the user account u in the data of each time interval TiTime of card swiping field tiAnd additionally generates a field v representing a time interval. Dividing the time interval v into 1200 groups of data to obtain a data set Y' ═ { Y ═ Y1',Y'2,…,Y'1200}。
And step S1-5, data reduction. According to the card swiping time period v, retrieving the state c of the user account u entering and exiting the subway station, and exchanging the sequence of the first-out and last-in data in the data set Y' to finish the reduction operation of the data;
in the embodiment, according to the card swiping time period, retrieving the state c of the user account u entering and exiting the subway station, and exchanging the sequence of the first-out and last-in data in the data set Y' to finish the reduction operation of the data;
and step S1-6, data integration transformation. Initializing m k 2 two-channel flow matrix X ═ { X with "0t,Xt+T,…,Xt+(m-1)TAnd k is the number of sites. And retrieving a data set, traversing u in different time periods, and writing data into a corresponding matrix X in 2 dimensions in a form of '+ 1', namely an in-matrix or an out-matrix, according to the condition that the state c of the user taking the station s and the in-and-out station is 1 and 0. Wherein xT(i, j) represents the number of subway people coming in from subway station i to subway station j during time interval T.
In an embodiment, the "0" is used to initialize 1200X 81X 2 two-channel flow matrix X ═ Xt,Xt+0.5,…,Xt+(1200-1)*0.5Where 81 represents the number of sites. And retrieving a data set, traversing u in different time periods, and writing data into a corresponding matrix X in 2 dimensions in a form of '+ 1', namely an in-matrix or an out-matrix, according to the condition that the state c of the user taking the station s and the in-and-out station is 1 and 0.
Step S2, building a residual error neural network structure, modeling the time attribute, the space attribute and the external influence factor of subway people flow data, and comprising the following substeps:
step S2-1, time proximity modeling. Using adjacent time periodscA two-channel stream matrix for simulating time proximity, the proximity time correlation sequence being
Figure BDA0003071844260000101
Connecting it with time axis to form tensor
Figure BDA0003071844260000102
Where k is the number of subway stations. Followed by a convolutional neural network, according to
Figure BDA0003071844260000103
Spatial attributes of various regions are captured. Where denotes convolution, f is an activation function,
Figure BDA0003071844260000104
is a learnable parameter of the first layer convolution;
in the examples, the adjacent time period l is usedcA (in this case, /)c20) two-channel stream matrix to model time-proximity with a proximity-time correlation sequence of Xt-20,Xt-19,…,Xt-1]Connecting them together with the time axis to form a tensor
Figure BDA0003071844260000105
Followed by a convolutional neural network, according to
Figure BDA0003071844260000106
Spatial attributes of various regions are captured.
Step S2-2, superimpose residual units. Under each convolutional network, the L residual units are superimposed according to the following formula:
Figure BDA0003071844260000111
wherein F is a residual function,
Figure BDA0003071844260000112
represents all learnable parameters in the ith residual unit;
in the embodiment, under each convolution network, 18 layers of residual error units are superposed according to the following formula for network training.
And step S2-3, acquiring a proximity result. Batch normalization was performed and then the ReLu correction function was added. After the residual error network, a convolution layer is added to obtain a proximity output result
Figure BDA00030718442600001113
In the examples, batch normalization was performed, followed by addition of the ReLu correction function. After the residual error network, a convolution layer is added to obtain a proximity output result
Figure BDA0003071844260000113
Step S2-4, periodic and trending results are obtained. According to steps S2-1 and S2-2, cycle, trend time attributes are simulated. Constructing a cyclic correlation sequence
Figure BDA0003071844260000114
Trend correlated sequences
Figure BDA0003071844260000115
Where p represents a day describing the periodicity of the time and q represents a week describing the trend of the time. According to the step S2-3, after passing through the two layers of convolutional neural networks and the L layer of residual neural networks, the output results are respectively human flow periodic variation sequences
Figure BDA0003071844260000116
And a trending sequence of pedestrian traffic
Figure BDA0003071844260000117
In the embodiment, the similarity training method constructs a periodic correlation sequence [ X ]t-30·24,Xt-29·24,…,Xt-24]Trend related sequence [ X ]t-10*168,Xt-9*168,…,Xt-168]Obtaining a periodic variation sequence of the human flow as an output result
Figure BDA0003071844260000118
And a trending sequence of pedestrian traffic
Figure BDA0003071844260000119
Step S2-5, training is carried outAnd (4) a part factor group. Let ETIs a feature vector for external factors within the prediction time interval T. Since data such as holidays can be directly acquired, but the change of weather is unknown, the time interval T-T, T can be used]Weather prediction of time slots [ T, T + T]Weather of a time period. Then E isTVector superposition of two completely connected neural network layers, and training to obtain result E of external factor groupExt
In the examples, let ETThe prediction time interval T is 0.5h of the eigenvector of the external factor. Then E isTVector superposition of two completely connected neural network layers, and training to obtain result E of external factor groupExt
And step S2-6, fusing the matrix. Fusing the three matrixes obtained in the step S2-3 and the step S2-4 by using a fusion method based on the parameter matrix
Figure BDA00030718442600001110
Namely, it is
Figure BDA00030718442600001111
Finally fusing the external factor group and XResMatrix, obtaining a predicted value of t time interval, i.e. Xt=tanh(XExt+XRes). Wherein, Wc、Wp、WqRespectively, the learnable parameters for adjusting the influence degrees of the proximity, the period and the trend, tanh is a hyperbolic tangent function, and the value range is [ -1,1];
In the embodiment, a space-time parameter matrix is obtained according to the weight matrix
Figure BDA00030718442600001112
Then, a result matrix of external influence factors is fused to obtain a prediction result Xt=tanh(XExt+XRes)。
Step S3, performing migration learning, and performing migration optimization on the established model by using real-time data, which includes the following specific steps:
and step S3-1, feature extraction. Deleting the final layer (full connection layer) by using the trained people flow prediction network,a characteristic extractor used as a real-time people flow prediction task for extracting the time attribute t of the prediction networksourceSpatial attribute ssourceOther external attribute features osource
In the embodiment, a fully-connected layer of a trained people flow prediction network is deleted to serve as a feature extractor of a people flow real-time prediction task, and a time attribute t of the prediction network is extractedsourceSpatial attribute ssourceOther external attribute features osource
And step S3-2, feature mapping. Observation source model prediction transformed image SsourceImage S transformed with real-time dataobjectAnd using the common features (time attributes t) obtained from the observationsmutualSpatial attribute smutualOther external attributes omutual) Automatically transferring among the features of different levels, projecting the features into the same feature space F to obtain a target model P needing fine-tuning parametershalf
In an embodiment, the observation source model predicts the transformed image SsourceImage S transformed with real-time dataobjectAnd using the common features (time attributes t) obtained from the observationsmutualSpatial attribute smutualOther external attributes omutual) Automatically transferring among the features of different levels, projecting the features into the same feature space F to obtain a target model P needing fine-tuning parametershalf
And step S3-3, fine adjustment of parameters. And solving the target model parameter theta by adopting an EM algorithm to obtain a final target domain model P, wherein the algorithm measures the difference between two domains by utilizing KL divergence. In this process, < theta > is greatly increasedj) To obtain
θj+1=argmaxl(θ,θj)
Repeating iteration until convergence finally, and ending the iteration;
in the embodiment, an EM algorithm is adopted to solve the target model parameter theta to obtain a final target domain model P, wherein the algorithm utilizes KL divergenceThe difference between the two domains is measured. In this process, < theta > is greatly increasedj) To obtain thetaj+1=argmaxl(θ,θj) And repeating the iteration until the convergence is finally reached, and finishing the iteration.
And step S3-4, obtaining the target model. And the real-time performance of the prediction model is effectively improved by using the target model result P obtained by the transfer learning.
In the embodiment, the target model result P is obtained by using the transfer learning.
Step S4, performing a prediction operation of the traffic flow at the server, specifically including the following steps:
and step S4-1, relevant factors are transmitted. Transmitting real-time factor t to be predicted to server sidefactSpace factor SfactAnd external influencing factor Ofact
In the embodiment, the real-time factor t to be predicted is transmitted to the server sidefactSpace factor SfactAnd external influencing factor Ofact
And step S4-2, predicting the result. Relevant factors are led into the target model P for prediction to obtain a prediction result Sresult
In the embodiment, the relevant factors are introduced into the target model P for prediction to obtain a prediction result Sresult
Step S5, the prediction result of the server is sent to the mobile terminal, which includes the following substeps:
step S5-1, the result is transmitted. Predicting result S of server side by means of on-line networkresultAnd transmitting to the mobile terminal.
In the embodiment, the prediction result S of the server side is obtained in an online network moderesultAnd transmitting to the mobile terminal.
And step S5-2, displaying the result. Finishing the real-time quick display of the flow prediction result S of the mobile terminalresult
In the embodiment, the mobile terminal is completed to quickly display the flow prediction result S in real timeresult
In specific implementation, the method provided by the invention can realize automatic operation flow based on software technology, and can also realize a corresponding system in a modularized mode.
The data preprocessing module is used for processing the pedestrian flow data to form a matrix and comprises the following subunits:
the first unit, read the data and delete the irrelevant data. Reading an original subway card swiping data set R, deleting irrelevant data such as card swiping equipment number and user card swiping type in the data set R, and obtaining a data set Y ═ Y { (Y)1,Y2,…,Yi,YnIn which Y isi=(s,u,t,c),YiThe card swiping state c of the user u at the subway station s at the time t is shown;
and a second unit for processing the missing value. Judging whether a missing value exists in the data set Y or not, and processing a null value Y at the time ti tUsing data Y near time ti t-1And Yi t+1Interpolating the null value and updating the data set Y;
and a third unit that deletes the abnormal value. Retrieving the data set Y and comparing YiUser account u in (1)iInformation retrieval the number of times a user enters or exits a subway station within a time interval T. Retention of Yi TFinishing the cleaning operation of the data and updating the data set Y when the related data with even number of times appears;
a fourth unit divides the data set by time period. Defining a time interval T, and dividing subway flow data Y of different time periods by the time interval T. Traversing the user account u in the data of each time interval TiTime of card swiping field tiAnd additionally generates a field v representing a time interval. Dividing the data into m groups according to the time interval v to obtain a data set Y' ═ { Y ═ Y1',Y'2,…,Y'mIn which Y isi(s, u, c, v) m is the number of v;
and a fifth unit, data reduction. According to the card swiping time period v, retrieving the state c of the user account u entering and exiting the subway station, and exchanging the sequence of the first-out and last-in data in the data set Y' to finish the reduction operation of the data;
and a sixth unit for data integration transformation. Initializing m k 2 dual channel flow with "0Matrix X ═ Xt,Xt+T,…,Xt+(m-1)TAnd k is the number of sites. And retrieving a data set, traversing u in different time periods, and writing data into a corresponding matrix X in 2 dimensions in a form of '+ 1', namely an in-matrix or an out-matrix, according to the condition that the state c of the user taking the station s and the in-and-out station is 1 and 0. Wherein xT(i, j) represents the number of subway people coming in from subway station i to subway station j during time interval T.
The prediction model building module is used for modeling the time attribute, the space attribute and the external influence factor of the subway pedestrian flow data and comprises the following subunits:
first, temporal proximity modeling. Using adjacent time periodscA two-channel stream matrix for simulating time proximity, the proximity time correlation sequence being
Figure BDA0003071844260000141
Connecting them with the time axis to form a tensor
Figure BDA0003071844260000142
Where k is the number of subway stations. Followed by a convolutional neural network, according to
Figure BDA0003071844260000143
Capturing spatial attributes of each region;
where denotes convolution, f is an activation function,
Figure BDA0003071844260000144
is a learnable parameter of the first layer convolution.
And a second unit for superimposing the residual error unit. Under each convolution network, an L residual error unit is superposed according to a following formula;
Figure BDA0003071844260000145
wherein F is a residual function,
Figure BDA0003071844260000146
representing all learnable parameters in the ith residual unit.
And a third unit for acquiring the proximity result. Batch normalization was performed and then the ReLu correction function was added. After the residual error network, a convolution layer is added to obtain a proximity output result
Figure BDA0003071844260000147
And a fourth unit for acquiring periodic and trending results. According to steps S2-1 and S2-2, cycle, trend time attributes are simulated. Constructing a cyclic correlation sequence
Figure BDA0003071844260000148
Trend correlated sequences
Figure BDA0003071844260000149
Where p represents a day describing the periodicity of the time and q represents a week describing the trend of the time. According to the step S2-3, the periodically changing sequences of the human traffic are respectively output through the two layers of convolution neural networks and the L layer of residual error neural network
Figure BDA00030718442600001410
And a trending sequence of pedestrian traffic
Figure BDA00030718442600001411
And a fifth unit for training the external factor group. Let ETIs a feature vector for external factors within the prediction time interval T. Since data such as holidays can be directly acquired, but the change of weather is unknown, the time interval T-T, T can be used]Weather prediction of time slots [ T, T + T]Weather of a time period. Then E isTVector superposition of two completely connected neural network layers, and training to obtain result E of external factor groupExt
The sixth unit, the fusion matrix. Fusing the three obtained in the step S2-3 and the step S2-4 by using a fusion method based on a parameter matrixAn array
Figure BDA00030718442600001412
Namely, it is
Figure BDA00030718442600001413
Finally fusing the external factor group and XResThe matrix, which yields the predicted value of the t time interval, i.e.
Xt=tanh(XExt+XRes)
Wherein, Wc、Wp、WqRespectively, the learnable parameters for adjusting the influence degrees of the proximity, the period and the trend, tanh is a hyperbolic tangent function, and the value range is [ -1,1]。
The migration learning module performs migration optimization on the established model by utilizing real-time data, and comprises the following subunits:
the first unit, feature extraction. Deleting the final layer (full connection layer) of the trained people flow prediction network to be used as a feature extractor of the people flow real-time prediction task, and extracting the time attribute t of the prediction networksourceSpatial attribute ssourceOther external attribute features osource
A second unit, feature mapping. Observation source model prediction transformed image SsourceImage S transformed with real-time dataobjectAnd using the common features (time attributes t) obtained from the observationsmutualSpatial attribute smutualOther external attributes omutual) Automatically transferring among the features of different levels, projecting the features into the same feature space F to obtain a target model P needing fine-tuning parametershalf
And a third unit for fine-tuning the parameters. And solving the target model parameter theta by adopting an EM algorithm to obtain a final target domain model P, wherein the algorithm measures the difference between two domains by utilizing KL divergence. In this process, < theta > is greatly increasedj) To obtain
θj+1=argmaxl(θ,θj)
Repeating iteration until convergence finally, and ending the iteration;
and a fourth unit that obtains the target model. And the real-time performance of the prediction model is effectively improved by using the target model result P obtained by the transfer learning.
The prediction and issuing module is used for predicting and issuing the pedestrian flow data to the mobile terminal and comprises the following subunits:
the first unit, transmit the relevant factor. Transmitting real-time factor t to be predicted to server sidefactSpace factor SfactAnd external influencing factor Ofact
And a second unit, result prediction. Relevant factors are led into the target model P for prediction to obtain a prediction result Sresult
And a third unit for transmitting the result. Predicting result S of server side by means of on-line networkresultAnd transmitting to the mobile terminal.
And a fourth unit for displaying the result. Finishing the real-time quick display of the flow prediction result S of the mobile terminalresult
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.

Claims (10)

1. The orbit pedestrian volume prediction method fused with the spatio-temporal information is characterized by comprising the following steps: the method comprises the following steps:
s1: carrying out preprocessing operation on subway card swiping data records;
s2: building a residual error neural network structure, and modeling time attributes, space attributes and external influence factors of subway pedestrian flow data;
s3: performing migration learning, and performing migration optimization on the established model by using real-time data;
s4, carrying out prediction work of the pedestrian flow at the server end;
s5: and the prediction result of the server side is sent to the mobile side.
2. The method for predicting the orbital pedestrian flow fused with the spatio-temporal information according to claim 1, characterized in that: the S1 includes the steps of:
s1-1: reading data and deleting irrelevant data; reading an original subway card swiping data set R, deleting irrelevant data of the card swiping equipment number and the card swiping type of a user in the data set R, and obtaining a data set Y ═ Y { (Y)1,Y2,…,Yi,YnIn which Y isi=(s,u,t,c),YiThe card swiping state c of the user u at the subway station s at the time t is shown;
s1-2: processing the missing value; judging whether a missing value exists in the data set Y or not, and processing a null value Y at the time ti tUsing data Y near time ti t-1And Yi t+1Interpolating the null value and updating the data set Y;
s1-3: deleting the outlier; retrieving the data set Y and comparing YiUser account u in (1)iInformation retrieval is carried out on the times of the user entering and exiting the subway station in a time interval T; retention of Yi TFinishing the cleaning operation of the data and updating the data set Y when the related data with even number of times appears;
s1-4: partitioning the data set by time period; defining a time interval T, and dividing subway flow data Y of different time periods by the time interval T; traversing the user account u in the data of each time interval TiTime of card swiping field tiAdditionally generating a field v representing a time interval; dividing the data into m groups according to the time interval v to obtain a data set Y' ═ { Y ═ Y1',Y2',…,Y'mIn which Y isi(s, u, c, v) m is the number of v;
s1-5: data reduction; according to the card swiping time period v, retrieving the state c of the user account u entering and exiting the subway station, and exchanging the sequence of the first-out and last-in data in the data set Y' to finish the reduction operation of the data;
s1-6: data integration transformation; initializing m k 2 two-channel flow matrix X ═ { X with "0t,Xt+T,…,Xt+(m-1)TH, wherein k is the number of sites; retrieving a data set, traversing u in different time periods, and writing data into a corresponding matrix X in 2 dimensions in a form of '+ 1', namely an in-matrix or an out-matrix, according to the condition that the state c of a station s taken by a user and the state c of an in-out station are 1 and 0; wherein xT(i, j) represents the number of subway people coming in from subway station i to subway station j during time interval T.
3. The method for predicting the orbital pedestrian flow fused with the spatio-temporal information according to claim 2, characterized in that: the S2 includes the steps of:
s2-1: modeling the time proximity; using adjacent time periodscA two-channel stream matrix for simulating time proximity, the proximity time correlation sequence being
Figure FDA0003071844250000021
Connecting them with the time axis to form a tensor
Figure FDA0003071844250000022
Wherein k is the number of subway stations; followed by a convolutional neural network, according to
Figure FDA0003071844250000023
Capturing spatial attributes of each region;
where denotes convolution, f is an activation function,
Figure FDA0003071844250000024
is a learnable parameter of the first layer convolution;
s2-2: a residual error superposition unit; under each convolution network, an L residual error unit is superposed according to a following formula;
Figure FDA0003071844250000025
wherein F is a residual function,
Figure FDA0003071844250000026
represents all learnable parameters in the ith residual unit;
s2-3: obtaining a proximity result; carrying out batch treatment normalization, and then adding a ReLu correction function; after the residual error network, a convolution layer is added to obtain a proximity output result
Figure FDA0003071844250000027
S2-4: obtaining periodic and trending results; simulating the period and trend time attributes according to the steps S2-1 and S2-2; constructing a cyclic correlation sequence
Figure FDA0003071844250000028
Trend correlated sequences
Figure FDA0003071844250000029
Wherein p represents a day describing a temporal periodicity and q represents a week describing a temporal trend; according to the step S2-3, the periodically changing sequences of the human traffic are respectively output through the two layers of convolution neural networks and the L layer of residual error neural network
Figure FDA00030718442500000210
And a trending sequence of pedestrian traffic
Figure FDA00030718442500000211
S2-5: training an external factor group; let ETFeature vectors that are external factors within the prediction time interval T; using a time interval of [ T-T, T]Weather prediction of time slots [ T, T + T]Weather of a time period; then E isTVector superposition of two completely connected neural network layers, and training to obtain result E of external factor groupExt
S2-6: fusing the matrixes; fusing the three matrixes obtained in the step S2-3 and the step S2-4 by using a fusion method based on the parameter matrix
Figure FDA00030718442500000212
Namely, it is
Figure FDA00030718442500000213
Finally fusing the external factor group and XResThe matrix, which yields the predicted value of the t time interval, i.e.
Xt=tanh(XExt+XRes)
Wherein, Wc、Wp、WqRespectively, the learnable parameters for adjusting the influence degrees of the proximity, the period and the trend, tanh is a hyperbolic tangent function, and the value range is [ -1,1]。
4. The method for predicting the orbital pedestrian flow fused with the spatio-temporal information according to claim 3, characterized in that: the S3 includes the steps of:
s3-1: extracting characteristics; deleting the final layer and the full-connection layer of the trained people flow prediction network as a feature extractor of the people flow real-time prediction task, and extracting the time attribute t of the prediction networksourceSpatial attribute ssourceOther external attribute features osource
S3-2: mapping the characteristics; observation source model prediction transformed image SsourceImage S transformed with real-time dataobjectAnd using the observed common feature, time attribute tmutualSpatial attribute smutualAnd other ambient attributes omutualAutomatically transferring among the features of different levels, projecting the features into the same feature space F to obtain a target model P needing fine-tuning parametershalf
S3-3: fine-tuning parameters; solving the target model parameter theta by adopting an EM algorithm to obtainTo a final target domain model P, wherein the algorithm measures the difference between two domains by using KL divergence; maximization of l (theta )j) To obtain
θj+1=arg maxl(θ,θj)
Repeating iteration until convergence finally, and ending the iteration;
s3-4: obtaining a target model; and the real-time performance of the prediction model is effectively improved by using the target model result P obtained by the transfer learning.
5. The method for predicting the orbital pedestrian flow fused with the spatio-temporal information according to claim 4, characterized in that: the S4 includes the steps of:
s4-1: transmitting the relevant factors; transmitting real-time factor t to be predicted to server sidefactSpace factor SfactAnd external influencing factor Ofact
S4-2: predicting the result; relevant factors are led into the target model P for prediction to obtain a prediction result Sresult
6. The method for predicting the orbital pedestrian flow fused with the spatiotemporal information according to claim 5, characterized in that: the S5 includes the steps of:
s5-1: transmitting the result; predicting result S of server side by means of on-line networkresultTransmitting to the mobile terminal;
s5-2: displaying the result; finishing the real-time quick display of the flow prediction result S of the mobile terminalresult
7. The orbit pedestrian flow prediction system fusing the spatio-temporal information is characterized in that: the system comprises the following modules which are provided with a plurality of modules,
the data preprocessing module processes the people flow data to form a matrix, and comprises the following subunits:
a first unit reading data and deleting irrelevant data; reading an original subway card swiping data set R, deleting irrelevant data of the card swiping equipment number and the card swiping type of a user in the data set R, and obtaining a data set Y ═ Y { (Y)1,Y2,…,Yi,YnIn which Y isi=(s,u,t,c),YiThe card swiping state c of the user u at the subway station s at the time t is shown;
a second unit that processes the missing value; judging whether a missing value exists in the data set Y or not, and processing a null value Y at the time ti tUsing data Y near time ti t-1And Yi t+1Interpolating the null value and updating the data set Y;
a third unit that deletes the abnormal value; retrieving the data set Y and comparing YiUser account u in (1)iInformation retrieval is carried out on the times of the user entering and exiting the subway station in a time interval T; retention of Yi TFinishing the cleaning operation of the data and updating the data set Y when the related data with even number of times appears;
a fourth unit that divides the data set by time period; defining a time interval T, and dividing subway flow data Y of different time periods by the time interval T; traversing the user account u in the data of each time interval TiTime of card swiping field tiAdditionally generating a field v representing a time interval; dividing the data into m groups according to the time interval v to obtain a data set Y' ═ { Y ═ Y1',Y2',…,Y'mIn which Y isi(s, u, c, v) m is the number of v;
a fifth unit, data reduction; according to the card swiping time period v, retrieving the state c of the user account u entering and exiting the subway station, and exchanging the sequence of the first-out and last-in data in the data set Y' to finish the reduction operation of the data;
a sixth unit for data integration transformation; initializing m k 2 two-channel flow matrix X ═ { X with "0t,Xt+T,…,Xt+(m-1)TH, wherein k is the number of sites; retrieving a data set, traversing u in different time periods, and writing data into a corresponding matrix X in 2 dimensions in a form of '+ 1', namely an in-matrix or an out-matrix, according to the condition that the state c of a station s taken by a user and the state c of an in-out station are 1 and 0; wherein xT(i, j) represents the number of subway pedestrian volumes entering from subway station i to subway station j during time interval T;
the prediction model building module is used for modeling the time attribute, the space attribute and the external influence factor of the subway pedestrian flow data and comprises the following subunits:
a first unit, time proximity modeling; using adjacent time periodscA two-channel stream matrix for simulating time proximity, the proximity time correlation sequence being
Figure FDA0003071844250000041
Connecting them with the time axis to form a tensor
Figure FDA0003071844250000042
Wherein k is the number of subway stations; followed by a convolutional neural network, according to
Figure FDA0003071844250000043
Capturing spatial attributes of each region;
where denotes convolution, f is an activation function,
Figure FDA0003071844250000044
is a learnable parameter of the first layer convolution;
a second unit for superimposing the residual error unit; under each convolution network, an L residual error unit is superposed according to a following formula;
Figure FDA0003071844250000045
wherein F is a residual function,
Figure FDA0003071844250000046
represents all learnable parameters in the ith residual unit;
a third unit that acquires a proximity result; carrying out batch treatment normalization, and then adding a ReLu correction function; after the residual error network, a convolution layer is added to obtain a proximity output result
Figure FDA0003071844250000047
A fourth unit for obtaining periodic and trending results; simulating the period and trend time attributes according to the steps S2-1 and S2-2; constructing a cyclic correlation sequence
Figure FDA0003071844250000048
Trend correlated sequences
Figure FDA0003071844250000049
Wherein p represents a day describing a temporal periodicity and q represents a week describing a temporal trend; according to the step S2-3, the periodically changing sequences of the human traffic are respectively output through the two layers of convolution neural networks and the L layer of residual error neural network
Figure FDA0003071844250000051
And a trending sequence of pedestrian traffic
Figure FDA0003071844250000052
A fifth unit training an external factor group; let ETFeature vectors that are external factors within the prediction time interval T; using a time interval of [ T-T, T]Weather prediction of time slots [ T, T + T]Weather of a time period; then E isTVector superposition of two completely connected neural network layers, and training to obtain result E of external factor groupExt
A sixth unit fusing the matrices; fusing the three matrixes obtained in the step S2-3 and the step S2-4 by using a fusion method based on the parameter matrix
Figure FDA0003071844250000053
Namely, it is
Figure FDA0003071844250000054
Finally fusing external factorsGroup X andResthe matrix, which yields the predicted value of the t time interval, i.e.
Xt=tanh(XExt+XRes)
Wherein, Wc、Wp、WqRespectively, the learnable parameters for adjusting the influence degrees of the proximity, the period and the trend, tanh is a hyperbolic tangent function, and the value range is [ -1,1];
The migration learning module performs migration optimization on the established model by utilizing real-time data, and comprises the following subunits:
a first unit for feature extraction; deleting the final layer (full connection layer) of the trained people flow prediction network to be used as a feature extractor of the people flow real-time prediction task, and extracting the time attribute t of the prediction networksourceSpatial attribute ssourceOther external attribute features osource
A second unit, feature mapping; observation source model prediction transformed image SsourceImage S transformed with real-time dataobjectAnd using the observed common feature, time attribute tmutualSpatial attribute smutualAnd other ambient attributes omutualAutomatically transferring among the features of different levels, projecting the features into the same feature space F to obtain a target model P needing fine-tuning parametershalf
A third unit for fine-tuning the parameters; solving a target model parameter theta by adopting an EM algorithm to obtain a final target domain model P, wherein the algorithm measures the difference between two domains by utilizing KL divergence; in this process, < theta > is greatly increasedj) To obtain
θj+1=arg max l(θ,θj)
Repeating iteration until convergence finally, and ending the iteration;
a fourth unit that obtains a target model; the real-time performance of the prediction model is effectively improved by using a target model result P obtained by transfer learning;
the prediction and issuing module is used for predicting and issuing the pedestrian flow data to the mobile terminal and comprises the following subunits:
a first unit for transmitting the relevant factors; transmitting real-time factor t to be predicted to server sidefactSpace factor SfactAnd external influencing factor Ofact
A second unit to predict the result; relevant factors are led into the target model P for prediction to obtain a prediction result Sresult
A third unit for transmitting the result; predicting result S of server side by means of on-line networkresultTransmitting to the mobile terminal;
a fourth unit for displaying the result; finishing the real-time quick display of the flow prediction result S of the mobile terminalresult
8. The system for predicting orbital pedestrian flow fused with spatiotemporal information according to claim 7, wherein: the temporal proximity is modeled as: by means ofcA two-channel flow matrix simulates time proximity, and the proximity time correlation sequence is
Figure FDA0003071844250000061
Connecting the time axis with the time axis to form tensor
Figure FDA0003071844250000062
Wherein k is the number of subway stations; followed by a convolutional neural network, according to
Figure FDA0003071844250000063
Capturing spatial attributes of each region; this is also the method used for subsequent periodic, trending modeling; where denotes convolution, f is an activation function,
Figure FDA0003071844250000064
is a learnable parameter of the first layer convolution.
9. The system for predicting orbital pedestrian flow fused with spatiotemporal information according to claim 8, wherein: the superpositionThe residual error unit is: under each convolution network, an L residual error unit is superposed according to a following formula;
Figure FDA0003071844250000065
wherein F is a residual function,
Figure FDA0003071844250000066
representing all learnable parameters in the ith residual unit.
10. The system for predicting orbital pedestrian flow fused with spatiotemporal information according to claim 9, wherein: the feature map is: observation source conversion image SsourceAnd transforming the image S in real timeobjectAnd using the observed common feature, time attribute tmutualSpatial attribute smutualAnd other ambient attributes omutualAutomatically migrating among features of different levels to obtain a target model P only needing fine adjustment of parametershalf
CN202110541130.6A 2021-05-18 2021-05-18 Method and system for predicting orbital pedestrian flow by fusing spatio-temporal information Active CN113240179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110541130.6A CN113240179B (en) 2021-05-18 2021-05-18 Method and system for predicting orbital pedestrian flow by fusing spatio-temporal information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110541130.6A CN113240179B (en) 2021-05-18 2021-05-18 Method and system for predicting orbital pedestrian flow by fusing spatio-temporal information

Publications (2)

Publication Number Publication Date
CN113240179A true CN113240179A (en) 2021-08-10
CN113240179B CN113240179B (en) 2022-02-11

Family

ID=77135085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110541130.6A Active CN113240179B (en) 2021-05-18 2021-05-18 Method and system for predicting orbital pedestrian flow by fusing spatio-temporal information

Country Status (1)

Country Link
CN (1) CN113240179B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113642807A (en) * 2021-09-01 2021-11-12 智慧足迹数据科技有限公司 Population mobility prediction method and related device
CN113706281A (en) * 2021-09-07 2021-11-26 深圳前海微众银行股份有限公司 Pixel point information prediction method, device, equipment and storage medium
CN114662805A (en) * 2022-05-26 2022-06-24 山东融瓴科技集团有限公司 Traffic flow prediction method based on similar time sequence comparison
CN114944057A (en) * 2022-04-21 2022-08-26 中山大学 Road network traffic flow data restoration method and system
CN115913996A (en) * 2022-12-07 2023-04-04 长春理工大学 Mobile flow prediction system and method based on regional space-time characteristics
CN116385970A (en) * 2023-04-07 2023-07-04 暨南大学 People stream aggregation prediction model based on space-time sequence data
CN116629460A (en) * 2023-07-24 2023-08-22 中国矿业大学(北京) Subway passenger flow prediction method based on ST-RANet model
CN117035696A (en) * 2023-10-09 2023-11-10 天津致新轨道交通运营有限公司 Intelligent passenger transport management method for subway passenger transport service
CN117591919A (en) * 2024-01-17 2024-02-23 北京工业大学 Passenger flow prediction method, passenger flow prediction device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110161261A1 (en) * 2009-12-28 2011-06-30 Nec(China) Co., Ltd. Method and system for traffic prediction based on space-time relation
CN102508859A (en) * 2011-09-29 2012-06-20 北京亿赞普网络技术有限公司 Advertisement classification method and device based on webpage characteristic
JP2017227994A (en) * 2016-06-20 2017-12-28 日本電信電話株式会社 Human flow prediction device, parameter estimation device, method and program
CN109711620A (en) * 2018-12-26 2019-05-03 浙江大学 A kind of Short-Term Load Forecasting Method based on GRU neural network and transfer learning
CN110570004A (en) * 2018-06-05 2019-12-13 上海申通地铁集团有限公司 subway passenger flow prediction method and system
WO2020003761A1 (en) * 2018-06-26 2020-01-02 株式会社日立製作所 People flow prediction method and people flow prediction system
CN110893100A (en) * 2019-12-16 2020-03-20 广东轻工职业技术学院 Device and method for monitoring posture change based on plantar pressure sensor
CN111523683A (en) * 2020-07-06 2020-08-11 北京天泽智云科技有限公司 Method and system for predicting technological parameters in tobacco processing
CN111861027A (en) * 2020-07-29 2020-10-30 北京工商大学 Urban traffic flow prediction method based on deep learning fusion model
CN112215408A (en) * 2020-09-24 2021-01-12 交控科技股份有限公司 Rail transit passenger flow volume prediction method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110161261A1 (en) * 2009-12-28 2011-06-30 Nec(China) Co., Ltd. Method and system for traffic prediction based on space-time relation
CN102508859A (en) * 2011-09-29 2012-06-20 北京亿赞普网络技术有限公司 Advertisement classification method and device based on webpage characteristic
JP2017227994A (en) * 2016-06-20 2017-12-28 日本電信電話株式会社 Human flow prediction device, parameter estimation device, method and program
CN110570004A (en) * 2018-06-05 2019-12-13 上海申通地铁集团有限公司 subway passenger flow prediction method and system
WO2020003761A1 (en) * 2018-06-26 2020-01-02 株式会社日立製作所 People flow prediction method and people flow prediction system
CN109711620A (en) * 2018-12-26 2019-05-03 浙江大学 A kind of Short-Term Load Forecasting Method based on GRU neural network and transfer learning
CN110893100A (en) * 2019-12-16 2020-03-20 广东轻工职业技术学院 Device and method for monitoring posture change based on plantar pressure sensor
CN111523683A (en) * 2020-07-06 2020-08-11 北京天泽智云科技有限公司 Method and system for predicting technological parameters in tobacco processing
CN111861027A (en) * 2020-07-29 2020-10-30 北京工商大学 Urban traffic flow prediction method based on deep learning fusion model
CN112215408A (en) * 2020-09-24 2021-01-12 交控科技股份有限公司 Rail transit passenger flow volume prediction method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
彭达等: ""基于语义距离的迁移学习算法在消费意图识别上的运用"", 《电脑知识与技术》 *
高照明: ""结构健康监测数据异常诊断与修复方法研究"", 《中国优秀博硕士学位论文全文数据库(硕士) 工程科技II辑》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113642807A (en) * 2021-09-01 2021-11-12 智慧足迹数据科技有限公司 Population mobility prediction method and related device
CN113706281B (en) * 2021-09-07 2024-03-29 深圳前海微众银行股份有限公司 Pixel information prediction method, device, equipment and storage medium
CN113706281A (en) * 2021-09-07 2021-11-26 深圳前海微众银行股份有限公司 Pixel point information prediction method, device, equipment and storage medium
CN114944057A (en) * 2022-04-21 2022-08-26 中山大学 Road network traffic flow data restoration method and system
CN114944057B (en) * 2022-04-21 2023-07-25 中山大学 Road network traffic flow data restoration method and system
CN114662805A (en) * 2022-05-26 2022-06-24 山东融瓴科技集团有限公司 Traffic flow prediction method based on similar time sequence comparison
CN114662805B (en) * 2022-05-26 2022-09-13 山东融瓴科技集团有限公司 Traffic flow prediction method based on similar time sequence comparison
CN115913996A (en) * 2022-12-07 2023-04-04 长春理工大学 Mobile flow prediction system and method based on regional space-time characteristics
CN116385970A (en) * 2023-04-07 2023-07-04 暨南大学 People stream aggregation prediction model based on space-time sequence data
CN116629460B (en) * 2023-07-24 2023-09-12 中国矿业大学(北京) Subway passenger flow prediction method based on ST-RANet model
CN116629460A (en) * 2023-07-24 2023-08-22 中国矿业大学(北京) Subway passenger flow prediction method based on ST-RANet model
CN117035696A (en) * 2023-10-09 2023-11-10 天津致新轨道交通运营有限公司 Intelligent passenger transport management method for subway passenger transport service
CN117035696B (en) * 2023-10-09 2024-02-06 天津致新轨道交通运营有限公司 Intelligent passenger transport management method for subway passenger transport service
CN117591919A (en) * 2024-01-17 2024-02-23 北京工业大学 Passenger flow prediction method, passenger flow prediction device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113240179B (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN113240179B (en) Method and system for predicting orbital pedestrian flow by fusing spatio-temporal information
CN113077090A (en) Passenger flow prediction method, system and computer readable storage medium
CN111199207B (en) Two-dimensional multi-human body posture estimation method based on depth residual error neural network
CN112651262A (en) Cross-modal pedestrian re-identification method based on self-adaptive pedestrian alignment
Dai et al. Spatio-temporal deep learning framework for traffic speed forecasting in IoT
CN110007754B (en) Real-time reconstruction method and device for hand-object interaction process
Gao et al. Adversarial human trajectory learning for trip recommendation
CN114360067A (en) Dynamic gesture recognition method based on deep learning
CN111783895B (en) Travel plan recommendation method, device, computer equipment and storage medium based on neural network
CN113068131A (en) Method, device, equipment and storage medium for predicting user movement mode and track
CN114550053A (en) Traffic accident responsibility determination method, device, computer equipment and storage medium
Liu et al. Knowledge-infused contrastive learning for urban imagery-based socioeconomic prediction
Jiang et al. Action recognition based on fusion skeleton of two kinect sensors
CN113159371B (en) Unknown target feature modeling and demand prediction method based on cross-modal data fusion
Xu et al. A taxi dispatch system based on prediction of demand and destination
CN117115911A (en) Hypergraph learning action recognition system based on attention mechanism
Quan et al. An optimized task assignment framework based on crowdsourcing knowledge graph and prediction
CN116246338B (en) Behavior recognition method based on graph convolution and transducer composite neural network
Wang et al. Velocity-to-velocity human motion forecasting
CN116383494A (en) Information resource pushing method, device and system based on live-action universe
CN115797557A (en) Self-supervision 3D scene flow estimation method based on graph attention network
Wang et al. Doufu: a double fusion joint learning method for driving trajectory representation
Xu et al. Multi-dimensional attention based spatial-temporal networks for traffic forecasting
Chen et al. Next location prediction with a graph convolutional network based on a seq2seq framework
Wei et al. Location-and-Preference Joint Prediction for Task Assignment in Spatial Crowdsourcing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant