A public transportation dispatching method and system based on demand response
By cleaning and feature extraction of historical data, and using travel and traffic analysis models for real-time prediction, the problem of low efficiency of public transportation dispatching in the existing technology is solved, and more efficient traffic route planning and dispatching are achieved.
Patent Information
- Application Number
- CN202310740511.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2043-06-20
AI Technical Summary
The existing public transportation dispatching method is based on road network optimization and cannot respond to passenger needs in real time, resulting in low efficiency.
A demand response-based method is used to predict passenger behavior and traffic conditions by cleaning and feature extraction of historical data, and use travel analysis models and traffic analysis models to perform real-time data analysis to optimize traffic route planning and dispatch.
It improves the efficiency of public transportation dispatching, can predict and dispatch based on real-time passenger data and traffic data, and selects the route with the shortest average waiting time, improving the convenience and reliability of public transportation services.
Smart Images

Figure CN116778739B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic dispatching, and in particular to a public transportation dispatching method and system based on demand response. Background Art
[0002] Public transportation refers to collective transportation services provided to the public to meet people's travel needs. It is usually organized and managed by the government or relevant agencies. In order to provide efficient, convenient and reliable public transportation services, it is necessary to effectively dispatch and manage the public transportation system within the city or region.
[0003] Most of the existing public transportation scheduling methods are based on road network optimization, which mainly optimizes the road network structure and line layout to reduce redundant lines. In practical applications, the traffic scheduling methods based on road network optimization have great limitations and cannot be adjusted and responded to in real time according to passenger needs, which may lead to low efficiency in public transportation scheduling. Summary of the invention
[0004] The present invention provides a public transportation dispatching method and system based on demand response, the main purpose of which is to solve the problem of low efficiency in public transportation dispatching.
[0005] To achieve the above object, the present invention provides a public transportation scheduling method based on demand response, comprising:
[0006] Clean the pre-acquired historical buried point data into standard buried point data, extract historical passenger data and historical traffic data from the standard buried point data respectively, split the historical traffic data into time domain traffic data sets according to the time domain, and split the historical passenger data into single passenger data sets according to the passenger ID;
[0007] Select the single passenger data in the single passenger data set one by one as the target single passenger data, extract the target travel feature group from the target single passenger data in time sequence, perform feature clustering and feature mapping operations on all the target travel feature groups in turn to obtain a standard travel feature group set, wherein the step of performing feature clustering and feature mapping operations on all the target travel feature groups in turn to obtain a standard travel feature group set includes: aggregating all the target travel feature groups into a travel feature group set, splitting all the travel features in the travel feature group set into multiple primary travel feature groups, and randomly selecting a primary travel center feature for each primary travel feature group; and calculating the travel feature distance between each primary travel center feature and each travel feature using the following travel feature distance algorithm:
[0008]
[0009] Wherein, D refers to the travel feature distance, α is the preset adversarial coefficient, · is the dot product symbol, * is the cross product symbol, p refers to the travel feature, q refers to the primary travel center feature, T is the transposition symbol, cov() is the covariance symbol, cov(p,p) refers to the covariance of the travel feature, cov(p,q) refers to the covariance between the travel feature and the primary travel center feature, cov(q,p) refers to the covariance between the primary travel center feature and the travel feature, and cov(q,q) refers to the covariance of the primary travel center feature; all travel features are regrouped according to the travel feature distance to obtain multiple secondary travel feature groups; the secondary travel center features corresponding to each secondary travel feature group are calculated, and the center feature distance between each secondary travel center feature and the corresponding primary travel center feature is calculated; each secondary travel feature group is iteratively updated into a travel feature class according to all the center feature distances, and each travel feature in the travel feature group set is mapped according to the cluster center of each travel feature class to obtain a standard travel feature group set;
[0010] The standard travel feature set is formatted according to time sequence to obtain a time sequence travel feature curve set, a preset initial travel model is trained using the time sequence travel feature curve set to obtain a travel analysis model, and a preset initial traffic model is trained using the time domain traffic data set to obtain a traffic analysis model;
[0011] Acquire real-time demand data, extract real-time passenger data and real-time traffic data from the real-time demand data, analyze predicted passenger data corresponding to the real-time passenger data using the travel analysis model, and analyze predicted traffic data corresponding to the real-time traffic data using the traffic analysis model;
[0012] Route planning is performed on a preset traffic map to obtain a traffic route set, a passenger delay set corresponding to the traffic route set is calculated using the predicted passenger data and the predicted traffic data, a target traffic route is matched from the traffic route set using the passenger delay set, and traffic scheduling is performed according to the target traffic route.
[0013] Optionally, the step of cleaning the pre-acquired historical burial point data into standard burial point data includes:
[0014] The historical buried point data are sequentially subjected to time format unification, location format unification, and map format unification operations to obtain formatted buried point data;
[0015] Screening out duplicate buried point data from the buried point data in the format to obtain deduplicated buried point data;
[0016] Screening out abnormal buried point data from the deduplicated buried point data according to data types to obtain deduplicated buried point data;
[0017] The missing buried point data is extracted from the de-identified buried point data, and the missing buried point data is filled with data to obtain standard buried point data.
[0018] Optionally, extracting a target travel feature group from the target single passenger data in time sequence includes:
[0019] Extracting the passenger age, passenger gender, passenger occupation, payment method and location timestamp data from the target single passenger data in sequence;
[0020] Arrange the location timestamp data in time sequence to obtain a target time series data sequence;
[0021] Splitting the target time series data sequence into time series data sequence groups according to a preset time domain period;
[0022] Performing a site matching operation on the time series data sequence group to obtain a time series site sequence group;
[0023] Performing a seat matching operation on the time series data sequence group to obtain a time series seat sequence group;
[0024] Extracting seat distribution ratios from the time-series seat sequence group, and transcoding the time-series site sequence group into a site feature group;
[0025] The site feature group is fused using the passenger age, the passenger gender, the passenger occupation, the payment method and the seat distribution ratio to obtain a target travel feature group.
[0026] Optionally, the format conversion of the standard travel characteristic group set according to the time sequence to obtain the time sequence travel characteristic curve set includes:
[0027] Selecting standard travel feature groups in the standard travel feature group set one by one as target standard travel feature groups, arranging the target standard travel feature groups in time sequence, and obtaining a target travel feature sequence;
[0028] Extracting a station feature sequence, a passenger age feature sequence, a passenger gender feature sequence, a passenger occupation feature sequence, a payment method feature sequence, and a seat distribution ratio feature sequence from the target travel feature sequence;
[0029] The site feature sequence is used as the dependent variable, and the passenger age feature sequence, the passenger gender feature sequence, the passenger occupation feature sequence, the payment method feature sequence and the seat distribution ratio feature sequence are used as independent variables to generate a time series travel feature curve, and all the time series travel feature curves are collected into a time series travel feature curve set.
[0030] Optionally, the using the time series travel characteristic curve set to train a preset initial travel model to obtain a travel analysis model includes:
[0031] Selecting time-series travel characteristic curves in the time-series travel characteristic curve set one by one as target travel characteristic curves, and using a preset time domain sliding window to collect part of the target travel characteristic curves section by section as target characteristic curve segments;
[0032] The short-term reset feature and the short-term memory feature corresponding to the target characteristic curve segment are calculated respectively by using the recursive convolution gate of the preset initial travel model;
[0033] The short-term travel time sequence characteristic corresponding to the target characteristic curve segment is calculated according to the short-term reset characteristic and the short-term memory characteristic using the following short-term travel time sequence characteristic formula:
[0034]
[0035] Among them, h t refers to the short-term travel time series characteristics at the tth moment, u t refers to the short-term reset characteristic at time t, is the element-wise product, h t-1 is the short-term travel time series characteristic at time t-1, c t refers to the short-term memory characteristics at time t;
[0036] Using the jump convolution gate of the initial travel model, respectively calculate the long-term reset feature and the long-term memory feature corresponding to the target characteristic curve segment;
[0037] The long-term travel time series feature corresponding to the target characteristic curve segment is calculated according to the long-term reset feature and the long-term memory feature using the following long-term travel time series feature formula:
[0038]
[0039] in, refers to the long-term travel time series characteristics at time t, refers to the long-term reset characteristic at time t, is the element-wise product, is the long-term travel time series feature at the trth moment, r refers to the number of hidden units skipped in the skip convolution gate, refers to the long-term memory characteristics at time t;
[0040] The short-term travel timing characteristics and the long-term travel timing characteristics are integrated into a standard travel timing characteristics, and the standard travel timing characteristics are used to generate a target analysis characteristic curve segment;
[0041] The model parameters of the initial travel model are iteratively updated using the time-series travel characteristic curve set and all target analysis characteristic curve segments to obtain a travel analysis model.
[0042] Optionally, the iterative updating of the model parameters of the initial travel model by using the time series travel characteristic curve set and all target analysis characteristic curve segments to obtain a travel analysis model includes:
[0043] Selecting curve segments corresponding to the target analysis characteristic curve segments from the time series travel characteristic curve set one by one as target historical characteristic curve segments;
[0044] All target historical characteristic curve segments are aggregated into a historical characteristic curve segment set, and all target analysis characteristic curve segments are aggregated into an analysis characteristic curve segment set;
[0045] Calculating the loss value corresponding to the initial travel model according to the historical characteristic curve segment set and the analysis characteristic curve segment set;
[0046] Determining whether the loss value is greater than a preset loss threshold;
[0047] If yes, iteratively update the model parameters of the initial travel model according to the loss value, and return to the step of using the recursive convolution gate of the preset initial travel model to respectively calculate the short-term reset feature and the short-term memory feature corresponding to the target characteristic curve segment;
[0048] If not, the updated initial travel model is used as the travel analysis model.
[0049] Optionally, the using the time-domain traffic data set to train a preset initial traffic model to obtain a traffic analysis model includes:
[0050] Arranging the time-domain traffic data set in time sequence to obtain a time-domain traffic data sequence;
[0051] Sequentially performing position transcoding and format transcoding on the time-domain traffic data sequence to obtain a traffic code sequence;
[0052] Sliding acquisition is performed on the traffic code sequence according to a preset traffic time domain window to obtain a traffic code sequence segment set, and traffic code sequence segments in the traffic code sequence segment set are selected one by one as target traffic sequence segments;
[0053] The short-term traffic features and the long-term traffic features of the target traffic sequence segment are extracted respectively by using a preset initial traffic model, and the self-attention traffic features of the target traffic sequence segment are extracted by using a self-attention mechanism;
[0054] The short-term traffic feature, the long-term traffic feature and the self-attention traffic feature are integrated into a time-series traffic feature, and feature decoding is performed on the time-series traffic feature to obtain a target analysis traffic segment;
[0055] The initial traffic model is trained according to all target traffic sequence segments and all target analysis traffic segments to obtain a traffic analysis model.
[0056] Optionally, the analyzing the predicted passenger data corresponding to the real-time passenger data using the travel analysis model includes:
[0057] generating a real-time travel characteristic curve according to the real-time passenger data;
[0058] Analyzing a predicted travel characteristic curve corresponding to the real-time travel characteristic curve using the travel analysis model;
[0059] Performing format transcoding on the predicted travel characteristic curve to obtain a predicted travel characteristic group;
[0060] The predicted travel feature group is feature decoded to obtain predicted passenger data.
[0061] Optionally, the calculating a set of passenger delays corresponding to the traffic route set by using the predicted passenger data and the predicted traffic data includes:
[0062] Selecting traffic routes in the traffic route set one by one as initial traffic routes, and extracting the congestion coefficient and route length corresponding to each station in the initial traffic route from the predicted traffic data;
[0063] All route lengths are sequentially aggregated into a route length set, and all congestion coefficients are sequentially aggregated into a congestion coefficient set;
[0064] Splitting the predicted passenger data into predicted single passenger data sets according to passenger IDs;
[0065] Selecting predicted single passenger data in the predicted single passenger data set one by one as target predicted single passenger data, and extracting a predicted positioning timestamp from the target predicted single passenger data;
[0066] Performing site matching on the predicted positioning timestamp to obtain predicted outbound sites, and aggregating all predicted outbound sites into an outbound site set;
[0067] The target passenger delay corresponding to the initial traffic route is calculated using the following passenger delay formula according to the route length set, the congestion coefficient set and the exit station set, and all target passenger delays are aggregated into a passenger delay set:
[0068]
[0069] Wherein, L refers to the target passenger delay, M refers to the total number of elements in the exit station set, n refers to the station sequence number, N refers to the total number of elements in the congestion coefficient set, and the total number of elements in the congestion coefficient set is equal to the total number of elements in the route length set, and K n refers to the nth route length in the route length set, v refers to the preset driving speed, e n refers to the nth congestion coefficient in the congestion coefficient set, θ is the preset waiting time at the station, and m n It refers to the statistical number of sites corresponding to the nth congestion coefficient in the congestion coefficient set in the exit site set.
[0070] In order to solve the above problems, the present invention also provides a public transportation scheduling system based on demand response, the system comprising:
[0071] A data splitting module is used to clean the pre-acquired historical buried point data into standard buried point data, extract historical passenger data and historical traffic data from the standard buried point data, split the historical traffic data into time domain traffic data sets according to the time domain, and split the historical passenger data into single passenger data sets according to the passenger ID;
[0072] A feature clustering module is used to select single passenger data in the single passenger data set as target single passenger data one by one, extract target travel feature groups from the target single passenger data in time sequence, perform feature clustering and feature mapping operations on all target travel feature groups in turn to obtain a standard travel feature group set, wherein the step of performing feature clustering and feature mapping operations on all target travel feature groups in turn to obtain a standard travel feature group set includes: aggregating all target travel feature groups into a travel feature group set, splitting all travel features in the travel feature group set into multiple primary travel feature groups, and randomly selecting primary travel center features for each primary travel feature group; and calculating the travel feature distance between each primary travel center feature and each travel feature using the following travel feature distance algorithm:
[0073]
[0074] Wherein, D refers to the travel feature distance, α is the preset adversarial coefficient, · is the dot product symbol, * is the cross product symbol, p refers to the travel feature, q refers to the primary travel center feature, T is the transposition symbol, cov() is the covariance symbol, cov(p,p) refers to the covariance of the travel feature, cov(p,q) refers to the covariance between the travel feature and the primary travel center feature, cov(q,p) refers to the covariance between the primary travel center feature and the travel feature, and cov(q,q) refers to the covariance of the primary travel center feature; all travel features are regrouped according to the travel feature distance to obtain multiple secondary travel feature groups; the secondary travel center features corresponding to each secondary travel feature group are calculated, and the center feature distance between each secondary travel center feature and the corresponding primary travel center feature is calculated; each secondary travel feature group is iteratively updated into a travel feature class according to all the center feature distances, and each travel feature in the travel feature group set is mapped according to the cluster center of each travel feature class to obtain a standard travel feature group set;
[0075] A model training module, used to convert the format of the standard travel feature set according to time sequence to obtain a time sequence travel feature curve set, train a preset initial travel model using the time sequence travel feature curve set to obtain a travel analysis model, and train a preset initial traffic model using the time domain traffic data set to obtain a traffic analysis model;
[0076] A traffic prediction module, used to obtain real-time demand data, extract real-time passenger data and real-time traffic data from the real-time demand data, analyze predicted passenger data corresponding to the real-time passenger data using the travel analysis model, and analyze predicted traffic data corresponding to the real-time traffic data using the traffic analysis model;
[0077] The path planning module is used to plan the route for the preset traffic map to obtain a traffic route set, calculate the passenger delay set corresponding to the traffic route set using the predicted passenger data and the predicted traffic data, match the target traffic route from the traffic route set using the passenger delay set, and perform traffic scheduling according to the target traffic route.
[0078] The present invention cleans the pre-acquired historical buried data into standard buried data, extracts historical passenger data and historical traffic data from the standard buried data respectively, splits the historical traffic data into a time domain traffic data set according to the time domain, and splits the historical passenger data into a single passenger data set according to the passenger ID, so as to improve the accuracy of the data and facilitate the subsequent prediction of passenger behavior and traffic conditions. By selecting the single passenger data in the single passenger data set as the target single passenger data one by one, and extracting the target travel feature group from the target single passenger data according to the time sequence, the riding habits of each passenger can be characterized, so as to facilitate the grasp of the user portrait of the passenger. By performing feature clustering and The feature mapping operation can obtain a standard travel feature set, which can reduce the number of feature types, improve the efficiency of subsequent model training, and facilitate the extraction of common features among different passengers. By converting the format of the standard travel feature set according to the time sequence, a time sequence travel feature curve set is obtained, and the preset initial travel model is trained using the time sequence travel feature curve set to obtain a travel analysis model. The preset initial traffic model is trained using the time domain traffic data set to obtain a traffic analysis model. The time sequence relationship model between passenger characteristics and passenger travel data and the time sequence relationship model of traffic conditions can be obtained, thereby facilitating the prediction of subsequent boarding and alighting conditions of each passenger and road conditions at the station, and facilitating traffic scheduling.
[0079] By acquiring real-time demand data, extracting real-time passenger data and real-time traffic data from the real-time demand data, using the travel analysis model to analyze the predicted passenger data corresponding to the real-time passenger data, and using the traffic analysis model to analyze the predicted traffic data corresponding to the real-time traffic data, it is possible to predict the transfer or boarding and alighting of passengers on the bus in the future time period, and predict the traffic congestion and the number of people at stations on each route in the region in the future time period, so as to facilitate the scheduling of public transportation, and by planning the route on the preset traffic map, a traffic route set is obtained, and the predicted passenger data and the predicted traffic data are used to calculate the passenger delay set corresponding to the traffic route set, and the passenger delay set is used to match the target traffic route from the traffic route set, and traffic scheduling is performed according to the target traffic route, so that the traffic route with the shortest average waiting time can be selected for public scheduling, thereby improving the scheduling efficiency of public transportation. Therefore, the public transportation scheduling method and system based on demand response proposed in the present invention can solve the problem of low efficiency in public transportation scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 A schematic diagram of a process flow of a public transportation scheduling method based on demand response provided by an embodiment of the present invention;
[0081] Figure 2 A schematic diagram of a process for extracting a target travel feature group provided by an embodiment of the present invention;
[0082] Figure 3 A schematic diagram of a flow chart of a traffic analysis model training method according to an embodiment of the present invention;
[0083] Figure 4 A functional module diagram of a public transportation dispatching system based on demand response provided by an embodiment of the present invention;
[0084] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0085] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0086] The embodiment of the present application provides a public transportation scheduling method based on demand response. The execution subject of the public transportation scheduling method based on demand response includes but is not limited to at least one of the electronic devices such as the server, the terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the public transportation scheduling method based on demand response can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0087] Reference Figure 1 FIG. 1 is a flow chart of a public transportation scheduling method based on demand response provided by an embodiment of the present invention. In this embodiment, the public transportation scheduling method based on demand response includes:
[0088] S1. Clean the pre-acquired historical buried data into standard buried data, extract historical passenger data and historical traffic data from the standard buried data respectively, split the historical traffic data into time domain traffic data sets according to the time domain, and split the historical passenger data into single passenger data sets according to the passenger ID.
[0089] In an embodiment of the present invention, the historical buried data refers to the data information about traffic recorded in the passengers' mobile phone applications and the public transportation vehicle system in the past time period of the public transportation system. The historical passenger data includes the location information of each passenger before and after taking public transportation and the corresponding location timestamp, the passenger's age, gender, occupation, payment method and seat selection, etc., wherein the age, gender and occupation can be obtained through a questionnaire, the location timestamp and the seat selection can be obtained through GPS positioning, the payment method can be queried through the system payment channel, and the historical traffic data refers to the congestion level of the route and the number of passengers at each station in each time period recorded by the public transportation vehicle.
[0090] In the embodiment of the present invention, the cleaning of the pre-acquired historical burial point data into standard burial point data includes:
[0091] The historical buried point data are sequentially subjected to time format unification, location format unification, and map format unification operations to obtain formatted buried point data;
[0092] Screening out duplicate buried point data from the buried point data in the format to obtain deduplicated buried point data;
[0093] Screening out abnormal buried point data from the deduplicated buried point data according to data types to obtain deduplicated buried point data;
[0094] The missing buried point data is extracted from the de-identified buried point data, and the missing buried point data is filled with data to obtain standard buried point data.
[0095] In detail, the unification of the time format of the historical burial point data refers to converting the time data in the historical burial point data into ISO 8601 format or UNIX time format, the unification of the location format of the historical burial point data refers to converting the location data in the historical burial point data into longitude and latitude format or GPS format, and the unification of the map format of the historical burial point data refers to converting the traffic route map data in the historical burial point data into GDF format or KIWI format.
[0096] Specifically, the duplicate buried data refers to data with the same content such as timestamp, ID, age, gender, occupation, payment method and seat selection. The single-column deduplication method or hash value deduplication method can be used to filter out duplicate data from the formatted buried data to obtain deduplicated buried data. The abnormal buried data refers to data that exceeds the data value range, such as GPS positioning data that exceeds the traffic range. The missing buried data refers to buried data that is missing due to screening or recording. The data can be filled using the mean filling method or regression filling method according to the context of the missing buried data to obtain standard buried data.
[0097] In detail, splitting the historical traffic data into time domain traffic data sets according to the time domain refers to splitting the historical traffic data according to a week or a day as the time domain period to obtain a time domain traffic data set composed of multiple time domain traffic data, and each of the time domain traffic data includes traffic information in a time domain; the passenger ID refers to a unique identifier used by each passenger when logging into a public transportation application, and splitting the historical passenger data into single passenger data sets according to the passenger ID refers to splitting the historical passenger data according to the passenger ID corresponding to each buried point data to obtain a single passenger data set composed of multiple single passenger data, and each of the single passenger data contains all the riding data of the passenger corresponding to a passenger ID, for example, the location information and timestamp when opening the application to view the vehicle, and the location information and corresponding timestamp when getting on and off the vehicle.
[0098] In an embodiment of the present invention, by cleaning the pre-acquired historical buried data into standard buried data, respectively extracting historical passenger data and historical traffic data from the standard buried data, splitting the historical traffic data into time domain traffic data sets according to the time domain, and splitting the historical passenger data into single passenger data sets according to the passenger ID, the accuracy of the data can be improved, and the subsequent prediction of passenger behavior and traffic conditions can be facilitated.
[0099] S2. Select single passenger data in the single passenger data set one by one as target single passenger data, extract target travel feature groups from the target single passenger data in time sequence, perform feature clustering and feature mapping operations on all target travel feature groups in turn, and obtain a standard travel feature group set.
[0100] In the embodiment of the present invention, refer to Figure 2 As shown, the step of extracting a target travel feature group from the target single passenger data in time sequence includes:
[0101] S21, extracting the passenger age, passenger gender, passenger occupation, payment method and location timestamp data from the target single passenger data in sequence;
[0102] S22, arranging the location timestamp data in time sequence to obtain a target time series data sequence;
[0103] S23, splitting the target time series data sequence into time series data sequence groups according to a preset time domain period;
[0104] S24, performing a site matching operation on the time series data sequence group to obtain a time series site sequence group;
[0105] S25, performing a seat matching operation on the time series data sequence group to obtain a time series seat sequence group;
[0106] S26, extracting seat distribution ratios from the time-series seat sequence group, and transcoding the time-series site sequence group into a site feature group;
[0107] S27. Perform feature fusion on the site feature group using the passenger age, the passenger gender, the passenger occupation, the payment method, and the seat distribution ratio to obtain a target travel feature group.
[0108] In detail, the location timestamp data includes the location positioning data of the target single passenger data corresponding to the passenger at each moment, and the time domain period may be one day or half a day.
[0109] Specifically, performing a site matching operation on the time series data sequence group to obtain a time series site sequence group means performing site position matching based on the position data in the time series data sequence group, taking the position timestamp within the site position range as the time series site data, aggregating all the time series site data in each time series data sequence into a time series site sequence, and aggregating all the time series site sequences into a time series site sequence group.
[0110] In detail, performing a seat matching operation on the time series data sequence group to obtain a time series seat sequence group means matching the seat number of the passenger in the vehicle according to the position timestamp data in the time series data sequence group, and aggregating the seat numbers into a time series seat sequence in time sequence, and aggregating all the time series seat sequences into a time sequence as a sequence group.
[0111] In detail, extracting the seat distribution ratio from the time-series seat sequence group refers to counting the ratio of each seat in the time-series seat sequence group to obtain the seat distribution ratio, and transcoding the time-series site sequence group into a site feature group refers to normalizing each time-series site sequence in the time-series site sequence group to obtain the site feature, and aggregating all the site features into a site feature group.
[0112] Specifically, the use of the passenger age, the passenger gender, the passenger occupation, the payment method and the seat distribution ratio to perform feature fusion on the site feature group to obtain a target travel feature group means normalizing the passenger age, the passenger gender, the passenger occupation, the payment method and the seat distribution ratio into corresponding features, and performing feature fusion using each feature as a dimensional feature of each site feature in the site feature group.
[0113] In the embodiment of the present invention, the feature clustering and feature mapping operations are performed on all target travel feature groups in sequence to obtain a standard travel feature group set, including:
[0114] All target travel feature groups are collected into a travel feature group set, all travel features in the travel feature group set are divided into multiple primary travel feature groups, and primary travel center features are randomly selected for each primary travel feature group;
[0115] The travel characteristic distance between each primary travel center feature and each travel feature is calculated using the following travel characteristic distance algorithm:
[0116]
[0117] Wherein, D refers to the travel feature distance, α is the preset adversarial coefficient, · is the dot product symbol, * is the cross product symbol, p refers to the travel feature, q refers to the primary travel center feature, T is the transposition symbol, cov() is the covariance symbol, cov(p,p) refers to the covariance of the travel feature, cov(p,q) refers to the covariance between the travel feature and the primary travel center feature, cov(q,p) refers to the covariance between the primary travel center feature and the travel feature, and cov(q,q) refers to the covariance of the primary travel center feature;
[0118] Regrouping all travel characteristics according to the travel characteristic distance to obtain multiple secondary travel characteristic groups;
[0119] Calculating the secondary travel center feature corresponding to each secondary travel feature group, and calculating the center feature distance between each secondary travel center feature and the corresponding primary travel center feature;
[0120] Each secondary travel feature group is iteratively updated into a travel feature class according to all center feature distances, and each travel feature in the travel feature group set is mapped according to the cluster center of each travel feature class to obtain a standard travel feature group set.
[0121] In the embodiment of the present invention, by using the travel feature distance algorithm to calculate the travel feature distance between each primary travel center feature and each travel feature, the distance of the features can be determined while retaining the correlation between the features, thereby improving the efficiency of feature clustering.
[0122] In detail, regrouping all travel features according to the travel feature distance to obtain multiple secondary travel feature groups means allocating travel features to the travel feature group where the primary travel center feature with the closest travel feature distance is located to obtain secondary travel feature groups.
[0123] Specifically, calculating the secondary travel center feature corresponding to each secondary travel feature group refers to calculating the mean feature of each secondary travel feature of the secondary travel feature group, and the center feature distance refers to the travel feature distance between the secondary travel center feature and the corresponding primary travel center feature.
[0124] In an embodiment of the present invention, the iterative updating of each secondary travel feature group into a travel feature class according to all the center feature distances includes: taking the average value of all the center feature distances as the standard center feature distance, and judging whether the standard center feature distance is less than a preset distance threshold; if so, taking the secondary travel center feature as the primary travel center feature, and returning to the step of calculating the travel feature distance between each primary travel center feature and each travel feature using the following travel feature distance algorithm; if not, taking the secondary travel feature groups as travel feature classes one by one.
[0125] In the embodiment of the present invention, by selecting single passenger data in the single passenger data set as target single passenger data one by one, and extracting target travel feature groups from the target single passenger data in time sequence, the riding habits of each passenger can be characterized, which facilitates grasping the user portrait of the passenger. By performing feature clustering and feature mapping operations on all target travel feature groups in turn, a standard travel feature group set is obtained, which can reduce the number of feature types, improve the efficiency of subsequent model training, and facilitate the extraction of common features between different passengers.
[0126] S3. Convert the format of the standard travel feature set in time sequence to obtain a time sequence travel feature curve set, use the time sequence travel feature curve set to train a preset initial travel model to obtain a travel analysis model, and use the time domain traffic data set to train a preset initial traffic model to obtain a traffic analysis model.
[0127] In an embodiment of the present invention, the time-series travel characteristic curve set is a multidimensional characteristic curve between independent variable characteristics such as passenger age, passenger gender, passenger occupation, payment method, seat distribution ratio and time and dependent variables of the site characteristics.
[0128] In the embodiment of the present invention, the format conversion of the standard travel characteristic set according to the time sequence to obtain the time sequence travel characteristic curve set includes:
[0129] Selecting standard travel feature groups in the standard travel feature group set one by one as target standard travel feature groups, arranging the target standard travel feature groups in time sequence, and obtaining a target travel feature sequence;
[0130] Extracting a station feature sequence, a passenger age feature sequence, a passenger gender feature sequence, a passenger occupation feature sequence, a payment method feature sequence, and a seat distribution ratio feature sequence from the target travel feature sequence;
[0131] The site feature sequence is used as the dependent variable, and the passenger age feature sequence, the passenger gender feature sequence, the passenger occupation feature sequence, the payment method feature sequence and the seat distribution ratio feature sequence are used as independent variables to generate a time series travel feature curve, and all the time series travel feature curves are collected into a time series travel feature curve set.
[0132] In detail, extracting the site feature sequence, passenger age feature sequence, passenger gender feature sequence, passenger occupation feature sequence, payment method feature sequence, and seat distribution ratio feature sequence from the target travel feature sequence respectively means decomposing each target travel feature in the target travel feature sequence according to the feature dimension to obtain site features, passenger age features, passenger gender features, passenger occupation features, payment method features, and seat distribution ratio features.
[0133] In detail, the method of using the time series travel characteristic curve set to train a preset initial travel model to obtain a travel analysis model includes:
[0134] Selecting time-series travel characteristic curves in the time-series travel characteristic curve set one by one as target travel characteristic curves, and using a preset time domain sliding window to collect part of the target travel characteristic curves section by section as target characteristic curve segments;
[0135] The short-term reset feature and the short-term memory feature corresponding to the target characteristic curve segment are calculated respectively by using the recursive convolution gate of the preset initial travel model;
[0136] The short-term travel time sequence characteristic corresponding to the target characteristic curve segment is calculated according to the short-term reset characteristic and the short-term memory characteristic using the following short-term travel time sequence characteristic formula:
[0137]
[0138] Among them, h t refers to the short-term travel time series characteristics at the tth moment, u t refers to the short-term reset characteristic at time t, is the element-wise product, h t-1 is the short-term travel time series characteristic at time t-1, c t refers to the short-term memory characteristics at time t;
[0139] Using the jump convolution gate of the initial travel model, respectively calculate the long-term reset feature and the long-term memory feature corresponding to the target characteristic curve segment;
[0140] The long-term travel time series feature corresponding to the target characteristic curve segment is calculated according to the long-term reset feature and the long-term memory feature using the following long-term travel time series feature formula:
[0141]
[0142] in, refers to the long-term travel time series characteristics at time t, refers to the long-term reset characteristic at time t, is the element-wise product, is the long-term travel time series feature at the trth moment, r refers to the number of hidden units skipped in the skip convolution gate, refers to the long-term memory characteristics at time t;
[0143] The short-term travel timing characteristics and the long-term travel timing characteristics are integrated into a standard travel timing characteristics, and the standard travel timing characteristics are used to generate a target analysis characteristic curve segment;
[0144] The model parameters of the initial travel model are iteratively updated using the time-series travel characteristic curve set and all target analysis characteristic curve segments to obtain a travel analysis model.
[0145] Specifically, the initial travel model may be an LSTM model, and the recursive convolution gate and the skip convolution gate may both be gated units of the LSTM model, wherein the recursive convolution gate is a gated recursive unit, and the skip convolution gate is a gated skip unit.
[0146] In an embodiment of the present invention, by using the short-term travel timing characteristic formula to calculate the short-term travel timing characteristic corresponding to the target characteristic curve segment according to the short-term reset characteristic and the short-term memory characteristic, and by using the long-term travel timing characteristic formula to calculate the long-term travel timing characteristic corresponding to the target characteristic curve segment according to the long-term reset characteristic and the long-term memory characteristic, the travel characteristic change law can be captured in the short-term time domain and the long-term time domain respectively, thereby improving the accuracy of the standard travel timing characteristic.
[0147] In detail, the short-term travel timing features and the long-term travel timing features can be fused into standard travel timing features using a fully connected layer, and generating target analysis feature curve segments using the standard travel timing features refers to linearly activating the standard travel timing features to obtain target analysis feature curve segments.
[0148] In the embodiment of the present invention, the iterative updating of the model parameters of the initial travel model by using the time series travel characteristic curve set and all target analysis characteristic curve segments to obtain the travel analysis model includes:
[0149] Selecting curve segments corresponding to the target analysis characteristic curve segments from the time series travel characteristic curve set one by one as target historical characteristic curve segments;
[0150] All target historical characteristic curve segments are aggregated into a historical characteristic curve segment set, and all target analysis characteristic curve segments are aggregated into an analysis characteristic curve segment set;
[0151] Calculating the loss value corresponding to the initial travel model according to the historical characteristic curve segment set and the analysis characteristic curve segment set;
[0152] Determining whether the loss value is greater than a preset loss threshold;
[0153] If yes, iteratively update the model parameters of the initial travel model according to the loss value, and return to the step of using the recursive convolution gate of the preset initial travel model to respectively calculate the short-term reset feature and the short-term memory feature corresponding to the target characteristic curve segment;
[0154] If not, the updated initial travel model is used as the travel analysis model.
[0155] In detail, the cross entropy loss function or the mean square error loss function can be used to calculate the loss value corresponding to the initial travel model based on the historical characteristic curve segment set and the analysis characteristic curve segment set, and the fastest gradient descent algorithm or the stochastic gradient descent algorithm can be used to iteratively update the model parameters of the initial travel model based on the loss value.
[0156] In the embodiment of the present invention, refer to Figure 3 As shown, the time domain traffic data set is used to train the preset initial traffic model to obtain a traffic analysis model, including:
[0157] S31, arranging the time-domain traffic data set in time sequence to obtain a time-domain traffic data sequence;
[0158] S32, sequentially performing position transcoding and format transcoding on the time-domain traffic data sequence to obtain a traffic code sequence;
[0159] S33, performing sliding collection on the traffic code sequence according to a preset traffic time domain window to obtain a traffic code sequence segment set, and selecting traffic code sequence segments in the traffic code sequence segment set one by one as target traffic sequence segments;
[0160] S34, using a preset initial traffic model to respectively extract the short-term traffic features and the long-term traffic features of the target traffic sequence segment, and using a self-attention mechanism to extract the self-attention traffic features of the target traffic sequence segment;
[0161] S35, fusing the short-term traffic feature, the long-term traffic feature and the self-attention traffic feature into a time series traffic feature, performing feature decoding on the time series traffic feature, and obtaining a target analysis traffic segment;
[0162] S36. The initial traffic model is trained according to all target traffic sequence segments and all target analysis traffic segments to obtain a traffic analysis model.
[0163] In detail, the Encoding layer of the Transform model can be used to perform position transcoding and format transcoding on the time domain traffic data sequence in sequence to obtain a traffic coding sequence. The initial traffic model can be an LSTM model or a recurrent neural network model. The method of using the preset initial traffic model to respectively extract the short-term traffic characteristics and long-term traffic characteristics of the target traffic sequence segment is consistent with the method of using the time series travel characteristic curve set to train the preset initial travel model in the above step S3 to obtain a travel analysis model, which will not be repeated here.
[0164] Specifically, the method of fusing the short-term traffic features, the long-term traffic features and the self-attention traffic features into time-series traffic features is consistent with the method of fusing the short-term travel time-series features and the long-term travel time-series features into standard travel time-series features in the above step S3, and will not be repeated here. The method of training the initial traffic model according to all target traffic sequence segments and all target analysis traffic segments to obtain a traffic analysis model is consistent with the method of training the preset initial traffic model using the time domain traffic data set in the above step S3 to obtain a traffic analysis model, and will not be repeated here.
[0165] In an embodiment of the present invention, the format of the standard travel feature group set is converted according to the time sequence to obtain a time sequence travel feature curve set, the time sequence travel feature curve set is used to train the preset initial travel model to obtain a travel analysis model, and the time domain traffic data set is used to train the preset initial traffic model to obtain a traffic analysis model. The time sequence relationship model between the passenger characteristics and the passenger's travel data and the time sequence relationship model of the traffic road conditions can be obtained, thereby facilitating the prediction of the subsequent boarding and alighting situations of each passenger and the road conditions at the station, and facilitating traffic scheduling.
[0166] S4. Acquire real-time demand data, extract real-time passenger data and real-time traffic data from the real-time demand data, use the travel analysis model to analyze the predicted passenger data corresponding to the real-time passenger data, and use the traffic analysis model to analyze the predicted traffic data corresponding to the real-time traffic data.
[0167] In an embodiment of the present invention, the real-time demand data refers to the travel data of passengers on the vehicle collected in real time, as well as real-time traffic congestion, number of people at stations and other data; the real-time passenger data refers to the real-time data information about traffic recorded by the public transportation system in the passenger's mobile phone application and the public transportation vehicle system; the real-time passenger data includes the location information of each passenger before and after taking public transportation and the corresponding location timestamp, the passenger's age, gender, occupation, payment method and seat selection, etc.; the real-time passenger data corresponds to the historical passenger data; the real-time traffic data corresponds to the historical traffic data; the real-time traffic data refers to the congestion level of the route and the number of passengers at each station in the current time period recorded by the public transportation vehicle.
[0168] In an embodiment of the present invention, the method of extracting real-time passenger data and real-time traffic data from the real-time demand data is consistent with the method of extracting historical passenger data and historical traffic data from the standard buried point data respectively in the above step S1, and will not be repeated here.
[0169] In detail, the step of analyzing the predicted passenger data corresponding to the real-time passenger data using the travel analysis model includes:
[0170] generating a real-time travel characteristic curve according to the real-time passenger data;
[0171] Analyzing a predicted travel characteristic curve corresponding to the real-time travel characteristic curve using the travel analysis model;
[0172] Performing format transcoding on the predicted travel characteristic curve to obtain a predicted travel characteristic group;
[0173] The predicted travel feature group is feature decoded to obtain predicted passenger data.
[0174] Among them, the method of format transcoding the predicted travel characteristic curve to obtain the predicted travel characteristic group is the inverse step of the above-mentioned step S3 method, which will not be repeated here. The method of feature decoding the predicted travel characteristic group to obtain predicted passenger data is the inverse step of the above-mentioned step S2 method, which will not be repeated here.
[0175] In an embodiment of the present invention, by acquiring real-time demand data, extracting real-time passenger data and real-time traffic data from the real-time demand data, using the travel analysis model to analyze predicted passenger data corresponding to the real-time passenger data, and using the traffic analysis model to analyze predicted traffic data corresponding to the real-time traffic data, it is possible to predict the transfer or boarding and alighting situations of passengers on the vehicle in future time periods, and predict traffic congestion and the number of people at stations on each route in the region in future time periods, thereby facilitating the scheduling of public transportation.
[0176] S5. Perform route planning on a preset traffic map to obtain a traffic route set, calculate a passenger delay set corresponding to the traffic route set using the predicted passenger data and the predicted traffic data, match a target traffic route from the traffic route set using the passenger delay set, and perform traffic scheduling according to the target traffic route.
[0177] In an embodiment of the present invention, the traffic map refers to a site map of public transportation, the traffic route set refers to a collection of travel routes that public transportation vehicles may take in a future time period, and the travel route refers to a route that vehicles connecting various public transportation sites can pass through; a site topology map of the traffic map can be generated using a topological network, and a depth-first algorithm or a breadth-first algorithm can be used to extract the traffic route set corresponding to the site topology map.
[0178] In the embodiment of the present invention, the step of calculating the passenger delay set corresponding to the traffic route set by using the predicted passenger data and the predicted traffic data includes:
[0179] Selecting traffic routes in the traffic route set one by one as initial traffic routes, and extracting the congestion coefficient and route length corresponding to each station in the initial traffic route from the predicted traffic data;
[0180] All route lengths are sequentially aggregated into a route length set, and all congestion coefficients are sequentially aggregated into a congestion coefficient set;
[0181] Splitting the predicted passenger data into predicted single passenger data sets according to passenger IDs;
[0182] Selecting predicted single passenger data in the predicted single passenger data set one by one as target predicted single passenger data, and extracting a predicted positioning timestamp from the target predicted single passenger data;
[0183] Performing site matching on the predicted positioning timestamp to obtain predicted outbound sites, and aggregating all predicted outbound sites into an outbound site set;
[0184] The target passenger delay corresponding to the initial traffic route is calculated using the following passenger delay formula according to the route length set, the congestion coefficient set and the exit station set, and all target passenger delays are aggregated into a passenger delay set:
[0185]
[0186] Wherein, L refers to the target passenger delay, M refers to the total number of elements in the exit station set, n refers to the station sequence number, N refers to the total number of elements in the congestion coefficient set, and the total number of elements in the congestion coefficient set is equal to the total number of elements in the route length set, and K n refers to the nth route length in the route length set, v refers to the preset driving speed, e n refers to the nth congestion coefficient in the congestion coefficient set, θ is the preset waiting time at the station, and m n It refers to the statistical number of sites corresponding to the nth congestion coefficient in the congestion coefficient set in the exit site set.
[0187] In an embodiment of the present invention, the congestion coefficient is a coefficient used to measure the congestion degree of a route, and the route length refers to the total length of a route. By using the passenger delay formula to calculate the target passenger delay corresponding to the target traffic route according to the route length set, the congestion coefficient set and the exit site set, the average waiting time of all passengers on the vehicle before getting off can be calculated, thereby measuring the scheduling efficiency of public transportation.
[0188] Specifically, using the passenger delay set to match a target traffic route from the traffic route set means selecting the passenger delay with the smallest value in the passenger delay set as the extreme passenger delay, and taking the traffic route corresponding to the extreme passenger delay in the traffic route set as the target traffic route.
[0189] In an embodiment of the present invention, a traffic route set is obtained by performing route planning on a preset traffic map, and a passenger delay set corresponding to the traffic route set is calculated using the predicted passenger data and the predicted traffic data. A target traffic route is matched from the traffic route set using the passenger delay set, and traffic scheduling is performed according to the target traffic route. The traffic route with the shortest average waiting time can be selected for public scheduling, thereby improving the scheduling efficiency of public transportation.
[0190] The present invention cleans the pre-acquired historical buried data into standard buried data, extracts historical passenger data and historical traffic data from the standard buried data respectively, splits the historical traffic data into a time domain traffic data set according to the time domain, and splits the historical passenger data into a single passenger data set according to the passenger ID, so as to improve the accuracy of the data and facilitate the subsequent prediction of passenger behavior and traffic conditions. By selecting the single passenger data in the single passenger data set as the target single passenger data one by one, and extracting the target travel feature group from the target single passenger data according to the time sequence, the riding habits of each passenger can be characterized, so as to facilitate the grasp of the user portrait of the passenger. By performing feature clustering and The feature mapping operation can obtain a standard travel feature set, which can reduce the number of feature types, improve the efficiency of subsequent model training, and facilitate the extraction of common features among different passengers. By converting the format of the standard travel feature set according to the time sequence, a time sequence travel feature curve set is obtained, and the preset initial travel model is trained using the time sequence travel feature curve set to obtain a travel analysis model. The preset initial traffic model is trained using the time domain traffic data set to obtain a traffic analysis model. The time sequence relationship model between passenger characteristics and passenger travel data and the time sequence relationship model of traffic conditions can be obtained, thereby facilitating the prediction of subsequent boarding and alighting conditions of each passenger and road conditions at the station, and facilitating traffic scheduling.
[0191] By acquiring real-time demand data, extracting real-time passenger data and real-time traffic data from the real-time demand data, using the travel analysis model to analyze the predicted passenger data corresponding to the real-time passenger data, and using the traffic analysis model to analyze the predicted traffic data corresponding to the real-time traffic data, it is possible to predict the transfer or boarding and alighting of passengers on the bus in the future time period, and predict the traffic congestion and the number of people at stations on each route in the region in the future time period, so as to facilitate the scheduling of public transportation, and by planning the route on the preset traffic map, a traffic route set is obtained, and the predicted passenger data and the predicted traffic data are used to calculate the passenger delay set corresponding to the traffic route set, and the passenger delay set is used to match the target traffic route from the traffic route set, and traffic scheduling is performed according to the target traffic route, so that the traffic route with the shortest average waiting time can be selected for public scheduling, thereby improving the scheduling efficiency of public transportation. Therefore, the public transportation scheduling method based on demand response proposed in the present invention can solve the problem of low efficiency in public transportation scheduling.
[0192] like Figure 4 , which is a functional module diagram of a public transportation scheduling system based on demand response provided by an embodiment of the present invention.
[0193] The public transportation dispatching system 100 based on demand response of the present invention can be installed in an electronic device. According to the functions implemented, the public transportation dispatching system 100 based on demand response can include a data splitting module 101, a feature clustering module 102, a model training module 103, a traffic prediction module 104 and a path planning module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0194] In this embodiment, the functions of each module / unit are as follows:
[0195] The data splitting module 101 is used to clean the pre-acquired historical buried point data into standard buried point data, extract historical passenger data and historical traffic data from the standard buried point data, split the historical traffic data into time domain traffic data sets according to the time domain, and split the historical passenger data into single passenger data sets according to the passenger ID;
[0196] The feature clustering module 102 is used to select the single passenger data in the single passenger data set as the target single passenger data one by one, extract the target travel feature group from the target single passenger data in time sequence, perform feature clustering and feature mapping operations on all the target travel feature groups in turn to obtain a standard travel feature group set, wherein the feature clustering and feature mapping operations are performed on all the target travel feature groups in turn to obtain a standard travel feature group set, including: aggregating all the target travel feature groups into a travel feature group set, splitting all the travel features in the travel feature group set into multiple primary travel feature groups, and randomly selecting a primary travel center feature for each primary travel feature group; and calculating the travel feature distance between each primary travel center feature and each travel feature using the following travel feature distance algorithm:
[0197]
[0198] Wherein, D refers to the travel feature distance, α is the preset adversarial coefficient, · is the dot product symbol, * is the cross product symbol, p refers to the travel feature, q refers to the primary travel center feature, T is the transposition symbol, cov() is the covariance symbol, cov(p,p) refers to the covariance of the travel feature, cov(p,q) refers to the covariance between the travel feature and the primary travel center feature, cov(q,p) refers to the covariance between the primary travel center feature and the travel feature, and cov(q,q) refers to the covariance of the primary travel center feature; all travel features are regrouped according to the travel feature distance to obtain multiple secondary travel feature groups; the secondary travel center features corresponding to each secondary travel feature group are calculated, and the center feature distance between each secondary travel center feature and the corresponding primary travel center feature is calculated; each secondary travel feature group is iteratively updated into a travel feature class according to all the center feature distances, and each travel feature in the travel feature group set is mapped according to the cluster center of each travel feature class to obtain a standard travel feature group set;
[0199] The model training module 103 is used to convert the format of the standard travel feature set according to the time sequence to obtain a time sequence travel feature curve set, use the time sequence travel feature curve set to train a preset initial travel model to obtain a travel analysis model, and use the time domain traffic data set to train the preset initial traffic model to obtain a traffic analysis model;
[0200] The traffic prediction module 104 is used to obtain real-time demand data, extract real-time passenger data and real-time traffic data from the real-time demand data, analyze predicted passenger data corresponding to the real-time passenger data using the travel analysis model, and analyze predicted traffic data corresponding to the real-time traffic data using the traffic analysis model;
[0201] The path planning module 105 is used to plan a route for a preset traffic map to obtain a traffic route set, calculate a passenger delay set corresponding to the traffic route set using the predicted passenger data and the predicted traffic data, match a target traffic route from the traffic route set using the passenger delay set, and perform traffic scheduling according to the target traffic route.
[0202] In detail, each module described in the public transportation dispatching system 100 based on demand response in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The technical means are the same as the public transportation scheduling method based on demand response described in, and can produce the same technical effects, so they will not be repeated here.
[0203] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0204] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0206] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0207] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0208] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0209] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or systems stated in the system embodiment can also be implemented by one unit or system through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A public transportation scheduling method based on demand response, characterized in that: The method comprises: S1: Clean the pre-acquired historical buried point data into standard buried point data, extract historical passenger data and historical traffic data from the standard buried point data respectively, split the historical traffic data into time domain traffic data sets according to the time domain, and split the historical passenger data into single passenger data sets according to the passenger ID; S2: Selecting the single passenger data in the single passenger data set one by one as the target single passenger data, extracting the target travel feature group from the target single passenger data in time sequence, and performing feature clustering and feature mapping operations on all the target travel feature groups in turn to obtain a standard travel feature group set, wherein the performing feature clustering and feature mapping operations on all the target travel feature groups in turn to obtain the standard travel feature group set includes: S21: Gather all target travel feature groups into a travel feature group set, split all travel features in the travel feature group set into multiple primary travel feature groups, and randomly select primary travel center features for each primary travel feature group; S22: Calculate the travel characteristic distance between each primary travel center feature and each travel feature using the following travel characteristic distance algorithm: Wherein, D refers to the travel feature distance, α is the preset adversarial coefficient, · is the dot product symbol, * is the cross product symbol, p refers to the travel feature, q refers to the primary travel center feature, T is the transposition symbol, cov() is the covariance symbol, cov(p,p) refers to the covariance of the travel feature, cov(p,q) refers to the covariance between the travel feature and the primary travel center feature, cov(q,p) refers to the covariance between the primary travel center feature and the travel feature, and cov(q,q) refers to the covariance of the primary travel center feature; S23: regrouping all travel characteristics according to the travel characteristic distance to obtain multiple secondary travel characteristic groups; S24: calculating the secondary travel center feature corresponding to each secondary travel feature group, and calculating the center feature distance between each secondary travel center feature and the corresponding primary travel center feature; S25: iteratively updating each secondary travel feature group into a travel feature class according to all center feature distances, and mapping each travel feature in the travel feature group set according to the cluster center of each travel feature class to obtain a standard travel feature group set; S3: converting the format of the standard travel feature set according to the time sequence to obtain a time sequence travel feature curve set, using the time sequence travel feature curve set to train a preset initial travel model to obtain a travel analysis model, and using the time domain traffic data set to train the preset initial traffic model to obtain a traffic analysis model; S4: acquiring real-time demand data, extracting real-time passenger data and real-time traffic data from the real-time demand data, analyzing predicted passenger data corresponding to the real-time passenger data using the travel analysis model, and analyzing predicted traffic data corresponding to the real-time traffic data using the traffic analysis model; S5: Perform route planning on a preset traffic map to obtain a traffic route set, calculate a passenger delay set corresponding to the traffic route set using the predicted passenger data and the predicted traffic data, match a target traffic route from the traffic route set using the passenger delay set, and perform traffic scheduling according to the target traffic route.
2. The public transportation scheduling method based on demand response according to claim 1, characterized in that: The step of cleaning the pre-acquired historical tracking data into standard tracking data includes: The historical buried point data are sequentially subjected to time format unification, location format unification, and map format unification operations to obtain formatted buried point data; Screening out duplicate buried point data from the buried point data in the format to obtain deduplicated buried point data; Screening out abnormal buried point data from the deduplicated buried point data according to data types to obtain deduplicated buried point data; The missing buried point data is extracted from the de-identified buried point data, and the missing buried point data is filled with data to obtain standard buried point data.
3. The public transportation scheduling method based on demand response according to claim 1, characterized in that: The step of extracting a target travel feature group from the target single passenger data in time sequence includes: Extracting the passenger age, passenger gender, passenger occupation, payment method and location timestamp data from the target single passenger data in sequence; Arrange the location timestamp data in time sequence to obtain a target time series data sequence; Splitting the target time series data sequence into time series data sequence groups according to a preset time domain period; Performing a site matching operation on the time series data sequence group to obtain a time series site sequence group; Performing a seat matching operation on the time series data sequence group to obtain a time series seat sequence group; Extracting seat distribution ratios from the time-series seat sequence group, and transcoding the time-series site sequence group into a site feature group; The site feature group is fused using the passenger age, the passenger gender, the passenger occupation, the payment method and the seat distribution ratio to obtain a target travel feature group.
4. The public transportation scheduling method based on demand response according to claim 1, characterized in that: The format conversion of the standard travel characteristic set according to the time sequence to obtain the time sequence travel characteristic curve set includes: Selecting standard travel feature groups in the standard travel feature group set one by one as target standard travel feature groups, arranging the target standard travel feature groups in time sequence, and obtaining a target travel feature sequence; Extracting a station feature sequence, a passenger age feature sequence, a passenger gender feature sequence, a passenger occupation feature sequence, a payment method feature sequence, and a seat distribution ratio feature sequence from the target travel feature sequence; The site feature sequence is used as the dependent variable, and the passenger age feature sequence, the passenger gender feature sequence, the passenger occupation feature sequence, the payment method feature sequence and the seat distribution ratio feature sequence are used as independent variables to generate a time series travel feature curve, and all the time series travel feature curves are collected into a time series travel feature curve set.
5. The public transportation scheduling method based on demand response according to claim 1, characterized in that: The method of using the time series travel characteristic curve set to train a preset initial travel model to obtain a travel analysis model includes: Selecting time-series travel characteristic curves in the time-series travel characteristic curve set one by one as target travel characteristic curves, and using a preset time domain sliding window to collect part of the target travel characteristic curves section by section as target characteristic curve segments; The short-term reset feature and the short-term memory feature corresponding to the target characteristic curve segment are calculated respectively by using the recursive convolution gate of the preset initial travel model; The short-term travel time sequence characteristic corresponding to the target characteristic curve segment is calculated according to the short-term reset characteristic and the short-term memory characteristic using the following short-term travel time sequence characteristic formula: Among them, h t refers to the short-term travel time series characteristics at the tth moment, u t refers to the short-term reset characteristic at time t, is the element-wise product, h t-1 is the short-term travel time series characteristic at time t-1, c t refers to the short-term memory characteristics at time t; Using the jump convolution gate of the initial travel model, respectively calculate the long-term reset feature and the long-term memory feature corresponding to the target characteristic curve segment; The long-term travel time series feature corresponding to the target characteristic curve segment is calculated according to the long-term reset feature and the long-term memory feature using the following long-term travel time series feature formula: in, refers to the long-term travel time series characteristics at time t, refers to the long-term reset characteristic at time t, is the element-wise product, is the long-term travel time series feature at the trth moment, r refers to the number of hidden units skipped in the skip convolution gate, refers to the long-term memory characteristics at time t; The short-term travel timing characteristics and the long-term travel timing characteristics are integrated into a standard travel timing characteristics, and the standard travel timing characteristics are used to generate a target analysis characteristic curve segment; The model parameters of the initial travel model are iteratively updated using the time-series travel characteristic curve set and all target analysis characteristic curve segments to obtain a travel analysis model.
6. The public transportation scheduling method based on demand response according to claim 5, characterized in that: The method of iteratively updating the model parameters of the initial travel model by using the time series travel characteristic curve set and all target analysis characteristic curve segments to obtain a travel analysis model includes: Selecting curve segments corresponding to the target analysis characteristic curve segments from the time series travel characteristic curve set one by one as target historical characteristic curve segments; All target historical characteristic curve segments are aggregated into a historical characteristic curve segment set, and all target analysis characteristic curve segments are aggregated into an analysis characteristic curve segment set; Calculating the loss value corresponding to the initial travel model according to the historical characteristic curve segment set and the analysis characteristic curve segment set; Determining whether the loss value is greater than a preset loss threshold; If yes, iteratively update the model parameters of the initial travel model according to the loss value, and return to the step of using the recursive convolution gate of the preset initial travel model to respectively calculate the short-term reset feature and the short-term memory feature corresponding to the target characteristic curve segment; If not, the updated initial travel model is used as the travel analysis model.
7. The public transportation scheduling method based on demand response according to claim 1, characterized in that: The method of using the time domain traffic data set to train a preset initial traffic model to obtain a traffic analysis model includes: Arranging the time-domain traffic data set in time sequence to obtain a time-domain traffic data sequence; Sequentially performing position transcoding and format transcoding on the time-domain traffic data sequence to obtain a traffic code sequence; Sliding acquisition is performed on the traffic code sequence according to a preset traffic time domain window to obtain a traffic code sequence segment set, and traffic code sequence segments in the traffic code sequence segment set are selected one by one as target traffic sequence segments; The short-term traffic features and the long-term traffic features of the target traffic sequence segment are extracted respectively by using a preset initial traffic model, and the self-attention traffic features of the target traffic sequence segment are extracted by using a self-attention mechanism; The short-term traffic feature, the long-term traffic feature and the self-attention traffic feature are integrated into a time-series traffic feature, and feature decoding is performed on the time-series traffic feature to obtain a target analysis traffic segment; The initial traffic model is trained according to all target traffic sequence segments and all target analysis traffic segments to obtain a traffic analysis model.
8. The public transportation scheduling method based on demand response according to claim 1, characterized in that: The step of analyzing predicted passenger data corresponding to the real-time passenger data using the travel analysis model includes: generating a real-time travel characteristic curve according to the real-time passenger data; Analyzing a predicted travel characteristic curve corresponding to the real-time travel characteristic curve using the travel analysis model; Performing format transcoding on the predicted travel characteristic curve to obtain a predicted travel characteristic group; The predicted travel feature group is feature decoded to obtain predicted passenger data.
9. The public transportation scheduling method based on demand response according to claim 1, characterized in that: The step of calculating a set of passenger delays corresponding to the traffic route set by using the predicted passenger data and the predicted traffic data includes: Selecting traffic routes in the traffic route set one by one as initial traffic routes, and extracting the congestion coefficient and route length corresponding to each station in the initial traffic route from the predicted traffic data; All route lengths are sequentially aggregated into a route length set, and all congestion coefficients are sequentially aggregated into a congestion coefficient set; Splitting the predicted passenger data into predicted single passenger data sets according to passenger IDs; Selecting predicted single passenger data in the predicted single passenger data set one by one as target predicted single passenger data, and extracting a predicted positioning timestamp from the target predicted single passenger data; Performing site matching on the predicted positioning timestamp to obtain predicted outbound sites, and aggregating all predicted outbound sites into an outbound site set; The target passenger delay corresponding to the initial traffic route is calculated using the following passenger delay formula according to the route length set, the congestion coefficient set and the exit station set, and all target passenger delays are aggregated into a passenger delay set: Wherein, L refers to the target passenger delay, M refers to the total number of elements in the exit station set, n refers to the station sequence number, N refers to the total number of elements in the congestion coefficient set, and the total number of elements in the congestion coefficient set is equal to the total number of elements in the route length set, and K n refers to the nth route length in the route length set, v refers to the preset driving speed, e n refers to the nth congestion coefficient in the congestion coefficient set, θ is the preset waiting time at the station, and m n It refers to the statistical number of sites corresponding to the nth congestion coefficient in the congestion coefficient set in the exit site set.
10. A public transportation dispatching system based on demand response, characterized in that: The system comprises: A data splitting module is used to clean the pre-acquired historical buried point data into standard buried point data, extract historical passenger data and historical traffic data from the standard buried point data, split the historical traffic data into time domain traffic data sets according to the time domain, and split the historical passenger data into single passenger data sets according to the passenger ID; A feature clustering module is used to select single passenger data in the single passenger data set as target single passenger data one by one, extract target travel feature groups from the target single passenger data in time sequence, perform feature clustering and feature mapping operations on all target travel feature groups in turn to obtain a standard travel feature group set, wherein the step of performing feature clustering and feature mapping operations on all target travel feature groups in turn to obtain a standard travel feature group set includes: aggregating all target travel feature groups into a travel feature group set, splitting all travel features in the travel feature group set into multiple primary travel feature groups, and randomly selecting primary travel center features for each primary travel feature group; and calculating the travel feature distance between each primary travel center feature and each travel feature using the following travel feature distance algorithm: Wherein, D refers to the travel feature distance, α is the preset adversarial coefficient, · is the dot product symbol, * is the cross product symbol, p refers to the travel feature, q refers to the primary travel center feature, T is the transposition symbol, cov() is the covariance symbol, cov(p,p) refers to the covariance of the travel feature, cov(p,q) refers to the covariance between the travel feature and the primary travel center feature, cov(q,p) refers to the covariance between the primary travel center feature and the travel feature, and cov(q,q) refers to the covariance of the primary travel center feature; all travel features are regrouped according to the travel feature distance to obtain multiple secondary travel feature groups; the secondary travel center features corresponding to each secondary travel feature group are calculated, and the center feature distance between each secondary travel center feature and the corresponding primary travel center feature is calculated; each secondary travel feature group is iteratively updated into a travel feature class according to all the center feature distances, and each travel feature in the travel feature group set is mapped according to the cluster center of each travel feature class to obtain a standard travel feature group set; A model training module, used to convert the format of the standard travel feature set according to time sequence to obtain a time sequence travel feature curve set, train a preset initial travel model using the time sequence travel feature curve set to obtain a travel analysis model, and train a preset initial traffic model using the time domain traffic data set to obtain a traffic analysis model; A traffic prediction module, used to obtain real-time demand data, extract real-time passenger data and real-time traffic data from the real-time demand data, analyze predicted passenger data corresponding to the real-time passenger data using the travel analysis model, and analyze predicted traffic data corresponding to the real-time traffic data using the traffic analysis model; The path planning module is used to plan the route for the preset traffic map to obtain a traffic route set, calculate the passenger delay set corresponding to the traffic route set using the predicted passenger data and the predicted traffic data, match the target traffic route from the traffic route set using the passenger delay set, and perform traffic scheduling according to the target traffic route.
