Vehicle queuing duration prediction method and device

By acquiring and analyzing the target attribute data and time series data of the vehicle, predicting the target queue time of the vehicle, solving the problem of low prediction accuracy and timeliness in the prior art, and achieving a more accurate and timely transportation plan.

CN120218325AActive Publication Date: 2025-06-27内蒙古伊泰信息技术有限公司

Patent Information

Application Number
CN202510283374.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-27
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

In the prior art, the accuracy and timeliness of vehicle queue time prediction are low, making it difficult to effectively deal with the increased transportation time and cost caused by traffic congestion.

Method used

By obtaining the time series associated with the target attribute data and entry behavior of the target vehicle, based on the correlation between the target attribute data analysis and the queueing time, the change pattern of historical change data is analyzed based on the time series, and the two are combined to predict the target queueing time of the vehicle.

Benefits of technology

It improves the accuracy and timeliness of vehicle queue time prediction, and can more effectively deal with the increased transportation time and cost problems caused by traffic congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218325A_ABST
    Figure CN120218325A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a vehicle queuing duration prediction method and device, and the method comprises the steps: obtaining target attribute data corresponding to a target vehicle, and a time sequence related to the entering behavior of the target vehicle, the target attribute data refers to attribute data which is related to the target vehicle and affects the queuing duration of the target vehicle, and the time sequence comprises multiple pieces of historical change data which affects the queuing duration of the target vehicle; based on the target attribute data, analyzing an association relationship between the target attribute data and the queuing duration of the target vehicle, and predicting a first queuing duration; based on the time sequence, analyzing a change rule of the plurality of pieces of historical change data, and predicting a second queuing duration; and determining the target queuing duration of the target vehicle according to the first queuing duration and the second queuing duration. According to the invention, multi-dimensional analysis of the data is realized, and the accuracy of queuing duration prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and particularly to a method and device for predicting the queuing duration of vehicles. Background Art

[0002] Trucks usually encounter traffic jams during transportation. Traffic jams will significantly increase transportation time and costs, and reduce logistics efficiency. In addition, congestion may also lead to increased fuel consumption, causing environmental pollution, and triggering delivery delays, affecting the quality of goods and market supply, etc. Therefore, predicting the queuing time of vehicles is crucial for truck drivers and logistics managers. In the prior art, the queuing time of vehicles is usually predicted based on manual experience or simple rules, and the accuracy and timeliness of the prediction results are low. Therefore, there is an urgent need to provide a solution to solve the above technical problems. Summary of the Invention

[0003] In view of this, the embodiments of this specification provide a method for predicting the queuing duration of vehicles. One or more embodiments of this specification also relate to a device for predicting the queuing duration of vehicles, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects existing in the prior art.

[0004] According to the first aspect of the embodiments of this specification, a method for predicting the queuing duration of vehicles is provided, including:

[0005] Obtain the target attribute data corresponding to the target vehicle, and the time series associated with the entry behavior of the target vehicle, where the target attribute data refers to the attribute data related to the target vehicle and affecting the queuing duration of the target vehicle, and the time series includes multiple historical change data affecting the queuing duration of the target vehicle;

[0006] Based on the target attribute data, analyze the correlation between the target attribute data and the queuing duration of the target vehicle, and predict the first queuing duration;

[0007] Based on the time series, analyze the change rule of the multiple historical change data, and predict the second queuing duration;

[0008] Determine the target queuing duration of the target vehicle according to the first queuing duration and the second queuing duration.

[0009] According to the second aspect of the embodiments of this specification, a device for predicting the queuing duration of vehicles is provided, including:

[0010] A data acquisition module, configured to obtain target attribute data corresponding to a target vehicle and a time series associated with the entry behavior of the target vehicle, where the target attribute data refers to attribute data related to the target vehicle and affecting the queuing duration of the target vehicle, and the time series includes multiple historical change data affecting the queuing duration of the target vehicle;

[0011] A first data processing module, configured to analyze the correlation between the target attribute data and the queuing duration of the target vehicle based on the target attribute data, and predict a first queuing duration;

[0012] A second data processing module, configured to analyze the change rule of the multiple historical change data based on the time series, and predict a second queuing duration;

[0013] A data fusion module, configured to determine the target queuing duration of the target vehicle according to the first queuing duration and the second queuing duration.

[0014] According to the third aspect of the embodiments of the present specification, a computing device is provided, including:

[0015] A memory and a processor;

[0016] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the above vehicle queuing duration prediction method are implemented.

[0017] According to the fourth aspect of the embodiments of the present specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above vehicle queuing duration prediction method are implemented.

[0018] In one embodiment of the present specification, attribute data related to a vehicle and a time series associated with the entry behavior of the vehicle are respectively obtained, and based on different characteristics of the attribute data and the time series, these two types of data are respectively analyzed. Based on the attribute data, the correlation between the target attribute data and the queuing duration of the target vehicle is analyzed, and the queuing duration of the target vehicle is predicted to obtain a first queuing duration. Based on the time series, the change rule of multiple historical change data is analyzed, and a second queuing duration is predicted, realizing targeted analysis based on different characteristics of different data, and then predicting the corresponding queuing duration. On this basis, the two prediction results are fused to determine the final target queuing duration, ensuring that the final prediction result can comprehensively consider the influence of the target attribute data and the time series on the vehicle queuing duration, and improving the prediction accuracy. Description of the Drawings

[0019] Figure 1It is a flowchart of a method for predicting vehicle queuing duration provided by an embodiment of this specification;

[0020] Figure 2 It is a flowchart of the processing process of a method for predicting vehicle queuing duration in a coal transportation scenario provided by an embodiment of this specification;

[0021] Figure 3 It is a flowchart of model training of a method for predicting vehicle queuing duration in a coal transportation scenario provided by an embodiment of this specification;

[0022] Figure 4 It is a schematic structural diagram of a device for predicting vehicle queuing duration provided by an embodiment of this specification;

[0023] Figure 5 It is a structural block diagram of a computing device provided by an embodiment of this specification. Detailed implementation manners

[0024] Many specific details are set forth in the following description in order to provide a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of this specification. Therefore, this specification is not limited by the specific implementations disclosed below.

[0025] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more of the associated listed items.

[0026] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0027] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data that have been authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0028] First, the noun terms involved in one or more embodiments of this specification are explained.

[0029] XGBoost (eXtreme Gradient Boosting): It is an efficient implementation of the gradient boosting algorithm, designed specifically for speed and performance. It is based on the gradient boosting framework and improves the prediction ability of the model by constructing an ensemble of multiple decision trees.

[0030] LSTM: Long Short-Term Memory. Through its internal structure (such as cell state and gate mechanism), LSTM can remember information for a longer time and can dynamically decide which information to retain and which to forget according to the input.

[0031] Transformer: It is a deep learning model based on the attention mechanism. The Transformer model can be trained more efficiently in parallel and performs better in capturing long-range dependencies.

[0032] Pearson Correlation Coefficient: Also known as the Pearson product-moment correlation coefficient, it is a statistical index used to measure the strength and direction of the linear relationship between two variables.

[0033] Spearman's Rank Correlation Coefficient: It is a non-parametric statistical method used to measure the strength of the monotonic relationship between two variables. Different from the Pearson correlation coefficient, the Spearman's rank correlation coefficient does not directly consider the actual values of the variables but calculates the correlation based on their ranking order.

[0034] After coal mining, coal is usually transported by many transport vehicles. However, during the transportation process, traffic congestion frequently occurs, which not only reduces the transportation efficiency but also makes it difficult for drivers to estimate the duration of congestion, thus affecting their ability to take accurate countermeasures. Currently, many enterprises adopt vehicle scheduling and queuing time prediction methods based on manual experience or basic rules. However, these methods have limitations in dealing with complex non-linear relationships and cannot respond in real time to a dynamically changing environment. In addition, some traditional prediction models are insufficient in using real-time data and historical data for efficient prediction and lack the ability to effectively model time series characteristics, resulting in deficiencies in the accuracy and timeliness of prediction results.

[0035] In this specification, a method for predicting vehicle queuing duration is provided. This specification also relates to a vehicle queuing duration prediction device, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.

[0036] See Figure 1 , Figure 1 is a flowchart of a method for predicting vehicle queuing duration provided by an embodiment of this specification, which specifically includes the following steps.

[0037] Step 102: Obtain the target attribute data corresponding to the target vehicle and the time series associated with the entry behavior of the target vehicle. Among them, the target attribute data refers to the attribute data related to the target vehicle and affecting the queuing duration of the target vehicle, and the time series includes multiple historical change data affecting the queuing duration of the target vehicle.

[0038] Specifically, the target vehicle refers to a vehicle with a queuing duration prediction requirement. The target attribute data refers to the attribute data related to the target vehicle and affecting the queuing duration of the target vehicle. The target attribute data generally does not change with time or changes slowly with time. The target attribute data includes: inherent attribute characteristics, time characteristics, environmental characteristics, statistical characteristics, etc. The time series refers to the historical data associated with the entry behavior of the target vehicle and capable of reflecting or affecting the change in the queuing duration of the target vehicle. The data in the time series generally changes faster with time than the target attribute data. The data constituting the time series includes historical meteorological conditions, historical traffic flow, historical congestion degree, historical queuing duration, etc. These data will serve as the basis for subsequent prediction model training and prediction.

[0039] Based on this, in order to achieve accurate prediction of vehicle queuing duration, it is necessary to pre-obtain the target attribute data related to the target vehicle and the time series related to the entry behavior of the target vehicle, providing data support for subsequent queuing duration prediction.

