Resource scheduling method and device of electric power target range simulation system and computer equipment

By using historical operation data in the power range simulation system to train the resource demand prediction model and generate pre- and dynamic scheduling solutions, the problem that traditional resource scheduling methods are difficult to cope with dynamic load changes is solved, and the accuracy of resource scheduling and system operation efficiency are improved.

CN119759544AActive Publication Date: 2025-04-04ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510226989.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-04-04
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

Traditional resource scheduling methods are difficult to cope with the challenges brought by dynamic load changes and multi-task concurrency in power range simulation systems, resulting in poor accuracy of resource scheduling and reducing the operating efficiency and stability of the simulation system.

Method used

By obtaining the historical operation data of the power range simulation system, the target resource demand prediction model is trained to characterize the mapping relationship between the operation data and resource demand prediction information. When the preset prediction condition is triggered, the current running data is input to the prediction model to generate a resource pre-scheduling scheme, and when the preset threshold condition is monitored, a resource dynamic scheduling scheme is generated.

Benefits of technology

The resource scheduling accuracy and real-time response capabilities of the power range simulation system are improved, ensuring that resources can be allocated reasonably on demand and priorities, avoid resource waste, improve resource utilization, and improve system operation efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759544A_ABST
    Figure CN119759544A_ABST
Patent Text Reader

Abstract

The invention relates to a resource scheduling method and device of an electric power target range simulation system and computer equipment. The method comprises the following steps: acquiring historical operation data of an electric power target range simulation system, and training by adopting the historical operation data to obtain a target resource demand prediction model; under the condition that a preset prediction condition is triggered, inputting current operation data of the electric power target range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power target range simulation system; according to the resource demand prediction information and the current operation data, generating and executing a resource pre-scheduling scheme for a system operation task of the electric power target range simulation system; and in the process of executing the resource pre-scheduling scheme, under the condition that the current operation data of the electric power target range simulation system is monitored to meet a preset threshold condition, generating and stopping executing the resource pre-scheduling scheme, and executing the resource dynamic scheduling scheme. By adopting the method, the resource scheduling accuracy of the electric power target range simulation system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of resource scheduling, and in particular to a resource scheduling method, device, computer equipment, computer-readable storage medium and computer program product for a power range simulation system. Background Art

[0002] As an important tool for power system testing and optimization, the power range simulation system is widely used in power grid dispatch optimization, equipment performance verification and fault response simulation.

[0003] As the complexity of simulation tasks increases, the competitiveness of multi-task resources in the system becomes increasingly prominent. However, traditional resource scheduling methods rely on preset rules or fixed resource allocation modes, which are difficult to cope with the challenges brought by dynamic load changes and multi-task concurrency. Especially during the simulation process, the resource requirements of different tasks are multi-dimensionally different, resulting in poor accuracy of resource scheduling, thereby reducing the operating efficiency and stability of the simulation system. Summary of the invention

[0004] Based on this, it is necessary to provide a resource scheduling method, device, computer equipment, computer-readable storage medium and computer program product for an electric power range simulation system that can improve the resource scheduling accuracy of the electric power range simulation system in response to the above technical problems.

[0005] In a first aspect, the present application provides a resource scheduling method for an electric power range simulation system, comprising:

[0006] Acquire historical operation data of the power range simulation system, and use the historical operation data to train a target resource demand prediction model; the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information;

[0007] In the case of triggering a preset prediction condition, inputting the current operation data of the electric power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system;

[0008] Generate a resource pre-scheduling plan for the system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data, and execute the resource pre-scheduling plan;

[0009] During the execution of the resource pre-scheduling plan, if it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions, a resource dynamic scheduling plan is generated, the execution of the resource pre-scheduling plan is stopped, and the resource dynamic scheduling plan is executed.

[0010] In one embodiment, the current operation data of the electric power range simulation system is input into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system, including:

[0011] Inputting the current operation data of the electric power range simulation system into the target resource demand prediction model, and outputting the model prediction information;

[0012] Obtain residual information corresponding to the last resource demand prediction, and determine resource demand prediction information of the power range simulation system based on the model prediction information and the residual information.

[0013] In one embodiment, generating a resource pre-scheduling scheme for the electric system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data includes:

[0014] Obtaining the task priority of the system operation task of the electric power range simulation system;

[0015] A resource pre-scheduling plan for the system operation task of the electric power range simulation system is generated according to the resource demand prediction information, the current operation data and the task priority.

[0016] In one embodiment, generating a resource pre-scheduling scheme for the system operation task of the power range simulation system according to the resource demand prediction information, the current operation data and the task priority includes:

[0017] For a high-priority system operation task, determining resources allocated to the high-priority system operation task according to current resource demand information of the high-priority system operation task and a first preset ratio;

[0018] For a medium-priority system operation task, determining resources allocated to the medium-priority system operation task according to current resource demand information of the medium-priority system operation task and a second preset ratio;

[0019] For a low-priority system running task, determine the resources allocated to the low-priority system running task according to the current resource demand information of the low-priority system running task, or suspend the running of the low-priority system running task;

[0020] Wherein, the first preset ratio is greater than the second preset ratio.

[0021] In one embodiment, generating a dynamic resource scheduling scheme includes:

[0022] When the current operation data of the electric power range simulation system is greater than a first preset threshold, reducing the resources allocated to the low-priority system operation tasks and the medium-priority system operation tasks, or suspending the operation of the low-priority system operation tasks;

[0023] When the current operation data of the electric power range simulation system is less than a second preset threshold, resuming the operation of the suspended low-priority system operation task, or increasing the resources allocated to the high-priority system operation task and the medium-priority system operation task;

[0024] Wherein, the first preset threshold is greater than the second preset threshold.

[0025] In one embodiment, the adopting the historical operation data to train a target resource demand prediction model includes:

[0026] Obtaining an initial resource demand prediction model, and obtaining a value range of a hyperparameter in the initial resource demand prediction model;

[0027] Determining a target hyperparameter within the value range of the hyperparameter according to the historical operation data and the initial resource demand prediction model;

[0028] A target resource demand prediction model is trained based on the historical operation data, the initial resource demand prediction model and the target hyperparameters.

[0029] In one embodiment, the adopting the historical operation data to train a target resource demand prediction model includes:

[0030] Preprocessing the historical operation data to obtain preprocessed historical operation data;

[0031] Determining statistical characteristic data and time series characteristic data according to the preprocessed historical operation data;

[0032] A target resource demand prediction model is trained based on the statistical feature data and the time series feature data.

[0033] In a second aspect, the present application also provides a resource scheduling device for an electric power range simulation system, comprising:

[0034] A model training module is used to obtain historical operation data of the power range simulation system, and use the historical operation data to train a target resource demand prediction model; the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information;

[0035] A demand prediction module, used for inputting the current operation data of the electric power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system when a preset prediction condition is triggered;

[0036] A pre-scheduling module, used to generate a resource pre-scheduling scheme for the system operation task of the power range simulation system according to the resource demand prediction information and the current operation data, and execute the resource pre-scheduling scheme;

[0037] The dynamic scheduling module is used to generate a resource dynamic scheduling plan, stop executing the resource pre-scheduling plan, and execute the resource dynamic scheduling plan when it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions during the execution of the resource pre-scheduling plan.

[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0039] Acquire historical operation data of the power range simulation system, and use the historical operation data to train a target resource demand prediction model; the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information;

[0040] In the case of triggering a preset prediction condition, inputting the current operation data of the electric power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system;

[0041] Generate a resource pre-scheduling plan for the system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data, and execute the resource pre-scheduling plan;

[0042] During the execution of the resource pre-scheduling plan, if it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions, a resource dynamic scheduling plan is generated, the execution of the resource pre-scheduling plan is stopped, and the resource dynamic scheduling plan is executed.

[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0044] Acquire historical operation data of the power range simulation system, and use the historical operation data to train a target resource demand prediction model; the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information;

