Urban public service demand prediction method and system based on machine learning and data mining
Through machine learning and data mining technology, combined with multi-data source and spatiotemporal analysis, the problem that traditional prediction methods are difficult to consider dynamic factors is solved, and a more accurate and adaptable urban public transportation passenger forecast is achieved.
Patent Information
- Application Number
- CN202411288378.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-09-14
AI Technical Summary
Traditional urban public transportation passenger volume prediction methods are difficult to fully consider dynamic factors, such as changes in population mobility, weather conditions and diversity of passenger behavior patterns, resulting in limited prediction accuracy.
Using machine learning and data mining methods, pre-processing is performed by obtaining multiple data source data (traffic-related data, bus GPS positioning data, bus service comment data and government open data), dynamically adjusting data weights, and automatically discovering features. A composite prediction model (including graph attention network and variational autoencoder) is constructed, and prediction correction is performed using space-time cube analysis.
It improves the accuracy and adaptability of passenger volume forecasts, can better consider complex environmental changes and emergencies, and provides more accurate suggestions for the allocation of public transportation resources and service optimization.
Smart Images

Figure CN118798449B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of data processing, and in particular to a method and system for predicting urban public service demand based on machine learning and data mining. Background Art
[0002] With the acceleration of urbanization, urban public service systems are facing growing demands and challenges. Especially in the field of public transportation, efficient and accurate prediction of bus line passenger volume is crucial for optimizing resource allocation, improving service quality, and alleviating traffic congestion. Traditional prediction methods are mostly based on static models and limited historical data, which makes it difficult to fully consider the impact of many dynamic factors, such as changes in population mobility, weather conditions, special events (such as holidays, large-scale events), and the diversity of passenger behavior patterns, resulting in limited prediction accuracy. Summary of the invention
[0003] The embodiments of the present application provide a method and system for predicting urban public service demand based on machine learning and data mining, so as to solve the problems existing in the above-mentioned background technology.
[0004] In a first aspect, an embodiment of the present application provides a method for predicting urban public service demand based on machine learning and data mining, comprising: obtaining multiple data source data of a city to be predicted, and preprocessing the multiple data source data to obtain multiple preprocessed data source data, wherein the multiple data source data include: traffic-related data, bus GPS positioning data, bus service review data and government open data, and the preprocessing includes: processing missing values, removing outliers and data standardization; using an adaptive dynamic algorithm to match corresponding weight values for the preprocessed multiple data source data; constructing a feature set based on an automatic feature discovery mechanism, the preprocessed multiple data source data and the weight values; training a composite prediction model based on the feature set and the weight values corresponding to the feature set to obtain a trained composite prediction model, wherein the composite prediction model is a model constructed based on a machine learning model, a graph attention network and a variational autoencoder; using the trained composite prediction model to predict the passenger volume of a bus line to obtain an initial prediction result, and using the spatiotemporal cube analysis and prediction correction mechanism to correct the initial prediction result to obtain a corrected prediction result.
[0005] Furthermore, the traffic-related data at least includes: historical passenger volume records, bus route information, demographic data and holiday schedules; the government open data at least includes: urban traffic flow data and major event schedules.
[0006] Furthermore, the expression of the adaptive dynamic algorithm is:
[0007] ;in, For the current time point The corresponding The weight of the data source, For the The correlation score between the data source and the current prediction target, For the The reliability index of the data source, is the time decay factor, For the The last update time of the data source. For the The time when the data source was last updated.
[0008] Furthermore, based on the automatic feature discovery mechanism, the preprocessed data from multiple data sources and the weight values, a feature set is constructed, including: based on the preprocessed data from multiple data sources, a feature pool is constructed, wherein the feature pool contains multiple feature combinations; the feature combinations are encoded into chromosomes, wherein each gene in the chromosome indicates whether a feature is selected; based on the chromosomes, a preset fitness function, a genetic algorithm and the weight values, a feature set is determined.
[0009] Furthermore, the initial prediction result is corrected by using a space-time cube analysis and prediction correction mechanism to obtain a corrected prediction result, including: constructing a space-time cube based on the preprocessed data from multiple data sources, wherein the space-time cube contains multiple cube units, and the multiple cube units represent the passenger volume or related characteristic values corresponding to each time point and each location; determining a compensation value of the initial prediction result by using the space-time cube technology and the space-time cube; and determining the corrected prediction result based on the compensation value and the initial prediction result.
[0010] Furthermore, the compensation value of the initial prediction result is determined by utilizing the space-time cube technology and the space-time cube, including: determining the space-time pattern within each cube unit based on the space-time cube technology and the space-time cube, and determining the first compensation value of each space-time cube based on the space-time pattern; determining the second compensation value of each space-time cube based on the local area development trend analysis algorithm and the space-time cube; and determining the third compensation value of each space-time cube based on the event impact analysis algorithm and the space-time cube.
[0011] In a second aspect, an embodiment of the present application provides a city public service demand prediction system based on machine learning and data mining, including: a preprocessing unit, used to obtain multiple data source data of a city to be predicted, and preprocess the multiple data source data to obtain multiple preprocessed data source data, wherein the multiple data source data include: traffic-related data, bus GPS positioning data, bus service review data and government open data, and the preprocessing includes: processing missing values, removing outliers and data standardization; a matching unit, used to use an adaptive dynamic algorithm to match corresponding weight values for the preprocessed multiple data source data; construct a single A unit is used to construct a feature set based on an automatic feature discovery mechanism, the preprocessed data from multiple data sources and the weight values; a training unit is used to train a composite prediction model based on the feature set and the weight values corresponding to the feature set to obtain a trained composite prediction model, wherein the composite prediction model is a model constructed based on a machine learning model, a graph attention network and a variational autoencoder; a prediction unit is used to predict the passenger volume of a bus line using the trained composite prediction model to obtain an initial prediction result, and to correct the initial prediction result using a spatiotemporal cube analysis and prediction correction mechanism to obtain a corrected prediction result.
[0012] In a third aspect, an embodiment of the present application provides a computing device, including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the method described in the first aspect above.
[0013] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program, which, when executed by a computer, implements the method described in the first aspect above.
[0014] In the embodiments of the present invention, by fully integrating multiple data sources, dynamically adjusting data weights to adapt to different scenarios, automatically discovering key features, combining advanced machine learning models and deep learning technologies, and using spatiotemporal analysis methods to make accurate predictions and correct results, the high standards required for modern urban public service demand forecasting can be met.
[0015] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 A flowchart of a method for predicting urban public service demand based on machine learning and data mining provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a system for predicting urban public service demand based on machine learning and data mining provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] Embodiment 1:
[0022] According to an embodiment of the present invention, an embodiment of a method for predicting urban public service demand based on machine learning and data mining is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0023] Figure 1 is a flow chart of a method for predicting urban public service demand based on machine learning and data mining according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0024] Step S102, obtaining multiple data source data of the city to be predicted, and preprocessing the multiple data source data to obtain multiple data source data after preprocessing, wherein the multiple data source data include: traffic related data, bus GPS positioning data, bus service review data and government open data, and the preprocessing includes: processing missing values, eliminating outliers and data standardization;
[0025] Specifically, transportation-related data includes: historical passenger volume records, bus route information, demographic data, holiday schedules and other data.
[0026] Bus GPS positioning data is used to analyze actual operating speed and arrival delays.
[0027] The bus service review data is user reviews about bus services captured from social platforms, and natural language processing technology is used to analyze public sentiment, such as satisfaction and complaints.
[0028] Government open data includes urban traffic flow data, major event arrangements, etc., which can be obtained from public government databases.
[0029] Step S104, using an adaptive dynamic algorithm to match corresponding weight values for the preprocessed data from the plurality of data sources;
[0030] In the embodiment of the present invention, the expression of the adaptive dynamic algorithm is:
[0031] ;
[0032] in, For the current time point The corresponding The weight of the data source, For the The correlation score between the data source and the current prediction target, For the The reliability index of the data source, is the time decay factor, For the The last update time of the data source. For the The time when the data source was last updated.
[0033] In addition, it should be noted that The time decay factor is a factor that determines the timeliness of predictions. As data changes over time, its value may gradually decrease, especially in a rapidly changing environment. The introduction of the time decay factor allows the model to prefer the latest and most relevant information, ensuring the timeliness of the prediction.
[0034] When certain data sources are given higher weights due to their high timeliness and relevance, the weights of other data sources will be adjusted accordingly, reflecting the changes in the relative importance of data sources in the prediction model.
[0035] This improved weight assignment method takes into account the multiple dimensions that affect the weight of data sources in a more detailed manner, aiming to further improve the accuracy and adaptability of model predictions.
[0036] For example, during a specific time period (such as the morning and evening rush hours on weekdays), negative sentiment about bus delays on social media surges, while bus GPS positioning data shows that the actual operating speed of some routes has dropped significantly. At this time, the adaptive algorithm will automatically increase the weight of social media sentiment analysis and bus GPS positioning data, because these data can better reflect the current special situation, and relatively reduce the weight of historical data, because historical data may not fully reflect this temporary change. Through such dynamic adjustments, the prediction model can more accurately consider immediate factors and improve the comprehensiveness and accuracy of the prediction.
[0037] Heterogeneous data fusion can comprehensively reflect the demand status of urban public transportation from multiple perspectives. A single data source is often insufficient to capture all influencing factors.
[0038] The adaptive algorithm dynamically adjusts data weights to ensure that the model can be adjusted in a timely manner according to changes in the current environment, improving the adaptability and prediction effect of the model, which is especially important when facing emergencies or seasonal changes.
[0039] Step S106, constructing a feature set based on the automatic feature discovery mechanism, the preprocessed data from multiple data sources and the weight value;
[0040] Step S108, training the composite prediction model based on the feature set and the weight value corresponding to the feature set to obtain a trained composite prediction model, wherein the composite prediction model is a model constructed based on the machine learning model, the graph attention network and the variational autoencoder;
[0041] Step S110, using the trained composite prediction model to predict the passenger volume of the bus line to obtain an initial prediction result, and using the space-time cube analysis and prediction correction mechanism to correct the initial prediction result to obtain a corrected prediction result.
[0042] In an embodiment of the present invention, a feature set is constructed based on the automatic feature discovery mechanism, the preprocessed data from multiple data sources and the weight value, including:
[0043] Based on the preprocessed data from multiple data sources, a feature pool is constructed, wherein the feature pool contains multiple feature combinations;
[0044] Encoding the feature combination into a chromosome, wherein each gene in the chromosome indicates whether a feature is selected;
[0045] A feature set is determined based on the chromosome, a preset fitness function, a genetic algorithm and the weight value.
[0046] In an embodiment of the present invention, a feature pool containing multiple feature combinations is constructed using preprocessed data from multiple data sources. The feature pool includes but is not limited to the following feature data: historical passenger volume (average daily passenger volume in the past week / month), line length, number of stations, weekday / weekend identification, weather type (sunny, rainy, snowy, etc.), average temperature, special events (such as large exhibitions, school holidays) and social media mentions (as an interest indicator).
[0047] Encode the feature combination as a chromosome, for example, using a binary string where each gene bit represents whether a feature is selected.
[0048] Then, the genetic algorithm and the preset fitness function are used to iterate the chromosomes to obtain the feature set.
[0049] Specifically, according to the fitness function, a roulette wheel selection method or other method is used to select the feature combination of the "parent generation", two "parent generations" are randomly selected, and some of their features are exchanged to generate "offspring". The selection state of certain features in the "offspring" is randomly changed with a certain probability, and the fitness value of the newly generated "offspring" is calculated. The best performing feature combination is retained, and the above steps are repeated until a predetermined number of iterations is reached or a stopping condition is met.
[0050] Eventually, after multiple generations of evolution, the genetic algorithm converges to an optimal set of features, which are automatically selected to build the final ridership prediction model.
[0051] It should be noted that the above fitness function is:
[0052] ;
[0053] in, For feature combination The fitness function value of Indicates the combination of The root mean square error on the validation set after training the model.
[0054] The automatic feature discovery mechanism can dynamically adapt to changes in the data set, especially when new influencing factors emerge, without the need to manually adjust the feature set, thus improving the adaptability and generalization ability of the model.
[0055] By simulating the natural selection process, genetic algorithms can efficiently search for optimal or near-optimal feature combinations in large-scale feature spaces, reducing the burden of artificial feature engineering.
[0056] By dynamically optimizing feature combinations and eliminating irrelevant or redundant features, the model is ensured to learn based on the most critical information, thereby improving the accuracy and stability of predictions.
[0057] Through this embodiment, the application of dynamic feature discovery and adaptive selection algorithm in bus route passenger volume prediction not only improves the efficiency of building the prediction model, but also ensures that the model can better adapt to the complex and changeable real environment.
[0058] In an embodiment of the present invention, based on the feature set and the weight value corresponding to the feature set, the composite prediction model is trained to obtain a trained composite prediction model, including:
[0059] Using the variational autoencoder, performing unsupervised feature learning on the feature set to obtain low-dimensional feature data;
[0060] Using the graph attention network and the feature set, constructing a feature vector;
[0061] The machine learning model is trained using the low-dimensional feature data and the feature vector to obtain the trained composite prediction model.
[0062] In an embodiment of the present invention, the passenger volume of a bus route is predicted by a composite model based on a machine learning model, a graph attention network, and a model constructed by a variational autoencoder. The specific process is as follows:
[0063] First, VAE (Variational Autoencoder) is used to perform unsupervised feature learning on passenger volume and other continuous variables to capture potential low-dimensional representations (i.e., low-dimensional feature data). VAE learns the low-dimensional probability distribution of high-dimensional input data (i.e., feature set) through the encoder, and then reconstructs the original data through the decoder, while encouraging the encoded distribution to be close to the normal distribution, which helps to discover the implicit relationship between passenger volume and other factors.
[0064] The expression of the variational autoencoder is as follows:
[0065] Encoder expression: ;
[0066] Decoder expression: ;
[0067] in, is a latent variable, and are the parameters of the encoder and decoder respectively, and are the mean and variance of the output of the VAE encoding phase, For feature set The corresponding latent variable The posterior distribution of is a Gaussian distribution, Represents latent variables The corresponding feature set Private distribution, Based on latent variables The estimated value of the generated feature set.
[0068] Next, we construct a graph structure of bus routes, where nodes represent routes or stations, and edges represent connections between routes or relationships between stations (such as adjacent stations). We use GAT to capture spatial dependencies. GAT can assign different weights to each node and aggregate information based on the importance of neighboring nodes to obtain a feature vector.
[0069] Specifically, the expression of the eigenvector is:
[0070] ;
[0071] in, Indicates The node in The feature vector of the layer, Representation Node and nodes In between The attention coefficient of the layer is a learnable weight matrix.
[0072] After obtaining low-dimensional feature data and feature vectors, traditional machine learning models such as random forests or gradient boosting trees are used for final prediction.
[0073] The specific training process is as follows:
[0074] The feature set is divided into training set, validation set and test set, the entire composite model is trained, and the overall loss function is optimized.
[0075] Use cross-validation to tune hyperparameters such as the number of layers for GAT, the size of hidden layers for VAE, etc.
[0076] The test set is predicted and the model performance is evaluated, such as MAPE (mean absolute percentage error), RMSE (root mean square error), etc., to obtain a composite prediction model that has completed training.
[0077] In the embodiment of the present invention, the initial prediction result is corrected by using the space-time cube analysis and prediction correction mechanism to obtain a corrected prediction result, including:
[0078] Based on the preprocessed data from multiple data sources, a space-time cube is constructed, wherein the space-time cube contains multiple cube units, and the multiple cube units represent the passenger volume or related characteristic values corresponding to each time point and each location;
[0079] Determining a compensation value of the initial prediction result using the space-time cube technology and the space-time cube;
[0080] The revised prediction result is determined based on the compensation value and the initial prediction result.
[0081] In the embodiment of the present invention, firstly, the pre-processed data from multiple data sources are used to organize the historical passenger volume data, line location information, time series data (such as hourly, daily, and weekly passenger volume), special event information, etc., according to time series and geographic coordinates to form a multidimensional data cube. Each cube unit represents the passenger volume or related feature value at a specific time and place.
[0082] Next, GIS technology is used to analyze the spatiotemporal patterns within each cube unit, such as the fluctuation trend of passenger volume over time, the distribution of passenger volume in a specific area at different time periods, and the passenger flow pattern during holidays or special events. The first compensation value is determined based on the above spatiotemporal patterns. The expression of the first compensation value is as follows:
[0083] ;
[0084] Indicates at time ,Location ,event The predicted passenger volume under the condition For the prediction function, the influence of time, space and events is comprehensively considered.
[0085] Identify areas of rapid development or decline in the city and analyze their potential impact on the passenger volume of bus lines. For example, by comparing recent data with historical data, identify hot spots of passenger volume growth or decline, and then determine the second compensation value. The expression of the second compensation value is as follows:
[0086] ;
[0087] in, For location The change in passenger volume, and Represents the passenger volume at the current location in the current period and in similar periods in the past.
[0088] Next, analyze the impact of special events such as large-scale events and bad weather on passenger volume. Through historical event data, establish an event impact model to quantify the increase or decrease effect of specific events on passenger volume, thereby determining the third compensation value. The expression of the third compensation value is as follows:
[0089] ;
[0090] in, To predict the number of passengers after considering the impact of the incident, is the basic prediction value, It is an event Factors affecting passenger volume.
[0091] Finally, the output of the preliminary forecast model is revised based on the above analysis results. For example, for areas affected by development or time periods affected by specific events, the forecast values are adjusted to make them more consistent with the actual situation.
[0092] ;
[0093] in, is the revised forecast result, is the initial prediction result, The compensation value is obtained by integrating the first compensation value, the second compensation value and the third compensation value.
[0094] The space-time cube technology combined with GIS analysis can examine the various factors that affect passenger volume in more detail in spatial and temporal dimensions, and effectively improve the refinement and accuracy of predictions by analyzing local regional characteristics, event effects, etc.
[0095] The urban environment and people's behavior patterns are constantly changing. Space-time cube analysis can reflect these dynamic changes in a timely manner, enabling the prediction model to quickly adapt to new situations and reduce prediction bias.
[0096] Through fine-grained correction, urban planners and bus operators can obtain more reliable information and provide a scientific basis for decisions such as route adjustment, resource allocation, and emergency response.
[0097] Embodiment 2:
[0098] An embodiment of the present invention also provides an urban public service demand forecasting system based on machine learning and data mining. The urban public service demand forecasting system based on machine learning and data mining is used to execute the urban public service demand forecasting method based on machine learning and data mining provided in the above content of the embodiment of the present invention. The following is a specific introduction to the system provided by the embodiment of the present invention.
[0099] like Figure 2 As shown, Figure 2 This is a schematic diagram of the urban public service demand prediction system based on machine learning and data mining, which includes:
[0100] The preprocessing unit 10 is used to obtain multiple data source data of the city to be predicted, and preprocess the multiple data source data to obtain the preprocessed multiple data source data, wherein the multiple data source data include: traffic related data, bus GPS positioning data, bus service review data and government open data, and the preprocessing includes: processing missing values, eliminating outliers and data standardization processing;
[0101] A matching unit 20, configured to match corresponding weight values for the preprocessed data from the plurality of data sources using an adaptive dynamic algorithm;
[0102] A construction unit 30, configured to construct a feature set based on an automatic feature discovery mechanism, the preprocessed data from multiple data sources and the weight value;
[0103] A training unit 40 is used to train the composite prediction model based on the feature set and the weight value corresponding to the feature set to obtain a trained composite prediction model, wherein the composite prediction model is a model constructed based on a machine learning model, a graph attention network and a variational autoencoder;
[0104] The prediction unit 50 is used to use the trained composite prediction model to predict the passenger volume of the bus line to obtain an initial prediction result, and to correct the initial prediction result using space-time cube analysis and prediction correction mechanism to obtain a corrected prediction result.
[0105] In the embodiments of the present invention, by fully integrating multiple data sources, dynamically adjusting data weights to adapt to different scenarios, automatically discovering key features, combining advanced machine learning models and deep learning technologies, and using spatiotemporal analysis methods to make accurate predictions and correct results, the high standards required for modern urban public service demand forecasting can be met.
[0106] Embodiment three:
[0107] The embodiment of the present invention further provides a computing device for executing a program of the method described in the first embodiment, such as Figure 3 As shown, the computing device may include a storage component 41 and a processing component 42;
[0108] The storage component 41 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 42 .
[0109] The processing component 42 may include one or more processors to execute computer instructions to complete all or part of the steps in the method of embodiment 1. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0110] The storage component 41 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0111] The display component 43 may be an electroluminescent (EL) element, a liquid crystal display or a micro display having a similar structure, or a retinal direct display or a similar laser scanning display.
[0112] Of course, a computing device may also include other components, such as input / output interfaces, communication components, etc.
[0113] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.
[0114] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.
[0115] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0116] Embodiment 4:
[0117] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The method of the illustrated embodiment.
[0118] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0119] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for predicting urban public service demand based on machine learning and data mining, characterized in that: include: Acquire multiple data source data of the city to be predicted, and preprocess the multiple data source data to obtain multiple data source data after preprocessing, wherein the multiple data source data include: traffic-related data, bus GPS positioning data, bus service review data and government open data, and the preprocessing includes: processing missing values, eliminating outliers and data standardization; Using an adaptive dynamic algorithm, matching corresponding weight values for the preprocessed data from the multiple data sources; Constructing a feature set based on the automatic feature discovery mechanism, the preprocessed data from multiple data sources and the weight values; Based on the feature set and the weight values corresponding to the feature set, the composite prediction model is trained to obtain a trained composite prediction model, wherein the composite prediction model is a model constructed based on a machine learning model, a graph attention network, and a variational autoencoder; Using the trained composite prediction model, predicting the passenger volume of the bus line to obtain an initial prediction result, and using the space-time cube analysis and prediction correction mechanism to correct the initial prediction result to obtain a corrected prediction result; Wherein, constructing a feature set based on the automatic feature discovery mechanism, the preprocessed data from multiple data sources and the weight value includes: Based on the preprocessed data from multiple data sources, a feature pool is constructed, wherein the feature pool contains multiple feature combinations; Encoding the feature combination into a chromosome, wherein each gene in the chromosome indicates whether a feature is selected; Determining a feature set based on the chromosome, a preset fitness function, a genetic algorithm and the weight value; The initial prediction result is corrected by using the space-time cube analysis and prediction correction mechanism to obtain the corrected prediction result, including: Based on the preprocessed data from multiple data sources, a space-time cube is constructed, wherein the space-time cube contains multiple cube units, and the multiple cube units represent the passenger volume or related characteristic values corresponding to each time point and each location; Determining a compensation value of the initial prediction result using the space-time cube technology and the space-time cube; Determining the revised prediction result based on the compensation value and the initial prediction result; Wherein, using the space-time cube technology and the space-time cube to determine the compensation value of the initial prediction result includes: Based on the space-time cube technology and the space-time cube, determine the space-time pattern in each cube unit, and based on the space-time pattern, determine a first compensation value of each space-time cube; Determine a second compensation value of each space-time cube based on the local area development trend analysis algorithm and the space-time cube; Determine a third compensation value of each space-time cube based on the event impact analysis algorithm and the space-time cube; The expression of the adaptive dynamic algorithm is: ; in, For the current time point The corresponding The weight of the data source, For the The correlation score between the data source and the current prediction target, For the The reliability index of the data source, is the time decay factor, For the The last update time of the data source. For the The time when the data source was last updated.
2. The method according to claim 1, characterized in that The transportation-related data at least includes: historical passenger volume records, bus route information, demographic data and holiday arrangements; The government open data includes at least: urban traffic flow data and major event arrangements.
3. The method according to claim 1, characterized in that: Based on the feature set and the weight values corresponding to the feature set, the composite prediction model is trained to obtain a trained composite prediction model, including: Using the variational autoencoder, performing unsupervised feature learning on the feature set to obtain low-dimensional feature data; Using the graph attention network and the feature set, constructing a feature vector; The machine learning model is trained using the low-dimensional feature data and the feature vector to obtain the trained composite prediction model.
4. A city public service demand forecasting system based on machine learning and data mining, characterized in that: include: A preprocessing unit is used to obtain multiple data source data of the city to be predicted, and preprocess the multiple data source data to obtain multiple data source data after preprocessing, wherein the multiple data source data include: traffic related data, bus GPS positioning data, bus service review data and government open data, and the preprocessing includes: processing missing values, eliminating outliers and data standardization processing; A matching unit, used to match corresponding weight values for the preprocessed data from the plurality of data sources using an adaptive dynamic algorithm; A construction unit, configured to construct a feature set based on an automatic feature discovery mechanism, the preprocessed data from the plurality of data sources and the weight value; A training unit, used for training the composite prediction model based on the feature set and the weight values corresponding to the feature set to obtain a trained composite prediction model, wherein the composite prediction model is a model constructed based on a machine learning model, a graph attention network and a variational autoencoder; A prediction unit, used to predict the passenger volume of the bus line by using the trained composite prediction model to obtain an initial prediction result, and to correct the initial prediction result by using a space-time cube analysis and prediction correction mechanism to obtain a corrected prediction result; Wherein, constructing a feature set based on the automatic feature discovery mechanism, the preprocessed data from multiple data sources and the weight value includes: Based on the preprocessed data from multiple data sources, a feature pool is constructed, wherein the feature pool contains multiple feature combinations; Encoding the feature combination into a chromosome, wherein each gene in the chromosome indicates whether a feature is selected; Determining a feature set based on the chromosome, a preset fitness function, a genetic algorithm and the weight value; The initial prediction result is corrected by using the space-time cube analysis and prediction correction mechanism to obtain the corrected prediction result, including: Based on the preprocessed data from multiple data sources, a space-time cube is constructed, wherein the space-time cube contains multiple cube units, and the multiple cube units represent the passenger volume or related characteristic values corresponding to each time point and each location; Determining a compensation value of the initial prediction result using the space-time cube technology and the space-time cube; Determining the revised prediction result based on the compensation value and the initial prediction result; Wherein, using the space-time cube technology and the space-time cube to determine the compensation value of the initial prediction result includes: Based on the space-time cube technology and the space-time cube, determine the space-time pattern in each cube unit, and based on the space-time pattern, determine a first compensation value of each space-time cube; Determine a second compensation value of each space-time cube based on the local area development trend analysis algorithm and the space-time cube; Determine a third compensation value of each space-time cube based on the event impact analysis algorithm and the space-time cube; The expression of the adaptive dynamic algorithm is: ; in, For the current time point The corresponding The weight of the data source, For the The correlation score between the data source and the current prediction target, For the The reliability index of the data source, is the time decay factor, For the The last update time of the data source. For the The time when the data source was last updated.
5. A computing device, characterized in that: It comprises a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the method according to any one of claims 1 to 3.
6. A computer storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a computer, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
User behavior prediction method and system based on deep learning, and electronic equipment
CN117610734A
Intelligent bus scheduling method and system
CN117671992A
