Method, device, equipment and storage medium for batch execution of configuration update tasks
By using host and server resource parameters to generate batch execution gradients in data center configuration update tasks, executing them step by step and manually reviewing them, we can solve the problems of configuration errors and low resource utilization, and improve the security and resource utilization of configuration updates.
Patent Information
- Application Number
- CN202510953808.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-07-10
AI Technical Summary
During the large-scale configuration update process of the data center, the existing technology has the problem that even after the configuration error verification passes the verification code, a large number of server configuration errors still occur, and the concurrency does not match the server hardware resources, resulting in low resource utilization or system lag.
After detecting the configuration update task, combined with the host resource parameters and server hardware resource parameters, multiple incremental execution batches are generated to gradually execute the configuration update task. After each batch is completed, manual review is performed to ensure that the configuration is correct before the next batch of server updates is carried out.
This avoids large-scale failures during the configuration update process, fully utilizes resources, improves the security and accuracy of configuration updates, and reduces the risk of systemic operation and maintenance accidents.
Smart Images

Figure CN120447934B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a method, apparatus, device, and storage medium for executing configuration update tasks in batches. Background Art
[0002] During large-scale configuration updates in data centers, server security must be ensured. If staff misjudge the risk level, select the wrong execution object, or perform excessive concurrent operations during the configuration update process, this can easily lead to systemic operational and maintenance incidents.
[0003] Related technologies use verification codes to verify the feasibility of operations. However, even in the case of configuration errors, verification codes can still pass, which can cause configuration errors on a large number of servers during batch configuration updates. If configuration updates are performed on a fixed number of servers simultaneously, the mismatch between the number of concurrent servers and the server hardware resources can lead to insufficient or excessive resource usage, resulting in low resource utilization or lag. Summary of the Invention
[0004] The present application provides a method, apparatus, device and storage medium for executing configuration update tasks in batches, in order to at least solve the problem in the related art that batch configuration updates are prone to causing configuration errors in a large number of servers at the same time.
[0005] The present application provides a method for executing configuration update tasks in batches, including: if a configuration update task is detected, determining the task attributes corresponding to the configuration update task; obtaining host machine resource parameters and hardware resource parameters associated with the server; determining an execution gradient based on the task attributes, host machine resource parameters and hardware resource parameters, wherein the execution gradient includes at least two execution batches executed in sequence, and the number of servers corresponding to each execution batch increases in sequence; selecting a corresponding number of target servers to execute the configuration update task based on the number of servers in the first execution batch; obtaining operating status data and actual configuration data of the target servers; outputting the operating status data and actual configuration data; if a confirmation instruction corresponding to the operating status data and the actual configuration data is detected, repeating the steps of selecting a corresponding number of target servers to execute the configuration update task based on the number of servers corresponding to the next execution batch, until a confirmation instruction is received after the last execution batch is completed, and all remaining servers are used to execute the configuration update task.
[0006] The present application also provides a batch execution device for configuration update tasks, including: an attribute determination module, which is used to determine the task attributes corresponding to the configuration update task if a configuration update task is detected; a parameter acquisition module, which is used to obtain the host machine resource parameters and the hardware resource parameters of the server; a gradient determination module, which is used to determine the execution gradient according to the task attributes, the host machine resource parameters and the hardware resource parameters, wherein the execution gradient includes at least two execution batches executed in sequence, and the number of servers corresponding to each execution batch increases in sequence; a task execution module, which is used to select a corresponding number of target servers to execute the configuration update task according to the number of servers in the first execution batch; a data acquisition module, which is used to obtain the operating status data and actual configuration data of the target server; a data output module, which is used to output the operating status data and the actual configuration data; a repeated execution module, which is used to repeat the steps of selecting a corresponding number of target servers to execute the configuration update task according to the number of servers corresponding to the next execution batch, until a confirmation instruction is received after the last execution batch is completed, and all remaining servers are used to execute the configuration update task.
[0007] The present application also provides a device for executing configuration update tasks in batches, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned methods for executing configuration update tasks in batches when executing the computer program.
[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the batch execution method of any of the above-mentioned configuration update tasks are implemented.
[0009] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for executing configuration update tasks in batches.
[0010] Through this application, after detecting the configuration update task, an execution gradient containing multiple execution batches is generated by combining the host machine resource parameters, the hardware resource parameters associated with the server and the task attributes, and the number of servers in the execution batch increases successively, so that the configuration update task is executed in batches, starting with a small number of servers to avoid large-scale failures, and the generated execution gradient is related to the host machine resource parameters, the hardware resource parameters associated with the server and the task attributes, making full use of resources while ensuring security, and only after the configuration of the completed server is confirmed to be correct will the configuration update of the next batch of servers be performed, thereby increasing the security of the configuration update. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 A schematic diagram of an application scenario of the method for executing configuration update tasks in batches provided in an embodiment of the present application;
[0013] Figure 2 A flowchart of a method for executing configuration update tasks in batches provided in an embodiment of the present application;
[0014] Figure 3 A schematic diagram of the structure of a device for executing configuration update tasks in batches provided in an embodiment of the present application;
[0015] Figure 4 A structural diagram of a device for executing configuration update tasks in batches provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0017] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0018] First, some explanation of terms:
[0019] Out-of-band management is a mechanism for remotely monitoring, configuring, and controlling server hardware through a dedicated channel independent of the server's primary business network. Its core principle is that it is independent of the server's operating system or primary network status, allowing for low-level operations even in the event of server downtime or network outages.
[0020] In-band management relies on the server operating system and the primary service network interface (such as an Ethernet port) to implement management functions through conventional network protocols. For example, an administrator connects to the server's IP address through Secure Shell (SSH) to perform configuration operations. In this case, management data and service data share the same network link.
[0021] In large-scale data center operations and maintenance, server security is crucial. If operations personnel misjudge risk levels, select the wrong operation targets, or perform excessive concurrent operations, systemic operations and maintenance incidents can easily occur.
[0022] While existing technologies can verify the feasibility of operations using verification codes, configuration errors can also be detected during configuration changes, leading to configuration anomalies on a large number of servers during batch operations. Furthermore, if configuration update tasks are executed simultaneously on a fixed number of servers, the concurrency mismatch between the number of concurrent servers and the server hardware resources can easily lead to underutilization or overload, resulting in low utilization and system lag.
[0023] In response to the above technical problems, the inventors proposed the following technical concept: combining the host machine resource parameters and the server's hardware resource parameters to generate layered execution batches, the number of servers corresponding to each execution batch gradually increases, and after each execution batch is completed, the operation status data is manually reviewed until the last batch is completed, and all remaining servers are used to execute the configuration update task.
[0024] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0025] In conjunction with the specific application environment architecture or specific hardware architecture on which the batch execution method of the configuration update task depends, the specific application environment architecture or specific hardware architecture is described here. Figure 1 , Figure 1 Schematic diagram of the application scenario of the batch execution method of the configuration update task provided in the embodiment of the present application. Figure 1 As shown, the scenario includes a host machine 101 , a support device 102 and multiple servers 103 .
[0026] The host machine may be a computer, a laptop, or a server.
[0027] Support devices may include switches, power supplies, etc., which are used to provide hardware support to the server.
[0028] The host machine communicates with the server through the switch in the supporting device and is used to operate and maintain the server according to the configuration update tasks.
[0029] Figure 2 Schematic diagram of the flow of the batch execution method of the configuration update task provided in the embodiment of the present application. Figure 2 As shown, the embodiment of the present application provides a method for executing configuration update tasks in batches, and the method is described in detail as follows:
[0030] S201: If a configuration update task is detected, determine the task attributes corresponding to the configuration update task.
[0031] This step may include detecting a configuration update task input by a user, monitoring a user change to a configuration parameter, or clicking a button related to a configuration parameter, and determining the task attributes corresponding to the configuration update task. Determining the task attributes corresponding to the configuration update task may also include searching for a pre-stored correspondence between task information and task attributes based on the task information of the configuration update task to obtain the task attributes corresponding to the configuration update task.
[0032] The correspondence between task information and task attributes can be preset by the staff and stored in a table, key-value pair or other format.
[0033] S202: Obtain host resource parameters and server-associated hardware resource parameters.
[0034] In this step, the host resource parameters can be read from a preset location. The server-related hardware resource parameters can be read from the supporting device, or calculated by combining the parameters read from the supporting device and preset values.
[0035] Host resource parameters include the number of CPU cores and memory size of the host. Hardware resource parameters include the ratio of power consumption to the preset upper limit, the ratio of multi-path redundancy (MPR) to the preset reference value, and the total number of servers.
[0036] S203: Determine an execution gradient based on task attributes, host resource parameters, and hardware resource parameters, wherein the execution gradient includes at least two execution batches executed sequentially, and the number of servers corresponding to each execution batch increases sequentially.
[0037] In this step, it includes finding the correspondence between task attributes and risk values according to task attributes to obtain the risk value, and using the risk value, host resource parameters and hardware resource parameters to calculate the comprehensive score, wherein the comprehensive score is positively correlated with the host resource parameters and hardware resource parameters, and negatively correlated with the risk value. According to the target comprehensive score range in which the comprehensive score is located, the correspondence between the comprehensive score range and the execution gradient is found to obtain the corresponding execution gradient.
[0038] S204: According to the number of servers in the first execution batch, a corresponding number of target servers are selected to execute the configuration update task.
[0039] In this step, for example, if the number of servers in the first execution batch is 1, one server can be randomly selected as the target server, and the target server can be used to execute the above-mentioned configuration update task to be executed. For another example, if the number of servers in the first execution batch is 3, three servers can be randomly selected as the target servers, and the target server can be used to execute the above-mentioned configuration update task to be executed.
[0040] S205: Obtain the operating status data and actual configuration data of the target server.
[0041] In this step, the operating status data may include whether the device network status is normal, whether the fan status is normal, whether the server identification is normal, whether the power supply meets expectations, etc. The actual configuration data may include configuration parameters in the server configuration file.
[0042] S206: Outputting operation status data and actual configuration data.
[0043] In this step, the operating status data and the actual configuration data may be displayed and output, sent to a staff member's terminal, or stored in a storage unit.
[0044] S207: If a confirmation instruction corresponding to the operating status data and the actual configuration data is detected, the steps of selecting a corresponding number of target servers to perform the configuration update task are repeated according to the number of servers corresponding to the next execution batch, until a confirmation instruction is received after the last execution batch is completed, and all remaining servers are used to perform the configuration update task.
[0045] In this step, the confirmation instruction may be input by the staff after confirming that there are no problems with the running status data and the actual configuration data. The step of selecting a corresponding number of target servers to execute the configuration update task may be the above-mentioned step S204.
[0046] For example, if the number of servers in the next execution batch after receiving the confirmation command is 5, then 5 servers that have not yet been executed will be selected to perform the configuration update task. For another example, if there are 100 servers that need to be updated, and the current execution gradient corresponds to 4 execution batches: 1, 3, 7, and 10, then after the last batch (10 servers) is completed and the confirmation command is detected, the configuration update task will be performed on the remaining 79 servers.
[0047] In a possible implementation, after any batch is executed, if a skip instruction is detected, all remaining servers are directly used to execute the configuration update task.
[0048] From the description of the above embodiments, it can be seen that the embodiments of the present disclosure generate an execution gradient containing multiple execution batches by combining the host machine resource parameters, the hardware resource parameters associated with the server and the task attributes after detecting the configuration update task, and the number of servers in the execution batch increases successively, so that the configuration update task is executed in batches, starting with a small number of servers to avoid large-scale failures, and the generated execution gradient is related to the host machine resource parameters, the hardware resource parameters associated with the server and the task attributes, making full use of resources while ensuring security, and only after the configuration of the completed server is confirmed to be correct will the configuration update of the next batch of servers be performed, thereby increasing the security of the configuration update.
[0049] In a possible implementation, in the above step S203 , determining the execution gradient according to the task attributes, host machine resource parameters, and hardware resource parameters includes: steps S2031 to S2034 .
[0050] S2031: Determine the security level coefficient and dynamic attenuation coefficient based on task attributes and hardware resource parameters.
[0051] In this step, the pre-stored corresponding relationship is searched according to the task attributes and hardware resource parameters to obtain the corresponding security level coefficient and dynamic attenuation coefficient.
[0052] S2032: Determine a resource utilization value, a security suppression value, and a network gain value based on task attributes, host machine resource parameters, and hardware resource parameters.
[0053] In this step, the host machine resource parameters may include the number of processing unit cores and the memory size, and the resource utilization value is determined based on the number of processing unit cores and the memory size; the task attributes may include the energy consumption operation judgment value, the restart judgment value, the clear judgment value and the mount judgment value, and the safety suppression value is determined based on the energy consumption operation judgment value, the restart judgment value, the clear judgment value and the mount judgment value; the hardware resource parameters include the multi-path redundancy index and the total number of servers, and the task attributes may also include the file size score and the mount judgment value, and the network gain value is determined based on the multi-path redundancy index, the total number of servers, the file size score, the mount judgment value and the number of processing unit cores.
[0054] S2033: Calculate the attenuation correction value based on the task attributes, safety level coefficient, dynamic attenuation coefficient, resource utilization value, safety suppression value and network gain value.
[0055] In this step, the resource utilization value and the network gain value are multiplied by the corresponding weight and then divided by the security suppression value to obtain the gain parameter, and the gain parameter is multiplied by the security level coefficient, dynamic attenuation coefficient, management type and the corresponding judgment value of whether automatic verification is supported to obtain the attenuation correction coefficient.
[0056] S2034: According to the attenuation correction value, the corresponding relationship between the attenuation correction value range and the execution gradient is searched to obtain the execution gradient.
[0057] This step includes determining a target attenuation correction value range corresponding to the attenuation correction value, and searching for a corresponding relationship between the attenuation correction value range and the execution gradient based on the target attenuation correction value range to obtain the execution gradient.
[0058] Determining the target attenuation correction value range corresponding to the attenuation correction value includes determining the attenuation correction value range where the minimum value of the range is less than the attenuation correction value and the maximum value of the range is greater than the attenuation correction value as the target attenuation correction value range. The corresponding relationship between the attenuation correction value range and the execution gradient is, for example:
[0059]
[0060] R represents the execution gradient, which is divided into three levels based on the decay correction value T. As the decay correction value increases, it is divided into conservative, intermediate, and aggressive plans to address different concurrent scenarios. The execution gradient can also be divided into more levels based on the decay correction value, and each level can also be composed of more execution batches.
[0061] From the description of the above embodiments, it can be seen that the embodiments of the present disclosure obtain the security level coefficient and dynamic attenuation coefficient of the task based on the task attributes and hardware resource parameters, and determine the resource utilization value, security inhibition value and network gain value based on the task attributes, host resource parameters and hardware resource parameters, so that the execution gradient determined subsequently can combine security and hardware performance, task attributes, security level coefficient, dynamic attenuation coefficient, resource utilization value, security inhibition value and network gain value to obtain the attenuation correction value, and determine the execution gradient based on the attenuation correction value, so as to realize the use of different execution gradients under different security levels and different hardware indicators, so that the number of servers in each execution batch in the execution gradient is more reasonable.
[0062] In one possible implementation, task attributes include an energy-intensive operation determination value, a restart determination value, a hard drive clearing determination value, an image mount determination value, a verification determination value, a management type value, and a file size score. Host resource parameters include the number of processing unit cores and memory size. Hardware resource parameters include multipath redundancy, power consumption, and the total number of servers.
[0063] Each determination value can be 1 (or 2, 3, etc., which can be pre-set by staff based on experimental data) if the determination result is yes, and 0 otherwise. The management type value can correspond to the management type. If it is in-band management, the first management type value is used; if it is out-of-band management, the second management type value is used. Both the first management type value and the second management type value can be pre-set by staff based on experimental data. Host resource parameters can be obtained through commands or read from a preset location. The multipath redundancy index is an abstract indicator used to evaluate whether the topology supports the immediate launch of large-scale data distribution tasks. It is used to represent the complex structure of the data center network topology. The real-time multipath redundancy value is calculated by multiplying the number of parallel paths from the host to the server by the average path bandwidth, and then dividing it by the total number of nodes. In this embodiment of the present application, the real-time multipath redundancy value is divided by a preset baseline value (the multipath redundancy value under the network topology with normal server operation) to obtain the multipath redundancy index. The power consumption index is obtained by dividing the current server power consumption by the power consumption baseline value (the power consumption under normal server operation). The file size score is calculated by finding the correspondence between the file size range and the file size score based on the size of the file to be transferred. If an image file is not required, the file size can be set to 0. The correspondence between the file size range and the file size score can be pre-set by the staff based on experimental data or empirical parameters.
[0064] For example, if it is monitored that the configuration update task includes a high energy consumption operation, the energy consumption operation determination value is 1; if the configuration update task needs to be restarted, the restart determination value is 1.
[0065] In one possible implementation, task attributes, host resource parameters, and hardware resource parameters are shown in the following table:
[0066] Table 1 Hardware resource parameter table
[0067]
[0068] Among them, "bool(1 / 0)" means taking 1 or 0 according to the judgment result. If the judgment result is yes, it takes 1, otherwise it takes 0.
[0069] In a possible implementation, in the above step S2031, the security level coefficient and the dynamic attenuation coefficient are determined according to the task attributes and hardware resource parameters, including: step S311 to step S314.
[0070] S311: If the restart determination value or the clear determination value is the first preset value, the first safety factor is determined as the safety level factor, otherwise the second safety factor is determined as the safety factor, wherein the first safety factor is less than the second safety factor, and the first preset value is the corresponding preset value for the determination result.
[0071] In this step, if the restart threshold or clear threshold is 1 (restart or disk clear required), the configuration update task is determined to contain a high-risk operation. Examples of the first safety factor are 0.2, 0.1, 0.3, etc. Examples of the second safety factor are 1, 2, 3, etc. The first and second safety factors can be pre-set by staff based on experimental data.
[0072] S312: Calculate an exponent value with a preset base as the base and a negative number of the square of the power consumption index as the exponent to obtain a power consumption index value.
[0073] In this step, the preset base number can be pre-set by the staff based on experimental data.
[0074] This step can be expressed as .
[0075] Where P1 represents the power consumption index value, e is the preset base number, and P represents the power consumption index.
[0076] S313: Obtain a dynamic attenuation factor by subtracting the product of the square of the clearing determination value and a preset coefficient from the second preset value.
[0077] In this step, the second preset value may be preset by the staff based on experimental data.
[0078] This step can be expressed as:
[0079]
[0080] Wherein, D1 represents the dynamic attenuation factor, a represents the second preset value, b represents the preset coefficient, and D represents the clearing determination value.
[0081] S314: Multiply the power consumption index value by the dynamic attenuation factor to obtain a dynamic attenuation coefficient.
[0082] For example, if the power consumption index value is 0.96 and the dynamic attenuation factor is 1, the dynamic attenuation coefficient is 0.96. For another example, if the power consumption index value is 0.86 and the dynamic attenuation factor is 0.5, the dynamic attenuation coefficient is 0.43.
[0083] In a possible implementation, steps S311 to S314 can be expressed as follows:
[0084] Wherein, β represents the dynamic attenuation coefficient, the preset base value is e, P represents the power consumption index, the second preset value is 1, the preset coefficient is 0.5, and D represents the clearing determination value.
[0085] From the description of the above embodiments, it can be seen that in the process of calculating the dynamic attenuation factor, the embodiment of the present disclosure strengthens the power consumption index through the square term, so that the dynamic attenuation coefficient increases rapidly as the power consumption decreases, thereby reducing the concurrency suppression of low-power scenarios in the subsequent calculation of the attenuation correction value and determining the execution gradient according to the attenuation correction value. The lower the power consumption operation, the greater the concurrency obtained.
[0086] In a possible implementation, the above step S2032 determines the resource utilization value, the security suppression value, and the network gain value according to the task attributes, the host resource parameters, and the hardware resource parameters, including: steps S321 to S330.
[0087] S321: Determine the quotient of the number of processing unit cores and a preset divisor as a processing unit coefficient.
[0088] In this step, the preset divisor may be a value determined by the staff based on experimental data.
[0089] The preset divisor is, for example, 2, 4, 6, 8, etc.
[0090] S322: Calculate a memory correction value of the memory size.
[0091] This step includes multiplying the memory size by a preset coefficient, or subtracting a preset value from the memory size and then dividing the result by another preset value.
[0092] S323: Determine a memory coefficient based on the memory correction value;
[0093] In this step, the memory correction value is used as an independent variable of the hyperbolic tangent function, the value of the hyperbolic tangent function is calculated, and the value of the hyperbolic tangent function is added to the preset value to obtain the memory coefficient.
[0094] S324: Multiply the processing unit coefficient and the memory coefficient to obtain a resource utilization value.
[0095] For example, if the processing unit factor is 4 and the memory factor is 1.5, the resource utilization value is 6. For another example, if the processing unit factor is 2 and the memory factor is 1.2, the resource utilization value is 2.4.
[0096] In a possible implementation, steps S321 to S324 can be expressed as follows:
[0097]
[0098] Where f1 represents the resource utilization value, C represents the number of processing unit cores, the preset divisor is 4, tanh represents the hyperbolic tangent function, and M is the memory size.
[0099] Resource utilization is used to elastically scale the number of concurrent connections. However, the number of concurrent connections cannot increase linearly with the memory size and the number of processing unit cores. Memory, in particular, varies significantly between different hosts. Therefore, we need to map the memory size to a nonlinear range to adjust the number of concurrent connections. Therefore, we use the hyperbolic tangent function to smooth the impact of increased memory on the number of concurrent connections, using 16GB as the benchmark for a smooth increase.
[0100] S325: Determine the respective determination influence coefficients corresponding to the energy consumption operation determination value, the restart determination value, the clear determination value, and the mount determination value.
[0101] In this step, the influence coefficients corresponding to the energy consumption operation determination value, the restart determination value, the clear determination value, and the mount determination value can be obtained by searching for corresponding relationships or calculated using the following formula:
[0102]
[0103] In the formula, the determination influence coefficient corresponding to different determination values is calculated according to the different values of k. For example, if k is 1, the determination influence coefficient corresponding to the energy consumption operation determination value is calculated. k Indicates the weights corresponding to different judgment values, X k Indicates the value of the judgment value itself. Indicates the judgment influence coefficient corresponding to k.
[0104] For example, the judgment influence coefficient corresponding to the energy consumption operation judgment value is , a1=0.3. The decision influence coefficient corresponding to the restart decision value is , a2=0.5. The influence coefficient of the clear judgment value is , a3=1.2. The impact coefficient corresponding to the mount determination value is , a4=0.4.
[0105] a k The value of can be pre-set by the staff according to the experimental data. For example, a1 can be 0.35, 0.4, etc., a2 can be 0.45, 0.6, etc., a3 can be 1.3, 1.7, etc., and a4 can be 0.2, 0.45, etc.
[0106] S326: Multiply the determination influence coefficients to obtain a determination coefficient product.
[0107] For example, currently only the clear determination value is 1, and the determination coefficient product is:
[0108] =0.45
[0109] S327: Subtract the product of the determination coefficient from the third preset value to obtain a safety suppression value.
[0110] In this step, the third preset value, such as 1, 2, 3, etc., can be a value calibrated by the staff based on experimental data.
[0111] The above steps S325 to S327 can be expressed as the following formula:
[0112]
[0113] Where f2 represents the safety suppression value, and k takes E, R, D, and I to correspond to the energy consumption operation judgment value, restart judgment value, clear judgment value, and mount judgment value, respectively. represents the corresponding weight, Indicates the energy consumption operation judgment value, restart judgment value, clear judgment value, or mount judgment value.
[0114] S328: Divide the multipath redundancy index by the total number of servers to obtain a path occupancy ratio.
[0115] For example, if the multipath redundancy index is 1.8 and the total number of servers is 100, the path occupancy ratio is 0.018. For another example, if the multipath redundancy index is 2.5 and the total number of servers is 150, the path occupancy ratio is 0.017.
[0116] S329: Multiply the file size score by the mount determination value, and then divide the result by the number of processing unit cores to obtain a file processing coefficient.
[0117] In this step, for example, if the file size score is 2, the mount determination value is 0, and the number of processing unit cores is 8, the file processing coefficient is 0. For another example, if the file size score is 1, the mount determination value is 1, and the number of processing unit cores is 8, the file processing coefficient is 0.125.
[0118] S330: Subtract the file processing coefficient from the fourth preset value, and multiply the result by the path occupancy ratio to obtain a network gain value.
[0119] In this step, the fourth preset value may be a value pre-calibrated by the staff based on experimental data or experience.
[0120] The above steps S328 to S330 can be expressed as:
[0121]
[0122] Where f3 represents the network gain value, N represents the multipath redundancy index, Number represents the total number of servers, F represents the file size score, I represents the mount judgment value, and C represents the number of processing unit cores.
[0123] From the description of the above embodiments, it can be seen that the embodiments of the present disclosure control the size of the resource utilization value by combining the number of processing units and the memory size to avoid occupying and using too many resources in the subsequent situation where the number of processing units and the memory size are insufficient. In combination with the security-related judgment value, the security suppression value is calculated to avoid maintaining too many servers at one time in the subsequent situation where the risk is high. In combination with the path redundancy degree, the mounting judgment degree and the number of processing unit cores, the network gain is determined to make better use of hardware resources in the subsequent configuration update process.
[0124] In one possible implementation, step S2033 calculates the attenuation correction value based on the task attributes, the safety level coefficient, the dynamic attenuation coefficient, the resource utilization value, the safety suppression value, and the network gain value, including:
[0125] S20331: Determine a comprehensive correction value based on the resource utilization value, the safety suppression value, and the network gain value.
[0126] In this step, the resource utilization value is added to the network gain value, and then the security suppression value is subtracted to obtain a comprehensive correction value.
[0127] S20332: Multiply the dynamic attenuation coefficient, the comprehensive correction value, the safety level coefficient, the management type value and the verification judgment value to obtain the attenuation correction value.
[0128] In this step, for example, if the dynamic attenuation coefficient is 0.426, the comprehensive correction value is 0.23, the safety level coefficient is 0.2, the management type value is 10, and the inspection judgment value is 10, then the attenuation correction value is approximately 2.
[0129] From the description of the above embodiments, it can be seen that the embodiments of the present disclosure obtain an attenuation correction value by integrating various risk judgment data and hardware resource data, so that the execution gradient determined by the attenuation correction value meets the hardware resource conditions while ensuring security.
[0130] In a possible implementation, S20331 determines a comprehensive correction value according to the resource utilization value, the security suppression value, and the network gain value, including: S20331A or S20331B.
[0131] S20331A: Multiply the first preset power of the resource utilization value by the network gain, and then divide the result by the sum of the fifth preset value and the second preset power of the safety suppression value to obtain a comprehensive correction value.
[0132] In this step, the first preset power, the second preset power and the fifth preset value can be calibrated by the staff based on experimental data or experience parameters.
[0133] The first preset power is, for example, 1.3, 1.5, 1.7, etc., and the second preset power is, for example, 0.6, 0.8, 0.9, etc.
[0134] This step can be expressed as follows:
[0135]
[0136] Wherein, W represents the comprehensive correction value, f1 represents the resource utilization value, j represents the first preset power, f3 represents the network gain, k represents the fifth preset value, f2 represents the safety suppression value, and m represents the second preset power.
[0137] S20331B: Weighted sum of the resource utilization value, the security suppression value, and the network gain value to obtain a comprehensive correction value.
[0138] In this step, the weights corresponding to the resource utilization value, the safety suppression value, and the network gain value may be calibrated by the staff based on experimental data or empirical parameters.
[0139] From the description of the above embodiments, it can be seen that the embodiment of the present disclosure calculates a comprehensive correction value by combining the resource utilization value, the security suppression value and the network gain value, so that the correction value integrates the hardware attributes and the security attributes, thereby making the subsequent execution gradient more reasonable.
[0140] In one possible implementation, the dynamic attenuation coefficient is calculated as follows:
[0141]
[0142] Wherein, β represents the dynamic attenuation coefficient, the preset base value is e, P represents the power consumption index, the second preset value is 1, the preset coefficient is 0.5, and D represents the clearing determination value.
[0143] Resource utilization values are calculated as follows:
[0144]
[0145] Where f1 represents the resource utilization value, C represents the number of processing unit cores, the preset divisor is 4, tanh represents the hyperbolic tangent function, and M is the memory size.
[0146] The safety suppression value is calculated as follows:
[0147]
[0148] Where f2 represents the safety suppression value, and k takes E, R, D, and I to correspond to the energy consumption operation judgment value, restart judgment value, clear judgment value, and mount judgment value, respectively. represents the corresponding weight, Indicates the energy consumption operation judgment value, restart judgment value, clear judgment value, or mount judgment value.
[0149] The network gain value is calculated as follows:
[0150]
[0151] Where f3 represents the network gain value, N represents the multipath redundancy index, Number represents the total number of servers, F represents the file size score, I represents the mount judgment value, and C represents the number of processing unit cores.
[0152] The dynamic attenuation coefficient is calculated as follows:
[0153]
[0154] T represents the attenuation correction value, β represents the dynamic attenuation coefficient, The whole represents the comprehensive correction value, S represents the safety level coefficient, Indicates the management type value, and A indicates the verification judgment value.
[0155] When the parameter values of each parameter are as shown in Table 1, the calculated attenuation correction value is approximately 2. According to the correspondence between the attenuation correction value range and the execution gradient shown in step S2034, the most conservative gradient "1-2-5-10" is obtained, that is, one server is used to execute the configuration update task for the first time, two servers are used to execute the configuration update task for the second time, five servers are used to execute the configuration update task for the third time, and ten servers are used to execute the configuration update task for the fourth time.
[0156] When the hard disk clearing judgment value is changed from 1 to 0 (that is, no disk clearing is required), and the restart judgment value is changed from 0 to 1 (from no restart required to restart required), the new calculation results are:
[0157] β= 0.96
[0158]
[0159]
[0160]
[0161]
[0162] Select the middle execution gradient according to T, i.e. "1-5-20-50".
[0163] If all risky operations are removed, the restart judgment value is also 0, and the file size score is also 0. Recalculation yields:
[0164] =0.96
[0165]
[0166]
[0167]
[0168]
[0169] Then select the radical solution based on T, that is, the gradient is "1-20-50-100".
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0171] Figure 3 This is a structural diagram of a batch execution device for configuration update tasks provided in an embodiment of the present application. Figure 3 As shown, an embodiment of the present application also provides a batch execution device 300 for configuration update tasks, including: an attribute determination module 301, a parameter acquisition module 302, a gradient determination module 303, a task execution module 304, a data acquisition module 305, a data output module 306 and a repeated execution module 307.
[0172] The attribute determination module 301 is configured to determine the task attribute corresponding to the configuration update task if a configuration update task is detected;
[0173] Parameter acquisition module 302, used to obtain host resource parameters and server hardware resource parameters;
[0174] A gradient determination module 303 is configured to determine an execution gradient based on task attributes, host resource parameters, and hardware resource parameters, wherein the execution gradient includes at least two sequentially executed batches, with the number of servers corresponding to each batch increasing in sequence;
[0175] The task execution module 304 is used to select a corresponding number of target servers to execute the configuration update task according to the number of servers in the first execution batch;
[0176] Data acquisition module 305, used to obtain the operating status data and actual configuration data of the target server;
[0177] Data output module 306, used to output operating status data and actual configuration data;
[0178] Repeat the execution module 307, which is used to repeat the steps of selecting a corresponding number of target servers to perform the configuration update task according to the number of servers corresponding to the next execution batch if a confirmation instruction corresponding to the operating status data and the actual configuration data is detected, until the confirmation instruction is received after the last execution batch is completed, and all remaining servers are used to perform the configuration update task.
[0179] In one possible implementation, the gradient determination module 303 is specifically used to determine the security level coefficient and the dynamic attenuation coefficient based on the task attributes and hardware resource parameters; determine the resource utilization value, the security inhibition value and the network gain value based on the task attributes, the host resource parameters and the hardware resource parameters; calculate the attenuation correction value based on the task attributes, the security level coefficient, the dynamic attenuation coefficient, the resource utilization value, the security inhibition value and the network gain value; and according to the attenuation correction value, find the correspondence between the attenuation correction value range and the execution gradient to obtain the execution gradient.
[0180] In one possible implementation, the task attributes include an energy-consuming operation determination value indicating whether it is a high-energy-consuming operation, a restart determination value indicating whether a restart is required, a clear determination value indicating whether the hard disk needs to be cleared, a mount determination value indicating whether an image needs to be mounted, a verification determination value indicating whether automatic verification is supported, a management type value, and a file size score; the host resource parameters include the number of processing unit cores and the memory size; and the hardware resource parameters include a multipath redundancy index, a power consumption index, and the total number of servers.
[0181] In one possible implementation, the gradient determination module 303 is specifically used to determine the first safety factor as the safety level factor if the restart determination value or the clear determination value is the first preset value, otherwise determine the second safety factor as the safety factor, wherein the first safety factor is less than the second safety factor, and the first preset value is the judgment result corresponding to the preset value; using the preset base as the base and the negative of the square of the power consumption index as the exponent, calculate the exponent value to obtain the power consumption index value; use the second preset value minus the product of the square of the clear determination value and the preset coefficient to obtain the dynamic attenuation factor; multiply the power consumption index value by the dynamic attenuation factor to obtain the dynamic attenuation coefficient.
[0182] In one possible implementation, the gradient determination module 303 is specifically configured to determine the quotient of the number of processing unit cores and a preset divisor as a processing unit coefficient; calculate a memory correction value of a memory size;
[0183] According to the memory correction value, the memory coefficient is determined; the processing unit coefficient is multiplied by the memory coefficient to obtain the resource utilization value; the energy consumption operation judgment value, the restart judgment value, the clear judgment value and the mount judgment value are determined. The respective judgment influence coefficients are multiplied to obtain the judgment coefficient product; the third preset value is subtracted from the judgment coefficient product to obtain the safety suppression value; the multi-path redundancy index is divided by the total number of servers to obtain the path occupancy ratio; the file size score is multiplied by the mount judgment value, and then divided by the number of processing unit cores to obtain the file processing coefficient; the fourth preset value is subtracted from the file processing coefficient, and then multiplied by the path occupancy ratio to obtain the network gain value.
[0184] In one possible implementation, the gradient determination module 303 is specifically used to determine the comprehensive correction value based on the resource utilization value, the security suppression value and the network gain value; and multiply the dynamic attenuation coefficient, the comprehensive correction value, the security level coefficient, the management type value and the verification judgment value to obtain the attenuation correction value.
[0185] In one possible implementation, the gradient determination module 303 is specifically used to multiply the first preset power of the resource utilization value by the network gain, and then divide the result by the sum of the fifth preset value and the second preset power of the safety suppression value to obtain a comprehensive correction value; or, to perform a weighted summation of the resource utilization value, the safety suppression value, and the network gain value to obtain a comprehensive correction value.
[0186] Figure 4 This is a schematic diagram of the structure of the batch execution device for the configuration update task provided by this application. Figure 4 As shown, the configuration update task batch execution device 40 provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the configuration update task batch execution device 40 also includes a communication component 403. The processor 401, the memory 402, and the communication component 403 are connected via a bus.
[0187] In a specific implementation process, at least one processor 401 executes the computer-executable instructions stored in the memory 402, so that the at least one processor 401 executes the above-mentioned embodiment of the method for executing configuration update tasks in batches.
[0188] The specific implementation process of the processor 401 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0189] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0190] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0191] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0192] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above-mentioned XX method embodiments when run.
[0193] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0194] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any one of the above-mentioned XX method embodiments are implemented.
[0195] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in the batch execution method embodiment of any of the above-mentioned configuration update tasks.
[0196] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0197] The above is a detailed introduction to the batch execution method, device, equipment and storage medium for a configuration update task provided by this application. This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method of this application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
Claims
1. A method for executing configuration update tasks in batches, characterized in that: include: If a configuration update task is detected, determining a task attribute corresponding to the configuration update task; Get the host resource parameters and the hardware resource parameters associated with the server; Determining an execution gradient based on the task attributes, the host machine resource parameters, and the hardware resource parameters, wherein the execution gradient includes at least two execution batches executed sequentially, and the number of servers corresponding to each execution batch increases sequentially; According to the number of servers in the first execution batch, a corresponding number of target servers are selected to execute the configuration update task; Obtaining the operating status data and actual configuration data of the target server; outputting the operating status data and the actual configuration data; If a confirmation instruction corresponding to the operating status data and the actual configuration data is detected, repeating the steps of selecting a corresponding number of target servers to execute the configuration update task according to the number of servers corresponding to the next execution batch, until a confirmation instruction is received after the last execution batch is completed, and executing the configuration update task using all remaining servers; Among them, determining the execution gradient according to the task attributes, the host machine resource parameters and the hardware resource parameters includes: determining the security level coefficient and the dynamic attenuation coefficient according to the task attributes and the hardware resource parameters; determining the resource utilization value, the security inhibition value and the network gain value according to the task attributes, the host machine resource parameters and the hardware resource parameters; calculating the attenuation correction value according to the task attributes, the security level coefficient, the dynamic attenuation coefficient, the resource utilization value, the security inhibition value and the network gain value; and finding the correspondence between the attenuation correction value range and the execution gradient according to the attenuation correction value to obtain the execution gradient.
2. The method according to claim 1, characterized in that The task attributes include an energy-consuming operation judgment value indicating whether it is a high-energy-consuming operation, a restart judgment value indicating whether a restart is required, a clear judgment value indicating whether the hard disk needs to be cleared, a mount judgment value indicating whether an image needs to be mounted, a verification judgment value indicating whether automatic verification is supported, a management type value, and a file size score; the host machine resource parameters include the number of processing unit cores and the memory size; the hardware resource parameters include a multipath redundancy index, a power consumption index, and the total number of servers.
3. The method according to claim 2, characterized in that The determining of the security level coefficient and the dynamic attenuation coefficient according to the task attributes and the hardware resource parameters includes: If the restart determination value or the clear determination value is the first preset value, the first safety factor is determined as the safety level factor; otherwise, the second safety factor is determined as the safety factor, wherein the first safety factor is less than the second safety factor, and the first preset value is the corresponding preset value as the determination result; Taking a preset base as the base and the negative number of the square of the power consumption index as the exponent, calculating the exponent value to obtain the power consumption index value; The dynamic attenuation factor is obtained by subtracting the product of the square of the clearing determination value and a preset coefficient from the second preset value; The power consumption index value is multiplied by the dynamic attenuation factor to obtain the dynamic attenuation coefficient.
4. The method according to claim 2, characterized in that The determining of the resource utilization value, the security suppression value, and the network gain value according to the task attributes, the host resource parameters, and the hardware resource parameters includes: Determine the quotient of the number of processing unit cores and a preset divisor as a processing unit coefficient; Calculating a memory correction value for the memory size; determining a memory coefficient according to the memory correction value; multiplying the processing unit coefficient by the memory coefficient to obtain the resource utilization value; Determining respective determination influence coefficients corresponding to the energy consumption operation determination value, the restart determination value, the clear determination value, and the mount determination value; Multiply each determination influence coefficient to obtain the determination coefficient product; Subtracting the determination coefficient product from a third preset value to obtain the safety suppression value; Dividing the multipath redundancy index by the total number of servers to obtain a path occupancy ratio; Multiplying the file size score by the mount determination value and dividing the result by the number of cores in the processing unit to obtain a file processing coefficient; The network gain value is obtained by subtracting the file processing coefficient from a fourth preset value and then multiplying the result by the path occupancy ratio.
5. The method according to claim 2, characterized in that The calculating of the attenuation correction value according to the task attribute, the safety level coefficient, the dynamic attenuation coefficient, the resource utilization value, the safety suppression value, and the network gain value includes: determining a comprehensive correction value according to the resource utilization value, the safety suppression value, and the network gain value; The dynamic attenuation coefficient, the comprehensive correction value, the safety level coefficient, the management type value and the verification determination value are multiplied to obtain the attenuation correction value.
6. The method according to claim 5, characterized in that The determining of the comprehensive correction value according to the resource utilization value, the safety suppression value, and the network gain value includes: The comprehensive correction value is obtained by multiplying the resource utilization value to the first preset power by the network gain, and then dividing the result by the sum of the fifth preset value and the safety suppression value to the second preset power; or The resource utilization value, the safety suppression value and the network gain value are weighted and summed to obtain a comprehensive correction value.
7. A batch execution device for configuration update tasks, characterized in that: include: an attribute determination module, configured to determine a task attribute corresponding to a configuration update task if a configuration update task is detected; Parameter acquisition module, used to obtain host resource parameters and server hardware resource parameters; a gradient determination module, configured to determine an execution gradient based on the task attributes, the host resource parameters, and the hardware resource parameters, wherein the execution gradient includes at least two execution batches executed sequentially, and the number of servers corresponding to each execution batch increases sequentially; A task execution module, configured to select a corresponding number of target servers to execute the configuration update task according to the number of servers in the first execution batch; A data acquisition module, used to acquire the operating status data and actual configuration data of the target server; A data output module, configured to output the operating status data and the actual configuration data; a repeat execution module configured to, if a confirmation instruction corresponding to the operating status data and the actual configuration data is detected, repeat the steps of selecting a corresponding number of target servers to execute the configuration update task according to the number of servers corresponding to the next execution batch, until a confirmation instruction is received after the last execution batch is completed, and then execute the configuration update task using all remaining servers; Among them, the gradient determination module is used to determine the security level coefficient and the dynamic attenuation coefficient based on the task attributes and the hardware resource parameters; determine the resource utilization value, the security inhibition value and the network gain value based on the task attributes, the host resource parameters and the hardware resource parameters; calculate the attenuation correction value based on the task attributes, the security level coefficient, the dynamic attenuation coefficient, the resource utilization value, the security inhibition value and the network gain value; and according to the attenuation correction value, find the correspondence between the attenuation correction value range and the execution gradient to obtain the execution gradient.
8. A device for executing configuration update tasks in batches, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for executing configuration update tasks in batches as claimed in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for executing configuration update tasks in batches according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Resource information batch pushing method and device, computer equipment and storage medium
CN112887414A
Reserved resource configuration method and device, equipment, storage medium and program product
CN119645570A