A plasma control system resource usage prediction method based on LSTM

Through the LSTM-based plasma control system resource usage prediction method, the problem of real-time monitoring of CPU and memory usage in traditional methods lacking long-term trend analysis is solved, and accurate prediction and health assessment of plasma control system resource usage are achieved, thereby improving the system's operational stability and security.

CN120234221BActive Publication Date: 2025-09-12HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510381301.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-09-12
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

Traditional health monitoring methods rely on real-time monitoring of key performance indicators such as CPU occupancy and memory usage. They lack the ability to analyze and judge the long-term changing trends of indicators, making it difficult to accurately predict abnormal resource usage in plasma control systems, especially in tasks with periodic fluctuations.

Method used

A LSTM-based plasma control system resource usage prediction method is adopted. Through data preprocessing and feature extraction, the introduction of LSTM network for time series prediction, feature embedding and feature separation, standard value prediction and memory leak detection, health index calculation and feedback adjustment, combined with the sliding window method, dynamic prediction and health assessment of system resource usage are achieved.

Benefits of technology

It significantly improves the accuracy of resource usage prediction and system health assessment, can identify memory leak trends in real time, reduce misjudgments, improve the reliability and security of system operation, and support rapid diagnosis and location of potential problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234221B_ABST
    Figure CN120234221B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of nuclear fusion tokamak device control systems, and in particular to a method for predicting resource usage of a plasma control system based on LSTM. The technical solution includes data preprocessing and feature extraction, introduction of an LSTM network for time series prediction, feature embedding and feature separation strategies, standard value prediction and memory leak detection, health index calculation and feedback adjustment, and feedback adjustment within the prediction cycle. The present invention is used to predict the standard value of resource usage during system operation, and by comparing with real-time monitoring data, determines whether resource usage deviates too much from the standard value. It can capture the long-term dependence and nonlinear variation of system resource usage, and is particularly suitable for processing complex periodic waveforms. It can not only improve the accuracy of the predicted standard value, but also more effectively evaluate the system health status and provide early warning of potential abnormal situations, providing important support for the stable operation of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of nuclear fusion tokamak device control systems, and in particular to a plasma control system resource usage prediction method based on LSTM. Background Art

[0002] With the increasing functional complexity and dynamic changes in the operating environment of plasma control systems (PCSs), real-time assessment of system health and prediction of resource usage targets have become critical to ensuring stable system operation. PCSs typically need to handle multiple real-time tasks, with varying control algorithms and functions running at different times. Resource usage, such as CPU and memory, exhibits significant dynamic characteristics. Furthermore, because many control algorithms and functions are encapsulated in a "black box" format, external systems cannot directly access the changing patterns of internal resource consumption, posing significant challenges to real-time health assessment and resource scheduling.

[0003] Traditional health monitoring methods typically rely on real-time monitoring of key performance indicators (KPIs), such as CPU occupancy and memory usage. However, these methods can only capture static data at the current moment and lack the ability to analyze and determine long-term trends in these indicators. This makes it difficult for the system to promptly predict abnormal resource usage, especially in tasks with periodic fluctuations (such as intermittent discharge patterns in PCS), where resource usage waveforms exhibit alternating busy and non-busy areas. Traditional methods, faced with such complex dynamic waveforms, struggle to provide an accurate reference standard for health assessments, which in turn affects the accuracy of health status judgments and resource scheduling.

[0004] Therefore, this application proposes a plasma control system resource usage prediction method based on LSTM. Summary of the Invention

[0005] The purpose of the present invention is to propose a plasma control system resource usage prediction method based on LSTM to address the problem that traditional health monitoring methods in the background technology usually rely on real-time monitoring of key performance indicators (KPIs) such as CPU occupancy and memory usage, and lack the ability to analyze and judge the long-term trend of indicators.

[0006] The technical solution of the present invention is a plasma control system resource usage prediction method based on LSTM, comprising the following steps:

[0007] Data preprocessing and feature extraction: Collect and process the plasma control system operation data, select characteristic indicators that reflect the system operation status and perform standardization;

[0008] Introducing LSTM networks for time series forecasting: Build an LSTM model, train the model using historical data to predict standard resource usage values ​​at future points, and enhance model adaptability through a sliding window approach.