[0045] In the case of triggering a preset prediction condition, inputting the current operation data of the electric power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system;

[0046] Generate a resource pre-scheduling plan for the system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data, and execute the resource pre-scheduling plan;

[0047] During the execution of the resource pre-scheduling plan, if it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions, a resource dynamic scheduling plan is generated, the execution of the resource pre-scheduling plan is stopped, and the resource dynamic scheduling plan is executed.

[0048] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0049] Acquire historical operation data of the power range simulation system, and use the historical operation data to train a target resource demand prediction model; the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information;

[0050] In the case of triggering a preset prediction condition, inputting the current operation data of the electric power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system;

[0051] Generate a resource pre-scheduling plan for the system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data, and execute the resource pre-scheduling plan;

[0052] During the execution of the resource pre-scheduling plan, if it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions, a resource dynamic scheduling plan is generated, the execution of the resource pre-scheduling plan is stopped, and the resource dynamic scheduling plan is executed.

[0053] The resource scheduling method, device, computer equipment, computer-readable storage medium and computer program product of the above-mentioned electric power range simulation system first obtain the historical operation data of the electric power range simulation system, and use the historical operation data to train a target resource demand prediction model, wherein the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information. Through the accumulation and analysis of historical data, the prediction model can capture the system's resource demand rules and changing trends, provide accurate input data, reduce scheduling problems caused by inaccurate resource demand predictions, provide data support for subsequent resource demand predictions, and enhance the accuracy of system predictions; then, when the preset prediction conditions are triggered, the current operation data of the electric power range simulation system is input into the target resource demand prediction model to obtain the resource demand prediction information of the electric power range simulation system. By combining the current operation data with the target resource demand prediction model, it is possible to perform real-time and dynamic resource demand predictions, timely discover resource shortages or surpluses, and make preparations for resource scheduling in advance. , reduce resource overload or idleness, and improve the accuracy of resource allocation; then, according to the resource demand prediction information and the current operation data, generate a resource pre-scheduling plan for the system operation task of the power range simulation system, and execute the resource pre-scheduling plan. The resource pre-scheduling plan generated according to the resource demand prediction information and the current resource usage can ensure that the resource allocation is planned in advance during the system operation, so that each task can obtain sufficient resources on time and on demand, and can achieve the optimal configuration of resources, avoid resource waste or task delay, thereby improving the operation efficiency of the system; finally, in the process of executing the resource pre-scheduling plan, and when it is monitored that the current operation data of the power range simulation system meets the preset threshold conditions, a resource dynamic scheduling plan is generated, and the execution of the resource pre-scheduling plan is stopped, and the resource dynamic scheduling plan is executed. The generation and execution of the dynamic scheduling plan can respond to changes in resource demand in real time, especially when the load changes, it can flexibly adjust resource allocation, respond to demand changes in time, avoid resource overload or shortage, and improve the operation efficiency and stability of the entire system. In the above method, by comprehensively applying historical data prediction, real-time resource monitoring and dynamic scheduling mechanism, the resource scheduling accuracy and real-time response capability of the power range simulation system are effectively improved. By generating resource pre-scheduling plans in advance, we ensure that resources can be reasonably allocated according to demand and priority, thus avoiding resource waste and improving resource utilization. The real-time dynamic scheduling mechanism ensures that the system can flexibly adjust resource configuration when facing load fluctuations or sudden tasks, ensuring that tasks are completed on time, reducing delays and failures, and improving the stability and efficiency of the power range simulation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A schematic diagram of a flow chart of a resource scheduling method for a power range simulation system in one embodiment;

[0056] Figure 2 A schematic flow chart of steps for generating a resource pre-scheduling solution in one embodiment;

[0057] Figure 3 A schematic flow chart of a resource scheduling method for a power range simulation system in another embodiment;

[0058] Figure 4 A structural block diagram of a resource scheduling device of a power range simulation system in one embodiment;

[0059] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0061] In the crucial field of power network security and efficiency management, virtualization technology has become one of the indispensable key technologies. This technology provides strong support for various network security tests, attack and defense simulations, and evaluations by simulating physical computing, network, and storage resources. However, although virtualization technology has shown great potential in power network management, existing technologies still face many challenges in practical applications, the most prominent of which is the flexibility of resource scheduling and the limitations of system scalability.

[0062] Existing virtualization technologies are often rigid in resource scheduling, lack sufficient flexibility, and are difficult to adjust quickly and effectively according to real-time needs. This rigid resource scheduling model not only limits the effectiveness of virtualization technology in dealing with complex and changing network security needs, but also makes the system incapable of simulating and defending against emerging threats. With the increasing complexity of the power network environment and the continuous evolution of network security threats, the resource scheduling problems exposed by existing virtualization technology have become increasingly prominent, becoming one of the key factors restricting its further development and application.

[0063] The limited scalability of the system is also a major problem that the existing virtualization technology needs to solve urgently. With the continuous expansion of the scale of power networks and the growing demand for network security, virtualization technology needs to be able to support larger-scale and higher-density virtualization environments. However, existing virtualization technologies have obvious shortcomings in system scalability and are difficult to meet this demand. This not only limits the scope of application of virtualization technology in power network management, but may also cause the system to process slowly when facing a large number of resource demands and fail to provide real-time feedback results, thus bringing great hidden dangers to the safety and efficiency management of power target systems.

[0064] Although existing virtualization technology has achieved certain results in the field of power target simulation, it still faces prominent problems such as inflexible resource scheduling and limited system scalability. These problems not only restrict the further development and application of virtualization technology, but also bring many challenges to the power target simulation system. Therefore, it is necessary to adopt a more efficient and flexible virtualization technology solution to cope with the increasingly complex and changeable power network environment and network security threats.

[0065] In one embodiment, Figure 1 As shown, a resource scheduling method for an electric power range simulation system is provided. This embodiment uses the method applied to a terminal as an example for illustration. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. In this embodiment, the method includes the following steps:

[0066] Step S101, obtaining historical operation data of the power range simulation system, and using the historical operation data to train a target resource demand prediction model.

[0067] Among them, historical operation data refers to the recorded information related to resource usage, task load, system performance, etc. generated during the operation of the power range simulation system, including but not limited to task execution time, resource consumption (such as CPU, memory, bandwidth, etc.), task type and workload, timestamp, etc. These data can reflect the laws and changing trends of system resource requirements.

[0068] Among them, the target resource demand prediction model is used to characterize the mapping relationship between operation data and resource demand prediction information.

[0069] Exemplarily, the terminal first obtains task-level resource usage records and global resource load data from the system, and organizes these data in chronological order of tasks. In order to ensure data quality, the terminal performs the following operations on the acquired historical operation data: Missing value processing: The missing items in the data are supplemented by mean filling, interpolation or nearest neighbor algorithm. Outlier detection and elimination: Statistical methods (such as the 3σ principle) or machine learning algorithms are used to detect and eliminate abnormal data to avoid adverse effects of outliers on the training of the prediction model. Data standardization: The value ranges of different resource indicators (such as CPU utilization, memory occupancy, etc.) are normalized so that the model can process data of different scales more efficiently.

[0070] After completing data preprocessing, the terminal extracts feature information related to resource demand based on the preprocessed historical operation data. Feature extraction includes the following steps: extracting statistical features, such as average, maximum, minimum, standard deviation, etc., to reflect the basic rules of resource use; extracting time series features, such as periodicity and trend, and capturing the time series characteristics of resource demand through methods such as sliding windows and time differences; extracting task features, including task type, priority, and life cycle features (such as task start time, duration, etc.).

[0071] Finally, the terminal inputs the extracted feature data into the machine learning algorithm, such as linear regression, neural network or gradient boosting decision tree models, to train the historical operation data to obtain the target resource demand prediction model. The training process evaluates and optimizes the performance of the model through cross-validation method to determine the optimal model and its parameter configuration.

