Methods, devices, and electronic equipment for processing server asset data acquisition tasks

By introducing a comprehensive index of health weight, operation weight, and execution weight into the server asset data collection task, the priority of the task queue is dynamically adjusted, which solves the problem of inaccurate priority of server asset data collection tasks and improves task processing efficiency and the timeliness of data collection.

CN119690604BActive Publication Date: 2026-11-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411491865.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2026-11-17
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

In existing technologies, the priority of server asset data acquisition tasks is not accurately determined, resulting in low task processing efficiency, especially in emergency situations where it is impossible to obtain real-time information of critical equipment in a timely manner.

Method used

By introducing a comprehensive index of health weight, operation weight, and execution weight, the priority of tasks in the task queue is dynamically adjusted. Health weight reflects the health status of the server, operation weight reflects the urgency of the task, and execution weight reflects the preemption of the task. The comprehensive weight value of the task is calculated to determine the priority.

Benefits of technology

It improves the accuracy and efficiency of task processing, ensures the timeliness of data collection from critical equipment, and prevents low-priority tasks from remaining unexecuted for extended periods, thus creating monitoring blind spots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690604B_ABST
    Figure CN119690604B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and electronic device for processing server asset data acquisition tasks, belonging to the field of data processing technology. The method includes: acquiring a set of target tasks; initializing the priority of each target task in the set according to a health weight, wherein the health weight reflects the health status of the server; adding the set of target tasks to a task queue and updating the priorities of tasks in the task queue based on a priority indicator, wherein the priority indicator includes the health weight; and executing the tasks in the task queue based on the updated priorities of the tasks in the task queue. The server asset data acquisition task processing method provided by this invention solves the technical problem in related technologies where the priority of server asset data acquisition tasks cannot be accurately determined, leading to low task processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, and electronic device for processing server asset data acquisition tasks. Background Technology

[0002] With the exponential growth in the number of servers, the task of managing and maintaining large-scale server clusters has become increasingly arduous and complex. In order to ensure the stability and performance of the system, the collection of server runtime asset data is crucial to ensuring system stability and performance. The collection and management of server asset data is a key component in ensuring the health and performance of information technology (IT) infrastructure.

[0003] In related technologies, as the number of servers increases, it becomes difficult to accurately and reasonably determine the priority of server asset data collection tasks and other information collection tasks. Especially when servers experience abnormalities or emergencies, it is urgent to obtain real-time information about server equipment and prioritize the collection of data from critical equipment. If the task priorities are not determined reasonably, low-priority tasks may be unable to be executed, creating monitoring blind spots and reducing the efficiency of information collection and management.

[0004] Therefore, it is evident that the processing methods for server asset data acquisition tasks in related technologies suffer from the technical problem of being unable to accurately determine the priority of server asset data acquisition tasks, resulting in low task processing efficiency. Summary of the Invention

[0005] This invention provides a method, apparatus, and electronic device for processing server asset data acquisition tasks, to solve the technical problem in related technologies where the priority of server asset data acquisition tasks cannot be accurately determined, resulting in low task processing efficiency.

[0006] This invention provides a method for processing server asset data acquisition tasks, comprising the following steps: obtaining a set of target tasks, wherein each target task in the set corresponds to a server asset data acquisition task; initializing the priority of each target task in the set according to a health weight, wherein the health weight reflects the health status of the server, increases as the server's health status deteriorates, and is positively correlated with the priority of each target task; adding the set of target tasks to a task queue, and updating the priorities of the tasks in the task queue based on priority indicators, wherein the priority indicators include the health weight, operation weight, and execution weight, the operation weight reflects the urgency of the task, increases as the urgency of the task increases, and the execution weight reflects the situation where a task is preempted by a higher-priority task, increases as the number of times a task is preempted increases; and executing the tasks in the task queue based on the updated priorities of the tasks in the task queue.

[0007] According to a method for processing server asset data acquisition tasks provided by the present invention, the task queue includes a target task set and a non-target task set, the priority index includes a first priority index and a second priority index, and the step of updating the priority of tasks in the task queue based on the priority index includes: updating the priority of each target task in the target task set based on the first priority index, wherein the first priority index includes the health weight, the operation weight and the execution weight; and updating the priority of each non-target task in the non-target task set based on the second priority index, wherein the second priority index includes the operation weight and the execution weight.

[0008] According to a method for processing server asset data acquisition tasks provided by the present invention, the step of updating the priority of tasks in the task queue based on a priority index includes: calculating a comprehensive weight value for each task in the task queue, wherein the comprehensive weight value is obtained by multiplying each weight included in the priority index by a preset value corresponding to each weight and then summing the results, and the sum of the preset values ​​corresponding to each weight is 1; updating the priority of each task based on the comprehensive weight value of each task, wherein the comprehensive weight value of each task is positively correlated with the priority of each task.

