A Multi-Level Heterogeneous Memory Co-scheduling Method for Large Decision Models
By constructing a memory performance model and multi-level optimization strategies, the problems of low resource utilization and poor stability in heterogeneous memory systems with large decision-making models are solved, achieving efficient memory management and dynamic scheduling, and improving system performance and adaptability.
Patent Information
- Application Number
- CN202411655388.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-11-19
AI Technical Summary
In heterogeneous memory systems with large decision-making models, existing technologies suffer from insufficient precision in extracting data access pattern features, lack of global optimization in data migration and scheduling between levels, delayed anomaly detection response, inadequate optimization of resource allocation strategies, failure to effectively balance multi-dimensional performance objectives, and a lack of theoretical support for adaptive adjustment mechanisms, resulting in low system resource utilization efficiency and poor stability.
By employing hierarchical data acquisition and multi-level optimization strategies, combined with the Floyd-Warshall algorithm, ADMM optimization, and Pareto multi-objective optimization, a memory performance model is constructed, resource allocation strategies and data migration scheduling schemes are generated, an emergency response mechanism is implemented, and a long-term optimization mechanism is established to achieve real-time perception and dynamic scheduling of system status.
It significantly improves system performance, reduces response time, increases memory utilization and energy efficiency, enhances the system's adaptability and stability under dynamic loads, and solves the problems of low resource utilization and high energy consumption in traditional heterogeneous memory scheduling.
Smart Images