[0072] Step S102, when a preset prediction condition is triggered, the current operation data of the electric power range simulation system is input into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system.

[0073] The preset prediction conditions refer to the rules or states used to trigger resource demand prediction operations. For example, they may include but are not limited to the following conditions: the current resource usage rate is close to the system threshold (such as above 80%), the high-priority task in the system is started, the periodic scheduling time (such as every day or every hour) arrives, etc. The preset prediction conditions ensure that the system performs prediction operations at the right time to avoid untimely or frequent triggering of resource allocation.

[0074] Exemplarily, when the preset prediction conditions are met, the terminal starts to execute the resource demand prediction process. The terminal collects the current operating data of the power range simulation system in real time, including information such as CPU usage, memory occupancy, timestamp, task type, and task workload, and preprocesses the data to ensure the accuracy of the input data. For example: standardize the data format: convert the resource data collected in real time into a format consistent with the input of the prediction model; clean up invalid data: remove null values ​​or duplicate data to ensure the reliability of the prediction results. The terminal uses the current operating data as the input variable and loads the target resource demand prediction model. The prediction model calculates the resource requirements of the system in a specific time period in the future based on the rules obtained in the training phase (such as the statistical characteristics and time series characteristics of historical data) combined with the current input data. For example: predict the CPU and memory requirements of high-priority tasks in the next 10 minutes; predict the resource release time of the system after the high-load task is completed. The target resource demand prediction model outputs the prediction results, and the terminal organizes them into resource demand prediction information, which may include: the total resource demand of each priority task (such as high-priority tasks require 80% of the CPU and 50% of the memory); the overall resource usage trend of the system (such as the average CPU utilization in the next hour will reach 90%); possible resource shortage alerts (such as predicting that a task will degrade in performance due to insufficient resources in the next 30 minutes).

[0075] Step S103, generating a resource pre-scheduling plan for the system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data, and executing the resource pre-scheduling plan.

[0076] The current running data refers to the system usage monitored by the system in real time, such as CPU usage, memory usage, timestamp, task type, and task workload.

[0077] Exemplarily, after obtaining resource demand forecast information and current operation data, the terminal formulates the basic principles of resource allocation based on the system scheduling rules, combined with the task priority, resource demand forecast information and current operation data corresponding to the task type. Specifically, it includes: high-priority tasks are allocated resources first to ensure that their resource requirements are 100% met; medium-priority tasks are allocated resources in proportion to meet the requirements under the premise of ensuring that the tasks can be executed; low-priority tasks use the remaining resources of the system. If the resources are insufficient, the execution of low-priority tasks may be delayed or suspended. The content of the scheduling plan includes the resource allocation of each task in a specific time period in the future. For example: high-priority task A: 60% of the CPU and 40% of the memory are allocated; medium-priority task B: 30% of the CPU and 20% of the memory are allocated; low-priority task C: 10% of the CPU is allocated, and the task can be delayed. The terminal adjusts the resource allocation of the power range simulation system according to the generated pre-scheduling plan. For example: adjust the execution order of tasks, give priority to starting high-priority tasks; dynamically adjust the resource allocation ratio of running tasks to ensure that high-priority tasks can obtain more resources; if necessary, suspend low-priority tasks to release resources for more important tasks. In addition, during the execution of the resource pre-scheduling plan, the terminal monitors the execution effect of the scheduling plan in real time and records the actual resource usage of the task. If it is found that the resource allocation is unbalanced or the resource demand of a task suddenly increases, the terminal will adjust the plan based on the feedback information.

[0078] Step S104, during the execution of the resource pre-scheduling plan, if it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions, a resource dynamic scheduling plan is generated, and the execution of the resource pre-scheduling plan is stopped, and the resource dynamic scheduling plan is executed.

[0079] Among them, the preset threshold conditions refer to the conditions and standards used to determine whether dynamic resource scheduling needs to be triggered, usually including the upper threshold of resource utilization (such as CPU utilization exceeding 90%), the lower threshold of resource utilization (such as the overall system resource utilization is less than 50%), and sudden changes in task priority (such as the addition of a high-priority task).

[0080] Exemplarily, when executing the resource pre-scheduling scheme, the terminal monitors the current resource usage of the power range simulation system in real time, including the overall resource utilization rate of the system (such as CPU, memory, network bandwidth, etc.), the real-time resource consumption and execution status of each task, and whether there are new tasks or task priority changes in the task queue. When the terminal detects that the current operation data meets the preset threshold conditions, such as when the CPU utilization rate exceeds 90% or a high-priority task is added, the terminal triggers the dynamic scheduling mechanism and generates a resource dynamic scheduling scheme based on the current resource status. In the process of generating the dynamic scheduling scheme, the terminal first reallocates resources according to the resource usage status and task priority. For high-priority tasks, the terminal gives priority to meeting the needs of high-priority tasks by reducing the resource allocation of low-priority tasks or even suspending their operation; for the case of too low resource utilization, the terminal may resume the operation of low-priority tasks and merge the task allocation resources to optimize the overall utilization efficiency; when there is a sudden task in the system, the terminal meets the emergency needs by preempting the resources of low-priority tasks or dynamically expanding the resource pool. Subsequently, the terminal stops executing the resource pre-scheduling plan, executes the resource dynamic scheduling plan, and adjusts the task resource allocation, such as increasing the number of CPU cores or memory allocation for high-priority tasks, suspending some low-priority tasks, or restarting suspended tasks to make full use of idle resources. While the plan is being executed, the terminal continuously monitors the scheduling effect, records the task execution status and resource change trends, so as to further optimize the scheduling strategy.

[0081] In the resource scheduling method of the above-mentioned electric power range simulation system, first, the historical operation data of the electric power range simulation system is obtained, and the historical operation data is used to train a target resource demand prediction model, wherein the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information. Through the accumulation and analysis of historical data, the prediction model can capture the resource demand law and change trend of the system, provide accurate input data, reduce the scheduling problems caused by inaccurate resource demand prediction, provide data support for subsequent resource demand prediction, and enhance the accuracy of system prediction; then, when the preset prediction conditions are triggered, the current operation data of the electric power range simulation system is input into the target resource demand prediction model to obtain the resource demand prediction information of the electric power range simulation system. By combining the current operation data with the target resource demand prediction model, the resource demand prediction can be carried out in real time and dynamically, and the shortage or surplus of resources can be discovered in time, so that resource scheduling preparations can be made in advance to reduce resource overload or idleness. Improve the accuracy of resource allocation; then, according to the resource demand prediction information and the current operation data, generate a resource pre-scheduling plan for the system operation task of the power range simulation system, and execute the resource pre-scheduling plan. The resource pre-scheduling plan generated according to the resource demand prediction information and the current resource usage can ensure that the resource allocation is planned in advance during the system operation, so that each task can obtain sufficient resources on time and on demand, and can achieve the optimal configuration of resources, avoid resource waste or task delay, thereby improving the operation efficiency of the system; finally, in the process of executing the resource pre-scheduling plan, and when it is monitored that the current operation data of the power range simulation system meets the preset threshold conditions, generate a resource dynamic scheduling plan, stop executing the resource pre-scheduling plan, and execute the resource dynamic scheduling plan. The generation and execution of the dynamic scheduling plan can respond to changes in resource demand in real time, especially when the load changes, and can flexibly adjust resource allocation, respond to demand changes in time, avoid resource overload or shortage, and improve the operation efficiency and stability of the entire system. In the above method, by comprehensively applying historical data prediction, real-time resource monitoring and dynamic scheduling mechanism, the resource scheduling accuracy and real-time response capability of the power range simulation system are effectively improved. By generating resource pre-scheduling plans in advance, we ensure that resources can be reasonably allocated according to demand and priority, thus avoiding resource waste and improving resource utilization. The real-time dynamic scheduling mechanism ensures that the system can flexibly adjust resource configuration when facing load fluctuations or sudden tasks, ensuring that tasks are completed on time, reducing delays and failures, and improving the stability and efficiency of the power range simulation system.

