A regional logistics demand forecasting and transport capacity pre-scheduling method

By introducing a multi-head self-attention mechanism and a backpropagation algorithm into the logistics demand forecasting model, a semantically enhanced explanatory description is generated, which solves the problems of poor interpretability of the logistics demand forecasting model and low trust in the scheduling system, and achieves efficient human-machine collaboration and business scenario alignment.

CN122155257APending Publication Date: 2026-06-05SHENZHEN YITONG ANDA INT LOGISTICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN YITONG ANDA INT LOGISTICS CO LTD
Filing Date
2026-03-05
Publication Date
2026-06-05

Smart Images

  • Figure CN122155257A_ABST
    Figure CN122155257A_ABST
Patent Text Reader

Abstract

The application relates to a regional logistics demand prediction and transport capacity pre-scheduling method, which comprises the following steps: obtaining multi-source data of order quantity, weather, holidays, traffic state and economic activities, performing high-precision space-time alignment and normalization preprocessing, modeling space-time dependence relationship by using a deep Q network embedded with a multi-head self-attention mechanism, combining weighted back propagation to calculate characteristic attribution scores, generating a trend and cause-related semantic explanation based on business rules, driving an intelligent scheduling strategy of multi-objective optimization, and adaptively correcting prediction model parameters through a closed-loop feedback. The scheme realizes high precision, strong interpretability and intelligent collaborative scheduling response of logistics demand prediction, and effectively improves transport capacity allocation efficiency and system stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of logistics demand forecasting and intelligent scheduling technology, and in particular to a method for regional logistics demand forecasting and capacity pre-scheduling. Background Technology

[0002] In the current field of regional logistics demand forecasting and intelligent capacity scheduling, with the rapid development of business scenarios such as on-demand delivery, e-commerce, fresh food, and food delivery, the collaborative optimization of demand forecasting and scheduling has become a core technical issue. Mainstream technologies often employ deep learning temporal modeling or reinforcement learning methods to fit and predict multi-source data, and then combine this with scheduling algorithms for capacity resource allocation.

[0003] Existing predictive models have achieved some success in regional demand modeling and resource scheduling, but the industry generally suffers from key technical deficiencies. First, existing end-to-end trained network models only output numerical results; the internal inference process is highly complex and invisible, leading to a lack of interpretability in their predictions. After obtaining the prediction results, the scheduling strategy module cannot understand the specific influencing factors or causes of change, severely impacting decision-making transparency and the foundation of trust in the results. In actual capacity scheduling and human-machine collaboration scenarios, managers struggle to trace the driving factors when faced with predicted demand values. Traditional methods for automated capacity scheduling often employ static parameters or fixed rules, failing to respond promptly to changes in demand causes or automatically adjust the prediction mechanism based on actual performance feedback. This results in the model gradually becoming disconnected from the actual business environment after long-term system operation, leading to a loss of consistency between prediction and scheduling. Summary of the Invention

[0004] This application provides a method for regional logistics demand forecasting and capacity pre-scheduling, aiming to solve one of the problems or issues of the existing technology mentioned in the background section.

[0005] The regional logistics demand forecasting and capacity pre-scheduling method provided in this application specifically includes: S1: Acquire regional logistics multi-source time-series data, including historical order volume, weather information, holiday tags, traffic status index and regional economic activity indicators, and perform spatiotemporal alignment processing on each data stream to generate a high-dimensional time-series feature vector sequence with a unified timestamp.

[0006] S2: Perform normalization and missing value imputation preprocessing on the high-dimensional temporal feature vector sequence to eliminate dimensional differences and data breakpoints, and output a standardized temporal input tensor as input data for the deep Q-network model.

[0007] S3: The standardized temporal input tensor is embedded into the deep Q-network backbone model with a multi-head self-attention mechanism to output the original demand prediction value of logistics demand in the future target period. By calculating the correlation weight distribution between the query vector, key vector and value vector, an attention weight matrix containing spatiotemporal dependencies is generated and used as an intermediate representation of the feature importance distribution.

[0008] S4: Based on the attention weight matrix, extract the normalized correlation weight tensor of each head output in the multi-head self-attention mechanism and perform channel aggregation operation to generate a single-dimensional comprehensive attention weight vector. Use the backpropagation algorithm to calculate the marginal contribution of each feature dimension of the comprehensive attention weight vector to the trend of prediction result change, and generate an attribution score vector classified by feature, where each component of the attribution score vector corresponds to the explanatory strength of a class of original input variables.

[0009] S5: The attribution score vector and the original demand prediction value output by the deep Q network are combined as input. Based on the preset business rule mapping table, the numerical attribution score is converted into a semantic explanation description with enhanced readability, and a demand prediction output with cause annotation is generated.

[0010] S6: The demand forecast output with cause annotation is transmitted to the scheduling strategy module as the basis for constructing the objective function of the multi-objective optimization problem, so that the resource scheduling decision can respond to the changes in the forecast trend and its driving factors, and generate a pre-scheduling scheme that takes into account both capacity efficiency and service responsiveness.

[0011] S7: During the scheduling process, dynamically collect actual capacity matching status and order fulfillment feedback data to form a closed-loop feedback time series sample set, and determine whether its deviation from the predicted trend exceeds a preset threshold.

[0012] S8: If the judgment deviation exceeds the preset threshold, the model fine-tuning mechanism is triggered, and the attention weight parameters in the deep Q network are locally updated using the closed-loop feedback time series sample set to improve the adaptability and consistency of prediction results and scheduling coordination in subsequent cycles.

[0013] The regional logistics demand forecasting and capacity pre-scheduling method provided in this application has the following beneficial effects: (1) To address the problems of poor interpretability and difficulty in trusting and effectively utilizing prediction results in existing logistics demand forecasting models due to their black-box nature, this solution significantly enhances the transparency and understandability of the model's decision-making process by constructing a dual-path prediction architecture with explicit feature attribution output. Traditional DQN models implicitly encode multi-source input features in a high-dimensional parameter space, making it impossible to trace the specific impact paths of various external factors on the prediction trend, which can easily lead to misjudgment or delayed response in downstream scheduling strategies. In contrast, this invention introduces a multi-head self-attention mechanism in the backbone network and uses its attention weights as derivable intermediate variables to form a heatmap reflecting the strength of spatiotemporal feature correlations, enabling the model to self-represent key influencing factors. Furthermore, by designing a lightweight post-processing interpretation module and combining it with a weighted backpropagation algorithm to calculate the marginal contribution of each input feature to the prediction change and outputting it in the form of a standardized score, a leap from "numerical prediction" to "causal analysis" is achieved, making the previously invisible internal reasoning logic explicit and effectively overcoming the technical bottleneck of traditional methods lacking causal support at the decision support level.

[0014] (2) To enhance the usability of explanatory information and its business integration capabilities, this solution innovatively integrates a rule mapping layer, automatically converting quantitative contribution into natural language descriptions that conform to domain cognitive habits, significantly improving human-machine collaboration efficiency and the operational trust of dispatchers. Unlike rudimentary interpretable methods that only provide raw weights or heatmaps, this invention outputs key driving factors such as "surge in lunchtime catering orders" and "large-scale events held in the surrounding area" in structured statement form through preset semantic templates and threshold judgment logic. This allows non-technical operations personnel to quickly grasp the root cause of demand fluctuations and then adjust capacity deployment and resource allocation strategies accordingly. This design not only strengthens the semantic alignment between model output and actual business scenarios but also effectively lowers the cognitive threshold for the application of intelligent systems. At the same time, the entire interpretable mechanism is independent of the training process and is activated on demand during the inference phase. This ensures that the original learning convergence efficiency and prediction accuracy of the model are not disturbed, while also achieving low-intrusion embedding of interpretable functions, balancing system performance and practicality, and is suitable for urban logistics dynamic scheduling environments with high real-time requirements. Attached Figure Description

[0015] Figure 1 This is the main flowchart of a regional logistics demand forecasting and capacity pre-scheduling method proposed in this application.

[0016] Figure 2 This is a sub-flowchart of a regional logistics demand forecasting and capacity pre-scheduling method proposed in this application.

[0017] Figure 3 This is another sub-flowchart of the regional logistics demand forecasting and capacity pre-scheduling method proposed in this application. Detailed Implementation

[0018] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0019] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0020] like Figure 1 As shown, this application provides a method for regional logistics demand forecasting and capacity pre-scheduling, specifically including: S1: Acquire regional logistics multi-source time-series data, including historical order volume, weather information, holiday tags, traffic status index and regional economic activity indicators, and perform spatiotemporal alignment processing on each data stream to generate a high-dimensional time-series feature vector sequence with a unified timestamp.

[0021] S2: Perform normalization and missing value imputation preprocessing on the high-dimensional temporal feature vector sequence to eliminate dimensional differences and data breakpoints, and output a standardized temporal input tensor as input data for the deep Q-network model.

[0022] S3: The standardized temporal input tensor is embedded into the deep Q-network backbone model with a multi-head self-attention mechanism to output the original demand prediction value of logistics demand in the future target period. By calculating the correlation weight distribution between the query vector, key vector and value vector, an attention weight matrix containing spatiotemporal dependencies is generated and used as an intermediate representation of the feature importance distribution.

[0023] S4: Based on the attention weight matrix, extract the normalized correlation weight tensor of each head output in the multi-head self-attention mechanism and perform channel aggregation operation to generate a single-dimensional comprehensive attention weight vector. Use the backpropagation algorithm to calculate the marginal contribution of each feature dimension of the comprehensive attention weight vector to the trend of prediction result change, and generate an attribution score vector classified by feature, where each component of the attribution score vector corresponds to the explanatory strength of a class of original input variables.

[0024] S5: The attribution score vector and the original demand prediction value output by the deep Q network are combined as input. Based on the preset business rule mapping table, the numerical attribution score is converted into a semantic explanation description with enhanced readability, and a demand prediction output with cause annotation is generated.