[0009] According to a method for processing server asset data acquisition tasks provided by the present invention, before updating the priority of tasks in the task queue based on priority indicators, the method further includes: performing the following steps on each task in the task queue as a first current task to obtain a current operation weight corresponding to the first current task: obtaining the refresh count of the first current task, wherein the refresh count is incremented by one each time an execution instruction of the first current task is received; determining the current operation weight based on the refresh count, wherein the refresh count is positively correlated with the current operation weight.

[0010] According to a method for processing server asset data acquisition tasks provided by the present invention, before updating the priority of tasks in the task queue based on priority indicators, the method further includes: performing the following steps on each task in the task queue as a second current task to obtain a current execution weight corresponding to the second current task: obtaining the number of times the second current task has been preempted, wherein the number of times the second current task has been preempted by a higher priority task; determining the current execution weight based on the number of times the task has been preempted, wherein the number of times the task has been preempted is positively correlated with the current execution weight.

[0011] According to a method for processing server asset data acquisition tasks provided by the present invention, after executing the tasks in the task queue based on the updated priority of the tasks in the task queue, the method further includes: obtaining the execution results of the tasks in the task queue within the current task execution cycle; updating the execution weights of the tasks in the task queue within a target task execution cycle according to the execution results, wherein the target task execution cycle is the next task execution cycle of the current task execution cycle.

[0012] According to a method for processing server asset data acquisition tasks provided by the present invention, before executing the tasks in the task queue based on the updated priority of the tasks in the task queue, the method further includes: adjusting the priority of the task corresponding to the priority adjustment instruction based on the priority adjustment instruction when a priority adjustment instruction is received.

[0013] The present invention also provides a processing device for server asset data acquisition tasks, comprising the following modules: an acquisition module, configured to acquire a set of target tasks, wherein each target task in the set corresponds to a server asset data acquisition task; an initialization module, configured to initialize the priority of each target task in the set of target tasks according to a health weight, wherein the health weight reflects the health status of the server, the health weight increases as the server's health status deteriorates, and the health weight is positively correlated with the priority of each target task; an update module, configured to add the set of target tasks to a task queue and update the priority of the tasks in the task queue based on a priority index, wherein the priority index includes the health weight, an operation weight, and an execution weight, the operation weight reflects the urgency of the task, the operation weight increases as the urgency of the task increases, the execution weight reflects the situation where a task is preempted by a higher-priority task, and the execution weight increases as the number of times a task is preempted increases; and an execution module, configured to execute the tasks in the task queue based on the updated priority of the tasks in the task queue.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the processing method for server asset data acquisition tasks as described above.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the processing method for server asset data acquisition tasks as described above.

[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a processing method for server asset data acquisition tasks as described above.

[0017] This invention provides a method, apparatus, and electronic device for processing server asset data acquisition tasks. The method involves: acquiring a set of target tasks, where each target task in the set corresponds to a server asset data acquisition task; initializing the priority of each target task in the set according to a health weight, where the health weight reflects the server's health status; adding the set of target tasks to a task queue and updating the priorities of tasks in the task queue based on priority indicators, where the priority indicators include health weight, operation weight, and execution weight; executing tasks in the task queue based on the updated priorities; and improving the accuracy of priority determination by initializing the priority of each target task in the set according to the health weight, further enhancing the accuracy of priority determination by updating the priorities of all tasks in the task queue according to the priority indicators, and effectively improving task processing efficiency by processing tasks according to the updated priorities. This invention solves the technical problem in related technologies where server asset data acquisition task processing methods cannot accurately determine the priorities of server asset data acquisition tasks, leading to low task processing efficiency. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the processing method for server asset data acquisition tasks provided by the present invention.

[0020] Figure 2 This is a schematic diagram of the task processing system provided by the present invention.

[0021] Figure 3 This is a schematic diagram illustrating the interaction between the queue priority management module and the acquisition and execution module provided by this invention.

[0022] Figure 4 This is a schematic diagram of the acquisition and execution module provided by the present invention.

[0023] Figure 5 This is a structural diagram of the visual management module provided by the present invention.

[0024] Figure 6 This is a schematic diagram of the processing device for server asset data acquisition tasks provided by the present invention.

[0025] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0027] It should be noted that in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. The terms "upper," "lower," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly, for example, as a fixed connection, a detachable connection, or an integral connection; a mechanical connection or an electrical connection; a direct connection or an indirect connection through an intermediate medium; or a connection within two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0028] The terms "first," "second," etc., used in this invention are used to distinguish similar objects, not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class, without limiting the number of objects; for example, a first object can be one or more. Furthermore, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0029] In modern data center and cloud computing environments, server information collection and management is a critical component in ensuring the health and performance of IT infrastructure. With the exponential growth in the number of servers, managing and maintaining large-scale server clusters has become increasingly arduous and complex. To ensure system stability and performance, runtime server information collection is crucial. This typically requires periodically collecting server operational information, while also supporting user-triggered manual refreshes to maintain the accuracy of server device information. However, with the increasing number of servers, effectively managing information collection tasks, especially when servers malfunction or experience emergencies, and how to obtain real-time device information promptly, prioritizing data collection from critical devices, has become a pressing issue.