[0009] Embedding features and feature separation strategy: Generate embedding vectors for system states and separate memory waveforms into busy and non-busy categories;

[0010] Standard value prediction and memory leak detection: This system collects system operation data in real time, applies the LSTM model to predict future resource usage standard values, and calculates and monitors the difference between the actual memory waveform and the predicted standard value, as well as the increment, to detect memory leaks.

[0011] Health index calculation and feedback adjustment: Calculate the system health index based on actual differences, introduce a time decay factor, and adjust the health index when a memory leak is detected;

[0012] Feedback adjustment within the prediction cycle: Based on the memory leak detection results, feedback adjustment is performed on the prediction input, and cyclic prediction is performed at a certain time step.

[0013] Optionally, the data preprocessing and feature extraction specifically include:

[0014] Collect data: Collect time series data on CPU usage and memory allocation during system operation to ensure that the data includes resource consumption under different system operation states;

[0015] Feature selection: Select characteristic indicators that reflect the system's operating status. The characteristic indicators include:

[0016] Algorithm type: the type of control algorithm currently running;

[0017] Trigger state: the state of the system under different trigger conditions;

[0018] Operation phase: the operation phase of the control system; the operation phase includes initialization, operation, and pause;

[0019] Dynamic resource utilization: includes historical CPU usage and memory allocation dynamic changes in resource utilization data;

[0020] Standardization: Standardize the input features to eliminate scale differences between different features and ensure the stability and efficiency of model training.

[0021] Optionally, the introducing of the LSTM network for time series prediction specifically includes:

[0022] Model structure determination: Build an LSTM model, set the input window to 200 time steps, and use the previous step's CPU usage, memory allocation, and current system status as input features.

[0023] Time series learning: The LSTM model is trained using historical data. The model learns the relationship between different system operation stages and resource usage to predict standard resource usage values ​​at future time points. Standard resource usage values ​​include standard CPU usage and standard memory values.

[0024] Model training: Using the sliding window method, the training data is divided into multiple small windows to cover all possible operating states and enhance the model's adaptability to resource fluctuations.

[0025] Optionally, the feature embedding and feature separation strategy specifically includes the following steps:

[0026] Embedded features: Statistical analysis of system status is performed to generate embedded vectors to replace traditional digital codes. System status includes algorithm type and trigger status.

[0027] Feature separation: The memory waveform exhibits obvious square wave characteristics. The memory usage rate is separated into busy and non-busy areas, and each area is used as an independent input feature for LSTM model learning. The memory waveform exhibits obvious square wave characteristics, with busy and non-busy areas alternating.

[0028] Optionally, the standard value prediction steps are as follows:

[0029] Real-time data collection: During system operation, data on CPU usage and memory allocation resources are collected in real time to form a time series.

[0030] LSTM prediction model application: Use a trained LSTM network model to predict system resource usage over a period of time (e.g., 10 seconds). The LSTM model predicts standard CPU usage and memory allocation values ​​at future points based on historical data, including CPU usage, memory usage, and control algorithm type.

[0031] Input features: These include the current control algorithm type, trigger status, and system status characteristics during operation. Combined with the CPU and memory usage information from the previous moment, these features provide sufficient context for the LSTM model.

[0032] Prediction process: The temporal relationship learned by the LSTM model during training is used to predict the standard value M of resource usage in the future. p (t), the resource usage standard value includes the standard memory value and the standard CPU occupancy rate;

[0033] Standard value output: the standard value M output by the LSTM model p (t) is the “ideal” value of future resource usage inferred by the model based on historical data. The standard value serves as a benchmark for health assessment and is used to compare with actual memory usage data.

[0034] Optionally, the memory leak detection specifically includes the following steps:

[0035] Compare to actual memory usage:

[0036] Get actual memory usage data: real-time monitoring of the system's actual memory waveform M r (t), which is the current memory usage of the system;

[0037] Calculate the difference: Calculate the actual memory waveform M r (t) and the predicted standard value M p The difference between (t), i.e.

[0038] D(t)=|M r (t)-M p (t)|

[0039] Where D(t) is the difference value at the current time point t, which represents the deviation between the actual memory usage and the predicted standard value;

[0040] Difference increment calculation:

[0041] Calculate the difference increment ΔD(t): To detect the occurrence of memory leaks, it is necessary to calculate the rate of change of the difference D(t), that is, the difference increment ΔD(t) = diff(D(t)). diff(D(t)) is the difference increment calculated as the difference value D(t) changes over time, reflecting the change in the deviation between the actual memory usage and the standard value;

[0042] Memory leak detection:

[0043] Determine whether the difference increment exceeds the threshold: If the difference increment ΔD(t)>leakageThreshold, it is considered that a memory leak has occurred. The threshold is determined by experimental data or experience, indicating that the deviation between the actual memory usage and the predicted value increases too quickly, indicating that there may be a resource leak;

[0044] Memory leak status setting: At this time, the memory leak status is set to

[0045]

[0046] Here, isLeakage(t)=1 indicates that the system has detected a memory leak, and isLeakage(t)=0 indicates that no memory leak has been detected.

[0047] Optionally, the health index calculation and feedback adjustment specifically include the following steps:

[0048] Calculate the health index. In the LSTM-based plasma control system resource usage prediction method, the health index of the system needs to be calculated based on the actual difference, which is defined as:

[0049]

[0050] The health index H(t) indicates the health of the system. The smaller the difference D(t), the higher the health index. The health index H(t) is used to evaluate the health of system resource usage in real time.

[0051] Introduce the time decay factor to simulate the decay of health status over time. Introduce the time decay factor Where τ is the decay constant, which controls the decay rate; this decay factor ensures that the health status gradually decreases over time, avoiding overly high health assessments for long periods of time.

[0052] The health index is adjusted in the memory leak state. If a memory leak is detected, that is, isLeakage(t) = 1, the health index will drop rapidly. The health index will be multiplied by the attenuation factor to indicate the rapid deterioration of the system health status. The calculation formula is:

[0053]

[0054] in, The health index after time decay is introduced to indicate the rapid decline of system health status in the case of memory leak.

[0055] Optionally, the feedback adjustment within the prediction period specifically includes the following steps:

[0056] Feedback adjustment: If the system does not detect a memory leak, the actual memory waveform M is used r (t) as input, continue to predict the standard value at the next time point, if a memory leak is detected, the predicted standard memory waveform M p (t) is used as the input for the next cycle without using the actual memory waveform M r (t);

[0057] Cyclic Forecasting: The forecast cycle will iterate the forecast in 10-second and 20-second time steps to continuously monitor the health status and resource usage of the system.

[0058] Compared with the prior art, this application has at least one of the following beneficial technical effects:

[0059] By introducing LSTM, we effectively capture the long-term dependencies and dynamic changes in resource usage within PCS. Combining embedded features with feature separation strategies significantly improves the accuracy of CPU utilization and memory allocation predictions, particularly for complex periodic waveforms.

[0060] By comparing predicted resource usage standards with actual values ​​in real time, we can accurately determine the health of the system. Combined with the time-decay mechanism of the health index, this makes the dynamic changes in the system's health status more intuitive, enabling rapid diagnosis and location of potential issues.

[0061] The proposed memory leak detection algorithm identifies memory leak trends in real time by calculating the difference between actual and standard values, as well as the incremental difference. This method effectively avoids misjudgments caused by resource fluctuations and improves the sensitivity and reliability of system fault detection.

[0062] Through the feedback adjustment mechanism, when a memory leak occurs, the predicted standard value is used instead of the actual value as the input of the next cycle, preventing the negative impact of memory leaks on model predictions and maintaining the efficiency and accuracy of resource usage predictions.

[0063] The sliding window method and multi-stage training data enhance the LSTM model's adaptability to different scenarios during PCS operation. Whether it is initialization, operation or abnormal phase, the technical solution of the present invention can effectively cope with it.

[0064] Through real-time feedback of health index and memory leak detection results, the system can identify and respond to potential risks at an early stage, reduce system interruptions or experimental delays caused by failures, and improve the reliability and security of system operation.

[0065] The technical solution of the present invention is not only applicable to the prediction of CPU occupancy and memory allocation, but can also be extended to other resources, providing a universal solution for overall system resource optimization and health assessment.

