Individual travel activity prediction method and system based on mobile phone signaling data
Through mobile phone signaling data preprocessing and CNN-GRU-Self-Attention model, travel activity anchor points are identified and predicted, which solves the problem of insufficient data accuracy and prediction accuracy of traditional traffic survey methods, and achieves high efficiency of individual travel activities , accurate predictions provide new ideas for urban transportation planning.
Patent Information
- Application Number
- CN202411317909.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-17
AI Technical Summary
The traditional transportation survey methods have low data accuracy, difficulty in organization, and limited scale, which cannot promptly reflect the rapid development of cities' transportation needs, and the prediction accuracy and accuracy of existing individual travel activity prediction methods are insufficient.
The individual travel activity prediction method based on mobile phone signaling data is adopted. By acquiring and preprocessing mobile phone signaling data, the travel activity anchor point is identified using a hierarchical aggregation method, and a CNN-GRU-Self-Attention model is constructed to predict individual travel activity. The method includes matching latitude and longitude information, cleaning of invalid redundant data, abnormal data processing and back-cut data processing, identifying travel active anchor points, and using convolutional neural networks, gated loop units and self-attention mechanisms for feature extraction and prediction.
It improves the data accuracy and reliability of individual travel activity prediction, and can predict travel activity locations in the next few days based on individual historical travel data, providing new digital ideas for transportation planning and management, and has higher industry application prospects.
Smart Images