[0030] In related technologies, as the number of servers increases, it becomes difficult to accurately and reasonably determine the priority of server asset data collection tasks and other information collection tasks. Traditional server asset information collection methods rely on set priority rules or manual adjustment of collection priorities. The adjustment operation requires subjective judgment and lacks automatic priority adjustment function. When system resources are scarce, low-priority tasks may be postponed or skipped, resulting in inaccurate data. If the priority is set improperly, some low-priority tasks may not be able to be executed, resulting in untimely updates of server information collection, creating monitoring blind spots, and reducing the efficiency of information collection and management. Therefore, the processing methods for server asset data collection tasks in related technologies have the technical problem of being unable to accurately determine the priority of server asset data collection tasks, leading to low task processing efficiency.

[0031] To at least address some of the above problems, the following will combine... Figures 1-7 This invention describes the processing method, apparatus, and electronic device for server asset data acquisition tasks.

[0032] The server asset data acquisition task processing method provided in this embodiment can be applied to scenarios involving server asset data acquisition tasks. The server asset data acquisition task processing method in this embodiment can be executed by the server.

[0033] Figure 1 This is a flowchart illustrating the processing method for server asset data acquisition tasks provided by the present invention, as shown below. Figure 1 As shown, including but not limited to the following steps: Step 101: Obtain the target task set, where each target task in the target task set corresponds to an asset data collection task of a server.

[0034] In this embodiment, the server's asset data refers to data such as hardware and software configuration information, performance parameters, network configuration, security settings, and related maintenance and usage records related to the server.

[0035] Each target task in the target task set corresponds to an asset data acquisition task for one server. That is, each target task corresponds to an asset data acquisition task for one server, and the target task set corresponds to asset data acquisition tasks for multiple servers.

[0036] The acquisition methods for target tasks in the target task set can include periodic timed collection and user-triggered collection operations. After determining the server that needs to be collected, a target task corresponding to that server is generated.

[0037] Step 102: Initialize the priority of each target task in the target task set according to the health weight. The health weight is used to reflect the health status of the server. The health weight increases as the health status of the server deteriorates. The health weight is positively correlated with the priority of each target task.

[0038] In this embodiment, the health weight is used to reflect the health status of the server. The health weight can be determined by information such as server alarm information, server trap messages, CPU usage, memory usage, disk space, and system error logs. The worse the health status of the server, the higher its corresponding health weight, indicating that the information collection needs of the server are more urgent. The health weight is positively correlated with the priority of each target task. That is, the higher the health weight of a task, the higher the initial priority of the task.

[0039] The priority of each target task in the target task set is initialized according to the health weight. Here, each target task corresponds to a server, and each target task corresponds to a health weight, which is used to reflect the health status of the server corresponding to the target task.

[0040] Step 103: Add the target task set to the task queue and update the priority of the tasks in the task queue based on priority indicators. The priority indicators include health weight, operation weight, and execution weight. The operation weight is used to reflect the urgency of the task and increases as the urgency of the task increases. The execution weight is used to reflect the situation where the task is preempted by a higher priority task and increases as the number of times the task is preempted increases.

[0041] In this embodiment, the priority index includes health weight, operation weight, and execution weight. The priority index is used to reflect the urgency of tasks in the task queue. The higher the health weight, operation weight, and execution weight of a task, the higher the urgency of the task and the higher the priority of the task.

[0042] It should be noted that after adding the target task set to the task queue, the task queue can include target tasks and non-target tasks. The initial priority of the tasks in the task queue is based on their initial priority. That is, during the process of adding the target task set to the task queue, the task queue needs to be sorted according to the initial priority of the target tasks in the target task set.

[0043] Furthermore, after adding the target task set to the task queue and performing an initial priority sort on the tasks in the task queue, the priority of the tasks in the task queue can be updated based on priority indicators. Here, if the priority of the tasks in the task queue is not updated based on priority indicators, the priority sorting is performed according to the initial priority of the tasks in the task queue. If the priority of the tasks in the task queue is updated based on priority indicators, the priority of the tasks can be updated according to health weight, operation weight, and execution weight. Here, each task corresponds to its own priority indicator, and the higher the weight of the priority indicator corresponding to each task, the higher the priority of the updated task.

[0044] Step 104: Execute tasks in the task queue based on the priority of tasks in the updated task queue.

[0045] In this embodiment, tasks in the task queue can be executed sequentially according to their priority from high to low.

[0046] The embodiments provided in this application obtain a set of target tasks, wherein each target task in the set corresponds to a server asset data acquisition task; the priority of each target task in the set is initialized according to a health weight, wherein the health weight reflects the health status of the server, increases as the server's health status deteriorates, and is positively correlated with the priority of each target task; the set of target tasks is added to a task queue, and the priorities of the tasks in the task queue are updated based on priority indicators, wherein the priority indicators include health weight, operation weight, and execution weight, the operation weight reflects the urgency of the task, increases as the urgency of the task increases, and the execution weight reflects the situation where the task is preempted by a higher-priority task, increases as the number of times the task is preempted increases; the tasks in the task queue are executed based on the updated priorities of the tasks in the task queue; this solves the technical problem in related technologies where the processing method for server asset data acquisition tasks cannot accurately determine the priority of server asset data acquisition tasks, resulting in low task processing efficiency, and improves task processing efficiency.