[0082] In an exemplary embodiment, the above-mentioned step S102 inputs the current operating data of the power range simulation system into the target resource demand prediction model to obtain the resource demand prediction information of the power range simulation system, and also includes: inputting the current operating data of the power range simulation system into the target resource demand prediction model, and outputting the model prediction information; obtaining the residual information corresponding to the last resource demand prediction, and determining the resource demand prediction information of the power range simulation system based on the model prediction information and the residual information.

[0083] Exemplarily, the terminal first collects the current operation data of the power range simulation system through the real-time monitoring module. The data includes the CPU usage, memory usage, network bandwidth usage of the current task, and the type and real-time load of each task. The terminal preprocesses these data, such as removing outliers, filling missing data, and standardizing them before inputting them into the target resource demand prediction model. The target resource demand prediction model outputs model prediction information based on the input current operation data and historical training results. The prediction information includes the resource demand trend in a specific time period in the future, such as the CPU usage will gradually increase to 90% in the next 10 minutes, or the memory demand of certain tasks will increase significantly. The terminal uses this prediction information as the basic data and further adjusts it in combination with the residual information corresponding to the last resource demand prediction. When obtaining the residual information, the terminal reads the error data (i.e., residual) between the last resource demand prediction and the actual resource usage from the system storage module. The residual information reflects the deviation trend of the target resource demand prediction model in the past prediction. For example, if the model systematically underestimates the CPU demand in the last prediction, the current prediction result needs to be adjusted upward accordingly. Subsequently, the terminal combines the model prediction information and the residual information and uses a weighted correction method to determine the final resource demand prediction information. Exemplarily, the process can be performed according to the following formula: Final resource demand prediction value = α*model prediction value + β*residual. Among them, α and β are weight parameters used to balance the impact of the model prediction value and the residual information. The weight parameter can be dynamically adjusted according to the historical data of the system. For example, when the residual is small, the weight of the model prediction value is increased; when the residual is large, the correction effect of the residual information is strengthened.

[0084] In this embodiment, by combining the current operation data, model prediction information and residual information, the accuracy of resource demand prediction can be effectively improved. In particular, the residual information is used to correct the model prediction, which makes up for the deviation problem that may exist in the model in a specific scenario and makes the prediction result more realistic. This multi-source information fusion prediction method lays a solid foundation for the optimization of resource scheduling solutions and significantly improves the efficiency and reliability of system resource management.

[0085] In an exemplary embodiment, Figure 2As shown, the above step S103 generates a resource pre-scheduling scheme for the electric system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data, which can also be achieved by the following steps:

[0086] Step S201, obtaining the task priority of the system operation task of the electric power range simulation system;

[0087] Step S202, generating a resource pre-scheduling plan for the system operation task of the power range simulation system according to the resource demand prediction information, the current operation data and the task priority.

[0088] Exemplarily, the terminal first extracts the task list of the system operation task from the power range simulation system, and obtains the task priority of each task. The task priority is determined according to the system preset rules, and is usually divided into high priority, medium priority and low priority. The priority is set according to the importance, urgency or resource demand of the task. For example, a high priority task may represent a critical business scenario, while a low priority task is usually an auxiliary task. After obtaining the task priority, the terminal combines the resource demand forecast information and the current operation data to generate a resource allocation plan for the task. When allocating resources, the terminal gives priority to high priority tasks to ensure that their resource requirements are fully met. If the forecast shows that the high priority task will have an increase in resource demand in the future, the terminal will dynamically adjust the system resource allocation strategy, such as allocating resources from medium priority or low priority tasks, or releasing resources to high priority tasks in advance. For medium priority tasks, the terminal allocates sufficient resources to them according to the system's resource load to ensure normal operation while avoiding resource waste. The resource allocation of low priority tasks is based on the remaining system resources and may be postponed or suspended when resources are tight.

[0089] In this embodiment, by obtaining the task priority of the electric power range simulation system and combining the resource demand forecast information and current operation data, a resource pre-scheduling plan is generated to ensure that the resource allocation of the system operation tasks is more reasonable. The introduction of the priority mechanism ensures that high-priority tasks can be fully guaranteed when resources are tight, thereby avoiding the delay of critical tasks due to insufficient resources. At the same time, the resource allocation of medium-priority and low-priority tasks is dynamically adjusted according to the system load, which not only improves the efficiency of resource utilization, but also effectively reduces resource waste. The overall stability of task execution and the efficiency of system operation are improved, providing a solid guarantee for the high-load operation of the electric power range simulation system.

[0090] In an exemplary embodiment, the above-mentioned step S202 generates a resource pre-scheduling plan for the system operation tasks of the power range simulation system based on resource demand prediction information, current operation data and task priority, and also includes: for high-priority system operation tasks, determining the resources allocated to the high-priority system operation tasks based on the current resource demand information of the high-priority system operation tasks and a first preset ratio; for medium-priority system operation tasks, determining the resources allocated to the medium-priority system operation tasks based on the current resource demand information of the medium-priority system operation tasks and a second preset ratio; for low-priority system operation tasks, determining the resources allocated to the low-priority system operation tasks based on the current resource demand information of the low-priority system operation tasks, or suspending the operation of the low-priority system operation tasks.

[0091] The first preset ratio is greater than the second preset ratio.

[0092] Exemplarily, the terminal first generates resource demand forecast information based on the historical operation data and current resource usage of the power range simulation system. Subsequently, the terminal obtains the system task list and divides the tasks into three categories: high priority, medium priority and low priority according to the importance and urgency of the tasks and the preset rules of the system. High priority tasks are usually critical business tasks, which require priority allocation of resources, medium priority tasks are secondary critical tasks, and low priority tasks are auxiliary tasks or tasks with low resource requirements. In the resource allocation of high priority tasks, the terminal allocates resources to high priority tasks according to the resource demand forecast information and the first preset ratio to ensure that they can run in time and the resource requirements are fully met. For example, the first preset ratio is set to 60%-70% of the total system resources to give priority to the execution of high priority tasks. If the resources are insufficient, the terminal further evacuates resources for high priority tasks through dynamic adjustment, such as reducing the allocation from medium and low priority tasks. For medium priority tasks, the terminal allocates resources according to the resource demand forecast information and the second preset ratio, usually ensuring that the resources meet the normal operation of the task. For example, the second preset ratio is set to 30%-40%. In the case of resource shortage, resource allocation for medium-priority tasks may be limited, but basic resource requirements will still be maintained to avoid task delays. For low-priority tasks, the terminal gives priority to the remaining resources of the current system. When resources are sufficient, low-priority tasks can obtain resource allocation according to their needs; if resources are tight, the terminal will give priority to reducing resource allocation for low-priority tasks or even suspend their operation. The execution of the suspension strategy needs to consider the actual impact of the task on system performance to ensure that the suspension does not affect the normal operation of high-priority tasks.

[0093] In this embodiment, by setting resource allocation ratios for tasks of different priorities and dynamically adjusting them, the resource requirements of high-priority tasks can be prioritized to ensure that key tasks are completed on time, while resources for medium and low-priority tasks are reasonably allocated to improve resource utilization efficiency. When resources are tight, more resources are released by suspending or reducing resource allocation for low-priority tasks, optimizing the overall performance of the system, and significantly improving the operational stability and scheduling efficiency of the power range simulation system.

[0094] In an exemplary embodiment, the above-mentioned step S104 generates a dynamic resource scheduling plan, and also includes: when the current operating data of the electric power range simulation system is greater than a first preset threshold, reducing the resources allocated to low-priority system operating tasks and medium-priority system operating tasks, or suspending the operation of low-priority system operating tasks; when the current operating data of the electric power range simulation system is less than a second preset threshold, resuming the operation of the suspended low-priority system operating tasks, or increasing the resources allocated to high-priority system operating tasks and medium-priority system operating tasks.

