Coal transportation quantity prediction method and coal transportation quantity prediction model training method and device
Patent Information
- Application Number
- CN202611167829.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]然而,上述技术方案在实际应用中仍存在显著的技术问题,例如预测准确性差、计划制定效率低、产销运环节脱节、数据无法量化分析与追溯等,难以满足煤矿企业精细化管理与智能化决策的需求
[0011]根据本说明书实施例的第六方面,提供了一种计算机可读存储介质,其存储有计算机程序/指令,该程序/指令被处理器执行时实现上述方法的步骤。
Smart Images

Figure CN123014302A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a method for predicting coal transportation volume, a method for training a coal transportation volume prediction model, a coal transportation volume prediction device, and a coal transportation volume prediction model training device. Background Technology
[0002] With the rapid development of internet information technology, the digital transformation of the coal industry is accelerating, and the integrated management of coal mine production, sales, transportation, and storage is placing higher demands on data-driven, precise decision-making. Monthly coal transportation volume forecasting, as the core basis for coal mine production planning, transportation resource allocation, and customer delivery fulfillment, directly relates to enterprise operational efficiency and economic benefits.
[0003] Currently, coal transportation volume forecasting and planning mainly rely on manual experience estimation and manual statistics using Excel. The sales department manually estimates next month's sales volume by comparing month-on-month or year-on-year figures; production, transportation, and dispatching stations each independently formulate their own plans; the forecasting process only considers two core factors: historical sales volume and contract volume; all data is stored in Excel spreadsheets or paper reports.
[0004] However, the aforementioned technical solutions still have significant technical problems in practical applications, such as poor forecast accuracy, low planning efficiency, disconnect between production, sales, and transportation, and the inability to quantify, analyze, and trace data. These issues make it difficult to meet the needs of coal mining enterprises for refined management and intelligent decision-making. Therefore, a more flexible, accurate, and efficient coal transportation volume forecasting solution is urgently needed. Summary of the Invention
[0005] In view of this, embodiments of this specification provide a method for predicting coal transportation volume and a method for training a coal transportation volume prediction model. One or more embodiments of this specification also relate to a coal transportation volume prediction device, a coal transportation volume prediction model training device, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0006] According to a first aspect of the embodiments of this specification, a method for predicting coal transportation volume is provided, comprising: Acquire target coal data across multiple business dimensions; Based on the preprocessing strategy corresponding to the coal data distribution rules, the target coal data is preprocessed to obtain the target coal processing dataset. The preprocessing strategy is consistent with the preprocessing strategy in the training phase. Based on the relevant influencing factors of coal transportation volume, feature construction is performed on the target coal processing dataset to obtain the target coal feature set, which includes target coal feature data under the relevant influencing factors. Input the target coal characteristic data under relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle.
[0007] According to a second aspect of the embodiments of this specification, a training method for a coal transportation volume prediction model is provided, comprising: Obtain historical coal data and corresponding coal transportation volume tags across multiple business dimensions; Based on the preprocessing strategy corresponding to the coal data distribution rules, historical coal data is preprocessed to obtain a sample coal processing dataset. Based on the relevant influencing factors of coal transportation volume, feature construction is performed on the sample coal processing dataset to obtain the sample coal feature set, which includes sample coal feature data under the relevant influencing factors and the corresponding coal transportation volume label. Based on the sample coal characteristic data under relevant influencing factors and the corresponding coal transportation volume labels, the initial coal transportation volume prediction model is trained until the training stops, and the target coal transportation volume prediction model is obtained. The target coal transportation volume prediction model is used to execute the above coal transportation volume prediction method.
[0008] According to a third aspect of the embodiments of this specification, a coal transportation volume prediction device is provided, comprising: The first acquisition module is configured to acquire target coal data across multiple business dimensions. The first preprocessing module is configured to preprocess the target coal data based on the preprocessing strategy corresponding to the coal data distribution rules to obtain the target coal processing dataset. The preprocessing strategy is consistent with the preprocessing strategy in the training phase. The first feature construction module is configured to construct features on the target coal processing dataset based on relevant influencing factors of coal transportation volume, and obtain the target coal feature set, wherein the target coal feature set includes target coal feature data under relevant influencing factors. The prediction module is configured to input the target coal characteristic data under relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle.
[0009] According to a fourth aspect of the embodiments of this specification, a training apparatus for a coal transportation volume prediction model is provided, comprising: The second acquisition module is configured to acquire historical coal data and corresponding coal transportation volume tags under multiple business dimensions. The second preprocessing module is configured to preprocess historical coal data based on the preprocessing strategy corresponding to the coal data distribution rules to obtain a sample coal processing dataset. The second feature construction module is configured to construct features on the sample coal processing dataset based on the relevant influencing factors of coal transportation volume, and obtain the sample coal feature set, which includes sample coal feature data under the relevant influencing factors and the corresponding coal transportation volume label. The training module is configured to train the initial coal transportation volume prediction model based on the sample coal feature data under relevant influencing factors and the corresponding coal transportation volume labels until the training stops, thereby obtaining the target coal transportation volume prediction model. The target coal transportation volume prediction model is used to execute the above-mentioned coal transportation volume prediction method.
[0010] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which implement the steps of the above method when executed by the processor.
[0011] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0012] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0013] The coal transportation volume forecasting method provided in this manual can flexibly adapt to the data foundation and business needs of different coal mining enterprises by acquiring target coal data from multiple business dimensions, avoiding information gaps caused by a single data source. By adopting a preprocessing strategy consistent with the training phase, it can eliminate the distribution bias between the input data and training data in the forecasting phase, ensuring the accuracy of the forecast results. By constructing features based on relevant influencing factors, the model can comprehensively capture the key factors affecting transportation volume, further improving forecast accuracy. By inputting feature data into the forecasting model, it can achieve automated forecasting of coal transportation volume, replacing the traditional extensive mode that relies on manual experience estimation, and significantly improving forecasting efficiency. Thus, this manual provides a more flexible, accurate, and efficient coal transportation volume forecasting solution. Attached Figure Description
[0014] Figure 1 This is a flowchart of a coal transportation volume prediction method provided in one embodiment of this specification; Figure 2 This is a flowchart of a coal transportation volume prediction model training method provided in one embodiment of this specification; Figure 3 This is a schematic diagram of the framework of a coal transportation volume prediction method provided in one embodiment of this specification; Figure 4 This is a schematic diagram of the structure of a coal transportation volume prediction device provided in one embodiment of this specification; Figure 5 This is a schematic diagram of a coal transportation volume prediction model training device provided in one embodiment of this specification; Figure 6 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0015] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0016] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as 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 indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0017] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0018] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0019] Dispatch cycle: refers to the time unit for forecasting and planning coal transportation volume. In the embodiments of this specification, the dispatch cycle is illustrated using the most commonly used monthly period as an example. However, in actual applications, the dispatch cycle can optionally be a longer or shorter time granularity, such as weekly, ten-day, quarterly, or annually, or other cycles customized according to actual business needs. This specification does not impose any restrictions on this.
[0020] Coal transportation volume refers to the quantity of coal actually shipped or sold from coal mines via rail, road, or other transportation methods within a single scheduling cycle. Coal transportation volume is a core indicator in coal mine production, sales, and transportation management, directly impacting production planning, transportation resource allocation, and customer delivery fulfillment.
[0021] Relevant influencing factors refer to various factors that affect coal transportation volume. In the embodiments of this specification, relevant influencing factors may include time characteristic factors, lag characteristic factors, operational characteristic factors, and constraint characteristic factors, etc. However, in actual applications, optional factors may be added, combined, or adjusted according to specific forecasting scenarios and data conditions. This specification does not impose any restrictions on this.
[0022] Mean Absolute Percentage Error (MAPE) is a commonly used metric for measuring forecast accuracy, used to assess the relative deviation between predicted and actual values. MAPE is calculated as follows: for n samples, calculate the ratio of the absolute value of the forecast error to the actual value for each sample, then take the average and multiply by 100%. A smaller MAPE value indicates higher forecast accuracy.
[0023] Currently, coal transportation volume forecasting and planning mainly rely on manual estimation based on experience and manual statistics using Excel. The sales department manually estimates next month's sales volume by comparing month-on-month or year-on-year figures; production, transportation, and dispatching stations each independently formulate their own plans; the forecasting process simply considers two core factors: historical sales volume and contract volume; all data is stored in Excel spreadsheets or paper reports. Even when using computer-aided forecasting models, the forecasts are merely fitted and extrapolated from a single historical sales volume series. The input features are limited in scope and cannot capture the comprehensive impact of multiple factors on transportation volume, thus the accuracy of the forecast results remains significantly limited.
[0024] In view of this, this specification provides a method for predicting coal transportation volume, and also relates to a training method for a coal transportation volume prediction model, a coal transportation volume prediction device, a coal transportation volume prediction model training device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0025] See Figure 1 , Figure 1 This specification shows a flowchart of a coal transportation volume prediction method according to an embodiment, which specifically includes the following steps: Step 102: Obtain target coal data across multiple business dimensions.
[0026] First, let's further explain the key terms involved in this step: Multiple business dimensions refer to the various data sources and business areas involved in coal transportation operations. In the embodiments of this specification, multiple business dimensions may include internal operation dimensions, transportation constraint dimensions, external market dimensions, policy and regulatory dimensions, and time characteristic dimensions, etc. However, in actual applications, optional additions, reductions, or adjustments to the types and numbers of dimensions can be made according to specific business scenarios, and this specification does not impose any restrictions on this.
[0027] Target coal data refers to the multi-dimensional data related to the scheduling cycle to be predicted that needs to be input into the model during the forecasting phase. Target coal data can come from a coal business database, or from other data storage systems or data interfaces. In the embodiments of this specification, target coal data is illustrated using five major categories and dozens of indicators, including internal operational data, transportation constraint data, external market data, policy and regulatory data, and time characteristic data. However, in actual applications, it can be flexibly expanded or adjusted according to specific business scenarios and data availability, and this specification does not impose any restrictions on this.
[0028] The coal business database refers to the collective name for all data sources used to obtain coal business-related data. It simply requires the ability to retrieve coal data across multiple business dimensions according to the configured data categories. In practical applications, different categories of coal data can be retrieved from the coal business database in different ways: internal operational data can be retrieved via database reads, such as from relational databases (e.g., MySQL, PostgreSQL), non-relational databases (e.g., MongoDB), data warehouses (e.g., Hive), Excel spreadsheets, or CSV files; transportation constraint data can be retrieved via system interface calls; external market data can be retrieved via platform interface calls; policy and regulatory data can be retrieved via data interfaces; and time-related data can be retrieved via local configuration. These various sources can be flexibly combined according to actual business needs and all fall within the scope of the coal business database. In practical applications, as long as data can be retrieved from the corresponding data sources according to the configured data categories, this manual does not restrict the specific implementation form of the coal business database.
[0029] The configured data categories refer to the pre-defined data retrieval rules, which specify which categories of data to retrieve from the coal business database. The configuration can be a static configuration file or a dynamic configuration interface, allowing for flexible adjustments to the retrieval scope based on business needs.
[0030] Target coal data refers to the multi-dimensional data related to the scheduling cycle to be predicted, which needs to be input into the model during the prediction phase. Target coal data can be sourced from a coal business database. In practical applications, acquiring target coal data across multiple business dimensions allows for the retrieval of relevant data from the coal business database according to actual business needs and prediction objectives, based on the configured data categories. Obtaining target coal data across multiple business dimensions provides a comprehensive data foundation for subsequent preprocessing, feature construction, and model prediction.
[0031] Acquiring target coal data across multiple business dimensions is the data foundation for subsequent preprocessing, feature construction, and model prediction. In one implementation, target coal data can be directly read from a coal business database, allowing all necessary multi-business dimension data to be obtained at once through a unified database access interface. In another implementation, target coal data can be imported from external data sources, such as third-party data platforms or partner systems, and merged with locally stored data to form a complete multi-business dimension dataset. Both implementation methods can achieve the data acquisition operation in this step, and those skilled in the art can flexibly choose according to the actual data environment.
[0032] Furthermore, in one implementation, the target coal data under multiple business dimensions includes at least one of internal operational data, transportation constraint data, external market data, policy and regulatory data, and time characteristic data; obtaining the target coal data under multiple business dimensions includes at least one of the following: obtaining the corresponding internal operational data through database reading based on each configured internal operational data category; obtaining the corresponding transportation constraint data through system interface calls based on each configured transportation constraint data category; obtaining the corresponding external market data through platform interface calls based on each configured external market data category; obtaining the corresponding policy and regulatory data through data interfaces based on each configured policy and regulatory data category; and obtaining the corresponding time characteristic data through local configuration reading based on each configured time characteristic data category.
[0033] In this embodiment, five categories and 36 items are used as an example for explanation. The following describes how data is obtained from the corresponding data sources according to the configured data categories.
[0034] Taking internal operational data as an example, based on the configured internal operational data categories, structured data such as historical transport volume, historical sales volume, signed contract volume, monthly approved capacity, beginning / ending inventory, washing capacity, equipment maintenance plan, and contract fulfillment rate for each coal type from the coal business database are obtained through database reading. Historical transport volume refers to the actual amount of coal shipped in each past scheduling cycle. For example, executing the SQL query "SELECT monthly_volume FROM coal_transport WHERE mine_id='M001' AND dateBETWEEN '2023-01-01' AND '2025-12-31'" from the coal business database retrieves the monthly transport volume data for a certain coal mine over the past 36 months, with the most recent month's volume being 152,000 tons. Beginning inventory refers to the coal inventory at the start of the scheduling cycle. For example, querying the inventory ledger shows that a certain coal mine's beginning inventory for this month is 38,000 tons, and its ending inventory is 41,000 tons.
[0035] Taking transportation constraint data as an example, based on the configured transportation constraint data categories, the system retrieves data such as the monthly train approval volume and approval success rate of each railway bureau from the railway dispatching system via system interface calls; it also retrieves data such as the monthly dispatching capacity, maximum storage capacity, and current storage volume of each dispatching station from the dispatching station management system via system interface calls; and it retrieves data such as highway transportation routes and capacity restrictions from the highway transportation management system. Specifically, the railway train approval volume refers to the maximum monthly loading quantity approved by the railway department. For example, calling the monthly plan query interface of the railway dispatching system returns JSON data {"station":"East Station","month":"2026-01","train_limit":45,"avg_load":3500}, indicating that a certain railway bureau's maximum train approval volume this month is 45 trains, with an average load of 3500 tons per train, and the approval success rate last month was 92%.
[0036] Taking external market data as an example, based on the configured external market data categories, data such as coal pithead price, port price, and industry price index are obtained from coal price index platforms (such as China Coal Market Network) via platform interface calls; downstream thermal power generation data is obtained from power industry data platforms; crude steel production data is obtained from the Iron and Steel Industry Association via system interface calls; chemical industry operating rate data is obtained from the Chemical Industry Association; and data such as the output of surrounding coal mines and the monthly arrival volume of imported coal are obtained from surrounding coal mines and customs via data interfaces. Among these, the port price can be the closing price of 5500 kcal thermal coal at Qinhuangdao Port. For example, calling the real-time market data interface of the price index platform returns the average price of 720 yuan per ton for the previous month.
[0037] Taking policy and regulatory data as an example, based on the configured policy and regulatory data categories, data such as safety inspection plans, environmental protection production restriction ratios, energy consumption dual control requirements, coal supply guarantee policies, and adjustments to imported coal policies are obtained from government regulatory departments or public government affairs platforms through data interfaces. Specifically, the environmental protection production restriction ratio can be the percentage of coal mine production reduction required by local governments during a specific period. For example, by calling the environmental protection production restriction announcement interface of the emergency management department, data can be obtained showing that a certain region requires coal mines to reduce production by 20% during a heavy pollution weather emergency response.
[0038] Taking time-related data as an example, based on the configured time-related data categories, the system retrieves data such as the predicted month's season, month, number of working days, holiday schedule, whether it is the heating season / summer peak electricity consumption period, and whether it is the end of the quarter / year from the system calendar configuration file through local configuration reading. Among them, the heating season identifier is automatically generated according to the month configuration rules (1 for November to March of the following year, and 0 for other months), and the end of the quarter identifier is automatically generated according to the month configuration rules (1 for March, June, September, and December, and 0 for other months).
[0039] The above five categories and 36 specific data items cover the main factors affecting coal transportation volume, providing a complete data foundation for subsequent preprocessing and feature construction.
[0040] It should be noted that the above five categories and 36 items are only one preferred method. In actual application, only some categories of the above acquisition methods can be implemented. Data categories and dimensions can be added, deleted, or adjusted according to the specific business characteristics and management needs of the coal mine. Optionally, in another implementation, for example, based on the configured internal operation data categories, the corresponding internal operation data can be obtained through database reading; based on the configured transportation constraint data categories, the corresponding transportation constraint data can be obtained through system interface calls; based on the configured time feature data categories, the corresponding time feature data can be obtained through local configuration reading. As another example, based on the configured external market data categories, the corresponding external market data can be obtained through platform interface calls; based on the configured policy and regulatory data categories, the corresponding policy and regulatory data can be obtained through data interfaces; based on the configured time feature data categories, the corresponding time feature data can be obtained through local configuration reading. Those skilled in the art can flexibly select at least one of the above acquisition methods for implementation according to actual data availability and business needs, and this specification does not impose any restrictions on this. Alternatively, in another implementation, the data can be categorized according to its source system, including operational data from enterprise resource planning systems, transportation data from railway dispatching systems, market data from third-party data platforms, policy data from government data platforms, and time-specific data from local configurations. The time span of historical data can also be selected based on actual data availability, for example, collecting data from the past 36 to 48 months (monthly data samples in the coal mining industry are naturally limited, and this time span can achieve a good balance between data volume and model generalization ability), or selecting a longer or shorter time window according to business needs; this specification does not impose any restrictions on this.
[0041] In this embodiment, flexible data acquisition is achieved through configured data categories. This allows for dynamic adjustment of the specific acquisition scope of various data types based on different business needs, adapting to the data foundation and business requirements of different coal mining enterprises. Furthermore, the collected target coal data needs to be preprocessed to ensure data quality and format consistency, which will be described in detail in step 104.
[0042] Step 104: Based on the preprocessing strategy corresponding to the coal data distribution rules, preprocess the target coal data to obtain the target coal processing dataset. The preprocessing strategy is consistent with the preprocessing strategy in the training phase.
[0043] First, let's further explain the key terms involved in this step: Coal data distribution rules refer to the statistical distribution characteristics of target coal data, serving as the data-level basis for determining the preprocessing strategy. Specifically, coal data distribution rules can include data stationarity, periodicity, and randomness. However, in practical applications, the type of distribution rules can be optionally added, adjusted, or refined based on the specific data type and distribution pattern. For example, statistical characteristics such as skewness, kurtosis, and heteroscedasticity can also be included. This specification does not impose any restrictions on this.
[0044] Preprocessing strategy refers to the rules and operational sequence followed when cleaning, transforming, and verifying raw coal data. Its purpose is to ensure that the input data meets the model's input requirements in terms of format, distribution, and statistical characteristics. Preprocessing strategies may include, but are not limited to, stationarity checks, periodic analysis, stochastic tests, differencing, missing value imputation, outlier detection and correction, and data standardization or normalization. In practical applications, the combination and order of preprocessing operations can be added, reduced, or adjusted according to the data distribution characteristics and model training needs; this specification does not impose any restrictions on this. In the embodiments of this specification, the preprocessing strategy is described with stationarity checks, periodic analysis, and stochastic tests as the core operations.
[0045] The target coal processing dataset refers to the dataset obtained after preprocessing the target coal data using a preprocessing strategy. The difference between the preprocessed dataset and the original target coal data is that non-stationary sequences have been converted to stationary sequences, periodic patterns have been extracted as periodic identifiers, and random data has been removed, thus improving data quality and predictability. The target coal processing dataset serves as the input data for subsequent feature construction steps.
[0046] Stationarity verification refers to the process of hypothesis testing to determine the stationarity of time series data. Stationarity refers to the property that the statistical characteristics (such as mean, variance, and covariance) of a time series do not change over time, and it is a fundamental requirement for most time series modeling methods. If the data does not meet the stationarity requirement, i.e., it contains trend or periodic components, directly using it for model training may lead to parameter estimation failure and decreased prediction accuracy. In practical applications, unit root tests (such as the ADF test or KPSS test) can be used to verify the stationarity of the series. If the p-value is less than 0.05, the null hypothesis of the existence of a unit root is statistically rejected, and the series is determined to meet the stationarity requirement. If the p-value is greater than or equal to 0.05, the null hypothesis is accepted, and the series is determined to be non-stationary, requiring transformations such as differencing to convert it into a stationary series before further processing.
[0047] Periodicity analysis refers to the process of identifying periodic patterns in stationary time series data. The core purpose of periodicity analysis is to extract periodic indicators from the data, providing a basis for subsequent feature construction. Periodicity analysis can employ autocorrelation function (ACF) or partial autocorrelation function (PACF) analysis methods, identifying periodic components by observing whether the autocorrelation coefficient significantly exceeds the confidence interval at a specific lag order. For example, for monthly data, if the autocorrelation coefficient is significant at lag 12, it indicates the existence of annual periodicity.
[0048] Randomness testing refers to the process of performing a pure randomness test on stationary time series data. The core purpose of randomness testing is to determine whether there is a predictable pattern in the sequence. Pure randomness testing can employ methods such as the Ljung-Box test or the Box-Pierce test, and the test results determine whether the sequence is white noise. If the sequence is a purely random sequence, it is not predictable and should be filtered out to avoid interfering with model training; if the sequence exhibits autocorrelation, it should be retained for subsequent steps.
[0049] Coal industry data is characterized by high noise, multiple constraints, and nonlinearity. Raw data typically contains trend components (such as the year-on-year increase in transportation volume due to capacity expansion), periodic fluctuations (such as increased demand during the heating season), and random noise (such as unexpected factors interfering with transportation). If unprocessed raw data is directly used for model training and prediction, trend components may mask the inherent fluctuation patterns of the data, periodic signals cannot be effectively identified by the model, and random noise may cause the model to learn spurious correlations, thus severely affecting prediction accuracy and model generalization ability. Therefore, the preprocessing strategy in step 104 is needed to process the raw data so that the input data meets the model's statistical requirements. In one implementation, a unified preprocessing strategy can be used to process all target coal data, that is, pre-defined preprocessing operations are sequentially performed on all dimensions of the data. This method is suitable for scenarios where the data distribution characteristics are relatively consistent and the differences in the magnitude of data across dimensions are small. In another implementation, differentiated preprocessing strategies can be adopted for different types of data. For example, time-series data can be processed to focus on stationarity and periodicity, while non-time-series data can be primarily processed for missing value imputation and outlier correction. This approach is suitable for scenarios with diverse data sources and significant differences in distribution characteristics across various dimensions. Both of the above implementation methods can achieve the preprocessing operations in this step, and those skilled in the art can flexibly choose according to the actual data distribution characteristics and model requirements. By preprocessing the target coal data, the interference of trend components and random noise can be eliminated at the data level.
[0050] Furthermore, in one embodiment, the preprocessing strategy includes stationarity verification, periodicity analysis, and randomness testing. Based on the preprocessing strategy corresponding to the coal data distribution rules, the target coal data is preprocessed to obtain a target coal processing dataset, including: performing stationarity verification on the target coal data; if non-stationary sequences exist in the target coal data, the non-stationary sequences in the target coal data are differentially processed to obtain stationary target coal data; performing periodicity analysis on the stationary target coal data to obtain the periodicity identifier of the stationary target coal data, wherein the periodicity identifier is used to determine the relevant influencing factors of coal transportation volume; and performing randomness testing on the stationary target coal data, filtering out random data in the stationary target coal data and retaining non-random data to obtain the target coal processing dataset. Specifically: Continuing from the example in step 102, the monthly transport volume data of a certain coal mine over the past 36 months shows an upward trend year by year. The mean of the original sequence gradually increased from 145,000 tons 12 months ago to 152,000 tons in the most recent month. The ADF test p-value is 0.12, indicating a non-stationary sequence. First-order differencing is required to convert the original sequence into a series of month-on-month growth to meet the stationarity requirement. An autocorrelation function plot is then drawn on the differencing sequence. At lag 12, the autocorrelation coefficient significantly exceeds the confidence interval (approximately 0.65), indicating annual periodicity. Subsequent feature construction should include annual periodic features such as heating season indicators and summer peak electricity consumption indicators. The Ljung-Box test p-value for the monthly imported coal arrival volume sequence in this region is 0.32, indicating a purely random sequence, and it is filtered out during the preprocessing stage. However, the Ljung-Box test p-value for the coal pithead price sequence is 0.01, indicating a significant autocorrelation relationship, and it is retained.
[0051] It should be noted that the preprocessing operations and verification methods described above are merely illustrative examples. In practical applications, the combination and order of preprocessing operations can be optionally added, reduced, or adjusted according to the data distribution characteristics and model training requirements. For example, in another embodiment, the preprocessing strategy may only include stationarity verification and periodicity analysis, without randomness verification. This approach is suitable for scenarios with a small amount of data and where it is necessary to retain as many data samples as possible. In yet another embodiment, the preprocessing strategy may also include missing value imputation (using mean imputation, median imputation, or interpolation, etc.), outlier detection and correction (using the 3σ principle or box plot method, etc.), data standardization, or normalization, etc. This specification does not impose any limitations on these operations.
[0052] In the embodiments of this specification, non-stationary sequences can be converted into stationary sequences through stationarity verification and differencing, enabling the model to focus on the inherent fluctuation patterns of the data rather than trend directions. Periodic analysis accurately extracts the periodic indicators of the data, providing a basis for constructing subsequent time-characteristic coal data. Randomness testing filters out white noise data, effectively eliminating random sequences that do not contribute to prediction and preventing invalid data from interfering with the model's capture of valid patterns. Based on this, feature construction is required for the preprocessed target coal processing dataset, which will be described in detail in step 106.
[0053] Step 106: Based on the relevant influencing factors of coal transportation volume, construct features for the target coal processing dataset to obtain the target coal feature set, which includes target coal feature data under the relevant influencing factors.
[0054] First, let's further explain the key terms involved in this step: Relevant influencing factors: These refer to the collective term for various factors that affect coal transportation volume, serving as the data source and construction basis for feature construction. In the embodiments of this specification, relevant influencing factors may include time characteristic factors, lag characteristic factors, operational characteristic factors, and constraint characteristic factors, etc. However, in practical applications, optional factors may be added, combined, or adjusted according to specific prediction scenarios and data conditions; this specification does not impose any restrictions on this. The determination of relevant influencing factors is based on the periodic identifiers extracted in step 104 and the non-random data retained after randomness testing, ensuring the predictability of the data upon which feature construction is based.
[0055] Feature construction refers to the process of extracting and constructing feature data that can effectively characterize the changing patterns of coal transportation volume from preprocessed data. It is a crucial step in converting raw data into a feature representation usable by the model. The core purpose of feature construction is to enable the model to learn the changing patterns of transportation volume from multiple dimensions, thereby improving prediction accuracy.
[0056] Temporal characteristic coal data refers to characteristic data extracted from the target coal processing dataset that reflects the regular fluctuations in coal transportation volume over natural time and business cycles. Coal transportation volume is significantly affected by seasonal changes and business cycles, such as increased demand during the heating season, a surge in demand during the summer peak electricity season, and fluctuations in transportation volume at the end of the quarter due to contract fulfillment pressure. These periodic patterns cannot be directly reflected in the raw data alone and need to be explicitly encoded through temporal characteristic coal data for the model to learn.
[0057] Lagging coal data refers to feature data extracted from the target coal processing dataset that reflects the historical dependence and trend continuity of coal transportation volume. Coal transportation volume has obvious time series characteristics; the transportation volume of this month is highly correlated with the transportation volume of last month and the same period last year. This historical dependence needs to be quantitatively expressed through lag features so that the model can learn the continuity pattern of transportation volume from historical data.
[0058] Operational characteristic coal data refers to characteristic data extracted from the target coal processing dataset that reflects the impact of the coal mine's internal operating status on the transportation volume. Coal transportation volume is not only affected by the external market, but also constrained by the coal mine's own operating conditions, such as contract performance, capacity utilization rate, and inventory turnover efficiency. These changes in the enterprise's internal status need to be characterized through operational characteristics so that the model can perceive changes in the enterprise's own supply capacity.
[0059] Constraint-related coal data refers to feature data extracted from the target coal processing dataset that reflects the limiting effect of external hard constraints on transportation volume. Coal transportation volume is limited by multiple objective constraints, such as railway wagon allocation capacity, dispatch station storage capacity, approved coal mine production capacity, environmental protection production restrictions, and safety inspection requirements. These constraints constitute the physical upper limit of transportation volume and need to be quantitatively expressed through constraint features so that the model can recognize the feasible boundary of transportation volume.
[0060] In step 106, feature construction of the target coal processing dataset is a crucial step connecting preprocessing and model prediction. Although the data preprocessed in step 104 meets the model requirements in terms of statistical properties, it still exists in the form of raw fields, such as transport volume, inventory, and sales volume. The relationship between these raw fields and the prediction target is not a simple linear mapping, but rather contains numerous nonlinear relationships and interactions. If the raw fields are directly used as model input, the model needs to discover the correlations and patterns between features from the high-dimensional raw data, which places high demands on the model's generalization ability and data volume. Therefore, it is necessary to transform, combine, or encode the raw fields according to business logic and the inherent patterns of the data to construct feature data that can effectively represent the changing patterns of transport volume, enabling the model to learn the changing patterns of transport volume more efficiently while reducing the model's dependence on data volume. In one implementation, all dimensions of the raw data fields can be extracted from the target coal processing dataset and directly used as model input features. This method is suitable for scenarios where the raw data fields themselves have strong predictive capabilities. In another implementation, new features can be constructed by transforming and combining the original data fields based on relevant influencing factors. For example, original sales data can be converted into month-on-month growth rate and year-on-year growth rate, and original inventory data can be converted into days of inventory availability. This approach is suitable for scenarios that require enhanced feature expressiveness or reduced noise impact of the original data. Both of the above implementation methods can achieve the feature construction operation in this step, and those skilled in the art can flexibly choose according to the actual data characteristics and prediction needs. By constructing features on the target coal processing dataset, the preprocessed data can be converted into a feature representation usable by the model, enabling the model to learn the changing patterns of transportation volume from multiple dimensions.
[0061] In one implementation, the relevant influencing factors include at least one of time-related factors, lag-related factors, operational-related factors, and constraint-related factors. The target coal feature set includes at least one of time-related coal data under time-related factors, lag-related coal data under lag-related factors, operational-related coal data under operational-related factors, and constraint-related coal data under constraint-related factors. Based on the relevant influencing factors of coal transportation volume, features are constructed on the target coal processing dataset to obtain the target coal feature set, including at least one of the following: obtaining time-related coal data with time-related factors from the target coal processing dataset, and constructing time-related coal data based on the time-related coal data, wherein the time-related factors include at least one of heating season identifier, summer peak electricity consumption identifier, quarter-end identifier, monthly month-on-month growth rate, and annual year-on-year growth rate; obtaining time-related coal data with time-related factors from the target coal processing dataset. The data includes: lagged correlation coal data for lagged characteristic factors; lagged characteristic coal data for construction based on lagged correlation coal data; lagged characteristic factors including at least one of the following: lagged values of transport volume for different scheduling cycles, rolling mean of transport volume for different scheduling cycles, and rolling standard deviation of transport volume; operational correlation coal data for operational characteristic factors obtained from the target coal processing dataset; operational characteristic coal data for construction based on operational correlation coal data; operational characteristic factors including at least one of the following: contract fulfillment rate, coal mine capacity utilization rate, inventory availability days, washing and recovery rate, and output proportion of each coal type in each coal mine; and constraint correlation coal data for constraint characteristic factors obtained from the target coal processing dataset; constraint correlation coal data for construction based on constraint correlation coal data; constraint characteristic factors including at least one of the following: railway freight car limit, dispatch station storage limit, coal mine approved capacity limit, environmental protection production restriction impact coefficient, and safety inspection impact coefficient.
[0062] Specifically, in this embodiment, taking the monthly transportation volume forecast of a certain coal mine as an example, after completing the preprocessing in step 104, the above four types of characteristic coal data are constructed from the target coal processing dataset. This coal mine is located in North China and mainly produces thermal coal, which is transported by rail to the port and then by sea to power plants in the south. The following exemplarily illustrates the construction process of various types of characteristic coal data. At least one specific feature item under each category can be selected and used according to the actual forecasting scenario. This embodiment does not limit the inclusion of all the following feature items simultaneously.
[0063] First, time-related coal data for time feature factors are obtained from the target coal processing dataset, and time-feature coal data is constructed based on this time-related coal data. The construction method for time feature factors is as follows: the heating season identifier is determined based on the month of the forecast, with November to March of the following year marked as the heating season with an identifier value of 1, and other months marked as 0; the summer peak electricity consumption identifier is set to 1 for June to August, and 0 for other months; the quarter-end identifier is set to 1 for March, June, September, and December, and 0 for other months; the monthly month-on-month growth rate is calculated using the formula (current month's value - previous month's value) / previous month's value; the annual year-on-year growth rate is calculated using the formula (current month's value - same month last year's value) / same month last year. Taking January 2026 as the forecast month as an example, the heating season identifier is set to 1, the summer peak electricity consumption identifier is set to 0, and the quarter-end identifier is set to 0. The coal mine's transport volume data for December 2025 (148,000 tons) and January 2026 (152,000 tons) is retrieved from the target coal processing dataset. Therefore, the month-on-month growth rate is (152,000 - 148,000) / 148,000 ≈ 2.7%. The January 2025 transport volume data is 135,000 tons, resulting in an annual growth rate of (152,000 - 135,000) / 135,000 ≈ 12.6%. The heating season indicator (1), summer peak electricity consumption indicator (0), quarter-end indicator (0), month-on-month growth rate (2.7%), and annual growth rate (12.6%) together constitute the time-specific coal data.
[0064] Secondly, lagged correlation coal data for lagged characteristic factors are obtained from the target coal processing dataset, and lagged characteristic coal data is constructed based on the lagged correlation coal data. The construction method of lagged characteristic factors is as follows: the lagged values of transportation volume for different scheduling cycles include the transportation volume 1 month ago, 2 months ago, 3 months ago, 6 months ago, and 12 months ago; the rolling mean includes the average transportation volume of the past 3 months, 6 months, and 12 months; the rolling standard deviation includes the standard deviation of the transportation volume of the past 3 months, 6 months, and 12 months. The monthly transportation volume data of the coal mine for the past 12 months are read from the target coal processing dataset: from January to December 2025, they are 135,000, 138,000, 142,000, 140,000, 145,000, 143,000, 139,000, 141,000, 146,000, 149,000, 150,000, and 148,000 tons respectively. Based on this, the following lagged values were constructed: 148,000 tons one month ago (December 2025), 150,000 tons two months ago (November 2025), 149,000 tons three months ago (October 2025), 139,000 tons six months ago (July 2025), and 135,000 tons twelve months ago (January 2025). Rolling average: The average for the past 3 months is (14.9 + 15.0 + 14.8) / 3 = 14.9 million tons; the average for the past 6 months is (13.9 + 14.1 + 14.6 + 14.9 + 15.0 + 14.8) / 6 (taking July-December 2025) ≈ 14.5 million tons; the average for the past 12 months is (13.5 + 13.8 + 14.2 + 14.0 + 14.5 + 14.3 + 13.9 + 14.1 + 14.6 + 14.9 + 15.0 + 14.8) / 12 ≈ 14.3 million tons. These lagged values and rolling statistics together constitute the lagged coal data.
[0065] Next, operational characteristic factors related to coal operations are obtained from the target coal processing dataset, and operational characteristic coal data is constructed based on this data. The operational characteristic factors are constructed as follows: contract fulfillment rate is calculated by dividing the delivered quantity by the contracted quantity; coal mine capacity utilization rate is calculated by dividing the actual output by the approved capacity; inventory availability days are calculated by dividing the current inventory by the average daily sales volume over the past 7 days, specifically using the formula D_inventory = I_current / S_day, where D_inventory is the inventory availability days, I_current is the current inventory, and S_day is the average daily sales volume over the past 7 days; washing and beneficiation recovery rate is calculated by dividing the output of clean coal after washing by the amount of raw coal washed; the output proportion of each coal type in each coal mine is calculated by dividing the output of that coal type in that coal mine by the total output of that coal mine. Relevant operational data for this coal mine was retrieved from the target coal processing dataset: Delivered volume was 145,000 tons, contracted volume was 150,000 tons, therefore the contract fulfillment rate = 145,000 / 150,000 ≈ 96.7%; actual output was 160,000 tons, approved capacity was 180,000 tons, therefore the capacity utilization rate = 160,000 / 180,000 ≈ 88.9%; current inventory was 42,000 tons, average daily sales over the past 7 days was 4,800 tons, therefore the number of days of inventory available = 42,000 / 480,000 ≈ 8.75 days; clean coal output after washing was 136,000 tons, raw coal washing volume was 160,000 tons, therefore the washing recovery rate = 136,000 / 160,000 = 85%; the mine mainly produces No. 1 coal, with a No. 1 coal output of 120,000 tons, and the mine's total output was 160,000 tons, therefore the No. 1 coal output percentage = 120,000 / 160,000 = 75%. These operational characteristics collectively constitute the operational characteristic coal data.
[0066] Next, constraint-related coal data for constraint feature factors are obtained from the target coal processing dataset, and constraint feature coal data is constructed based on this constraint-related coal data. The constraint feature factors are constructed as follows: the railway freight quota limit is the monthly freight quota limit obtained from the railway department; the dispatch station storage limit is the maximum storage capacity of the dispatch station; the coal mine approved production capacity limit is the approved monthly maximum production capacity of the coal mine; the environmental protection production restriction impact coefficient is calculated based on the production restriction ratio determined by environmental protection policies; and the safety inspection impact coefficient is calculated based on the degree of impact determined by the safety inspection plan. Relevant constraint data for the coal mine and its corresponding dispatching station are retrieved from the target coal processing dataset: The monthly railway freight car quota for this dispatching station is capped at 45 trains, with an average load of 3,500 tons per train, therefore the railway freight car quota = 45 × 3,500 / 10,000 = 157,500 tons; the dispatching station's maximum storage capacity is 80,000 tons; the coal mine's approved production capacity is capped at 180,000 tons; the region's environmental protection policy requires a 10% production restriction, therefore the environmental protection production restriction impact coefficient = 1 - 10% = 0.9; the monthly safety inspection plan includes a 2-day production shutdown, therefore the safety inspection impact coefficient = (30 - 2) / 30 ≈ 0.933. These constraint features together constitute the constraint feature coal data.
[0067] Through the above construction steps, time-characteristic coal data, lag-characteristic coal data, operational-characteristic coal data, and constraint-characteristic coal data are obtained, and assembled to obtain a complete target coal feature set. Specifically, the target coal feature set is structured data organized in the form of a feature matrix, where each row corresponds to a prediction sample (e.g., a certain scheduling cycle of a certain coal mine), and each column corresponds to a feature field. For example, taking a single-sample forecast of a coal mine in January 2026 as an example, the target coal feature set of this sample may include, but is not limited to, the following feature data: Time feature class may include heating season indicator (take 1), summer peak electricity consumption indicator (take 0), quarter-end indicator (take 0), monthly month-on-month growth rate (2.7%), annual year-on-year growth rate (12.6%), etc.; Lag feature class may include 1-month lag value (148,000 tons), 2-month lag value (150,000 tons), 3-month lag value (149,000 tons), 6-month lag value (139,000 tons), 12-month lag value (135,000 tons), 3-month rolling average (149,000 tons), 6-month rolling average (approximately 1 The target coal feature set includes the following: 45,000 tons, 12-month rolling average (approximately 143,000 tons), 3-month rolling standard deviation (approximately 0.10), 6-month rolling standard deviation (approximately 0.25), and 12-month rolling standard deviation (approximately 0.45); operational characteristics include contract fulfillment rate (96.7%), capacity utilization rate (88.9%), inventory availability days (8.75 days), washing and recovery rate (85%), and No. 1 coal production share (75%); constraint characteristics include railway freight car limit (157,500 tons), shipping station storage limit (80,000 tons), coal mine approved capacity limit (180,000 tons), environmental protection production restriction impact coefficient (0.9), and safety inspection impact coefficient (approximately 0.933). The feature items under each category are exemplary examples. In practical applications, at least one feature item can be selected to construct the target coal feature set according to the prediction needs. This embodiment does not limit this. The above feature fields are arranged in a preset order to constitute the target coal feature vector of this prediction sample. In practical applications, when predicting multiple coal mines or multiple scheduling cycles simultaneously, the target coal feature set is expanded into a feature matrix, with each row corresponding to a feature vector of a sample. This feature matrix is directly used as input to the target coal transportation volume prediction model, and the model outputs the corresponding predicted transportation volume based on the input features.
[0068] It should be noted that the specific methods for constructing the features described above are merely illustrative. In practical applications, different calculation methods or more or fewer features can be constructed depending on the specific data conditions and business needs. For example, in another implementation, only two categories of coal data—time-featured coal data and lag-featured coal data—can be constructed, without constructing operational-featured coal data and constraint-featured coal data. This approach is suitable for scenarios with fewer data dimensions or relatively simple business constraints. In yet another implementation, more types of features can be constructed, such as interactive features (combined features between different factors), nonlinear transformation features (logarithmic or quadratic transformations of the original features), etc. This specification does not impose any limitations on these.
[0069] This specification's embodiments, through the construction of time-characteristic coal data, can provide the model with periodic signals such as the heating season, summer peak electricity consumption, and the end of each quarter, enabling the model to capture the seasonal fluctuation patterns of transport volume. By constructing lag-characteristic coal data, it can provide the model with historical transport volume lag values and rolling statistics, allowing the model to learn the historical dependence and fluctuation trends of transport volume. By constructing operational-characteristic coal data, it can provide the model with operational status information such as contract fulfillment, capacity utilization, and inventory turnover, enabling the model to perceive the impact of internal operating conditions on transport volume. By constructing constraint-characteristic coal data, it can provide the model with hard constraints such as railway wagon allocation, storage capacity, and approved capacity, enabling the model to recognize the limiting effect of external constraints on transport volume. Based on this, the constructed target coal characteristic data needs to be input into the target coal transport volume prediction model for prediction to obtain the target coal transport volume for the next scheduling cycle, which will be described in detail in step 108.
[0070] Step 108: Input the target coal characteristic data under the relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle.
[0071] First, let's further explain the key terms involved in this step: The target coal transportation volume prediction model refers to a pre-trained machine learning model used to predict coal transportation volume. This model can be a tree model such as a gradient boosting tree model, random forest model, XGBoost model, or CatBoost model, or a deep learning model or other regression prediction model. Alternatively, a time series model such as ARIMA or SARIMA can be used as a baseline model and fused with the aforementioned tree models to output a weighted prediction result, further improving prediction accuracy. This model takes the target coal feature set constructed in step 106 as input and outputs the target coal transportation volume for the next scheduling cycle. In practical applications, appropriate model structures and algorithms can be selected based on the amount of data, data characteristics, and prediction accuracy requirements; this specification does not impose any restrictions on this.
[0072] Target coal transport volume: This refers to the coal transport volume predicted by the model for the next scheduling cycle, and is the final output of the prediction method. This value can be used for subsequent hard constraint correction and transport plan generation.
[0073] Hard constraint upper limit: This refers to the upper limit of the coal transportation volume that cannot be exceeded due to objective limitations. Hard constraint upper limits may include, but are not limited to, railway wagon approval limits, dispatch station storage limits, and coal mine approved production capacity limits. In practical applications, hard constraint upper limits can be dynamically adjusted according to different scheduling cycles, different business scenarios, and different constraint conditions; this manual does not impose restrictions on this.
[0074] Transportation plan: refers to the transformation of forecast results into an executable business plan, including production plan, shipping plan, washing and sorting plan, etc., which is used to guide the specific work arrangements of each business department in the next scheduling cycle.
[0075] After preprocessing in step 104 and feature construction in step 106, the target coal data has been transformed from raw fields into a feature representation usable by the model. However, the feature data itself is only a structured expression of the input information and does not yet contain prediction results. Therefore, it is necessary to input the target coal feature data into the target coal transportation volume prediction model, utilize the mapping relationship between features and transportation volume learned by the model from historical data, and output the target coal transportation volume for the next scheduling cycle after forward calculation by the model, thus completing the transformation from data to predicted value. In a specific implementation, one feasible approach is to assemble all target coal feature data into a feature matrix and input it into the target coal transportation volume prediction model all at once. The model then outputs the predicted transportation volume corresponding to each target object in batches. This method is suitable for scenarios that require simultaneous prediction of multiple coal mines or multiple scheduling cycles. In another implementation, the feature data of each target object can be input into the target coal transportation volume prediction model one by one, and the model outputs the predicted transportation volume corresponding to each target object one by one. This method is suitable for single-object prediction or scenarios that require verification of prediction results one by one. Both of the above implementation methods can achieve the prediction operation in this step, and those skilled in the art can flexibly choose according to actual prediction needs.
[0076] The embodiments in this specification input the target coal characteristic data under relevant influencing factors into the target coal transportation volume prediction model. The model can automatically learn the complex mapping relationship between each characteristic and the transportation volume, realize the automated and high-precision prediction of the transportation volume, eliminate the subjective error of manual estimation, and provide a reliable quantitative basis for subsequent production planning and transportation resource allocation.
[0077] In one implementation, after inputting the target coal characteristic data under relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle, the method further includes: obtaining the hard constraint upper limit of the scheduling cycle corresponding to the target coal transportation volume; if the target coal transportation volume is greater than the hard constraint upper limit, then the target coal transportation volume is adjusted to the hard constraint upper limit.
[0078] In practical applications, the target coal transportation volume prediction model outputs predicted values based on historical patterns and influencing factors. However, these predicted values may exceed the physical constraints of actual operations. Therefore, a constraint correction layer is added after the model prediction to compare the predicted value with the upper limit of the hard constraint. If the value exceeds the upper limit, it is truncated and adjusted to ensure that the prediction result is physically executable. Specifically, in this embodiment, taking the monthly railway freight volume constraint of a certain dispatching station as an example, continuing from the example data in step 106, the upper limit of the monthly railway freight volume for this dispatching station is 157,500 tons. The target coal feature set (1×36 feature vectors) for this dispatching station constructed in step 106 is input into the target coal transportation volume prediction model. The model outputs a target coal transportation volume of 172,000 tons for the next scheduling cycle. At this time, the upper limit of the monthly railway freight volume for this dispatching station, 157,500 tons, is obtained. It is determined that the target coal transportation volume of 172,000 tons is greater than the upper limit of the hard constraint, 157,500 tons. Therefore, the target coal transportation volume is adjusted to 157,500 tons to ensure that the prediction result is physically executable within the railway capacity constraint range. If multiple hard constraints exist simultaneously (such as a railway freight car limit of 157,500 tons, a dispatch station storage limit of 80,000 tons, and a coal mine approved production capacity limit of 180,000 tons), the minimum value among these upper limits will be taken as the final adjustment value, i.e., min(157,500, 80,180,000) = 80,000 tons. It should be noted that the upper limits of hard constraints can have different values in different scheduling cycles, and can be dynamically adjusted according to actual conditions in practical applications. This manual does not impose any restrictions on this.
[0079] By obtaining the hard constraint upper limit of the scheduling cycle corresponding to the target coal transportation volume, and adjusting it to the hard constraint upper limit when the target coal transportation volume exceeds the hard constraint upper limit, it is possible to ensure that the prediction results are physically executable under objective constraints such as transportation capacity, storage capacity, and production capacity, and avoid plan failure due to the prediction value exceeding the actual carrying capacity.
[0080] In one implementation, after inputting the target coal characteristic data under relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle, the method further includes: generating a transportation plan for the next scheduling cycle based on the target coal transportation volume for the next scheduling cycle, including: obtaining the total inventory data, the total safety stock target value, and the total washing and processing recovery rate for the next scheduling cycle; adding the target coal transportation volume to the total safety stock target value and then subtracting the total inventory data to obtain the total planned output; multiplying the total planned output by the total washing and processing recovery rate to obtain the total washing and processing planned volume; and generating the transportation plan for the next scheduling cycle based on the total planned output and the total washing and processing planned volume.
[0081] In practical applications, the transportation plan is the process of transforming forecast results into an executable business plan. Total inventory data refers to the total coal inventory at the start of the next scheduling cycle; the total safety stock target value is the minimum inventory target value set to ensure stable supply; and the total washing and processing recovery rate is the proportion of clean coal output to the amount of raw coal washed during the washing and processing process. By calculating the total planned output and total planned washing and processing volume using the above formulas, and then combining this with the procurement plan, shipping plan, and inventory plan, a complete transportation plan for the next scheduling cycle is generated.
[0082] Specifically, in this embodiment, following the example data in step 106, the target coal transportation volume of the coal mine after hard constraint correction is 157,500 tons. The total inventory data for the next scheduling cycle is obtained as 42,000 tons, the total safety stock target value is 50,000 tons, and the total washing recovery rate is 85%. Therefore, the total planned output = target coal transportation volume + total safety stock target value - total inventory data = 157,500 + 50,000 - 42,000 = 165,500 tons; the total planned washing volume = total planned output × total washing recovery rate = 165,500 × 85% = 140,700 tons. Based on the above total planned output of 165,500 tons and total planned washing volume of 140,700 tons, combined with other planned volumes (such as procurement plans, shipping station shipping plans, port transshipment plans, customer delivery plans, etc.), a complete transportation plan for the next scheduling cycle is generated. This transportation plan can be output in the form of a plan table or a plan report, allowing the production department to arrange mining volume, the washing and beneficiation department to arrange washing volume, and the shipping station to arrange daily loading schedules, achieving seamless integration between forecast results and actual business plans. It should be noted that the above plan generation method and specific values are for illustrative purposes only. In actual applications, plan items can be added or removed according to business needs, or the plan generation logic can be adjusted; this manual does not impose any restrictions on this. By generating a transportation plan based on the target coal transportation volume for the next scheduling cycle, forecast results can be automatically transformed into an executable business plan, achieving a seamless connection from forecast to plan and improving the efficiency and accuracy of plan formulation.
[0083] Based on this, the embodiments of this specification also provide a training method for a coal transportation volume prediction model, which is used to train the target coal transportation volume prediction model used in the above prediction stage, and will be described in detail in steps 202 to 208.
[0084] See Figure 2 , Figure 2 This specification shows a flowchart of a coal transportation volume prediction model training method according to an embodiment, which specifically includes the following steps: Step 202: Obtain historical coal data and corresponding coal transportation volume tags under multiple business dimensions.
[0085] Historical coal data serves as sample data for model training, encompassing multi-business dimension data across multiple historical scheduling cycles. Coal transport volume tags represent the actual coal transport volume value corresponding to each historical scheduling cycle, acting as a supervisory signal for model training. Historical coal data and its corresponding coal transport volume tags can be obtained from the coal business database, with a time range of 36 to 48 months. In practical applications, longer or shorter time windows can be selected based on data availability and business needs; this specification does not impose such restrictions. The specific implementation method for obtaining historical coal data under multiple business dimensions in step 202 is the same as the method for obtaining target coal data in step 102, i.e., it also obtains internal operational data, transportation constraint data, external market data, policy regulatory data, and time characteristic data from the coal business database based on the configured data categories, which will not be elaborated further here.
[0086] Step 204: Based on the preprocessing strategy corresponding to the coal data distribution rules, preprocess the historical coal data to obtain the sample coal processing dataset.
[0087] The preprocessing strategy is used to clean, transform, and verify the original historical coal data. Its purpose is to make the input data meet the requirements of model training, eliminate noise and outliers in the data, and improve data quality. The preprocessing strategy in step 204 is the same as that in step 104, and can also include operations such as stationarity verification, periodic analysis, and stochastic testing. For specific implementation methods, please refer to the description in step 104, which will not be repeated here.
[0088] Step 206: Based on the relevant influencing factors of coal transportation volume, construct features for the sample coal processing dataset to obtain the sample coal feature set, which includes sample coal feature data under the relevant influencing factors and the corresponding coal transportation volume label.
[0089] First, let's further explain the key terms involved in this step: Sample coal processing dataset: refers to the dataset obtained after preprocessing historical coal data in step 204. It corresponds to the target coal processing dataset in the prediction stage and is the input data for feature construction on the training side.
[0090] The sample coal feature set refers to the dataset consisting of feature data extracted and constructed from the sample coal processing dataset and corresponding coal transportation volume labels. It serves as the input data for the model training phase. Unlike the target coal feature set in the prediction phase, the sample coal feature set additionally includes coal transportation volume labels to provide supervisory signals.
[0091] Coal transport volume label: refers to the actual coal transport volume value corresponding to each historical scheduling cycle, which serves as a supervision signal for model training and corresponds one-to-one with the sample coal feature data.
[0092] Training hyperparameters are parameters that are pre-set before model training begins and control the model training process and structure. Their values do not change with data updates during training. Training hyperparameters can include at least one of the following: regularization parameters (such as L1 regularization and L2 regularization), sampling parameters (such as sample sampling rate and feature sampling rate), leaf node constraint parameters, and early stopping parameters. They can also be other types of hyperparameters such as learning rate, tree depth, and number of trees. The specific type and value can be flexibly determined according to the model structure and data characteristics. Among them, regularization parameters are used to penalize parameter values that exceed a set threshold to control model complexity; sampling parameters are used to reduce redundant information in training data; leaf node constraint parameters are used to constrain the minimum number of samples contained in each leaf node to avoid overfitting; and early stopping parameters are thresholds for the number of rounds in which the validation set error does not decrease continuously to terminate training early and prevent overtraining.
[0093] Regularization parameter: refers to an additional constraint term added to the loss function to limit the size or sparsity of model parameters, thereby controlling model complexity and preventing overfitting.
[0094] Sampling parameters: These refer to the proportion of samples and features actually involved in the calculation in each training iteration, used to reduce the model's sensitivity to noise in the training data and improve its generalization ability.
[0095] Leaf node constraint parameters: These are parameters that constrain the minimum number of samples corresponding to the final output branch of the model. They are used to ensure that each output branch has sufficient statistical support and to avoid overfitting due to insufficient sample size.
[0096] Early stopping parameter: This refers to the parameter that sets a threshold number of rounds before the validation set error continues to decrease. When this threshold is reached, the model training will automatically terminate, which is used to prevent the generalization ability from decreasing due to overtraining.
[0097] Early stopping refers to a mechanism that terminates model training prematurely to prevent overfitting when the evaluation metric (such as mean absolute percentage error) on the validation set stops decreasing for a certain number of consecutive epochs. In the embodiments of this specification, the early stopping parameter is used to set a threshold for the number of epochs in which the validation set error does not decrease continuously. When the number of epochs in which the validation set error does not decrease continuously reaches this threshold, training automatically stops. The core purpose of the early stopping mechanism is to truncate training in a timely manner when the model's generalization ability reaches its optimal level, avoiding overfitting on the training set due to overtraining and sacrificing generalization performance on the validation set.
[0098] The specific implementation method of feature construction in step 206 is the same as that described in step 106, which can be found in the description of step 106, and will not be repeated here. The completed sample coal feature data, together with the corresponding coal transportation volume tags, constitute the sample coal feature set.
[0099] In one implementation, before training the initial coal transportation volume prediction model based on sample coal feature data under relevant influencing factors and corresponding coal transportation volume labels, the method further includes: configuring training hyperparameters for the model training process. The training hyperparameters include at least one of regularization parameters, sampling parameters, leaf node constraint parameters, and early stopping parameters. The regularization parameters are used to penalize parameter values that exceed a set threshold. The sampling parameters include the sample sampling rate and the feature sampling rate. The leaf node constraint parameters are used to constrain the minimum number of samples for each leaf node. The early stopping parameter is a threshold number of rounds in which the validation set error does not decrease continuously.
[0100] Specifically, taking the gradient boosting tree model as the initial coal transportation volume prediction model as an example, the following training hyperparameters are configured: L1 regularization is set to 0.2, L2 regularization is set to 0.8, the sample sampling rate is set to 0.85, the feature sampling rate is set to 0.75, the leaf node constraint parameter is set to 6, and the early stopping parameter is set to 12 rounds. It should be noted that the above values are only illustrative examples and can be flexibly adjusted according to data characteristics and model performance in actual applications. This specification does not impose any restrictions on this. Furthermore, in another implementation, only some types of the above hyperparameters can be configured. For example, only the regularization parameter and the early stopping parameter can be configured, without configuring the sampling parameter and the leaf node constraint parameter. This method is suitable for scenarios with small amounts of data or low model complexity. Alternatively, only the sampling parameter and the leaf node constraint parameter can be configured, without configuring the regularization parameter and the early stopping parameter. This method is suitable for scenarios with large amounts of data and where training efficiency needs to be controlled. All of the above combinations can achieve the hyperparameter configuration operation in this step. Through the above hyperparameter configuration, model complexity can be effectively controlled during model training, overfitting can be prevented, and the model's generalization ability and prediction accuracy can be improved.
[0101] Step 208: Based on the sample coal characteristic data under relevant influencing factors and the corresponding coal transportation volume labels, train the initial coal transportation volume prediction model until the training stops, and obtain the target coal transportation volume prediction model. The target coal transportation volume prediction model is used to execute the coal transportation volume prediction method described in steps 102-108 above.
[0102] First, let's further explain the key terms involved in this step: The initial coal transportation volume prediction model refers to a machine learning model that has not yet been trained or has only completed parameter initialization; it is the starting point of the training process. The parameters of the initial coal transportation volume prediction model are usually randomly initialized or use default values, and need to be continuously optimized and adjusted through the training process until they converge to a parameter state that can accurately predict the transportation volume.
[0103] The first sample coal feature data refers to the feature data of the first sample input to the model during the training process. It can be any sample randomly selected from the sample coal feature set. It does not represent any special meaning and is only used as the starting point of the training loop.
[0104] Prediction loss refers to the degree of difference between the predicted transportation volume output by the model and the actual transportation volume label, and is calculated using a loss function. Prediction loss measures the performance of the current model parameters on the training data and serves as the basis for updating the model parameters.
[0105] Validation set: This refers to a subset of the sample data, ordered chronologically, that is not used for training model parameters. It is used to evaluate the model's generalization ability during training. The validation set does not participate in gradient updates; it is only used to monitor whether the model is overfitting or has reached the early stopping condition.
[0106] Mean Absolute Percentage Error (MAPE) is a commonly used metric for measuring prediction accuracy, used to assess the relative deviation between predicted and actual values. MAPE is calculated as follows: for n samples in the validation set, the ratio of the absolute value of the prediction error to the actual value for each sample is calculated, then the average is taken and multiplied by 100%. The specific formula is as follows: , Where MAPE is the mean absolute percentage error, n is the number of samples, i is the sample number, and y is the actual value of the i-th sample. Let be the predicted value for the i-th sample. This represents the absolute percentage error of the i-th sample. This represents summing over all n samples. This indicates that the average value is taken, and multiplying by 100% converts the result to a percentage. In this step, MAPE is used for validation set evaluation. For example, if the actual transport volume of a sample is 135,000 tons and the model predicts 132,000 tons, then the absolute percentage error of that sample is |13.2 - 13.5| / 13.5 ≈ 2.22%. The validation set MAPE is the average of the absolute percentage errors of all samples in the validation set. The smaller the MAPE value, the higher the prediction accuracy.
[0107] After data acquisition in step 202, preprocessing in step 204, and feature construction in step 206, a sample coal feature set containing feature data and corresponding transportation volume labels has been obtained. However, the model has not yet learned the mapping relationship between these features and transportation volume, and the parameters of the initial model are usually in a random state. The core purpose of the training process is to input the sample coal feature data into the initial model, calculate the difference between the predicted value and the true label, and then adjust the model parameters in reverse based on this difference, so that the model gradually approaches the optimal parameter state that can accurately predict the transportation volume. At the same time, in order to prevent the model from overfitting on the training set, a validation set needs to be introduced to monitor the model. When the validation set error no longer decreases for several consecutive rounds, training should be stopped in time to obtain a target model with good generalization ability. In one implementation, the model can be trained all at once using all training data, meaning all samples participate in each training iteration. This approach is suitable for scenarios with limited data. In another implementation, mini-batch gradient descent can be used, where a subset of samples is selected from the training set for training each time. This approach is suitable for scenarios with large datasets where a balance between training efficiency and memory usage is required. Both implementations can achieve the training operation in this step, and those skilled in the art can flexibly choose based on the actual data volume and computing resources. By training the model based on sample coal characteristic data under relevant influencing factors and corresponding coal transportation volume labels, the model can automatically learn the complex mapping relationship between various influencing factors and transportation volume from historical data, providing accurate model support for the prediction stage.
[0108] In one implementation, an initial coal transportation volume prediction model is trained based on sample coal feature data under relevant influencing factors and corresponding coal transportation volume labels until the training stops, thereby obtaining a target coal transportation volume prediction model. This includes: inputting the first sample coal feature data under relevant influencing factors into the initial coal transportation volume prediction model to obtain the corresponding predicted coal transportation volume, wherein the first sample coal feature data is any sample coal feature data under the relevant influencing factors; calculating the prediction loss based on the coal transportation volume label corresponding to the first sample coal feature data and the predicted coal transportation volume; adjusting the model parameters of the initial coal transportation volume prediction model in reverse based on the prediction loss and training hyperparameters; and continuing to train the model based on the next sample coal feature data until the training stops, thereby obtaining the target coal transportation volume prediction model.
[0109] In actual training, a mini-batch gradient descent approach can be used. Each time, a batch of samples is selected from the training set, and the coal characteristic data of these samples is input into the initial coal transportation volume prediction model. The model then calculates the predicted coal transportation volume through forward propagation. Next, the prediction loss is calculated based on the difference between the predicted value and the true label. The prediction loss can use loss functions such as mean squared error loss, mean absolute error loss, or mean absolute percentage error loss. Based on the calculated prediction loss, the total loss is calculated in conjunction with training hyperparameters (such as regularization parameters). Then, the gradient of the total loss relative to the model parameters is calculated using the backpropagation algorithm, and the model parameters are updated using the optimizer. After updating the parameters, training continues based on the next sample or the next batch of samples, iterating in this way until the training stops. Alternatively, a sample-by-sample training approach can be used, where a single sample is selected from the training set each time for forward propagation, loss calculation, backpropagation, and parameter updates. This approach is suitable for scenarios requiring fine-tuning of model parameters and with a moderate sample size. Both of these implementation methods can achieve iterative optimization of model parameters, and those skilled in the art can choose flexibly according to the data volume and training efficiency requirements.
[0110] Specifically, continuing the example from step 206, a sample from January 2023 (36-dimensional feature vector) is selected from the sample coal feature set as the first sample coal feature data input to the initial gradient boosting tree model. The model outputs a predicted transport volume (assumed to be 132,000 tons), and the corresponding coal transport volume label for this sample is 135,000 tons. The prediction loss is calculated using the mean absolute percentage error loss function, i.e., |13.2-13.5| / 13.5≈2.22%. The total loss is calculated by combining the penalty terms of L1 regularization (0.2) and L2 regularization (0.8). The gradient of the total loss relative to the model parameters is calculated using the backpropagation algorithm, and the model parameters are updated using the optimizer. Then, the above training process is continued with the sample from February 2023 until all training samples are traversed to complete one round. Through the above iterative process, the model parameters are gradually optimized in each round of training, resulting in a continuous decrease in prediction loss and a continuous improvement in model prediction accuracy.
[0111] Furthermore, when adjusting model parameters in reverse based on prediction loss and training hyperparameters, different optimization algorithms can be selected. For example, an optimizer with an adaptive learning rate (such as Adam) can be used to dynamically adjust the learning rate of each parameter, or an optimizer with momentum (such as SGD with Momentum) can be used to accelerate convergence. Those skilled in the art can select appropriate optimization algorithms based on the model structure and data characteristics. By adjusting model parameters in reverse based on prediction loss and training hyperparameters, the model can gradually approach the optimal parameter state during iterative training.
[0112] In one implementation, the training stopping condition includes that the mean absolute percentage error of the validation set has not decreased for a consecutive set number of rounds. After adjusting the model parameters of the initial coal transportation volume prediction model based on the prediction loss and the training hyperparameters, the method further includes: obtaining a validation set, which includes historical coal data under multiple business dimensions and corresponding coal transportation volume labels; determining the initial validation set mean absolute percentage error of the initial coal transportation volume prediction model based on the validation set; if the number of training rounds is less than or equal to 1 or the mean absolute percentage error of the validation set decreases, then returning to continue model training based on the next sample coal feature data; if the number of training rounds is greater than 1 and the mean absolute percentage error of the validation set has not decreased for a consecutive set number of rounds, then stopping training and obtaining the target coal transportation volume prediction model after training.
[0113] The process described above, which involves "continuing training if the number of training epochs is less than or equal to 1 or the mean absolute percentage error of the validation set decreases, and stopping training if the number of training epochs is greater than 1 and the mean absolute percentage error of the validation set does not decrease for a set number of consecutive epochs," is known as the early stopping mechanism. Its core principle is to control the timing of training termination by monitoring the changing trend of the validation set error. When the validation set error no longer decreases for several consecutive epochs, training is terminated in advance, thereby cutting off training in time when the model's generalization ability reaches its optimal level and avoiding overfitting due to overtraining.
[0114] During training, after each training epoch, the current model can be evaluated using a validation set. Specifically, the sample coal feature data from the validation set is input into the current model to obtain the corresponding predicted coal transportation volume. Then, the mean absolute percentage error between the predicted values of all samples on the validation set and the true labels is calculated as the validation set error. If the current training epoch is less than or equal to 1, it indicates that the model has not been sufficiently trained and training should continue. If the mean absolute percentage error of the validation set decreases compared to the previous epoch, it indicates that the model is still in the optimization process and training should continue. If the training epoch is greater than 1 and the mean absolute percentage error of the validation set does not decrease for a consecutive set number of epochs (i.e., the number of epochs set by the early stop parameter), it indicates that the model has converged or begun to overfit, and training should be stopped. The current model parameters should be saved to obtain the trained target coal transportation volume prediction model.
[0115] Specifically, after each training round, the feature data of the samples in the validation set are input into the current model to obtain the predicted transportation volume of each sample, and the mean absolute percentage error of the validation set is calculated. If the current training round is the first round, training continues; if the mean absolute percentage error of the validation set decreases compared to the previous round, training continues; if the number of training rounds is greater than 1 and the mean absolute percentage error of the validation set does not decrease for 12 consecutive rounds, training stops, the current model parameters are saved, and the trained target coal transportation volume prediction model is obtained.
[0116] Furthermore, when determining early stopping based on the mean absolute percentage error of the validation set, the threshold for the number of consecutive epochs without a decrease can be dynamically adjusted according to the actual training situation. For example, a larger threshold can be used in the early stages of training to avoid premature stopping, while a smaller threshold can be used in the later stages to terminate training more promptly. Different early stopping conditions can also be set for different types of feature data. Those skilled in the art can flexibly configure early stopping strategies according to actual training results and business needs, and this specification does not impose any restrictions on this. By using the continuous absence of a decrease in the mean absolute percentage error of the validation set as an early stopping condition, training can be stopped in a timely manner when the model reaches its optimal state, avoiding overfitting due to overtraining, while also saving computational resources.
[0117] In one implementation, the sample data can be divided into a training set, a validation set, and a test set in chronological order. For example, following the historical data collected in step 202 from January 2023 to December 2025 (36 months in total), the first 70% (January 2023 to February 2025, a total of 26 months) is used as the training set for model parameter learning, the middle 15% (March 2025 to June 2025, a total of 4 months) is used as the validation set for hyperparameter tuning and early stopping detection, and the last 15% (July 2025 to December 2025, a total of 6 months) is used as the test set for final model performance evaluation. The division ratio can be adjusted according to the actual amount of data, and this specification does not impose any restrictions on it.
[0118] The trained target coal transportation volume prediction model can be used to execute the coal transportation volume prediction method described in steps 102 to 108 above, so as to realize automatic and high-precision prediction of coal transportation volume in the next scheduling cycle.
[0119] Optionally, in one implementation, after model training is complete, predicted data and actual execution data can be stored in real time, prediction deviation can be automatically calculated, deviation analysis reports can be generated, the causes of deviations can be identified, and the prediction results can be verified and the causes of deviations can be traced. Optionally, the latest historical data can be automatically collected monthly to retrain the model, update the weights of each factor, and continuously improve prediction accuracy. In addition, feature importance data during model training can be saved to clarify the influence weight of each factor on the transportation volume, making the prediction results interpretable, verifiable, and reviewable, providing data support for subsequent model optimization and business decisions. It should be noted that the above verification and iteration mechanisms are only optional implementation methods and can be flexibly configured according to business needs in actual applications. This specification does not impose any restrictions on them.
[0120] The above is an illustrative scheme of a coal transportation volume prediction model training method provided in the embodiments of this specification. It should be noted that the technical solution of this training method and the technical solution of the coal transportation volume prediction method described above belong to the same concept. For details not described in detail in the training method, please refer to the description of the technical solution of the prediction method described above.
[0121] See Figure 3 , Figure 3 This specification illustrates a framework diagram of a coal transportation volume prediction method provided in one embodiment, which specifically includes the following steps.
[0122] Step 302: Obtain target coal data across multiple business dimensions.
[0123] Specifically, based on the configured internal operational data categories, the corresponding internal operational data is obtained through database reading; based on the configured transportation constraint data categories, the corresponding transportation constraint data is obtained through system interface calls; based on the configured external market data categories, the corresponding external market data is obtained through platform interface calls; based on the configured policy and regulatory data categories, the corresponding policy and regulatory data is obtained through data interfaces; and based on the configured time feature data categories, the corresponding time feature data is obtained through local configuration reading.
[0124] Step 304: Based on the preprocessing strategy corresponding to the coal data distribution rules, preprocess the target coal data to obtain the target coal processing dataset.
[0125] Specifically, the stationarity of the target coal data is checked, and if non-stationary sequences exist, differential processing is performed; periodic analysis is performed on the stationary data to extract periodic identifiers; and randomness is checked on the stationary data to filter out random data and retain non-random data, thus obtaining the target coal processing dataset.
[0126] Step 306: Based on the relevant influencing factors of coal transportation volume, construct features for the target coal processing dataset to obtain the target coal feature set.
[0127] Specifically, time-related coal data for time-feature factors are obtained from the target coal processing dataset to construct time-feature coal data, including heating season indicators, summer peak electricity consumption indicators, quarter-end indicators, monthly month-on-month growth rate, and annual year-on-year growth rate; lagged coal data for lag-feature factors are obtained to construct lag-feature coal data, including the lag value of transportation volume for different scheduling cycles, rolling mean, and rolling standard deviation; operational coal data for operational factors are obtained to construct operational-feature coal data, including contract fulfillment rate, coal mine capacity utilization rate, inventory availability days, washing and recovery rate, and the proportion of output of each coal type in each coal mine; and constraint-related coal data for constraint-feature factors are obtained to construct constraint-feature coal data, including railway wagon issuance limits, dispatch station storage limits, coal mine approved capacity limits, environmental protection production restriction impact coefficient, and safety inspection impact coefficient.
[0128] Step 308: Input the target coal characteristic data under the relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle.
[0129] Step 310: Obtain the hard constraint upper limit of the scheduling cycle corresponding to the target coal transportation volume. If the target coal transportation volume is greater than the hard constraint upper limit, adjust the target coal transportation volume to the hard constraint upper limit.
[0130] Step 312: Generate the transportation plan for the next scheduling cycle based on the target coal transportation volume for the next scheduling cycle.
[0131] Specifically, the total inventory data, total safety stock target value, and total washing and processing recovery rate for the next scheduling cycle are obtained; the target coal transportation volume is added to the total safety stock target value and the total inventory data is subtracted to obtain the total planned output; the total planned output is multiplied by the total washing and processing recovery rate to obtain the total planned washing and processing volume; based on the total planned output and the total planned washing and processing volume, the transportation plan for the next scheduling cycle is generated.
[0132] It should be noted that the numbering of steps 302 to 312 above is only to distinguish different implementation stages, and the numbering between the steps does not restrict the actual execution order. Figure 3 The steps in the process can be flexibly combined and implemented according to the actual prediction scenario.
[0133] Corresponding to the embodiments of the coal transportation volume prediction method described above, this specification also provides embodiments of a corresponding coal transportation volume prediction device. Figure 4 A schematic diagram of a coal transportation volume prediction device according to one embodiment of this specification is shown. Figure 4 As shown, the device includes: The first acquisition module 402 is configured to acquire target coal data under multiple business dimensions; The first preprocessing module 404 is configured to preprocess the target coal data based on the preprocessing strategy corresponding to the coal data distribution rules to obtain the target coal processing dataset, wherein the preprocessing strategy is consistent with the preprocessing strategy in the training phase. The first feature construction module 406 is configured to construct features for the target coal processing dataset based on the relevant influencing factors of coal transportation volume, and obtain a target coal feature set, wherein the target coal feature set includes target coal feature data under the relevant influencing factors. The prediction module 408 is configured to input the target coal characteristic data under the relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle.
[0134] Optionally, the target coal data under multiple business dimensions includes at least one of internal operation data, transportation constraint data, external market data, policy and regulatory data, and time characteristic data; the first acquisition module 402 is further configured to acquire at least one of the following: acquire corresponding internal operation data by reading from a database based on each configured internal operation data category; acquire corresponding transportation constraint data by calling a system interface based on each configured transportation constraint data category; acquire corresponding external market data by calling a platform interface based on each configured external market data category; acquire corresponding policy and regulatory data by using a data interface based on each configured policy and regulatory data category; and acquire corresponding time characteristic data by reading from a local configuration based on each configured time characteristic data category.
[0135] Optionally, the preprocessing strategy includes stationarity verification, periodic analysis, and randomness testing; the first preprocessing module 404 is further configured to: perform stationarity verification on the target coal data; if there are non-stationary sequences in the target coal data, perform differencing on the non-stationary sequences in the target coal data to obtain stationary target coal data; perform periodic analysis on the stationary target coal data to obtain the periodicity identifier of the stationary target coal data, wherein the periodicity identifier is used to determine the relevant influencing factors of coal transportation volume; and perform randomness testing on the stationary target coal data, filtering out random data and retaining non-random data to obtain the target coal processing dataset.
[0136] Optionally, the relevant influencing factors include at least one of time characteristic factors, lag characteristic factors, operational characteristic factors, and constraint characteristic factors; the target coal feature set includes at least one of time characteristic coal data under time characteristic factors, lag characteristic coal data under lag characteristic factors, operational characteristic coal data under operational characteristic factors, and constraint characteristic coal data under constraint characteristic factors; the first feature construction module 406 is further configured to: obtain time-related coal data of time characteristic factors from the target coal processing dataset; construct time characteristic coal data based on the time-related coal data, wherein the time characteristic factors include at least one of heating season identifier, summer peak electricity consumption identifier, quarter-end identifier, monthly month-on-month growth rate, and annual year-on-year growth rate; and obtain lag-related coal data of lag characteristic factors from the target coal processing dataset. Based on lagged relevant coal data, lagged characteristic coal data is constructed, wherein the lagged characteristic factors include at least one of the following: lagged values of transport volume for different scheduling cycles, rolling mean of transport volume for different scheduling cycles, and rolling standard deviation. Operational characteristic coal data is constructed based on operational characteristic factors obtained from the target coal processing dataset, wherein the operational characteristic factors include at least one of the following: contract fulfillment rate, coal mine capacity utilization rate, inventory availability days, washing and recovery rate, and the proportion of output of each coal type in each coal mine. Constrained characteristic coal data is constructed based on constrained characteristic factors obtained from the target coal processing dataset, wherein the constrained characteristic factors include at least one of the following: railway freight car limit, dispatch station storage limit, coal mine approved capacity limit, environmental protection production restriction impact coefficient, and safety inspection impact coefficient.
[0137] The device also includes a hard constraint correction module, which is configured to: obtain the upper limit of the hard constraint for the scheduling period corresponding to the target coal transportation volume; if the target coal transportation volume is greater than the upper limit of the hard constraint, adjust the target coal transportation volume to the upper limit of the hard constraint.
[0138] The device also includes a plan generation module, configured to: acquire the total inventory data, total safety stock target value, and total washing and processing recovery rate for the next scheduling cycle; add the target coal transportation volume to the total safety stock target value and subtract the total inventory data to obtain the total planned output; multiply the total planned output by the total washing and processing recovery rate to obtain the total planned washing and processing volume; and generate the transportation plan for the next scheduling cycle based on the total planned output and the total planned washing and processing volume.
[0139] It should be noted that the technical solution of this coal transportation volume prediction device and the technical solution of the above-mentioned coal transportation volume prediction method belong to the same concept. For details not described in detail in the technical solution of this device, please refer to the description of the technical solution of the above-mentioned coal transportation volume prediction method.
[0140] Corresponding to the embodiments of the coal transportation volume prediction model training method described above, this specification also provides embodiments of a corresponding coal transportation volume prediction model training device. Figure 5 This specification illustrates a schematic diagram of a coal transportation volume prediction model training device according to one embodiment. Figure 5 As shown, the device includes: The second acquisition module 502 is configured to acquire historical coal data and corresponding coal transportation volume tags under multiple business dimensions. The second preprocessing module 504 is configured to preprocess the historical coal data based on the preprocessing strategy corresponding to the coal data distribution rules to obtain a sample coal processing dataset. The second feature construction module 506 is configured to construct features on the sample coal processing dataset based on the relevant influencing factors of coal transportation volume, and obtain a sample coal feature set, wherein the sample coal feature set includes sample coal feature data under the relevant influencing factors and the corresponding coal transportation volume label. Training module 508 is configured to train an initial coal transportation volume prediction model based on sample coal feature data under the relevant influencing factors and the corresponding coal transportation volume labels, until the training stops and a target coal transportation volume prediction model is obtained. The target coal transportation volume prediction model is used to execute the above-mentioned coal transportation volume prediction method.
[0141] Optionally, the training module 508 is further configured to: configure training hyperparameters for the model training process, wherein the training hyperparameters include at least one of regularization parameters, sampling parameters, leaf node constraint parameters, and early stopping parameters. The regularization parameters are used to penalize parameter values that exceed a set threshold. The sampling parameters include the sample sampling rate and the feature sampling rate. The leaf node constraint parameters are used to constrain the minimum number of samples for each leaf node. The early stopping parameter is a threshold number of rounds in which the validation set error does not decrease continuously.
[0142] Optionally, the training module 508 is further configured to: input the first sample coal feature data under the relevant influencing factors into the initial coal transportation volume prediction model to obtain the corresponding predicted coal transportation volume, wherein the first sample coal feature data is any sample coal feature data under the relevant influencing factors; calculate the prediction loss based on the coal transportation volume label and predicted coal transportation volume corresponding to the first sample coal feature data; adjust the model parameters of the initial coal transportation volume prediction model in reverse based on the prediction loss and training hyperparameters; return to continue model training based on the next sample coal feature data until the training stopping condition is reached to obtain the target coal transportation volume prediction model.
[0143] Optionally, the training module 508 is further configured to: obtain a validation set, which includes historical coal data under multiple business dimensions and corresponding coal transportation volume labels; based on the validation set, determine the initial validation set mean absolute percentage error of the initial coal transportation volume prediction model; if the number of training rounds is less than or equal to 1 or the mean absolute percentage error of the validation set decreases, then return to continue model training based on the next sample coal feature data; if the number of training rounds is greater than 1 and the mean absolute percentage error of the validation set does not decrease for a continuous set number of rounds, then stop training and obtain the target coal transportation volume prediction model that has been trained.
[0144] It should be noted that the technical solution of the coal transportation volume prediction model training device and the technical solution of the coal transportation volume prediction model training method mentioned above belong to the same concept. For details not described in detail in the technical solution of the device, please refer to the description of the technical solution of the coal transportation volume prediction model training method mentioned above.
[0145] Figure 6 A structural block diagram of a computing device according to one embodiment of this specification is shown. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.
[0146] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. 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 640 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) 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, or a Near Field Communication (NFC) interface.
[0147] In one embodiment of this specification, the above-described components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0148] The computing device 600 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 600 can also be a mobile or stationary server.
[0149] The processor 620 is used to execute the following computer program / instruction, which, when executed by the processor, implements the steps of the above-mentioned coal transportation volume prediction method and coal transportation volume prediction model training method.
[0150] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the technical solution of the coal transportation volume prediction method and the coal transportation volume prediction model training method described above. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the coal transportation volume prediction method and the coal transportation volume prediction model training method described above.
[0151] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described coal transportation volume prediction method and coal transportation volume prediction model training method.
[0152] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the coal transportation volume prediction method and the coal transportation volume prediction model training method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the coal transportation volume prediction method and the coal transportation volume prediction model training method described above.
[0153] An embodiment of this specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described coal transportation volume prediction method and coal transportation volume prediction model training method.
[0154] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the technical solution of the coal transportation volume prediction method and the coal transportation volume prediction model training method described above. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the coal transportation volume prediction method and the coal transportation volume prediction model training method described above.
[0155] The foregoing has described 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 that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0156] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0157] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0158] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0159] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for predicting coal transportation volume, characterized in that, include: Acquire target coal data across multiple business dimensions; Based on the preprocessing strategy corresponding to the coal data distribution rules, the target coal data is preprocessed to obtain the target coal processing dataset, wherein the preprocessing strategy is consistent with the preprocessing strategy in the training phase. Based on the relevant influencing factors of coal transportation volume, feature construction is performed on the target coal processing dataset to obtain the target coal feature set, wherein the target coal feature set includes target coal feature data under the relevant influencing factors; Input the target coal characteristic data under the relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle.
2. The method according to claim 1, characterized in that, The target coal data under the multi-business dimensions includes at least one of the following: internal operation data, transportation constraint data, external market data, policy and regulatory data, and time characteristic data; The acquisition of target coal data across multiple business dimensions includes at least one of the following: Based on the configured internal operational data categories, the corresponding internal operational data is obtained through database reading. Based on the configured transportation constraint data categories, the corresponding transportation constraint data is obtained through system interface calls; Based on the configured external market data categories, the corresponding external market data is obtained through platform interface calls; Based on the configured policy and regulatory data categories, the corresponding policy and regulatory data are obtained through data interfaces. Based on the configured time feature data categories, the corresponding time feature data is obtained through local configuration reading.
3. The method according to claim 1, characterized in that, The preprocessing strategy includes stationarity verification, periodicity analysis, and randomness testing; The preprocessing strategy based on the coal data distribution rules preprocesses the target coal data to obtain a target coal processing dataset, including: The stationarity of the target coal data is checked. If there is a non-stationary sequence in the target coal data, the non-stationary sequence in the target coal data is differentially processed to obtain stationary target coal data. Periodic analysis is performed on the stable target coal data to obtain the periodicity identifier of the stable target coal data, wherein the periodicity identifier is used to determine the relevant influencing factors of the coal transportation volume; A randomness test is performed on the stable target coal data to remove random data and retain non-random data, thereby obtaining the target coal processing dataset.
4. The method according to claim 1, characterized in that, The relevant influencing factors include at least one of the following: time characteristic factors, lag characteristic factors, operational characteristic factors, and constraint characteristic factors. The target coal feature set includes at least one of the following: time characteristic coal data under time characteristic factors, lag characteristic coal data under lag characteristic factors, operational characteristic coal data under operational characteristic factors, and constraint characteristic coal data under constraint characteristic factors. The target coal processing dataset is feature-constructed based on relevant influencing factors of coal transportation volume to obtain a target coal feature set, including at least one of the following: The time-related coal data of the time feature factors are obtained from the target coal processing dataset, and time feature coal data is constructed based on the time-related coal data. The time feature factors include at least one of heating season identifier, summer peak electricity consumption identifier, quarter-end identifier, monthly month-on-month growth rate and annual year-on-year growth rate. The lagged correlation coal data of the lagged feature factors are obtained from the target coal processing dataset. Based on the lagged correlation coal data, lagged feature coal data is constructed. The lagged feature factors include at least one of the following: lagged values of transport volume in different scheduling cycles, rolling mean of transport volume in different scheduling cycles, and rolling standard deviation. Obtain operation-related coal data of the operation characteristic factors from the target coal processing dataset, and construct operation characteristic coal data based on the operation-related coal data. The operation characteristic factors include at least one of the following: contract fulfillment rate, coal mine capacity utilization rate, inventory availability days, washing and recovery rate, and the output proportion of each coal type in each coal mine. Obtain constraint-related coal data of the constraint feature factors from the target coal processing dataset, and construct constraint feature coal data based on the constraint-related coal data. The constraint feature factors include at least one of the following: railway freight car limit, dispatch station storage limit, coal mine approved production capacity limit, environmental protection production restriction impact coefficient, and safety inspection impact coefficient.
5. The method according to claim 1, characterized in that, After inputting the target coal characteristic data under the relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle, the method further includes: Obtain the hard constraint upper limit of the scheduling cycle corresponding to the target coal transportation volume; If the target coal transportation volume is greater than the hard constraint upper limit, then the target coal transportation volume will be adjusted to the hard constraint upper limit.
6. The method according to claim 1, characterized in that, After inputting the target coal characteristic data under the relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle, the method further includes: Obtain the total inventory data, total safety stock target value, and total washing recovery rate for the next scheduling cycle; The total planned output is obtained by adding the target coal transportation volume to the total safety stock target value and subtracting the total stock data. Multiply the total planned output by the total washing and screening recovery rate to obtain the total planned washing and screening quantity; Based on the total planned output and the total planned washing and sorting volume, a transportation plan for the next scheduling cycle is generated.
7. A training method for a coal transportation volume prediction model, characterized in that, include: Obtain historical coal data and corresponding coal transportation volume tags across multiple business dimensions; Based on the preprocessing strategy corresponding to the coal data distribution rules, the historical coal data is preprocessed to obtain a sample coal processing dataset. Based on the relevant influencing factors of coal transportation volume, feature construction is performed on the sample coal processing dataset to obtain a sample coal feature set, wherein the sample coal feature set includes sample coal feature data under the relevant influencing factors and the corresponding coal transportation volume label. Based on the sample coal characteristic data under the relevant influencing factors and the corresponding coal transportation volume labels, the initial coal transportation volume prediction model is trained until the training stops, and the target coal transportation volume prediction model is obtained. The target coal transportation volume prediction model is used to execute the coal transportation volume prediction method described in claims 1-6.
8. The method according to claim 7, characterized in that, Before training the initial coal transportation volume prediction model based on the sample coal characteristic data under the relevant influencing factors and the corresponding coal transportation volume labels, the following steps are also included: Configure training hyperparameters for the model training process, wherein the training hyperparameters include at least one of regularization parameters, sampling parameters, leaf node constraint parameters, and early stopping parameters. The regularization parameters are used to penalize parameter values that exceed a set threshold. The sampling parameters include sample sampling rate and feature sampling rate. The leaf node constraint parameters are used to constrain the minimum number of samples for each leaf node. The early stopping parameter is a threshold number of rounds in which the validation set error does not decrease continuously.
9. The method according to claim 8, characterized in that, The process of training an initial coal transportation volume prediction model based on sample coal characteristic data under the relevant influencing factors and corresponding coal transportation volume labels until the training stops, thereby obtaining a target coal transportation volume prediction model, includes: The first sample coal characteristic data under the relevant influencing factors is input into the initial coal transportation volume prediction model to obtain the corresponding predicted coal transportation volume, wherein the first sample coal characteristic data is any sample coal characteristic data under the relevant influencing factors. Based on the coal transportation volume label corresponding to the first sample coal feature data and the predicted coal transportation volume, the prediction loss is calculated. Based on the prediction loss and the training hyperparameters, the model parameters of the initial coal transportation volume prediction model are adjusted in reverse. The model training is then continued based on the next sample coal feature data until the training stop condition is met, and the target coal transportation volume prediction model is obtained.
10. The method according to claim 9, characterized in that, The training stopping condition includes the validation set mean absolute percentage error not decreasing for a consecutive set number of rounds; After adjusting the model parameters of the initial coal transportation volume prediction model based on the prediction loss and the training hyperparameters, the method further includes: Obtain a verification set, which includes historical coal data under multiple business dimensions and corresponding coal transportation volume tags; Based on the validation set, the initial validation set mean absolute percentage error of the initial coal transportation volume prediction model is determined. If the number of training rounds is less than or equal to 1 or the mean absolute percentage error of the validation set decreases, the model training is resumed based on the next sample coal feature data. If the number of training rounds is greater than 1 and the mean absolute percentage error of the validation set does not decrease for a continuous set number of rounds, the training is stopped, and the target coal transportation volume prediction model is obtained after training.
11. A coal transportation volume prediction device, characterized in that, include: The first acquisition module is configured to acquire target coal data across multiple business dimensions. The first preprocessing module is configured to preprocess the target coal data based on the preprocessing strategy corresponding to the coal data distribution rules to obtain the target coal processing dataset, wherein the preprocessing strategy is consistent with the preprocessing strategy in the training phase. The first feature construction module is configured to construct features for the target coal processing dataset based on relevant influencing factors of coal transportation volume, thereby obtaining a target coal feature set, wherein the target coal feature set includes target coal feature data under the relevant influencing factors. The prediction module is configured to input the target coal characteristic data under the relevant influencing factors into the target coal transportation volume prediction model to obtain the target coal transportation volume for the next scheduling cycle.
12. A training device for a coal transportation volume prediction model, characterized in that, include: The second acquisition module is configured to acquire historical coal data and corresponding coal transportation volume tags under multiple business dimensions. The second preprocessing module is configured to preprocess the historical coal data based on the preprocessing strategy corresponding to the coal data distribution rules to obtain a sample coal processing dataset. The second feature construction module is configured to construct features on the sample coal processing dataset based on the relevant influencing factors of coal transportation volume, and obtain a sample coal feature set, wherein the sample coal feature set includes sample coal feature data under the relevant influencing factors and the corresponding coal transportation volume label. The training module is configured to train the initial coal transportation volume prediction model based on the sample coal feature data under the relevant influencing factors and the corresponding coal transportation volume labels until the training stops, thereby obtaining the target coal transportation volume prediction model. The target coal transportation volume prediction model is used to execute the coal transportation volume prediction method as described in any one of claims 1-6.
13. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 10.
14. A computer-readable storage medium, characterized in that, It stores a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.
15. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.