[0047] As an optional approach, the task queue includes a set of target tasks and a set of non-target tasks. Priority metrics include a first priority metric and a second priority metric. The priority of tasks in the task queue is updated based on these priority metrics, including: S11, update the priority of each target task in the target task set based on the first priority indicator, wherein the first priority indicator includes health weight, operation weight and execution weight; S12, update the priority of each non-target task in the non-target task set based on the second priority index, where the second priority index includes operation weight and execution weight.

[0048] In this embodiment, each task in the task queue has its own health weight, operation weight, and execution weight. That is, each task in the task queue has its own multiple weights, which are used to reflect the priority of the task.

[0049] The task queue includes a set of target tasks and a set of non-target tasks. Each target task in the target task set corresponds to an asset data acquisition task for a server, while the non-target tasks in the non-target task set are other data acquisition tasks. Since the non-target tasks in the non-target task set do not involve asset data acquisition tasks for the server, updating the priority of the non-target tasks in the non-target task set does not require health weights.

[0050] Operation weights reflect the urgency of a task. Operation weights increase as the urgency of a task increases; that is, the higher the urgency of a task, the greater the operation weight. Execution weights reflect when a task is preempted by a higher-priority task. Execution weights increase as the number of times a task is preempted increases.

[0051] The priority of each target task in the target task set is updated based on the first priority indicator, and the priority of each non-target task in the non-target task set is updated based on the second priority indicator. Here, both the first and second priority indicators contain multiple weights. The priority of a task is determined based on the priority indicators. Optionally, the weights in the priority indicators can be added together, and the priority of a task can be determined based on the sum of the weights. The higher the sum of the weights, the higher the priority of the task.

[0052] This embodiment determines the priority of target tasks and non-target tasks based on different priority indicators, which can effectively improve the accuracy of determining the priority of tasks in the task queue.

[0053] As an optional approach, the priorities of tasks in the task queue are updated based on priority metrics, including: S21, calculate the comprehensive weight value of each task in the task queue. The comprehensive weight value is obtained by multiplying each weight in the priority index by the preset value corresponding to each weight and then adding them together. The sum of the preset values ​​corresponding to each weight is 1. S22, update the priority of each task based on the comprehensive weight value of each task, wherein the comprehensive weight value of each task is positively correlated with the priority of each task.

[0054] In this embodiment, a corresponding preset value can be set for each weight, and a comprehensive weight value is determined based on the weight value of each weight and the preset value. For example, for the target task, the first priority indicator includes health weight, operation weight, and execution weight. The preset value of health weight is 30%, the preset value of operation weight is 35%, and the preset value of execution weight is 35%. The comprehensive weight value of the target task is obtained by multiplying the health weight, operation weight, and execution weight by their respective preset values. The priority is determined based on the comprehensive weight value, and the higher the comprehensive weight value, the higher the priority. For non-target tasks, the second priority indicator includes operation weight and execution weight. The preset value of operation weight is 50%, and the preset value of execution weight is 50%. The comprehensive weight value of the non-target task is obtained by multiplying the operation weight and execution weight by their respective preset values. The priority is determined based on the comprehensive weight value, and the higher the comprehensive weight value, the higher the priority.

[0055] This embodiment calculates a comprehensive weight value for each task based on a priority index, and updates the priority of each task according to the comprehensive weight value, which improves the accuracy of priority determination for each task in the task queue. As an optional approach, before updating the priority of tasks in the task queue based on the priority index, the method further includes: S31, treat each task in the task queue as the first current task and perform the following steps to obtain the current operation weight corresponding to the first current task: Get the refresh count of the first current task, where the refresh count is incremented by one each time an execution instruction for the first current task is received; The weight of the current operation is determined based on the number of refreshes, where the number of refreshes is positively correlated with the weight of the current operation.

[0056] In this embodiment, the current operation weight is used to reflect the execution requirements of the first current task. For example, when the first current task urgently needs to be executed and is in a pending collection state in the task queue, the user can trigger the execution operation of the first current task once or multiple times through operations such as refreshing, thereby increasing the refresh count of the first current task. The higher the refresh count of the first current task, the more urgent the first current task needs to be executed. Therefore, the current operation weight of the first current task can be increased to provide data support for subsequent collection priority adjustment.

[0057] By determining the current operation weight based on the number of refreshes in this embodiment, the accuracy of determining the operation weight corresponding to the task can be improved, thereby improving the stability and reliability of the server asset data collection task processing method in this embodiment.

[0058] As an alternative approach, the method further includes the following before updating the priorities of tasks in the task queue based on priority metrics: S41, treat each task in the task queue as the second current task and perform the following steps to obtain the current execution weight corresponding to the second current task: Get the number of times the second current task has been preempted, where the number of times the second current task has been preempted by a higher priority task. The current execution weight is determined based on the number of times the execution has been preempted, and the number of times the execution has been preempted is positively correlated with the current execution weight.