[0095] Among them, the first preset threshold is greater than the second preset threshold.

[0096] Exemplarily, the terminal first monitors the current operation data of the power range simulation system in real time, including indicators such as the overall CPU usage, memory occupancy, and network bandwidth load of the system. The terminal compares these monitoring data with the preset thresholds to determine whether the current load state of the system resources exceeds the first preset threshold or is lower than the second preset threshold. The first preset threshold represents the upper limit of resource usage. For example, when the CPU usage reaches 90%, the system load is considered to be too high; the second preset threshold represents the lower limit of resource usage. For example, when the resource utilization is lower than 40%, the system resources are considered to be in excess. When the current operation data is greater than the first preset threshold, the terminal determines that the system resources are in a high load state and needs to relieve the pressure by dynamically adjusting the task resource allocation. Specifically, the terminal will give priority to reducing the resource allocation of low-priority tasks and release resources for high-priority tasks. If the resources are still insufficient, the terminal will further reduce the resource allocation of medium-priority tasks, and even suspend the operation of some low-priority tasks to ensure that critical tasks can be executed normally. This adjustment can quickly respond to the situation of tight system resources and avoid delays or failures of high-priority tasks due to insufficient resources. When the current running data is less than the second preset threshold, the terminal determines that the system resources are in a low-load state, and can appropriately resume the operation of low-priority tasks to make full use of idle resources. When resuming low-priority tasks, the terminal will give priority to starting previously suspended tasks and allocate resources according to their actual needs. In addition, the terminal will also increase the resource quotas of medium-priority and high-priority tasks to improve their execution efficiency, speed up task completion, and further optimize resource utilization. During the execution of the dynamic scheduling scheme, the terminal will continuously monitor the execution status and resource usage of the tasks, and adjust the resource allocation strategy in real time. For example, if the system load rises rapidly after resuming low-priority tasks, the terminal will suspend some low-priority tasks again to maintain system stability.

[0097] In this embodiment, by setting the first preset threshold and the second preset threshold, the resource requirements of high-priority tasks can be prioritized when the resource load is too high, ensuring the normal operation of key tasks and avoiding performance degradation due to insufficient resources. When the resource utilization rate is low, the idle resources of the system can be fully utilized to restore the operation of low-priority tasks, and the resource allocation of medium and high-priority tasks can be appropriately increased to improve the overall resource utilization rate. The resource supply and demand relationship of the system is effectively balanced, the operating efficiency and stability of the power range simulation system are improved, and the possibility of resource waste and task delays is reduced.

[0098] In an exemplary embodiment, the above-mentioned step S101 uses historical operation data to train a target resource demand prediction model, and also includes: obtaining an initial resource demand prediction model, and obtaining a value range of a hyperparameter in the initial resource demand prediction model; determining a target hyperparameter within the value range of the hyperparameter based on the historical operation data and the initial resource demand prediction model; and training a target resource demand prediction model based on the historical operation data, the initial resource demand prediction model and the target hyperparameter.

[0099] Exemplarily, the terminal first loads an initial resource demand prediction model, which is built based on an existing algorithm framework (such as a linear regression model, a decision tree model, or a deep learning model) for preliminary prediction of resource demand. The initial model contains a set of adjustable hyperparameters, such as learning rate, regularization coefficient, tree depth, number of hidden layer units, etc. These hyperparameters have a significant impact on the performance of the model. The terminal also obtains the value range of these hyperparameters. For example, the learning rate can be set between 0.001-0.1 and the regularization coefficient can be set between 0.01-1.0. Next, the terminal optimizes the hyperparameters of the initial model in combination with historical operation data. The terminal uses algorithms such as cross-validation, grid search, or Bayesian optimization to determine the target hyperparameters that can achieve the best model performance from the value range of the hyperparameters. For example, through the grid search algorithm, the terminal evaluates all possible combinations of hyperparameters within the value range and calculates the performance indicators of the model on the validation set (such as mean square error or prediction accuracy); through the cross-validation method, the terminal can further verify the generalization performance of each set of hyperparameters to ensure that the selected target hyperparameters can perform well in the actual prediction task. After the target hyperparameters are determined, the terminal uses the historical operation data to train the initial resource demand prediction model and finally generates the target resource demand prediction model. During the training process, the historical operation data is divided into a training set and a validation set. The training set is used to update the parameters of the model, and the validation set is used to evaluate the performance of the model and the adjustment strategy. For example, the terminal adjusts the learning rate based on the target hyperparameters to accelerate the convergence of the model, or avoids overfitting through regularization terms. Finally, the target resource demand prediction model generated by the terminal can accurately capture the changing law of resource demand in the historical operation data and has strong generalization ability. This model can not only effectively predict future resource demand, but also adapt to dynamically changing load characteristics, providing a reliable basis for subsequent resource scheduling.

[0100] In this embodiment, by introducing hyperparameter optimization, the accuracy and robustness of the resource demand prediction model can be further improved on the basis of the initial model. The optimized target hyperparameters can effectively balance the model's fitting ability and generalization ability, so that the prediction model has higher accuracy on historical data and stronger adaptability on future data. Combining the optimized model and historical operation data, the target resource demand prediction model finally generated can more accurately predict the resource demand of the power range simulation system, improve the efficiency of resource scheduling, reduce the situation of insufficient or wasteful resource allocation, and significantly enhance the stability and reliability of system operation.

[0101] In an exemplary embodiment, the above-mentioned step S101 uses historical operation data to train a target resource demand prediction model, and also includes: preprocessing the historical operation data to obtain preprocessed historical operation data; determining statistical feature data and time series feature data based on the preprocessed historical operation data; and training a target resource demand prediction model based on the statistical feature data and time series feature data.

[0102] Exemplarily, the terminal first preprocesses the collected historical operation data to ensure the integrity and quality of the data. The historical operation data includes but is not limited to task execution time, resource usage (such as CPU, memory and network bandwidth consumption), task priority and load change trend. The preprocessing process includes the following: Missing value processing: The terminal uses mean filling, interpolation or nearest neighbor algorithm to supplement the missing data to ensure the integrity of the input data during model training; Outlier detection and elimination: Through statistical methods (such as the 3σ principle) or model-based detection algorithms, eliminate abnormal data points to avoid model deviations caused by abnormal values; Data normalization: Standardize or normalize the data range of different features, such as unifying the value range of CPU usage and memory occupancy to 0-1, so that the model can efficiently process input features.

[0103] After preprocessing, the terminal extracts features from the historical operation data. The core of feature extraction is to convert raw data into statistical feature data and time series feature data that can reflect the law of resource demand. Statistical feature data is obtained by statistical calculation of historical records of resource use, for example: average value: reflects the resource usage trend of tasks over a period of time; standard deviation: measures the degree of fluctuation in resource use; maximum and minimum values: used to describe extreme situations of resource use; task priority ratio: used to analyze the dominance of high-priority tasks in resource consumption.

[0104] Time series feature data is extracted by analyzing the time dependence and periodic changes of resource usage, including: sliding average: capturing the changing trend of short-term resource demand through a sliding window; time difference: extracting the growth rate or decrease rate of resource usage; periodic characteristics: such as daily or weekly resource demand patterns, used to capture periodic fluctuations in load.

[0105] After the feature data is extracted, the terminal inputs the statistical feature data and the time series feature data into the target resource demand prediction model for training. During the training process, the terminal uses supervised learning algorithms, such as linear regression, gradient boosting decision tree, or long short-term memory network (LSTM) to establish a resource demand prediction model based on the input and output of historical operation data (such as the actual value of resource usage). Through iterative training, the model continuously optimizes parameters to improve prediction accuracy. Ultimately, the target resource demand prediction model generated by the terminal can accurately predict future resource requirements based on statistical features and time series features. For example, the model can predict CPU usage or network bandwidth requirements in a certain time period in the future, helping the system to plan resource allocation and task scheduling in advance.