[0040] For example, the target vehicle is a coal transport vehicle A. When this vehicle enters the target site, it needs to punch a card to record the time point when the vehicle enters the target site. According to the card punching record of the vehicle, the target attribute data of the vehicle obtained includes: the type of the vehicle is a dump truck, the license plate number is XXXXX1, the coal type number is A001, the site number is B001, and the card punching time point is 9:00 on February 23, 2025; the obtained time series includes a queuing duration series and a meteorological change series. The queuing duration series is a series composed of all the queuing durations of the target vehicle from the first historical time point to the card punching time point, arranged in chronological order. Correspondingly, the meteorological change series is a series composed of the weather conditions corresponding to the area where the target site is located from the first historical time point to the card punching time point of the target vehicle, arranged in chronological order.

[0041] In summary, through pre-classification, the embodiments of this specification obtain data with different characteristics, providing a data basis for subsequent analysis and processing.

[0042] Step 104: Based on the target attribute data, analyze the correlation between the target attribute data and the queuing duration of the target vehicle, and predict the first queuing duration.

[0043] Specifically, since the target attribute data and the time series have different characteristics, and their influence degrees or influence laws on the queuing duration are also different. In order to accurately analyze the relationship between different data and the vehicle queuing duration, different data need to be processed differently. The first queuing duration is a prediction result obtained after predicting the vehicle queuing duration based on the target attribute data.

[0044] Based on this, for the target attribute data, it is necessary to analyze the correlation between the target attribute data and the queuing duration of the target vehicle, and predict the first queuing duration of the target vehicle based on the correlation.

[0045] Furthermore, since the target attribute data contains various different attribute data, the target attribute data includes inherent attribute characteristics, time characteristics, environmental characteristics, and statistical characteristics.

[0046] To fully analyze the impact of different attribute data on the vehicle queuing duration, correspondingly, analyzing the correlation between the target attribute data and the queuing duration of the target vehicle based on the target attribute data, and predicting the first queuing duration includes: inputting the target attribute data into a first prediction model, capturing the interaction relationship between the inherent attribute features and the waiting time of the target vehicle through a first decision tree of the first prediction model to obtain a first sub-queuing duration, where the first prediction model includes the first decision tree, the second decision tree, and the third decision tree; splitting the time feature through the second decision tree to distinguish the waiting time difference of the target vehicle on holidays and non-holidays to obtain a second sub-queuing duration; analyzing the queuing duration difference of the target vehicle under different environmental features based on the statistical features through the third decision tree to obtain a third sub-queuing duration; and obtaining the first queuing duration by weighted summation of the first sub-queuing duration, the second sub-queuing duration, and the third sub-queuing duration.

[0047] Specifically, the inherent attribute features refer to the inherent attribute data of the target vehicle or the goods transported by the target vehicle, including vehicle attribute data, goods attribute data, etc. The vehicle attribute data includes basic information such as the type, size, weight, and load capacity of the vehicle; the goods attribute data refers to the type, quantity, value, etc. of the goods transported by the vehicle; the environmental features refer to the station number, traffic environment, meteorological conditions, road conditions, etc. where the vehicle is located; the time feature refers to the time point when the vehicle enters the congestion or queuing state and whether this time point is a holiday, and the statistical feature refers to the data obtained after statistical analysis of the historical queuing duration of the target vehicle. The first prediction model is an ensemble learning model based on decision trees, and predicts the queuing duration of the target vehicle through comprehensive analysis of the inherent attribute features, environmental features, time features, and statistical features. The first prediction model contains at least three types of decision trees, and these three types of decision trees can predict the queuing duration of the vehicle from different dimensions and obtain corresponding queuing duration prediction results.

[0048] Based on this, after inputting the target attribute data into the first prediction model, in the first prediction model, the target attribute data will first be preprocessed, including steps such as data cleaning, missing value filling, outlier detection, data encoding, etc. The first decision tree mainly focuses on the inherent attributes of the vehicle and the goods, such as the type and size of the vehicle, as well as factors such as the type and quantity of the goods, to obtain the predicted result as the first sub-queueing duration. The second decision tree focuses on time features, and predicts the second sub-queueing duration of the target vehicle by distinguishing the waiting time differences between holidays and non-holidays. The third decision tree is based on statistical features and environmental features, analyzes the queueing duration differences of the target vehicle under different environmental features, and thus obtains the third sub-queueing duration of the target vehicle. Finally, according to the weights corresponding to each decision tree, the first sub-queueing duration, the second sub-queueing duration, and the third sub-queueing duration are weighted and summed to be combined into a first queueing duration as the final prediction result.

[0049] Continuing with the above example, the first prediction model can be an XGBoost model. Among them, the weight corresponding to the first decision tree is 0.8, the weight corresponding to the second decision tree is 0.5, and the weight corresponding to the third decision tree is 0.6. Different types of coal transportation vehicles have different transportation efficiencies, and the loading and unloading difficulties of different types of coal may also be different. After inputting the target attribute data into the first prediction model, the first decision tree captures that the vehicle is a dump truck with a large load capacity, and the coal type number A001 being transported may correspond to specific transportation requirements and priorities, thus predicting that the first sub-queueing duration is 1 hour. The second decision tree, based on the clock-in time point of 9:00 on February 23, 2025 being a non-holiday time, and the queueing duration differences between holidays and non-holidays in historical data, predicts the second sub-queueing duration of 0.6 hours. Since different stations have different corresponding equipment, some stations may cause longer average waiting times for transportation vehicles due to old equipment. The loading and unloading efficiency is higher on sunny days than on rainy days, and the queueing duration of transportation vehicles is shorter. The third decision tree, based on the station number B001, sunny weather, and the average historical queueing duration data of vehicle A in statistical features, analyzes the queueing duration differences under different environmental features and predicts that the third sub-queueing duration is 0.8 hours. Finally, through the method of weighted summation, these three sub-queueing durations are combined into the first queueing duration of target vehicle A as 1.58 hours, providing an important reference for subsequent prediction results.

[0050] In summary, the embodiments of this specification achieve in-depth analysis of the target attribute data. By constructing the first prediction model and using different types of decision trees, the influencing factors of the vehicle queueing duration are captured from multiple dimensions, thus obtaining a more accurate prediction result of the first queueing duration. This step fully considers the diversity and complexity of the target attribute data, improving the accuracy and reliability of the prediction.

[0051] Further, the training steps of the first prediction model are as follows: Obtain the sample queuing duration of the target vehicle and the corresponding initial sample attribute data, where the initial sample attribute data corresponding to each sample queuing duration includes multiple different types of sub-sample attribute data; perform feature screening on the initial sample attribute data to obtain target sample attribute data; train a first initial prediction model based on the sample queuing duration and the target sample attribute data to obtain the first prediction model and its corresponding first weight.

[0052] Specifically, the sample queuing duration is the actual queuing duration corresponding to the target vehicle in the historical time period, and the initial sample attribute data is the historical attribute data related to the target vehicle and affecting the queuing duration of the target vehicle during the queuing duration. There are multiple sample queuing durations and initial sample attribute data. Generally, the initial sample attribute data does not change with time or changes slowly with time. The initial sample attribute data includes: inherent attribute sample features, time sample features, environmental sample features, statistical sample features, etc. The target sample data refers to the sample data that has a greater impact on the queuing duration after screening.

[0053] Based on this, in order to train the first prediction model, it is first necessary to obtain the sample queuing duration of the target vehicle and the corresponding initial sample attribute data. These data will be used as the input information for training the model. Then, perform feature screening on the initial sample attribute data to remove the attribute data with less impact on the queuing duration and retain the target sample attribute data with greater impact on the queuing duration to improve the prediction accuracy and efficiency of the model. Next, train the first initial prediction model based on the screened sample queuing duration and target sample attribute data. During the training process, continuously adjust the parameters and structure of the model so that the model can accurately capture the correlation between different attribute data and the queuing duration and obtain the corresponding first weight. The first weight reflects the reliability of the prediction result of the first prediction model.

[0054] In summary, the embodiments of this specification can make full use of the diversity and complexity of the target attribute data, capture the influencing factors of the vehicle queuing duration from multiple dimensions to train the model, so as to achieve accurate prediction of the vehicle queuing duration. This step provides strong support for subsequent use of the model to predict the vehicle queuing duration.

[0055] Further, in order to extract more accurate sample data with a greater impact on the queuing duration, the performing feature screening on the initial sample attribute data to obtain target sample attribute data includes: calculating the correlation between the sub-sample attribute data and the corresponding sample queuing duration; determining the sub-sample attribute data with a correlation greater than the correlation threshold as the target sample attribute data.

[0056] Specifically, the sub-sample attribute data is any type of sample attribute data included in the initial sample attribute data.

[0057] Based on this, the correlation between each type of sub-sample attribute data and the corresponding sample queuing duration is calculated. The calculation of the correlation can comprehensively consider the linear and non-linear correlations between the sub-sample attribute data and the sample queuing duration to comprehensively evaluate the influence degree of the sub-sample attribute data on the queuing duration.

[0058] According to the calculated correlation, the sub-sample attribute data with a correlation greater than the preset correlation threshold is determined as the target sample attribute data. The setting of the correlation threshold can be adjusted according to actual needs and data characteristics to ensure that the target sample attribute data that has a significant impact on the queuing duration is screened out.

[0059] Continuing with the above example, collect the queuing duration of coal transportation vehicles at different times of each day in the past year, as well as the corresponding vehicle type, size, load capacity, coal type number, station number, meteorological conditions, road conditions, etc. Then, through the feature screening method, the Pearson correlation coefficient is used to calculate the linear correlation between the initial sample attribute data and the sample queuing duration, and the Spearman rank correlation coefficient is used in combination to calculate the non-linear correlation between the initial sample attribute data and the sample queuing duration. Remove the attribute data with less influence on the queuing duration, such as the color of the vehicle and the gender of the driver, and retain the target sample attribute data with greater influence on the queuing duration. Screen out the features with an absolute value of the correlation greater than the set threshold (such as 0.3), such as vehicle type, load capacity, coal type number, station number, weather conditions, etc. Next, use the screened target sample attribute data and the sample queuing duration to train the first initial prediction model. By continuously adjusting the parameters and structure of the model, the trained first prediction model and its corresponding first weight are obtained. In this way, when a new coal transportation vehicle enters the congestion or queuing state, the trained first prediction model can be used to predict its queuing duration, providing an important reference for vehicle scheduling and driver decision-making.

