Multi-scale Patch mixed drug demand prediction system and method

By using a multi-scale patch hybrid drug demand forecasting system, which combines data acquisition, inter-block and intra-block mixing, and channel mixing modules, the system solves the problems of high prediction accuracy and excessive computational resource consumption of deep learning models in the pharmaceutical field, and achieves efficient and accurate drug demand forecasting.

CN122088765APending Publication Date: 2026-05-26XINJIANG CICONHABO UYGUR MEDICINE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610061069.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-16
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing deep learning models based on patch technology suffer from low prediction accuracy and excessive computational resource consumption in long-term time series forecasting in the medical field.

Method used

The drug demand forecasting system employing multi-scale patch hybridization includes a data acquisition module, a multi-scale data block partitioning module, a dimension mapping module, a prediction module, a multi-scale fusion module, as well as independently deployed inter-block and intra-block hybridization modules and channel hybridization modules, which are connected through a residual connection module to achieve multi-scale feature fusion and variable relationship modeling.

Benefits of technology

It improves the accuracy and computational efficiency of drug demand forecasting, effectively captures the multivariate and long-term characteristics of drug demand, and enhances the resilience of the supply chain and the optimization of procurement strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122088765A_ABST
    Figure CN122088765A_ABST
Patent Text Reader

Abstract

The invention provides a multi-scale Patch mixed drug demand prediction system and method, and relates to the technical field of data processing, and the system comprises a data obtaining module which obtains sequence data reflecting drug demands; the data block division module is used for converting the data block into a multi-scale data block matrix; the dimension mapping module is used for dimensionally mapping the data block matrix; the mixing module is used for mixing characteristics among different data blocks in a mapping result and characteristics in refined data blocks; the mixing module is used for mixing and refining the mixed and refined characteristic matrix; the residual error connection module is used for fusing the two characteristic matrixes of the two mixing modules; the channel mixing module is used for carrying out feature weighted recombination on the fusion feature matrix among channels through a mixer; the prediction module is used for predicting a channel mixed feature matrix; and the multi-scale fusion module is used for fusing the multi-scale prediction results to obtain demand prediction results, wherein the demand prediction results comprise prediction results of Xipai gingival fixing liquid, Zukamu particles, cold asthma Zupao particles and the like. The invention aims to improve the drug demand prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to a multi-scale patch hybrid drug demand forecasting system and method. Background Technology