[0059] In this embodiment, the number of times a task is preempted reflects the situation where the second current task is preempted by a higher priority task in a periodic collection batch. This is mainly reflected in the scheduling and management of low-priority tasks. When the number of times a low-priority task is preempted increases, causing the second current task to fail to collect data in this period, the execution weight is adjusted. This weight adjustment can prevent low-priority tasks from being unable to be executed for a long time, resulting in untimely information updates.

[0060] For example, each time a task in the task queue is executed, the task is executed periodically. For instance, each task execution cycle will execute 10 tasks. If the second current task has the 9th priority among these 10 tasks, and if there are 2 higher priority tasks inserted into this task execution cycle, the second current task will be squeezed out to the next task execution cycle. At this time, the number of times the second current task is preempted is 2. Since the second current task is squeezed into the next task execution cycle, the current execution weight corresponding to the second current task will be increased to avoid the second current task being unable to be executed for a long time, resulting in untimely information updates.

[0061] By determining the current execution weight based on the number of times the task has been preempted in this embodiment, the accuracy of determining the execution weight corresponding to the task can be improved, thereby improving the stability and reliability of the server asset data collection task processing method in this embodiment.

[0062] As an alternative approach, after executing tasks in the updated task queue based on their priorities, the method further includes: S51, retrieve the execution results of tasks in the task queue within the current task execution cycle; S52, update the execution weight of the tasks in the task queue within the target task execution cycle according to the execution result, where the target task execution cycle is the next task execution cycle of the current task execution cycle.

[0063] In this embodiment, multiple tasks are executed within a task execution cycle. The number of tasks executed within a task execution cycle is fixed. After the tasks to be executed within the current task execution cycle are completed, the corresponding execution results can be obtained. Here, the execution results include whether the task was executed successfully. The execution results may also include whether some low-priority tasks were squeezed into the next task execution cycle by other high-priority tasks within the current task execution cycle. If this is the case, the execution weights of the tasks squeezed into the next task execution cycle can be adjusted and updated according to the task execution results.

[0064] Optionally, tasks in the updated task queue can be executed based on their priorities, including: The first n tasks in the task queue are selected for execution in descending order of priority, where n is the number of tasks to be executed within one task execution cycle.

[0065] Optionally, the server can have n collectors to execute multiple tasks within a single task execution cycle simultaneously.

[0066] In this embodiment, after the tasks in the current task execution cycle are completed, the execution weights of the tasks in the target task execution cycle are updated based on the execution results, which can improve the accuracy of the execution weights.

[0067] As an alternative approach, the method further includes the following before executing tasks in the updated task queue based on their priorities: S61, upon receiving a priority adjustment instruction, adjust the priority of the task corresponding to the priority adjustment instruction based on the priority adjustment instruction.

[0068] In this embodiment, the priority adjustment instruction can be sent by the user. When there is a server that needs to urgently collect asset data, the user can send a priority adjustment instruction to adjust the priority of the target task corresponding to the server to the highest level. Upon receiving the priority adjustment instruction, the priority of the task corresponding to the priority adjustment instruction can be adjusted based on the priority adjustment instruction, thereby ensuring that the target task is executed first.

[0069] In this embodiment, the priority of the task is adjusted based on the priority adjustment instruction, which further improves the stability and reliability of the server asset data acquisition task processing method in this embodiment.

[0070] The following describes the processing method for server asset data acquisition tasks in embodiments of this application, with reference to optional examples. Figure 2 This is a schematic diagram of the task processing system provided by the present invention, such as... Figure 2 As shown, the server asset data acquisition task processing method in this embodiment can be executed by a task processing system, which is located in the server. The task processing system may include, for example, Figure 2 The module shown includes a task generation module, a queue priority management module, a data collection execution module, and a visualization management module.

[0071] The data acquisition task generation module handles data acquisition operations for each server device, including periodic scheduled acquisition and user-triggered acquisition. It generates a corresponding acquisition task, initializes a acquisition priority based on the device's current state, and places it in the acquisition queue. If the same device triggers acquisition multiple times and an acquisition task is already in the queue, it is not created; instead, the priority management module adjusts the task weight to reallocate the acquisition priority. The acquisition task includes basic information such as the required protocol information, target device address, and device health status.

[0072] The priority management module determines the priority of the collection queue based on the priority indicators of the collection tasks in order to achieve the purpose of priority collection. The priority indicators of the collection tasks are divided into health weight, operation weight, and execution weight.

[0073] Among them, the health weight is derived from the device's health status, including information such as alarms and traps. The more severe the health status, the higher the health weight, indicating that the information collection needs of this device are more urgent. The operation weight refers to the user's active triggering of the device to collect data. For example, if a device urgently needs to collect and update its current information, but the collection task status in the queue is in the pending state, and the user does not actively adjust the device's collection priority, but triggers the device to collect data once or multiple times through operations such as refreshing, it indicates that the device urgently needs to collect data. This can increase the device's operation weight to provide data support for subsequent collection priority adjustments.