Figure CN119155625A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of data prediction, and relates to a method and system for predicting individual travel activities based on mobile phone signaling data. Background Art
[0002] With the rapid growth of mobile phone signaling data, GPS trajectory data, and location-based online social network data, the combination of individual travel data and advanced data processing technology has provided a new approach for road operation characteristic analysis and traffic demand research. Using big data analysis technology, we can deeply analyze the characteristics of individual transportation travel, including key information such as the specific starting and ending locations, time, and travel mode of each trip. This large-sample intelligent analysis is expected to directly conduct demand forecasting and other research on individual travel activities.
[0003] The most widely used traditional four-stage method for traffic planning relies on residents' travel surveys, such as paper questionnaires, etc. This type of method has low data accuracy, difficulty in organization, limited scale, and long cycle. It is difficult to timely reflect the real traffic demand of the rapid development of the city. Traffic planning is judged by extremely small sample events. The use of mathematical models to expand small sample events often distorts the objective reality. The traditional planning method is in urgent need of updating and upgrading. In recent years, non-aggregate travel demand models have begun to be used for travel demand forecasting. This type of model has improved the traditional four-stage modeling method and can more accurately capture the factors affecting travel behavior and time allocation. Among them, the activity-based model emphasizes that travel is a derived demand that originates from the need for individuals to participate in activities. The research object of this type of method is based on individuals or a small group of people with similar travel patterns. The research work is carried out by analyzing and extracting OD information, travel time, stay status, travel mode, and travel purpose during travel activities. This type of activity-based non-aggregate travel demand modeling method is becoming increasingly popular in academia and is more in line with the concept of people-oriented, but its prediction accuracy and precision cannot accurately reflect the actual travel activities of individuals. Summary of the invention
[0004] The purpose of the present invention is to solve the problems in the prior art and to provide a method and system for predicting individual travel activities based on mobile phone signaling data.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] The present invention proposes a method for predicting individual travel activities based on mobile phone signaling data, comprising the following steps:
[0007] Acquiring mobile phone signaling data and preprocessing mobile phone signaling data;
[0008] A hierarchical aggregation method is used on the pre-processed mobile phone signaling data to identify individual travel activity anchor points;
[0009] A CNN-GRU-Self-Attention model was established, and travel activity anchor point data and mobile phone signaling data were input into the CNN-GRU-Self-Attention model to obtain individual travel activity prediction results.
[0010] Preferably, the pre-processed mobile phone signaling data is obtained by matching longitude and latitude information, cleaning invalid redundant data, processing abnormal data and processing back-switching data.
[0011] Preferably, the abnormal data processing steps are as follows:
[0012] Extract the longitude and latitude data from the data set separately to form two one-dimensional data sets;
[0013] Calculate the standard deviation σ based on the data set, and determine the critical value based on the standard deviation σ;
[0014]
[0015] Among them, X i represents the i-th observation value, represents the mean value, and n represents the sample size;
[0016] Sort the longitude and latitude data separately, and calculate the statistic Q of each data point in the longitude and latitude data sets;
[0017]
[0018] Among them, X i Indicates longitude or latitude data, X median is the median, X max is the maximum value, X min is the minimum value;
[0019] The calculated statistic Q value is compared with the respective critical value. When the statistic Q value is greater than the critical value, the corresponding longitude and latitude data point is determined to be an abnormal phenomenon.
[0020] Preferably, the switching back data processing steps are as follows:
[0021] Create a dictionary to store the connection duration T and occurrence frequency F information of each base station;
[0022] For each base station connection event, record the base station ID, connection duration T ID and timestamp, update the connection time T of the corresponding base station in the dictionary ID and the frequency of occurrence F ID ;
[0023] Define a time window, and after the time window ends, analyze the data of all connection events within the time window;
[0024] Traverse the recorded connection duration data and find the base station ID with the longest connection duration max_duration , and record its base station ID and connection time T max_duration ;
[0025] Traverse the recorded frequency data and find the base station ID with the highest frequency max_frequency , and record its base station ID and number of occurrences F max_frequency ;
[0026] If the base station with the longest connection time is the same as the base station with the highest frequency of occurrence, the base station is used as the identifier of the user's location; if the base station with the longest connection time is different from the base station with the highest frequency of occurrence, the base station with the longest connection time is used as the identifier of the user's location.
[0027] Preferably, the pre-processed mobile phone signaling data is subjected to a hierarchical aggregation method to identify individual travel activity anchor points, specifically:
[0028] Determine a spatial distance threshold α1, a temporal distance threshold α2, and a signaling aggregation point number threshold N required to meet the anchor point condition;
[0029] Establishing space-time structure phase: Convert the collected data points into points in the space-time structure. The spatial dimension is defined by the position coordinates, and the time dimension is defined by the timestamp. The data point set X = {(x1, t1), (x2, t2), (x n ,t n )}, where x i Represents the spatial position coordinates, t i Indicates a timestamp;
[0030] For each data point x i , calculate the number of points N within its α-structure α (x i ), if N α (x i )≥N, then x i Mark as candidate anchor object;
[0031] By traversing the candidate anchor object x i , check the point set N within its α-structure α (x i ), if the point is a candidate anchor point object, add it to the anchor point set and continue to expand;
[0032] For a set of temporally adjacent anchor points P ⅰ and P j, determine whether the distance between these points in space is less than the threshold. If so, merge these points into one trajectory and take the remaining unmerged point set as the noise point set;
[0033] The data is grouped by date, and the above steps are performed on the data of each date to obtain the aggregation results of each time layer. The results of different layers are compared and integrated to obtain the global time-space aggregation results.
[0034] Preferably, the establishment of the CNN-GRU-Self-Attention model is specifically as follows:
[0035] For the travel activity anchor point information dataset aggregated by the hierarchical aggregation algorithm, the training set, validation set and test set are divided, and the convolutional neural network is used to extract features of each sub-modality, and feature attributes meaningful for individual travel activity prediction are extracted from historical data, including timestamp, activity travel distance, activity duration, and activity anchor point location information;
[0036] The gated recurrent unit (GRU) is used to perform temporal analysis on the feature sequence extracted based on the convolutional neural network. The GRU reveals the long-term dependency of the sequence through the adaptive retention and forgetting mechanism of the update gate and reset gate, so as to enhance the prediction accuracy of the activity anchor point position by using temporal information.
[0037] The anchor point sequence output by GRU is weighted through Self-Attention, the attention weight between each anchor point and other anchor points is calculated, the hidden layer weights are redistributed, and the model output is realized through the fully connected layer to obtain the prediction results of individual travel activity locations.
[0038] The present invention proposes an individual travel activity prediction system based on mobile phone signaling data, comprising:
[0039] A data acquisition module, used to acquire mobile phone signaling data and pre-processed mobile phone signaling data;
[0040] A data processing module for identifying individual travel activity anchor points using a hierarchical aggregation method on pre-processed mobile phone signaling data;
[0041] The model building module is used to build the CNN-GRU-Self-Attention model, input the travel activity anchor point data and mobile phone signaling data into the CNN-GRU-Self-Attention model, and obtain the individual travel activity prediction results.
[0042] Preferably, the establishment of the CNN-GRU-Self-Attention model is specifically as follows:
[0043] For the travel activity anchor point information dataset aggregated by the hierarchical aggregation algorithm, the training set, validation set and test set are divided, and the convolutional neural network is used to extract features of each sub-modality, and feature attributes meaningful for individual travel activity prediction are extracted from historical data, including timestamp, activity travel distance, activity duration, and activity anchor point location information;
[0044] The gated recurrent unit (GRU) is used to perform temporal analysis on the feature sequence extracted based on the convolutional neural network. The GRU reveals the long-term dependency of the sequence through the adaptive retention and forgetting mechanism of the update gate and reset gate, so as to enhance the prediction accuracy of the activity anchor point position by using temporal information.
[0045] The anchor point sequence output by GRU is weighted through Self-Attention, the attention weight between each anchor point and other anchor points is calculated, the hidden layer weights are redistributed, and the model output is realized through the fully connected layer to obtain the prediction results of individual travel activity locations.
[0046] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a method for predicting individual travel activities based on mobile phone signaling data are implemented.
[0047] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for predicting individual travel activities based on mobile phone signaling data.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present invention proposes a method for predicting individual travel activities based on mobile phone signaling data. The method pre-processes the data through the mobile phone signaling data and base station data provided by the communication company, completes the data information and removes abnormal and invalid data; on this basis, the hierarchical aggregation algorithm is used to identify the anchor points of travel activities and extract the characteristic information data of individual travel activities; the CNN-GRU-Self-Attention model is constructed, and the model is trained according to the anchor point information data of travel activities and the future travel activity location of the individual is predicted. The user mobile phone signaling data obtained by the method from the communication company has the characteristics of high spatiotemporal resolution, large data volume, and strong real-time dynamics. Compared with traditional resident survey data, it has better effect, lower cost, and higher data accuracy and reliability, providing theoretical support for in-depth research on individual travel activity prediction. According to the user travel activity characteristic information extracted from the mobile phone signaling data, the CNN-GRU-Self-Attention model is proposed to predict individual travel activities. The present invention can predict the location of the travel activity anchor points in the next few days based on the individual's historical travel data, which provides new ideas and ways for the digital transformation of urban traffic planning and management, and has broad industry application prospects. By establishing a new individual travel activity prediction method, the present invention not only enriches the research content of the activity-based non-aggregate transportation planning theoretical model, but also provides an important foundation for urban transportation planning and management.
[0050] The present invention proposes an individual travel activity prediction system based on mobile phone signaling data, which divides the system into a data acquisition module, a data processing module and a model building module, and finally realizes individual travel activity prediction. The modularization concept is adopted to make each module independent of each other, which is convenient for unified management of each module. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0052] Figure 1 This is a flow chart of the individual travel activity prediction method based on mobile phone signaling data of the present invention.
[0053] Figure 2 This is a structural diagram of the CNN-GRU-Self-Attention prediction model of the present invention.
[0054] Figure 3 This is a structural diagram of the gated cycle unit of the present invention.
[0055] Figure 4 This is the anchor point recognition result of a volunteer's travel activities for six consecutive days.
[0056] Figure 5 This is the model training result of the present invention.
[0057] Figure 6 It is a spatiotemporal trajectory diagram of the predicted travel and the actual travel of the present invention.
[0058] Figure 7 This is a diagram of an individual travel activity prediction system based on mobile phone signaling data according to the present invention.
[0059] Figure 8 The figure is a schematic structural diagram of an electronic device of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0061] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0063] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0064] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0065] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0066] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0067] Example 1
[0068] The present invention proposes a method for predicting individual travel activities based on mobile phone signaling data, such as Figure 1 As shown, the following steps are included:
[0069] S1, obtaining mobile phone signaling data and pre-processed mobile phone signaling data;
[0070] The pre-processed mobile phone signaling data is obtained by matching longitude and latitude information, cleaning invalid redundant data, processing abnormal data and switching back data.
[0071] The steps for matching longitude and latitude information are as follows:
[0072] According to the code of the connected base station, each record in the signaling data is matched with the corresponding base station code in the base station information table to find the corresponding longitude and latitude location information.
[0073] The abnormal data processing steps are as follows:
[0074] Extract the longitude and latitude data from the data set separately to form two one-dimensional data sets;
[0075] Calculate the standard deviation σ based on the data set, and determine the critical value based on the standard deviation σ;
[0076]
[0077] Among them, X i represents the i-th observation value, represents the mean value, and n represents the sample size;
[0078] Sort the longitude and latitude data separately, and calculate the statistic Q of each data point in the longitude and latitude data sets;
[0079]
[0080] Among them, X i Indicates longitude or latitude data, X median is the median, X max is the maximum value, X min is the minimum value;
[0081] The calculated statistic Q value is compared with the respective critical value. When the statistic Q value is greater than the critical value, the corresponding longitude and latitude data point is determined to be an abnormal phenomenon.
[0082] The switching back data processing steps are as follows:
[0083] Create a dictionary to store the connection duration T and occurrence frequency F information of each base station;
[0084] For each base station connection event, record the base station ID, connection duration T ID and timestamp, update the connection time T of the corresponding base station in the dictionary ID and the frequency of occurrence F ID ;
[0085] Define a time window, and after the time window ends, analyze the data of all connection events within the time window;
[0086] Traverse the recorded connection duration data and find the base station ID with the longest connection duration max_duration , and record its base station ID and connection time T max_duration ;
[0087] Traverse the recorded frequency data and find the base station ID with the highest frequency max_frequency , and record its base station ID and number of occurrences F max_frequency ;
[0088] If the base station with the longest connection time is the same as the base station with the highest frequency of occurrence, the base station is used as the identifier of the user's location; if the base station with the longest connection time is different from the base station with the highest frequency of occurrence, the base station with the longest connection time is used as the identifier of the user's location.
[0089] S2, using a hierarchical aggregation method on the pre-processed mobile phone signaling data to identify individual travel activity anchor points;
[0090] The pre-processed mobile phone signaling data uses a hierarchical aggregation method to identify individual travel activity anchor points, specifically:
[0091] Determine a spatial distance threshold α1, a temporal distance threshold α2, and a signaling aggregation point number threshold N required to meet the anchor point condition;
[0092] Establishing space-time structure phase: Convert the collected data points into points in the space-time structure. The spatial dimension is defined by the position coordinates, and the time dimension is defined by the timestamp. The data point set X = {(x1, t1), (x2, t2), (x n ,t n )}, where x i Represents the spatial position coordinates, t i Indicates a timestamp;
[0093] For each data point x i , calculate the number of points N within its α-structure α (x i ), if N α (x i )≥N, then x i Mark as candidate anchor object;
[0094] By traversing the candidate anchor object x i , check the point set N within its α-structure α (x i ), if the point is a candidate anchor point object, add it to the anchor point set and continue to expand;
[0095] For a set of temporally adjacent anchor points P ⅰ and P j , determine whether the distance between these points in space is less than the threshold. If so, merge these points into one trajectory and take the remaining unmerged point set as the noise point set;
[0096] The data is grouped by date, and the above steps are performed on the data of each date to obtain the aggregation results of each time layer. The results of different layers are compared and integrated to obtain the global time-space aggregation results.
[0097] S3. Establish a CNN-GRU-Self-Attention model, input travel activity anchor point data and mobile phone signaling data into the CNN-GRU-Self-Attention model, and obtain individual travel activity prediction results.
[0098] The CNN-GRU-Self-Attention model is established as follows:
[0099] For the travel activity anchor point information dataset aggregated by the hierarchical aggregation algorithm, the training set, validation set and test set are divided, and the convolutional neural network is used to extract features of each sub-modality, and feature attributes meaningful for individual travel activity prediction are extracted from historical data, including timestamp, activity travel distance, activity duration, and activity anchor point location information;
[0100] The gated recurrent unit (GRU) is used to perform temporal analysis on the feature sequence extracted based on the convolutional neural network. The GRU reveals the long-term dependency of the sequence through the adaptive retention and forgetting mechanism of the update gate and reset gate, so as to enhance the prediction accuracy of the activity anchor point position by using temporal information.
[0101] The anchor point sequence output by GRU is weighted through Self-Attention, the attention weight between each anchor point and other anchor points is calculated, the hidden layer weights are redistributed, and the model output is realized through the fully connected layer to obtain the prediction results of individual travel activity locations.
[0102] The following is a detailed description of this method:
[0103] Step 1: Data acquisition and data preprocessing
[0104] Step 1.1: Obtain mobile phone signaling data and base station data
[0105] The data used in the present invention include experimental data collected by volunteers and mobile phone signaling data of Guiyang City. The data collected by volunteers include mobile phone GPS data and mobile phone signaling data provided by China Unicom operators based on the volunteers' SM card information. The mobile phone signaling data of Guiyang City is an anonymous mobile phone signaling data set of over one million users provided by China Unicom.
[0106] The signaling data fields used in the present invention mainly include information such as communication user identification number, communication event timestamp, base station cell code, location area code, etc. The original format of the signaling data is shown in Table 1. Table 2 is a base station information table, which contains information such as the name of the base station, LAC and CELLID, longitude and latitude, and base station type. The user's base station positioning information can be obtained by matching the LAC and CELLID fields with the LAC and CELLID fields in the user signaling data.
[0107] Table 1 Original format of user mobile phone signaling data
[0108]
[0109] Table 2 Signaling base station data format
[0110]
[0111] Step 1.2: Mobile phone signaling data preprocessing
[0112] The data preprocessing of the present invention mainly includes matching longitude and latitude information, cleaning invalid redundant data, abnormal data processing and back-switching data processing. Matching longitude and latitude information is to convert mobile phone signaling data into geographic location information to facilitate subsequent spatial distribution analysis; cleaning invalid redundant data is to remove erroneous information and duplicate data in the data set to ensure data quality and accuracy; abnormal and back-switching data processing refers to eliminating data anomalies caused by equipment switching base stations or signal interference to ensure data continuity and reliability. The specific data processing method is as follows:
[0113] Step 1.2.1: Matching longitude and latitude information
[0114] According to the code of the connected base station (LAC and CELLID), each record in the signaling data is matched with the corresponding base station code in the base station information table, the corresponding longitude and latitude location information is found, and added to the signaling data set as a new field.
[0115] Step 1.2.2: Cleaning invalid and redundant data
[0116] If some fields in the data record are missing, and the missing fields are user ID, date, and time, they will be supplemented based on the information before and after the data; if the missing information is LAC and CELLID, since it is impossible to determine their positions to infer the missing field information, the data will be deleted. For data with exactly the same field information and data format errors, such data will be deleted.
[0117] Step 1.2.3: Abnormal data processing:
[0118] Abnormal data processing uses the Laida criterion to detect abnormal values in the data set. The specific processing steps are as follows:
[0119] Step 1: Data preparation. Extract the longitude and latitude data from the dataset separately to form two one-dimensional datasets.
[0120] Step 2: Calculate the standard deviation σ and determine the critical value according to the 3σ rule.
[0121]
[0122] Among them, X i represents the i-th observation value, represents the mean value, and n represents the sample size.
[0123] Step 3: Calculate the Q statistic.
[0124] Sort the longitude and latitude data separately;
[0125] Calculate the Q statistic for each data point in the longitude and latitude dataset using the formula for Laida's criterion:
[0126]
[0127] Among them, X i Indicates longitude or latitude data, X median is the median, X max is the maximum value, X min is the minimum value.
[0128] Step 4: Compare Q values. Compare the calculated Q values of longitude and latitude with their respective critical values. When the Q value is greater than the critical value, the corresponding longitude and latitude data points are judged as abnormal data.
[0129] Step 1.2.4: Switchback data processing
[0130] The present invention adopts an algorithm that uses the longest connection time and the highest frequency of occurrence as the identification location. Within a certain time window, the connection time and frequency of the user at different base stations are counted, and the base station with the longest connection time and the highest frequency of occurrence is used as the identification of the user's location. If the base station with the longest connection time and the base station with the highest frequency of occurrence are not the same base station, the base station with the longest connection time is selected. The algorithm flow is as follows:
[0131] Step 1: Initialize the dictionary set of base station connection duration and frequency. Create a dictionary to store the connection duration T and frequency F information of each base station.
[0132] Step 2: For each base station connection event, record the base station ID and connection duration T of the event. ID Update the connection time T of the corresponding base station in the dictionary ID and the frequency of occurrence F ID .
[0133] Step 3: Define a time window, for example, every 5 minutes. After the time window ends, analyze the data of all connection events within the time window.
[0134] Step 4: Find the base station with the longest connection time. Traverse the recorded connection time data and find the base station ID with the longest connection time. max_duration , and record its base station ID and connection time T max_duration .
[0135] Step 5: Find the base station with the highest frequency. Traverse the recorded frequency data and find the base station ID with the highest frequency. max_frequency , and record its base station ID and number of occurrences F max_frequency .
[0136] Step 6: Determine the identifier of the user's location. If the base station with the longest connection time is the same as the base station with the highest frequency of occurrence, then this base station is used as the identifier of the user's location; if the base station with the longest connection time is different from the base station with the highest frequency of occurrence, then the base station with the longest connection time is given priority as the identifier of the user's location.
[0137] Step 2: Identification of travel activity anchor points based on hierarchical aggregation algorithm
[0138] Based on the traditional spatiotemporal clustering algorithm, the hierarchical aggregation algorithm considers adding a time "layer" constraint in the time dimension. For the identification of travel activity anchor points in the present invention, starting from the multi-day data of travelers, the travel activity anchor points are studied with days as the main unit. Different dates have certain integrity and periodicity in the time dimension. Therefore, the spatiotemporal data of different dates are mapped to the layer ID of the hierarchical clustering algorithm, and the individual travel activity anchor points are obtained by clustering. The specific steps are as follows:
[0139] Step 1: Determine the parameters. Determine the spatial distance threshold α1, the temporal distance threshold α2, and the signaling aggregation point threshold N required to meet the anchor point condition. The three parameters of the algorithm are α1 = 200m, α2 = 10min, and N = 20.
[0140] Step 2: Establishing the space-time structure. Convert the collected data points into points in the space-time structure. The spatial dimension is defined by the position coordinates, and the time dimension is defined by the timestamp. The data point set X = {(x1, t1), (x2, t2), (x n ,t n )}, where x i Represents the spatial position coordinates, t i Indicates a timestamp.
[0141] Step 3: Candidate anchor point object selection stage. For each data point x i , calculate the number of points N in its α-neighborhood α (x i ), if N α (x i )≥N, then x i Mark as a candidate anchor object.
[0142] Step 4: Establish anchor point set. By traversing the candidate anchor point objects x i , check the point set N in its α-neighborhood α (x i ), if any of the points is also a candidate anchor point object, it is added to the anchor point set and continues to expand.
[0143] Step 5: Trajectory merging stage. For the temporally adjacent anchor point set P ⅰ and P j , determine whether the distance between these points in space is less than the threshold, if so, merge these points into one trajectory.
[0144] Step 6: Noise point processing stage. The remaining unmerged point set is regarded as a noise point set and further processed or filtered as needed.
[0145] Step 7: Time stratification processing. Group the data by date and perform the above steps 1-6 for the data of each date. Consider the changes and trends over time to obtain an aggregation result with more time characteristics.
[0146] Step 8: Result integration. After processing each time layer, the obtained aggregation results are integrated. The aggregation results of different dates are compared, integrated or analyzed to obtain the global time-space aggregation results.
[0147] Step 3: Individual travel activity prediction based on CNN-GRU-Self-Attention
[0148] The prediction of individual travel activities is to predict future travel activities based on the user's historical travel information data. The present invention establishes a CNN-GRU-Self-Attention model. The convolutional neural network model is used to extract the spatiotemporal features in the input data, the gated recurrent unit model is used to capture the long-term dependencies in the sequence data, and the self-attention mechanism module effectively learns the internal associations in the input data and assigns different attention weights to the information at different time steps, so as to better characterize the characteristics of the sequence data. These modules provide efficient and accurate prediction capabilities for individual travel activity prediction. The following are the specific implementation steps of the CNN-GRU-Self-Attention model:
[0149] Step 3.1: Feature variable selection based on LASSO regression
[0150] Combining mobile phone signaling data and travel activity anchor point data, the initial input data set of the model is obtained, including timestamp, activity travel distance, activity duration, and activity anchor point location information. The core idea of LASSO regression is to drive the sparsification of feature coefficients through regularization penalty and select the most important features. The specific steps are: perform LASSO regression on all input features and values to be predicted, return the feature coefficient matrix B, create a logical matrix L_B to represent the position of non-zero coefficients in B, create a matrix SL_B to store the number of non-zero coefficients in each feature variable, find the feature index in SL_B that is closest to the number of selected features as the selected feature variable, and filter out the input data set of the subsequent model in combination with the feature variables to be predicted.
[0151] Step 3.2: Dataset Division
[0152] After the feature attributes are selected in step 3.1, the data set is divided into three parts according to the date. The first 20 days are the training set, and the last 10 days are the validation set and the test set for 5 days each, to ensure that the model can be effectively learned and evaluated on independent data.
[0153] Step 3.3: Data Standardization
[0154] The training set, validation set, and test set data are standardized according to the z-score. The standardization is performed according to the following formula:
[0155]
[0156] Where: z i is the value after data standardization, A i is the i-th data of attribute A, is the average value of attribute A, A σ is the standard deviation of attribute A.
[0157] Step 3.4: CNN-GRU-Self-Attention model construction
[0158] Figure 2 The figure shows the structure of the CNN-GRU-Self-Attention combined prediction model. First, for the divided time series data set, the convolutional neural network (CNN) is used to extract features of each sub-modality, extract key features from historical data, and provide accurate input for prediction, such as Figure 3Then, the gated recurrent unit (GRU) is used to perform time series analysis on the feature sequence extracted based on CNN. GRU reveals the long-term dependency of the sequence through the adaptive retention and forgetting mechanism of the update gate and reset gate, so as to enhance the prediction accuracy of the activity anchor point position by using time information. Then, the activity anchor point sequence output by GRU is weighted by Self-Attention, the attention weight between each anchor point and other anchor points is calculated, the hidden layer weights are redistributed, the key information is focused on and the secondary information is ignored, and the prediction accuracy is further improved. Finally, the model output is realized through the fully connected layer to obtain the prediction result of the individual travel activity location. Since the travel time will be used as a feature variable as the model input and cannot be predicted directly, the data of each day is interpolated to make the data volume of each day the same, and the model prediction input can be completed by inputting a certain time step.
[0159] Step 3.5: Model training and parameter adjustment
[0160] Model training and parameter adjustment optimize model parameters through iterative learning. During the model training process, algorithms such as gradient descent are used to gradually reduce the prediction error of the active anchor point position, and regularization techniques are used to avoid overfitting of the active anchor points to ensure the generalization of the model. The parameter adjustment work focuses on carefully adjusting the model architecture by changing hyperparameters such as learning rate and batch size, as well as structural parameters such as the number of network layers and units. Through continuous trial and error, the best model configuration is found to achieve the optimal performance on the validation set. The present invention finally selects a learning rate of 0.001, a batch size of 50, a network layer of 18, a number of neurons of 64, and a training number of 500.
[0161] Take one user’s one-month mobile phone signaling data as an example to predict individual travel activities.
[0162] Step 1: Data acquisition and data preprocessing
[0163] The user's mobile phone signaling data and base station data are obtained from China Unicom. The latitude and longitude information is added to the signaling data according to the matching of the two fields LAC and CELLID; for data with missing fields such as user ID, date and time, the data is supplemented according to the information before and after the data; if the missing data is LAC and CELLID information, the data is deleted; duplicate data and data with incorrect data format are deleted; outliers are detected and removed according to the Laida criterion; the processing of the switchback data is based on the longest base station connection time and the highest frequency of occurrence.
[0164] Step 2: Identification of travel activity anchor points based on hierarchical aggregation algorithm
[0165] Figure 4This is the identification result of the travel activity anchor points of the travel volunteers from December 16 to December 21. For long-stay travel endpoints, such as residences, these travel activity stop anchor points can be better identified. Some short-stay travel anchor points may be identified as stop anchor points. Overall, the identification effect of stop anchor points and movement anchor points is good.
[0166] Table 3 shows the distance error of activity anchor point identification. The table shows that there are large error values within the error range. The error of No. 9 is as high as 1393m, which means that there is a large deviation between the identified travel activity anchor points and the actual travel endpoints. There are also some smaller errors, such as the error of No. 3 is 19m, but overall, most of the identified travel activity anchor points are more accurately identified than the actual travel activity anchor points.
[0167] Table 3 Travel anchor point recognition distance error
[0168]
[0169] Step 3: Individual travel activity prediction based on CNN-GRU-Self-Attention model
[0170] From the model training results Figure 5 As shown in the figure, (a) is the test result of the training set of coordinate x, (b) is the test result of the validation set of coordinate x, (c) is the test result of the test set of coordinate x, (d) is the test result of the training set of coordinate y, (e) is the test result of the validation set of coordinate y, and (f) is the test result of the test set of coordinate y. It can be found that the effects of the training set, validation set, and test set are good overall, but in a small range, there are activity locations with no predicted true values. This is mainly because the prediction accuracy of short-distance travel activities is low. The characteristics of long-distance travel are obvious in the figure, and the recognition and prediction effect is better. On the other hand, in addition to the activity points where real travel occurs, we should also pay attention to some relatively discrete activity points such as Figure 5 The points marked in the red circle in (f) will affect the model fitting, preventing the model from being over-trained and overfitting, which will cause the model to over-fit to the noise and details of the training data and ignore the real patterns and laws in the data, making it impossible to accurately predict new data.
[0171] Table 4 shows the error results of the model, where the mean absolute error (MAE) measures the distance in two directions. The calculated distance error on the test set is about 425m, and the time error is 3 to 4 minutes, which is generally within an acceptable range. 2 The coefficient is used to measure the degree to which the model explains the total variation, and the results show that the model has a good fit on the training set and the test set. According to these indicators, the model performs well on the training set, validation set, and test set, with low error and high R2 Therefore, it can be preliminarily judged that the model has achieved good results on the given task.
[0172] Table 4 Error statistics of CNN-GRU-Self-Attention model
[0173]
[0174] Based on the anchor point sequence prediction model, the travel of an individual on the 23rd and 24th is predicted. The individual travel prediction results are obtained by screening out the stop anchor points. Table 5 shows the prediction results of the individual's two-day travel. The error between the departure and arrival time is 163s, the travel time error is 123.5s, and the average error of the travel endpoint distance is 497.34m.
[0175] Table 5. Travel prediction results for an individual on the 23rd and 24th
[0176]
[0177] Figure 6 The following are comparisons of the predicted travel results from June 23 to 24 with the actual travel trajectories. (a) is the comparison between the predicted travel from June 23 and the actual travel, and (b) is the comparison between the predicted travel from June 24 and the actual travel. It is found that there is a certain spatiotemporal error between the predicted travel activity anchor points (red dots in the figure) and the actual travel trajectory points (blue dots in the figure), but the number of trips, travel time periods and locations in the macroscopic spatiotemporal dimension are consistent with the actual travel, and the prediction results are good.
[0178] Example 2
[0179] The present invention proposes an individual travel activity prediction system based on mobile phone signaling data, such as Figure 7 As shown, including:
[0180] A data acquisition module, used to acquire mobile phone signaling data and pre-processed mobile phone signaling data;
[0181] A data processing module for identifying individual travel activity anchor points using a hierarchical aggregation method on pre-processed mobile phone signaling data;
[0182] The model building module is used to build the CNN-GRU-Self-Attention model, input the travel activity anchor point data and mobile phone signaling data into the CNN-GRU-Self-Attention model, and obtain the individual travel activity prediction results.
[0183] Example 3
[0184] See also Figure 8As shown, the present invention also provides an electronic device 100 for predicting an individual travel activity based on mobile phone signaling data; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0185] The memory 101 can be used to store the computer program 103, and the processor 102 implements the steps of the individual travel activity prediction method based on mobile phone signaling data described in Example 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0186] The at least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.
[0187] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a method for predicting individual travel activities based on mobile phone signaling data, and the processor 102 can execute the plurality of instructions to implement:
[0188] Acquiring mobile phone signaling data and preprocessing mobile phone signaling data;
[0189] A hierarchical aggregation method is used on the pre-processed mobile phone signaling data to identify individual travel activity anchor points;
[0190] A CNN-GRU-Self-Attention model was established, and travel activity anchor point data and mobile phone signaling data were input into the CNN-GRU-Self-Attention model to obtain individual travel activity prediction results.
[0191] Example 4
[0192] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).
[0193] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0194] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0195] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0196] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0197] This paper proposes a method for predicting individual travel activities based on mobile phone signaling data, aiming to break through the limitations of traditional travel activity research methods, improve data accuracy and reliability, and provide theoretical support for in-depth research on individual travel activity prediction. By establishing a new individual travel activity prediction method, this paper not only enriches the research content of the activity-based non-aggregate transportation planning theoretical model, but also provides new ideas and approaches for the digital transformation of transportation planning and management.
[0198] The present invention is still relatively limited in its research methods for traditional individual travel activities. The resident travel survey data used in the past has the disadvantages of low accuracy and small data volume, and cannot accurately reflect the actual travel activities of individuals. Therefore, a method for predicting individual travel activities based on mobile phone signaling data is proposed. Through the mobile phone signaling data and base station data provided by the communication company, the pre-processed mobile phone signaling data is obtained by latitude and longitude information matching, invalid redundant data cleaning, abnormal data processing and back-cut data processing; on this basis, a hierarchical clustering algorithm is used to identify travel activity anchor points and extract individual travel activity feature information data; based on the original spatiotemporal information and travel activity information data, an individual travel activity prediction method based on CNN-GRU-Self-Attention is proposed, using convolutional neural network (CNN) to extract key features as model input, and then using gated recurrent unit (GRU) to perform time series analysis on the feature sequence, and then weighting the GRU output through Self-Attention, and finally outputting the model prediction results through the fully connected layer. The advantages of this method are: the user mobile phone signaling data obtained from telecommunications companies has the characteristics of high temporal and spatial resolution, large data volume, strong real-time dynamics, etc., and has higher precision and accuracy than traditional resident survey data. By extracting the user's travel activity feature information through mobile phone signaling data, and using the CNN-GRU-Self model to predict individual travel activities, this method can predict the travel trajectory of the next few days based on the individual's historical travel data, which provides new ideas and ways for the digital transformation of urban traffic planning and management, and has broad industry application prospects.
[0199] 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, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for predicting individual travel activities based on mobile phone signaling data, It is characterized in that The steps include: Acquiring mobile phone signaling data and preprocessing mobile phone signaling data; A hierarchical aggregation method is used on the pre-processed mobile phone signaling data to identify individual travel activity anchor points; A CNN-GRU-Self-Attention model was established, and travel activity anchor point data and mobile phone signaling data were input into the CNN-GRU-Self-Attention model to obtain individual travel activity prediction results.
2. The method for predicting individual travel activities based on mobile phone signaling data according to claim 1, It is characterized in that The pre-processed mobile phone signaling data is obtained by matching longitude and latitude information, cleaning invalid redundant data, processing abnormal data and switching back data.
3. The method for predicting individual travel activities based on mobile phone signaling data according to claim 2, It is characterized in that The abnormal data processing steps are as follows: Extract the longitude and latitude data from the data set separately to form two one-dimensional data sets; Calculate the standard deviation σ based on the data set, and determine the critical value based on the standard deviation σ; Among them, X i represents the i-th observation value, X represents the mean value, and n represents the sample size; Sort the longitude and latitude data separately, and calculate the statistic Q of each data point in the longitude and latitude data sets; Among them, X i Indicates longitude or latitude data, X median is the median, X max is the maximum value, X min is the minimum value; The calculated statistic Q value is compared with the respective critical value. When the statistic Q value is greater than the critical value, the corresponding longitude and latitude data point is determined to be an abnormal phenomenon.
4. The method for predicting individual travel activities based on mobile phone signaling data according to claim 2, It is characterized in that The switching back data processing steps are as follows: Create a dictionary to store the connection duration T and occurrence frequency F information of each base station; For each base station connection event, record the base station ID, connection duration T ID and timestamp, update the connection time T of the corresponding base station in the dictionary ID and the frequency of occurrence F ID ; Define a time window, and after the time window ends, analyze the data of all connection events within the time window; Traverse the recorded connection duration data and find the base station ID with the longest connection duration max_duration , and record its base station ID and connection time T max_duration ; Traverse the recorded frequency data and find the base station ID with the highest frequency max_frequency , and record its base station ID and number of occurrences F max_frequency ; If the base station with the longest connection time is the same as the base station with the highest frequency of occurrence, the base station is used as the identifier of the user's location; if the base station with the longest connection time is different from the base station with the highest frequency of occurrence, the base station with the longest connection time is used as the identifier of the user's location.
5. The method for predicting individual travel activities based on mobile phone signaling data according to claim 1, It is characterized in that The pre-processed mobile phone signaling data uses a hierarchical aggregation method to identify individual travel activity anchor points, specifically: Determine the spatial distance threshold α 1 , time distance threshold α 2 and the threshold N of the number of signaling aggregation points required to meet the anchor point condition; Establishing space-time structure phase: The collected data points are converted into points in the space-time structure. The spatial dimension is defined by the position coordinates, and the time dimension is defined by the timestamp. The data point set X = {(x 1 ,t 1 ),(x 2 ,t 2 ),(x n ,t n )}, where x i Represents the spatial position coordinates, t i Indicates a timestamp; For each data point x i , calculate the number of points N within its α-structure α (x i ), if N α (x i )≥N, then x i Mark as candidate anchor object; By traversing the candidate anchor object x i , check the point set N within its α-structure α (x i ), if the point is a candidate anchor point object, add it to the anchor point set and continue to expand; For a set of temporally adjacent anchor points P ⅰ and P j , determine whether the distance between these points in space is less than the threshold. If so, merge these points into one trajectory and take the remaining unmerged point set as the noise point set; The data is grouped by date, and the above steps are performed on the data of each date to obtain the aggregation results of each time layer. The results of different layers are compared and integrated to obtain the global time-space aggregation results.
6. The method for predicting individual travel activities based on mobile phone signaling data according to claim 1, It is characterized in that The CNN-GRU-Self-Attention model is established as follows: For the travel activity anchor point information dataset aggregated by the hierarchical aggregation algorithm, the training set, validation set and test set are divided, and the convolutional neural network is used to extract features of each sub-modality, and feature attributes meaningful for individual travel activity prediction are extracted from historical data, including timestamp, activity travel distance, activity duration, and activity anchor point location information; The gated recurrent unit (GRU) is used to perform temporal analysis on the feature sequence extracted based on the convolutional neural network. The GRU reveals the long-term dependency of the sequence through the adaptive retention and forgetting mechanism of the update gate and reset gate, so as to enhance the prediction accuracy of the activity anchor point position by using temporal information. The anchor point sequence output by GRU is weighted through Self-Attention, the attention weight between each anchor point and other anchor points is calculated, the hidden layer weights are redistributed, and the model output is realized through the fully connected layer to obtain the prediction results of individual travel activity locations.
7. An individual travel activity prediction system based on mobile phone signaling data, It is characterized in that include: A data acquisition module, used to acquire mobile phone signaling data and pre-processed mobile phone signaling data; A data processing module for identifying individual travel activity anchor points using a hierarchical aggregation method on pre-processed mobile phone signaling data; The model building module is used to build the CNN-GRU-Self-Attention model, input the travel activity anchor point data and mobile phone signaling data into the CNN-GRU-Self-Attention model, and obtain the individual travel activity prediction results.
8. The individual travel activity prediction system based on mobile phone signaling data according to claim 7, It is characterized in that The CNN-GRU-Self-Attention model is established as follows: For the travel activity anchor point information dataset aggregated by the hierarchical aggregation algorithm, the training set, validation set and test set are divided, and the convolutional neural network is used to extract features of each sub-modality, and feature attributes meaningful for individual travel activity prediction are extracted from historical data, including timestamp, activity travel distance, activity duration, and activity anchor point location information; The gated recurrent unit (GRU) is used to perform temporal analysis on the feature sequence extracted based on the convolutional neural network. The GRU reveals the long-term dependency of the sequence through the adaptive retention and forgetting mechanism of the update gate and reset gate, so as to enhance the prediction accuracy of the activity anchor point position by using temporal information. The anchor point sequence output by GRU is weighted through Self-Attention, the attention weight between each anchor point and other anchor points is calculated, the hidden layer weights are redistributed, and the model output is realized through the fully connected layer to obtain the prediction results of individual travel activity locations.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method for predicting individual travel activities based on mobile phone signaling data as claimed in any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the method for predicting individual travel activities based on mobile phone signaling data as claimed in any one of claims 1 to 6 are implemented.