[0002] In the pharmaceutical field, long-term time series forecasting is a core technology supporting scientific decision-making and optimized operations for pharmaceutical companies. Its main applications include long-term demand forecasting (such as accurately predicting market demand for various pharmaceutical and medical device products over the next few months or even a year, guiding production departments to schedule production rationally, and avoiding high inventory costs or the risk of supply disruptions for key drugs due to forecasting errors), supply chain resilience management (such as predicting price and supply cycle fluctuations of core raw materials, and enhancing the supply chain's resilience and optimizing procurement strategies through in-depth analysis of time series data), and R&D resource allocation. These practical business scenarios share the common characteristics of data that are multivariable, extremely long-term, and highly noisy.

[0003] Currently, most mainstream deep learning models based on patching technology are used for long-term time series prediction. These models aim to reduce the complexity of long-series processing and capture local information by patching the time series. However, under the data characteristics of the above-mentioned actual business scenarios in the medical field, they have problems such as low prediction accuracy and excessive consumption of computing resources. Summary of the Invention

[0004] In view of this, this application provides a multi-scale patch hybrid drug demand forecasting system and method, aiming to solve or partially solve the problems existing in the prior art.

[0005] The first aspect of this application provides a multi-scale patch hybrid drug demand forecasting system, the system comprising: The system includes a data acquisition module, a multi-scale data block partitioning module, a dimension mapping module, a prediction module, a multi-scale fusion module, and a first inter-block and intra-block mixing module, a second inter-block and intra-block mixing module, and a channel mixing module, which are independently deployed for each scale of subsequence data. The independently deployed first inter-block and intra-block mixing modules and second inter-block and intra-block mixing modules are connected through a residual connection module. The data acquisition module is used to acquire various types of historical observation sequence data reflecting drug demand, and to determine all types of acquired historical observation sequence data as the original historical observation sequence data for input into the model. The multi-scale data block partitioning module is used to transform the input raw historical observation sequence data into a patch matrix corresponding to sub-sequence data at different scales. The patch matrix consists of a set of patches at different scales. The dimension mapping module is used to perform dimension mapping on the patches in the patch matrix of the subsequence data to obtain the corresponding feature matrix. The feature matrix is ​​composed of the feature vectors corresponding to each patch in the patch matrix. The first inter-patch and intra-patch mixing module is used to perform feature vector mixing processing between different patches on the input feature matrix, and to perform feature refinement processing on the feature vectors within the patch to obtain the corresponding first mixed feature matrix. The second inter-block and intra-block mixing module is used to perform feature vector mixing processing between different patches on the first mixing feature matrix output by the first inter-block and intra-block mixing module, and to perform feature refinement processing on the feature vectors within the patch to obtain the corresponding second mixing feature matrix. The residual connection module is used to fuse the first mixed feature matrix and the second mixed feature matrix to obtain the corresponding target mixed feature matrix; The channel mixing module is used to treat the feature vectors of different variables in the input target mixing feature matrix as different channels, and to perform weighted summation and recombination of feature vectors between channels through a linear mixer to obtain the corresponding channel mixing feature matrix. The prediction module is used to perform prediction processing on the input channel mixing feature matrix to obtain the corresponding prediction result; The multi-scale fusion module is used to fuse the prediction results corresponding to the sub-sequence data at each scale to obtain the final demand prediction result.

[0006] Optionally, the multi-scale data block partitioning module includes a downsampling module and a data partitioning module; The downsampling module is used to progressively downsample the input original historical observation sequence data into subsequence data of different scales through average pooling processing. The data partitioning module is used to convert each subsequence data into a corresponding patch matrix through block processing.

[0007] Optionally, the multi-scale data block partitioning module includes a zero-padding module, which performs zero-padding on the subsequence data according to the length of the subsequence data and the length of the patch to be partitioned before partitioning the subsequence data into blocks.

[0008] Optionally, the first inter-block and intra-block mixing module consists of a first inter-block mixing module, a first intra-block mixing module, and a first residual connection module; The first inter-patch blending module is used to blend the feature vectors of different patches of the input feature matrix to obtain the first inter-patch blended feature matrix. The first intra-block blending module is used to perform feature refinement processing on the feature vectors inside the patch of the input first inter-block blending feature matrix to obtain the first intra-block blending feature matrix. The first residual connection module is used to fuse the first inter-block mixed feature matrix and the first intra-block mixed feature matrix to obtain the corresponding first mixed feature matrix.

[0009] Optionally, the second inter-block and intra-block mixing module consists of a second inter-block mixing module, a second intra-block mixing module, and a second residual connection module; The second inter-patch blending module is used to blend the feature vectors of different patches in the input first blending feature matrix to obtain the second inter-patch blending feature matrix. The second intra-block blending module is used to perform feature refinement processing on the feature vectors inside the patch of the input second inter-block blending feature matrix to obtain the second intra-block blending feature matrix; The second residual connection module is used to fuse the second inter-block mixed feature matrix and the second intra-block mixed feature matrix to obtain the corresponding second mixed feature matrix.

[0010] Optionally, the multi-scale fusion module is used to perform an element-wise averaging operation on the feature vectors of the prediction results corresponding to the sub-sequence data at each scale to obtain the final required prediction result.

[0011] Optionally, both the inter-block blending module and the intra-block blending module consist of two fully connected layers, a GELU activation function, and a random dropout layer.

[0012] Optionally, the channel mixing module consists of two fully connected layers, a GELU activation function, a random dropout layer, and a third residual connection module; The third residual connection module is used to fuse the outputs of the two fully connected layers of the channel mixing module to obtain the corresponding channel mixing feature matrix.

[0013] Optionally, the various historical observation sequence data include at least the daily sales volume of multiple types of drugs in the target area over a past period; the final demand forecast result obtained is the predicted sales volume of the multiple types of drugs over a future period.

[0014] The second aspect of this application provides a multi-scale patch hybrid drug demand forecasting method, applied to the multi-scale patch hybrid drug demand forecasting system described in the first aspect of this application, the method comprising: The data acquisition module acquires various types of historical observation sequence data reflecting drug demand, and determines all types of historical observation sequence data as the original historical observation sequence data for input into the model. The input raw historical observation sequence data is transformed into a patch matrix corresponding to subsequence data at different scales by a multi-scale data block partitioning module. The patch matrix consists of a set of patches at different scales. The dimension mapping module performs dimension mapping on the patches in the patch matrix of the subsequence data to obtain the corresponding feature matrix. The feature matrix is ​​composed of the feature vectors corresponding to each patch in the patch matrix. The first inter-block and intra-block mixing module performs feature vector mixing processing between different patches on the input feature matrix, and performs feature refinement processing on the feature vectors within the patch to obtain the corresponding first mixed feature matrix. The second inter-block and intra-block mixing module performs feature vector mixing processing on the first mixed feature matrix output by the first inter-block and intra-block mixing module, and performs feature refinement processing on the feature vectors within the patch to obtain the corresponding second mixed feature matrix. The first and second mixed feature matrices are fused by the residual connection module to obtain the corresponding target mixed feature matrix; The channel mixing module treats the feature vectors of different variables in the input target mixed feature matrix as different channels, and uses a linear mixer to weight and recombine the feature vectors between the channels to obtain the corresponding channel mixed feature matrix. The prediction module performs prediction processing on the input channel mixing feature matrix to obtain the corresponding prediction result; The prediction results corresponding to the subsequence data at each scale are fused by the multi-scale fusion module to obtain the final demand prediction result.

[0015] The multi-scale patch hybrid drug demand forecasting system provided in this application has the following advantages: This application provides a multi-scale patch-based drug demand forecasting system. The system comprises: a data acquisition module, a multi-scale data block partitioning module, a dimension mapping module, a prediction module, a multi-scale fusion module, and independently deployed inter-block and intra-block mixing modules, a second inter-block and intra-block mixing module, and a channel mixing module for each scale of sub-sequence data. The independently deployed first and second inter-block and intra-block mixing modules are connected via a residual connection module. The data acquisition module acquires various types of historical observation sequence data reflecting drug demand and uses all acquired historical observation sequence data as the original historical observation sequence data for input to the model. The multi-scale data block partitioning module transforms the input original historical observation sequence data into patch matrices corresponding to sub-sequence data at different scales. Each patch matrix consists of a set of patches at different scales. The dimension mapping module performs dimension mapping on the patches in the patch matrix of the sub-sequence data to obtain corresponding feature matrices, which consist of feature vectors corresponding to each patch in the patch matrix. The system comprises the following modules: a first inter-block and intra-block mixing module, which performs feature vector mixing between different patches of the input feature matrix and feature refinement of feature vectors within a patch to obtain a first mixed feature matrix; a second inter-block and intra-block mixing module, which performs feature vector mixing between different patches of the first mixed feature matrix output by the first inter-block and intra-block mixing module and feature refinement of feature vectors within a patch to obtain a second mixed feature matrix; a residual connection module, which fuses the first and second mixed feature matrices to obtain a target mixed feature matrix; a channel mixing module, which treats the feature vectors of different variables in the input target mixed feature matrix as different channels and performs weighted and recombined feature vectors between channels using a linear mixer to obtain a corresponding channel mixed feature matrix; a prediction module, which performs prediction processing on the input channel mixed feature matrix to obtain a corresponding prediction result; and a multi-scale fusion module, which fuses the prediction results corresponding to sub-sequence data at each scale to obtain the final required prediction result.

[0016] The core of the prediction network in the multi-scale patch hybrid drug demand prediction system provided in this application comprises four components: a multi-scale data block partitioning module, an inter-block and intra-block mixing module, a channel mixing module, and a multi-scale fusion module.

[0017] The multi-scale data block partitioning module (actively providing multi-temporal granular features) performs multi-scale downsampling processing: It performs multi-scale downsampling on the original historical observation sequence data (containing multiple variables). Through a series of average pooling operations, the original historical observation sequence data is progressively downsampled into multiple subsequences at different scales. Each subsequence at each scale is divided into patch blocks, which are then mapped to a unified-dimensional feature space through a linear mapping layer.

[0018] The inter-block and intra-block hybrid module (efficiently captures temporal features) is based on MLP (Multilayer Perceptron) and is used to comprehensively capture the local and global temporal patterns of the sequence. This structure avoids high computational costs, and the comprehensive capture of the local and global temporal patterns of the sequence can make the prediction results more accurate.

[0019] The channel fusion module (decoupling and modeling relationships between variables) decouples time-series feature capture from variable relationship modeling, addressing the issue of insufficient variable interaction. This module effectively models the potential linkages between different variables in the supply chain, enhancing the model's understanding of complex systems and improving the accuracy of prediction results. The multi-scale fusion module (balancing and integrating results) fuses interactive features from multiple scales to obtain the final drug demand prediction result. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram illustrating a multi-scale patch hybrid drug demand forecasting system according to one embodiment of this application; Figure 2 This is a schematic diagram illustrating the structure of a prediction model in a multi-scale patch hybrid drug demand prediction system according to an embodiment of this application; Figure 3 This is a schematic diagram illustrating the structure of each hybrid module of the prediction model in a multi-scale patch hybrid drug demand prediction system according to an embodiment of this application. Figure 4 This is a flowchart illustrating a multi-scale patch hybrid drug demand forecasting method according to one embodiment of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] refer to Figure 1 , Figure 1 This is a schematic diagram illustrating a multi-scale patch hybrid drug demand forecasting system according to one embodiment of this application. Figure 1As shown, the system includes: a data acquisition module 101, a multi-scale data block partitioning module 102, a dimension mapping module 103, a prediction module 104, a multi-scale fusion module 105, and a first inter-block and intra-block mixing module 106, a second inter-block and intra-block mixing module 108, and a channel mixing module 109, independently deployed for each scale of sub-sequence data. The independently deployed first inter-block and intra-block mixing module 106 and second inter-block and intra-block mixing module 108 are connected through a residual connection module 107. The data acquisition module is used to acquire various types of historical observation sequence data reflecting drug demand and to determine all types of historical observation sequence data acquired as the original historical observation sequence data for inputting the model. The multi-scale data block partitioning module is used to convert the input original historical observation sequence data into patch matrices corresponding to sub-sequence data at different scales. The patch matrix consists of a set of patches at different scales. The dimension mapping module is used to perform dimension mapping on the patches in the patch matrix of the sub-sequence data to obtain the corresponding feature matrix. The feature matrix consists of the feature vectors corresponding to each patch in the patch matrix. The first inter-block and intra-block mixing module is used to perform feature vector mixing processing between different patches on the input feature matrix, and feature refinement processing on the feature vectors within a patch to obtain a corresponding first mixed feature matrix; the second inter-block and intra-block mixing module is used to perform feature vector mixing processing between different patches on the first mixed feature matrix output by the first inter-block and intra-block mixing module, and feature refinement processing on the feature vectors within a patch to obtain a corresponding second mixed feature matrix; the residual connection module is used to fuse the first mixed feature matrix and the second mixed feature matrix to obtain a corresponding target mixed feature matrix; the channel mixing module is used to treat the feature vectors of different variables in the input target mixed feature matrix as different channels, and to perform weighted and recombined feature vectors between channels through a linear mixer to obtain a corresponding channel mixed feature matrix; the prediction module is used to perform prediction processing on the input channel mixed feature matrix to obtain a corresponding prediction result; the multi-scale fusion module is used to fuse the prediction results corresponding to the sub-sequence data at each scale to obtain the final required prediction result.

[0024] In this application, the various historical observation sequence data include at least the daily sales volume of multiple types of drugs in the target area over a past period; the final demand forecast result obtained is the predicted sales volume of the multiple types of drugs over a future period.

[0025] In this embodiment, due to the regional differences in drug demand, the multi-scale patch hybrid drug demand forecasting system provided in this application first divides the forecasting area (e.g., by city or province) when forecasting drug demand, and then performs drug demand forecasting for each defined forecasting area. First, the system's data acquisition module acquires various historical observation sequence data reflecting drug demand within the single forecasting area. These historical observation sequence data include at least the historical observation sequence data consisting of the daily sales volume of various drugs over a past period. All types of historical observation sequence data are determined as the original historical observation sequence data input into the forecasting model. That is, the forecasting model will perform corresponding drug demand forecasting based on the input original historical observation sequence data. The final forecast result is related to the various drugs input into the model, representing the predicted sales volume of these drugs over a future period, such as Xipai Guyin Liquid, Zukamu Granules, and Hanchuan Zupai Granules.

[0026] For example, the original historical observation sequence data is defined as follows: Where T represents the known historical observation time step, and C is the number of variables (i.e., the number of data types; for example, historical observation sequence data for 5 types of drugs corresponds to 5 variables). The prediction model composed of each module learns a mapping function. This allows the function to be based on the original historical observation sequence data. Accurately predict sequences for P future time steps :

[0027] in, Represents the original historical observation sequence data. This represents the predicted sequence, i.e., the prediction result, and .

[0028] In this embodiment, the multi-scale data block partitioning module is an important component of the prediction model. This module is used to transform the original historical observation sequence data input to the model into patch matrices corresponding to sub-sequence data at different scales. That is, the original historical observation sequence data will be divided into multiple sub-sequence data at different scales by this module, and further, for each scale of sub-sequence data, a corresponding patch matrix will be transformed. A patch matrix consists of a set of patches at different scales; that is, the patch matrix records the patches processed from the sub-sequence data at different scales. Figure 2 As shown, Figure 2Scale1, Scale2, and Scale3 in the diagram schematically illustrate multiple subsequences of the input data.

[0029] To facilitate understanding, the transformation of original historical observation sequence data into subsequences and patch matrices is illustrated here as an example. For instance, if the original historical observation sequence data is 100 units in length, it is transformed into subsequence data at two scales: a subsequence data at scale 5 (i.e., data length 5) with 20 samples, and a subsequence data at scale 10 (i.e., data length 10) with 10 samples. Furthermore, the subsequence data at one scale is transformed into a corresponding patch matrix. This patch matrix records patches at scales a, b, and c. In other words, the subsequence data is divided into patches at scale a, scale b, and scale c, respectively. Thus, the patch matrix corresponding to the subsequence data records the patch division results at three different scales.

[0030] For example, through this transformation process, the subsequence data at each scale is transformed into a patch matrix. ,in The number of patches generated from the subsequence data at the m-th patch division scale is represented by L, which represents the length of each patch, i.e., the number of time steps it covers, D is the number of variables, and h is the sliding window step size during the division.

[0031] In this embodiment, after obtaining the patch matrix corresponding to the subsequence data at each scale, to facilitate subsequent processing by the MLP mixer, the prediction model of this application includes a dimension mapping module. This dimension mapping module is used to perform dimension mapping on the patches in the patch matrix of the subsequence data to obtain the corresponding feature matrix. The feature vectors in this feature matrix are transformed from the patches in the patch matrix of the subsequence data. That is, a patch in the patch matrix of the subsequence data is transformed into a corresponding feature vector through dimension mapping. The specific dimension mapping process is as follows: each patch... ,in Through a linear mapping layer, its feature dimension is mapped from L×D to a more compact feature space. If each patch is mapped to d dimensions, then the patch representation obtained after mapping can be considered as a feature vector. This process can be formally represented as:

[0032] in Let represent the feature vector of the i-th patch under the m-th patch partitioning scale. (·) represents a linear mapping layer. Through the processing of this dimension mapping module, each scale of the subsequence data will obtain a corresponding feature matrix. For example... Figure 2 As shown in the figure, Patch Segmentation Projection schematically illustrates the process of dimension mapping.

[0033] In this embodiment, in order to effectively capture the complex temporal dependencies in the time series, this application designs an inter-block and intra-block hybrid module in the prediction model. Its core idea is to draw on the interaction concept of the attention mechanism, while avoiding the high computational cost brought about by the traditional self-attention mechanism by adopting a simpler MLP structure.

[0034] In this embodiment, the application independently deploys a first inter-block and intra-block mixing module, a second inter-block and intra-block mixing module, and a channel mixing module in the prediction model for subsequence data at each scale. The first inter-block and intra-block mixing module, the second inter-block and intra-block mixing module, and the channel mixing module deployed for subsequence data at a specific scale will only be used to process the relevant feature matrix corresponding to the subsequence data at that scale. That is, each subsequence data at a given scale has one corresponding first inter-block and intra-block mixing module, one second inter-block and intra-block mixing module, and these three modules will only be used to process the relevant feature matrix corresponding to the subsequence data at that scale.

[0035] Specifically, this application first uses a first inter-block and intra-block blending module to perform feature vector blending processing between different patches on the corresponding feature matrix obtained by the dimension mapping module, and to perform feature refinement processing on the feature vectors within each patch, to obtain a corresponding first blended feature matrix. Then, a second inter-block and intra-block blending module performs feature vector blending processing between different patches on the first blended feature matrix output by the first inter-block and intra-block blending module, and to perform feature refinement processing on the feature vectors within each patch, to obtain a corresponding second blended feature matrix. Finally, a residual connection module fuses the first blended feature matrix obtained by the first inter-block and intra-block blending module and the second blended feature matrix obtained by the second inter-block and intra-block blending module to obtain the corresponding target blended feature matrix. Figure 2 As shown in the diagram, the Inter & Intra Patch Miner at the bottom represents the first inter-block and intra-block blending module, such as... Figure 2 As shown in the diagram, the Inter & Intra Patch Miner at the top represents the second inter-block and intra-block mixing module.

[0036] In this embodiment, to capture the complex nonlinear dependencies in multivariate time series more deeply, this application designs a channel mixing module in the prediction model. To avoid high computational overhead, the channel mixing module in this application adopts a lightweight linear mixer structure. The core function of this channel mixing module is to realize information interaction and nonlinear feature fusion between variables at the channel dimension. The channel mixing module treats the feature vectors of different variables in the target mixed feature matrix as different channels and uses a linear mixer to weight and recombine information between channels. In this way, the channel mixing module can learn and model the complex relationships between different variables, capturing how the change of one variable nonlinearly affects the dynamics of another variable. This enables the prediction model to go beyond simple synchronous or lag relationships and gain a deeper understanding of the inherent, cross-variable causal or synergistic effects in multivariate time series. The prediction model in this application is a mixer model based entirely on MLP, which can effectively capture multi-scale features in time series. Figure 2 As shown in the figure, Channel Mixing represents the channel mixing module.

[0037] Specifically, after obtaining the target mixed feature matrix through the residual connection module, the channel mixing module treats the feature vectors of different variables in the input target mixed feature matrix as different channels, and uses a linear mixer to weight and recombine the feature vectors between channels to obtain the corresponding channel mixed feature matrix. Through the same implementation method, each scale of subsequence data will obtain a corresponding channel mixed feature matrix.

[0038] In this embodiment, after obtaining the corresponding channel mixing feature matrix through the channel mixing module, the prediction module performs prediction processing on the input channel mixing feature matrix to obtain the corresponding prediction result. Using the same implementation method, each scale of subsequence data will obtain a corresponding prediction result.

[0039] In this embodiment, after the prediction module obtains the prediction results corresponding to the subsequence data at each scale, the multi-scale fusion module fuses the prediction results corresponding to the subsequence data at all scales to obtain the final drug demand prediction result. Figure 2 As shown, Figure 2 In this context, Multiscale Aggregation represents the multiscale fusion module.

[0040] The core of the prediction network in the multi-scale patch hybrid drug demand prediction system provided in this application comprises four components: a multi-scale data block partitioning module, an inter-block and intra-block mixing module, a channel mixing module, and a multi-scale fusion module.

[0041] The multi-scale data block partitioning module (actively providing multi-temporal granular features) performs multi-scale downsampling processing. Specifically, it downsamples the original historical observation sequence data (containing multiple variables) at multiple scales. Through a series of average pooling operations, the original historical observation sequence data is progressively downsampled into multiple subsequences at different scales. Each subsequence at each scale is divided into patch blocks, which are then mapped to a unified-dimensional feature space through a linear mapping layer.

[0042] The inter-block and intra-block hybrid module (efficiently captures temporal features) is based on MLP (Multilayer Perceptron) and is used to comprehensively capture the local and global temporal patterns of the sequence. This structure avoids high computational costs, and the comprehensive capture of the local and global temporal patterns of the sequence can make the prediction results more accurate.

[0043] The channel fusion module (decoupling and modeling relationships between variables) decouples time-series feature capture from variable relationship modeling, addressing the issue of insufficient variable interaction. This module effectively models the potential linkages between different variables in the supply chain, enhancing the model's understanding of complex systems and improving the accuracy of prediction results. The multi-scale fusion module (balancing and integrating results) fuses interactive features from multiple scales to obtain the final drug demand prediction results, such as the final demand prediction results for drugs like Xipai Guyin Liquid, Zukamu Granules, and Hanchuan Zupai Granules.

[0044] In conjunction with the above embodiments, in one implementation, this application also provides a multi-scale patch hybrid drug demand forecasting system. In this multi-scale patch hybrid drug demand forecasting system, the multi-scale data block partitioning module includes a downsampling module and a data partitioning module; the downsampling module is used to progressively downsample the input original historical observation sequence data into sub-sequence data of different scales through average pooling processing; the data partitioning module is used to convert each sub-sequence data into a corresponding patch matrix through block processing.

[0045] In this embodiment, the present application first uses the downsampling module in the multi-scale data block partitioning module to process the input raw historical observation sequence data. Multi-scale downsampling processing is performed. Specifically, this application employs a series of average pooling operations to progressively downsample the original historical observation sequence data into M subsequence data at different scales. These subsequence data are represented as follows: ,in, In this hierarchical structure, the lowest-scale subsequence data... It maintains the fine-grained temporal resolution of the original historical observation sequence data, thus enabling it to capture high-frequency local fluctuations and sudden events. Conversely, after multiple pooling operations, the highest-scale sequence... With a lower temporal resolution, its smoothed data more effectively reflects the macroscopic trends and long-term changes of the series. This multi-scale representation provides a foundation for predictive models to capture both local details and global trends simultaneously.

[0046] In this embodiment, the advantage of the patch partitioning strategy is that it transforms continuous time-point data into patches with local contextual information, thereby effectively capturing local temporal patterns. This is another key component of the multi-scale data block partitioning module. For each scale of subsequence data... This application uses a data partitioning module with a sliding window mechanism of different lengths to divide subsequence data at one scale into patches of different scales.

[0047] In conjunction with the above embodiments, in one implementation, this application also provides a multi-scale patch hybrid drug demand forecasting system. In this multi-scale patch hybrid drug demand forecasting system, the multi-scale data block partitioning module includes a zero-padding module, used to perform zero-padding processing on the sub-sequence data according to the length of the sub-sequence data and the length of the patch to be partitioned before performing block processing on the sub-sequence data.

[0048] In this embodiment, to avoid the loss of end information in the subsequence data before patching, this application designs a zero-padding module in the multi-scale data block partitioning module. This module performs zero-padding on the subsequence data based on its length and the length of the patch to be divided before patching, thus preventing the loss of end information. Figure 2 As shown in the figure, Padding & Patch schematically illustrates the process of zero-padding and patching subsequence data.

[0049] In conjunction with the above embodiments, in one implementation, this application also provides a multi-scale patch-based drug demand forecasting system. In this multi-scale patch-based drug demand forecasting system, the first inter-patch and intra-patch mixing module comprises an inter-patch mixing module, a first intra-patch mixing module, and a first residual connection module. The first inter-patch mixing module is used to perform feature vector mixing processing on the input feature matrix across different patches to obtain a first inter-patch mixed feature matrix. The first intra-patch mixing module is used to perform feature refinement processing on the feature vectors within the patch of the input first inter-patch mixed feature matrix to obtain a first intra-patch mixed feature matrix. The first residual connection module is used to fuse the first inter-patch mixed feature matrix and the first intra-patch mixed feature matrix to obtain a corresponding first mixed feature matrix.

[0050] In this application, the inter-block blending module and the intra-block blending module each consist of two fully connected layers, a GELU activation function, and a random dropout layer.

[0051] In this embodiment, to effectively capture complex temporal dependencies in time series, this application designs an inter-block and intra-block blending module (including a first inter-block and intra-block blending module and a second inter-block and intra-block blending module). Based on the interaction concept of attention mechanism, a simpler MLP structure is adopted to avoid the high computational cost brought by traditional self-attention mechanism. The designed inter-block and intra-block blending module consists of two core parts: an inter-block blending module responsible for processing the relationships between patches in the input feature matrix (which is the first inter-block blending module in the first inter-block and intra-block blending module, and the second inter-block and intra-block blending module responsible for refining the features within the patches of the input feature matrix (which is the first intra-block blending module in the first inter-block and intra-block blending module, and the second intra-block blending module in the second inter-block and intra-block blending module). This application aims to comprehensively capture temporal patterns from local to global while ensuring model computational efficiency through this hierarchical and efficient structure.

[0052] In this embodiment, the mixer structures used in the inter-block and intra-block mixing modules of this application are more lightweight and efficient. Both the inter-block and intra-block mixing modules consist of two fully-connected layers, a GELU activation function, and a dropout layer. Compared to the high complexity of traditional Transformer architectures... The self-attention mechanism of this application results in a lighter and more efficient mixer structure that saves computational costs. Figure 2 As shown, Figure 2In this context, InterPatch Mixer represents the inter-patch mixing module, and IntraPatch Mixer represents the intra-patch mixing module. For example... Figure 3 As shown, Figure 3 The structural diagrams of the inter-block blending module and the intra-block blending module are shown.

[0053] In this embodiment, to enable the model to comprehensively and precisely capture the multiple dependencies of time-series data, the two mixing modules in the inter-block and intra-block mixing module are connected in a sophisticated cascade manner. The lower-level inter-block mixing module in the inter-block and intra-block mixing module serves as the first step in the processing flow, and its main task is to interact and fuse the information between the various patches of the input feature matrix. By aggregating information at the patch level, the transition from local detailed features to global contextual information can be effectively achieved, thereby capturing long-term dependencies spanning longer time steps. Subsequently, the higher-level intra-block mixing module in the inter-block and intra-block mixing module, based on the output of the lower-level inter-block mixing module, further refines and extracts the deep features within each patch. This step ensures that the local representation capability of each patch is sufficiently enhanced. The general nonlinear mixing module of the mixer in this application is expressed as follows: ,in, Representing two fully connected layers, For activation function, Used for regularization.

[0054] In this embodiment, the hierarchical feature extraction strategy of the inter-block and intra-block blending module designed in this application endows the model with a unique ability to simultaneously take into account both global macro-trend information and local micro-detail information. To effectively alleviate the common gradient vanishing or model performance degradation problems in deep network training, this application cleverly adds residual connections at the cascaded connections between the inter-block blending module and the intra-block blending module. This design not only helps stabilize model training but also enables the model to better utilize shallow information when learning deep features, thereby improving overall generalization ability.

[0055] Specifically, the first inter-block and intra-block blending module consists of an inter-block blending module, an intra-block blending module, and a first residual connection module. The dimension mapping module performs dimension mapping on the patches in the patch matrix of the sub-sequence data to obtain the corresponding feature matrix, and then inputs this feature matrix into the first inter-block blending module. The first inter-block blending module then performs feature vector blending processing on the input feature matrix across different patches to obtain the corresponding first inter-block blended feature matrix. After obtaining the first inter-block blended feature matrix through the processing of the first inter-block blending module, this first inter-block blended feature matrix is ​​input into the first intra-block blending module. The first intra-block blending module then performs feature refinement processing on the feature vectors within the patches of the input first inter-block blended feature matrix to obtain the corresponding first intra-block blended feature matrix. After obtaining the first intra-block blended feature matrix through the processing of the first intra-block blending module, the first residual connection module in the first inter-block and intra-block blending module fuses the first inter-block blended feature matrix obtained by the first inter-block blending module and the first intra-block blended feature matrix obtained by the first intra-block blending module to obtain the corresponding first blended feature matrix.

[0056] For example, to facilitate understanding, this application formally defines a first inter-block blending module and a first intra-block blending module. Assume the input of the first inter-block blending module is... Where N is the number of patches and d is the dimension of the patches. The first inter-patch blending module is used to capture the relationships between patches. It operates on the rows of the input feature matrix Z (i.e., different patches) to blend information along the patch dimension, as expressed by: The first intra-block blending module is used to refine the features within a patch. It operates on the columns of the feature matrix Z (i.e., the feature dimensions within each patch) processed by the first inter-block blending module, as expressed by: This application connects the first inter-block mixing module and the first intra-block mixing module in a cascaded manner, and adds residual connections to form a complete processing block, the output of which can be represented as:

[0057]

[0058] In conjunction with the above embodiments, in one implementation, this application also provides a multi-scale patch-based drug demand forecasting system. In this multi-scale patch-based drug demand forecasting system, the second inter-patch and intra-patch mixing module comprises a second inter-patch mixing module, a second intra-patch mixing module, and a second residual connection module. The second inter-patch mixing module is used to perform feature vector mixing processing on the input first mixed feature matrix across different patches to obtain a second inter-patch mixed feature matrix. The second intra-patch mixing module is used to perform feature refinement processing on the feature vectors within the patch of the input second inter-patch mixed feature matrix to obtain a second intra-patch mixed feature matrix. The second residual connection module is used to fuse the second inter-patch mixed feature matrix and the second intra-patch mixed feature matrix to obtain the corresponding second mixed feature matrix.

[0059] In this embodiment, the second inter-block and intra-block mixing module has the same structure as the first inter-block and intra-block mixing module, both consisting of a corresponding inter-block mixing module, an intra-block mixing module, and a residual connection module. The inter-block mixing module and the intra-block mixing module have the same structure, both consisting of two fully connected layers, a GELU activation function, and a random dropout layer.

[0060] In this embodiment, the second inter-block and intra-block blending module comprises a second inter-block blending module, a second intra-block blending module, and a second residual connection module. After the first inter-block and intra-block blending module processes and obtains the first blended feature matrix, it is input into the second inter-block blending module connected to the first inter-block and intra-block blending module. This second inter-block blending module performs feature vector blending processing on the input first blended feature matrix across different patches to obtain the corresponding second inter-block blended feature matrix. After obtaining the corresponding second inter-block blended feature matrix through the processing of the second inter-block blending module, this second inter-block blended feature matrix is ​​input into the second intra-block blending module within the second inter-block blending module. The second intra-block blending module then performs feature refinement processing on the feature vectors within the patch of the input second inter-block blended feature matrix to obtain the corresponding second intra-block blended feature matrix. The second residual connection module is used to fuse the second inter-block blended feature matrix and the second intra-block blended feature matrix to obtain the corresponding second blended feature matrix. After obtaining the second intra-block blending feature matrix through the processing of the second intra-block blending module, the second residual connection module in the second inter-block blending module fuses the second inter-block blending feature matrix obtained by the processing of the second inter-block blending module and the second intra-block blending feature matrix obtained by the processing of the second intra-block blending module to obtain the corresponding second blending feature matrix.

[0061] In conjunction with the above embodiments, in one implementation, this application also provides a multi-scale patch hybrid drug demand forecasting system. In this multi-scale patch hybrid drug demand forecasting system, the channel mixing module consists of two fully connected layers, a GELU activation function, a random dropout layer, and a third residual connection module. The third residual connection module is used to fuse the outputs of the two fully connected layers of the channel mixing module to obtain the corresponding channel mixing feature matrix.

[0062] In this embodiment, a channel mixing module is introduced to capture the complex nonlinear dependencies in multivariate time series more deeply. Structurally, this channel mixing module maintains a high degree of consistency with the inter-block mixing module and intra-block mixing module used in this application for processing time series information. Both adopt a lightweight linear mixer structure. Specifically, the channel mixing module consists of two fully connected layers, a GELU activation function, a random dropout layer, and a third residual connection module. The third residual connection module is used to fuse the outputs of the two fully connected layers of the channel mixing module to obtain the corresponding channel mixing feature matrix. This design not only ensures the simplicity and consistency of the entire model architecture but also effectively avoids the high computational overhead of traditional self-attention mechanisms. Figure 3 As shown, Figure 3 A structural diagram of the channel mixing module is shown.

[0063] In this embodiment, by independently applying the channel mixing module at each time scale (i.e., on each subsequence data), the prediction model of this application can capture unique variable interaction patterns at specific scales. For example, at one scale, the module may learn the long-term trend correlation between economic indicators and the pharmaceutical market; while at another scale, it may capture the impact of a sudden event on short-term fluctuations in multiple industries. This decoupled modeling strategy ensures that the modeling of relationships between variables is carried out in a more abstract and high-dimensional feature space, thereby avoiding the challenges of directly modeling on the original noisy sequence. The channel mixing module is represented as follows: ,in Let m be the channel blending feature matrix after channel blending, where m represents the scale, C represents the channel, and P represents the dimension.

[0064] In conjunction with the above embodiments, in one implementation, this application also provides a multi-scale patch hybrid drug demand forecasting system. In this multi-scale patch hybrid drug demand forecasting system, the multi-scale fusion module is used to perform an element-wise averaging operation on the feature vectors of the prediction results corresponding to the sub-sequence data of each scale to obtain the final demand forecast result.

[0065] In this embodiment, after the prediction module processes the channel mixing feature matrices corresponding to subsequence data at different scales to obtain multi-scale prediction results, the key to prediction performance lies in how to efficiently and unbiasedly integrate information. Traditional additive fusion has the following drawbacks: it may lead to noise superposition and allow the scale with more information to dominate the fusion result, thereby ignoring the contributions of other important scales and limiting the model's insight. To solve this problem, this application proposes a more robust mean fusion strategy. By performing an element-wise averaging operation on the prediction results at each scale, this method can effectively suppress noise superposition between scales. Since noise is usually random, averaging can achieve mutual cancellation to a certain extent, thus making the fused features more stable. The expression is: ,in This represents the final demand forecast result. This represents the prediction result at the m-th scale, where C represents the channel and P represents the dimension.

[0066] Based on the same inventive concept, this application provides a multi-scale patch hybrid drug demand forecasting method, applied to the multi-scale patch hybrid drug demand forecasting system described in the first aspect of this application, such as... Figure 4 As shown, the method includes: Step S01: Obtain various historical observation sequence data reflecting drug demand through the data acquisition module, and determine all types of historical observation sequence data as the original historical observation sequence data for input model; Step S02: The input original historical observation sequence data is transformed into a patch matrix corresponding to subsequence data of different scales through the multi-scale data block partitioning module. The patch matrix consists of a set of patches of different scales. Step S03: Perform dimension mapping on the patches in the patch matrix of the subsequence data through the dimension mapping module to obtain the corresponding feature matrix. The feature matrix is ​​composed of the feature vectors corresponding to each patch in the patch matrix. Step S04: The first inter-block and intra-block mixing module performs feature vector mixing processing on the input feature matrix between different patches, and performs feature refinement processing on the feature vectors within the patch to obtain the corresponding first mixed feature matrix. Step S05: The first mixed feature matrix output by the first inter-block and intra-block mixing module is processed by mixing feature vectors between different patches through the second inter-block and intra-block mixing module, and feature refinement processing of feature vectors within the patch is performed to obtain the corresponding second mixed feature matrix. Step S06: The first and second mixed feature matrices are fused through the residual connection module to obtain the corresponding target mixed feature matrix; Step S07: The channel mixing module treats the feature vectors of different variables in the input target mixed feature matrix as different channels, and the linear mixer performs weighted summation and recombination of feature vectors between channels to obtain the corresponding channel mixed feature matrix; Step S08: The input channel mixing feature matrix is ​​processed by the prediction module to obtain the corresponding prediction result; Step S09: The prediction results corresponding to the subsequence data at each scale are fused through the multi-scale fusion module to obtain the final demand prediction result.

[0067] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily necessary for the embodiments of this application.

[0068] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0069] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0070] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0071] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0073] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0074] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0075] The above provides a detailed description of a multi-scale patch hybrid drug demand forecasting system and method provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A multi-scale patch hybrid drug demand forecasting system, characterized in that, The system includes: a data acquisition module, a multi-scale data block partitioning module, a dimension mapping module, a prediction module, a multi-scale fusion module, and a first inter-block and intra-block mixing module, a second inter-block and intra-block mixing module, and a channel mixing module, which are independently deployed for subsequence data at each scale. The independently deployed first inter-block and intra-block mixing module and second inter-block and intra-block mixing module are connected through a residual connection module. The data acquisition module is used to acquire various types of historical observation sequence data reflecting drug demand, and to determine all types of acquired historical observation sequence data as the original historical observation sequence data for input into the model. The multi-scale data block partitioning module is used to transform the input raw historical observation sequence data into a patch matrix corresponding to sub-sequence data at different scales. The patch matrix consists of a set of patches at different scales. The dimension mapping module is used to perform dimension mapping on the patches in the patch matrix of the subsequence data to obtain the corresponding feature matrix. The feature matrix is ​​composed of the feature vectors corresponding to each patch in the patch matrix. The first inter-patch and intra-patch mixing module is used to perform feature vector mixing processing between different patches on the input feature matrix, and to perform feature refinement processing on the feature vectors within the patch to obtain the corresponding first mixed feature matrix. The second inter-block and intra-block mixing module is used to perform feature vector mixing processing between different patches on the first mixing feature matrix output by the first inter-block and intra-block mixing module, and to perform feature refinement processing on the feature vectors within the patch to obtain the corresponding second mixing feature matrix. The residual connection module is used to fuse the first mixed feature matrix and the second mixed feature matrix to obtain the corresponding target mixed feature matrix; The channel mixing module is used to treat the feature vectors of different variables in the input target mixing feature matrix as different channels, and to perform weighted summation and recombination of feature vectors between channels through a linear mixer to obtain the corresponding channel mixing feature matrix. The prediction module is used to perform prediction processing on the input channel mixing feature matrix to obtain the corresponding prediction result; The multi-scale fusion module is used to fuse the prediction results corresponding to the sub-sequence data at each scale to obtain the final demand prediction result.