[0074] Execution weight refers to the situation where priority is preempted in a periodic data collection batch. It is mainly reflected in the scheduling and management of low-priority tasks. The more times a low-priority task is preempted, resulting in the failure to collect data in the current period, the more the execution weight is adjusted. This weight adjustment can prevent low-priority tasks from being unable to be executed for a long time, resulting in untimely information updates.

[0075] The queue priority management module receives user-triggered data collection requests, monitors changes in data collection task priority and execution status, and calculates the data collection priority by comprehensively adjusting device health weight, operation weight, and execution weight.

[0076] Figure 3 This is a schematic diagram illustrating the interaction between the queue priority management module and the data acquisition and execution module provided by this invention. The main function of the data acquisition and execution module is to collect information from specific server devices, using a multi-threaded execution method with a thread pool for efficient data acquisition. It monitors the execution process and progress of the data acquisition tasks, collects the results, and feeds back the execution progress and results to the visualization management module for displaying the data acquisition process and results.

[0077] exist Figure 3 In this process, the device status weight (i.e., health weight) is determined based on the device's basic information, the task's operation weight is updated based on the user's trigger or refresh operation, and the execution weight is updated based on the execution feedback from the acquisition and execution module. Based on the above three weights, the task priority is adaptively adjusted, and the task priority is transmitted to the acquisition and execution module for task execution.

[0078] Figure 4 This is a schematic diagram of the acquisition and execution module provided by the present invention. Figure 4 The system receives tasks and their corresponding priorities from the queue priority management module, executes the tasks using multiple collectors (i.e., collection execution units), and collects specific server device information. It achieves efficient collection through multi-threaded execution using a thread pool. The system monitors the execution process and progress of the collection tasks, collects the execution results, and feeds back the execution progress and results to the visualization management module for displaying the collection process and results.

[0079] Figure 5 This is a structural diagram of the visual management module provided by the present invention. The system provides a visual management interface, which is divided into a waiting area, an execution area, and a history area. The visual management page updates data in real time through WebSocket technology, facilitating functions such as priority management, data collection execution health, and data collection result analysis. The waiting area displays the queuing status of all pending data collection tasks and provides a query function for locating task positions and adjusting operations. The execution area displays currently running data collection tasks, showing the progress and time consumption of each task, and allows for task management such as pausing and stopping. The history area displays the results and anomalies of executed tasks, and provides statistical analysis of data collection efficiency and the collector's performance.

[0080] For example, this embodiment includes the following steps: 1) Data collection task generation: When the user actively triggers or the system periodically collects information from the server device, the system obtains the real-time basic information of the current server device, generates a corresponding data collection task, and puts it into the data collection queue to wait for execution.

[0081] 2) Health Weight Determination: The health weight of each data collection task is determined based on the server's health status. The worse the health status, the higher the health weight, indicating that the device urgently needs data collection and thus receives a higher priority in the data collection queue.

[0082] 3) Operation weight determination: When a user initiates a data collection operation, the system increases the operation weight for that task. The user's proactive operation indicates that the task has a high urgency, and the increased operation weight makes the task prioritized for execution in the data collection queue.

[0083] 4) Execution Weight Adjustment: During the execution of tasks in the collection queue, if some low-priority tasks are repeatedly delayed due to preemption by high-priority tasks, or if they are not executed in the current batch, the system will gradually increase the execution weight of these low-priority tasks to prevent them from being left unexecuted for a long time. This mechanism ensures that even low-priority tasks can be processed within a reasonable time during periodic collection.

[0084] 5) Adaptive Priority Adjustment: Combining device status weight, operation weight, and execution weight, the system dynamically adjusts the final priority of each data acquisition task. This priority adjustment mechanism ensures that important tasks (such as those with poor health or user-specified tasks) are processed first, improving the data acquisition efficiency of critical equipment.

[0085] 6) Multi-threaded data collection and execution: The data collection executor retrieves tasks from the queue according to priority and executes them. The collector uses multi-threading technology, processing multiple data collection tasks in parallel through a thread pool, thereby improving data collection efficiency. The collector monitors the data collection progress and results in real time and feeds this information back to the system.

[0086] 7) Visual Management and Display: The system provides a visual management module that displays the priority, execution status, and workload of each task in the data collection queue in real time. Users can view the task execution progress, adjust task priorities, and analyze collection results through the visual interface. The visual interface supports viewing and statistical analysis of historical data, helping users understand the effectiveness of the data collection strategy and optimize future data collection tasks.

[0087] Through this embodiment, by combining the dynamic adjustment of health weight, operation weight, and execution weight, the system can intelligently and adaptively manage the priority of data collection tasks, ensuring that critical tasks are processed first. At the same time, it can prevent task delays from creating monitoring blind spots. By dynamically adjusting the execution weight, it can prevent low-priority tasks from being left unexecuted for a long time due to the presence of high-priority tasks, ensuring that all tasks can be completed within a reasonable time.