[0066] This method is used to predict the standard value of resource usage during system operation and, by comparing it with real-time monitoring data, determine whether resource usage deviates significantly from the standard value. By learning from historical operational data, the LSTM network can capture the long-term dependencies and nonlinear variations in system resource usage, making it particularly suitable for processing complex periodic waveforms. Furthermore, this method, combining embedded features with feature separation strategies, not only improves the accuracy of predicted standard values ​​but also enables more effective assessment of system health and early warning of potential anomalies, providing important support for the system's stable operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1Comparison between predicted waveform and actual waveform - Comparison chart of predicted and actual memory usage waveform;

[0068] Figure 2 Comparison between predicted waveform and actual waveform - mean absolute error curve of different predictions;

[0069] Figure 3 Comparison between predicted waveform and actual waveform - mean square error curve of different predictions;

[0070] Figure 4 Comparison between predicted waveform and actual waveform - determination coefficient curves of different predictions;

[0071] Figure 5 Comparison of 10-second predicted waveform and actual waveform - CPU usage: 10-second prediction accuracy chart;

[0072] Figure 6 Comparison of 10-second predicted waveform and actual waveform - Memory usage: 10-second prediction accuracy graph. DETAILED DESCRIPTION

[0073] The technical solution of the present invention is further described below with reference to the accompanying drawings and specific embodiments.

[0074] Example 1

[0075] like Figure 1 As shown, the present invention proposes a plasma control system resource usage prediction method based on LSTM, including data preprocessing and feature extraction, introduction of LSTM network for time series prediction, feature embedding and feature separation strategy, standard value prediction and memory leak detection, health index calculation and feedback adjustment and feedback adjustment within the prediction cycle. Each step is described in detail below.

[0076] Step 1: Data preprocessing and feature extraction

[0077] Before model training, the system's historical operating data must be preprocessed. The specific steps are as follows:

[0078] 1. Data collection: Collect time series data on resource usage such as CPU usage and memory allocation during system operation to ensure that the data includes resource consumption under different system operation states.

[0079] 2. Feature selection: Select characteristic indicators that reflect the system operation status, mainly including:

[0080] Algorithm type: The type of control algorithm currently running.

[0081] Trigger state: The state of the system under different trigger conditions.

[0082] Operation phase: The operation phase of the control system (including initialization, operation, and pause).

[0083] Dynamic resource utilization: includes historical CPU usage and memory allocation, and other dynamically changing resource utilization data.

[0084] Standardization: Standardize the input features to eliminate scale differences between different features and ensure the stability and efficiency of model training.

[0085] Step 2: Introduce LSTM network for time series prediction

[0086] After data preprocessing and feature extraction, a long short-term memory (LSTM) network is used to predict the system's CPU usage and memory allocation. LSTM is suitable for processing time series data and can capture long-term dependencies in the data. The specific steps are as follows:

[0087] 1. Determine the model structure: Build an LSTM model and set the input window to 200 time steps. The input features of the model include the CPU usage, memory allocation, and current system status of the previous step.

[0088] 2. Time Series Learning: The LSTM model is trained using historical data. The model learns the relationship between different system operation stages and resource usage, and predicts the standard resource usage values ​​(such as standard CPU usage and standard memory value) at future time points.

[0089] 3. Model training: Using the sliding window method, the training data is divided into multiple small windows to cover all possible operating states and enhance the model's adaptability to resource fluctuations.

[0090] Step 3: Embedding features and feature separation strategy

[0091] In order to further improve the prediction accuracy, this paper introduces the following feature embedding and feature separation strategies into the LSTM model:

[0092] 1. Embedded Features: Statistical analysis of system states (such as algorithm type and trigger status) generates embedded vectors instead of traditional digital codes. These embedded vectors have physical meaning and can better reflect resource usage characteristics, thereby improving the model's ability to model the nonlinear relationship between system state and resource usage.

[0093] 2. Feature Separation: Given the distinct square wave characteristics of memory waveforms (i.e., alternating busy and non-busy areas), we separate the memory usage into busy and non-busy areas, using each as independent input features for the LSTM model. This separation method effectively reduces the interference from resource usage fluctuations at different stages and improves the model's predictive capabilities for complex waveforms.

[0094] Step 4: Standard value prediction and memory leak detection

[0095] The standard value prediction and memory leak detection in this invention compares the output of the LSTM prediction model with actual memory usage to determine whether the system has a memory leak. This process is divided into the following steps, aiming to improve the accuracy of memory usage prediction and detect potential memory leaks in the system by comparing the difference between the predicted standard value and the actual value.