[0060] It should be noted that the above feature screening based on correlation is implemented by using the method of independent thresholds. Specifically, a threshold is set separately for each type of correlation (for example, the absolute values of both linear correlation and non-linear correlation are 0.3): If an initial sample feature data exceeds the threshold in the Pearson index, it indicates that there is a strong linear relationship between it and the sample queuing duration; if it exceeds the threshold in the Spearman index, it means that the initial sample feature data can capture the non-linear monotonic relationship with the queuing duration. In comprehensive judgment, as long as any index exceeds the threshold, the initial sample feature data is considered valid, that is, the initial sample feature data can be screened out as the target sample attribute data. This method is simple and direct, and at the same time takes into account the recognition of two different relationships. In this way, various relationships between features and sample queuing duration can be captured more comprehensively, thereby improving the accuracy and stability of the subsequent prediction model.

[0061] In summary, the embodiments of this specification provide more accurate and effective input information for the subsequent training of the prediction model by calculating the correlation between the sub-sample attribute data and the sample queuing duration and screening out the target sample attribute data according to the correlation. This step can make full use of the diversity and complexity of the initial sample attribute data, capture the influencing factors of the vehicle queuing duration from multiple dimensions, and thus achieve accurate prediction of the vehicle queuing duration.

[0062] Further, in order to make the model prediction result more accurate, training the first initial prediction model based on the sample queuing duration and the target sample attribute data to obtain the first prediction model and its corresponding first weight includes: performing normalization processing on the target sample attribute data to obtain target sample features; calling the first initial prediction model to analyze the correlation relationship between different types of target sample features and the sample queuing waiting duration of the target vehicle in different dimensions to obtain the first predicted queuing duration; calculating the loss value between the first predicted queuing duration and the sample queuing duration, and adjusting the first initial prediction model based on the loss value until the preset stop condition is met to obtain the first prediction model; evaluating the prediction accuracy of the first prediction model based on the sample queuing duration and assigning the first weight to the first prediction model.

[0063] Specifically, the normalization processing refers to performing normalization or standardization operations on the target sample attribute data so that attribute data with different dimensions and value ranges can be compared and analyzed on the same scale. Since the target sample features contain different types of sample features, and the influence degree or influence law of each type of sample feature on the queuing duration is different, therefore, analyzing the correlation relationship between the target sample features and the sample queuing waiting duration of the target vehicle in different dimensions can be understood as analyzing the influence degree of different types of target sample features on the sample queuing duration.

[0064] Based on this, the target sample attribute data is standardized to obtain target sample features. The first initial prediction model is called to analyze the correlation between the target sample features and the sample queuing waiting time of the target vehicle in different dimensions, and the first predicted queuing time is obtained. Calculate the loss value between the first predicted queuing time and the sample queuing time. The loss value reflects the degree of difference between the prediction result and the actual result. Adjust the parameters and structure of the first initial prediction model based on the loss value. Through iterative optimization, continuously reduce the loss value until the preset stop condition is met, such as the loss value converges below a certain threshold or the number of iterations reaches the preset upper limit, etc. At this time, the trained first prediction model is obtained. Finally, evaluate the prediction accuracy of the first prediction model based on the sample queuing time. The prediction accuracy can be measured by calculating indicators such as the correlation coefficient and mean square error between the prediction result and the actual result. Assign the first weight to the first prediction model according to the prediction accuracy. The first weight reflects the reliability and importance of the model prediction result. This step can make full use of the sample data to train and optimize the model, improving the prediction accuracy and generalization ability of the model.

[0065] Continuing with the above example, an XGBoost model (the first initial prediction model) is built. XGBoost is selected as the basic component of the combined model, and the model parameters are initialized. The maximum depth (max_depth) of the decision tree is set to 6, the learning rate (learning_rate) is set to 0.1, the number of estimators (n_estimators) is set to 150, and the objective function (objective) is set to reg:squarederror (for regression tasks, i.e., predicting the queuing waiting time), etc. These parameters can be set according to preliminary experiments and experience and further optimized during subsequent training. The sample queuing durations of coal transportation vehicles and the corresponding initial sample attribute data are standardized, such as through normalization, so that attribute data with different dimensions and value ranges can be compared and analyzed on the same scale. Then, the first initial prediction model is called to analyze the correlation between different types of target sample features (such as vehicle type, load capacity, coal type number, station number, weather condition, etc.) and the sample queuing duration in different dimensions. Through the training and analysis of the model, the first predicted queuing duration can be obtained. Next, the loss value between the first predicted queuing duration and the sample queuing duration is calculated, such as the Mean Squared Error (MSE), and the parameters and structure of the first initial prediction model are adjusted based on the loss value. Through iterative optimization, the loss value is continuously reduced until the preset stop condition is met, such as the loss value converging below a certain threshold or the number of iterations reaching the preset upper limit. At this time, the training of the first initial prediction model is completed, and the MSE of the XGBoost model on the validation set is calculated to be 10, and the first weight of 0.4 can be assigned to the XGBoost model.

[0066] In summary, the embodiments of this specification implement the standardization processing of target sample attribute data, call the first initial prediction model for analysis, calculate the loss value, and continuously adjust the model parameters and structure, finally obtaining the trained first prediction model and its corresponding first weight. This step fully utilizes the sample data to train and optimize the model, ensuring the accuracy and reliability of the model prediction results.

[0067] Step 106: Based on the time series, analyze the variation law of the multiple historical change data and predict the second queuing duration.

[0068] Specifically, the historical change data in the time series contains various information that can reflect or affect the change of the target vehicle's queuing duration. For example, the queuing duration sequence can reflect the change trend of the target vehicle's historical queuing duration, and the meteorological change sequence can reflect the historical meteorological change situation. Combining the two can uncover the impact of meteorological changes on the queuing duration, and thus predict the second queuing duration of the target vehicle.

[0069] Based on this, for time series, it is necessary to analyze the variation law of multiple historical change data in the time series, and predict the second queuing duration of the target vehicle based on the variation law.

[0070] Furthermore, due to the different characteristics of the time series and the target attribute data itself, the impacts on the vehicle queuing duration are also different. Different methods need to be used to analyze the time series. Analyzing the variation law of the multiple historical change data based on the time series and predicting the second queuing duration includes: inputting the time series into a second prediction model, analyzing the short-term variation law and long-term variation law of the multiple historical change data through the second prediction model, and outputting the second queuing duration.

[0071] Specifically, the time series contains a large amount of data related to the queuing duration of the target vehicle or historical data related to the queuing duration of the target vehicle. These data reflect the historical change situation and trend of the queuing duration. In order to make full use of these data, it is necessary to input them into a special prediction model for analysis. The second prediction model is a model that can process time series data. It can capture the short-term fluctuations and long-term trends in the data, so as to predict the future queuing duration.

[0072] Based on this, in the second prediction model, first, preprocessing of the time series will be performed, including steps such as data cleaning, missing value filling, and outlier detection, to ensure the accuracy and integrity of the data. Then, the model will use machine learning algorithms, such as time series analysis, deep learning, etc., to learn from the historical data and extract the key factors and variation laws that affect the queuing duration.

[0073] Continuing with the above example, the target vehicle is the coal transportation vehicle A. The second prediction model can be implemented in the way of embedding the Transformer model in the LSTM model. The LSTM model is used to capture the local dependence relationship of the time series and output the hidden state. The hidden state can remember the local change trend of the time series. The Transformer is used to process the hidden state output by the LSTM model to analyze the global dependence relationship of the time series. These models can analyze the short-term fluctuations in the time series, so as to calculate the corresponding second queuing duration of 0.9 hours.

[0074] To sum up, through constructing the second prediction model and using its analysis ability for time series data, the embodiments of this specification capture the variation laws affecting the vehicle queuing duration from both short-term and long-term dimensions, so as to obtain a more accurate prediction result of the second queuing duration. This step fully considers the characteristics and complexity of the time series data, and further improves the accuracy and reliability of the prediction.

[0075] Furthermore, in order to more comprehensively analyze the variation law of vehicle queuing duration and the influence of changes in other factors on the queuing duration, the time series includes the time series of vehicle queuing duration and the time series of meteorological changes. The second prediction model includes a first prediction sub-model and a second prediction sub-model.

[0076] In the case of only including the queuing duration sequence, it is necessary to analyze the variation law of the measured queuing duration. Inputting the time series into the second prediction model, and analyzing the short-term variation law and long-term variation law of the multiple historical change data through the second prediction model, and outputting the second queuing duration, including: using a sliding window to extract the short-term queuing duration sequence features corresponding to the queuing duration sequence at multiple time steps; inputting the short-term queuing duration sequence features into the first prediction sub-model, and the first prediction sub-model analyzes the queuing change trend of the target vehicle in multiple first historical time periods based on the multiple short-term queuing duration sequence features and outputs hidden state data; inputting the hidden state data into the second prediction sub-model, and the second prediction sub-model analyzes the queuing change trend of the target vehicle in multiple second historical time periods based on the hidden state data and outputs the second queuing duration.

[0077] Specifically, a sliding window is a technique used to extract local features in time series data. The time step refers to the length or interval at which the sliding window moves in the time series data. The short-term queuing duration sequence feature refers to the data representation of the queuing duration of the target vehicle within any time step. The first prediction sub-model is used to analyze the short-term variation law or local variation law of the time series, and the second prediction sub-model is used to analyze the long-term variation law or global variation law of the time series.