[0025] S6: The demand forecast output with cause annotation is transmitted to the scheduling strategy module as the basis for constructing the objective function of the multi-objective optimization problem, so that the resource scheduling decision can respond to the changes in the forecast trend and its driving factors, and generate a pre-scheduling scheme that takes into account both capacity efficiency and service responsiveness.

[0026] S7: During the scheduling process, dynamically collect actual capacity matching status and order fulfillment feedback data to form a closed-loop feedback time series sample set, and determine whether its deviation from the predicted trend exceeds a preset threshold.

[0027] S8: If the judgment deviation exceeds the preset threshold, the model fine-tuning mechanism is triggered, and the attention weight parameters in the deep Q network are locally updated using the closed-loop feedback time series sample set to improve the adaptability and consistency of prediction results and scheduling coordination in subsequent cycles.

[0028] Step S1: Acquire regional logistics multi-source time-series data, including historical order volume, weather information, holiday tags, traffic status index, and regional economic activity indicators. Perform spatiotemporal alignment processing on each data stream to generate a high-dimensional time-series feature vector sequence with a unified timestamp. Specifically, this includes:

[0029] S1.1: Obtain the regional logistics historical order volume data stream, perform spatial alignment processing on order records in different geographical units based on regional grid coding, and use the time window slicing algorithm to aggregate the original asynchronous order events into a fixed-granularity time series, generating a spatially aligned order time series tensor marked with a five-minute interval, which serves as the reference time axis for subsequent multi-source fusion.

[0030] Based on historical order record data from the order management system in a regional logistics network, a regional grid coding method (parameters: grid cell side length, latitude and longitude coordinate range) is used to spatially index and encode the original order events within different geographical units, achieving a spatially discretized representation of order data. Furthermore, by matching the regional grid coding results with the geographic location field in the order records, spatial alignment processing is performed, mapping order data from different geographical units within the same time period to a unified regional grid coordinate system, resulting in a structured spatially distributed order matrix as the initial processing data.

[0031] A time window slicing algorithm (parameters: window length 5 minutes, window sliding step size 5 minutes) is used to segment the asynchronously arriving order event sequence into time segments, achieving fixed-granularity aggregation of order data in the time dimension. Furthermore, the order quantity corresponding to each time slice is calculated using a count accumulation function of order events within the time window, and this quantity is then filled into the time index dimension of the spatially distributed order matrix to obtain a spatially-temporally aligned order quantity tensor.

[0032] A data density detection algorithm (parameter: minimum sampling density threshold) is used to perform sampling integrity analysis on the spatially-temporally aligned order quantity tensor. This identifies the time slice locations of missing or sparse regions at a set granularity, and fills the missing locations with zero values ​​or placeholders to ensure the continuity of the baseline time axis and the integrity of spatial coverage.

[0033] The system performs unified timestamp processing, uses the UTC standard time format to normalize and encode all time window labels, and generates a continuous time index sequence with 5-minute intervals. This sequence is then bound to the time dimension of the spatially-temporally aligned order volume tensor to achieve a one-to-one correspondence between time stamps and data content.

[0034] By using a data structure optimization algorithm (parameters: tensor compression level, sparse format type), the spatial-temporally aligned order quantity tensor is transformed into an efficient storage format, improving the reading speed and processing performance of subsequent multi-source data fusion.

[0035] By using the aforementioned time window slicing and spatial alignment processing method, the regional grid order record results from the previous step are transformed into spatially aligned order time series tensors marked with five-minute intervals, thereby achieving the expected technical effect of generating a reference time axis for subsequent multi-source data fusion.

[0036] For example, in a regional logistics system, the side length of a regional grid cell is set to 500 meters, and the latitude and longitude range covers an urban area of ​​25 square kilometers. The geographic coordinate field of historical order records is matched with the grid coding table to generate a 500×500 meter grid cell index. For order event data from the past week, a time window slicing algorithm is used with parameters configured as a window length of 5 minutes and a sliding step of 5 minutes to perform time aggregation processing on order events within each grid cell. Within a certain time window, grid cell A has a cumulative order volume of 42, grid cell B has a cumulative order volume of 15, and grid cell C has no order records, so zero-value placeholders are used to maintain the integrity of the tensor. The time index is uniformly in UTC format, such as 2024-06-01T08:05Z corresponding to the 97th time slice position. The final generated spatially aligned order time-series tensor has a dimension of [500×500×2016], where 500×500 represents the spatial dimension covering all grid cells, and 2016 represents the number of time slices per week at a 5-minute granularity. This tensor serves as a strict reference time axis in the subsequent fusion of multi-source data such as weather information time series tensor and traffic status time series tensor, realizing spatiotemporal synchronization of multi-source data and significantly improving the alignment accuracy of feature vectors and data processing efficiency.

[0037] S1.2: Collect weather information data streams, including meteorological elements such as temperature, precipitation, and wind speed. Based on the mapping relationship between the geographical location of meteorological stations and the logistics area grid, perform spatial interpolation processing to achieve regional meteorological feature matching. At the same time, align the non-uniformly sampled meteorological observation data to the reference time axis generated in S1.1 through linear interpolation and temporal resampling algorithm, and output the time-aligned regionalized weather time series tensor.

[0038] Data streams are collected from regional meteorological monitoring networks, including core meteorological elements such as temperature, precipitation, and wind speed. The input conditions are real-time observation records of each meteorological station and its geographical coordinates.

[0039] A GIS spatial mapping algorithm (parameters: meteorological station coordinate set, logistics area grid code set) is used to establish the mapping relationship between the geographical location of meteorological stations and the logistics area grid, and to generate a station-grid index table for subsequent spatial interpolation matching.

[0040] Furthermore, using a linear interpolation method (parameters: timestamp sequence T, observation sequence V), the temporal continuity of non-uniformly sampled observation data from different meteorological stations is reconstructed. The interpolation calculation formula is as follows: Linear weights are calculated based on the time difference between the target interpolation time point and adjacent observation points to ensure a smooth transition on the continuous time axis and eliminate inconsistencies caused by differences in observation frequencies.

[0041] Furthermore, a time-series resampling algorithm is adopted to achieve unified time granularity alignment of meteorological time-series data. The interpolated meteorological observation sequence is mapped to the reference time axis generated in S1.1 with five-minute intervals. The missing time points are filled in by nearest neighbor matching and a complete time series is generated.

[0042] By using the above spatial interpolation and temporal alignment processing methods, the raw meteorological observation data from the previous step is transformed into a regionalized weather time series tensor that is structurally consistent, spatiotemporally synchronized, and covers all grid units in the logistics area, thereby achieving standardized fusion of multi-source meteorological features in the input layer of the prediction model.

[0043] S1.3: Obtain the holiday label data stream, use the calendar rule engine to encode and label statutory holidays, adjusted workdays and regional special festivals, and generate a binary holiday label sequence; based on the UTC time standard, convert it into a time index format consistent with the S1.1 baseline time axis to form a time-aligned holiday time sequence feature vector.

[0044] The input condition for obtaining the holiday tag data stream is a regional calendar information database, which covers the date records of statutory holidays, adjusted workdays and regional special festivals, and stores them in a structured format.

[0045] The system employs a calendar rule engine (parameters: festival type definition table, regional code table) to automatically identify and classify input festival dates, encode and label different types of festivals according to preset rules, and output a preliminary classification code matrix data structure.

[0046] Furthermore, by using a binary encoding method (parameters: statutory holiday encoding value = 1, non-holiday encoding value = 0), the classification encoding matrix is ​​converted into a binary holiday flag sequence, and the holiday flag bits are output in order of date.

[0047] Furthermore, by using a time standardization conversion algorithm (parameters: UTC time offset, target time zone ID), the date index of the holiday marker sequence is converted into a UTC standard timestamp, ensuring the consistency of time stamps in different regions.

[0048] Furthermore, by using a time index mapping method (parameters: reference time axis definition set, interpolation rules), a one-to-one time index matching is achieved between the UTC standard timestamp and the reference time axis generated in step S1.1, and a holiday time series matrix synchronized with the reference time axis is generated.

[0049] By using feature vectorization (parameter: time step = 5 minutes), the holiday time series matrix is ​​transformed into a fixed-granularity holiday time series feature vector, thereby converting the encoding result of the previous step into structured feature data that is adapted to multi-source time series feature fusion.

[0050] For example, in a logistics area calendar database, statutory holidays include New Year's Day (January 1st), Spring Festival (January 22nd to January 28th), and regional special festivals such as local food festivals (June 15th to June 20th). A calendar rule engine is used to identify these dates and assign them corresponding type codes: statutory holidays are coded as F, adjusted workdays as T, and special festivals as S. Using binary encoding, F, T, and S are uniformly converted to 1, while the remaining dates are converted to 0, resulting in a 365-character binary festival symbol sequence. A time normalization algorithm is then used to convert all date indices to UTC timestamps; for example, converting the local time of January 1st 00:00 to UTC timestamps. = Seconds. Further, the UTC timestamps are matched with the baseline timeline (a set of timestamps at five-minute intervals). Dates not on the baseline timeline are interpolated and extended to ensure that each baseline time point has a corresponding holiday flag; for example, each time step of January 1st is marked as 1, and non-holiday time steps are marked as 0. Finally, a holiday time-series feature vector is output, strictly aligned in the spatiotemporal dimensions with historical order volume, weather, and other data streams. This provides consistent input for the time-series matching of traffic state index data in S1.4 and reflects the potential impact of holidays on capacity demand in the prediction model.

[0051] S1.4: Access the real-time traffic state index data stream, use road network topology analysis to extract the average traffic speed and congestion level of each area's entrances and exits, and combine GIS spatial matching algorithms to complete the aggregation of traffic state from the road segment level to the regional level; then, through moving average filtering and time series alignment algorithms, downsample the frequently updated traffic data and map it to the reference time axis to generate a regional-level traffic state time series tensor.