[0096] 1Standard value prediction:

[0097] Real-time data collection: During system operation, resource usage data such as CPU usage and memory allocation are collected in real time to form a time series.

[0098] LSTM prediction model application: Use a trained LSTM network model to predict system resource usage over a period of time. Specifically, the LSTM model uses historical data (such as CPU utilization, memory usage, and control algorithm type characteristics) to predict standard CPU utilization and memory allocation values ​​over a period of time (e.g., 10 seconds).

[0099] Input features: These include the current control algorithm type, trigger status, and system status characteristics during operation. Combined with the CPU and memory usage information from the previous moment, they provide sufficient contextual information for the LSTM model.

[0100] Prediction process: The temporal relationship learned by the LSTM model during training is used to predict the standard value M of resource usage in the future. p (t) (standard memory value and standard CPU usage).

[0101] Standard value output: the standard value M output by the LSTM model p (t) is the “ideal” value of future resource usage inferred by the model based on historical data. These standard values ​​serve as a benchmark for health assessment and are used to compare with actual memory usage data.

[0102] 2Compare with actual memory usage

[0103] Get actual memory usage data: real-time monitoring of the system's actual memory waveform M r (t), which is the current memory usage of the system.

[0104] Calculate the difference: Calculate the actual memory waveform M r (t) and the predicted standard value M p (t), namely:

[0105] D(t)=|Mr (t)-M p (t)|

[0106] Where D(t) is the difference value at the current time point t, which represents the deviation between the actual memory usage and the predicted standard value.

[0107] 3Difference increment calculation

[0108] Calculate the difference increment ΔD(t): In order to detect the occurrence of memory leaks, it is necessary to calculate the rate of change of the difference D(t), that is, the difference increment:

[0109] ΔD(t)=diff(D(t))

[0110] Here, diff(D(t)) is the difference increment calculated by the difference value D(t) over time, reflecting the change in the deviation between the actual memory usage and the standard value.

[0111] 4Memory Leak Detection

[0112] Determine whether the difference increment exceeds the threshold: If the difference increment ΔD(t) > leakageThreshold, a memory leak is considered to have occurred. This threshold is determined by experimental data or experience and indicates that the deviation between actual memory usage and the predicted value is increasing too quickly, indicating a possible resource leak.

[0113] At this point, the memory leak status isLeakage(t) is set to:

[0114]

[0115] Here, isLeakage(t)=1 indicates that the system has detected a memory leak, and isLeakage(t)=0 indicates that no memory leak has been detected.

[0116] Step 5: Health Index Calculation and Feedback Adjustment

[0117] Calculate the health index H(t): Calculate the health index of the system based on the actual difference D(t), which is defined as:

[0118]

[0119] The health index H(t) indicates the health of the system. The smaller the difference D(t), the higher the health index. This index is used to evaluate the health of system resource usage in real time.

[0120] Introducing time decay factor: To simulate the decay of health status over time, a time decay factor is added Where τ is the decay constant, which controls the decay rate. This decay factor ensures that the health status gradually decreases over time, avoiding excessively high health assessments for too long.

[0121] Health Index Adjustment in Memory Leakage State: If a memory leak is detected (i.e., isLeakage(t) = 1), the health index will drop rapidly. At this point, the health index will be multiplied by a decay factor to indicate the rapid deterioration of the system's health:

[0122]

[0123] in, The health index after time decay is introduced to indicate the rapid decline of system health status in the case of memory leak.

[0124] Step 6: Feedback Adjustment During the Forecast Cycle

[0125] Feedback adjustment: If the system does not detect a memory leak, the actual memory waveform M is used r (t) as input, and continue to predict the standard value at the next time point. If a memory leak is detected, the predicted standard memory waveform M p (t) is used as the input for the next cycle without using the actual memory waveform M r (t). This feedback mechanism can prevent memory leaks from adversely affecting future predictions and ensure the accuracy of system health assessments.

[0126] Cyclic Forecasting: The forecast cycle will iterate the forecast in 10-second and 20-second time steps to continuously monitor the health status and resource usage of the system.