2. The multi-scale patch hybrid drug demand forecasting system according to claim 1, characterized in that, The multi-scale data block partitioning module includes a downsampling module and a data partitioning module; The downsampling module is used to progressively downsample the input original historical observation sequence data into subsequence data of different scales through average pooling processing. The data partitioning module is used to convert each subsequence data into a corresponding patch matrix through block processing.

3. The multi-scale patch hybrid drug demand forecasting system according to claim 1, characterized in that, The multi-scale data block partitioning module includes a zero-padding module, which performs zero-padding on the subsequence data according to the length of the subsequence data and the length of the patch to be divided before partitioning the subsequence data into blocks.

4. The multi-scale patch hybrid drug demand forecasting system according to claim 1, characterized in that, The first inter-block and intra-block mixing module consists of a first inter-block mixing module, a first intra-block mixing module, and a first residual connection module; The first inter-patch blending module is used to blend the feature vectors of different patches of the input feature matrix to obtain the first inter-patch blended feature matrix; The first intra-block blending module is used to perform feature refinement processing on the feature vectors inside the patch of the input first inter-block blending feature matrix to obtain the first intra-block blending feature matrix. The first residual connection module is used to fuse the first inter-block mixed feature matrix and the first intra-block mixed feature matrix to obtain the corresponding first mixed feature matrix.