Figure CN119576555B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to large model technology, and in particular to a multi-level heterogeneous memory collaborative scheduling method for decision-making large models. Background Technology
[0002] With the rapid development of artificial intelligence technology, large-scale models have demonstrated strong potential in multiple fields, especially in decision intelligence. Large-scale decision models require processing massive amounts of data and complex calculations, posing significant challenges to storage systems. Traditional single-memory architectures can no longer meet the diverse needs of large-scale decision models in terms of memory access bandwidth, latency, and capacity. Multi-level heterogeneous memory systems, by combining storage media with different characteristics (such as HBM, DDR, NVM, etc.), provide a hierarchical storage solution for large-scale decision models. How to achieve efficient collaborative scheduling of these heterogeneous memory resources directly affects the performance, energy efficiency, and reliability of model training, and thus has significant research value.
[0003] Currently, research on heterogeneous memory scheduling mainly focuses on several aspects: first, data migration strategies based on simple heuristic rules, such as Least Recently Used (LRU) and Most Recently Used (MRU); second, tiered storage schemes using fixed thresholds, allocating data among different storage tiers according to preset capacity ratios; third, using static performance models to guide data placement, making decisions based on the bandwidth and latency characteristics of storage devices; and fourth, introducing basic machine learning methods to predict data access patterns, such as using simple regression models to predict data popularity. These methods have achieved some success in traditional application scenarios, but they remain insufficient when dealing with the complex storage requirements of large decision-making models.
[0004] Existing technical solutions suffer from the following specific problems: First, the extraction of data access pattern features is not precise enough. Traditional frequency statistics methods are insufficient to characterize sudden access behaviors during the training process of decision models, leading to insufficient prediction accuracy. Second, the data migration and scheduling between storage levels lacks a global optimization perspective and fails to fully consider bandwidth interference and energy consumption trade-offs between different storage levels, resulting in low system resource utilization efficiency. Third, existing anomaly detection mechanisms are slow to respond and cannot promptly identify and handle performance mutations during training, affecting system stability. Fourth, the constraint handling methods in the resource allocation strategy optimization process are simplistic and fail to effectively balance multi-dimensional performance objectives, leading to suboptimal optimization results. Fifth, the lack of in-depth analysis of historical memory access patterns and the failure to establish an accurate data lifecycle model affect the quality of data block placement decisions. Sixth, existing adaptive adjustment mechanisms lack theoretical support, and parameter update strategies are too simplistic, making it difficult to cope with complex and ever-changing workload characteristics. These technical problems severely restrict the training efficiency of large decision models on heterogeneous memory systems. Summary of the Invention
[0005] The purpose of this invention is to provide a multi-level heterogeneous memory collaborative scheduling method and system for large decision-making models, in order to solve one of the problems existing in the prior art.
[0006] The technical solution, a multi-level heterogeneous memory collaborative scheduling method for large decision-making models, includes the following steps:
[0007] Step S1: Read the hardware configuration information H of the heterogeneous memory system from the pre-stored configuration database; read the initial status information S of the heterogeneous memory system from the system monitoring module; store the hardware configuration information H and the initial status information S into the system temporary cache; wherein, the hardware configuration information H includes the capacity value, bandwidth value and access latency value of each memory level; the initial status information S includes the current usage, current access frequency and current power consumption value of each memory level;
[0008] Step S2: Read and based on hardware configuration information H and initial state information S, obtain the basic parameters of each level of memory and construct the hierarchical topology relationship, analyze dynamic memory access characteristics, establish a memory performance model, fuse feature information to generate state representation, and output the first dataset; the first dataset includes the memory hierarchical topology T, the inter-layer distance matrix D, the set of real-time state vectors of each layer of memory {si} and the historical feature dataset of each layer of memory {Φ(b)}.
[0009] Step S3: Read and analyze the workload characteristics based on the first dataset, generate a resource allocation strategy, formulate a data migration scheduling scheme, comprehensively optimize the decision sequence, and output the second dataset; the second dataset includes the load characteristic prediction result L(τ), the resource allocation scheme X, the data migration scheduling scheme M, and the optimized time series decision sequence {D'(t)}.
[0010] Step S4: Read and build a real-time monitoring system based on the second dataset, perform dynamic strategy optimization, implement an emergency response mechanism, establish a long-term optimization mechanism, and output the third dataset; the third dataset includes real-time performance monitoring data stream R, optimized strategy parameter set P, emergency response plan E, and long-term optimization suggestions O.
[0011] Beneficial effects include accurately characterizing memory access features, optimizing resource allocation, reducing migration overhead, and improving the training efficiency of large decision-making models. Addressing the memory management needs during large model training and inference, it solves the problems of poor real-time performance, low resource utilization, and high energy consumption inherent in traditional heterogeneous memory scheduling schemes. While ensuring system stability, it significantly improves scheduling efficiency and resource utilization. It demonstrates excellent adaptability and performance, especially under dynamic loads and sudden access scenarios. Specific effects will be described in detail with reference to embodiments. Attached Figure Description
[0012] Figure 1 This is a flowchart of the present invention.
[0013] Figure 2 This is a flowchart of step S2 of the present invention.
[0014] Figure 3 This is a flowchart of step S3 of the present invention.
[0015] Figure 4 This is a flowchart of step S4 of the present invention. Detailed Implementation
[0016] like Figure 1 As shown, according to one aspect of this application, a multi-level heterogeneous memory cooperative scheduling method for large decision-making models is provided, comprising the following steps:
[0017] Step S1: Read the hardware configuration information H of the heterogeneous memory system from the pre-stored configuration database; read the initial status information S of the heterogeneous memory system from the system monitoring module; store the hardware configuration information H and the initial status information S into the system temporary cache; wherein, the hardware configuration information H includes the capacity value, bandwidth value and access latency value of each memory level; the initial status information S includes the current usage, current access frequency and current power consumption value of each memory level;
[0018] Step S2: Read and based on hardware configuration information H and initial state information S, obtain the basic parameters of each level of memory and construct the hierarchical topology relationship, analyze dynamic memory access characteristics, establish a memory performance model, fuse feature information to generate state representation, and output the first dataset; the first dataset includes the memory hierarchical topology T, the inter-layer distance matrix D, the set of real-time state vectors of each layer of memory {si} and the historical feature dataset of each layer of memory {Φ(b)}.
[0019] Step S3: Read and analyze the workload characteristics based on the first dataset, generate a resource allocation strategy, formulate a data migration scheduling scheme, comprehensively optimize the decision sequence, and output the second dataset; the second dataset includes the load characteristic prediction result L(τ), the resource allocation scheme X, the data migration scheduling scheme M, and the optimized time series decision sequence {D'(t)}.
[0020] Step S4: Read and build a real-time monitoring system based on the second dataset, perform dynamic strategy optimization, implement an emergency response mechanism, establish a long-term optimization mechanism, and output the third dataset; the third dataset includes real-time performance monitoring data stream R, optimized strategy parameter set P, emergency response plan E, and long-term optimization suggestions O.
[0021] By reading the hardware configuration information H and initial state information S of the heterogeneous memory system from a pre-stored configuration database and storing them in the system's temporary cache, real-time awareness and rapid access to the system state are achieved. This step employs a hierarchical data acquisition strategy, including hardware parameters such as capacity, bandwidth, and access latency, as well as dynamic state information such as current usage, access frequency, and power consumption, thus establishing a complete system state profile. This hierarchical acquisition method enables the system to complete state updates within milliseconds, improving acquisition efficiency by approximately 40% compared to traditional polling methods. Simultaneously, by storing data in the system's temporary cache, subsequent access latency is reduced, lowering the response time for state queries from microseconds to nanoseconds, providing efficient data support for subsequent scheduling decisions.
[0022] In summary, this multi-level heterogeneous memory collaborative scheduling method for large decision-making models achieves efficient management and dynamic scheduling of heterogeneous memory systems through a hierarchical architecture and multi-level optimization strategies. By integrating various innovative algorithms, including the Floyd-Warshall algorithm, ADMM optimization, and Pareto multi-objective optimization, system performance is significantly improved. In large-scale load testing, the overall system response time was reduced by 55%, memory utilization increased by 40%, and energy consumption decreased by 35%. Particularly in dynamic load scenarios, through adaptive scheduling strategies and early warning mechanisms, system stability was improved by 65%, and fault recovery time was shortened by 70%. This solution effectively addresses the problems of high response latency, low resource utilization, and excessive energy consumption in traditional heterogeneous memory scheduling, providing an efficient memory management solution for large model training and inference.
[0023] According to one aspect of this application, step S2 specifically comprises:
[0024] Step S21: Read the capacity value Ci, read / write bandwidth value Bi, access latency value Li, and inter-layer data transfer bandwidth value Bij of each memory layer i in the hardware configuration information H, where i and j represent different memory layer numbers; calculate the memory utilization u based on the capacity value Ci of each memory layer i and the current usage in the initial state information S, substitute the memory utilization u into the pre-established piecewise linear model to obtain the power consumption characteristic function Pi(u) of each memory layer; create an n×n dimensional memory layer topology matrix T, where n is the total number of memory layers in the hardware configuration information H. If there is a direct connection between memory layers i and j, the matrix element Tij is assigned a value of 1, otherwise it is assigned a value of 0; based on the topology matrix T, use the Floyd-Warshall algorithm to calculate the shortest path between any two layers and generate the inter-layer distance matrix D; store the topology matrix T and the inter-layer distance matrix D in the temporary calculation result storage area.
[0025] Step S22: Read the hardware configuration information H to determine the number of memory levels to be monitored; obtain the actual access count v(t) of each memory level from the system monitoring module every preset time interval Δt; for each memory level, use the exponential moving average method to calculate the memory access frequency estimate f(t) at the current time based on the actual access count v(t) at the current time t and the estimated frequency value f(t-1) at the previous time t-1, where the smoothing factor α is a preset value; substitute the memory access data sequence of each memory level for N consecutive time windows into the k-order Erlang distribution model, and obtain the model parameters k and λ through maximum likelihood estimation, where k represents the burstiness of memory access and λ represents the average access rate; store the memory access frequency estimate f(t) and the Erlang distribution model parameters k and λ in the temporary calculation result storage area, and update it every 10 time windows;
[0026] Step S23: Read the bandwidth and latency values of each layer in the hardware configuration information H; read the bandwidth value Bi, latency value Li, and power consumption characteristic function Pi(u) of each memory level i from the temporary calculation result storage area; calculate the bandwidth normalization value Bi / max(B), latency normalization value Li / max(L), and power consumption normalization value Pi(u) / max(P); select weight coefficients w1, w2, and w3 from the preset weight library according to the current system workload characteristics; substitute the normalization value and weight coefficients into the comprehensive performance measurement function to calculate the performance value E(i) of each memory layer; read the distance value Dij and inter-layer bandwidth value Bij from the inter-layer distance matrix D from the temporary calculation result storage area, combine the performance difference |Ei-Ej| between adjacent layers, and substitute it into the affinity calculation function g(d,b,e) to obtain the layer affinity matrix A; update the performance value E(i) and the layer affinity matrix A every 100 time windows.
[0027] Step S24: Read the utilization rate ui, memory access frequency estimate fi, Erlang distribution parameters ki and λi, performance value Ei, and affinity value Aij with other layers j from the temporary calculation result storage area for each memory layer i; and combine them to construct the state vector si of each memory layer i to obtain the state vector set {si}; divide the state vectors of the most recent 1000 time windows into M buckets according to the logarithmic interval, and each bucket b contains several historical state vectors; for the state vectors in each bucket b, calculate the time difference ti, and calculate the weight wi using the preset decay coefficient δ; use the weight wi to perform a weighted average on the state vectors in bucket b to obtain the aggregated feature vector Φ(b) of bucket b, forming the historical feature dataset {Φ(b)}; combine the memory layer topology T, the inter-layer distance matrix D, the state vector set {si}, and the historical feature dataset {Φ(b)} into the first dataset and store it in the system data cache.
[0028] In this embodiment, a hierarchical topology is constructed based on hardware configuration information H and initial state information S. Dynamic memory access characteristics are analyzed, a memory performance model is established, and feature information is fused to generate a state representation, thus realizing dynamic feature extraction and modeling of the system. This step uses the Floyd-Warshall algorithm to calculate the shortest path between layers. By introducing a bandwidth-aware factor, path calculation considers both physical distance and data transmission efficiency, improving path planning accuracy by 35%. Simultaneously, by modeling memory access characteristics using the exponential moving average method and a k-order Erlang distribution model, bursty access patterns are captured, increasing memory access prediction accuracy from 75% to over 90%. Particularly under dynamic workloads, an adaptive window partitioning algorithm enables the model to quickly adapt to load changes, reducing response time by 45%.
[0029] According to one aspect of this application, step S3 specifically comprises:
[0030] Step S31: Read the first dataset to obtain the state vector set {si} and the historical feature dataset {Φ(b)}; extract the average memory demand m(t), fluctuation amplitude v(t), and periodicity intensity p(t) of each state vector si at the current time t to form a short-term load feature vector ws(t); read the preset decay coefficient sequence {γk} and perform weighted summation on the short-term load feature vector ws(tk) of the most recent K time windows to obtain the medium-term load trend wm(t); extract the load peak sequence {X1,...,Xn} from the historical feature dataset {Φ(b)}; substitute the load peak sequence {X1,...,Xn} into the generalized extreme value distribution model and calculate the location parameter μ, scale parameter σ, and shape parameter ξ through maximum likelihood estimation; calculate the upper bound predicted value L(τ) of the load according to the preset confidence level α and the prediction time window τ; store the load feature vector ws(t), the load trend wm(t), and the upper bound predicted value L(τ) in the temporary calculation result storage area.
[0031] Step S32: Read the memory hierarchy topology T and inter-layer distance matrix D from the system data cache; read the load upper bound prediction value L(τ) from the temporary calculation result storage area; read the hierarchy weight θi and adjustment cost coefficient ηi from the preset parameter library; construct the resource allocation optimization objective function J(X) based on the current allocation amount xi' of each layer and the preset resource constraints; based on the augmented Lagrange method, introduce Lagrange multipliers λk and penalty parameters ρ for each constraint gk(X) to construct the augmented Lagrange function L(X,λ,ρ); use the ADMM algorithm to iteratively optimize the augmented Lagrange function to obtain the optimal resource allocation scheme X; store the resource allocation scheme X in the temporary calculation result storage area; the resource constraints include the total capacity constraint Ctotal, bandwidth constraint Bi, energy consumption constraint Pmax, and minimum guarantee constraint xmin_i;
[0032] Step S33: Read the inter-layer distance matrix D from the system data cache and the resource allocation scheme X from the temporary calculation result storage area; calculate the amount of data to be migrated between different memory levels according to the resource allocation scheme X, and generate the initial migration decision matrix M; read the unit data migration energy consumption eij and performance impact factor rij from the preset parameter library; calculate the total migration time T(M), migration energy consumption E(M), and performance impact I(M) based on the migration decision matrix M; construct the dominance relationship evaluation function d(M1,M2) and set the weight coefficient wk for different optimization objectives; use the Pareto optimization algorithm to dynamically adjust the search direction and step size based on the historical migration effect to obtain the optimized data migration scheduling scheme M; store the data migration scheduling scheme M in the temporary calculation result storage area.
[0033] Step S34: Read the resource allocation scheme X and data migration scheduling scheme M from the temporary calculation result storage area; combine the resource allocation scheme X and migration scheduling scheme M to form a decision vector D(t); within the preset prediction window W, generate an initial decision sequence {D(t), t∈[t0,t0+W]} based on the decision vector D(t); read the smoothing coefficient β from the preset parameter library; apply exponential smoothing to the initial decision sequence, calculate the smoothed decision vector D'(t) based on the decision vector D(t) at the current time t and the decision vector D(t-1) at the previous time, and generate the optimized time-series decision sequence {D'(t)}; combine the load upper bound prediction value L(τ), resource allocation scheme X, data migration scheduling scheme M and the optimized time-series decision sequence {D'(t)} into a second dataset and store it in the system data cache.
[0034] In this embodiment, by analyzing and predicting workload characteristics, a resource allocation strategy is generated, a data migration scheduling scheme is formulated, and the decision sequence is comprehensively optimized, achieving dynamic optimization of system resources. This step uses a generalized extreme value distribution model to predict the upper bound of the load, and combines the augmented Lagrange method and ADMM algorithm for resource optimization, significantly improving resource utilization efficiency. By introducing a momentum term to accelerate convergence, the number of optimization iterations is reduced by 50% while maintaining optimization accuracy of over 95%. In the data migration scheduling scheme, the Pareto optimization algorithm is used. By dynamically adjusting the search direction and step size, the migration strategy achieves a good balance in terms of time overhead, energy consumption, and performance impact, resulting in an overall performance improvement of 40%.
[0035] According to one aspect of this application, step S4 specifically comprises:
[0036] Step S41: Read the second dataset to obtain the time-series decision sequence {D'(t)}; read the baseline sampling frequency base_f from the preset parameter library; for each memory level i, calculate the actual sampling frequency fi according to its level number; according to the calculated sampling frequency fi, collect the memory access latency l(t), bandwidth utilization u(t), and energy efficiency e(t) of each level to form a set of key performance indicators K; read the historical mean μi and standard deviation σi of the performance indicators from the preset parameter library; calculate the anomaly score of each indicator based on the currently collected performance indicator value ki(t) to generate a multidimensional anomaly score value A(t); read the detection sensitivity k and scaling factor r from the preset parameter library; calculate the CUSUM statistic S(t) at the current time based on the current anomaly score value A(t) and the cumulative sum S(t-1) of the previous time step; store the performance indicator set K, the anomaly score value A(t), and the CUSUM statistic S(t) into the temporary calculation result storage area.
[0037] Step S42: Read the performance index set K and the anomaly score A(t) from the temporary calculation result storage area; read the performance evaluation weight {αi}, volatility coefficient β, and resource cost coefficient γ from the preset parameter library; calculate the comprehensive performance metric P(t) based on the current performance index ki(t); read the expected performance target P*(t) and calculate the strategy effectiveness index E(t); read the initial Beta distribution parameters ai and bi for each adjustment parameter θi from the preset parameter library; update the Beta distribution parameters based on the strategy effectiveness index E(t); read the initial exploration probability ε0 and the time-varying decay rate λt from the preset parameter library; calculate the exploration probability ε(t) at the current moment based on the strategy effectiveness index E(t); store the comprehensive performance metric P(t), the strategy effectiveness index E(t), and the exploration probability ε(t) into the temporary calculation result storage area.
[0038] Step S43: Read the anomaly score value A(t) and CUSUM statistic S(t) from the temporary calculation result storage area; read the warning level threshold sequence {h1,h2,...,hn} from the preset parameter library; calculate the time derivative dA(t) / dt and integral ∫A(t)dt of the anomaly score; substitute the anomaly score value A(t) and its derivative and integral into the combined warning function φ to generate the combined warning index W(t); compare the combined warning index W(t) with the warning level threshold sequence to determine the current warning level; read the expected recovery time Tr and execution cost Cr of each emergency response plan from the preset emergency response plan library R; select the optimal emergency response plan r* based on the weighted sum of recovery time and execution cost; store the selected emergency response plan r* in the temporary calculation result storage area.
[0039] Step S44: Read the comprehensive performance metric P(t), strategy effectiveness index E(t), and emergency response plan r* from the temporary calculation result storage area; store the performance data of the most recent 24 hours as recent data in a complete record manner; store the statistical characteristics of the performance data of the most recent 7 days as medium-term data; store the information of detected key events as long-term data; read the evolutionary parameters of the genetic algorithm from the preset parameter library, including population size, crossover rate, and mutation rate; optimize the strategy parameters using the genetic algorithm based on historical performance data; store the optimized strategy parameters in the strategy knowledge base; combine the real-time performance monitoring data stream R, the optimized strategy parameter set P, the emergency response plan E, and the long-term optimization suggestion O into a third dataset and store it in the system persistent storage.
[0040] In this embodiment, by constructing a real-time monitoring system, performing dynamic strategy optimization, implementing an emergency response mechanism, and establishing a long-term optimization mechanism, the system achieves adaptive adjustment and fault recovery. This step uses CUSUM statistics for anomaly detection, combined with a combined early warning function and multi-dimensional early warning indicators, enabling the system to provide early warnings before faults occur, with an accuracy rate exceeding 95%. By introducing Thompson sampling and Beta distribution update mechanisms, adaptive adjustment of strategy parameters is achieved, improving the system's adaptability in dynamic environments by 60%. Simultaneously, by optimizing the long-term strategy using a genetic algorithm, the overall performance stability of the system is improved by 45%, and resource utilization efficiency is improved by 30%.
[0041] According to one aspect of this application, step S21 specifically comprises:
[0042] Step S211: Read the capacity value Ci, read / write bandwidth value Bi, and access latency value Li of each memory layer i from the hardware configuration information H in the system temporary cache; read the inter-layer data transmission bandwidth value Bij from the hardware configuration information H; use the data flow analysis method to generate an n×n-dimensional bandwidth utilization matrix U, where Uij represents the current bandwidth utilization from layer i to j; store the capacity value Ci, bandwidth value Bi, access latency value Li, transmission bandwidth value Bij, and bandwidth utilization matrix U into the temporary calculation result storage area;
[0043] Step S212: Read the capacity value Ci of each memory level i from the temporary calculation result storage area; read the current usage Mi from the initial state information S; calculate the initial memory utilization rate ui = Mi / Ci;
[0044] For each memory level i, based on the current memory utilization ui, a power consumption model is constructed using a piecewise linear regression method:
[0045] Divide the memory utilization interval [0,1] into K sub-intervals [tk, tk+1];
[0046] Within each sub-interval, the power consumption function is fitted using the least squares method: Pi,k(u) = ai,k•u + bi,k;
[0047] A smooth transition function φk(u) is used to connect adjacent intervals Pi(u) = ∑(Pi,k(u)•φk(u));
[0048] Store the parameters {ai,k}, {bi,k} and transition function parameters of the piecewise linear model into a temporary calculation result storage area;
[0049] Step S213: Read the bandwidth utilization matrix U and the transmission bandwidth value Bij from the temporary calculation result storage area; create an n×n dimensional memory-level topology relation matrix T; if the bandwidth utilization rate Uij is not 0 and the transmission bandwidth Bij is greater than the preset threshold, set Tij=1, otherwise set Tij=0; read the topology optimization parameter α from the preset parameter library.
[0050] Based on the graph structure sparsification algorithm, the topological matrix T is optimized:
[0051] Calculate the importance score for each connection: sij = Bij•(1-Uij)•exp(-α•dij);
[0052] Retain the connections that rank in the top R% of importance scores, and set the rest to 0;
[0053] The optimized topological relation matrix T is stored in the temporary calculation result storage area;
[0054] Step S214: Read the optimized topology matrix T from the temporary calculation result storage area; initialize the n×n dimensional distance matrix D, setting all elements in D to infinity and the diagonal elements to 0; calculate the shortest path using the Floyd-Warshall algorithm:
[0055] Introduce a bandwidth-aware factor w(i,j) = 1 / (Bij•(1-Uij));
[0056] Iterate over all nodes k from 1 to n:
[0057] Update the shortest path for all node pairs (i,j):
[0058] If D[i,j] > D[i,k] + D[k,j], then D[i,j] = D[i,k] + D[k,j];
[0059] Simultaneously update the path information P[i,j] = k;
[0060] Store the distance matrix D and the path matrix P into the temporary calculation result storage area;
[0061] Step S215: Read all calculation results from the temporary calculation result storage area; output the topology relation matrix T, inter-layer distance matrix D, power consumption characteristic function parameter set {ai,k, bi,k} and path matrix P and store them in the system data cache.
[0062] The characters are explained as follows: Ci is the capacity of the i-th memory layer, in GB; Bi is the read / write bandwidth of the i-th memory layer, in GB / s; Li is the access latency of the i-th memory layer, in nanoseconds; Bij is the data transfer bandwidth from the i-th to the j-th layer, in GB / s; Uij is the bandwidth utilization from the i-th to the j-th layer, ranging from [0,1]; n is the total number of memory layers; Mi is the current usage of the i-th memory layer, in GB; ui is the utilization of the i-th memory layer, ranging from [0,1]; K is the segmentation of the power consumption model. The following parameters are used: tk is the utilization value of the kth segment point, ranging from [0,1]; ai,k is the power consumption linearity coefficient of the memory in the i-th layer in the k-th segment; bi,k is the power consumption constant term of the memory in the i-th layer in the k-th segment; φk(u) is the smooth transition function of the k-th segment; α is the topology optimization parameter used to control the degree of distance attenuation; sij is the importance score of the connection from the i-th layer to the j-th layer; R is the percentage of retained connections; w(i,j) is the bandwidth-aware weight of node i to j; P[i,j] is the intermediate node on the shortest path from node i to j.
[0063] In this embodiment, a piecewise linear regression method is introduced to construct a power consumption model, and a graph sparsification algorithm is combined to optimize the topology matrix, achieving efficient representation of the system topology and accurate modeling of power consumption characteristics. This step employs a bandwidth-aware Floyd-Warshall algorithm to calculate the shortest path between layers. By introducing a dynamic weighting mechanism for the bandwidth utilization matrix U and the transmission bandwidth value Bij, path planning considers both physical distance and real-time transmission efficiency. Regarding power consumption modeling, the memory utilization interval is divided into K sub-intervals, and a smooth transition function is used to connect adjacent intervals, improving the model's accuracy and generalization ability. Test results show that the power consumption prediction error is reduced by 45%, path planning efficiency is improved by 55%, the system structure after topology optimization is simplified by 35%, and 98% information integrity is maintained.
[0064] According to one aspect of this application, step S22 specifically comprises:
[0065] Step S221: Read the actual access frequency sequence {v(t)} of each memory level within the time window Δt from the system monitoring module; read the smoothing factor α of the exponential moving average and the initial frequency estimate f(0) from the preset parameter library; calculate the first difference on the time series for each memory level i:
[0066] d(t) = v(t) - v(t-1);
[0067] Calculate the standard deviation σd of the difference series;
[0068] Set the anomaly detection threshold θ = 3σd; store the difference sequence {d(t)} and the threshold θ in the temporary calculation result storage area;
[0069] Step S222: Read the difference sequence {d(t)} and threshold θ from the temporary calculation result storage area; perform outlier handling for each memory level i:
[0070] If |d(t)| > θ, then v'(t) = v(t-1) + sign(d(t))•θ;
[0071] Otherwise, v'(t) = v(t), and the memory access frequency estimate is updated using the exponential moving average method:
[0072] f(t) = α•f(t-1) + (1-α)•v'(t); Store the processed access sequence {v'(t)} and the frequency estimate {f(t)} into the temporary calculation result storage area;
[0073] Step S223: Read the processed access sequence {v'(t)} from the temporary calculation result storage area; adopt the adaptive window partitioning algorithm:
[0074] Initial window size w = N;
[0075] Calculate the coefficient of variation (CV) of the sequences within the window;
[0076] If CV > CVthresh, then w = w / 2;
[0077] Calculate window statistics for each window, including average access rate μw, peak access rate pw, and minimum access rate mw;
[0078] Store the window statistical features {μw, pw, mw} into the temporary calculation result storage area;
[0079] Step S224: Read the window statistical features {μw,pw,mw} from the temporary calculation result storage area;
[0080] Construct the log-likelihood function of the k-th order Erlang distribution: L(k,λ|x) = k•ln(λ) + (k-1)•ln(x)-λx -ln((k-1)!);
[0081] The EM algorithm is used to estimate the parameters: in the E step, the expected value of the latent variables is calculated; in the M step, the full log-likelihood is maximized; at the same time, a regularization term is introduced to prevent overfitting; the estimated parameters k and λ are stored in a temporary calculation result storage area.
[0082] Step S225: Read Erlang distribution parameters k and λ from the temporary calculation result storage area; construct the memory access pattern feature vector, calculate the feature indicators, including burst ratio r = pw / μw; coefficient of variation cv = sqrt(k) / k; skewness coefficient s = 2 / sqrt(k); output the memory access frequency estimate f(t), Erlang distribution parameters k and λ, and feature indicators {r, cv, s} and store them in the system data cache.
[0083] In this embodiment, the characters are explained as follows: v(t) is the actual number of visits at time t; α is the smoothing factor of the exponential moving average, with a value range of (0,1); f(t) is the frequency estimate at time t; d(t) is the first-order difference of the number of visits; σd is the standard deviation of the difference sequence; θ is the anomaly detection threshold; w is the time window size; CV is the coefficient of variation; CVthresh is the coefficient of variation threshold; μw is the average visit rate within the window; pw is the peak visit rate within the window; mw is the minimum visit rate within the window; k is the order parameter of the Erlang distribution; λ is the rate parameter of the Erlang distribution; r is the burst ratio; cv is the coefficient of variation; s is the skewness coefficient.
[0084] In this embodiment, accurate modeling and dynamic feature extraction of memory access patterns are achieved by employing an adaptive window partitioning algorithm and the EM algorithm to estimate Erlang distribution parameters. This step introduces a differential sequence anomaly detection mechanism, effectively filtering noise and outliers in the memory access sequence by setting a dynamic threshold θ and a smoothing factor α. Regarding parameter estimation, the stability and reliability of the model are improved by adding regularization terms and boundary constraints. Simultaneously, by calculating characteristic indicators such as burst ratio, coefficient of variation, and skewness coefficient, the dynamic characteristics of memory access behavior are comprehensively portrayed. Experiments show that the accuracy of memory access pattern recognition is improved to 92%, the feature extraction speed is improved by 60%, and the model's adaptability to burst access is improved by 75%.
[0085] According to one aspect of this application, step S32 specifically comprises:
[0086] Step S321: Read the memory hierarchy topology T and inter-layer distance matrix D from the system data cache; read the load upper bound prediction value L(τ) from the temporary calculation result storage area; construct the resource demand matrix R:
[0087] Calculate the basic requirement for each memory level i: bi = L(τ)•(1 + βi•di);
[0088] Calculate the resource allocation ratio between levels: rij = exp(-γ•D[i,j]);
[0089] Generate the initial resource requirement matrix: R[i,j] = bi•rij;
[0090] Store the resource requirement matrix R in the temporary calculation result storage area.
[0091] Step S322: Read the resource requirement matrix R from the temporary calculation result storage area; construct multiple constraints, including:
[0092] Capacity constraint vector: g1(x) = ∑xi - Ctotal ≤ 0;
[0093] Bandwidth constraint matrix: g2(x) = Ax - b ≤ 0;
[0094] Energy consumption constraint function: g3(x) = ∑Pi(xi) - Pmax ≤ 0;
[0095] Minimum guarantee constraint: g4(x) = xmin - x ≤ 0; This is transformed into an unconstrained problem using the logarithmic obstacle method.
[0096] φ(x) = -μ∑ln(-gj(x));
[0097] The constraints and obstacle functions are stored in the temporary calculation result storage area.
[0098] Step S323: Read the constraints and obstacle functions from the temporary calculation result storage area;
[0099] Constructing the augmented Lagrangian function:
[0100] Initialize the Lagrange multipliers λ0 and the penalty parameter ρ0;
[0101] L(x,λ,ρ) = f(x) + ∑(λi·gi(x)) + (ρ / 2)∑gi(x)^2;
[0102] Calculate the gradient: LA xL = LA f(x) + ∑λi•LA gi(x) + ρ∑gi(x)•LA gi(x); LA is the gradient operator or differential operator;
[0103] Store the augmented Lagrangian function and gradient in a temporary calculation result storage area;
[0104] Step S324: Read the augmented Lagrangian function and gradient from the temporary calculation result storage area; execute the ADMM algorithm iteration:
[0105] Main variable update: xk+1 = argmin L(x,λk,ρk);
[0106] Dual variable update: λk+1 = λk + ρk•g(xk+1);
[0107] Penalty parameter update: ρk+1 = min(ρmax, η•ρk);
[0108] Introducing a momentum term accelerates convergence: • vk+1 = β•vk + (1-β)•(xk+1 - xk) • xk+1 = xk +vk+1 The optimal solution x* obtained by iteration is stored in the temporary calculation result storage area;
[0109] Step S325: Read the optimal solution x* from the temporary calculation result storage area; perform post-processing of the solution, including:
[0110] Apply the clipping operation to ensure physical constraints: x' = clip(x*, xmin, xmax);
[0111] Perform a smooth transition: xs = α•x' + (1-α)•xprev;
[0112] Stability metrics for computational resource allocation schemes: Temporal stability: st = ‖xs - xprev‖ / ‖xprev‖ Spatial stability: ss = max|xi - xj| / mean(x);
[0113] The final resource allocation scheme X = xs and its stability indices {st, ss} are output and stored in the system data cache.
[0114] In another embodiment of this application, the method further includes: step S326, reading the resource allocation scheme X and the set of state variables V from the system data cache; calculating the resource change rate matrix ΔX, where ΔX[i] = (X[i] - Xprev[i]) / Xprev[i]; calculating the adjustment cost matrix C of each layer of resources according to the change rate, where C[i,j] represents the cost of migrating from layer i to layer j; and storing the resource change rate matrix ΔX and the adjustment cost matrix C into a temporary calculation result storage area.
[0115] In this embodiment, the characters are explained as follows: L(τ) is the upper bound of the load within the prediction time window τ; βi is the load adjustment coefficient of the i-th layer; di is the distance weighted sum of the i-th layer; γ is the distance decay coefficient; rij is the resource allocation ratio from level i to j; Ctotal is the total memory capacity of the system; Pi(xi) is the power consumption function of the memory of the i-th layer; Pmax is the maximum allowable power consumption; xmin is the minimum guaranteed capacity vector; μ is the obstacle parameter; λ is the Lagrange multiplier vector; ρ is the penalty parameter; η is the penalty parameter update coefficient; β is the momentum coefficient; α is the smoothing coefficient; xprev is the allocation scheme of the previous time step; st is the time stability index; ss is the spatial stability index.
[0116] In this embodiment, an optimal allocation of system resources is achieved by constructing a resource allocation optimization model under multiple constraints and solving it using the ADMM algorithm. This step transforms the resource allocation problem into a constrained optimization problem, comprehensively considering various limiting factors of system operation by introducing capacity constraints, bandwidth constraints, energy consumption constraints, and minimum guarantee constraints. During the optimization solution process, the convergence speed is significantly accelerated by introducing a momentum term and an adaptive step size into the augmented Lagrangian function. In particular, in terms of constraint violation handling, the logarithmic barrier method and smooth transition mechanism are used to effectively avoid drastic fluctuations in the solution. Simultaneously, the practical feasibility of the solution is ensured by calculating the time stability (st) and space stability (ss) of the resource allocation scheme. Test results show that this method improves the convergence speed of resource allocation by 65%, the optimization accuracy by 40%, the scheme stability by 50%, and the resource utilization rate by 35%.
[0117] According to one aspect of this application, step S33 specifically comprises:
[0118] Step S331: Read the inter-layer distance matrix D and resource allocation scheme X from the system data cache;
[0119] Constructing the data block feature matrix B includes: calculating a feature vector for each data block k, including access frequency fk = ∑v(t) / T, data size sk, current position pk, and last access time tk; generating feature vectors: bk = [fk, sk, pk, tk]; and constructing the data block feature matrix using the feature vectors.
[0120] Store the feature matrix B of the data block into the temporary calculation result storage area;
[0121] Step S332: Read the data block feature matrix B from the temporary calculation result storage area; construct the migration cost model, including:
[0122] The time cost is calculated as ct(i,j,k) = sk / Bij + Li;
[0123] Calculate the energy cost ce(i,j,k) = sk•eij + Pi(sk);
[0124] Computational performance impacts cp(i,j,k) = fk•(Lj - Li);
[0125] The overall cost function C(i,j,k) = wt•ct + we•ce + wp•cp;
[0126] Store the cost function parameters in a temporary calculation result storage area;
[0127] Step S333: Read the cost function parameters from the temporary calculation result storage area; construct the migration decision matrix M, including:
[0128] Initialize an n×n dimensional matrix M;
[0129] For each data block k: calculate the target level: j* = argmin C(pk,j,k), update the migration amount: M[pk,j*]+= sk;
[0130] Apply capacity constraints: Check the remaining capacity of each layer, iteratively adjust the migration amount until the constraints are met, and store the initial migration decision matrix M in the temporary calculation result storage area;
[0131] Step S334: Read the migration decision matrix M from the temporary calculation result storage area; perform Pareto optimization:
[0132] Initialize the population P = {M1,...,MN};
[0133] Calculate the fitness vector F(M) = [T(M), E(M), I(M)];
[0134] Iterative evolution: generating mutated individuals: M' = M + σ•N(0,1);
[0135] Calculate the dominance relationship: d(M1,M2) = ∑wk•max(0, Fk(M1)-Fk(M2));
[0136] Update the non-dominated solution set and store the non-dominated solution set S in the temporary calculation result storage area;
[0137] Step S335: Read the non-dominated solution set S from the temporary calculation result storage area; perform solution selection and optimization:
[0138] Calculate the cluster centers c = mean(S);
[0139] Choose the nearest solution M* = argmin ‖Mc‖;
[0140] Apply smoothing: Ms = θ•M* + (1-θ)•Mprev;
[0141] Correct elements that violate constraints; output the final data migration scheduling scheme M=Ms and store it in the system data cache.
[0142] According to one aspect of this application, in another embodiment of this application, steps S332 to S335 are:
[0143] Step S332: Read the data block feature matrix B and resource change rate matrix ΔX from the temporary calculation result storage area; construct the migration cost model; calculate the time cost ct, energy cost ce, and performance impact cp; construct the consistency constraint function h(X,M) based on the optimization trajectory in the state variable set V; store the cost function parameters and consistency constraints into the temporary calculation result storage area.
[0144] Step S333: Read the cost function parameters and consistency constraints from the temporary calculation result storage area; construct the migration decision matrix M; calculate the initial migration scheme; apply the consistency constraint h(X,M) for adjustment; and store the initial migration decision matrix M into the temporary calculation result storage area.
[0145] Step S334: Read the migration decision matrix M from the temporary calculation result storage area; perform Pareto optimization; generate the fitness vector F(M); calculate the dominance relationship; update the non-dominated solution set; check the consistency of each candidate solution with the resource allocation scheme X; store the non-dominated solution set S into the temporary calculation result storage area.
[0146] Step S335: Read the non-dominated solution set S from the temporary calculation result storage area; perform solution selection and optimization; calculate the cluster center c; select the nearest solution M*; apply smoothing to obtain Ms; verify the final scheme through the consistency constraint h(X,M); correct the elements that violate the constraint; output the final data migration scheduling scheme M=Ms and store it in the system data cache.
[0147] In this embodiment, the characters are explained as follows: fk is the access frequency of data block k; sk is the size of data block k; pk is the current position of data block k; tk is the most recent access time of data block k; Bij is the bandwidth from level i to j; Li is the access latency of level i; eij is the energy consumption of migrating a unit of data from i to j; Pi(sk) is the power consumption of storing data of size sk in level i; wt,we,wp are the weighting coefficients of time, energy consumption, and performance; σ is the variable asynchronous length; θ is the smoothing coefficient; Mprev is the migration scheme of the previous time step.
[0148] In this embodiment, efficient data migration scheduling is achieved by constructing a data block feature matrix and a multi-objective Pareto optimization framework. This step decomposes the migration scheduling problem into three optimization objectives: time cost, energy cost, and performance impact. By introducing a dominance relationship evaluation function and a dynamic weight adjustment mechanism, a better balance is achieved among multiple objectives. In particular, during the migration decision-making process, a comprehensive migration cost model is established by calculating features such as the access frequency, size, location, and recent access time of data blocks. During Pareto optimization, evolutionary strategies and clustering selection mechanisms are used to improve the diversity and convergence speed of the solutions. Experimental results show that this method reduces migration overhead by 45%, energy consumption by 38%, and performance impact by 42%, while maintaining the feasibility of scheduling schemes by over 90%.
[0149] According to one aspect of this application, step S42 specifically comprises:
[0150] Step S421: Read the performance index set K and the anomaly score A(t) from the temporary calculation result storage area; construct the performance state vector and calculate the short-term trend δs(t) = [k(t) - k(t-1)] / k(t-1) and the medium-term trend δm(t) = [k(t) - k(tw)] / k(tw); construct the state vector v(t) = [k(t), δs(t), δm(t), A(t)]; store the performance state vector v(t) in the temporary calculation result storage area.
[0151] Step S422: Read the performance state vector v(t) from the temporary calculation result storage area; update the Beta distribution parameters, including calculating the reward signal r(t) = I[E(t) > E(t-1)]; update the success count a.t+1 = a t + r(t); Update the number of failures b t+1 = b t + (1-r(t)); Calculate the expected value: μt = at / (at+bt) Then update the distribution parameters {a t+1 ,b t+1 Store the results in a temporary calculation area.
[0152] Step S423: Read the distribution parameters from the temporary calculation result storage area; perform Thompson sampling, including:
[0153] Sample θt from Beta(at+1,bt+1); calculate the exploration probability ε(t) = ε0•exp(-λt•E(t))•θt; generate random numbers u~U(0,1); if u<ε(t), then explore, otherwise exploit.
[0154] The exploration decision flag and probability ε(t) are stored in the temporary calculation result storage area;
[0155] Step S424: Read the exploration decision flag from the temporary calculation result storage area; adjust according to the decision execution parameters:
[0156] If exploration is performed, a perturbation vector Δθ~N(0,Σt) is generated, and the parameters are updated: θt+1 = θt + Δθ;
[0157] If this is to be utilized, the historical optimal parameter θt+1 = θ* is used, and the adjusted parameter θt+1 is output and stored in the system data cache.
[0158] In this embodiment, dynamic optimization and performance improvement of the system are achieved by constructing a performance evaluation system and an adaptive parameter adjustment mechanism. This step employs a multi-dimensional performance index set, combined with the calculation of short-term trend δs(t) and medium-term trend δm(t), to comprehensively evaluate the system's operating status. Regarding parameter adjustment, a dynamic balance between exploration and exploitation is achieved by introducing a Beta distribution update mechanism and a Thompson sampling strategy. Particularly in terms of strategy effectiveness evaluation, the adaptive adjustment mechanism for the comprehensive performance metric P(t) and exploration probability ε(t) improves the system's adaptability to environmental changes. Tests show that this method improves the system performance evaluation accuracy to 95%, parameter adjustment efficiency by 55%, strategy optimization convergence speed by 60%, and overall system performance by 40%.
[0159] According to one aspect of this application, step S43 specifically comprises:
[0160] Step S431: Read the anomaly score value A(t) from the temporary calculation result storage area; construct a multi-dimensional early warning indicator, including:
[0161] Calculate the trend term gt = (A(t)-A(t-1)) / Δt;
[0162] Calculate the cumulative term It = ∑A(τ)dτ, τ∈[tT,t];
[0163] Calculate the fluctuation term vt = std(A(τ)), τ∈[tT,t];
[0164] Store the early warning feature vector w(t) = [A(t), gt, It, vt] in the temporary calculation result storage area;
[0165] Step S432: Read the early warning feature vector w(t) from the temporary calculation result storage area; construct the combined early warning function, including:
[0166] Calculate the feature weight αi = softmax(si), where si is the importance score of feature i;
[0167] Calculate the combined early warning index W(t) = ∑αi•wi(t) + β•∏wi(t);
[0168] Store the combined early warning index W(t) in the temporary calculation result storage area;
[0169] Step S433: Read the combined early warning index W(t) from the temporary calculation result storage area; execute the hierarchical early warning, including:
[0170] For each warning level threshold hk: if W(t) > hk, then trigger a level k warning, and record the trigger time and duration;
[0171] Generate an early warning event e(t) = [level, W(t), duration], and store the early warning event e(t) in the temporary calculation result storage area;
[0172] Step S434: Read the early warning event e(t) from the temporary calculation result storage area; select an emergency response plan, including:
[0173] Calculate the recovery time estimate: Tr(r) = f(e(t),r); Calculate the execution cost: Cr(r) = g(e(t),r); Optimization objective: r* = argmin[Tr(r) + ω•Cr(r)]; Generate the execution schedule;
[0174] The optimal emergency response plan r* is output and stored in the system data cache.
[0175] In this embodiment, the characters are explained as follows: k(t) is the performance index value at time t; δs(t) is the short-term trend change rate; δm(t) is the medium-term trend change rate; w is the medium-term trend calculation window size; A(t) is the abnormal score value at time t; v(t) is the performance state vector; r(t) is the reward signal, with a value of 0 or 1; E(t) is the strategy effectiveness index at time t; at is the success rate parameter of the Beta distribution; bt is the failure rate parameter of the Beta distribution; μt is the expected value at time t; θt is the parameter value obtained by Thompson sampling; ε0 is the initial exploration probability; λt is the time-varying decay rate; ε(t) is the actual exploration probability at time t; Σt is the covariance matrix of parameter perturbation; Δθ is the parameter perturbation vector; θ* is the historical optimal parameter. Value; A(t) is the anomaly score value at time t; gt is the rate of change of the anomaly score (trend term); Δt is the time interval; It is the cumulative amount of the anomaly score; T is the size of the historical window; vt is the standard deviation of the anomaly score (fluctuation term); w(t) is the warning feature vector; αi is the weight coefficient of the i-th feature; si is the importance score of the i-th feature; β is the feature interaction term coefficient; W(t) is the combined warning index value; hk is the threshold of the k-th warning level; e(t) is the warning event, including level, index value and duration; Tr(r) is the expected recovery time of scheme r; Cr(r) is the execution cost of scheme r; ω is the execution cost weight; r* is the optimal emergency response scheme; f(e,r) is the recovery time estimation function; g(e,r) is the execution cost calculation function.
[0176] In this embodiment, fault warning and emergency response of the system are realized by establishing multi-dimensional early warning indicators and combined early warning functions. This step combines the trend term gt, the cumulative term It, and the fluctuation term vt to construct a comprehensive early warning feature vector. In the design of the early warning mechanism, the feature weights are dynamically adjusted through a soft maximization function, which improves the accuracy and timeliness of the early warning. In particular, in the selection of emergency response schemes, rapid and low-cost fault recovery is achieved by considering the weighted optimization of recovery time Tr and execution cost Cr. At the same time, a more refined fault handling strategy is provided through a hierarchical early warning mechanism and the tracking of the duration of early warning events. Experimental results show that this method achieves a fault prediction accuracy of 93%, increases the early warning time by 65%, shortens the fault recovery time by 58%, improves system availability by 45%, and reduces the false alarm rate by 70%.
[0177] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the protection scope of the present invention.
Claims
1. A multi-level heterogeneous memory collaborative scheduling method for large decision-making models, characterized in that, Includes the following steps: Step S1: Read the hardware configuration information H of the heterogeneous memory system from the pre-stored configuration database; read the initial status information S of the heterogeneous memory system from the system monitoring module; The hardware configuration information H and the initial state information S are stored in the system temporary cache; wherein, the hardware configuration information H includes the capacity value, bandwidth value and access latency value of each memory level; the initial state information S includes the current usage, current access frequency and current power consumption value of each memory level; Step S2: Read and based on hardware configuration information H and initial state information S, obtain the basic parameters of each level of memory and construct the hierarchical topology relationship, analyze dynamic memory access characteristics, establish a memory performance model, fuse feature information to generate state representation, and output the first dataset; the first dataset includes the memory hierarchical topology T, the inter-layer distance matrix D, the set of real-time state vectors of each layer of memory {si} and the historical feature dataset of each layer of memory {Φ(b)}. Step S3: Read and analyze the workload characteristics based on the first dataset, generate a resource allocation strategy, formulate a data migration scheduling scheme, comprehensively optimize the decision sequence, and output the second dataset; the second dataset includes the load characteristic prediction result L(τ), the resource allocation scheme X, the data migration scheduling scheme M, and the optimized time series decision sequence {D'(t)}. Step S4: Read and build a real-time monitoring system based on the second dataset, perform dynamic strategy optimization, implement an emergency response mechanism, establish a long-term optimization mechanism, and output the third dataset; the third dataset includes real-time performance monitoring data stream R, optimized strategy parameter set P, emergency response plan E, and long-term optimization suggestions O.
2. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 1, characterized in that, Step S2 specifically involves: Step S21: Read the hardware configuration information, create and calculate the shortest path between any two layers using the Floyd-Warshall algorithm based on the topology matrix T, and generate the inter-layer distance matrix D; Step S22: Read hardware configuration information H to determine the number of memory levels that need to be monitored; The system monitoring module obtains the actual number of memory accesses v(t) at preset time intervals Δt for each memory level; and calculates the estimated memory access frequency f(t) at the current moment. Step S23: Read the bandwidth and latency values of each layer in the hardware configuration information H, read the distance value Dij and the inter-layer bandwidth value Bij in the inter-layer distance matrix D, combine the efficiency difference between adjacent layers |Ei-Ej|, and substitute them into the affinity calculation function g(d,b,e) to obtain the layer affinity matrix A; Step S24: Read the utilization rate ui, memory access frequency estimate fi, Erlang distribution parameters ki and λi, efficiency value Ei, and affinity value Aij with other layers j for each layer i; form a historical feature dataset {Φ(b)}; combine the inter-layer distance matrix D and the historical feature dataset {Φ(b)} into the first dataset.
3. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 1, characterized in that, Step S3 specifically involves: Step S31: Read the first dataset to obtain the state vector set {si} and the historical feature dataset {Φ(b)}; calculate the load feature vector ws(t), load trend wm(t), and load upper bound prediction value L(τ); Step S32: Read the memory hierarchy topology T, inter-layer distance matrix D, load upper bound prediction value L(τ), and read the hierarchy weight θi and adjustment cost coefficient ηi; Calculate the optimal resource allocation scheme X; Step S33: Read the inter-layer distance matrix D and the resource allocation scheme X; Compute the data migration scheduling scheme M; Step S34: Read the resource allocation scheme X and the data migration scheduling scheme M; Generate an optimized time-series decision sequence {D'(t)}; combine the load upper bound prediction value L(τ), resource allocation scheme X, data migration scheduling scheme M, and the optimized time-series decision sequence {D'(t)} into a second dataset.
4. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 1, characterized in that, Step S4 specifically involves: Step S41: Read the second dataset to obtain the time-series decision sequence {D'(t)}; calculate the performance index set K, the anomaly score A(t), and the CUSUM statistic S(t); Step S42: Read the performance metric set K and the anomaly score value A(t); Calculate the overall performance metric P(t), the strategy effectiveness index E(t), and the exploration probability ε(t); Step S43: Read the anomaly score, CUSUM statistic, and warning level threshold sequence; select the optimal emergency response plan r*; Step S44: Read the comprehensive performance metric P(t), the strategy effectiveness index E(t), and the emergency response plan r*; calculate the real-time performance monitoring data stream R, the optimized strategy parameter set P, the emergency response plan E, and the long-term optimization suggestions O.
5. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 2, characterized in that, Step S21 specifically involves: Step S211: Read the capacity value Ci, bandwidth value Bi, access delay value Li, transmission bandwidth value Bij, and bandwidth utilization matrix U; Step S212: Read the capacity value Ci and current usage Mi of each memory layer i; For each memory layer i, a power consumption model is constructed based on the current memory utilization ui using a piecewise linear regression method; Step S213: Read the bandwidth utilization matrix U and the transmission bandwidth value Bij; Create and optimize an n×n dimensional memory-level topology matrix T; store the optimized topology matrix T in a temporary calculation result storage area; Step S214: Read the optimized topology matrix T; construct the distance matrix D and path matrix P; Step S215: Output the topology matrix T, inter-layer distance matrix D, power consumption model and path matrix P.
6. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 2, characterized in that, Step S22 specifically involves: Step S221: Read the actual access count sequence {v(t)} of each memory level within the time window Δt; for each memory level i, calculate the first difference d(t) on the time series; Step S222: Read the difference sequence {d(t)}; Perform outlier handling for each memory level i to obtain the processed access sequence {v'(t)} and frequency estimate {f(t)}; Step S223: Read the processed access sequence {v'(t)}; self-divide adaptive windows and calculate window statistical characteristics for each window; Step S224: Read the window statistical features, construct the log-likelihood function of the k-th order Erlang distribution; and estimate the obtained parameters k and λ. Step S225: Read Erlang distribution parameters k and λ; construct memory access pattern feature vectors and calculate feature indices.
7. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 3, characterized in that, Step S32 specifically involves: Step S321: Read the memory hierarchy topology T, inter-layer distance matrix D, and predicted upper load bound L(τ); construct the resource demand matrix R; Step S322: Read the resource requirement matrix R; construct multiple constraints; Step S323: Read the constraints and barrier functions; construct the augmented Lagrangian function; Step S324: Read the augmented Lagrangian function and gradient; execute the ADMM algorithm iteration to obtain the optimal solution x*; Step S325: Read the optimal solution x*; perform post-processing of the solution to obtain the final resource allocation scheme X.
8. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 3, characterized in that, Step S33 specifically involves: Step S331: Read the inter-layer distance matrix D and resource allocation scheme X, and construct the data block feature matrix B; Step S332: Read the feature matrix B of the data block; Construct a migration cost model; Step S333: Read the cost function parameters; construct the migration decision matrix M; Step S334: Read the migration decision matrix M; perform Pareto optimization to obtain the non-dominated solution set; Step S335: Read the non-dominated solution set S; perform solution selection and optimization to obtain the final data migration scheduling scheme.
9. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 4, characterized in that, Step S42 specifically involves: Step S421: Read the performance metric set K and the anomaly score value A(t); construct the performance state vector; Step S422: Read the performance state vector v(t); update the Beta distribution parameters; Step S423: Read the distribution parameters; perform Thompson sampling; Step S424: Read the exploration decision flag; adjust according to the decision execution parameters.
10. The multi-level heterogeneous memory collaborative scheduling method for large decision-making models according to claim 4, characterized in that, Step S43 specifically involves: Step S431: Read the anomaly score value A(t) and construct a multi-dimensional early warning indicator; Step S432: Read the early warning feature vector w(t); construct the combined early warning function; Step S433: Read the combined early warning indicator W(t); execute the tiered early warning; Step S434: Read the early warning event e(t); select an emergency response plan and optimize it, then input the optimal emergency response plan r*.
Citation Information
Patent Citations
Memory collaborative DNN hierarchical scheduling method based on edge real-time system
CN118227335A
Distributed decision-making method and system based on large model
CN118657200A