[0127] The present invention uses LSTM to dynamically predict the standard values ​​of CPU occupancy and memory allocation in the PCS. The LSTM network has the ability to process time series data and can accurately capture the long-term dependencies and dynamic changes in resource usage, providing a benchmark reference for health assessment. This method significantly improves the accuracy and real-time performance of resource usage predictions in complex operating environments. A memory leak detection method based on standard value prediction is proposed. By calculating the difference between the actual resource usage value and the predicted standard value, as well as the difference increment, it is quickly determined whether the system has a memory leak problem. This method can track the dynamic trend of memory leaks in real time, improving the accuracy of system fault detection.

[0128] This paper introduces a time decay factor to dynamically adjust the health index, simulating how the system's health status changes over time. When a memory leak is detected, the health index drops rapidly, intuitively reflecting the deterioration of the system's health and enabling operations and maintenance personnel to respond quickly. A feature embedding and separation strategy is proposed for processing the waveform characteristics of memory allocation. By embedding features, the ability to model the nonlinear relationship between system status and resource usage is enhanced. A method for separating features between busy and non-busy areas is also employed to effectively reduce the interference of resource fluctuations during different operating phases, further improving prediction accuracy.

[0129] This paper introduces a feedback mechanism that dynamically adjusts prediction inputs based on memory leak detection results to ensure the accuracy of future predictions. By using actual values ​​as the next cycle input when there are no memory leaks and using standard values ​​when a memory leak occurs, we prevent memory leaks from affecting model performance.

[0130] In order to verify the technical effect of the present invention, an experimental verification was carried out

[0131] 1. Verification of Model Prediction Accuracy

[0132] The optimized model accurately predicted PCS memory allocation and CPU utilization in the experiment. In the comparative experiment, the basic model, the enhanced embedded model, and the final optimized model were used for prediction. The specific steps are as follows:

[0133] Experimental design:

[0134] Select the memory allocation and CPU utilization time series data generated during PCS operation.

[0135] The base model, the enhanced embedding model, and the final optimized model are applied to the same test dataset.

[0136] Compare the deviations between the predicted values ​​of the three models and the actual values.

[0137] Experimental results:

[0138] like Figure 1 The prediction results of the base model, the enhanced embedding model, and the final optimized model are shown.

[0139] The red curve represents the actual memory usage value.

[0140] The blue curve is the prediction result of the basic model, which has a large deviation.

[0141] The yellow curve is the prediction result of the enhanced embedding model, which shows improved accuracy.

[0142] The purple curve is the prediction result of the final optimization model, which is highly consistent with the actual value.

[0143] The results show that the final optimized model significantly reduces the deviation and meets the prediction accuracy requirements of PCS.

[0144] Performance evaluation:

[0145] Compare the predicted waveform with the actual waveform and calculate the mean square error (MSE), mean absolute error (MAE) and fractional quantization model performance (R 2 ).

[0146] The experimental results are as follows Figure 1-Figure 4 As shown in Figure 2, the final optimized model has the highest degree of fit to the actual waveform. The final optimized model has the lowest MSE and MAE, and R 2 The score was the highest, validating its excellent predictive ability.

[0147] 2. Verification of short-term forecasting ability

[0148] In this experiment, we verify the model's ability to predict resource usage in the short term. The specific steps are as follows:

[0149] Prediction method:

[0150] Set the prediction window length to 200 seconds and use time series data to predict memory allocation and CPU utilization in the next 10 seconds.

[0151] After each prediction, the predicted value is used as the input for the next round of prediction, and the process is repeated 10 times.

[0152] The sliding window moves forward 1 second each time, and the above process is repeated to generate prediction results covering multiple time periods.

[0153] The experimental results are as follows Figure 5 、 Figure 6 The figure shows the model's predicted memory allocation and CPU utilization within a 10-second prediction range, which are highly consistent with the actual values. Experiments have proven that the model can effectively capture dynamic changes in system operation and provide accurate benchmark values ​​for health assessment.

[0154] The present invention has the following effects:

[0155] 1. Improve prediction accuracy:

[0156] By introducing LSTM, we effectively capture the long-term dependencies and dynamic changes in resource usage within PCS. Combining embedded features with feature separation strategies significantly improves the accuracy of CPU utilization and memory allocation predictions, particularly for complex periodic waveforms.