5. A multi-scale patch hybrid drug demand forecasting system according to claim 1, characterized in that, The second inter-block and intra-block mixing module consists of a second inter-block mixing module, a second intra-block mixing module, and a second residual connection module; The second inter-patch blending module is used to blend the feature vectors of different patches in the input first blending feature matrix to obtain the second inter-patch blending feature matrix. The second intra-block blending module is used to perform feature refinement processing on the feature vectors inside the patch of the input second inter-block blending feature matrix to obtain the second intra-block blending feature matrix; The second residual connection module is used to fuse the second inter-block mixed feature matrix and the second intra-block mixed feature matrix to obtain the corresponding second mixed feature matrix.

6. The multi-scale patch hybrid drug demand forecasting system according to claim 1, characterized in that, The multi-scale fusion module is used to perform an element-wise averaging operation on the feature vectors of the prediction results corresponding to the sub-sequence data of each scale to obtain the final required prediction result.

7. The multi-scale patch hybrid drug demand forecasting system according to claim 1, characterized in that, Both the inter-block blending module and the intra-block blending module consist of two fully connected layers, a GELU activation function, and a random dropout layer.

8. A multi-scale patch hybrid drug demand forecasting system according to claim 1, characterized in that, The channel mixing module consists of two fully connected layers, a GELU activation function, a random dropout layer, and a third residual connection module. The third residual connection module is used to fuse the outputs of the two fully connected layers of the channel mixing module to obtain the corresponding channel mixing feature matrix.