[0078] Based on this, when predicting the second queuing duration using the queuing duration sequence, since the time series often contains a large amount of historical queuing duration data, these data can reflect the historical change situation and trend of the queuing duration after being arranged in chronological order. However, directly analyzing the entire time series may face problems such as large data volume and high computational complexity. In order to more effectively utilize these data, the sliding window method can be adopted to divide the time series into multiple time steps, and each time step corresponds to a short-term queuing duration sequence feature. In this way, the complex time series data can be transformed into a series of relatively simple short-term queuing duration sequence features, which is convenient for subsequent analysis and processing.

[0079] In the first prediction sub-model, the main focus is on the queuing change trend of the target vehicle within multiple first historical time periods. These time periods can be continuous or have a certain time interval. The first prediction sub-model will analyze the queuing change trend of the target vehicle based on these short-term queuing duration sequence features and output hidden state data. These hidden state data can capture the local dependencies in the time series and reflect the queuing changes of the target vehicle at different time periods.

[0080] Next, in the second prediction sub-model, based on these hidden state data, it will further analyze the queuing change trend of the target vehicle within multiple second historical time periods. These second historical time periods can be a longer time range than the first historical time periods to capture the long-term trends in the time series. The second prediction sub-model will use machine learning algorithms, such as deep learning, to learn from the hidden state data, extract the key factors and change rules affecting the queuing duration, and finally output the second queuing duration.

[0081] Continuing with the above example, when the target vehicle is coal transportation vehicle A and predicting the second queuing duration using the queuing duration sequence, the size of the sliding window can be set to 2 hours, that is, each time step corresponds to 2 hours of queuing duration data. In this way, the entire time series can be divided into multiple time steps, and each time step extracts a short-term queuing duration sequence feature. Then, these short-term queuing duration sequence features are input into the first prediction sub-model, which can be an LSTM-based neural network model that can capture the queuing duration change pattern of the target vehicle within a day, such as the queuing duration gradually shortening from morning to noon and then increasing in the afternoon, and output hidden state data. Then, these hidden state data are input into the second prediction sub-model, which can be a Transformer-based neural network model that can analyze the queuing duration change pattern of the target vehicle within a week based on the hidden state data, such as the queuing duration being the longest on Monday, decreasing from Tuesday to Friday and remaining with small fluctuations, and further decreasing on Saturday and Sunday. According to the queuing duration change pattern of the target vehicle on a daily basis and a weekly basis and the current time point, it can be predicted that the second queuing duration corresponding to the target vehicle A at the current time point is 1 hour.

[0082] In summary, through the construction of the first prediction model and the second prediction model in the embodiments of this specification, and by making full use of the target attribute data and time series data, the influencing factors and change rules of the vehicle queuing duration are captured from multiple dimensions, thus achieving accurate prediction of the vehicle queuing duration. This method fully considers the diversity and complexity of the data, improves the accuracy and timeliness of the prediction, and provides strong support for traffic management and optimization.

[0083] Furthermore, when the time series includes the queuing duration series and also includes the meteorological change series, in this case, it is necessary to analyze the change laws of the two series respectively and analyze the influence of the meteorological change series on the queuing duration series at the same time.

[0084] Inputting the time series into the second prediction model, analyzing the short-term change law and long-term change law of the multiple historical change data through the second prediction model, and outputting the second queuing duration, including: extracting the short-term meteorological change series features corresponding to the meteorological change series at multiple time steps by using a sliding window; inputting the short-term meteorological change series features into the first prediction sub-model, and the first prediction sub-model analyzes the influence of the meteorological change on the queuing duration of the target vehicle in multiple first historical time periods based on the multiple short-term meteorological change series features and the short-term queuing duration series features and outputs hidden state data; inputting the hidden state data into the second prediction sub-model, and the second prediction sub-model analyzes the queuing change trend of the target vehicle in multiple second historical time periods based on the hidden state data and outputs the second queuing duration.

[0085] Specifically, the short-term meteorological change series feature refers to the data performance of the meteorological conditions corresponding to the target vehicle during the historical queuing process at any time step.

[0086] Based on this, on the basis of having analyzed the change situation of the queuing duration series, the second prediction model will combine and analyze the change situation of the queuing duration series and the change situation of the meteorological change series during the analysis of the meteorological change situation. First, by using the sliding window technology, multiple short-term meteorological change series features corresponding to the meteorological change series can be extracted. These features may include the change situations of meteorological factors such as temperature, humidity, wind speed, and precipitation within the time step.

[0087] Next, input these short-term meteorological change series features into the first prediction sub-model. The first prediction sub-model will analyze the meteorological change situation of the target vehicle in multiple first historical time periods and the influence of the meteorological change on the queuing duration based on these features. Through the analysis of the first prediction sub-model, hidden state data containing the short-term meteorological change law and the information of the influence of the meteorology on the vehicle queuing duration can be output.

[0088] Then, input these hidden state data into the second prediction sub-model. The second prediction sub-model will further analyze the queuing change trend of the meteorology in multiple second historical time periods based on these hidden state data. Similar to the situation of only considering the queuing duration series, the second prediction sub-model will also use machine learning algorithms to learn the hidden state data and extract the key meteorological factors and change laws that affect the queuing duration. Thus, it can more accurately predict the queuing duration of the target vehicle under different meteorological conditions.

[0089] Continuing with the above example, the target vehicle is the coal transportation vehicle A. When considering both the queuing duration sequence and the meteorological change sequence, the size of the sliding window can be set to 2 hours, that is, each time step corresponds to 2 hours of queuing duration data and meteorological data. In this way, the entire time series can be divided into multiple time steps, and a short-term queuing duration sequence feature and the corresponding short-term meteorological change sequence feature can be extracted from each time step. Then, these features are jointly input into the first prediction sub-model, which can be a Long Short-Term Memory network (LSTM). It can capture the short-term change laws of meteorological factors and queuing duration and their interaction relationships, and output hidden state data. Next, these hidden state data are input into the second prediction sub-model, which can be a Transformer model based on the attention mechanism embedded in the first prediction sub-model. It can analyze the change trend of the queuing duration of the target vehicle in a longer time range based on the hidden state data and consider the impact of meteorological changes on the queuing duration. According to the change laws of the queuing duration of the target vehicle in the short term and long term and the impact of meteorological changes, it can be predicted that the second queuing duration corresponding to the target vehicle A at the current time point is 1.2 hours.

[0090] In summary, the embodiments of this specification achieve a more accurate prediction of vehicle queuing duration by constructing the first prediction model and the second prediction model, and making full use of the target attribute data, queuing duration sequence, and meteorological change sequence to capture the influencing factors and change laws of vehicle queuing duration from multiple dimensions, while considering the impact of meteorological changes on queuing duration. This method not only improves the accuracy and timeliness of prediction, but also provides more comprehensive and powerful support for traffic management and optimization.

[0091] Furthermore, the training steps of the second prediction model are as follows:

[0092] Obtain the sample queuing duration and the corresponding time stamps; construct short-term time series features based on the sample queuing duration and the time stamps; train the second initial prediction model through the short-term time series features to obtain the second prediction model and its corresponding second weights.

[0093] Specifically, the time stamp is the historical entry check-in time point of the target vehicle, and the sample queuing duration is the actual queuing duration corresponding to the time stamp of the target vehicle in the historical time period, which can be understood as how long the target vehicle has actually queued since the time stamp.

[0094] Based on this, when training the second prediction model, a large amount of historical data needs to be collected first. This data includes the historical entry check-in time points (i.e., timestamps) of the target vehicle and the corresponding actual queuing durations (i.e., sample queuing durations). These data constitute the training set required for training the model. Based on these sample data, short-term time series features are constructed, and the second initial prediction model is trained using these short-term time series features. After the training is completed, the second prediction model and its corresponding second weights are obtained. These weights reflect the contribution degrees of various parameters in the model to the prediction result and are the basis for the model to make predictions.

[0095] Continuing with the above example, the target vehicle is the coal transport vehicle A. When training the second prediction model, the entry check-in time points and the corresponding actual queuing duration data of this vehicle within the past month can be collected. These data will be used as the training set for training the second prediction model. Based on these data, short-term time series features can be constructed, such as the changes in queuing duration per hour, per day, or per week, etc. Then, the second initial prediction model is trained using these short-term time series features. By continuously adjusting the parameters of the model, the prediction result of the model is made as close as possible to the actual data. After the training is completed, the second prediction model and its corresponding second weights are obtained, and these weights will be used in subsequent vehicle queuing duration predictions.

[0096] In summary, through this training process in the embodiments of this specification, the second prediction model can learn the short-term and long-term change rules of the queuing duration, so as to achieve accurate prediction of the future queuing duration and provide strong support for subsequent practical applications.

[0097] Furthermore, if the training samples only include the sample queuing duration and the timestamp, only the rule of the change of the sample queuing duration over time needs to be analyzed. The constructing short-term time series features based on the sample queuing duration and the timestamp includes: arranging the sample queuing duration according to the timestamp to obtain a sample time series; using a sliding window to extract the short-term sample time series features corresponding to the sample time series at multiple time steps.

[0098] Specifically, the short-term sample time series features refer to the local data features shown by the queuing duration of the target vehicle within different time steps.

[0099] Based on this, the sample queuing durations are arranged in the order of timestamps to form a complete sample time series. This series reflects the changes in the queuing durations of the target vehicle at different time points. Then, using the sliding window technique, multiple short-term sample time series features corresponding to different time steps can be extracted from this sample time series. These features can capture the changing characteristics of the queuing durations of the target vehicle within different short time periods, further understanding the changing pattern of the queuing durations of the target vehicle, and providing strong support for subsequent training and prediction. When extracting the short-term sample time series features, the size of the sliding window can be selected according to the actual situation to ensure that the changing situations of the queuing durations of the target vehicle within different time periods can be captured. Translating the sliding window can obtain multiple short-term sample time series features.