[0157] 2. Implement dynamic health assessment:

[0158] By comparing predicted resource usage standards with actual values ​​in real time, we can accurately determine the health of the system. Combined with the time-decay mechanism of the health index, this makes the dynamic changes in the system's health status more intuitive, enabling rapid diagnosis and location of potential issues.

[0159] 3. Real-time and accurate memory leak detection:

[0160] The proposed memory leak detection algorithm identifies memory leak trends in real time by calculating the difference between actual and standard values, as well as the incremental difference. This method effectively avoids misjudgments caused by resource fluctuations and improves the sensitivity and reliability of system fault detection.

[0161] 4. Reduce the impact of system anomalies on predictions:

[0162] Through the feedback adjustment mechanism, when a memory leak occurs, the predicted standard value is used instead of the actual value as the input of the next cycle, preventing the negative impact of memory leaks on model predictions and maintaining the efficiency and accuracy of resource usage predictions.

[0163] 5. Enhance the adaptability and versatility of the model:

[0164] The sliding window method and multi-stage training data enhance the LSTM model's adaptability to different scenarios during PCS operation. Whether it is initialization, operation or abnormal phase, the technical solution of the present invention can effectively cope with it.

[0165] 6. Improve system operation stability and security:

[0166] Through real-time feedback of health index and memory leak detection results, the system can identify and respond to potential risks at an early stage, reduce system interruptions or experimental delays caused by failures, and improve the reliability and security of system operation.

[0167] 7. Support multi-dimensional resource evaluation and optimization:

[0168] The technical solution of the present invention is not only applicable to the prediction of CPU occupancy and memory allocation, but can also be extended to other resources (such as network bandwidth, disk occupancy, etc.), providing a universal solution for overall system resource optimization and health assessment.

[0169] The above specific embodiments are merely several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant inspirations of the above embodiments, those skilled in the art may make various alternative improvements and combinations to the above specific embodiments.

Claims

1. A plasma control system resource usage prediction method based on LSTM, characterized in that: The following steps are involved: Data preprocessing and feature extraction: Collect and process the plasma control system operating data, select characteristic indicators that reflect the system operating status and perform standardization, including: Collect data: Collect time series data on CPU usage and memory allocation during system operation to ensure that the data includes resource consumption under different system operation states; Feature selection: Select characteristic indicators that reflect the system's operating status. The characteristic indicators include: Algorithm type: the type of control algorithm currently running; Trigger state: the state of the system under different trigger conditions; Operation phase: the operation phase of the control system; Dynamic resource utilization: includes historical CPU usage and memory allocation dynamic changes in resource utilization data; Standardization: Standardize the input features to eliminate scale differences between different features; Introducing LSTM networks for time series forecasting: Build an LSTM model, train the model using historical data to predict standard resource usage values ​​at future points, and enhance model adaptability through a sliding window approach. Embedding feature and feature separation strategy: Generate an embedding vector for the system state and separate the memory waveform into busy and non-busy categories. The specific steps include: Embedded features: Statistical analysis of system status is performed to generate embedded vectors to replace traditional digital codes. System status includes algorithm type and trigger status. Feature separation: Memory waveforms exhibit obvious square wave characteristics. Memory occupancy is separated into busy and non-busy areas, and each is used as an independent input feature for LSTM model learning. The memory waveform exhibits obvious square wave characteristics, with busy and non-busy areas alternating. Standard value prediction and memory leak detection: This system collects system operation data in real time, applies the LSTM model to predict future resource usage standard values, and calculates and monitors the difference between the actual memory waveform and the predicted standard value, as well as the increment, to detect memory leaks. Health index calculation and feedback adjustment: Calculate the system health index based on actual differences, introduce a time decay factor, and adjust the health index when a memory leak is detected; Feedback adjustment within the prediction cycle: Based on the memory leak detection results, feedback adjustment is performed on the prediction input, and cyclic prediction is performed at a certain time step.

2. The plasma control system resource usage prediction method based on LSTM according to claim 1, characterized in that: The introduction of the LSTM network for time series prediction specifically includes: Model structure determination: Build an LSTM model, set the input window to 200 time steps, and use the previous step's CPU usage, memory allocation, and current system status as input features. Time series learning: Use historical data to train the LSTM model. The model learns the relationship between different system operation stages and resource usage, and predicts the standard value of resource usage at future time points. Model training: Using the sliding window method, the training data is divided into multiple small windows to cover all possible operating states.