[0052] The system accesses real-time traffic status index data streams. The input objects are raw traffic status data at the road segment level pushed by traffic sensing devices (such as geomagnetic monitors, cameras, and GPS terminals) and traffic big data platforms. The data includes timestamps, geographic coordinates, traffic speeds, and congestion level codes.

[0053] The road network topology analysis method (parameters: road segment set L, node set N, connectivity matrix C) is used to model the relationship between the main road segments at the entrances and exits of each logistics area, and to calculate the average traffic speed and congestion level index at the entry / exit boundaries of each area.

[0054] Furthermore, by using a GIS spatial matching algorithm (parameters: regional grid code Rg, road segment coordinate set Lc), the mapping from road segment-level traffic data to regional-level traffic features is realized. This matches the geographic spatial location with the logistics regional grid unit and generates a preliminary regional-level traffic state matrix, which includes the speed and congestion characteristics of each region at each sampling point at each time.

[0055] Furthermore, by using a moving average filtering method (parameters: window length w = 3 sampling points, sliding step size s = 1), smoothing is performed on the high-frequency updated traffic data to suppress instantaneous spikes and sensing errors, and the smoothed regional speed and congestion time series are output.

[0056] Furthermore, through a time-series alignment algorithm, the smoothed traffic state data is resampled and mapped to the reference time axis defined in S1.1, thereby achieving time-consistent alignment of multi-source data.

[0057] Through the aforementioned embedded road network topology analysis, spatial matching, moving average filtering, and temporal alignment processing methods, the results of the previous step are transformed into a regional-level traffic state temporal tensor, achieving dual alignment of traffic data in both spatial and temporal dimensions, and providing accurate and stable input for subsequent multi-source feature fusion.

[0058] S1.5: Integrate regional economic activity indicator data streams, including business district pedestrian flow index, online promotion activity intensity and local large-scale exhibition schedules, construct a sparse economic activity feature matrix based on an event-driven mechanism, complete missing time periods using nearest neighbor time filling and period extrapolation algorithms, and perform final alignment according to the timestamp system defined in S1.1, outputting a high-dimensional time-series feature vector sequence that is strictly synchronized with other data streams in the spatiotemporal dimension.

[0059] Step S2: Perform normalization and missing value imputation preprocessing on the high-dimensional temporal feature vector sequence to eliminate dimensional differences and data breakpoints, and output a standardized temporal input tensor as input data for the deep Q-network model. Specifically, this includes:

[0060] S2.1: Based on the high-dimensional time-series feature vector sequence generated in the previous steps, identify the data type and statistical distribution characteristics of each dimension feature, calculate the mean and standard deviation of each type of original input variable (including historical order volume, weather information, holiday labels, traffic status index and regional economic activity indicators) on the time axis, and generate a set of statistical parameters for normalization processing as the basis for standardization.

[0061] Based on the high-dimensional time-series feature vector sequence obtained in the preceding steps, a feature type identification algorithm (parameters: data dimension label, feature domain identifier) ​​is used to classify the data type of each input feature dimension, including quantitative, qualitative binary, and periodic labeled features. The classification results determine the selection criteria for subsequent statistical calculation methods and the accuracy control strategy.

[0062] Furthermore, by using distribution characteristic analysis methods (parameters: sample window length, sliding step size, distribution fitting type), the statistical distribution pattern of various original input variables can be characterized, and the set of distribution model parameters required for mean and variance estimation can be output to ensure the stationarity and reliability of statistical parameters in the time series.

[0063] Furthermore, a central tendency calculation algorithm is employed (parameters: time window = [t−k, t], sampling rate = f). s This allows for the calculation of the average of historical order volume, weather information, holiday tags, traffic condition index, and regional economic activity indicators over a unified time axis. The average is calculated using the following formula:

[0064] in, The mean, Let be the eigenvalue at the i-th time step. This represents the total number of samples within the time window.

[0065] Furthermore, a discretized variance calculation algorithm (parameter: detrending option = true) is used to evaluate the variance of various original input variables, and the standard deviation is calculated using the following formula: in, Standard deviation, Let be the eigenvalue at the i-th time step. The mean is used as the average. This formula obtains a dimensionlessly consistent fluctuation range index by summing the squared differences, dividing by the total number of samples, and then taking the square root.

[0066] By using a statistical parameter integration process, the above mean and standard deviation results are encapsulated into a set of standardized basis parameters corresponding to the features, thereby providing accurate calculation input for the Z-score normalization in S2.2.

[0067] For example, in a regional logistics forecasting scenario, the high-dimensional time-series feature vector sequence contains five types of feature data: historical order volume (unit: order / 5min), temperature (unit: ℃), holiday label (binary), traffic status index (range [0,1]), and business district pedestrian flow index (unit: person / hour). In the statistical parameter calculation process, the time window length is set to 12 steps (corresponding to 1 hour), and the sampling rate is 1 step / 5 minutes. The central tendency calculation formula is applied to the historical order volume sequence, with sample values ​​[15,18,20,16,17,19,21,22,18,20,17,16]. The mean calculation process is as follows:

[0068] Output mean In the calculation of standard deviation, the sum of squared deviations is... , divided by Then take the square root to obtain the standard deviation. For other features, the mean and standard deviation are calculated according to their respective units and distribution characteristics, generating a set of statistical parameters. This set is directly referenced in subsequent normalization processing, ensuring that features of different dimensions maintain a uniform zero mean and unit variance at the input stage of the deep Q-network, thereby significantly improving the convergence stability of model training and the computational consistency across feature domains.

[0069] S2.2: Perform Z-score normalization on each feature component in the high-dimensional time-series feature vector sequence, and use the statistical parameter set generated in S2.1 to perform linear transformation on the original values, mapping each feature to a standard normal distribution space with zero mean and unit variance, to obtain a dimensionless feature tensor that initially eliminates dimensional differences, thereby improving the convergence consistency of the deep Q network for multi-source heterogeneous data.

[0070] S2.3: Detect timestamp breakpoints or sampling missing positions in the dimensionless feature tensor after Z-score normalization, determine whether the missing pattern is random loss or systematic interruption based on the time continuity constraint, and construct a missing value mask matrix to mark invalid data areas, forming a data structure context environment to be repaired.

[0071] Based on the dimensionless feature tensor output in S2.2, a timestamp consistency detection algorithm (parameters: baseline time axis sequence, sampling interval Δt) is used to identify the sampling gap positions and data breakpoint positions at each time index. Further, a difference operation method (parameters: time index array) is used to calculate the interval length between adjacent timestamps and obtain an interval deviation sequence, which is used to determine whether the sampling meets the time continuity constraint. Further, a missing pattern classification algorithm (parameters: interval deviation sequence, missing segment length threshold) is used to classify the missing range into patterns, distinguishing between short-term random loss and cross-period systematic interruption, and generating a missing pattern label matrix. Further, a logical mapping method (parameters: missing pattern label matrix, feature tensor index) is used to construct a missing value mask matrix to clearly mark invalid data regions and their category attributes in the feature tensor. Further, through data structure encapsulation, the missing value mask matrix and the original tensor structure are bound into a context dataset with missing labeling, enabling precise location and repair control of missing regions in the subsequent imputation stage.

[0072] By using a timestamp consistency detection algorithm and a missing value mask construction method, the dimensionless feature tensor from the previous step is transformed into contextual environment data with structured annotations of missing segments, thereby achieving the expected technical effect of automatic identification and classification of missing regions.

[0073] For example, in a regional logistics demand forecasting system, based on a baseline timeline sequence with a five-minute sampling interval, an intraday sequence of length 288 and its corresponding dimensionless feature tensor are input. The sampling interval Δt is set to 300 seconds. The time stamp consistency detection algorithm calculates the difference between adjacent time intervals, resulting in an interval deviation sequence, which contains several intervals with a 600-second interval. Using a missing value pattern classification algorithm, segments with consecutive interval deviations > Δt and missing lengths ≤ 2Δt are marked as short-term random loss, while segments with missing lengths > 10Δt are marked as cross-time-period systemic interruptions. A missing value mask matrix is ​​constructed using a logical mapping method, where short-term random loss regions are marked as 1, systemic interruption regions as 2, and normal data as 0. Taking the traffic state index feature dimension as an example, this mask matrix shows systemic interruption markers within the t=120 to t=130 segment and a single random loss marker at t=200. In the subsequent interpolation process, the mask matrix is ​​directly used to select cubic spline interpolation or spatial correlation weighted filling method. After interpolation, the traffic state index sequence achieves significantly improved continuity and availability within the physical range [0,1].

[0074] S2.4: Based on the missing value mask matrix constructed in S2.3, a spatiotemporal joint interpolation strategy is adopted to fill in invalid data regions: for short-term local missing data, a cubic spline interpolation algorithm is used to reconstruct the continuous change trend along the time dimension; for large-area missing data across time periods, similar feature vectors from neighboring geographical regions are introduced as auxiliary inputs, and similarity weights are calculated by weighted Euclidean distance matching method. Weighted mean filling based on spatial correlation is then performed to generate an intermediate time series tensor with enhanced integrity.

[0075] S2.5: The intermediate temporal tensor with enhanced integrity output from S2.4 is subjected to consistency verification and boundary constraint processing to ensure that all imputed values ​​fall within a reasonable physical range (e.g., the traffic state index is limited to the [0,1] interval). The normalized parameters and imputation logs are integrated to generate metadata annotations. Finally, a standardized temporal input tensor with a unified structure, consistent dimensions, and no data breakpoints is output as the input data for the deep Q-network backbone model with embedded multi-head self-attention mechanism.

[0076] like Figure 2 As shown, step S3 involves embedding the standardized temporal input tensor into the deep Q-network backbone model with a multi-head self-attention mechanism to output the original demand prediction value for logistics demand in the future target time period. By calculating the correlation weight distribution between the query vector, key vector, and value vector, an attention weight matrix containing spatiotemporal dependencies is generated, and this matrix is ​​used as an intermediate representation of the feature importance distribution. Specifically, this includes:

[0077] S3.1: Based on the standardized temporal input tensor output from the preceding steps, input it into the embedding layer of the deep Q-network backbone model and perform a linear projection transformation to map the high-dimensional temporal feature vector to the hidden state space, generating a unified-dimensional embedding vector sequence as the input representation of the multi-head self-attention mechanism.

[0078] Furthermore, by using a normalized activation algorithm (e.g., LayerNorm, parameter: ε=1e-6), the feature distribution of the embedding vector matrix is ​​normalized, and an embedding sequence with zero mean and unit variance is output, eliminating the interference of input bias between different time steps on the attention weight distribution.

[0079] Through the above combination of linear projection and normalization, the standardized temporal input tensor from the previous step is transformed into a sequence of embedded vectors with a uniform structure and stable values, thus achieving the input data preparation effect of embedding a multi-head self-attention mechanism.

[0080] For example, in a regional logistics demand forecasting scenario, the standardized time-series input tensor has dimensions of (240, 512), where 240 is the number of time steps and 512 is the feature dimension. The latent space dimension of the embedding layer is set to 256. A linear projection weight matrix W of size [missing value] is used. The bias vector length is 256. The formula for calculating matrix multiplication is as follows:

[0081] in, For the input tensor, For trainable weight matrix, For bias vectors, This is the output embedding vector matrix. The calculated dimension of E is (240, 256). Then, the layer normalization formula is applied:

[0082] in, For embedding vectors, Let be the mean of the vector components. Standard deviation To prevent division by zero smoothing factors, after embedding and normalization, the output embedded sequence exhibits significant stability in the calculation of cross-correlation weights at each time step. The numerical range fluctuation of the weight matrix generated by the subsequent attention mechanism is significantly reduced, enabling the prediction model to maintain a high convergence rate and discrimination accuracy during both training and inference phases.

[0083] S3.2: Perform a segmentation operation on the embedded vector sequence, and generate corresponding query vector matrix, key vector matrix and value vector matrix through parameterized linear transformation, respectively. The transformation weight matrix is ​​a trainable parameter of the model, which is used to build the attention calculation basis in different semantic spaces.

[0084] The matrix segmentation method is applied to the embedding vector sequence from S3.1 (parameter: embedding dimension d). model The method (time step T) horizontally slices the embedding vector of uniform dimension according to the specified number of multi-head attention heads h, resulting in a sliced ​​embedding subsequence matrix that is easy to compute in parallel.

[0085] Furthermore, through a parameterized linear transformation (parameter: weight matrix W) Q ∈ {dmodel×dk} W K ∈ {dmodel ×dk} W V ∈ {dmodel×dv} This involves implementing a row-wise affine mapping for each embedded subsequence matrix, generating the corresponding query vector matrix Q, key vector matrix K, and value vector matrix V, and obtaining the baseline data structure for attention computation in multiple semantic spaces.

[0086] Furthermore, a vectorized weight sharing control mechanism (parameters: sharing ratio ρ, regularization coefficient λ) is adopted to achieve partial sharing of W among different attention heads in the model. Q W K W V The submatrices are used to reduce parameter redundancy and enhance the consistency of cross-head feature representation, resulting in a set of query, key, and value matrices with structural sparsity constraints.

[0087] Furthermore, a normalization preprocessing algorithm (parameters: normalization type LayerNorm, ϵ is a stability factor) is used to normalize the mean-variance of each column vector of the query, key, and value matrices, thereby improving the comparability of numerical scales between different time steps and feature dimensions, and generating normalized Q, K, and V matrices.

[0088] Through the above linear transformation and normalization process, the embedded vector sequence result of the previous step is transformed into a query, key, and value vector matrix that meets the requirements of multi-head self-attention calculation, realizing a consistent mapping of input features in multiple semantic spaces, and providing a structurally complete and numerically stable input for the scaling dot product similarity calculation in S3.3.

[0089] S3.3: Based on the generated query vector matrix and key vector matrix, calculate their scaled dot product similarity to obtain the original attention score matrix, and then normalize it using the Softmax function to generate a normalized attention weight distribution matrix, which represents the dynamic correlation strength between each time step and the feature dimension.

[0090] S3.4: Use the normalized attention weight distribution matrix to perform a weighted summation operation on the value vector matrix to output a context-aware attention output vector sequence, while retaining the attention weight distribution matrix as an intermediate variable for subsequent feature importance attribution analysis.

[0091] S3.5: The attention weight distribution matrices output by multiple parallel attention heads in the multi-head self-attention mechanism are concatenated and linearly fused to generate the final fused attention weight matrix. This matrix comprehensively describes the joint dependency relationship across time steps and across feature dimensions in the input time series data, and is output as an intermediate representation of the feature importance distribution to the next processing stage.

[0092] Based on the normalized attention weight distribution matrix of multiple parallel attention heads output by the preceding sub-step S3.4, a matrix concatenation strategy (parameter: horizontal concatenation along the feature dimension) is adopted to realize the information combination of different attention heads in both the time step and feature dimension.

[0093] Furthermore, by using a linear fusion algorithm (parameter: fusion coefficients are obtained through adaptive learning via gradient descent during model training), the weight distribution matrices of different attention heads are weighted and synthesized in a unified representation space, resulting in a fused comprehensive attention weight matrix.

[0094] Furthermore, orthogonalization constraint processing (parameter: Gram-Schmidt orthogonalization process) is adopted to correct the orthogonality between column vectors of the fusion matrix, so as to eliminate redundant correlations between different attention heads and generate a weight representation with a sparser structure and higher interpretability.

[0095] Furthermore, a normalization algorithm (parameters: Softmax normalization, temperature coefficient τ set to 0.8) is used to standardize the comprehensive attention weight matrix in terms of numerical range, mapping each element in the matrix to the [0,1] interval, thereby obtaining a numerically stable matrix output that can be used for subsequent feature importance analysis.

[0096] Furthermore, by using a sparsity enhancement method (parameter: L1 norm as a regularization term), the sparsity of the fusion attention weight matrix is ​​achieved, making the weights of non-critical time steps and feature dimensions approach zero, thereby improving the focusing ability of subsequent feature attribution analysis.

[0097] Through the above linear fusion and regularization process, the multi-head attention weight distribution matrix of the previous step is transformed into a fusion attention weight matrix that describes the joint dependency relationship between the input time series data across time steps and across feature dimensions, thereby achieving a high-fidelity intermediate representation of the feature importance distribution.

[0098] For example, in a regional logistics demand forecasting scenario, the preceding sub-step S3.4 outputs weight distribution matrices for eight attention heads, each with a dimension of 12×50, corresponding to 12 time steps and 50 feature dimensions. These eight matrices are concatenated along the feature dimensions to form a concatenated matrix of size 12×400. An adaptive linear fusion algorithm is then used to adjust the weight coefficients of each head to a range between [0.05, 0.20], resulting in a fused matrix of size 12×50. Gram-Schmidt orthogonalization is performed on this matrix to eliminate redundant correlations between different feature dimensions, maintaining the matrix rank at 50 after orthogonalization. A Softmax normalization temperature coefficient τ=0.8 is applied to map all elements to the range [0,1], and an L1 norm sparsity regularization coefficient λ=0.01 is applied to the matrix to suppress the weight magnitudes of non-critical feature dimensions. The resulting fusion attention weight matrix significantly improved the sparsity index, effectively highlighting the importance of features dominated by weather and traffic conditions in the next two hours, and providing a quantitative and interpretable weight basis for subsequent S4 attribution analysis.

[0099] like Figure 3As shown, step S4 involves: extracting the normalized correlation weight tensors of each head output in the multi-head self-attention mechanism based on the attention weight matrix, performing channel aggregation to generate a single-dimensional comprehensive attention weight vector, calculating the marginal contribution of each feature dimension of the comprehensive attention weight vector to the trend of prediction results using the backpropagation algorithm, and generating an attribution score vector classified by features, where each component of the attribution score vector corresponds to the explanatory strength of a class of original input variables. Specifically, this includes:

[0100] S4.1: Based on the attention weight matrix containing spatiotemporal dependencies generated in S3, the normalized correlation weight tensor of each head output in the multi-head self-attention mechanism is extracted as an initial representation of the dynamic correlation strength between features, providing a structured input for the subsequent gradient backpropagation path construction.

[0101] S4.2: Perform channel aggregation operation on the normalized correlation weight tensor, and fuse the attention distribution of multi-head outputs by weighted summation to generate a single-dimensional comprehensive attention weight vector. This vector retains the relative importance ranking of different feature dimensions at each time step, and serves as the basic mapping function for feature tracing during backpropagation.

[0102] S4.3: Construct a differentiable backpropagation path based on the comprehensive attention weight vector, and use the chain rule to backpropagate the error signal layer by layer from the prediction output layer. Calculate the gradient magnitude of the change trend of each variable in the input feature space with respect to the final predicted value, and obtain the original gradient response map as a preliminary measurement result of feature sensitivity.

[0103] Based on the comprehensive attention weight vector, an end-to-end differentiable backpropagation path (parameters: neural network hierarchical structure, activation function type, weight matrix) is constructed using the chain rule to realize the layer-by-layer transmission of error signals and the source tracing of feature sensitivity.

[0104] Furthermore, by defining the gradient of the objective function of the predicted output layer (parameter: the loss function type is mean squared error MSE), the partial derivative of the model output value with respect to the embedding vector of the last hidden layer is calculated, and then propagated back along the network to the input of the multi-head self-attention mechanism to obtain the gradient magnitude response map of each hidden feature node.

[0105] Furthermore, by combining the comprehensive attention weight vector, weight multiplication operations are performed on each gradient signal during the backpropagation process, so that the gradient value is corrected in the backpropagation path according to the proportion of the importance of the feature dimension, ensuring that the gradient sensitivity calculation results take into account both the spatiotemporal dependence and the feature attribution correlation.