9. A multi-scale patch hybrid drug demand forecasting system according to claim 1, characterized in that, The various historical observation sequence data include at least the daily sales volume of multiple types of drugs in the target area over a past period; the final demand forecast result obtained is the predicted sales volume of the multiple types of drugs in the future period.

10. A multi-scale patch hybrid drug demand forecasting method, characterized in that, The method, applied to a multi-scale patch hybrid drug demand forecasting system according to any one of claims 1 to 9, comprises: The data acquisition module acquires various types of historical observation sequence data reflecting drug demand, and determines all types of historical observation sequence data as the original historical observation sequence data for input into the model. The input raw historical observation sequence data is transformed into a patch matrix corresponding to subsequence data at different scales by a multi-scale data block partitioning module. The patch matrix consists of a set of patches at different scales. The dimension mapping module performs dimension mapping on the patches in the patch matrix of the subsequence data to obtain the corresponding feature matrix. The feature matrix is ​​composed of the feature vectors corresponding to each patch in the patch matrix. The first inter-block and intra-block mixing module performs feature vector mixing processing between different patches on the input feature matrix, and performs feature refinement processing on the feature vectors within the patch to obtain the corresponding first mixed feature matrix. The second inter-block and intra-block mixing module performs feature vector mixing processing on the first mixed feature matrix output by the first inter-block and intra-block mixing module, and performs feature refinement processing on the feature vectors within the patch to obtain the corresponding second mixed feature matrix. The first and second mixed feature matrices are fused by the residual connection module to obtain the corresponding target mixed feature matrix; The channel mixing module treats the feature vectors of different variables in the input target mixed feature matrix as different channels, and uses a linear mixer to weight and recombine the feature vectors between the channels to obtain the corresponding channel mixed feature matrix. The prediction module performs prediction processing on the input channel mixing feature matrix to obtain the corresponding prediction result; The prediction results corresponding to the subsequence data at each scale are fused by the multi-scale fusion module to obtain the final demand prediction result.