3. The plasma control system resource usage prediction method based on LSTM according to claim 1, characterized in that: The standard value prediction steps are as follows: Real-time data collection: During system operation, data on CPU usage and memory allocation resources are collected in real time to form a time series. LSTM prediction model application: Use the trained LSTM network model to predict the system's resource usage over a period of time. The LSTM model predicts the standard CPU usage and memory allocation values ​​at a future point in time based on historical data, including CPU usage, memory usage, and control algorithm type. Input features: These include the current control algorithm type, trigger status, and system status characteristics during operation. Combined with the CPU and memory usage information from the previous moment, these features provide sufficient context for the LSTM model. Prediction process: The temporal relationship learned by the LSTM model during training is used to predict the standard value M of resource usage in the future. p (t), the resource usage standard value includes the standard memory value and the standard CPU occupancy rate; Standard value output: the standard value M output by the LSTM model p (t) is the "ideal" value of future resource usage inferred by the model based on historical data. The standard value serves as a benchmark for health assessment and is used to compare with actual memory usage data.

4. The plasma control system resource usage prediction method based on LSTM according to claim 3 is characterized in that: The memory leak detection specifically includes the following steps: Compare to actual memory usage: Get actual memory usage data: real-time monitoring of the system's actual memory waveform M r (t), which is the current memory usage of the system; Calculate the difference: Calculate the actual memory waveform M r (t) and the predicted standard value M p (t), i.e. D(t)=|M r (t)-M p (t)| Where D(t) is the difference value at the current time point t, which represents the deviation between the actual memory usage and the predicted standard value; Difference increment calculation: Calculate the difference increment ΔD(t): To detect the occurrence of memory leaks, it is necessary to calculate the rate of change of the difference D(t), that is, the difference increment ΔD(t) = diff(D(t)). diff(D(t)) is the difference increment calculated as the difference value D(t) changes over time, reflecting the change in the deviation between the actual memory usage and the standard value; Memory leak detection: Determine whether the difference increment exceeds the threshold: If the difference increment ΔD(t)>leakageThreshold, it is considered that a memory leak has occurred. The threshold is determined by experimental data or experience, indicating that the deviation between the actual memory usage and the predicted value increases too quickly, indicating that there may be a resource leak; Memory leak status setting: At this time, the memory leak status is set to Here, isLeakage(t)=1 indicates that the system has detected a memory leak, and isLeakage(t)=0 indicates that no memory leak has been detected.

5. The plasma control system resource usage prediction method based on LSTM according to claim 1, characterized in that: The health index calculation and feedback adjustment specifically include the following steps: Calculate the health index. In the LSTM-based plasma control system resource usage prediction method, the health index of the system needs to be calculated based on the actual difference, which is defined as: The health index H(t) indicates the health of the system. The smaller the difference D(t), the higher the health index. The health index H(t) is used to evaluate the health of system resource usage in real time. Introduce the time decay factor to simulate the decay of health status over time. Introduce the time decay factor Where τ is the decay constant, which controls the decay rate; The health index is adjusted in the memory leak state. If a memory leak is detected, that is, isLeakage(t) = 1, the health index will drop rapidly. The health index will be multiplied by the attenuation factor to indicate the rapid deterioration of the system health status. The calculation formula is: in, The health index after time decay is introduced to indicate the rapid decline of system health status in the case of memory leak.

6. The plasma control system resource usage prediction method based on LSTM according to claim 1, characterized in that: The feedback adjustment within the prediction period specifically includes the following steps: Feedback adjustment: If the system does not detect a memory leak, the actual memory waveform M is used r (t) as input, continue to predict the standard value at the next time point, if a memory leak is detected, the predicted standard memory waveform M p (t) is used as the input for the next cycle without using the actual memory waveform M r (t); Cyclic Forecasting: The forecast cycle will iterate the forecast in 10-second and 20-second time steps to continuously monitor the health status and resource usage of the system.

Citation Information

Patent Citations

  • Automated scaling of resources based on LSTM-RNN and attention mechanisms

    CN112015543A

  • CPU resource load condition prediction method based on LSTM

    CN113626177A