A control method, device and medium for a server device
Through sensor data acquisition, the server operation model is automatically established, and the resource allocation and processing speed is adjusted in real time, solving the problems of inactive resource allocation and low task processing efficiency in the existing technology, and achieving efficient resource utilization and task processing.
Patent Information
- Application Number
- CN202510135886.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-02-07
AI Technical Summary
The existing technology cannot dynamically adjust the resource allocation plan based on the server's real-time data running data, resulting in low resource utilization and lack of real-time evaluation of task execution difficulty and intelligent adjustment of processing speed, affecting task processing quality and efficiency.
The server's running data is collected through sensors, an operation model is automatically established, resource allocation plans are determined, and the server's processing speed in different subtasks is adjusted in real time. The data processing module combines task execution information, environmental data and data processing temperature.
It realizes the dynamic allocation of server resources and intelligent adjustment of task processing speed, improves the server's resource utilization rate and task processing efficiency, ensures that the server runs efficiently under different loads, and avoids resource waste and performance bottlenecks.
Smart Images

Figure CN119576589B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server device control, and more specifically, to a server device control method, device and medium. Background Art
[0002] In the context of the rapid development of modern information technology, the performance and efficiency of servers, as core devices for data processing and storage, directly affect the operating quality of the entire system. Traditional server control methods usually adopt a static resource allocation strategy, that is, to allocate computing resources and storage resources according to preset parameters when the server starts. However, this method cannot be dynamically adjusted according to the actual operating status and task requirements of the server, which easily leads to waste or shortage of resources. In addition, the existing task processing methods often lack accurate assessment and real-time adjustment mechanisms for the difficulty of task execution, making it difficult for the server's processing speed and efficiency to reach the optimal state when facing tasks of different complexity.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the prior art: it is impossible to dynamically adjust the resource allocation plan according to the real-time operation data of the server, resulting in low resource utilization; there is a lack of real-time evaluation of the difficulty of task execution and intelligent adjustment of the processing speed, which affects the quality and efficiency of task processing. Summary of the invention
[0004] The invention provides a control method, device and medium of a server device.
[0005] In a first aspect of the present invention, a method for controlling a server device is provided, comprising:
[0006] S1: Use sensors to collect server operation data, automatically establish a server operation model based on the data with one click, determine the server resource allocation plan, and control the server to allocate computing resources and storage resources according to the preset plan;
[0007] S2: Use sensors to collect the running data of the server after resource allocation, divide the tasks to be processed into multiple task queues according to the server processing capacity based on the running data, match one server to different task queues, and divide different task queues into multiple subtasks;
[0008] S3: Use sensors to collect execution information data of each subtask in different task queues;
[0009] S4: Control multiple servers to execute tasks according to preset task queues at the preset initial processing speed at the same time, and collect environmental information and data processing temperature through external sensors;
[0010] S5: The data processing module combines task execution information data, environmental data, and data processing temperature to adjust the processing speed of the server in different subtasks in real time;
[0011] S6: After a round of task processing is completed, the degree of task processing completion is evaluated, and whether further processing is required is determined based on the evaluation results.
[0012] Furthermore, the process of adjusting the processing speed of the server in different subtasks in real time in S5 includes:
[0013] S51: Calculating the execution difficulty of different subtasks in different task queues according to the task execution information data by the data processing module;
[0014] S52: Calculate and obtain adjusted processing speed according to execution difficulty of different subtasks in different task queues, combined with environmental data and data processing temperature data;
[0015] S53: Feedback the adjusted processing speed to the background control system, and adjust the real-time processing speed according to the real-time task progress of different servers through the background control system.
[0016] Furthermore, a monitoring unit and an analyzing unit are provided in the sensor. The monitoring unit is used to respectively monitor the execution process data of different subtasks in different task queues. The analyzing unit is used to analyze and obtain task execution information data based on the execution process data, including the task execution time and the task execution error rate.
[0017] Furthermore, the process of respectively calculating the execution difficulty of different subtasks in different task queues in S51 includes:
[0018] By the first formula:
[0019]
[0020] Calculate the execution difficulty of the i-th subtask in the a-th task queue ;
[0021] Where a is any task queue, i is any subtask, is the execution time of the ith subtask in the ath task queue, To preset the standard execution time, is the total number of executions of the ith subtask in the ath task queue, is the function affecting the number of task execution errors. Based on the test, the impact of the number of execution errors of the i-th subtask in the a-th task queue on the execution difficulty is obtained. The number of execution errors of the i-th subtask in the a-th task queue, is the first error influence function, which is set based on empirical fitting.
[0022] Further, the process of calculating the adjusted processing speed in S52 includes:
[0023] Through the second formula:
[0024]
[0025] Calculate the adjusted speed of the server in the i-th subtask in the a-th task queue ;
[0026] in, To preset the initial processing speed, To adjust the coefficient comparison table function, based on the test The value range affects the server's adjusted speed in the i-th subtask in the a-th task queue. for Standard value, is the environmental impact coefficient, and is the weight coefficient, which is set according to empirical fitting. The impact coefficient of the number of task processing passes is obtained based on the test to obtain the impact of different task processing passes on the adjusted speed of the server.
[0027] Furthermore, the process of calculating the adjusted processing speed in S52 further includes:
[0028] By formula:
[0029]
[0030] Calculate and obtain the environmental impact coefficient;
[0031] in, is the current room temperature, The current server operating temperature. is the current room wind speed influence coefficient, which is set based on experience fitting. To define a function, if X>1, then , if X≤1, then , To preset the humidity in the equipment room, is the current humidity in the computer room, for Standard value, is the second error influence function.
[0032] Furthermore, the evaluation process in S6 includes: after a round of task processing is completed, the execution difficulty of all subtasks is calculated by the first formula ;
[0033] And through the formula:
[0034]
[0035] Calculate and obtain the overall execution difficulty Q of server task processing;
[0036] Among them, b is the total number of task queues and n is the total number of subtasks.
[0037] Furthermore, the evaluation process in S6 further includes: comparing the overall execution difficulty Q of the server task processing with the preset execution difficulty Make a comparison;
[0038] like , it is judged that the overall execution difficulty of the server task processing is low, the task processing quality and efficiency meet the requirements, and the server is controlled to end the current task processing process;
[0039] like , it is judged that the overall execution difficulty of the server task processing is high, and the task processing quality and efficiency do not meet the requirements, and multiple servers are controlled to perform secondary task processing, and the processing speed of each server in the secondary task processing is adjusted again through the first formula and the second formula.
[0040] In a second aspect of the present invention, a control device for a server device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the server device control method described in the first aspect is implemented.
[0041] In a third aspect of the present invention, a computer-readable storage medium is provided, which includes instructions, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of the first aspects.
[0042] According to the above-mentioned embodiments of the present invention, at least the following beneficial effects are achieved: the server device control method and device of the present invention can realize the dynamic allocation of server resources and the intelligent adjustment of task processing speed, thereby improving the resource utilization rate and task processing efficiency of the server. By collecting server operation data in real time and establishing an operation model, the resource allocation scheme can be dynamically adjusted according to the actual workload to ensure that the server can operate efficiently under different loads. At the same time, by using task execution information data and environmental data to adjust the processing speed in real time, the server can maintain optimal performance when processing tasks of different difficulty levels, avoiding resource waste and performance bottlenecks. In addition, by evaluating the completion of task processing and performing secondary task processing based on the evaluation results, the quality and reliability of task processing can be further improved to ensure the stable operation of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0044] Figure 1 A schematic flow chart of a method for controlling a server device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0046] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0047] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0048] Reference below Figure 1 , Figure 1 FIG. 1 is a flow chart of a control method for a server device provided by an embodiment of the present invention. Figure 1 As shown, a control method 100 of a server device includes:
[0049] S1: Use sensors to collect server operation data, automatically establish a server operation model based on the data with one click, determine the server resource allocation plan, and control the server to allocate computing resources and storage resources according to the preset plan;
[0050] S2: Use sensors to collect the running data of the server after resource allocation, divide the tasks to be processed into multiple task queues according to the server processing capacity based on the running data, match one server to different task queues, and divide different task queues into multiple subtasks;
[0051] S3: Use sensors to collect execution information data of each subtask in different task queues;
[0052] S4: Control multiple servers to execute tasks according to preset task queues at the preset initial processing speed at the same time, and collect environmental information and data processing temperature through external sensors;
[0053] S5: The data processing module combines task execution information data, environmental data, and data processing temperature to adjust the processing speed of the server in different subtasks in real time;
[0054] S6: After a round of task processing is completed, the degree of task processing completion is evaluated, and whether further processing is required is determined based on the evaluation results.
[0055] First, sensors are used to collect server operation data. Based on this data, a server operation model is automatically established with one click, the server resource allocation plan is determined, and the server is controlled to allocate computing resources and storage resources according to the preset plan. The sensors mentioned here refer to various detection devices installed inside the server or connected to the server, such as temperature sensors, current sensors, performance monitoring sensors, etc. They can obtain real-time server operation status information, such as CPU usage, memory occupancy, hard disk read and write speed, etc. The server operation model is built based on these operation data to simulate the performance of the server under different workloads, thereby providing a basis for resource allocation. The resource allocation plan determines how to reasonably allocate limited computing resources (such as the number of CPU cores and memory capacity) and storage resources (such as hard disk space) to different applications or services based on the output of the model.
[0056] Specifically, the data collected by the sensor includes, but is not limited to, key performance indicators such as the server's CPU utilization, memory usage, and network bandwidth occupancy. These data are aggregated and preliminarily processed through a specific data collection module, and then input into the server operation model. The model will analyze the relationship between these data and server performance based on preset algorithms, such as linear regression, neural networks, etc., and then generate a resource allocation plan. For example, if the model predicts that an application requires more CPU resources under high load, the resource allocation plan will increase the number of CPU cores allocated to the application accordingly. The allocation of computing resources may involve virtualization technology, which divides the resources of a physical server into multiple virtual machines, and each virtual machine obtains a corresponding resource share according to the allocation plan; the allocation of storage resources may involve the configuration of a storage area network (SAN) or a network attached storage (NAS) to allocate appropriate storage space for different data storage needs.
[0057] Preferably, in order to improve the accuracy of resource allocation, a machine learning algorithm can be introduced into the model so that the model can continuously learn and optimize the allocation strategy based on historical data. For example, through a supervised learning algorithm, the model can learn which resource allocation schemes can bring the best performance in different time periods and under different business loads.
[0058] Furthermore, some dynamically adjusted parameters can be set, such as the priority of resource allocation. When the server faces sudden high-load requests, resources can be quickly reallocated according to the priority to ensure the normal operation of key businesses. At the same time, for the allocation of storage resources, the access frequency and importance of data can be considered, and faster storage media and larger storage space can be allocated for high-access frequency and key data.
[0059] In some embodiments, the process of adjusting the processing speed of the server in different subtasks in real time in S5 includes:
[0060] S51: Calculating the execution difficulty of different subtasks in different task queues according to the task execution information data by the data processing module;
[0061] S52: Calculate and obtain adjusted processing speed according to execution difficulty of different subtasks in different task queues, combined with environmental data and data processing temperature data;
[0062] S53: Feedback the adjusted processing speed to the background control system, and adjust the real-time processing speed according to the real-time task progress of different servers through the background control system.
[0063] The data processing module combines task execution information data, environmental data, and data processing temperature to adjust the server's processing speed in different subtasks in real time. The data processing module here refers to the software or hardware component in the server system that is specifically used to analyze and process various data. It can receive task execution information data from sensors, which include task execution time, error rate, etc. It also integrates environmental data, such as the temperature and humidity of the computer room, as well as the data processing temperature of the server itself. The comprehensive analysis of these data enables the data processing module to evaluate the current server's operating status and the difficulty of task execution, thereby adjusting the server's speed in processing different subtasks in real time to optimize performance and resource utilization.
[0064] Specifically, the execution time in the task execution information data refers to the time taken by the subtask from start to finish, and the error rate refers to the ratio of the number of errors that occur during the execution process to the total number of executions. Environmental data includes the temperature, humidity, wind speed, etc. of the computer room, which will affect the heat dissipation effect and hardware stability of the server. The data processing temperature refers to the real-time temperature of key components inside the server, such as the CPU, GPU, etc. Based on these data, the data processing module will calculate the execution difficulty of each subtask through a preset algorithm, and then determine whether it is necessary to adjust the processing speed of the server. For example, if the execution time of a subtask is far longer than expected, the error rate is high, and the temperature of the server is also rising, the data processing module may reduce the processing speed of the subtask to prevent the server from overheating, and reallocate resources to other subtasks.
[0065] Preferably, the data processing module can use a more intelligent algorithm, such as a neural network based on deep learning, to more accurately predict and adjust the processing speed. For example, by training a neural network model to learn the relationship between task execution information, environmental data, server temperature and processing speed in historical data. When new data is input, the model can quickly and accurately output the optimal processing speed adjustment plan.
[0066] Furthermore, for the collection of environmental data, more sensor types can be added, such as air quality sensors, vibration sensors, etc., to more comprehensively understand the impact of the computer room environment on the server. When adjusting the processing speed, you can also consider introducing a feedback mechanism to further fine-tune the speed based on the actual operating effect after adjustment to achieve more precise control.
[0067] In some embodiments, a monitoring unit and an analysis unit are provided in the sensor. The monitoring unit is used to respectively monitor the execution process data of different subtasks in different task queues. The analysis unit is used to analyze and obtain task execution information data based on the execution process data, including the task execution time and the task execution error rate.
[0068] The sensor is provided with a monitoring unit and an analysis unit. The monitoring unit is used to monitor the execution process data of different subtasks in different task queues respectively, and the analysis unit is used to analyze and obtain task execution information data, including the task execution time and the task execution error rate, based on the execution process data. The monitoring unit is a component of the sensor, responsible for collecting the original data of the server when processing each subtask in real time, such as CPU usage, memory occupancy, I / O operation frequency, etc. The analysis unit processes and analyzes these original data, extracts useful information, such as the execution time of the task, the number of errors in the execution process, etc., so that the subsequent data processing module can perform further processing and decision-making based on this information.
[0069] Specifically, the monitoring unit can use a variety of technical means to collect data. For example, for monitoring CPU usage, the performance counters provided by the operating system can be used; for monitoring memory usage, a special memory management tool can be used. These monitored data will be sent to the analysis unit regularly. After receiving the data, the analysis unit will use statistical analysis methods, such as calculating the average value, standard deviation, etc., to evaluate the execution time of the task. At the same time, by analyzing log files or error codes, the error rate during task execution is counted. For example, if a subtask generates a large number of abnormal interrupts or returns error codes during execution, the analysis unit will record these errors and calculate the error rate.
[0070] Preferably, the monitoring unit can use more advanced data collection technology, such as a distributed tracing system, to more comprehensively collect the execution data of subtasks in a distributed environment. The analysis unit can introduce machine learning algorithms, such as cluster analysis or classification algorithms, to more accurately identify abnormal patterns in task execution, thereby more accurately calculating the task execution time and error rate.
[0071] Furthermore, in order to improve the real-time and accuracy of the analysis, a data stream processing framework, such as Apache Storm or Flink, can be set up to perform real-time analysis on the data collected by the monitoring unit so that the data processing module can adjust the processing speed of the server in a timely manner according to the latest task execution information data.
[0072] In some embodiments, the process of respectively calculating the execution difficulty of different subtasks in different task queues in S51 includes:
[0073] By the first formula:
[0074]
[0075] Calculate the execution difficulty of the i-th subtask in the a-th task queue ;
[0076] Where a is any task queue, i is any subtask, is the execution time of the ith subtask in the ath task queue, To preset the standard execution time, is the total number of executions of the ith subtask in the ath task queue, is the function affecting the number of task execution errors. Based on the test, the impact of the number of execution errors of the i-th subtask in the a-th task queue on the execution difficulty is obtained. The number of execution errors of the i-th subtask in the a-th task queue, is the first error influence function, which is set based on empirical fitting.
[0077] The execution difficulty of the ith subtask in the ath task queue is calculated by the first formula. The execution difficulty here refers to a quantitative indicator to measure the complexity and challenge faced by the subtask during execution, which comprehensively considers multiple factors such as task execution time and number of errors. The first formula is a mathematical model used to convert these factors into a specific value for subsequent processing speed adjustment. The various parameters in this formula, such as subtask execution time, preset standard execution time, number of execution errors, etc., are collected by the sensor monitoring unit and calculated by the analysis unit.
[0078] Specifically, in the first formula Indicates the actual execution time of the ith subtask in the ath task queue. This is a parameter obtained directly from the server running data. It is the preset standard execution time, which is a reference value set based on historical data or ideal conditions and is used to compare whether the actual execution time exceeds expectations. It is the number of subtask execution errors, which reflects the stability of the task execution process. is the total number of subtask executions, used to calculate the error rate. Function It is the influence function of the number of task execution errors. It can weight the degree of influence of the number of errors on the execution difficulty. This function can be linear or nonlinear, and the specific form can be determined according to the actual test data. It is the first error influence function, which is used to consider the impact of other factors not explicitly listed on the execution difficulty and can usually be fitted and set based on experience.
[0079] Preferably, in order to more accurately calculate the execution difficulty, the parameters in the first formula can be set more carefully. For example, the preset standard execution time You can customize the settings based on the characteristics of different types of task queues and subtasks instead of using a unified value. , machine learning methods, such as regression analysis, can be used to train a more accurate model based on a large amount of historical data to better reflect the impact of the number of errors on the difficulty of execution.
[0080] Furthermore, for the first error influence function , more environmental factors and server status parameters can be introduced, such as server load rate, network latency, etc., to more comprehensively evaluate the execution difficulty through multi-factor analysis. At the same time, you can consider using real-time data stream processing technology, such as Apache Kafka combined with Apache Spark, to perform real-time calculation and analysis on the monitored data, so as to obtain the calculation results of the execution difficulty faster, so as to adjust the processing speed of the server in time.
[0081] In some embodiments, the process of calculating the adjusted processing speed in S52 includes:
[0082] By the second formula:
[0083]
[0084] Calculate the adjusted speed of the server in the i-th subtask in the a-th task queue ;
[0085] in, To preset the initial processing speed, To adjust the coefficient comparison table function, based on the test The value range affects the server's adjusted speed in the i-th subtask in the a-th task queue. for Standard value, is the environmental impact coefficient, and is the weight coefficient, which is set according to empirical fitting. The impact coefficient of the number of task processing passes is obtained based on the test to obtain the impact of different task processing passes on the adjusted speed of the server.
[0086] The second formula is used to calculate the adjusted speed of the server in the i-th subtask in the a-th task queue. The adjusted speed here refers to the result of dynamically adjusting the speed of the server processing subtasks according to factors such as the difficulty of task execution, environmental data, and data processing temperature. The second formula is a mathematical model that comprehensively considers multiple factors and aims to optimize the processing speed of the server to improve the efficiency and quality of task processing.
[0087] Specifically, in the second formula It is the preset initial processing speed, which is a basic speed set according to the server hardware performance and general task requirements.
[0088]
[0089] It is the adjustment coefficient comparison table function, which adjusts the execution difficulty of the subtask according to the Standard difficulty The adjustment coefficient can be determined by the ratio of . This function can be obtained by fitting experimental data to ensure that the adjusted speed can adapt to tasks of different difficulty levels. It is the environmental impact coefficient, which reflects the impact of current environmental conditions (such as temperature and humidity) on the server processing speed. and are weight coefficients used to balance the impact of different factors on processing speed. These coefficients can be adjusted based on actual tests and experience. It is the task processing pass impact coefficient, which takes into account the impact of the number of task processing times on the server speed, because as the number of processing passes increases, the server may change the processing speed due to factors such as hardware fatigue or software cache.
[0090] Preferably, in order to calculate the adjusted speed more accurately, the parameters in the second formula can be optimized. For example, the adjustment coefficient comparison table function
[0091]
[0092] The piecewise function can be used to set different adjustment strategies for different difficulty ranges. The weight coefficient can be dynamically calculated by real-time monitoring of environmental sensor data, such as the readings of the room temperature sensor and humidity sensor, combined with the server's heat dissipation model. and Dynamic adjustments can be made based on the priority of the task and the current load of the server to ensure that critical tasks have sufficient resources. In addition, the number of task processing passes affects the coefficient This can be determined by analyzing the historical performance data of the server and establishing a model that reflects the relationship between the number of processing passes and performance changes.
[0093] More specifically, machine learning algorithms, such as random forests or support vector machines, can be introduced to predict and adjust the processing speed of the server. These algorithms can learn the best performance of the server under different conditions based on historical data, and adjust the speed in real time to adapt to the current task requirements. At the same time, you can consider using high-performance computing frameworks, such as NVIDIA's CUDA or OpenCL, to speed up the calculation process of the formula, especially when processing a large number of concurrent tasks, to ensure that the server can respond quickly and adjust the processing speed.
[0094] In some embodiments, the process of calculating the adjusted processing speed in S52 further includes:
[0095] By formula:
[0096]
[0097] Calculate and obtain the environmental impact coefficient;
[0098] in, is the current room temperature, The current server operating temperature. is the current room wind speed influence coefficient, which is set based on experience fitting. To define a function, if X>1, then , if X≤1, then , To preset the humidity in the equipment room, is the current humidity in the computer room, for Standard value, is the second error influence function.
[0099] The environmental impact coefficient is calculated by formula. The environmental impact coefficient is a quantitative factor that affects the server processing speed according to the current environmental conditions of the computer room, such as temperature, humidity, and wind speed. The calculation of this coefficient takes into account the impact of the computer room environment on the server hardware performance and heat dissipation efficiency, thereby ensuring that the server can maintain the best operating state under different environmental conditions.
[0100] Specifically, the formula Indicates the current temperature of the equipment room. is the current operating temperature of the server. These two parameters can be obtained in real time through temperature sensors installed in the computer room and on the server. It is the current room wind speed influence coefficient, which reflects the influence of air flow in the room on the heat dissipation of the server. This coefficient can be determined based on the data of the wind speed sensor and the heat dissipation design of the server. Function is a defined function that is used to calculate the ratio of the input
[0101]
[0102] To calculate the environmental impact coefficient, if the ratio is greater than 1, the function output is equal to the ratio; if the ratio is less than or equal to 1, the function output is 1. It is the preset standard humidity value of the computer room. is the current humidity in the equipment room. These two parameters are obtained through the humidity sensor. It is the standard value of humidity and is used as a basis for calculating the effects of humidity. It is the second error influence function, which is used to consider the influence of other environmental factors that are not explicitly listed on the environmental influence coefficient. It can usually be fitted and set based on experience.
[0103] Preferably, in order to more accurately calculate the environmental impact coefficient, the parameters in the formula can be set and optimized more carefully. For example, the wind speed impact coefficient of the machine room It can be dynamically adjusted according to the air conditioning system and ventilation layout of the computer room, and the optimal wind speed influence coefficient can be determined by simulating different ventilation scenarios. A more complex mathematical model, such as a piecewise function or a nonlinear function, may be used to more accurately reflect the impact of environmental conditions on server performance.
[0104] Furthermore, real-time data analysis of the environmental monitoring system can be introduced, such as using big data analysis technology to process large amounts of data collected by environmental sensors in the computer room, so as to more accurately predict the impact of environmental changes on the server. More specifically, machine learning algorithms, such as neural networks, can be considered to learn the complex relationship between environmental factors and server performance, so as to automatically adjust the environmental impact coefficient. At the same time, it is possible to consider integrating environmental perception functions into the server management system, so that the server can automatically adjust its operating parameters according to real-time environmental data, such as reducing the clock frequency or increasing the speed of the cooling fan, to adapt to different environmental conditions and ensure the stable operation of the server.
[0105] In some embodiments, the evaluation process in S6 includes: after a round of task processing is completed, the execution difficulty of all subtasks is calculated using the first formula ;
[0106] And through the formula:
[0107]
[0108] Calculate and obtain the overall execution difficulty Q of server task processing;
[0109] Among them, b is the total number of task queues and n is the total number of subtasks.
[0110] After a round of task processing is completed, the execution difficulty of all subtasks is calculated by the first formula, and the overall execution difficulty Q of the server task processing is calculated. The overall execution difficulty Q here is a comprehensive indicator used to evaluate the overall execution difficulty of all subtasks after the server completes a round of task processing. The first formula is a mathematical model for calculating the execution difficulty of a single subtask, while the calculation of the overall execution difficulty Q is to combine the execution difficulty of all subtasks to obtain a comprehensive evaluation result.
[0111] Specifically, in the first formula represents the execution difficulty of the ith subtask in the ath task queue, which is calculated by the formula mentioned above. When calculating the overall execution difficulty Q, it is necessary to summarize the execution difficulties of all subtasks in all task queues. Indicates the total number of task queues. Indicates the total number of subtasks. Calculation formula:
[0112]
[0113] It means to average the execution difficulty of the subtasks in each task queue, and then average the average values of all task queues to get the overall execution difficulty Q. This calculation process ensures that the contribution of each subtask and each task queue to the overall difficulty is taken into account.
[0114] Preferably, in order to more accurately calculate the overall execution difficulty Q, the calculation process can be refined. For example, the importance or priority of different task queues can be considered, and different weights can be assigned to each task queue, and then these weights can be taken into account when calculating the overall execution difficulty. In addition, statistical methods such as standard deviation or variance can be introduced to evaluate the distribution of subtask execution difficulty, so as to have a more comprehensive understanding of the stability and consistency of task processing.
[0115] More specifically, data visualization techniques, such as bar graphs or heat maps, can be used to display the execution difficulty of each subtask and task queue, as well as the changing trend of the overall execution difficulty Q, which helps system administrators intuitively understand the operating status of the server. At the same time, you can consider correlating the overall execution difficulty Q with the server's performance indicators (such as CPU utilization, memory usage) to further optimize the server's resource allocation and task scheduling strategy.
[0116] In some embodiments, the evaluation process in S6 further includes comparing the overall execution difficulty Q of the server task processing with the preset execution difficulty Make a comparison;
[0117] like , it is judged that the overall execution difficulty of the server task processing is low, the task processing quality and efficiency meet the requirements, and the server is controlled to end the current task processing process;
[0118] like , it is judged that the overall execution difficulty of the server task processing is high, and the task processing quality and efficiency do not meet the requirements, and multiple servers are controlled to perform secondary task processing, and the processing speed of each server in the secondary task processing is adjusted again through the first formula and the second formula.
[0119] The overall execution difficulty Q of the server task processing is compared with the preset execution difficulty Compare to determine whether the overall quality and efficiency of server task processing meet the requirements. It is a standard value set according to server performance and task requirements, and is used as a benchmark for evaluating server task processing effects. , it can be determined whether the server needs further optimization or adjustment after completing a round of task processing.
[0120] Specifically, preset execution difficulty It can be set according to the server's hardware configuration, historical task processing data, and business needs. For example, for a high-performance server, you can set a lower , to ensure that it can handle complex tasks efficiently. The calculation method of the overall execution difficulty Q has been mentioned in the previous description, which combines the execution difficulty of all subtasks. , it is considered that the overall execution difficulty of the server task processing is low, the task processing quality and efficiency have met the requirements, and the current task processing process can be ended; if , it is considered that the overall execution difficulty is high, the task processing quality and efficiency do not meet the requirements, and secondary task processing is required, and the server processing speed is adjusted again.
[0121] Preferably, in order to improve the accuracy and flexibility of the comparison, the preset execution difficulty For example, dynamically adjust the server load and the urgency of the task. In addition, adaptive algorithms, such as fuzzy logic control or genetic algorithms, can be introduced to optimize the server's processing speed adjustment strategy. These algorithms can automatically adjust the processing speed based on the server's historical performance data and real-time operating status to achieve the best task processing effect.
[0122] More specifically, the comparison results can be combined with the energy consumption data of the server to achieve a balanced optimization of energy consumption and performance. At the same time, it is possible to consider combining the comparison process with the fault prediction and health management of the server. By analyzing the abnormal data during the task processing process, potential fault hazards can be discovered in advance, and corresponding preventive measures can be taken to ensure the stable operation of the server and efficient processing of tasks.
[0123] The above-mentioned embodiments of the present invention have the following beneficial effects: the server device control method described in the present invention can use sensors to collect the operation data of the server in real time, automatically establish an operation model and determine a resource allocation plan, thereby realizing dynamic allocation of server computing resources and storage resources, and improving resource utilization. By collecting the operation data after resource allocation, the tasks to be processed are divided into multiple task queues and matched with servers, and the tasks are divided into multiple subtasks at the same time, so that tasks can be managed and scheduled more finely, and the flexibility and efficiency of task processing can be improved. Further, the execution information data of the subtasks are collected, and the processing speed of the server in different subtasks is adjusted in real time in combination with environmental information and data processing temperature, so that the server can dynamically optimize the processing speed according to the execution difficulty of the task and environmental conditions, and ensure the quality and efficiency of task processing. In addition, by evaluating the completion of task processing and judging whether to continue processing according to the evaluation results, closed-loop control of the task processing process can be achieved, and the accuracy and reliability of task processing can be further improved.
[0124] In addition, through specific calculation formulas, such as the calculation formula for task execution difficulty and the calculation formula for adjusted processing speed, the task execution difficulty and server processing speed adjustment can be accurately quantified, providing a scientific basis for the intelligent control of the server. At the same time, the calculation of the environmental impact coefficient takes into account a variety of environmental factors such as room temperature, humidity, wind speed, etc., making the server control more comprehensive and accurate, and effectively improving the adaptability and stability of the server under different environmental conditions. Finally, by comparing the overall execution difficulty of server task processing with the preset execution difficulty, it is possible to accurately judge whether the task processing quality and efficiency meet the requirements, thereby realizing intelligent decision-making and optimized control of the server task processing process.
[0125] The computer device in some embodiments of the present invention may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
[0126] The computer device may include a processing device (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device to a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processing device, ROM, and RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.
[0127] Furthermore, the computer-readable storage medium of the embodiment of the present application has program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0128] The above descriptions are only some preferred embodiments of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.
Claims
1. A method for controlling a server device, characterized in that: The method comprises: S1: Use sensors to collect server operation data, automatically establish a server operation model based on the data with one click, determine the server resource allocation plan, and control the server to allocate computing resources and storage resources according to the preset plan; S2: Use sensors to collect the running data of the server after resource allocation, divide the tasks to be processed into multiple task queues according to the server processing capacity based on the running data, match one server to different task queues, and divide different task queues into multiple subtasks; S3: Use sensors to collect execution information data of each subtask in different task queues; S4: Control multiple servers to execute tasks according to preset task queues at the preset initial processing speed at the same time, and collect environmental information and data processing temperature through external sensors; S5: The data processing module combines task execution information data, environmental data, and data processing temperature to adjust the server processing speed in different subtasks in real time, including: S51: Calculating the execution difficulty of different subtasks in different task queues according to the task execution information data by the data processing module; S52: Calculate and obtain adjusted processing speed according to execution difficulty of different subtasks in different task queues, combined with environmental data and data processing temperature data; S53: Feedback the adjusted processing speed to the background control system, and adjust the real-time processing speed according to the real-time task progress of different servers through the background control system; S6: After a round of task processing is completed, the task processing completion degree is evaluated, and whether further processing is required is determined based on the evaluation results; The process of calculating the adjusted processing speed in S52 includes: Through the second formula: Calculate the adjusted speed T of the server in the i-th subtask in the a-th task queue ai ; Among them, t0 is the preset initial processing speed, f z To adjust the coefficient comparison table function, based on the test The value range affects the server's adjusted speed in the i-th subtask in the a-th task queue, δ aiμ is δ ai standard value, θ is the environmental impact coefficient, y1 and y2 are weight coefficients, which are set according to empirical fitting, ω is the task processing number impact coefficient, and the impact of different task processing numbers on the adjusted server speed is obtained based on the test; δ ai is the execution difficulty of the i-th subtask in the a-th task queue; Also includes: By formula: Calculate and obtain the environmental impact coefficient; Among them, s wwd is the current room temperature, c lwd is the current server operating temperature, σ is the current room wind speed influence coefficient, which is set based on empirical fitting, and f c To define a function, if X>1, then f c (X) = X, if X ≤ 1, then f c (X) = 1, sd1 is the preset humidity of the computer room, sd is the current humidity of the computer room, sd μ is the sd standard value, and β is the second error influence function.
2. A method for controlling a server device according to claim 1, characterized in that: The sensor is provided with a monitoring unit and an analyzing unit. The monitoring unit is used to monitor the execution process data of different subtasks in different task queues respectively. The analyzing unit is used to analyze and obtain task execution information data according to the execution process data, including the task execution time and the task execution error rate.
3. A method for controlling a server device according to claim 2, characterized in that: The process of respectively calculating the execution difficulty of different subtasks in different task queues in S51 includes: By the first formula: Calculate the execution difficulty δ of the i-th subtask in the a-th task queue ai ; Among them, a is any task queue, i is any subtask, h dai is the execution time of the ith subtask in the ath task queue, h d1 is the preset standard execution time, S ai is the total number of executions of the ith subtask in the ath task queue, f x is the impact function of the number of task execution errors. Based on the test, the impact of the number of execution errors of the i-th subtask in the a-th task queue on the execution difficulty is obtained. ρ ai is the number of execution errors of the i-th subtask in the a-th task queue, ∈ ai is the first error influence function, which is set based on empirical fitting.
4. A method for controlling a server device according to claim 1, characterized in that: The evaluation process in S6 includes: after a round of task processing is completed, the execution difficulty δ of all subtasks is calculated by the first formula ai ; And through the formula: Calculate and obtain the overall execution difficulty Q of server task processing; Among them, b is the total number of task queues and n is the total number of subtasks.
5. A method for controlling a server device according to claim 4, characterized in that: The evaluation process in S6 also includes: comparing the overall execution difficulty Q of the server task processing with the preset execution difficulty Q x Make a comparison; If Q x , it is judged that the overall execution difficulty of the server task processing is low, the task processing quality and efficiency meet the requirements, and the server is controlled to end the current task processing process; If Q>Q x , it is judged that the overall execution difficulty of the server task processing is high, and the task processing quality and efficiency do not meet the requirements, and multiple servers are controlled to perform secondary task processing, and the processing speed of each server in the secondary task processing is adjusted again through the first formula and the second formula.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, a control method for a server device as described in any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement a control method for a server device as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Task processing device and method, terminal equipment and readable storage medium
CN111813557A
Parallel programming method for diversified computing task requirements
CN119065643A
Dynamic task scheduling method and device, server and storage medium
CN119336466A
Task scheduling method
JP2003248591A