[0106] Furthermore, the weighted gradient signal is expanded and mapped in the original input feature space, and element-wise values ​​are assigned according to the time step and feature dimension index of the input tensor to form the original gradient response map. This map depicts the strength of the direct numerical correlation between the changes in the predicted value and each input variable.

[0107] The weighted backpropagation algorithm described above integrates the attention weights and gradient backpropagation results into the original gradient response map, enabling a preliminary measurement of the sensitivity of each input feature and providing a quantitative basis for subsequent feature dimension normalization and contribution integral calculation.

[0108] For example, in a regional logistics demand forecasting scenario, the input features include historical order volume (50 dimensions), weather elements (temperature, humidity, precipitation, etc., 10 dimensions in total), traffic status index (5 dimensions), and economic activity indicators (8 dimensions). After standardization, all features are input into a deep Q-network to generate a fused attention weight matrix. The loss function is set to MSE, and the difference between the predicted value and the actual demand value is 0.15. In the chain-reaction process, the gradient magnitude matrix from the output layer to the hidden layer has a shape of (128,1), and the mapping weight matrix from the hidden layer to the input layer has a shape of (73,128). After matrix multiplication, the original gradient response vector has a shape of (73,1). A comprehensive attention weight vector (length 73, each element ranging from [0,1]) is introduced, and the gradient is corrected by element-wise multiplication to obtain a weighted gradient response vector. Its average magnitude in the first 10 dimensions related to weather is significantly higher than that in the dimensions related to order volume, indicating that weather has a significant effect on demand fluctuations in the current forecast period. The output original gradient response map is mapped back to the input tensor as a two-dimensional matrix by time step index, ultimately yielding a sensitivity distribution map in the time-feature coordinate system. This result improves the accuracy of feature interpretation in subsequent normalization and contribution calculation, and significantly enhances the early response capability of the scheduling strategy module to weather fluctuations.

[0109] S4.4: Perform feature dimension alignment and normalization processing on the original gradient response map, map the gradient values ​​of cross-modal input variables (such as weather information, traffic state index, etc.) to a unified scale space, generate a standardized gradient intensity matrix, and group and statistically analyze it according to the original input feature category to form the local contribution integral value of each feature domain.

[0110] Based on the original gradient response map obtained in step S4.3, a feature dimension alignment method (parameters: cross-modal feature set and normalized reference system) is used to map the gradient magnitudes of different modes to a unified metric space.

[0111] Furthermore, the magnitude of the cross-modal gradient values ​​is standardized by using a scaling linear normalization algorithm (parameters: minimum value, maximum value, normalization interval [0,1]), and a preliminary standardized gradient matrix result is obtained.

[0112] Furthermore, an inter-modal feature index mapping table (parameter: feature domain classification rule) is used to align the dimensions of each feature component in the standardized gradient matrix and generate a gradient matrix structure grouped according to the original input feature categories.

[0113] Furthermore, by using a local contribution integral calculation algorithm (parameters: time window length, product step size), the temporal gradient intensity of each feature domain of the grouped gradient matrix is ​​accumulated, and the cumulative contribution value of the feature domain is calculated as follows: in, For the first The local contribution integral value of the feature domain, The length of the integration time window. For this feature domain at time... The standardized gradient strength.

[0114] Furthermore, by using a matrix column vector summarization algorithm (parameter: number of feature domains), the cumulative contribution values ​​of each feature domain are combined to generate a complete local contribution integral value vector.

[0115] By using normalization and feature grouping statistical processing, the original gradient response map from the previous step is transformed into local contribution integral value data with a unified scale and feature domain classification, thus realizing an interpretable analysis index that allows for comparison and aggregation of input features from different modalities.

[0116] For example, in a regional logistics forecasting application scenario, the input consists of the original gradient response map of four types of features: historical order volume (unit: order / 5 minutes), temperature (unit: °C), traffic congestion index (unit: 0~1), and activity intensity (unit: event count), with a time window... Minutes, the distance of the walk is... Minutes. For each feature gradient value, linear normalization is applied to the [0,1] interval, mapping the temperature gradient 0.12 to 0.48, the order volume gradient 0.25 to 0.83, the traffic index gradient 0.05 to 0.2, and the activity intensity gradient 0.08 to 0.32. After dimension alignment, integrals are calculated separately according to feature domain groups: for example, the cumulative sum of the standardized order volume gradient sequence within the window is calculated using the formula... The result is 0.78, with an integral value of 0.25 for the traffic congestion index feature domain, 0.56 for the temperature feature domain, and 0.44 for the activity intensity feature domain. The final output local contribution integral value vector is [0.78, 0.56, 0.25, 0.44], which significantly improves the fairness and interpretability of comparing the contribution of different modal features in the subsequent S4.5 weighted fusion process.

[0117] S4.5: Based on the local contribution integral value, a linear weighted fusion strategy is used to generate an attribution score vector classified by features, where each component corresponds to the explanatory strength of a class of original input variables. The output high-dimensional attribution vector is used as the input of the rule mapping module in S5 to support the generation of semantic explanation description.

[0118] Step S5: The attribution score vector and the original demand prediction value output by the deep Q network are combined as input. Based on a preset business rule mapping table, the numerical attribution score is converted into a semantically enhanced explanation and description, generating a demand prediction output with cause annotations. Specifically, this includes:

[0119] S5.1: Obtain the attribution score vector and the original demand prediction value output by the deep Q network. The attribution score vector is calculated by the weighted backpropagation algorithm, which represents the marginal contribution strength of each input feature dimension to the change in the prediction trend, and serves as the input for generating semantic interpretation.

[0120] Based on the high-dimensional attribution score vector output from step S4.5 and the numerical results of the deep Q-network prediction output layer, the input data structure of the post-processing interpretation module is determined.

[0121] A data channel mapping method (parameters: feature type identifier set, predicted value index number) is adopted to realize the one-to-one mapping between each component of the attribution score vector and the original input feature category, and the mapping metadata is retained as the retrieval condition for subsequent rule matching.

[0122] Furthermore, by using an eigenvalue decoding algorithm (parameters: attribution strength encoding format, numerical precision threshold), the numerical strength encoded by feature category in the high-dimensional attribution vector is decoded into a standard floating-point array, and interpretive quantization data synchronized with the predicted value is obtained.

[0123] Furthermore, by using a synchronous loading method for predicted values ​​(parameters: timestamp consistency constraint, sampling period Δt), the original demand prediction values ​​are read from the prediction output channel of the deep Q network, and element-wise alignment with the attribution vector on the time index is ensured to generate a joint input matrix.

[0124] Furthermore, an element-by-element verification of the joint input matrix is ​​achieved through a data integrity verification algorithm (parameters: numerical range boundaries, missing labeling rules), and a valid input tensor that passes the verification is generated for subsequent processing by the semantic interpretation generation module.

[0125] Through the above algorithms and processing methods, the attribution score vector and the predicted output value are transformed into structured joint input data, achieving the expected technical effect of providing interpretability-driven prediction data support to the interpretation generation module.

[0126] S5.2: Based on the numerical magnitude and direction of change of each feature component in the attribution score vector, perform threshold comparison and sorting operations to identify the set of key driving factors with the top N contributions, and generate a subset of key driving factor features to focus on high-impact explanatory content.

[0127] Based on the magnitude and direction of change of each feature component in the attribution score vector, a multi-level threshold pruning algorithm is adopted (parameters: contribution threshold T1 is used to remove low-impact factors, and change direction judgment threshold T2 is used to distinguish between positive and negative drivers) to achieve the preliminary screening function of feature components.

[0128] Furthermore, by using a stability-weighted sorting algorithm (parameter: weight set W is obtained by inverse normalization of the previously statistical feature time-series fluctuation coefficients), the joint sorting of the selected feature components on both the contribution and stability dimensions is achieved, resulting in a ranking list data structure.

[0129] Furthermore, the top N truncation rule (parameter: N is determined by the maximum explanatory capacity configuration in the business scenario, for example, the dispatcher interface displays no more than 5 key factors at a time) is applied to truncate the set of key driving factors, remove low-ranked items that exceed the explanatory capacity, and retain the set of core influencing factors.

[0130] Furthermore, a direction-changing encoding algorithm is adopted (parameter: encoding value +1 indicates positive demand growth, encoding value -1 indicates negative demand decline) to symbolize the trend of each factor in the set of key driving factors and generate a feature subset matrix labeled with directional attributes.

[0131] Through the above multi-level filtering and sorting process, the high-dimensional attribution score vector generated in the previous step is transformed into a subset of key driving factor features with controllable scale and directional information, so as to achieve the expected technical effect of the interpretation module focusing on high-impact content in subsequent semantic mapping.

[0132] For example, in a regional logistics forecasting scenario, the attribution score vector has a length of 50, with values ​​ranging from -0.45 to +0.62. The threshold T2 for determining the direction of change is set to 0.05, and the contribution elimination threshold T1 is set to 0.10. After reading the attribution score vector, the system prunes components with values ​​below |0.10|, leaving 18 features. Subsequently, a weight set W is generated based on the historical fluctuation coefficients of the features, using a stability-weighted ranking formula:

[0133] in, The contribution of feature i. For stability weights, The maximum absolute value of contribution among the remaining features. After calculating the stability weighted score Sᵢ of all features, sort them in descending order and truncate the first N=5 items to form a set of key driving factors. Then, encode the direction of change based on the symbol value. Finally, output a feature subset matrix such as "surge in lunchtime catering orders (+1), holding of large events (+1), short-term traffic congestion (−1), temperature drop (−1), approaching holidays (+1)", which provides accurate input for the next semantic mapping step and significantly improves the focus and business usability of the interpretation results.

[0134] S5.3: Use a preset business rule mapping table to classify and match the feature subset of key driving factors. The business rule mapping table contains the mapping relationship between feature categories and natural language description templates. Generate a preliminary semantic description fragment sequence based on the matching results.

[0135] The key driving factor feature subset formed by S5.2 is obtained as input data for the classification matching operation. The feature subset includes feature category labels and their numerical attributes that have the highest explanatory contribution after being sorted by attribution score.