[0100] Continuing with the above example, the target vehicle is coal transport vehicle A. The queuing duration corresponding to timestamp 1: 7:00 on January 1, 2025, of this vehicle obtained last month is 1 hour, and the queuing duration corresponding to timestamp 2: 11:00 on January 1, 2025, is 0.5 hour... This series shows the changing situations of the queuing durations of vehicle A at different time points. Then, using the sliding window technique, the window size is set to 2 hours, that is, each time step corresponds to 2-hour queuing duration data, and multiple short-term sample time series features corresponding to different time steps are extracted from the sample time series. Using these short-term sample time series features to train the second initial prediction model, by continuously adjusting the parameters of the model, the prediction result of the model is made as close as possible to the actual data. After training is completed, the second prediction model and its corresponding second weights are obtained.

[0101] In summary, the embodiments of this specification construct short-term time series features and use these features to train the prediction model, enabling the model to learn the short-term and long-term changing patterns of the queuing durations. This method not only improves the accuracy and timeliness of prediction but also provides more comprehensive and powerful support for traffic management and optimization. At the same time, through the application of the sliding window technique, the problems of large data volume and high computational complexity are effectively solved, providing strong technical guarantees for subsequent practical applications.

[0102] Further, in order to comprehensively analyze the variation law of the vehicle queuing duration, the second initial prediction model is trained by the short-term time series features to obtain the second prediction model and its corresponding second weight, including: inputting the short-term sample time series features into the first initial prediction sub-model, and the first initial prediction sub-model analyzes the queuing change trend of the target vehicle in multiple first historical time periods based on the multiple short-term sample time series features and outputs the hidden state data; inputting the hidden state data into the second prediction sub-model, and the second prediction sub-model analyzes the queuing change trend of the target vehicle in multiple second historical time periods based on the hidden state data and outputs the second predicted queuing duration corresponding to the sample time stamp; adjusting the parameters of the second initial prediction model based on the difference between the sample queuing duration corresponding to the sample time stamp and the second queuing duration until the preset stop condition is met, and obtaining the second prediction model.

[0103] Specifically, before training the model, the second initial prediction model needs to be constructed first. The second initial prediction model is constructed by the first initial prediction sub-model and the second initial prediction sub-model, that is, the second initial prediction sub-model is embedded in the first initial prediction sub-model, and the parameters of the first initial prediction sub-model and the second initial prediction sub-model are initialized. Then, the short-term sample time series is input into the first initial prediction sub-model. This model will first analyze the queuing change trend of the target vehicle in multiple first historical time periods based on the input multiple short-term sample time series features. After the analysis is completed, the first initial prediction sub-model will output the hidden state data containing this short-term change law information.

[0104] Next, these hidden state data are input into the second initial prediction sub-model. The second initial prediction sub-model will further analyze the queuing change trend of the target vehicle in multiple second historical time periods based on these hidden state data. These second historical time periods are usually longer than the first historical time periods. Through the analysis of the second initial prediction sub-model, the long-term change law of the target vehicle queuing duration can be captured. After the analysis is completed, the second initial prediction sub-model will output the second predicted queuing duration corresponding to the sample time stamp.

[0105] Then, based on the difference between the sample queuing duration corresponding to the sample timestamp (i.e., the actual queuing duration) and the second predicted queuing duration, the parameters of the second initial prediction model are adjusted. This difference reflects the deviation degree between the model prediction result and the actual data. By continuously adjusting the model parameters, the prediction result of the model can be made as close as possible to the actual data. The process of adjusting parameters usually continues for multiple iterations until a preset stop condition is met, such as the prediction error reaching a certain threshold or the number of iterations reaching a preset upper limit, etc. At this time, it is considered that the model has learned sufficient information about the queuing duration change law, and the final second prediction model and its corresponding second weight can be obtained.

[0106] Continuing with the above example, a deep learning model containing an LSTM (Long Short-Term Memory) layer and a Transformer layer is constructed. The LSTM layer is used to process time series related features. The number of hidden units (hidden_size) is set to 128, the number of layers (num_layers) is 2, and bidirectional LSTM (bidirectional = True) is adopted to better capture the time information before and after. The short-term sample time series features of coal transportation vehicle A in the past month are input into the first initial prediction sub-model (LSTM layer), which can capture the queuing duration change features of coal transportation vehicle A in different short time periods and output hidden state data.

[0107] On this basis, the Transformer layer further captures the global feature dependencies. The number of heads (num_heads) of the multi-head attention mechanism is set to 8, and the dimension of the feed-forward neural network (feedforward_dim) is 256. The hidden state data output by the LSTM layer is used as the input, and feature transformation and fusion are performed through the multi-head attention mechanism and the feed-forward neural network to strengthen the learning ability of complex relationships in the sequence data. Finally, a fully connected layer (fc) is connected to map the output of the Transformer layer to the second predicted queuing duration, and the output dimension is 1. During the training process, the Stochastic Gradient Descent (SGD) optimization algorithm is adopted, and the learning rate decay strategy (such as reducing the learning rate by a certain proportion every certain number of training rounds) is combined to adjust the model parameters. At the same time, the Mean Absolute Error (MAE) index on the validation set is used to monitor the model performance, that is, the error between the second predicted queuing duration output by the second prediction sub-model and the actual queuing duration. According to the feedback of the validation set, the hyperparameters of the model (such as the number of hidden units, the number of heads, etc.) are adjusted in a timely manner to ensure that the model achieves better results in processing time series data and mining complex feature relationships.

[0108] In summary, by capturing the changing patterns of vehicle queuing duration from different perspectives in the embodiments of this specification, more accurate prediction of vehicle queuing duration is achieved. This method not only improves the accuracy and timeliness of prediction but also provides more comprehensive and powerful support for traffic management and optimization.

[0109] Furthermore, to improve the prediction accuracy of the second prediction model in practical applications, during the training process of the second prediction model, sample meteorological data can be introduced. The sample meteorological data refers to the meteorological conditions corresponding to the sample queuing duration. Correspondingly, each meteorological data in the sample meteorological data also corresponds to a timestamp. The sample meteorological data is arranged according to the order of timestamps to obtain a sample meteorological change sequence. Short-term sample meteorological sequence features corresponding to multiple time steps are extracted from the sample meteorological change sequence through a sliding window, where the time step is the same as the time step corresponding to the short-term sample time series features.

[0110] The short-term sample meteorological sequence features and the short-term sample time series features are input into the first initial prediction sub-model. The first prediction sub-model analyzes the impact of meteorological changes on the queuing duration of the target vehicle within multiple first historical time periods based on the multiple short-term sample meteorological sequence features and the short-term sample time series features and outputs hidden state data.

[0111] The hidden state data is input into the second initial prediction sub-model. The second initial prediction sub-model analyzes the queuing change trend of the target vehicle within multiple second historical time periods based on the hidden state data and outputs the second predicted queuing duration. The parameters of the second initial prediction model are adjusted based on the difference between the second predicted queuing duration and the actual queuing duration. By continuously adjusting the parameters of the model, the prediction result of the model can be made as close as possible to the actual data. The process of adjusting the parameters will also be continuously iterated multiple times until a preset stop condition is met, obtaining the second prediction model and the corresponding second weight.

[0112] It should be noted that after introducing the sample meteorological data, the training process is similar to before, but the input features are more abundant. Each meteorological data also corresponds to a timestamp. The sample meteorological data is arranged according to the order of timestamps to obtain a sample meteorological change sequence. Similar to the extraction of short-term sample time series features, using the sliding window technique, short-term sample meteorological sequence features corresponding to multiple time steps can be extracted from the sample meteorological change sequence.

[0113] In summary, through this method, the second prediction model in the embodiments of this specification can learn the impact of meteorological changes on the vehicle queuing duration, thereby further improving the accuracy and timeliness of the prediction. This method not only provides more comprehensive and powerful support for traffic management and optimization, but also can better adapt to traffic conditions under different meteorological conditions, providing more accurate and reliable prediction information for the public's travel.

[0114] Step 108: Determine the target queuing duration of the target vehicle according to the first queuing duration and the second queuing duration.

[0115] Specifically, the target queuing duration refers to the queuing duration that indicates how long the target vehicle is finally expected to wait starting from the clock-in time point.

[0116] Based on this, since two queuing durations, namely the first queuing duration and the second queuing duration, have been predicted according to different data and different analysis methods before determining the target queuing duration, when determining the target queuing duration, it is necessary to comprehensively consider these two prediction results.

[0117] Further, in order to improve the accuracy of the target queuing duration, a weighted average method can be used to fuse the first queuing duration and the second queuing duration. The step of determining the target queuing duration of the target vehicle according to the first queuing duration and the second queuing duration includes: obtaining the first weight corresponding to the first queuing duration and the second weight corresponding to the second queuing duration; weighting the first queuing duration and the second queuing duration based on the first weight and the second weight to obtain the target queuing duration of the target vehicle.

[0118] Specifically, the first weight is used to characterize the reliability corresponding to the prediction of the first queuing duration, and the second weight is used to characterize the reliability corresponding to the prediction of the second queuing duration.

[0119] Based on this, when determining the target queuing duration, it is first necessary to evaluate the reliability of the first queuing duration and the second queuing duration. This can be achieved by analyzing factors such as the performance of the prediction model, the accuracy of historical prediction data, and the quality of current data. After obtaining the first weight and the second weight, these weights can be used to perform a weighted sum of the first queuing duration and the second queuing duration, thereby obtaining the target queuing duration of the target vehicle. The specific weighting formula can be expressed as: target queuing duration = first queuing duration × first weight + second queuing duration × second weight. In this way, the advantages of the two prediction results can be comprehensively considered, improving the accuracy and reliability of the target queuing duration.

[0120] For example, continuing with the previous example, if the target vehicle is coal transport vehicle A, and the first queuing duration is 0.8 hours, the second queuing duration is 1.2 hours, and after analysis, the weight of the first queuing duration is determined to be 0.4 and the weight of the second queuing duration is 0.6, then the target queuing duration can be calculated using the following formula: Target queuing duration = 0.8 hours * 0.4 + 1.2 hours * 0.6 = 1.04 hours.

