Purchase aging prediction method based on stacked ensemble learning
By using a stacked ensemble learning approach, combined with supply chain knowledge graphs and external event data, multi-objective integrated prediction of procurement timeliness, cost, and risk is achieved. This solves the problem of integrated management in complex environments that is difficult to achieve in existing technologies, and improves the robustness and feasibility of decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA CHEMICAL CONSTRUCTION INTERNATIONAL TENDERING CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-05-22
Smart Images

Figure CN122072901A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of supply chain management and intelligent procurement technology, and in particular to a procurement timeliness prediction method based on stacked ensemble learning. Background Technology
[0002] In a globalized supply network with multiple competing suppliers, companies need to weigh various objectives such as timeliness, cost, and supply risk.
[0003] The industry often uses external variables such as historical delivery records and seasons / holidays to build lead time (delivery date) prediction models. Typical approaches include gradient boosting / random forest based on feature engineering, time series models (such as additive seasonal models), and their stacked ensembles, combined with real-time data and incremental learning to mitigate concept drift. These methods have achieved certain results in single-target point prediction in relatively stable scenarios.
[0004] However, current practices mostly use delivery date as the output, and then couple it with cost control, risk thresholds, etc., in a serial manner. This makes it difficult to support the selection of procurement sources and order allocation in an integrated way under budget, service level and capacity constraints. At the same time, there is a lack of operable modeling and online calibration mechanisms for dynamic factors such as bidding / substitution relationships between suppliers and timeliness uncertainties caused by external shocks, which can easily lead to suboptimal decisions in complex environments. Summary of the Invention
[0005] In view of the aforementioned existing problems, the present invention is proposed.
[0006] This invention provides a procurement timeliness prediction method based on stacked ensemble learning to solve the problems of existing methods that rely on single timeliness points for prediction, making it difficult to take into account cost risks and insufficient modeling of events and interactions.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0008] This invention provides a procurement timeliness prediction method based on stacked ensemble learning, comprising:
[0009] S1 Data Acquisition: Collect historical order data from multiple suppliers. The historical data includes at least procurement timeliness, historical cost information, and supply risk indicators.
[0010] S2 Feature Construction: Basic features are generated based on order attributes, seasonal holidays, and logistics routes; additional features are created by embedding event feature vectors obtained from text parsing of external event data and nodes obtained from the supply chain knowledge graph.
[0011] S3 Base Learner Training: Train at least two base learners with different structures to jointly predict multiple objectives, including quantiles or probability indicators of procurement timeliness, future costs or cost increments, and supply risk indicators.
[0012] S4 Fusion and Calibration: The multi-objective outputs of each base learner are fused and probability / quantile calibration is performed using a meta-learner, which is implemented through constrained weight learning and / or dynamic weighting by a neural network.
[0013] S5 Inference Output: Input new order features during the inference phase and output joint prediction results including on-time probability, target quantile, cost prediction, and risk score.
[0014] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, the base learner includes at least two different types of models, which are selected from gradient boosting trees, random forests, temporal convolutional networks, and recurrent neural networks, and are configured to share some features and undergo multi-task joint training.
[0015] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, the multi-task joint training adopts a sample-level joint loss, which simultaneously constrains the procurement timeliness quantile error, cost prediction error, and supply risk prediction error, and balances them through task weights.
[0016] The composition and weight settings of the sample-level joint loss used in the multi-task joint training are as follows:
[0017] Step C1: For the two implementations of the time-leader prediction head, a unified notation is used during training: when selecting quantile prediction or distribution prediction, the corresponding branches in the following formula are used respectively:
[0018] ,
[0019] in, Indicates the loss of time-sensitive tasks. Indicates the set of quantiles used. Indicates the number of elements in the set. At the quantile level, This is a needle-type quantile loss. For residuals, This indicates the actual procurement timeframe; lt is the timeframe index. Indicates prediction Quantiles For continuous rank probability scores. The distribution function is the actual empirical distribution function. For predicting the distribution function;
[0020] Step C2: The cost branch uses robust regression loss, and the risk branch uses logarithmic loss.
[0021] ,
[0022] ,
[0023] in, Indicates cost loss, Indicates risk and loss. For batch size, For sample index, For Huber functions, For Huber threshold, For the first Cost residuals for each sample For indicator functions, and These are the predicted and actual costs, respectively. For the first The risk prediction probability of a sample To correspond to the real tags, It is the natural logarithm;
[0024] Step C3: The three tasks are jointly optimized using a weighted sum, with the weights subject to a constraint that they are non-negative and their sum is 1.
[0025] ,
[0026] in, For joint losses, The task weights are timeliness, cost, and risk, respectively.
[0027] Step C4, training iteration number The weights of each step are generated using a difficulty index and automatically normalized.
[0028] ,
[0029] in, For the next task ( The weight of ) For the current step task The difficulty index, It is the numerical stability constant. The temperature index is the denominator, and the normalization factor for the three tasks is the denominator; in the formula, the difficulty index is updated using the exponential moving average:
[0030] ,
[0031] in, For smoothing coefficients, For the task In step Batch losses, This is the initial baseline loss for the same task.
[0032] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, the meta-learner is a constrained weighted fusion model, whose learned fusion weights satisfy the constraints of non-negativity and sum to 1, and applies monotonicity constraints to the quantile output to minimize the overall bias on the validation set.
[0033] The constraints and objectives of the constrained fusion weights and quantile monotonicity are as follows:
[0034] Step D1: Learn the weight vector for fusing quantile outputs on the validation set. The fusion quantile is generated by convex combination of the quantile predictions of each base learner. The weights are set according to the constraints of non-negativity and summation to 1. The monotonicity constraint is shown in step D2, and the objective function is shown in step D3.
[0035] Step D2, when the quantile level satisfies At that time, apply a monotonicity non-crossing constraint to each sample:
[0036] ,
[0037] in, and Representing samples respectively At the quantile level and Fusion quantiles, For the validation set sample index, Given two elements in a predefined set of quantiles, and , For the set of quantiles;
[0038] Step D3, using the combined quantile loss and coverage bias as the objective, solves under weight and monotonicity constraints:
[0039]
[0040]
[0041] in, To verify the target set, For the validation set index set, For the sample size, For the set of quantiles, For its size, For quantile loss, For the sample The true timeliness, For the first Each base learner in samples quantiles The prediction As the number of base learners, To correspond to the fusion weights, The weighting factor for covering the deviation term, In order to be in The empirical coverage under the following conditions, i.e., the validation set satisfies The proportion;
[0042] Step D4: Apply unconstrained parameterization to the weights and combine it with monotonic projection:
[0043] ,
[0044] in, These are learnable, free parameters. The fusion weights obtained through Softmax mapping naturally satisfy non-negativity and sum to 1; during optimization, the following is adopted:
[0045] (a) to Perform projected subgradient / interior point approximation, and after each batch... Perform PAV monotonic projection.
[0046] Or (b) directly use the convex optimization solver according to the linear inequality constraints in step D3.
[0047] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, the external event data includes news, announcements, weather and port congestion information. Event feature vectors are generated using named entity recognition and classification methods, and then concatenated with order-level features through attention or gating mechanisms.
[0048] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, the meta-learner is a gated recurrent unit network, whose input is an event feature vector sorted by time and the stage prediction output of each base learner, and whose output is a dynamic fusion weight for the current sample.
[0049] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, the supply chain knowledge graph uses suppliers and logistics nodes as vertices and supply-demand relationships and transportation routes as edges. Graph neural networks are used for embedding learning to obtain node embeddings, which are then input as additional features into the base learner.
[0050] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, the meta-learner is a graph convolutional network, which performs topology-aware weighted fusion of the outputs of each base learner based on the topology of the supply chain knowledge graph.
[0051] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, the method includes: monitoring concept drift based on statistical tests or sliding window indicators; triggering incremental updates when drift is detected, and performing online fine-tuning or mini-batch retraining on the base learner and meta-learner.
[0052] As a preferred embodiment of the procurement timeliness prediction method based on stacked ensemble learning described in this invention, incomplete orders are treated as right-censored samples for learning, and the quantiles or probability outputs of timeliness are posteriorly calibrated.
[0053] The beneficial effects of this invention are as follows: At the prediction end, this invention achieves multidimensionality of objectives and explicitness of uncertainties. Through a unified multi-task framework, it simultaneously learns procurement timeliness quantiles or on-time probability, future costs or cost increments, and supply risks, avoiding the problem of excessive bias in real decision-making driven by only a single timeliness point value. Based on constrained stacked fusion, the fusion weights satisfy non-negativity and summation, while imposing monotonic constraints on quantiles. Simultaneously, during the validation period, calibration is performed using coverage bias and quantile loss, making the output both interpretable and directly applicable to service level and budget constraints. The introduction of event text parsing and knowledge graph embedding enables the inclusion of geopolitical and logistical emergencies, supplier substitution relationships, and path linkages into feature representation, strengthening the responsiveness to dynamic environments and competitive relationships. Through concept drift monitoring and incremental update mechanisms, the model can stably adjust when demand structure or transportation conditions change, reducing performance degradation in long-term deployment. For incomplete orders, right censoring learning combined with posterior calibration improves the consistency and reliability of high quantiles and on-time probabilities.
[0054] This invention elevates point prediction to a calibrable distribution / probability output and integrates cost, risk, and timeliness into a unified model, significantly reducing the gap between prediction and decision-making. It provides directly usable multi-objective inputs for subsequent prescription optimization, supplier selection, and order allocation, improving robustness and feasibility in complex scenarios. Attached Figure Description
[0055] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation on the scope of this application.
[0056] Figure 1This is a flowchart illustrating the procurement timeliness prediction method based on stacked ensemble learning in the embodiments. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0058] All terms used in this application (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0059] For example, the terms “first” and “second” used in this application are only used to distinguish and describe similar objects, to differentiate the first object from another object, and are not used to describe a specific order or sequence, nor should they be interpreted as indicating or implying relative importance.
[0060] This application proposes a procurement timeliness prediction method based on stacked ensemble learning, combining... Figure 1 As shown, the method includes:
[0061] S1 Data Acquisition: Collect historical order data from multiple suppliers. This historical data includes at least procurement timeliness (the lead time from order placement to final receipt), historical cost information, and supply risk indicators. In this embodiment, procurement timeliness refers to the duration from order placement to final receipt. Historical cost information includes calculable fields tied to the order, such as purchase price, transportation costs, and customs duties. Supply risk indicators primarily consist of delay markers, default markers, or interruption markers, sourced from enterprise resources, warehousing and transportation systems, and third-party customs clearance and port entry records. Specifically, the default sampling period is based on calendar days, with a preferred time window of 12-36 months to cover seasonality. Timestamps are uniformly converted to the time zone of the order fulfillment location. If the same order is reported for receipt multiple times, the latest confirmed receipt date is used. Optionally, if historical costs exist in multiple currencies, they are converted to a unified measurement currency using the publicly available exchange rate on the order date during the data acquisition phase. When a key time field is missing, the order is cancelled. When the proportion of missing cost fields exceeds 5%, the missing data is filled in once based on the median value of the same product category from the same supplier over the past three months before being used in training.
[0062] S2 Feature Construction: Basic features are generated based on order attributes, seasonal holidays, and logistics routes. Additional features are obtained by parsing external event data into event feature vectors and node embeddings from the supply chain knowledge graph. Furthermore, external event data includes text entries such as weather, port congestion, policy announcements, and supplier public statements. Text parsing employs named entity extraction and event type classification, outputting fixed-length event vectors aligned to the order trigger date. Specifically, event alignment defaults to a 30-day window, with exponential decay applied to events closer to the trigger date; the decay half-life can be optimized within the range of 7-21 days. Node embeddings from the knowledge graph are derived from a graph structure generated from supplier master data and transportation route ledgers, obtained through offline training of a graph neural network. The dimension of node embeddings is selected between 16 and 128, and is updated weekly by default; if an update fails, the previous available version is reused. Optionally, duplicate or highly similar events on the same day are deduplicated before vectorization, retaining only the one with the highest confidence. When a certain type of external event is completely missing, a zero vector is used as a placeholder, without affecting the input size of subsequent models.
[0063] S3 Base Learner Training: Train at least two base learners with different structures to jointly predict multiple objectives, including quantiles or probability indicators of procurement timeliness, future costs or cost increments, and supply risk indicators. In this embodiment, the formation of multi-task labels follows the same observation closure point to avoid using future information. Future costs can be calculated based on the full-chain cost after order fulfillment, and cost increments are referenced to the historical rolling benchmark of the same category and destination. Specifically, the positive and negative samples of delay risk are set with a tolerance threshold based on the commitment date, with a default threshold of 24 hours. When there is class imbalance, undersampling or cost weighting is performed according to the supplier dimension. The training set, validation set, and test set are split by time, with a default ratio of 7:2:1, ensuring that suppliers are not leaked during the splitting. Optionally, if some orders lack commitment dates but have stage milestones, the expected receipt date of the milestones is used instead. When the same order has contradictory time sequences, the order is removed, and the abnormal proportion on the supplier side is recorded for subsequent quality audits.
[0064] S4 Fusion and Calibration: A meta-learner is used to fuse the multi-objective outputs of each base learner and perform probability / quantile calibration. The meta-learner achieves this through constrained weight learning and / or dynamic weighting via a neural network. Specifically, fusion training employs a folding extrapolation strategy. First, the base learners are cross-trained to generate externally usable extrapolation predictions. Then, fusion weights are learned on validation data or a dynamically weighted network is trained to reduce information leakage. The default folding number is 5. The fusion objective is weighted between coverage bias and quantile loss, with weight values adjusted on the validation set. If the business emphasizes high quantile stability, the weight of the loss corresponding to high quantiles is increased during the fusion stage. Optionally, the dynamically weighted network and constrained weights output fusion coefficients of the same dimension under the same input, maintaining consistent inference paths. When any base learner has no usable output in a batch, its fusion coefficient is set to zero, and the remaining coefficients are normalized proportionally.
[0065] S5 Inference Output: During the inference phase, new order features are input, and the output includes a joint prediction result comprising on-time probability, target quantile, cost prediction, and risk score. In this embodiment, the inference interface returns structured results, including quantile indicators, on-time probability, cost point estimation, and risk score, along with timestamps and model version information for auditing purposes. Specifically, the default output quantiles are median, high quantile, and very high quantile, with the default threshold corresponding to the agreed service level. Cost results are rounded to two decimal places per order. If an event or graph feature is missing in the current batch, the most recently available embedding and zero-vector event are used as placeholders to ensure the output dimension remains unchanged. Optionally, if the on-time probability is lower than the threshold set by the business side, the interface also returns a prompt field for subsequent prescription layer decision-making. When the input sample lacks a key primary key or required time field, an unpredictable state is directly returned, and the error reason is recorded.
[0066] In one embodiment, the base learner includes at least two different types of models, selected from gradient boosting trees, random forests, temporal convolutional networks, and recurrent neural networks, and configured to share some features and perform multi-task joint training. Similarly, the model structure adopts a shared trunk and multi-task output heads, with the trunk responsible for general feature representation and the output heads corresponding to timeliness, cost, and risk, respectively. Specifically, discrete features are embedded and concatenated with continuous features, and temporal convolution and recurrent structures are used to model milestone sequences or event sequences that evolve over time. The default embedding dimension is of medium size, and the dropout rate is set to a moderate range to prevent overfitting. Early stopping is triggered based on the comprehensive index of the validation set, and the number of patient rounds can be adjusted between 3 and 8. Optionally, if the data scale is small, it can degenerate into a joint training configuration of only tree models, keeping the input and output caliber unchanged. When all labels of a task are of the same type in a small batch, the gradient update of that task is temporarily frozen once.
[0067] In one embodiment, multi-task joint training employs sample-level joint loss, which simultaneously constrains the procurement timeliness quantile error, cost prediction error, and supply risk prediction error, and balances them through task weights.
[0068] The composition and weight settings of the sample-level joint loss used in multi-task joint training are as follows:
[0069] Step C1: For the two implementations of the time-leader prediction head, a unified notation is used during training: when selecting quantile prediction or distribution prediction, the corresponding branches in the following formula are used respectively:
[0070] ,
[0071] in, Indicates the loss of time-sensitive tasks. Indicates the set of quantiles used. Indicates the number of elements in the set. At the quantile level, This is a needle-type quantile loss. For residuals, This indicates the actual procurement timeframe; lt is the timeframe index. Indicates prediction Quantiles For continuous rank probability scores. The distribution function is the actual empirical distribution function. For predicting the distribution function;
[0072] Step C2: The cost branch uses robust regression loss, and the risk branch uses logarithmic loss.
[0073] ,
[0074] ,
[0075] in, Indicates cost loss, Indicates risk and loss. For batch size, For sample index, For Huber functions, For Huber threshold, For the first Cost residuals for each sample For indicator functions, and These are the predicted and actual costs, respectively. For the first The probability of predicting the risk (or timeliness) of a sample. To correspond to the real tags, It is the natural logarithm;
[0076] Step C3: The three tasks are jointly optimized using a weighted sum, with the weights subject to a constraint that they are non-negative and their sum is 1.
[0077] ,
[0078] in, For joint losses, The task weights are timeliness, cost, and risk, respectively.
[0079] Step C4, training iteration number The weights of each step are generated using a difficulty index and automatically normalized.
[0080] ,
[0081] in, For the next task ( The weight of ) For the current step task The difficulty index, It is the numerical stability constant. The temperature index is the denominator, and the normalization factor for the three tasks is the denominator; in the formula, the difficulty index is updated using the exponential moving average:
[0082] ,
[0083] in, For smoothing coefficients, For the task In step Batch losses, The initial baseline loss for the same task is used. In this embodiment, the batch size is selected within a medium range based on the sample size and memory capacity, typically ranging from several hundred to several thousand. The target quantile level includes the median and two high quantiles by default, but can be expanded according to the service level. The true experience distribution is obtained by statistically accumulating the distribution at the sample layer, and the predicted distribution is approximated by the distribution parameters output by the model or the discrete quantile set. Specifically, the numerical stability constant is taken as a very small positive number, the temperature index controls the concentration of task weights, and the smoothing coefficient is used for time smoothing of the difficulty index; all three are selected through grid search on the validation set. The threshold for robust regression can be obtained by scaling the median absolute deviation of the cost residual, and the probability branch is lightly pruned at extreme values to avoid abnormal logarithmic calculations. Optionally, to prevent a certain task from dominating for a long time, a lower limit can be set for the task weights to ensure gradient coverage. When the experience coverage calculation samples are insufficient, the difficulty index is not updated and the task weights from the previous step are used.
[0084] Quantile set Encryption can be applied at higher quantiles to improve tail coverage. The sample layer is approximated by numerical integration. , , Selected on the validation set, for Cut to avoid When necessary Set a lower bound to maintain gradient coverage across multiple tasks;
[0085] Specifically, this section constructs a unified training objective around three types of objectives and assigns weights a normalization and adaptive adjustment mechanism. The timeliness branch is described by two branches: one is to measure the coverage deviation of different time periods using needle-type quantile loss, and the other is to measure the overall shape difference using distribution distance. Both of these are consistent with the business evaluation criteria. The cost branch introduces robust regression to maintain convergence stability when abnormal samples exist. The risk branch uses log loss to drive probabilistic learning, which facilitates subsequent calibration and decision threshold setting. At the joint level, the three losses are linearly combined and constrained to be non-negative and summed to one, making gradient propagation comparable and controllable. Weight updates are completed through difficulty index and temperature normalization: the difficulty index is derived from the smooth tracking of relative loss, and the temperature term adjusts the concentration of weight distribution, thereby dynamically allocating attention at different training stages—difficult or underfitting branches receive higher weights, and converged branches are appropriately reduced in weight, reducing the risk of single-task dominance.
[0086] In one embodiment, the meta-learner is a constrained weighted fusion model whose learned fusion weights satisfy the constraints of non-negativity and a sum of 1, and impose monotonicity constraints on the quantile outputs to minimize the overall bias on the validation set. Further, the validation set is reserved from the latest segment in chronological order, and the coverage bias is defined as the sum of the absolute differences between the empirical coverage rate and the target quantile level. A tradeoff coefficient is used to balance the contributions of quantile loss and coverage bias. Specifically, the default reservation ratio is 10% to 20%; when the business focuses more on the reliability of high quantiles, higher weights can be assigned to high quantiles in the tradeoff. Monotonicity is implemented at the sample level; if slight non-overlap occurs, a monotonic projection is performed after fusion as post-processing. Optionally, an upper limit can be set on the fusion weights to avoid excessive weight concentration in individual base models in the short term. When there are too few effective samples for a certain quantile during the validation period, the strength of the corresponding monotonicity constraint is temporarily relaxed and an alarm is recorded.
[0087] The constraints and objectives of the constrained fusion weights and quantile monotonicity are as follows:
[0088] Step D1: Learn the weight vector for fusing quantile outputs on the validation set. The fusion quantile is generated by convex combination of the quantile predictions of each base learner. The weights are set according to the constraints of non-negativity and summation to 1. The monotonicity constraint is shown in step D2, and the objective function is shown in step D3.
[0089] Step D2, when the quantile level satisfies At that time, apply a monotonicity non-crossing constraint to each sample:
[0090] ,
[0091] in, and Representing samples respectively At the quantile level and Fusion quantiles, For the validation set sample index, Given two elements in a predefined set of quantiles, and , For the set of quantiles;
[0092] Step D3, using the combined quantile loss and coverage bias as the objective, solves under weight and monotonicity constraints:
[0093]
[0094] in, To verify the target set, For the validation set index set, For the sample size, For the set of quantiles, For its size, For quantile loss, For the sample The true timeliness, For the first Each base learner in samples quantiles The prediction As the number of base learners, To correspond to the fusion weights, The weighting factor for covering the deviation term, In order to be in The empirical coverage under the following conditions, i.e., the validation set satisfies The proportion;
[0095] Step D4: To facilitate first-order method optimization, the weights can be unconstrained parameterized and combined with monotonic projection.
[0096] ,
[0097] in, These are learnable, free parameters. The fusion weights obtained through Softmax mapping naturally satisfy non-negativity and sum to 1; optimization can be performed using:
[0098] (a) to Perform projected subgradient / interior point approximation, and after each batch... Perform PAV monotonic projection.
[0099] Or (b) directly use the convex optimization solver according to the linear inequality constraints in step D3;
[0100] If an unconstrained parameterized exponential normalization mapping is used, a monotonic projection is performed on the fused quantile after each weight update to ensure the output satisfies the non-crossing condition. If a solution method with explicit constraints is used, a general convex optimization routine that supports inequality constraints is selected, and the maximum number of iterations and convergence tolerance are set. Specifically, the computational complexity is linearly related to the number of base learners, the number of quantiles, and the number of validation samples, and is performed offline by default to avoid inference latency. Optionally, when the two paths perform similarly on the validation set, the unconstrained parameterization is preferred to simplify engineering implementation. If the optimization fails to converge within a limited number of steps, it reverts to the previous feasible solution, reduces the coverage bias tradeoff coefficient, and retryes once.
[0101] The prediction of risk probability and cost point can be reused. The learning process sets objectives on the validation set using log loss and robust regression respectively, with equal weights. Cross-task sharing allows cross-task tradeoff coefficients to be added to the target and parameters to be tuned during the validation period;
[0102] Specifically, a convex optimization framework with linear inequality constraints is constructed around the fusion learning during the validation period: quantile loss is the primary method, supplemented by coverage bias penalty, with the objective being to obtain weights under the joint constraints of non-negativity, a sum of 1, and the monotonicity of the entire sample. This design treats the non-crossing of quantiles as a hard constraint, directly affecting the fused output rather than a single base model, thus avoiding the distribution pattern disruption caused by cross-correction. To align with the actual training process, two solution paths are provided: one is to maintain explicit constraints and call convex optimization routines; the other is to use Softmax to perform unconstrained parameterization of the weights and perform PAV projection on the fused quantiles in each batch, achieving a three-stage solution of objective-parameterization-projection. The coverage term is measured by the deviation between empirical coverage and nominal quantiles, providing a calibration basis for subsequent probability and high-quantile applications.
[0103] In one embodiment, external event data includes news, announcements, weather, and port congestion information. Named entity recognition and classification methods are used to generate event feature vectors, which are then concatenated with order-level features using attention or gating mechanisms. In this embodiment, event sources are primarily structured interfaces and incremental crawling, with unified deduplication, noise reduction, and database storage. Text is preserved according to its source, and the language is automatically identified during the parsing phase. Specifically, the event window defaults to a fixed length before the order creation date, with the step size aligned with the batch size of the model training. Attention or gating outputs vectors of the same length in the feature dimension for concatenation with order features. If the same event is updated across multiple days, the latest version overwrites the previous version. Optionally, when weather and port-related events occur simultaneously, a linear compression layer can be applied before concatenation to reduce redundancy. When the event service is unavailable, the event vector is filled with all zeros, and the missing percentage is recorded.
[0104] In one embodiment, the meta-learner is a gated recurrent unit network (GRU), whose input consists of time-ordered event feature vectors and the phased prediction outputs of each base learner, and whose output is a dynamic fusion weight for the current sample. Similarly, the length of the input sequence of the GRU is set according to the event frequency and business rhythm, typically ranging from one to four weeks. The size of the hidden layer is set based on the training set size and overfitting risk, with a default medium size and a dropout strategy. Specifically, the output layer uses a normalized mapping to ensure that the fusion weights are non-negative and sum to one; during training, the comprehensive objective of the validation period is used as the early stopping criterion. Optionally, if events are sparse in a certain time period, it can degenerate into a constrained weighting of static weights to maintain inference consistency. When the length of the input sequence is less than the minimum requirement, it is left-padded with the nearest available segment and marked with a mask to avoid interference with state accumulation.
[0105] In one embodiment, the supply chain knowledge graph uses suppliers and logistics nodes as vertices and supply-demand relationships and transportation routes as edges. A graph neural network is used for embedding learning to obtain node embeddings, which are then input into the base learner as additional features. In this embodiment, the vertices in the graph originate from supplier master data and transportation network nodes. The edge attributes include observable indicators such as historical collaboration strength, timeliness stability, and path capacity, and the direction is determined based on the actual transportation direction. Specifically, the graph update cycle is monthly by default; embedding training uses offline batch processing and is aligned with order features at the sample level. If a new supplier or new route appears, nodes and edges are automatically added in the next update cycle, and the embedding is initialized to near the mean. Optionally, when the graph is too sparse, smoothing regularization can be enabled during the embedding stage to enhance generalization. When a node lacks sufficient neighborhood information, it temporarily reverts to embedding based solely on node attributes.
[0106] In one embodiment, the meta-learner is a graph convolutional network that performs topology-aware weighted fusion of the outputs of each base learner based on the topology of the supply chain knowledge graph. Further, the topology-aware fusion is based on normalized adjacency information, aggregating the predicted outputs of neighboring nodes layer by layer and generating the fusion result at the target node. Specifically, the number of layers is chosen within a shallow range to control the risk of oversmoothing, and a constraint mapping layer is added after aggregation to ensure that the fusion weights conform to the ensemble constraints. If the degree of a node is too high, neighbor sampling can be performed before aggregation to reduce the computational burden. Optionally, when the subgraph is disconnected, constrained static weighting is used as a degradation strategy for isolated nodes. When a topological snapshot of the graph is unavailable, the topology-aware step is skipped and the constrained weighted fusion output is directly adopted.
[0107] In one embodiment, concept drift is monitored based on statistical tests or sliding window metrics. When drift is detected, incremental updates are triggered, performing online fine-tuning or mini-batch retraining on the base learner and meta-learner. In this embodiment, drift monitoring is based on statistical distribution differences and performance fluctuations within a fixed window, commonly using metrics including distribution stability indicators and non-parametric tests. Any metric exceeding a business-side threshold is considered a trigger condition. Specifically, the default monitoring cycle is weekly. After triggering, mini-batch fine-tuning is performed first, and a short-cycle retraining is executed after the cumulative number of triggers reaches a set value. If fluctuations only occur in event-side metrics, only the event-related network layers can be updated to shorten downtime. Optionally, when training resources are insufficient, the update frequency can be reduced and the monitoring window expanded to balance costs. When online updates fail, the system automatically rolls back to the most recent stable weight snapshot and records a retry plan.
[0108] In one embodiment, incomplete orders are treated as right-censored samples for learning, and posterior calibration is performed on the quantile or probability outputs for timeliness to improve the coverage consistency between the on-time probability and high quantiles. In this embodiment, incomplete orders only participate in the available information up to the observation cutoff point, and the loss function is calculated according to the right-censoring calibrator without requiring the actual receipt time. During the calibration phase, a monotonic mapping is used to align the quantile and probability outputs on the validation set. Specifically, the calibration aims at service level, prioritizing the coverage consistency between high quantiles and on-time probability. If the validation set size is insufficient, the validation period is extended to ensure stable estimation. Post-processing of quantile outputs first performs non-cross-correction before coverage calibration. Optionally, when the censoring ratio increases significantly in the short term, the penalty intensity of the quantile target can be temporarily increased to maintain robustness. When numerical non-convergence occurs during the calibration process, it reverts to the last feasible calibration mapping and reduces the trade-off intensity of coverage bias.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0110] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of this application and form different embodiments. For example, all the embodiments above can be used in any combination. The information disclosed in this background section is intended only to enhance the understanding of the general background of this application and should not be construed as an admission or in any way implying that such information constitutes prior art known to those skilled in the art.
Claims
1. A procurement timeliness prediction method based on stacked ensemble learning, characterized in that, include: S1 Data Acquisition: Collect historical order data from multiple suppliers. The historical data includes at least procurement timeliness, historical cost information, and supply risk indicators. S2 Feature Construction: Basic features are generated based on order attributes, seasonal holidays, and logistics routes; additional features are created by embedding event feature vectors obtained from text parsing of external event data and nodes obtained from the supply chain knowledge graph. S3 Base Learner Training: Train at least two base learners with different structures to jointly predict multiple objectives, including quantiles or probability indicators of procurement timeliness, future costs or cost increments, and supply risk indicators. S4 Fusion and Calibration: The multi-objective outputs of each base learner are fused and probability / quantile calibration is performed using a meta-learner, which is implemented through constrained weight learning and / or dynamic weighting by a neural network. S5 Inference Output: Input new order features during the inference phase and output joint prediction results including on-time probability, target quantile, cost prediction, and risk score.
2. The procurement timeliness prediction method based on stacked ensemble learning as described in claim 1, characterized in that, The base learner includes at least two different types of models, selected from gradient boosting trees, random forests, temporal convolutional networks, and recurrent neural networks, and is configured to share some features and perform multi-task joint training.
3. The procurement timeliness prediction method based on stacked ensemble learning as described in claim 2, characterized in that, The multi-task joint training adopts a sample-level joint loss, which simultaneously constrains the procurement timeliness quantile error, cost prediction error, and supply risk prediction error, and balances them through task weights. The composition and weight settings of the sample-level joint loss used in the multi-task joint training are as follows: Step C1: For the two implementations of the time-leader prediction head, a unified notation is used during training: when selecting quantile prediction or distribution prediction, the corresponding branches in the following formula are used respectively: , in, Indicates the loss of time-sensitive tasks. Indicates the set of quantiles used. Indicates the number of elements in the set. At the quantile level, This is a needle-type quantile loss. For residuals, This indicates the actual procurement timeframe; lt is the timeframe index. Indicates prediction Quantiles For continuous rank probability scores. The distribution function is the actual empirical distribution function. For predicting the distribution function; Step C2: The cost branch uses robust regression loss, and the risk branch uses logarithmic loss. , , in, Indicates cost loss, Indicates risk and loss. For batch size, For sample index, For Huber functions, For Huber threshold, For the first Cost residuals for each sample For indicator functions, and These are the predicted and actual costs, respectively. For the first The risk prediction probability of a sample To correspond to the real tags, It is the natural logarithm; Step C3: The three tasks are jointly optimized using a weighted sum, with the weights subject to a constraint that they are non-negative and their sum is 1. , in, For joint losses, The task weights are timeliness, cost, and risk, respectively. Step C4, training iteration number The weights of each step are generated using a difficulty index and automatically normalized. , in, For the next task ( The weight of ) For the current step task The difficulty index, It is the numerical stability constant. The temperature index is the denominator, and the normalization factor for the three tasks is the denominator; in the formula, the difficulty index is updated using the exponential moving average: , in, For smoothing coefficients, For the task In step Batch losses, This is the initial baseline loss for the same task.
4. The procurement timeliness prediction method based on stacked ensemble learning as described in claim 1, characterized in that, The meta-learner is a constrained weighted fusion model. The fusion weights it learns satisfy the constraints of non-negativity and summing to 1, and a monotonicity constraint is applied to the quantile output to minimize the overall bias on the validation set. The constraints and objectives of the constrained fusion weights and quantile monotonicity are as follows: Step D1: Learn the weight vector for fusing quantile outputs on the validation set. The fusion quantile is generated by convex combination of the quantile predictions of each base learner. The weights are set according to the constraints of non-negativity and summation to 1. The monotonicity constraint is shown in step D2, and the objective function is shown in step D3. Step D2, when the quantile level satisfies At that time, apply a monotonicity non-crossing constraint to each sample: , in, and Representing samples respectively At the quantile level and Fusion quantiles, For the validation set sample index, Given two elements in a predefined set of quantiles, and , For the set of quantiles; Step D3, using the combined quantile loss and coverage bias as the objective, solves under weight and monotonicity constraints: , , in, To verify the target set, For the validation set index set, For the sample size, For the set of quantiles, For its size, For quantile loss, For the sample The true timeliness, For the first Each base learner in samples quantiles The prediction As the number of base learners, To correspond to the fusion weights, The weighting factor for covering the deviation term, In order to be in The empirical coverage under the following conditions, i.e., the validation set satisfies The proportion; Step D4: Apply unconstrained parameterization to the weights and combine it with monotonic projection: , in, These are learnable, free parameters. The fusion weights obtained through Softmax mapping naturally satisfy non-negativity and sum to 1; during optimization, the following is adopted: (a) to Perform projected subgradient / interior point approximation, and after each batch... Perform PAV monotonic projection. Or (b) directly use the convex optimization solver according to the linear inequality constraints in step D3.
5. The procurement timeliness prediction method based on stacked ensemble learning as described in claim 1, characterized in that, The external event data includes news, announcements, weather and port congestion information. Event feature vectors are generated using named entity recognition and classification methods, and then concatenated with order-level features through attention or gating mechanisms.
6. A procurement timeliness prediction method based on stacked ensemble learning as described in claim 1 or 5, characterized in that, The meta-learner is a gated recurrent unit network, whose input is a time-ordered event feature vector and the stage-wise prediction output of each base learner, and whose output is a dynamic fusion weight for the current sample.
7. The procurement timeliness prediction method based on stacked ensemble learning as described in claim 1, characterized in that, The supply chain knowledge graph uses suppliers and logistics nodes as vertices and supply-demand relationships and transportation routes as edges. It employs graph neural networks for embedding learning to obtain node embeddings, which are then used as additional features input to the base learner.
8. A procurement timeliness prediction method based on stacked ensemble learning as described in claim 1 or 7, characterized in that, The meta-learner is a graph convolutional network that performs topology-aware weighted fusion of the outputs of each base learner based on the topology of the supply chain knowledge graph.
9. The procurement timeliness prediction method based on stacked ensemble learning as described in claim 1, characterized in that, Concept drift is monitored based on statistical tests or sliding window metrics; when drift is detected, incremental updates are triggered to perform online fine-tuning or mini-batch retraining on the base learner and meta-learner.
10. The procurement timeliness prediction method based on stacked ensemble learning as described in claim 1, characterized in that, Incomplete orders are treated as right-censored samples for learning, and the quantiles or probability outputs of timeliness are posteriorly calibrated.