[0088] This embodiment also enables real-time monitoring, feedback, and visual interaction. Through visual management and a convenient interactive window, users can monitor the execution of data collection tasks in real time and adjust strategies in a timely manner to ensure the efficiency and accuracy of data collection and improve operational convenience.

[0089] Understandably, through the improvements to the above methods, the adaptive adjustment of data center server equipment information collection can be managed more effectively, ensuring the real-time nature of critical server equipment information collection, while providing a user-friendly visual interactive page to improve the flexibility of collection management.

[0090] Figure 6 This is a schematic diagram of the processing device for server asset data acquisition tasks provided by the present invention, as shown below. Figure 6 As shown, including but not limited to the following modules: The acquisition module 601 is used to acquire a set of target tasks, wherein each target task in the set of target tasks corresponds to an asset data acquisition task of a server. Initialization module 602 is used to initialize the priority of each target task in the target task set according to the health weight. The health weight is used to reflect the health status of the server. The health weight increases as the health status of the server deteriorates. The health weight is positively correlated with the priority of each target task. The update module 603 is used to add the target task set to the task queue and update the priority of the tasks in the task queue based on priority indicators. The priority indicators include health weight, operation weight and execution weight. The operation weight is used to reflect the urgency of the task and increases as the urgency of the task increases. The execution weight is used to reflect the situation where the task is preempted by a higher priority task and increases as the number of times the task is preempted increases. Execution module 604 is used to execute tasks in the task queue based on the priority of the updated tasks in the task queue.

[0091] Through the embodiments of this application, a set of target tasks is obtained, wherein each target task in the set corresponds to a server asset data acquisition task; the priority of each target task in the set is initialized according to a health weight, wherein the health weight reflects the health status of the server, and the health weight increases as the server's health status deteriorates, and the health weight is positively correlated with the priority of each target task; the set of target tasks is added to a task queue, and the priority of the tasks in the task queue is updated based on priority indicators, wherein the priority indicators include health weight, operation weight, and execution weight, the operation weight reflects the urgency of the task, and the operation weight increases as the urgency of the task increases, the execution weight reflects the situation where the task is preempted by a higher-priority task, and the execution weight increases as the number of times the task is preempted increases; the tasks in the task queue are executed based on the updated priority of the tasks in the task queue; this solves the technical problem in the related art of server asset data acquisition task processing methods that cannot accurately determine the priority of server asset data acquisition tasks, resulting in low task processing efficiency, and improves task processing efficiency.

[0092] It should be noted that the server asset data acquisition task processing device provided by the present invention can execute the server asset data acquisition task processing method of any of the above embodiments during specific operation, which will not be described in detail in this embodiment.

[0093] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 7As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communications bus 740, wherein the processor 710, the communications interface 720, and the memory 730 communicate with each other through the communications bus 740. The processor 710 can call logical instructions in the memory 730 to execute a processing method for server asset data acquisition tasks. This method includes: acquiring a set of target tasks, where each target task in the set corresponds to a server asset data acquisition task; initializing the priority of each target task in the set according to a health weight, where the health weight reflects the server's health status, increases as the server's health status deteriorates, and is positively correlated with the priority of each target task; adding the set of target tasks to a task queue and updating the priorities of tasks in the task queue based on priority indicators, where the priority indicators include health weight, operation weight, and execution weight, the operation weight reflects the urgency of the task, increases as the urgency of the task increases, and the execution weight reflects the situation where a task is preempted by a higher-priority task, increases as the number of times a task is preempted increases; and executing tasks in the task queue based on the updated priorities of the tasks in the task queue.

[0094] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0095] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the processing method for server asset data acquisition tasks provided in the above embodiments. The method includes: obtaining a set of target tasks, wherein each target task in the set of target tasks corresponds to a server asset data acquisition task; initializing the priority of each target task in the set of target tasks according to a health weight, wherein the health weight is used to reflect the health status of the server, the health weight increases as the health status of the server deteriorates, and the health weight is positively correlated with the priority of each target task; adding the set of target tasks to a task queue, and updating the priority of the tasks in the task queue based on a priority index, wherein the priority index includes a health weight, an operation weight, and an execution weight, the operation weight is used to reflect the urgency of the task, the operation weight increases as the urgency of the task increases, the execution weight is used to reflect the situation where the task is preempted by a higher priority task, and the execution weight increases as the number of times the task is preempted increases; and executing the tasks in the task queue based on the priority of the tasks in the updated task queue.

[0096] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a processing method for performing the server asset data acquisition task provided in the above embodiments. The method includes: obtaining a set of target tasks, wherein each target task in the set corresponds to a server asset data acquisition task; initializing the priority of each target task in the set of target tasks according to a health weight, wherein the health weight reflects the health status of the server, increases as the server's health status deteriorates, and is positively correlated with the priority of each target task; adding the set of target tasks to a task queue and updating the priorities of the tasks in the task queue based on priority indicators, wherein the priority indicators include a health weight, an operation weight, and an execution weight, the operation weight reflects the urgency of the task, increases as the urgency of the task increases, and the execution weight reflects the situation where a task is preempted by a higher-priority task, increases as the number of times a task is preempted increases; and executing the tasks in the task queue based on the priorities of the tasks in the updated task queue.