[0121] In another embodiment of this specification, the input features of the first queuing duration and the second queuing duration fusion model can also be integrated to fuse the first queuing duration and the second queuing duration, and output the target queuing duration of the target vehicle.

[0122] Specifically, the fusion model can be trained in the following manner:

[0123] First, train two basic models (the first prediction model and the second prediction model), and obtain the predicted values output by these two models during the training process respectively. The outputs of these two models are continuous values (regression tasks).

[0124] Create training samples for the fusion model: Use the outputs of the first prediction model and the second prediction model as new features. These outputs can be the predicted values of each model (including the first predicted queuing duration and the second predicted queuing duration), or features obtained after processing the predicted values by other methods (such as probability distribution). For each set of input data, create a feature vector. Each set of input data contains the first predicted value corresponding to the first prediction model and the second predicted value of the second prediction model. For example, if there are N training samples, then after training the first prediction model, two arrays will be obtained, namely the first array composed of multiple first predicted values output by the first prediction model and the second sample composed of multiple second predicted values output by the second prediction model. Merge these two arrays to form a new feature matrix.

[0125] Construct and fuse the model: The fusion model can adopt the Stacking fusion method, and use the merged feature matrix to train the meta-learner of the fusion model (such as linear regression, LightGBM, logistic regression, etc.). The goal of the fusion model is to learn how to make better predictions based on the output results of the first prediction model and the second prediction model. When training the fusion model, its inputs are the first predicted value and the second predicted value, and the label is still the original true label (i.e., the actual queuing duration in the training set).

[0126] Continuing with the above example, the outputs of the first two models: The first prediction model (XGBoost) and the second prediction model (TransLSTM) respectively output prediction results, denoted as \(y_{XGBoost}\) and \(y_{TransLSTM}\).

[0127] Construction of new features: These outputs are combined to obtain a new feature matrix in the form of \([y_{XGBoost}, y_{TransLSTM}]\).

[0128] Training of the fusion model: Use these new features to train the fusion model to obtain the fused prediction values. Based on the fused prediction values and the corresponding true labels, minimize the loss function and adjust the model parameters so that it can better fuse the prediction results of the first two models and finally make more accurate predictions.

[0129] This fusion method can be implemented through meta-learners such as linear models and tree models (e.g., LightGBM). The final fusion effect can effectively improve the prediction accuracy of the model because the meta-learner can capture the relationship between the first two models and thus make better predictions.

[0130] In summary, the embodiments of this specification capture the influencing factors and variation laws of vehicle queuing duration from multiple dimensions by constructing multiple prediction models and using different data and analysis methods. At the same time, methods such as weighted averaging are used to fuse multiple prediction results, thereby achieving accurate prediction of vehicle queuing duration. This method not only improves the accuracy and timeliness of prediction but also provides more comprehensive and powerful support for traffic management and optimization.

[0131] The following combines the attached Figure 2 , taking the application of the vehicle queuing duration prediction method provided in this specification in the coal transportation scenario as an example, to further illustrate the vehicle queuing duration prediction method. Among them, Figure 2 is a process flow chart of the processing of a vehicle queuing duration prediction method provided in an embodiment of this specification in the coal transportation scenario, specifically including the following steps.

[0132] Step 202: Obtain the target attribute data corresponding to the target vehicle and the time series associated with the entry behavior of the target vehicle. Among them, the target attribute data includes inherent attribute features, time features, environmental features, and statistical features, and the time series includes a queuing duration sequence and a meteorological change sequence.

[0133] Step 204: Input the target attribute data into the first prediction model, and capture the interaction relationship between the inherent attribute features and the waiting time of the target vehicle through the first decision tree of the first prediction model to obtain the first sub-queueing duration, where the first prediction model includes the first decision tree, the second decision tree, and the third decision tree.

[0134] Step 206: Split the time feature through the second decision tree to distinguish the difference in the waiting time of the target vehicle on holidays and non-holidays, and obtain the second sub-queueing duration.

[0135] Step 208: Analyze the difference in the queueing duration of the target vehicle under different environmental features based on the statistical features through the third decision tree to obtain the third sub-queueing duration.

[0136] Step 210: Based on the weighted sum of the first sub-queueing duration, the second sub-queueing duration, and the third sub-queueing duration, obtain the first queueing duration.

[0137] Step 212: Use a sliding window to extract the short-term meteorological change sequence features corresponding to the meteorological change sequence at multiple time steps.

[0138] Step 214: Input the short-term meteorological change sequence features into the first prediction sub-model. The first prediction sub-model analyzes the impact of meteorological changes on the queueing duration of the target vehicle in multiple first historical time periods based on the multiple short-term meteorological change sequence features and the short-term queueing duration sequence features, and outputs hidden state data.

[0139] Step 216: Input the hidden state data into the second prediction sub-model. The second prediction sub-model analyzes the queueing change trend of the target vehicle in multiple second historical time periods based on the hidden state data and outputs the second queueing duration.

[0140] Step 218: Obtain the first weight corresponding to the first queueing duration and the second weight corresponding to the second queueing duration.

[0141] Step 220: Based on the first weight and the second weight, weight the first queueing duration and the second queueing duration to obtain the target queueing duration of the target vehicle.

[0142] In summary, the embodiments of this specification can analyze the influence of different factors on the vehicle queuing duration from multiple perspectives, and fuse the prediction results by constructing multiple prediction models and using methods such as weighted average, which improves the accuracy and timeliness of the prediction. It not only considers the influence of multiple factors on the vehicle queuing duration, but also fuses the prediction results by constructing multiple prediction models and using methods such as weighted average, realizing the accurate prediction of the vehicle queuing duration. This method not only improves the accuracy and timeliness of the prediction, but also provides a more scientific basis for the arrangement and scheduling of coal transportation vehicles, helping to reduce the vehicle waiting time and improve the transportation efficiency. In practical applications, this method can be embedded in the software of traffic management systems or logistics platforms to provide real-time queuing duration prediction information for relevant practitioners.

[0143] In addition, the vehicle queuing duration prediction method provided by the embodiments of this specification is only exemplary in the application of the coal transportation scenario and is not limited thereto. This method is also applicable to other types of transportation vehicles, such as dangerous goods transportation vehicles, cold chain logistics vehicles, etc., and can exert its advantages of accurate prediction and strong timeliness under different traffic scenarios and transportation requirements.

[0144] Furthermore, in order to continuously improve the performance of the prediction model, new sample data can be continuously collected, including the attribute data of target vehicles, time series data, and the corresponding actual queuing duration, etc., for iterative training and optimization of the model. At the same time, more feature variables and advanced machine learning algorithms can also be explored to further improve the accuracy and generalization ability of the prediction.

[0145] The following Figure 3 , taking the application of the vehicle queuing duration prediction method provided by this specification in the coal transportation scenario as an example, further illustrates the model training process in the vehicle queuing duration prediction method. Among them, Figure 3 is the model training flow chart of a vehicle queuing duration prediction method in the coal transportation scenario provided by an embodiment of this specification, which specifically includes the following steps.

[0146] Step 302: Data collection.

[0147] Obtain the coal delivery order number, coal type number, and basic delivery information from the coal delivery management system, synchronize the weather condition data from the meteorological department data interface, record the vehicle entry time, current queuing time, historical queuing duration, etc. through Internet monitoring devices, and organize the data into the same format. Among them, the coal delivery order number, coal type number, basic delivery information, weather condition data, etc. all belong to the initial sample attribute data, and the vehicle entry time or current queuing time is equivalent to the time stamp in the foregoing embodiments.

[0148] Step 304: Data preprocessing.

[0149] Data preprocessing includes data cleaning, data standardization, and encoding. Data preprocessing includes outlier handling (screening and removing abnormal queuing time data based on the 3σ principle, etc.) and duplicate data removal. The standardization of numerical data is achieved through the Z-score standardization method (the formula is: where μ is the mean and σ is the standard deviation), which transforms the data into a standard normal distribution with a mean of 0 and a standard deviation of 1. This eliminates the dimension difference and improves the model convergence speed and training effect. Encoding of categorical data: For categorical data such as coal type numbers and transportation companies, the One-Hot Encoding technique is used. For example, assuming there are 10 different coal type numbers, each number is transformed into a binary vector of length 10, with the corresponding position being 1 and the rest being 0, enabling the model to handle such non-numerical features.

[0150] Step 306: Feature engineering.

[0151] Feature engineering is to perform feature extraction and feature screening on the initial sample attribute data, time series, etc. before inputting them into the model. Feature extraction includes extracting time-related features, queue-related features, coal type-related features, time period features, etc. Feature screening is to calculate the linear correlation between each feature and the target queuing waiting time using the Pearson Correlation Coefficient, and consider the non-linear correlation between each feature and the target queuing waiting time in combination with the Spearman's Rank Correlation Coefficient, conduct feature importance evaluation, and screen out features with an absolute value of correlation greater than the set threshold, initially excluding features with weak relevance to the target.

[0152] Step 308: XGBoost model.

[0153] The XGBoost model is a specific form of the first prediction model in the foregoing embodiments. Before model training, the parameters of the XGBoost model need to be initialized first. For example: set the maximum depth of the tree (max_depth): 6, set the learning rate (learning_rate): 0.1, set the number of estimators: 150, set the objective function (objective) to reg:squarederror (for regression tasks), select the coal delivery note number, coal type number, and queuing time as inputs, convert the input format into the Dmatrix data structure required by XGBoost through code, and the model output is the predicted value of the first queuing duration.

[0154] Step 310: TransLSTM model.