[0106] In this embodiment, the quality and expression ability of the input data are effectively improved through preprocessing and feature extraction of historical operation data, ensuring that the model can capture the inherent laws and changing trends of resource demand. Statistical feature data provides global information, such as the average level and fluctuation range of resource usage, while time series feature data reveals the time dependence and periodic changes of resource demand. Combining these two types of features, the trained target resource demand prediction model has higher prediction accuracy and adaptability, providing reliable data support for resource scheduling of the power range simulation system. At the same time, by accurately predicting resource demand, the system can optimize resource allocation strategies, avoid resource overload or waste, and significantly improve the operating efficiency and stability of the simulation system.

[0107] In another exemplary embodiment, Figure 3 As shown, the present application provides a resource scheduling method for an electric power range simulation system, the method comprising:

[0108] Step S301, data collection and statistical analysis: collect historical resource usage data, time data, and application workload data, and perform statistical analysis on the collected data to ensure the quality and integrity of the data.

[0109] Step S302, linear regression model establishment: a linear regression model is constructed using the system resource usage data obtained in the previous step.

[0110] Step S303, resource usage prediction: using the obtained linear regression model based on time series and combining it with the current system resource usage status, predict the future system resource usage.

[0111] Step S304, resource allocation: Based on the prediction results and the current resource usage status, priority-based resource allocation is adopted to ensure that key tasks can obtain the required resources and improve the overall resource utilization efficiency.

[0112] Step S305, resource adjustment: when resource demand changes, resources are automatically and dynamically adjusted.

[0113] Step S306, prediction error evaluation and optimization: compare the predicted system resource usage with the actual value and calculate the prediction error probability.

[0114] Exemplarily, in step S301, data is first collected, and these data mainly include historical resource usage data, time data, application workload data and other information. Then, the collected data is statistically analyzed, including data cleaning, outlier removal, feature extraction and other processing to ensure the quality and integrity of the data. The key to this step is to accurately obtain the status data of the current system resources and effectively process and analyze it.

[0115] Specifically, (1) Data collection: These data mainly include but are not limited to: Historical resource usage data: CPU usage, memory usage, network bandwidth utilization, storage I / O operations, etc. Time data: Record the timestamp of each data point to identify periodic changes in usage patterns. Application workload data: Information such as application type and workload characteristics. (2) Data collection and integration: Collect and integrate real-time and historical resource usage data of the system. Automated tools or scripts can be used to extract and process these data to ensure the accuracy and completeness of the data. (3) Feature engineering: After data collection, feature engineering is required to convert the raw data into a format that can be processed by the machine learning model. This includes: Data cleaning: Remove or fill missing values ​​and delete outliers. Feature extraction: Extract useful information from raw data, such as calculating statistical indicators such as sliding averages and peaks. Time series features: Generate time-related features, such as time trends. (4) Data storage and management Establish a suitable data storage and management system to store and manage network security status data. This can include databases, data warehouses, or big data platforms to ensure data security, accessibility, and scalability.

[0116] Furthermore, in (3) above: the collected data is processed and used as the parameter independent variable (x) of the linear regression prediction model. The assignment of the independent variable x of the linear regression model is based on the actual collected data: ① Historical resource usage data: CPU usage: The CPU occupancy in the past period of time is obtained through the monitoring system or virtualization management platform, usually expressed as a percentage. When assigning values, these data can be input into the model as time series data. Memory usage: The memory usage in the past period of time is also obtained through the monitoring system or virtualization management platform, including used memory and free memory. When assigning values, these data can be input into the model as numerical features. Network bandwidth utilization: The network bandwidth usage in the past period of time is obtained through the network monitoring tool, including upload and download rates. When assigning values, these data can be input into the model as numerical features or time series data. Storage I / O operations: The number and rate of read and write operations of the storage device in the past period of time are obtained through the storage device monitoring tool. When assigning values, these data can also be input into the model as numerical features or time series data. ② Time data: Timestamp: Records the time information of each data point, such as date, hour, minute, etc. When assigning values, these time information can be converted into numerical features (such as integer representation of timestamp) or time series data (such as data points arranged in chronological order). ③ Application workload data: Type of application: Encode or classify according to the type of application. When assigning values, categorical features (such as using unique hot encoding or label encoding) can be used to represent different types of applications. Workload characteristics: Quantify according to the workload characteristics of the application. When assigning values, these features can be input into the model as numerical features, such as the number of concurrent users, request rate, data processing volume, etc.

[0117] In step S302, a linear regression model is constructed: (1) Data partitioning: The data is divided into a training set and a test set to train the model and evaluate its generalization ability. Training set: This part of the data is used to train the model, that is, to let the model learn the rules and patterns in the data. Through continuous iteration and optimization, the performance of the model on the training set will gradually improve until it reaches a relatively stable level. Test set: This part of the data is used after the model training is completed to evaluate the generalization ability of the model. Since the test set is independent of the training set, it can provide a relatively objective performance evaluation indicator. By comparing the performance of the model on the test set, we can determine whether the model is overfitting or underfitting, and make further adjustments and optimizations accordingly. The proportion of data partitioning is usually determined according to the specific problem and the size of the data set. Common partitioning ratios include 70% training set + 30% test set, 80% training set + 20% test set, etc. In practical applications, more complex partitioning methods can also be used, such as the holdout method, cross-validation method, etc.

[0118] (2) Model tuning: Select the best parameters to improve model performance. Specifically, parameter selection: First, you need to determine which parameters in the model can be adjusted. These parameters may include learning rate, number of iterations, regularization coefficient, etc. Cross-validation: Evaluate the performance of the model by dividing the dataset into multiple subsets. During the cross-validation process, one subset is usually selected as the validation set and the remaining subsets are used as the training set. Then, by training the model for multiple iterations and evaluating its performance on the validation set, we can find a relatively optimal set of parameters. Performance evaluation: After cross-validation is completed, we can evaluate the performance of the model based on its performance on the validation set. Common evaluation indicators include accuracy, recall, F1 score, etc. By comparing the performance evaluation results under different parameter combinations, we can select a set of optimal parameters. It should be noted that model tuning is an iterative process. In practical applications, it is necessary to try different parameter combinations and tuning strategies multiple times to find the optimal model configuration.

[0119] (3) Model training: Use training data to train the model. When training the model, data preprocessing, model initialization, and iterative training are required until the stopping condition is met. Specifically, after determining the optimal parameters, use the training data to train the model, which usually includes the following steps: Data preprocessing: Before training the model, the training data needs to be preprocessed. This includes steps such as data cleaning, feature selection, and feature scaling. Through preprocessing, we can improve the quality of the data and the performance of the model. Model initialization: Initialize the model based on the selected model and parameters. This includes setting the initial weights, biases, and other parameters of the model. Iterative training: During the training process, the model will continuously learn the rules and patterns in the training data. This is usually achieved in an iterative manner, that is, continuously adjusting the parameters of the model to minimize the loss function. In each iteration, the model calculates a predicted value based on the current parameters and training data, and compares it with the actual value. Then, the model parameters are adjusted based on the comparison results to better predict the data in the next iteration. Stopping condition: The training process will continue until a certain stopping condition is met. Common stopping conditions include reaching the maximum number of iterations and the convergence of the loss function. When the stopping condition is met, the model can be considered to have been trained and can be used for subsequent prediction and evaluation.

[0120] Furthermore, in (2) above, the model parameter β 0 , β 1 , ..., β n It is estimated by minimizing the sum of squares of the prediction errors, that is, solving the following optimization problem:

[0121]

[0122] Where T is the total number of time points in the training data.