[0136] A feature category matching algorithm (parameters: feature subset label sequence, business rule mapping table index structure) is adopted to realize the retrieval of the mapping relationship between feature categories and preset natural language templates. The matching process is set with dual channels of exact matching and fuzzy matching to support the recognition capability of cross-modal or synonym labels.

[0137] Furthermore, by using the mapping table parsing method (parameters: category matching result, template structure parsing rules), the placeholder parameter of the matching template is replaced, the numerical attributes in the feature subset are implanted into the template placeholder, and a preliminary descriptive fragment data containing the numerical instantiation result is obtained.

[0138] Furthermore, a semantic consistency verification algorithm (parameters: preliminary description fragment data, context feature relationship matrix) is used to verify the consistency between the template-generated text and the original feature semantic labels. For ambiguous fragments, template reselection or word replacement is performed to improve the accuracy of the interpretation output.

[0139] By using a fragment sequence splicing processing method (parameters: fragment sequence, splicing rule vector), the verified preliminary description fragments are arranged sequentially according to business priority to form a fragment sequence output, which serves as the direct input for S5.4 dynamic sentence structure assembly, realizing the structured preparatory conditions for semantic interpretation generation.

[0140] For example, in a logistics forecasting task for a certain region, the key driver feature subset includes the labels "surge in lunchtime catering orders" (attribution score of 0.45) and "large-scale event held" (attribution score of 0.3). The corresponding templates in the business rule mapping table are "significant increase in catering orders due to {event}" and "demand increase in a specific region due to {event}". During the classification matching process, a fuzzy matching threshold of 0.85 was used, successfully matching "surge in lunchtime catering orders" precisely to the first template and "large-scale event held" precisely to the second template. In the template parsing stage, the event placeholders were replaced with "surge in catering orders during the lunchtime peak" and "international auto show in the city" respectively, forming preliminary descriptive fragments "significant increase in catering orders due to surge in catering orders during the lunchtime peak" and "demand increase in a specific region due to international auto show in the city". In semantic consistency verification, based on the feature relation matrix, it is determined that both are consistent with the original label, without the need for secondary replacement. The two descriptive fragments are combined into a fragment sequence according to the attribution score and output to S5.4, so as to achieve accurate docking between the matched driving factors and the natural language template.

[0141] S5.4: Using the trend information of the original demand forecast (such as rising, falling, or fluctuating) as contextual conditions, combined with the preliminary semantic description fragment sequence, perform dynamic sentence structure assembly to generate a complete semantic explanation of causes, forming a natural language output with trend and cause association.

[0142] The trend information of the original demand forecast value and the sequence of preliminary semantic description fragments are used as joint input conditions. A trend label parsing algorithm (parameters: trend category set, change range threshold) is used to encode the trend status of the forecast value.

[0143] Furthermore, a trend-motivation association matching algorithm (parameters: trend code, motivation category mapping table) is used to achieve semantic binding between trend state and corresponding key driving factor category, and a trend-motivation association matrix is ​​obtained.

[0144] Furthermore, a sentence template dynamic generation method (parameters: trend-motivation association matrix, template lexicon) is adopted to embed the combination of motivations under different trend states into a preset sentence template and generate a candidate sentence set of trend-motivation combinations.

[0145] Furthermore, through a contextual semantic optimization algorithm (parameters: candidate sentence set, language fluency scoring model), the language structure of the candidate sentence set is optimized and redundant words are removed to generate an optimized sentence sequence that conforms to business expression specifications.

[0146] By using a structured text assembly algorithm (parameters: optimized sentence sequence, output format rules), the results of the previous step are transformed into complete and more readable explanatory text of causes, realizing the natural language association expression of predicted trends and key drivers.

[0147] S5.5: The generated semantic explanation text and the original demand forecast values ​​are structurally encapsulated and output as a composite demand forecast result data package containing the predicted values ​​and cause labels, which serves as the joint input for the subsequent scheduling strategy module to construct a multi-objective optimization objective function.

[0148] Step S6: The demand forecast output with causal annotations is transmitted to the scheduling strategy module as the basis for constructing the objective function of the multi-objective optimization problem, enabling resource scheduling decisions to respond to changes in forecast trends and their driving factors, and generating a pre-scheduling scheme that balances capacity efficiency and service responsiveness. Specifically, this includes:

[0149] S6.1: Based on the demand forecast output with causal annotation, obtain a joint output data structure containing the original demand forecast value and semantic explanation description. The semantic explanation description is generated by the attribution score vector through a preset business rule mapping table and is used to characterize the marginal contribution of each input feature to the change of the prediction trend, so as to construct a scheduling decision input set with interpretability support.

[0150] Based on the output of the lightweight post-processing interpretation module, a structured data parsing method (parameter: JSONSchema constraint set) is used to extract the original demand forecast value field and the semantic interpretation description field from the composite demand forecast result data packet.

[0151] Furthermore, through the feature attribution parsing algorithm (parameters: attribution score vector, business rule mapping index), the association analysis between the source identifier of the semantic explanation description and the feature category is realized, and the set of cause labels after semantic transformation is obtained.

[0152] Furthermore, a feature contribution mapping method (parameters: attribution score vector, attribution threshold θ) is adopted to quantify the marginal contribution of each input feature to the predicted trend change, and a key-value mapping table of feature category and contribution is generated for interpretability support.

[0153] Furthermore, by using a data structure fusion algorithm (parameters: array of original predicted values, set of causal labels, key-value mapping table), the original predicted values ​​and explanatory information are jointly encapsulated to generate a scheduling decision input set with complete interpretable metadata.

[0154] By using a joint encapsulation processing method, the composite prediction output of the previous step is transformed into interpretable supporting data for the construction of scheduling strategies, ensuring that the scheduling optimization objective function can directly reference the prediction trend and its driving factors, and realize the forward-looking adjustment of the capacity scheduling scheme.

[0155] S6.2: Decompose the original demand forecast values ​​in the joint output data structure into time dimensions, and use the sliding window slicing algorithm to extract segmented demand intensity sequences in multiple future scheduling cycles, generating a set of demand trend segments with time-series granularity as the time reference unit for capacity resource allocation, ensuring that subsequent scheduling actions are synchronized with the demand fluctuation rhythm.

[0156] S6.3: Based on the key driving factor categories identified in the semantic interpretation description, perform a classification matching operation to activate the corresponding response rule template in the scheduling strategy library, and use a logical judgment matrix to map semantic tags such as 'surge in lunchtime catering orders' and 'large-scale event holding' into priority scheduling strategy clusters for specific regions, time periods and resource types, forming a differentiated scheduling intent vector.

[0157] Based on the semantic explanations in the demand forecast output with causal annotations, a key driver factor category identification method (parameters: attribution score vector component threshold settings and feature classification label set) is used to extract the corresponding driver factor category label set from the explanation text. Further, a classification matching algorithm (parameters: driver factor category label set and category index matrix of the scheduling strategy library) is used to match the identified driver factor categories with the preset response rule templates in the scheduling strategy library, resulting in a set of successfully matched strategy templates. Further, a logical judgment matrix construction method (parameters: successfully matched strategy template set, driver factor-region mapping table, driver factor-time period mapping table, driver factor-resource type mapping table) is used to bind semantic labels to specific geographical regions, time periods, and resource type priority configuration variables, generating logical matrix structure data. Further, through mapping operations (parameters: logical matrix structure data and scheduling strategy cluster index), the logical conditions are mapped to priority scheduling strategy clusters, resulting in a set of strategy clusters that meet the constraints of specific regions, time periods, and resource types. Furthermore, by using a vectorized encoding method (parameters: policy cluster set, policy priority scalar), the policy cluster set is converted into a numerical differentiated scheduling intent vector, while retaining the priority coefficient information of each policy category.

[0158] By using classification matching algorithms and logical matrix construction, the results of the previous step are transformed into differentiated scheduling intent vectors that adapt to multiple scenarios and constraints, thereby enabling the scheduling strategy to respond instantly to changes in predicted trends and driving factors.

[0159] For example, in a regional logistics network, the semantic explanation description includes the key driving factors "surge in lunchtime catering orders" and "large-scale event hosting," with attribution scores of 12.5 and 9.8, respectively. The threshold is set to 8.0, and the driving factor category label set is {Catering Peak, Event Scenario}. In the scheduling strategy library index matrix, "Catering Peak" matches strategy template T1 (increased priority scheduling for catering within the radius), and "Event Scenario" matches strategy template T3 (adding temporary riders around the event venue). The logical judgment matrix, based on the mapping table from driving factor category to geographical region, binds the "Catering Peak" label to region R5 and the "Event Scenario" label to region R2; based on the time period mapping table, "Catering Peak" is bound to the time period 11:00-13:00, and "Event Scenario" is bound to the time period 18:00-22:00; based on the resource type mapping table, "Catering Peak" matches vehicle type V2, and "Event Scenario" matches vehicle type V1. Logical matrix encoding yields a set of policy clusters: {T1-R5-[11:00-13:00]-V2, T3-R2-[18:00-22:00]-V1}. Vectorization encoding then generates a differentiated scheduling intent vector of length M, where each component represents the activation state and priority coefficient of a policy cluster. For example, policy cluster T1 has a weight of 2.0, and policy cluster T3 has a weight of 1.5. This vector, input into the multi-objective optimization engine, generates a capacity allocation matrix that conforms to regional and time-period differences in subsequent steps, enabling precise resource scheduling and rapid response.

[0160] S6.4: Based on the aforementioned set of demand trend segments and differentiated scheduling intention vectors, a mixed integer programming model is constructed with the objectives of minimizing empty running rate, maximizing order fulfillment rate, and minimizing response delay. Semantic interpretation information serves as a constraint weight adjustment factor to dynamically adjust the optimization priority of each objective function term, thereby generating a forward-looking capacity scheduling allocation matrix.