[0097] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing server asset data acquisition tasks, characterized in that, include: Obtain a set of target tasks, wherein each target task in the set of target tasks corresponds to an asset data collection task of a server; The priority of each target task in the target task set is initialized according to the health weight, wherein the health weight is used to reflect the health status of the server, the health weight increases as the health status of the server deteriorates, and the health weight is positively correlated with the priority of each target task; Add the target task set to the task queue; For each task in the task queue, treat it as the first current task and perform the following steps to obtain the current operation weight corresponding to the first current task: Obtain the refresh count of the first current task, wherein the refresh count is incremented by one each time an execution instruction for the first current task is received; The current operation weight is determined based on the number of refreshes, wherein the number of refreshes is positively correlated with the current operation weight; For each task in the task queue, treat it as the second current task and perform the following steps to obtain the current execution weight corresponding to the second current task: Obtain the number of times the second current task has been preempted, wherein the number of times the second current task has been preempted by a higher priority task for execution; The current execution weight is determined based on the number of times the execution has been preempted, wherein the number of times the execution has been preempted is positively correlated with the current execution weight. The priority of tasks in the task queue is updated based on priority indicators, wherein the priority indicators include health weight, operation weight, and execution weight. The operation weight is used to reflect the urgency of the task and increases as the urgency of the task increases. The execution weight is used to reflect the situation where the task is preempted by a higher priority task and increases as the number of times the task is preempted increases. Tasks in the updated task queue are executed based on their priorities.

2. The method for processing server asset data acquisition tasks according to claim 1, characterized in that, The task queue includes a set of target tasks and a set of non-target tasks. The priority indicators include a first priority indicator and a second priority indicator. Updating the priority of tasks in the task queue based on the priority indicators includes: The priority of each target task in the target task set is updated based on the first priority indicator, wherein the first priority indicator includes the health weight, the operation weight, and the execution weight; The priority of each non-target task in the non-target task set is updated based on the second priority index, wherein the second priority index includes the operation weight and the execution weight.

3. The method for processing server asset data acquisition tasks according to claim 1, characterized in that, Updating the priority of tasks in the task queue based on the priority index includes: Calculate the comprehensive weight value of each task in the task queue, wherein the comprehensive weight value is obtained by multiplying each weight included in the priority index by a preset value corresponding to each weight and then adding them together, and the sum of the preset values ​​corresponding to each weight is 1; The priority of each task is updated based on the comprehensive weight value of each task, wherein the comprehensive weight value of each task is positively correlated with the priority of each task.

4. The method for processing server asset data acquisition tasks according to claim 3, characterized in that, After executing tasks in the updated task queue based on their priorities, the method further includes: Retrieve the execution results of the tasks in the task queue within the current task execution cycle; The execution weights of the tasks in the task queue within the target task execution cycle are updated based on the execution results, wherein the target task execution cycle is the next task execution cycle after the current task execution cycle.

5. The method for processing server asset data acquisition tasks according to any one of claims 1 to 4, characterized in that, Before executing tasks in the updated task queue based on their priorities, the method further includes: Upon receiving a priority adjustment instruction, the priority of the task corresponding to the priority adjustment instruction is adjusted based on the priority adjustment instruction.

6. A processing device for server asset data acquisition tasks, characterized in that, include: The acquisition module is used to acquire a set of target tasks, wherein each target task in the set of target tasks corresponds to an asset data acquisition task of a server. An initialization module is used to initialize the priority of each target task in the target task set according to a health weight, wherein the health weight is used to reflect the health status of the server, the health weight increases as the health status of the server deteriorates, and the health weight is positively correlated with the priority of each target task. The update module is used to add the target task set to the task queue; and to perform the following steps on each task in the task queue as a first current task to obtain the current operation weight corresponding to the first current task: obtaining the refresh count of the first current task, wherein the refresh count is incremented by one each time an execution instruction of the first current task is received; determining the current operation weight based on the refresh count, wherein the refresh count is positively correlated with the current operation weight; and to perform the following steps on each task in the task queue as a second current task to obtain the current execution weight corresponding to the second current task: obtaining the preemption status of the second current task. The number of times a task is preempted is defined as the number of times the second current task is preempted by a higher-priority task. The current execution weight is determined based on the number of preemptions, where the number of preemptions is positively correlated with the current execution weight. The priority of tasks in the task queue is updated based on priority indicators, where the priority indicators include health weight, operation weight, and execution weight. The operation weight reflects the urgency of the task and increases as the urgency of the task increases. The execution weight reflects the preemption of a task by a higher-priority task and increases as the number of times a task is preempted increases. An execution module is used to execute tasks in the task queue based on the priority of the updated tasks in the task queue.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the processing method for the server asset data acquisition task as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the processing method for the server asset data acquisition task as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Task processing method and device, server equipment and medium

    CN116132316A