[0123] β 0 (intercept term) and β 1 , ..., β n The (regression coefficients) are estimated by the least squares method. The values ​​of these parameters minimize the error between the predicted values ​​and the actual values.

[0124] Specifically, the training process of the linear regression model can be viewed as an optimization problem, the goal of which is to find a set of parameters (β 0 , β 1 , ..., β n ) makes the model fit the training data best. This is usually achieved by iteratively updating the parameter values ​​until a certain stopping condition is reached (such as error convergence or reaching the maximum number of iterations). During the training process, each parameter (including β 0 ) and updates the parameter value according to the gradient value. This process is repeated until a set of optimal parameter values ​​is found that minimizes the prediction error of the model. 0 The calculation of β depends on the quality of the training data and the feature selection. If the data contains noise or outliers, or the feature selection is inappropriate, it may affect β 0 In practical applications, data preprocessing (such as data cleaning, feature extraction, etc.) is usually required to improve the quality of the model and prediction accuracy.

[0125] In step S303, the obtained linear regression model algorithm based on time series is used to predict the future system resource usage in combination with the current system resource usage status, including the requirements for CPU, memory, storage and network bandwidth. This prediction is based on historical data and real-time data analysis, and can respond quickly to upcoming load changes. Specifically, (1) Resource usage prediction: In resource prediction, a linear regression model based on timeline is used to predict resource usage. This method can provide a mathematical basis to make the prediction results more reliable. This embodiment uses the formula of the linear regression prediction model based on time series data: . Among them, y is the dependent variable, which represents the predicted value of resource usage in the future. β 0 is the intercept term, which represents the predicted value of the dependent variable when all independent variables are 0. 1 , ..., β n is the regression coefficient, which indicates the influence of the independent variable on the dependent variable. 1 , x 2 , ..., x nis an independent variable, representing various factors that affect resource use. ε is an error term, representing the difference between the model's predicted value and the actual value, representing the portion of the variation in the dependent variable (y) that cannot be explained by the independent variable (x) in the model. The error term is random and unobservable, so in practical applications, the specific value of ε cannot usually be directly "calculated", but its impact is estimated through the residuals in the model fitting process: Among them, n is the current prediction node, y is the actual resource usage of the system, and y' is the predicted resource usage of the system, that is, the value of the error term ε is obtained through the resource usage of the previous prediction node.

[0126] In step S304, specifically, (1) resource allocation strategy: according to the prediction results and the current resource usage status, the engine adopts priority-based resource allocation to ensure that key tasks can obtain the required resources while improving the overall resource utilization efficiency.

[0127] (2) Priority determination: Determine the priority of each task based on the type of task (such as fault analysis, system stability testing, etc.), urgency, expected impact, and historical data.

[0128] (3) Priority classification: High priority: simulation tasks involving critical system operations or emergency fault handling. Medium priority: routine system performance testing and optimization tasks. Low priority: non-urgent data analysis and long-term research projects.

[0129] (4) Resource allocation rules: 1. Resource demand assessment: Before each simulation task is started, its resource requirements must be submitted, including CPU, memory, storage, and network bandwidth. 2. Dynamic adjustment mechanism: Dynamically adjust resource allocation based on the current system resource usage and the priority of each task. 3. Resource reservation: Reserve a certain proportion of resources for high-priority tasks to ensure rapid response at any time. 4. Resource recovery and reallocation: Recover resources from low-priority tasks and reallocate them to more urgent or higher-priority tasks.

[0130] (5) Implementation steps: 1. Real-time monitoring: The system continuously monitors the resource usage of each task and the overall resource status of the system. 2. Application of prediction model: Use the prediction model to predict the resource requirements of each task in the short term in the future and provide data support for resource adjustment. 3. Decision execution: When the system detects that resource usage is close to the upper limit, the resource management protocol is automatically triggered. According to the task priority and resource requirements, resource allocation is automatically adjusted to ensure that high-priority tasks are not delayed due to insufficient resources.

[0131] (6) Safety and fault tolerance mechanisms: 1. Overload protection: Set an upper threshold for resource usage to prevent system crashes due to over-allocation of resources. 2. Task fault tolerance: For low-priority tasks affected by resource adjustments, the system automatically records the status and resumes the task when resources are sufficient.

[0132] In step S305, the resource usage is monitored in real time, and resource configuration is dynamically adjusted according to the strategy and prediction results. When resource demand increases, resources are automatically allocated from other non-critical tasks to support critical tasks. Specifically, (1) Resource adjustment mechanism: When resource demand changes, the scheduling engine can automatically adjust resources. For example, when a virtual machine needs more resources due to an emergency, the scheduling engine can temporarily allocate resources from other low-priority tasks to ensure service continuity and stability.

[0133] (2) Resource adjustment strategy: 1. Rule setting: define when to trigger resource adjustment, such as automatically starting the adjustment mechanism when resource utilization reaches a certain threshold. 2. Dynamic allocation: Increase allocation: add resources to high-priority or resource-deficient tasks. Reduce allocation: reduce resource allocation from low-priority or currently low-load tasks. 3. Automated operation: Automatic execution: the scheduling engine automatically performs resource adjustments according to the strategy without manual intervention. Operation feedback: after each resource adjustment, the system records the operation details and feeds back to the operation log for review by the system administrator or user.

[0134] (3) Implementation details: 1. Set adjustment rules and thresholds: Define resource adjustment conditions: Set upper and lower thresholds for resource usage. Once these thresholds are reached, resource adjustments are automatically triggered. Formulate allocation strategies: Formulate clear rules for resource allocation and reduction to ensure transparency and fairness of resource adjustments. 2. Implement dynamic allocation: Allocation operation: Quickly allocate additional resources to high-priority tasks that are in a state of insufficient resources. Reduction operation: Reduce resource allocation from tasks with lower current loads to optimize resource usage. 3. Automation and feedback mechanism: Automatically perform resource adjustments: Use automated tools and scripts to adjust resource allocation in real time without manual intervention. Operation feedback records: After each resource adjustment, the system automatically records the operation details and generates an operation log for administrator review and user feedback.

[0135] In step S306, by evaluating the accuracy and reliability of the prediction model, problems with the model can be discovered and optimized. Specifically, prediction errors can be discovered and resolved in a timely manner, and model parameters can be adjusted to improve prediction performance and results. Specifically, (1) Evaluation indicators: The mean square error (MSE) indicator is used to evaluate the performance of the model. (2) Continuous iteration: As time goes by and new data accumulates, the model is regularly retrained and adjusted to adapt to changes in the system and load. (3) Model validity test: The validity of the model can be verified by calculating the determination coefficient R2 It measures the proportion of the total variation explained by the model:

[0136]

[0137] in, is the actual resource usage of the system at time point t, is the model's predicted value of resource usage at time point t, is the actual average resource usage of the system.

[0138] In this embodiment, the resource prediction model can effectively provide accurate predictions for the dynamic resource scheduling engine, ensuring efficient resource utilization and optimization of system performance. Resource utilization is maximized through accurate prediction and flexible scheduling. The modular design makes the system easy to expand and maintain. Quickly respond to changes in resource requirements and reduce delays and performance bottlenecks.

[0139] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0140] Based on the same inventive concept, the embodiment of the present application also provides a resource scheduling device for an electric power range simulation system for implementing the resource scheduling method for the electric power range simulation system involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the resource scheduling device for one or more electric power range simulation systems provided below can be referred to the limitations of the resource scheduling method for the electric power range simulation system above, and will not be repeated here.

[0141] In an exemplary embodiment, Figure 4 As shown, a resource scheduling device for a power range simulation system is provided, comprising: a model training module 401, a demand prediction module 402, a pre-scheduling module 403 and a dynamic scheduling module 404, wherein:

[0142] The model training module 401 is used to obtain the historical operation data of the power range simulation system, and use the historical operation data to train a target resource demand prediction model; the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information;