[0161] Based on the set of demand trend segments and differentiated scheduling intention vectors, a multi-objective mixed integer programming modeling engine is used to initialize and optimize the problem structure, thereby achieving a joint optimal solution for empty run rate, order fulfillment rate and response delay.

[0162] Furthermore, by constructing a set of objective functions ,in Used to minimize empty driving distance Used to maximize order fulfillment volume This is used to minimize the average response delay, forming a basic performance measurement system for multi-objective optimization.

[0163] Furthermore, constraint weight adjustment factors are constructed by introducing semantic interpretation information. A dynamic weight allocation algorithm (parameters: driver factor category confidence, business priority index) is used to achieve the objective function weight matrix. The time-varying adjustment is achieved, resulting in an optimized weight configuration that adapts to real-time business scenarios.

[0164] Furthermore, business rule variables obtained from semantic label mapping are added to the constraint equation system. The scheduling feasible domain is reduced by using a logical constraint mapping algorithm (parameters: region identifier, resource type, time window) to ensure that the scheduling scheme conforms to business strategy and physical reachability.

[0165] Furthermore, by invoking a mixed-integer linear programming solver, and under the set iteration upper limit and convergence tolerance conditions, a combination of branch and bound method and cutting plane method is performed to generate allocation decision vectors for each transportation unit in a specified time period and region. This forms a forward-looking capacity scheduling and allocation matrix for this cycle.

[0166] By combining mixed integer programming modeling and dynamic weight adjustment, demand trends and differentiated intentions are combined to transform into executable capacity allocation decisions, thereby achieving comprehensive optimization of scheduling schemes in terms of efficiency, fulfillment rate and response speed.

[0167] S6.5: Perform feasibility verification and conflict resolution on the capacity scheduling and allocation matrix. Based on the current available capacity status map and traffic accessibility network topology, perform resource matching simulation. Use a greedy backtracking algorithm to correct resource overlap allocation or service capacity out-of-bounds problems. Finally, output a pre-scheduling scheme that meets physical constraints and business compliance, and push it to the execution layer control system for implementation and deployment.

[0168] Based on the capacity scheduling and allocation matrix output by the multi-objective optimization modeling engine, a constraint feasibility verification algorithm (parameters: regional grid boundary set, resource status map, vehicle load limit, shift operation procedure) is used to verify the physical legitimacy of each scheduling and allocation unit in the matrix in terms of space, time and resource capacity.

[0169] Furthermore, the accessibility between each scheduling path and the target area is verified by using a traffic accessibility network topology simulation algorithm (parameters: road network node set, edge delay function, real-time traffic state tensor), the possibility of completing the task within the predicted scheduling time window is evaluated, and the path accessibility determination vector is obtained.

[0170] Furthermore, by utilizing a resource conflict detection method (parameters: scheduling matrix index, unique identifier of capacity status, and set of task time windows), conflict identification is achieved for multiple tasks allocated to the same resource within overlapping time windows, and a set of conflict task indexes is generated.

[0171] Furthermore, a greedy backtracking algorithm (parameters: conflict task index set, objective function priority, path cost matrix) is adopted to implement priority sorting and removal operations for conflict allocation units. Based on business priority, high-value tasks are retained among similar tasks, and alternative resources are backtracked to fill the scheduling gaps caused by removal, generating a conflict-corrected scheduling matrix.

[0172] Furthermore, by using a capability boundary verification algorithm (parameters: task load within the scheduling matrix, maximum resource load, and shift operation duration limit), the task load of each allocation unit is adjusted and divided to ensure that it does not exceed the service capacity of a single resource, and a final scheduling matrix after compliance adjustment is generated.

[0173] Through encapsulation, the scheduling matrix after conflict resolution and capacity boundary verification is transformed into a pre-scheduling scheme data packet, achieving the expected technical effect of pushing the capacity scheduling scheme that meets physical constraints and business procedures to the execution layer control system.

[0174] For example, for a regional logistics network, the input capacity scheduling and allocation matrix contains 50 resource units and 150 task units. The resource status map shows that each rider's maximum load is 30kg, and the maximum shift duration is 8 hours. Using a constrained feasibility verification algorithm with a 5km×5km grid as the spatial boundary, verification revealed that 12 scheduling and allocation units had paths exceeding their respective grid ranges. Traffic topology simulation (820 road network nodes, edge delay function calculated from real-time traffic state tensors) determined that 8 of these task paths were unreachable. A resource conflict detection method identified instances where the same resource was assigned to 3 tasks within overlapping time windows, involving 6 resource units and 14 task items. A greedy backtracking algorithm was used to optimize based on order fulfillment rate, retaining high-value tasks and backtracking to fill in substitute resources. After conflict correction, the total number of tasks in the matrix decreased to 138. Capacity boundary checks segmented overloaded tasks, decomposing the original 24kg and 15kg load portions of each task into two separate task records matched with different riders, ensuring compliance with load and shift regulations. The final pre-scheduling scheme covers 138 valid scheduling records and is pushed to the execution layer control system in the form of structured data packets. Execution simulation shows that the scheme significantly improves both resource utilization and on-time task completion rate.

[0175] Step S7: During the scheduling execution process, dynamically collect actual capacity matching status and order fulfillment feedback data to form a closed-loop feedback time series sample set, and determine whether its deviation from the predicted trend exceeds a preset threshold. Specifically, this includes:

[0176] S7.1: Collect real-time capacity matching status data of each delivery node in the regional logistics network. The capacity matching status data includes the number of riders on duty, the length of the order queue to be dispatched, the average order response time, and the regional empty load rate. Perform localized aggregation processing based on the edge computing gateway to generate a capacity matching snapshot sequence with unified spatiotemporal granularity, which serves as an input condition reflecting the real-time matching degree of system resource supply and demand.

[0177] S7.2: Connect to the order fulfillment end-to-end monitoring module to obtain order fulfillment feedback data for completed delivery tasks. The feedback data includes actual delivery time, path deviation index, customer signature confirmation mark and abnormal event label. Use the event stream processing engine to parse and structure the multi-source heterogeneous logs and output a standardized fulfillment fact tuple stream to quantify the consistency level between service execution results and planned objectives.

[0178] S7.3: Align and fuse the capacity matching snapshot sequence with the standardized performance fact tuple stream on the time axis, and construct a closed-loop feedback time series sample set containing supply and demand status and execution results based on the sliding time window mechanism. Each sample unit consists of historical scheduling actions, observed state transitions and final performance within the (tn, t) time period, forming a complete decision trajectory segment that can be used for model posterior evaluation.

[0179] It receives a stream of standardized fulfillment fact tuples generated by the event stream processing engine and aggregates the capacity matching snapshot sequence through the edge computing gateway as a dual input data source for supply and demand status and execution results.

[0180] A timestamp alignment algorithm (parameter: unified time index based on UTC standard) is adopted to achieve precise synchronization of capacity matching snapshot sequence and performance fact tuple stream in the time dimension, and output a time-aligned one-to-one correspondence record index mapping table.

[0181] Furthermore, the time-aligned dual-input dataset is segmented using a sliding time window mechanism (parameters: window length n periods, step size Δt) to encapsulate and aggregate supply and demand states and execution results within continuous time segments, generating a set of structured window sample units.

[0182] Furthermore, based on historical scheduling action records, observed state transition logs, and performance data, a field-level association matching algorithm is used to associate and bind the supply and demand status records within the sliding window with scheduling actions and performance results, thereby constructing a decision trajectory triplet that includes scheduling actions, state transitions, and performance data.

[0183] Furthermore, the decision trajectory triples are serialized and stored according to time segment index through the metadata encapsulation module, forming a closed-loop feedback time series sample set divided into intervals of (t−n,t], which is used for subsequent posterior performance evaluation and bias analysis of the model.

[0184] Through the above serialization process, capacity snapshots and performance records are transformed into closed-loop feedback sample data that can reflect the dynamics of supply and demand matching and execution effectiveness, thereby realizing the construction of the complete decision trajectory required for prediction-execution consistency analysis.

[0185] For example, in a regional logistics network, a sliding time window of 4 hours with a step size of 30 minutes is set. The capacity matching snapshot sequence obtained from the edge computing gateway includes four types of variables: the number of riders on duty every 5 minutes, the length of the order queue, the average order response time, and the regional empty load rate. The fulfillment fact tuple stream obtained from the fulfillment monitoring module includes the actual delivery time of each order, the route deviation index, the customer's signature confirmation mark, and the abnormal event label. The timestamp alignment algorithm, based on a unified UTC second-level index, accurately matches the capacity snapshot with the fulfillment record, outputting a supply and demand status-fulfillment result mapping table for each sampling point. Within a sliding window of 4 hours, a window sample unit including 48 sampling points is aggregated. Within each unit, the corresponding historical scheduling actions (such as rider reassignment, order priority dispatch), observed state transitions (such as a decrease in empty load rate → a shortening of order response time), and fulfillment performance (such as a shortening of average delivery time and a reduction in abnormal events) are bound to the corresponding historical scheduling actions (such as rider reassignment, order priority dispatch), observed state transitions (such as a decrease in empty load rate → a shortening of order response time), and fulfillment performance (such as a shortening of average delivery time and a reduction in abnormal events) are bound through an association matching algorithm. Finally, the binding information is serialized into a closed-loop feedback sample storage structure indexed by time segment. In the subsequent deviation measurement step, this sample set can significantly improve the resolution and reliability of the difference analysis between the predicted trend and the actual execution.

[0186] S7.4: Based on the closed-loop feedback time series sample set, calculate the dynamic deviation metric between the actual achieved demand satisfaction curve and the predicted demand trend output by the deep Q network. Use the weighted dynamic time warping algorithm (WDTW) to evaluate the overall shape difference between the two time series curves, and combine the mean square error index to quantify the point-to-point deviation intensity to generate a composite deviation score as the core basis for judging the effectiveness of the model prediction.