[0155] The TransLSTM model is a specific implementation of the second prediction model in the foregoing embodiments. It embeds a Transformer layer in the LSTM network. The LSTM layer is used to capture local feature dependencies, and the Transformer layer is used to capture global feature dependencies. Before training the TransLSTM model, the parameters also need to be initialized first. For example, set the LSTM layer, set the number of hidden units (hidden_size): 128, set the number of layers (num_layers): 2, use bidirectional LSTM (bidirectional = True). The input of the LSTM layer is the time series feature data after preprocessing and feature engineering, and the output is the hidden state representation. Set the number of heads (num_heads) of the multi-head attention mechanism of the Transformer layer: 8, set the dimension of the feedforward neural network (feedforward_dim), example value, 256. Use the hidden state output by the LSTM layer as the input, and perform feature transformation and fusion through the multi-head attention mechanism and the feedforward neural network. The fully connected layer (fc) maps the output of the Transformer layer to the second queuing duration prediction value, and the output dimension is 1.

[0156] Step 312: Prediction.

[0157] Perform a weighted sum of the first queuing duration prediction value output by the XGBoost model and the second queuing duration prediction value output by the TransLSTM model. Among them, the weights of the XGBoost model and the TransLSTM model are determined in the following way. The performance of the two models is evaluated separately on the validation set (such as by calculating metrics such as MSE and MAE), and different weights are assigned according to the performance. For example, if the MSE of the XGBoost model on the validation set is 10, the reciprocal is 0.1, and the MSE of the TransLSTM model is 8, the reciprocal is 0.125. The sum of the reciprocals is 0.225. Perform normalization calculation, that is, determine the ratios of each reciprocal to the sum as 0.444 and 0.556 respectively. After normalization calculation and rounding, the weight of the XGBoost model can be assigned as 0.4, and the weight of the TransLSTM model is 0.6. During actual prediction, multiply the outputs of the two models by their respective weights and then add them to obtain the final predicted value of the truck queuing waiting time.

[0158] In summary, the embodiments of this specification accurately predict the vehicle queuing duration by comprehensively considering various factors and using advanced machine learning algorithms. By constructing an XGBoost model, the interaction relationships between the inherent attribute features, time features, and statistical features and the waiting time of the target vehicle are captured. At the same time, the TransLSTM model is used to analyze the impact of meteorological changes on the queuing duration and the changes in the queuing trend in time series data. These two models predict the vehicle queuing duration from the perspectives of static features and dynamic features respectively, providing rich prediction information for the subsequent fusion model. Then, by further integrating the output results of XGBoost and TransLSTM and using methods such as weighted average, more accurate prediction results are obtained. This fusion strategy not only improves the prediction accuracy but also enhances the robustness of the model, enabling it to maintain stable prediction performance under different traffic conditions and weather conditions.

[0159] Corresponding to the above method embodiments, this specification also provides embodiments of a vehicle queuing duration prediction device. Figure 4 The structural schematic diagram of a vehicle queuing duration prediction device provided by an embodiment of this specification is shown. As Figure 4 shown, the device includes:

[0160] A data acquisition module 402, configured to obtain target attribute data corresponding to a target vehicle and a time series associated with the entry behavior of the target vehicle, where the target attribute data refers to attribute data related to the target vehicle and affecting the queuing duration of the target vehicle, and the time series includes multiple historical change data affecting the queuing duration of the target vehicle;

[0161] A first data processing module 404, configured to analyze the correlation between the target attribute data and the queuing duration of the target vehicle based on the target attribute data and predict a first queuing duration;

[0162] A second data processing module 406, configured to analyze the change pattern of the multiple historical change data based on the time series and predict a second queuing duration;

[0163] A data fusion module 408, configured to determine the target queuing duration of the target vehicle according to the first queuing duration and the second queuing duration.

[0164] The target attribute data includes inherent attribute features, time features, environmental features, and statistical features;

[0165] The first data processing module 404 is further configured to:

[0166] Input the target attribute data into the first prediction model, and capture the interaction relationship between the inherent attribute features and the waiting time of the target vehicle through the first decision tree of the first prediction model to obtain the first sub-queueing duration, where the first prediction model includes the first decision tree, the second decision tree, and the third decision tree;

[0167] Split the time feature through the second decision tree to distinguish the difference in the waiting time of the target vehicle on holidays and non-holidays, and obtain the second sub-queueing duration;

[0168] Analyze the difference in the queueing duration of the target vehicle under different environmental features based on the statistical features through the third decision tree to obtain the third sub-queueing duration;

[0169] Based on the weighted sum of the first sub-queueing duration, the second sub-queueing duration, and the third sub-queueing duration, obtain the first queueing duration.

[0170] The second data processing module 406 is further configured as:

[0171] Input the time series into the second prediction model, and analyze the short-term change law and long-term change law of the multiple historical change data through the second prediction model, and output the second queueing duration.

[0172] The time series includes a queueing duration sequence, and the second prediction model includes a first prediction sub-model and a second prediction sub-model;

[0173] The second data processing module 406 includes:

[0174] A feature extraction sub-module, configured to extract short-term queueing duration sequence features corresponding to the queueing duration sequence at multiple time steps by using a sliding window;

[0175] A first prediction sub-module, configured to input the short-term queueing duration sequence features into the first prediction sub-model, and the first prediction sub-model analyzes the queueing change trend of the target vehicle in multiple first historical time periods based on the multiple short-term queueing duration sequence features and outputs hidden state data;

[0176] A second prediction sub-module, configured to input the hidden state data into the second prediction sub-model, and the second prediction sub-model analyzes the queueing change trend of the target vehicle in multiple second historical time periods based on the hidden state data and outputs the second queueing duration.

[0177] The time series includes a meteorological change sequence;

[0178] The feature extraction sub-module is further configured to extract short-term meteorological change sequence features corresponding to the meteorological change sequence at multiple time steps by using a sliding window;

[0179] The first prediction sub-module is further configured to input the short-term meteorological change sequence features into a first prediction sub-model, and the first prediction sub-model analyzes the influence of meteorological changes on the queuing duration of the target vehicle within multiple first historical time periods based on the multiple short-term meteorological change sequence features and the short-term queuing duration sequence features, and outputs hidden state data;

[0180] The second prediction sub-module is further configured to input the hidden state data into a second prediction sub-model, and the second prediction sub-model analyzes the queuing change trend of the target vehicle within multiple second historical time periods based on the hidden state data, and outputs a second queuing duration.

[0181] The data fusion module 408 is further configured to:

[0182] Obtain a first weight corresponding to the first queuing duration and a second weight corresponding to the second queuing duration;

[0183] Based on the first weight and the second weight, perform weighting on the first queuing duration and the second queuing duration to obtain the target queuing duration of the target vehicle.

[0184] The first data processing module 404 further includes:

[0185] The first model training sub-module is configured to:

[0186] Obtain the sample queuing duration of the target vehicle and corresponding initial sample attribute data, where the initial sample attribute data corresponding to each sample queuing duration includes multiple different types of sub-sample attribute data;

[0187] Perform feature screening on the initial sample attribute data to obtain target sample attribute data;

[0188] Train a first initial prediction model based on the sample queuing duration and the target sample attribute data to obtain the first prediction model and its corresponding first weight.

[0189] The first model training sub-module is further configured to:

[0190] Calculate the correlation between the sub-sample attribute data and the corresponding sample queuing duration;

[0191] Determine the sub-sample attribute data with a correlation greater than the correlation threshold as the target sample attribute data.

[0192] The first model training sub-module is further configured to:

[0193] Standardize the target sample attribute data to obtain target sample features;

[0194] Call the first initial prediction model to analyze the correlation between the target sample features of different types and the sample queuing waiting time of the target vehicle in different dimensions, and obtain the first predicted queuing time;

[0195] Calculate the loss value between the first predicted queuing time and the sample queuing time, and adjust the first initial prediction model based on the loss value until the preset stop condition is met to obtain the first prediction model;

[0196] Evaluate the prediction accuracy of the first prediction model based on the sample queuing time, and assign a first weight to the first prediction model.

[0197] The second data processing module 406 further includes:

[0198] A second model training module, configured to:

[0199] Obtain the sample queuing time and the corresponding timestamp;

[0200] Construct short-term time series features based on the sample queuing time and the timestamp;

[0201] Train the second initial prediction model through the short-term time series features to obtain the second prediction model and its corresponding second weight.

[0202] The second model training module is further configured to:

[0203] Arrange the sample queuing time according to the timestamp to obtain a sample time series;

[0204] Use a sliding window to extract short-term sample time series features corresponding to multiple time steps of the sample time series.

[0205] The second model training module is further configured to:

[0206] Input the short-term sample time series features into the first initial prediction sub-model, and the first initial prediction sub-model analyzes the queuing change trend of the target vehicle in multiple first historical time periods based on the multiple short-term sample time series features and outputs hidden state data;

[0207] Input the hidden state data into the second prediction sub-model, and the second prediction sub-model analyzes the queuing change trend of the target vehicle in multiple second historical time periods based on the hidden state data and outputs the second predicted queuing time corresponding to the sample timestamp;

[0208] Adjust the parameters of the second initial prediction model based on the difference between the sample queuing duration corresponding to the sample timestamp and the second queuing duration until a preset stop condition is met, and obtain the second prediction model.

[0209] The above is a schematic solution of a vehicle queuing duration prediction device according to this embodiment. It should be noted that the technical solution of the vehicle queuing duration prediction device and the technical solution of the above vehicle queuing duration prediction method belong to the same concept. For the details not described in the technical solution of the vehicle queuing duration prediction device, reference can be made to the description of the technical solution of the above vehicle queuing duration prediction method.

[0210] Figure 5 FIG. shows a structural block diagram of a computing device 500 according to an embodiment of the present specification. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 through a bus 530, and a database 550 is used to store data.

[0211] The computing device 500 further includes an access device 540, and the access device 540 enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interfaces (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC).

[0212] In an embodiment of the present specification, the above components of the computing device 500 and Figure 5 other components not shown in the figure may also be connected to each other, for example, through a bus. It should be understood that Figure 5The block diagram of the computing device shown is for illustrative purposes only and is not a limitation on the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0213] The computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 500 can also be a mobile or stationary server.