[0143] The demand prediction module 402 is used to input the current operation data of the power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the power range simulation system when the preset prediction condition is triggered;

[0144] The pre-scheduling module 403 is used to generate a resource pre-scheduling plan for the system operation task of the power range simulation system according to the resource demand prediction information and the current operation data, and execute the resource pre-scheduling plan;

[0145] The dynamic scheduling module 404 is used to generate a resource dynamic scheduling plan, stop executing the resource pre-scheduling plan, and execute the resource dynamic scheduling plan when it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions during the execution of the resource pre-scheduling plan.

[0146] In one of the embodiments, the above-mentioned demand prediction module 402 is also used to input the current operating data of the power range simulation system into the target resource demand prediction model, and output the model prediction information; obtain the residual information corresponding to the last resource demand prediction, and determine the resource demand prediction information of the power range simulation system based on the model prediction information and the residual information.

[0147] In one of the embodiments, the above-mentioned pre-scheduling module 403 is also used to obtain the task priority of the system operation task of the power range simulation system; based on the resource demand prediction information, current operation data and task priority, generate a resource pre-scheduling plan for the system operation task of the power range simulation system.

[0148] In one embodiment, the above-mentioned pre-scheduling module 403 is also used to determine, for a high-priority system operation task, the resources allocated to the high-priority system operation task based on the current resource requirement information of the high-priority system operation task and a first preset ratio; for a medium-priority system operation task, the resources allocated to the medium-priority system operation task based on the current resource requirement information of the medium-priority system operation task and a second preset ratio; for a low-priority system operation task, the resources allocated to the low-priority system operation task based on the current resource requirement information of the low-priority system operation task, or suspend the operation of the low-priority system operation task; wherein the first preset ratio is greater than the second preset ratio.

[0149] In one of the embodiments, the above-mentioned dynamic scheduling module 404 is also used to reduce the resources allocated to low-priority system operation tasks and medium-priority system operation tasks, or suspend the operation of low-priority system operation tasks when the current operation data of the power range simulation system is greater than a first preset threshold value; and to resume the operation of the suspended low-priority system operation tasks, or increase the resources allocated to high-priority system operation tasks and medium-priority system operation tasks when the current operation data of the power range simulation system is less than a second preset threshold value; wherein the first preset threshold value is greater than the second preset threshold value.

[0150] In one of the embodiments, the above-mentioned model training module 401 is also used to obtain an initial resource demand prediction model and a value range of a hyperparameter in the initial resource demand prediction model; determine the target hyperparameter within the value range of the hyperparameter based on historical operation data and the initial resource demand prediction model; and train the target resource demand prediction model based on historical operation data, the initial resource demand prediction model and the target hyperparameter.

[0151] In one of the embodiments, the above-mentioned model training module 401 is also used to preprocess the historical operation data to obtain preprocessed historical operation data; determine statistical feature data and time series feature data based on the preprocessed historical operation data; and train a target resource demand prediction model based on the statistical feature data and time series feature data.

[0152] Each module in the resource scheduling device of the above-mentioned power range simulation system can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0153] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a resource scheduling method for a power range simulation system is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0154] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0155] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0156] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0157] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0158] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0159] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0160] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0161] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A resource scheduling method for an electric power range simulation system, characterized in that: The method comprises: Acquire historical operation data of the power range simulation system, and use the historical operation data to train a target resource demand prediction model; the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information; In the case of triggering a preset prediction condition, inputting the current operation data of the electric power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system; Generate a resource pre-scheduling plan for the system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data, and execute the resource pre-scheduling plan; During the execution of the resource pre-scheduling plan, if it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions, a resource dynamic scheduling plan is generated, the execution of the resource pre-scheduling plan is stopped, and the resource dynamic scheduling plan is executed.

2. The method according to claim 1, characterized in that The step of inputting the current operation data of the electric power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system includes: Inputting the current operation data of the electric power range simulation system into the target resource demand prediction model, and outputting the model prediction information; Obtain residual information corresponding to the last resource demand prediction, and determine resource demand prediction information of the power range simulation system based on the model prediction information and the residual information.

3. The method according to claim 1, characterized in that The generating, according to the resource demand prediction information and the current operation data, a resource pre-scheduling scheme for the electric system operation task of the electric power range simulation system comprises: Obtaining the task priority of the system operation task of the electric power range simulation system; A resource pre-scheduling plan for the system operation task of the electric power range simulation system is generated according to the resource demand prediction information, the current operation data and the task priority.

4. The method according to claim 3, characterized in that The generating, according to the resource demand prediction information, the current operation data and the task priority, a resource pre-scheduling scheme for the system operation task of the electric power range simulation system comprises: For a high-priority system operation task, determining resources allocated to the high-priority system operation task according to current resource demand information of the high-priority system operation task and a first preset ratio; For a medium-priority system operation task, determining resources allocated to the medium-priority system operation task according to current resource demand information of the medium-priority system operation task and a second preset ratio; For a low-priority system running task, determine the resources allocated to the low-priority system running task according to the current resource demand information of the low-priority system running task, or suspend the running of the low-priority system running task; Wherein, the first preset ratio is greater than the second preset ratio.

5. The method according to claim 3, characterized in that: The generating resource dynamic scheduling scheme comprises: When the current operation data of the electric power range simulation system is greater than a first preset threshold, reducing the resources allocated to the low-priority system operation tasks and the medium-priority system operation tasks, or suspending the operation of the low-priority system operation tasks; When the current operation data of the electric power range simulation system is less than a second preset threshold, resuming the operation of the suspended low-priority system operation task, or increasing the resources allocated to the high-priority system operation task and the medium-priority system operation task; Wherein, the first preset threshold is greater than the second preset threshold.

6. The method according to claim 1, characterized in that The adopting of the historical operation data to train a target resource demand prediction model includes: Obtaining an initial resource demand prediction model, and obtaining a value range of a hyperparameter in the initial resource demand prediction model; Determining a target hyperparameter within the value range of the hyperparameter according to the historical operation data and the initial resource demand prediction model; A target resource demand prediction model is trained based on the historical operation data, the initial resource demand prediction model and the target hyperparameters.

7. The method according to claim 1, characterized in that The adopting of the historical operation data to train a target resource demand prediction model includes: Preprocessing the historical operation data to obtain preprocessed historical operation data; Determining statistical characteristic data and time series characteristic data according to the preprocessed historical operation data; A target resource demand prediction model is trained based on the statistical feature data and the time series feature data.

8. A resource scheduling device for an electric power range simulation system, characterized in that: The device comprises: A model training module is used to obtain historical operation data of the power range simulation system, and use the historical operation data to train a target resource demand prediction model; the target resource demand prediction model is used to characterize the mapping relationship between the operation data and the resource demand prediction information; A demand prediction module, used for inputting the current operation data of the electric power range simulation system into the target resource demand prediction model to obtain resource demand prediction information of the electric power range simulation system when a preset prediction condition is triggered; A pre-scheduling module, used to generate a resource pre-scheduling scheme for the system operation task of the electric power range simulation system according to the resource demand prediction information and the current operation data, and execute the resource pre-scheduling scheme; The dynamic scheduling module is used to generate a resource dynamic scheduling plan, stop executing the resource pre-scheduling plan, and execute the resource dynamic scheduling plan when it is monitored that the current operating data of the power range simulation system meets the preset threshold conditions during the execution of the resource pre-scheduling plan.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Hybrid simulation method, system and equipment for network security target range of power system

    CN114996703A

  • Electric power defect image simulation method adopting heterogeneous computing resource load balancing scheduling

    CN115543626A

  • Fog computing resource pre-allocation method, device and equipment of power system and medium

    CN116996577A

  • Resource scheduling method and system for electric power target range

    CN118839915A

  • Dynamic policy adjustment based on resource consumption

    US20230106369A1