[0187] S7.5: Compare the composite deviation score with a preset adaptive threshold. If the deviation score is determined to be higher than the threshold for multiple consecutive sampling periods, output a deviation over-limit signal to trigger a local update process for model parameters; otherwise, maintain the stable operation of the current depth Q network parameters to ensure that the feedback adjustment mechanism is only activated when the prediction-execution consistency deteriorates significantly, so as to avoid excessively frequent model disturbances from affecting system stability.

[0188] Based on the composite deviation score output from step S7.4 and the system's preset adaptive threshold parameter set, an interval comparison algorithm (parameters: composite deviation score, threshold constant term, and dynamic adjustment coefficient) is used to realize the threshold determination function for predicted execution differences.

[0189] Furthermore, by using the sliding window statistical method (parameters: window length W, step interval Δt), the stability of the deviation score sequence within a continuous sampling period is evaluated, and the cross-period deviation persistence index is obtained.

[0190] Furthermore, a logic-gated filtering algorithm (parameters: persistence index St, decision threshold Gt) is used to determine if continuous deviations exceed limits and generate deviation status flag data.

[0191] Furthermore, by using a conditional trigger control strategy (parameters: deviation flag, trigger cooling cycle Tc), the generation of the start signal for the local update process of model parameters is realized, and the fine-tuning trigger signal sequence is obtained.

[0192] Furthermore, a state preservation mechanism (parameters: the model running state of the previous cycle, the deviation judgment result) is adopted to maintain control of the normal prediction process and keep the parameters of the current depth Q network running stably when the deviation does not exceed the threshold.

[0193] By employing the aforementioned interval comparison, continuity assessment, logic gating, and conditional triggering methods, the difference detection results from the previous step are transformed into control signals that trigger fine-tuning or maintain the state, achieving the expected technical effect of activating the feedback adjustment mechanism only when the prediction-execution consistency deteriorates significantly.

[0194] For example, in a regional logistics network, the composite deviation score is 0.245, and the adaptive threshold is composed of the historical average operational deviation of 0.15 and a dynamic adjustment coefficient, calculated as follows: The threshold T is obtained as 0.25. Under the conditions of a sliding window length W = 4 sampling periods and a step interval Δt = 1 period, the continuous periodic deviation score sequence {0.24, 0.27, 0.26, 0.28} is judged. Three of the periodic scores are higher than the threshold T, the persistence index St = 3, which is greater than the judgment threshold Gt = 2, and the deviation status flag is generated as 1. After triggering a cooling period Tc = 5 periods, the current cooling period for this region has ended, and the fine-tuning trigger signal sequence {1} is output. If another sequence {0.22, 0.23, 0.24, 0.23}, under the same W and Δt parameters, calculates St = 0, which is less than Gt, the deviation flag is 0, and the system maintains stable operation of the current depth Q network parameters without triggering any update action. In this example, the formula and parameter settings ensure that model fine-tuning is triggered only when the deviation is significant and persistent, avoiding frequent disturbances caused by short-term fluctuations, and significantly improving system stability and predictive scheduling consistency.

[0195] Step S8: If the judgment deviation exceeds a preset threshold, a model fine-tuning mechanism is triggered. The attention weight parameters in the deep Q-network are locally updated using the closed-loop feedback time-series sample set to improve the adaptability and consistency of prediction results and scheduling coordination in subsequent cycles. Specifically, this includes:

[0196] S8.1: Based on the closed-loop feedback time series sample set generated in S7, extract the time series data of actual capacity matching status and order fulfillment rate as input conditions for model error analysis; use a sliding time window to align the predicted demand value and the actual fulfillment volume for each time period, calculate the relative deviation sequence between the two, and quantify the degree of deviation of the prediction trend.

[0197] S8.2: Input the relative deviation sequence into the deviation determination module and perform a threshold comparison operation; wherein, the preset dynamic deviation threshold is adaptively determined based on the average fluctuation level of the system within the historical period; if the current maximum relative deviation exceeds the threshold, a model fine-tuning trigger signal is generated as the control basis for starting the parameter update process.

[0198] S8.3: After receiving the model fine-tuning trigger signal, the attention weight update submodule in the deep Q network is activated. This submodule constructs a gradient sensitive region identification mechanism based on the backpropagation algorithm, focuses on the head in the multi-head self-attention layer that contributes more to the prediction error and its corresponding time step position, and locates the set of attention weight parameters that need to be adjusted.

[0199] S8.4: Construct fine-tuned training batches using closed-loop feedback time-series sample sets, and use a small-sample incremental learning strategy to optimize the localized attention weight parameter set through local gradient descent; wherein, the loss function is jointly composed of the mean square error between the predicted value and the actual performance and the attention distribution smoothing regularization term to prevent overfitting of local abnormal data.

[0200] S8.5: After completing the local parameter update, freeze the weights of the remaining network layers and retain only the updated attention weight matrix as the parameters of the new version model; output the updated deep Q network model instance and deploy it to the next prediction cycle to achieve consistent iterative evolution between prediction results and scheduling execution.

[0201] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.

[0202] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.

[0203] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for regional logistics demand forecasting and capacity pre-scheduling, specifically including: S1: Acquire regional logistics multi-source time series data, and perform spatiotemporal alignment processing on the multi-source time series data to generate a high-dimensional time series feature vector sequence with unified timestamp marking; S2: Perform preprocessing on the high-dimensional temporal feature vector sequence to output a standardized temporal input tensor; S3: The standardized temporal input tensor is embedded into the deep Q-network backbone model with multi-head self-attention mechanism to output the original demand prediction value of logistics demand in the future target period. By calculating the correlation weight distribution between query vector, key vector and value vector, an attention weight matrix containing spatiotemporal dependencies is generated. S4: Based on the attention weight matrix, extract the normalized correlation weight tensor of each head output in the multi-head self-attention mechanism and perform channel aggregation operation to generate a single-dimensional comprehensive attention weight vector. Use the backpropagation algorithm to calculate the marginal contribution of each feature dimension of the comprehensive attention weight vector to the trend of the prediction result, and generate an attribution score vector classified by feature. S5: The attribution score vector and the original demand prediction value output by the deep Q network are combined as input. Based on the preset business rule mapping table, the numerical attribution score is converted into a semantic explanation description with enhanced readability, and a demand prediction output with cause annotation is generated. S6: Transmit the demand prediction output with cause annotation to the scheduling strategy module with response rule template to generate a pre-scheduling scheme.

2. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 1, characterized in that, Step S6 is followed by: S7: During the scheduling process, dynamically collect actual capacity matching status and order fulfillment feedback data to form a closed-loop feedback time series sample set, and determine whether its deviation from the predicted trend exceeds a preset threshold. S8: If the judgment deviation exceeds the preset threshold, the model fine-tuning mechanism is triggered, and the attention weight parameters in the deep Q network are locally updated using the closed-loop feedback time series sample set to improve the adaptability and consistency of prediction results and scheduling coordination in subsequent cycles.

3. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 1, characterized in that, The multi-source time-series data includes historical order volume, weather information, holiday tags, traffic status index, and regional economic activity indicators.

4. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 1, characterized in that, Step S2 involves preprocessing the high-dimensional temporal feature vector sequence, including normalization and missing value imputation.

5. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 1, characterized in that, In step S4, each component of the attribution score vector corresponds to the explanatory strength of a class of original input variables.

6. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 2, characterized in that, The preset business rule mapping table mentioned in step S5 contains the mapping relationship between feature categories and natural language description templates, and generates a preliminary semantic description fragment sequence based on the matching results.

7. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 1, characterized in that, Step S5 specifically includes: Obtain the attribution score vector and the original demand prediction value output by the deep Q network. Based on the magnitude and direction of change of each feature component in the attribution score vector, perform threshold comparison and sorting operations to identify the set of key driving factors with the highest contribution and generate a feature subset of key driving factors. The key driving factor feature subset is classified and matched using a preset business rule mapping table, which contains the mapping relationship between feature categories and natural language description templates. A preliminary semantic description fragment sequence is generated based on the matching results. Using the trend information of the original demand forecast as contextual conditions, combined with the sequence of preliminary semantic description fragments, dynamic sentence structure assembly is performed to generate a complete semantic explanation text of causes, forming a natural language output with trend and cause association; the generated semantic explanation text and the original demand forecast are structured and encapsulated, and the output is a composite demand forecast result data package containing predicted values ​​and cause annotations.

8. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 1, characterized in that, Step S6 specifically includes: Based on the demand forecast output with cause annotation, a joint output data structure containing the original demand forecast value and semantic interpretation description is obtained. The original demand forecast value in the joint output data structure is decomposed in the time dimension to extract the segmented demand intensity sequence in multiple future scheduling cycles and generate a set of demand trend segments with time-series granularity. Based on the key driving factor categories identified in the semantic interpretation description, a classification matching operation is performed to activate the corresponding response rule templates in the scheduling strategy library. The semantic tags are mapped to priority scheduling strategy clusters for specific regions, time periods and resource types using a logical judgment matrix to form a differentiated scheduling intent vector. Based on the aforementioned set of demand trend segments and differentiated scheduling intention vectors, a mixed integer programming model is constructed with the objectives of minimizing empty mileage, maximizing order fulfillment rate, and minimizing response delay. Semantic interpretation information serves as a constraint weight adjustment factor to dynamically adjust the optimization priority of each objective function term, thereby generating a forward-looking capacity scheduling allocation matrix.

9. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 8, characterized in that, The semantic interpretation in step S6 is generated by transforming the attribution score vector through a preset business rule mapping table, and is used to characterize the marginal contribution of each input feature to the predicted trend change.

10. The regional logistics demand forecasting and capacity pre-scheduling method according to claim 8, characterized in that, Step S6 also includes performing feasibility verification and conflict resolution on the capacity scheduling and allocation matrix, performing resource matching simulation based on the current available capacity status map and traffic accessibility network topology, correcting resource overlap allocation, and finally outputting a pre-scheduling scheme that meets physical constraints and business compliance.