[0214] Among them, the processor 520 is used to execute the following computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the above vehicle queuing duration prediction method are implemented.

[0215] The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above vehicle queuing duration prediction method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the description of the technical solution of the above vehicle queuing duration prediction method.

[0216] An embodiment of this specification also provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the above vehicle queuing duration prediction method are implemented.

[0217] The above is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above vehicle queuing duration prediction method belong to the same concept. For the details not described in detail in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above vehicle queuing duration prediction method.

[0218] An embodiment of this specification also provides a computer program, wherein when the computer program is executed on a computer, the computer is made to execute the steps of the above vehicle queuing duration prediction method.

[0219] The above is a schematic solution of a computer program in this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the above vehicle queuing duration prediction method belong to the same concept. For the details not described in detail in the technical solution of the computer program, reference can be made to the description of the technical solution of the above vehicle queuing duration prediction method.

[0220] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0221] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, removable hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0222] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of this specification are not limited by the described order of actions, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.

[0223] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0224] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The alternative embodiments do not elaborate on all the details and do not limit the invention to only the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can well understand and utilize this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A method for predicting vehicle queue duration, characterized in that: include: Obtain target attribute data corresponding to a target vehicle and a time series associated with the entry behavior of the target vehicle, wherein the target attribute data refers to attribute data related to the target vehicle and affecting the queuing time of the target vehicle, and the time series includes a plurality of historical change data affecting the queuing time of the target vehicle; Based on the target attribute data, analyzing the correlation between the target attribute data and the queue duration of the target vehicle, and predicting the first queue duration; Based on the time series, analyzing the change rules of the plurality of historical change data, and predicting the second queue duration; A target queuing time of the target vehicle is determined according to the first queuing time and the second queuing time.

2. The method for predicting vehicle queue duration according to claim 1, characterized in that: The target attribute data includes inherent attribute characteristics, time characteristics, environmental characteristics and statistical characteristics; The step of analyzing the correlation between the target attribute data and the queuing time of the target vehicle based on the target attribute data to predict the first queuing time includes: Inputting the target attribute data into a first prediction model, capturing the interaction between the inherent attribute characteristics and the waiting time of the target vehicle through a first decision tree of the first prediction model, and obtaining a first sub-queue duration, wherein the first prediction model includes the first decision tree, the second decision tree, and the third decision tree; Splitting the time feature through the second decision tree, distinguishing the difference in waiting time of the target vehicle on holidays and non-holidays, and obtaining the second sub-queue duration; Analyzing the difference in queuing time of the target vehicle under different environmental characteristics based on the statistical characteristics through the third decision tree to obtain a third sub-queuing time; A first queuing time is obtained based on a weighted sum of the first sub-queue time, the second sub-queue time and the third sub-queue time.

3. The method for predicting vehicle queue duration according to claim 1, characterized in that: The step of analyzing the change rules of the plurality of historical change data based on the time series and predicting the second queue duration includes: The time series is input into a second prediction model, and the short-term change rules and long-term change rules of the plurality of historical change data are analyzed by the second prediction model to output a second queuing duration.

4. The method for predicting vehicle queue duration according to claim 3, characterized in that: The time series includes a queuing duration series, and the second prediction model includes a first prediction sub-model and a second prediction sub-model; The step of inputting the time series into a second prediction model, analyzing the short-term change rules and the long-term change rules of the plurality of historical change data by the second prediction model, and outputting a second queuing duration includes: Using a sliding window to extract short-term queue duration sequence features corresponding to the queue duration sequence at multiple time steps; Inputting the short-term queue duration sequence features into a first prediction sub-model, the first prediction sub-model analyzing the queue change trend of the target vehicle in multiple first historical time periods based on the multiple short-term queue duration sequence features and outputting implicit state data; The implicit state data is input into a second prediction sub-model, and the second prediction sub-model analyzes the queue change trend of the target vehicle in multiple second historical time periods based on the implicit state data, and outputs a second queue duration.

5. The method for predicting vehicle queue duration according to claim 3, characterized in that: The time series includes a meteorological change series; The step of inputting the time series into a second prediction model, analyzing the short-term change rules and the long-term change rules of the plurality of historical change data by the second prediction model, and outputting a second queuing duration includes: Using a sliding window to extract short-term meteorological change sequence features corresponding to the meteorological change sequence at multiple time steps; The short-term weather change sequence features are input into a first prediction sub-model, and the first prediction sub-model analyzes the impact of the weather changes of the target vehicle in multiple first historical time periods on the queue duration based on the multiple short-term weather change sequence features and the short-term queue duration sequence features, and outputs implicit state data; The implicit state data is input into a second prediction sub-model, and the second prediction sub-model analyzes the queue change trend of the target vehicle in multiple second historical time periods based on the implicit state data, and outputs a second queue duration.

6. The method for predicting vehicle queue duration according to claim 1, characterized in that: The step of determining a target queuing time of the target vehicle according to the first queuing time and the second queuing time includes: Obtain a first weight corresponding to the first queuing time and a second weight corresponding to the second queuing time; The first queuing time and the second queuing time are weighted based on the first weight and the second weight to obtain a target queuing time of the target vehicle.

7. The method for predicting vehicle queue duration according to claim 2, characterized in that: The first prediction model training steps are as follows: Obtaining the sample queuing time and the corresponding initial sample attribute data of the target vehicle, wherein the initial sample attribute data corresponding to each sample queuing time includes a plurality of sub-sample attribute data of different types; Performing feature screening on the initial sample attribute data to obtain target sample attribute data; The first initial prediction model is trained based on the sample queuing time and the target sample attribute data to obtain the first prediction model and its corresponding first weight.

8. The method for predicting vehicle queue duration according to claim 7, characterized in that: The step of performing feature screening on the initial sample attribute data to obtain target sample attribute data includes: Calculating the correlation between the sub-sample attribute data and the corresponding sample queuing time; The sub-sample attribute data whose correlation is greater than the correlation threshold is determined as the target sample attribute data.

9. The method for predicting vehicle queue duration according to claim 7, characterized in that: The training of the first initial prediction model based on the sample queuing time and the target sample attribute data to obtain the first prediction model and its corresponding first weight includes: Standardizing the target sample attribute data to obtain target sample features; Calling the first initial prediction model to analyze the correlation between the different types of target sample features and the sample queue waiting time of the target vehicle in different dimensions, and obtaining a first predicted queue waiting time; Calculating a loss value between the first predicted queuing time and the sample queuing time, and adjusting the first initial prediction model based on the loss value until a preset stop condition is met, thereby obtaining the first prediction model; The prediction accuracy of the first prediction model is evaluated based on the sample queuing time, and a first weight is assigned to the first prediction model.

10. The method for predicting vehicle queue duration according to claim 4, characterized in that: The second prediction model training steps are as follows: Get the sample queue duration and the corresponding timestamp; Constructing a short-term time series feature based on the sample queuing time and the timestamp; The second initial prediction model is trained using the short-term time series features to obtain the second prediction model and its corresponding second weight.

11. The method for predicting vehicle queue duration according to claim 10, characterized in that: The constructing of short-term time series features based on the sample queuing time and the timestamp includes: Arrange the sample queuing time according to the timestamps to obtain a sample time series; A sliding window is used to extract short-term sample time series features corresponding to multiple time steps of the sample time series.

12. The method for predicting vehicle queue duration according to claim 11, characterized in that: The step of training the second initial prediction model by using the short-term time series features to obtain the second prediction model and its corresponding second weight includes: Inputting the short-term sample time series features into a first initial prediction sub-model, the first initial prediction sub-model analyzing the queue change trend of the target vehicle in multiple first historical time periods based on the multiple short-term sample time series features and outputting implicit state data; The implicit state data is input into a second prediction sub-model, and the second prediction sub-model analyzes the queue change trend of the target vehicle in multiple second historical time periods based on the implicit state data, and outputs a second predicted queue duration corresponding to the sample timestamp; The parameters of the second initial prediction model are adjusted based on the difference between the sample queuing time corresponding to the sample timestamp and the second queuing time until a preset stop condition is met to obtain the second prediction model.

13. A vehicle queue duration prediction device, characterized in that: include: A data acquisition module is configured to obtain target attribute data corresponding to a target vehicle and a time series associated with the entry behavior of the target vehicle, wherein the target attribute data refers to attribute data related to the target vehicle and affecting the queuing time of the target vehicle, and the time series includes a plurality of historical change data affecting the queuing time of the target vehicle; A first data processing module is configured to analyze the correlation between the target attribute data and the queue duration of the target vehicle based on the target attribute data, and predict a first queue duration; A second data processing module is configured to analyze the change rules of the plurality of historical change data based on the time series and predict the second queuing time; The data fusion module is configured to determine a target queuing time of the target vehicle according to the first queuing time and the second queuing time.

14. A computing device, characterized in that include: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the vehicle queue duration prediction method described in any one of claims 1 to 12 are implemented.

15. A computer-readable storage medium, characterized in that: It stores computer executable instructions, which, when executed by a processor, can implement the steps of the vehicle queue duration prediction method described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • A queuing peak period estimation method based on big data and a machine learning algorithm

    CN109902859A

  • Freight vehicle warehouse lingering duration prediction method based on attention mechanism

    CN114037139A

  • Branch queuing information prediction method and device

    CN115130783A

  • Toll station vehicle queuing length prediction method, device and equipment and storage medium

    CN115578854A

  • Reducing waiting times using queuing networks

    US20210097637A1

Cited By

  • No-interface doctor-seeing number reporting control method, storage medium, system and number reporting machine

    CN120565008A

  • Interface-free medical consultation number reporting control method, storage medium, system and number reporting machine

    CN120565008B

  • Engineering machinery queuing duration prediction method and device and medium

    CN120781313A