CN112416534A - Agent-based task management method and device - Google Patents

Agent-based task management method and device Download PDF

Info

Publication number
CN112416534A
CN112416534A CN202011322403.XA CN202011322403A CN112416534A CN 112416534 A CN112416534 A CN 112416534A CN 202011322403 A CN202011322403 A CN 202011322403A CN 112416534 A CN112416534 A CN 112416534A
Authority
CN
China
Prior art keywords
information
task
processed
memory
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011322403.XA
Other languages
Chinese (zh)
Inventor
苑学贺
杨洁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing China Power Information Technology Co Ltd
Original Assignee
State Grid Information and Telecommunication Co Ltd
Beijing China Power Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Information and Telecommunication Co Ltd, Beijing China Power Information Technology Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202011322403.XA priority Critical patent/CN112416534A/en
Publication of CN112416534A publication Critical patent/CN112416534A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an Agent-based task management method, which adds an Agent in a task node in advance and comprises the following steps: receiving at least one task to be processed, wherein the type of the task to be processed is any one of preset types, and the task to be processed comprises the following steps: starting a command, CPU occupation information, memory occupation information and a task executable file; receiving idle CPU information and idle memory information of each task node; determining a target task node based on each idle CPU information and corresponding idle memory information, CPU occupation information and memory occupation information; and sending the task feasibility file to the target task node so that the target task node executes the task feasibility file. According to the method, the Agent is added into the task node, the to-be-processed task is executed through the Agent, the type of the to-be-processed task is not limited, the management of various types of to-be-processed tasks is achieved, and the processing speed is improved.

Description

Agent-based task management method and device
Technical Field
The application relates to the field of electronic information, in particular to a task management method and device based on Agent
Background
The tasks can be written based on multiple languages, such as Shell scripts, Java programs, Go programs and the like, and after the tasks are written, the tasks are distributed to corresponding task nodes and are processed based on the corresponding task nodes.
The existing task management process can only manage the tasks written by a certain programming language, and does not support the management of tasks of multiple languages, so that the task processing speed is low.
Disclosure of Invention
The application provides a task management method and device based on Agent, which are used for solving the problems that the task processing speed is slow because the existing task management process can only manage the tasks written by a certain programming language and does not support the management of tasks of multiple languages, and the method and device based on Agent provide the following technical scheme:
a task management method based on Agent adds Agent in task node in advance, the method includes:
receiving at least one task to be processed, wherein the type of the task to be processed is any one of preset types, and acquiring a starting command, CPU occupation information, memory occupation information and a task executable file in the task to be processed;
receiving idle CPU information and idle memory information of each task node;
determining a target task node based on each idle CPU information and corresponding idle memory information, the CPU occupation information and the memory occupation information;
and sending the task feasibility file to the target task node so as to enable the target task node to execute the task feasibility file.
Optionally, the method for determining a target task node based on each idle CPU information and idle memory information, the CPU occupation information, and the memory occupation information includes:
traversing each idle CPU information and corresponding idle memory information, and comparing the CPU occupation information and the memory occupation information with each idle CPU information and corresponding idle memory information;
and taking the task node with idle CPU information more than or equal to the CPU occupation information and corresponding idle memory information more than or equal to the memory occupation information as the target task node.
The above method, optionally, further includes:
and storing the task to be processed, the idle CPU information and the corresponding idle memory information.
The above method, optionally, further includes:
receiving an execution result of the task to be processed fed back by the target task node;
and marking the execution result.
The above method, optionally, further includes:
counting the failure times of executing failed tasks to be processed in the tasks to be processed at intervals of preset time;
comparing the failure times with a preset failure time threshold;
and giving up the processing of the tasks to be processed with the failure times reaching the preset failure threshold value.
An Agent-based task management device, which adds an Agent in a task node in advance, the device comprising:
the system comprises a receiving and obtaining module, a task execution module and a task execution module, wherein the receiving and obtaining module is used for receiving at least one task to be processed, the type of the task to be processed is any one of preset types, and a starting command, CPU occupation information, memory occupation information and a task executable file in the task to be processed are obtained;
the receiving module is used for receiving idle CPU information and idle memory information of each task node;
the determining module is used for determining a target task node based on each piece of idle CPU information and corresponding idle memory information, the CPU occupation information and the memory occupation information;
and the sending and executing module is used for sending the task feasibility file to the target task node so as to enable the target task node to execute the task feasibility file.
The above apparatus, optionally, the determining module includes:
the comparison unit is used for traversing each idle CPU information and the corresponding idle memory information thereof, and comparing the CPU occupation information and the memory occupation information with each idle CPU information and the corresponding idle memory information;
and the determining unit is used for taking the task node of which the idle CPU information is more than or equal to the CPU occupation information and the corresponding idle memory information is more than or equal to the memory occupation information as the target task node.
The above apparatus, optionally, further comprises:
and the storage module is used for storing the task to be processed, each piece of idle CPU information and corresponding idle memory information.
The above apparatus, optionally, further comprises:
the receiving module is used for receiving the execution result of the task to be processed fed back by the target task node;
and the marking module is used for marking the execution result.
The above apparatus, optionally, further comprises:
the counting module is used for counting the failure times of executing failed tasks to be processed in the tasks to be processed at intervals of preset time;
the comparison module is used for comparing the failure times with a preset failure time threshold;
and the abandoning module is used for abandoning the processing of the tasks to be processed with the failure times reaching the preset failure threshold value.
The invention discloses a task management method based on Agent, which adds Agent in task node in advance, comprising: receiving at least one task to be processed, wherein the type of the task to be processed is any one of preset types, and the task to be processed comprises the following steps: starting a command, CPU occupation information, memory occupation information and a task executable file; receiving idle CPU information and idle memory information of each task node; determining a target task node based on each idle CPU information and corresponding idle memory information, CPU occupation information and memory occupation information; and sending the task feasibility file to the target task node so that the target task node executes the task feasibility file. According to the method, the Agent is added into the task node, the to-be-processed task is executed through the Agent, the type of the to-be-processed task is not limited, the management of various types of to-be-processed tasks is achieved, and the processing speed is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of an Agent-based task management method disclosed in an embodiment of the present application;
FIG. 2 is a schematic diagram of an Agent-based task management method disclosed in an embodiment of the present application;
fig. 3 is a block diagram of a task management device based on Agent according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The invention discloses an Agent-based task management method and device, which are applied to the management process of different types of tasks, wherein the different types of tasks can be written based on Shell scripts, Java programs and Go programs, the execution main body of the method can be a processor or a controller and the like, preferably, the processor or the controller is a task management center, the task management center is connected with a plurality of task nodes, the Agent is added in advance for each task node, and the execution flow of the management method is shown in figure 1 and comprises the following steps:
s101, receiving at least one task to be processed, wherein the type of the task to be processed is any one of preset types, and acquiring a starting command, CPU occupation information, memory occupation information and a task executable file in the task to be processed;
in the embodiment of the invention, at least one task to be processed is received, the type of the task to be processed is any one of various preset types, the preset types are based on Shell scripts, Java programs, Go programs and the like, and in the embodiment of the invention, the preset types are not limited, the starting command, the CPU occupation information, the memory occupation information and the task executable file in the task to be processed are obtained, wherein the start command is used for executing the task executable file, the task executable file is a specific task to be executed in the tasks to be processed, the CPU occupation information is the processing amount of the CPU occupied by processing the task to be processed, the memory usage information is memory amount occupied by processing a coarse waist in the task to be processed, and the task to be processed further includes: and preferably, acquiring the task to be processed through a Rest interface.
Further, after receiving the task to be processed, storing the task name, the task type, the start command, the CPU occupation information and the memory occupation information in the task to be processed into a database, and storing the task execution file into a file server.
S102, receiving idle CPU information and idle memory information of each task node;
in the embodiment of the present invention, each task node sends idle CPU information and idle memory information to the task management center in real time, and the task management center receives the idle CPU information and the idle memory information of each task node, where the idle CPU information may be a processing amount of a task in the task node, and the idle memory information may be a specific idle memory amount.
Preferably, the idle CPU information of each task node and the idle memory information corresponding to the idle CPU information are stored, and may be stored in a database together with a task name, a task type, a start command, CPU occupation information, and memory occupation information in the to-be-processed information, or may be stored in other designated locations.
S103, determining a target task node based on each idle CPU information and corresponding idle memory information, the CPU occupation information and the memory occupation information;
in the embodiment of the present invention, each idle CPU information and its corresponding idle memory information in the database are traversed, each idle CPU information and its corresponding idle memory information are compared with the CPU occupancy information and the memory occupancy information, and it is determined whether there is a task node where the idle CPU information is greater than or equal to the CPU occupancy information and its corresponding idle memory information is greater than or equal to the memory occupancy information, where in the determination process, the CPU occupancy information may be compared first or the memory occupancy information may be compared first, and in the embodiment of the present invention, no specific limitation is made, and a task node where the idle CPU information is greater than or equal to the CPU occupancy information and its corresponding idle memory information is greater than or equal to the memory occupancy information is used as the target task node, and further, if there are a plurality of task nodes satisfying the above requirements in each task node, the first task node meeting the requirement can be used as a target task node, and the node with the largest idle CPU information or idle memory information in each node meeting the requirement can also be used as the target task node.
Preferably, after the target task node is determined, the corresponding relationship between the task to be processed and the target task node is stored, so that the target task node corresponding to the task to be processed is conveniently queried at a subsequent task execution stage, and the target task node processes the task to be processed.
And S104, sending the task feasibility file to the target task node so as to enable the target task node to execute the task feasibility file.
In the embodiment of the present invention, for each task node, a task to be processed of the task node is pulled to the task management center at intervals of a preset duration, where a pulling principle may be to directly assign a corresponding task to be processed to the task management center or the task node actively acquires the corresponding task to be processed based on a correspondence between the task to be processed and the target task node.
The processing process of the target task node executing the task executable file is as follows: and acquiring a starting command in the task to be processed, calling the starting command to enable the task executable file to execute, and preferably, feeding back an execution result to the task management center.
The task management center receives the execution result and marks the task to be processed, for example, the task to be processed may be marked as processing completion.
The invention discloses a task management method based on Agent, which adds Agent in task node in advance, comprising: receiving at least one task to be processed, wherein the type of the task to be processed is any one of preset types, and the task to be processed comprises the following steps: starting a command, CPU occupation information, memory occupation information and a task executable file; receiving idle CPU information and idle memory information of each task node; determining a target task node based on each idle CPU information and corresponding idle memory information, CPU occupation information and memory occupation information; and sending the task feasibility file to the target task node so that the target task node executes the task feasibility file. According to the method, the Agent is added into the task node, the to-be-processed task is executed through the Agent, the type of the to-be-processed task is not limited, the management of various types of to-be-processed tasks is achieved, and the processing speed is improved.
In the embodiment of the present invention, a schematic diagram for the above process is shown in fig. 2, and includes a task management center, a database, a file service, and task nodes, where the task management center receives a task to be processed, stores a start command, CPU occupation information, memory occupation information, a task name, and a task type in the task to be processed in the database, and robustly stores a file in the file service, the file management center receives the idle CPU information and the idle memory information of each task node, stores each idle CPU information and the corresponding idle memory information into a database, and determining a target task node based on each piece of idle CPU information and corresponding idle memory information, the CPU occupation information and the memory occupation information, and sending the task feasibility file to the target task node so as to enable the target task node to execute the task feasible file. The specific processing procedure is the same as that described in S103 and S104, and is not described herein again.
Further, counting the failure times of executing failed tasks to be processed in the tasks to be processed at intervals of preset time, comparing the failure times with a preset failure time threshold value, and comparing the failure times with a preset failure time threshold value; and giving up the processing of the tasks to be processed with the failure times reaching the preset failure threshold value. The preset failure threshold may be set based on experience or specific conditions, and in the embodiment of the present invention, specific values of the preset failure number threshold are not limited. Preferably, the information for abandoning the process may be fed back.
Based on the above Agent-based task management method, in an embodiment of the present invention, an Agent-based task management device is further provided, and a structural block diagram of the management device is shown in fig. 3, where the management device includes:
a receiving and acquiring module 201, a receiving module 202, a determining module 203 and a sending and executing module 204.
Wherein,
the receiving and acquiring module 201 is configured to receive at least one to-be-processed task, where the to-be-processed task is any one of preset types, and acquire a start command, CPU occupation information, memory occupation information, and a task executable file in the to-be-processed task;
the receiving module 202 is configured to receive idle CPU information and idle memory information of each task node;
the determining module 203 is configured to determine a target task node based on each idle CPU information and corresponding idle memory information, the CPU occupation information, and the memory occupation information;
the sending and executing module 204 is configured to send the task feasibility file to the target task node, so that the target task node executes the task feasibility file.
The invention discloses a task management device based on Agent, which adds Agent in task node in advance, comprising: receiving at least one task to be processed, wherein the type of the task to be processed is any one of preset types, and the task to be processed comprises the following steps: starting a command, CPU occupation information, memory occupation information and a task executable file; receiving idle CPU information and idle memory information of each task node; determining a target task node based on each idle CPU information and corresponding idle memory information, CPU occupation information and memory occupation information; and sending the task feasibility file to the target task node so that the target task node executes the task feasibility file. According to the device, the Agents are added into the task nodes, the tasks to be processed are executed through the Agens, the types of the tasks to be processed are not limited, the management of various types of the tasks to be processed is realized, and the processing speed is improved.
In this embodiment of the present invention, the determining module 203 includes:
a comparison unit 205 and a determination unit 206.
Wherein,
the comparing unit 205 is configured to traverse each idle CPU information and its corresponding idle memory information, and compare the CPU occupancy information and the memory occupancy information with each idle CPU information and corresponding idle memory information;
the determining unit 206 is configured to use a task node whose idle CPU information is greater than or equal to the CPU occupation information and whose corresponding idle memory information is greater than or equal to the memory occupation information as the target task node.
In this embodiment of the present invention, the management apparatus further includes: a storage module 207.
The storage module 207 is configured to store the to-be-processed task, the idle CPU information and the corresponding idle memory information.
In this embodiment of the present invention, the management apparatus further includes:
a receiving module 208 and a marking module 209.
Wherein,
the receiving module 208 is configured to receive an execution result of the task to be processed, which is fed back by the target task node;
the marking module 209 is configured to mark the execution result.
In this embodiment of the present invention, the management apparatus further includes:
a statistics module 210, a comparison module 211, and a discard module 212.
Wherein,
the counting module 210 is configured to count failure times of executing a failed to-be-processed task in the to-be-processed tasks at intervals of a preset time length;
the comparing module 211 is configured to compare the failure times with a preset failure time threshold;
the abandoning module 212 is configured to abandon the processing of the to-be-processed task whose failure frequency reaches the preset failure threshold.
It should be noted that the message pushing apparatus may include a processor and a memory, and the receiving and acquiring module 201, the receiving module 202, the determining module 203, and the sending and executing module 204, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor may include a kernel, which calls the corresponding program unit from the memory. The number of the kernels can be one or more, agents are added into the task nodes by adjusting kernel parameters, the tasks to be processed are executed through the agents, the types of the tasks to be processed are not limited, the management of various types of the tasks to be processed is realized, and the processing speed is improved.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the application provides a computer readable medium, wherein a computer program is stored on the computer readable medium, and when the computer program is executed by a processor, the Agent-based task management method described in the embodiment of the method is realized.
The embodiment of the application provides a processor, wherein the processor is used for running a program, and the program realizes the Agent-based task management method described in the above method embodiment when running.
The embodiment of the application provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the Agent-based task management method described in the embodiment of the method is realized.
The present application also provides a computer program product which, when executed on a data processing device, causes the data processing device to implement the Agent-based task management method described in the above method embodiments. The management method adds an Agent in a task node in advance, and comprises the following steps:
receiving at least one task to be processed, wherein the type of the task to be processed is any one of preset types, and acquiring a starting command, CPU occupation information, memory occupation information and a task executable file in the task to be processed;
receiving idle CPU information and idle memory information of each task node;
determining a target task node based on each idle CPU information and corresponding idle memory information, the CPU occupation information and the memory occupation information;
and sending the task feasibility file to the target task node so as to enable the target task node to execute the task feasibility file.
Optionally, the method for determining a target task node based on each idle CPU information and idle memory information, the CPU occupation information, and the memory occupation information includes:
traversing each idle CPU information and corresponding idle memory information, and comparing the CPU occupation information and the memory occupation information with each idle CPU information and corresponding idle memory information;
and taking the task node with idle CPU information more than or equal to the CPU occupation information and corresponding idle memory information more than or equal to the memory occupation information as the target task node.
The above method, optionally, further includes:
and storing the task to be processed, the idle CPU information and the corresponding idle memory information.
The above method, optionally, further includes:
receiving an execution result of the task to be processed fed back by the target task node;
and marking the execution result.
The above method, optionally, further includes:
counting the failure times of executing failed tasks to be processed in the tasks to be processed at intervals of preset time;
comparing the failure times with a preset failure time threshold;
and giving up the processing of the tasks to be processed with the failure times reaching the preset failure threshold value.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only for the purpose of illustrating the preferred embodiments of the present application and the technical principles applied, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. The scope of the invention according to the present application is not limited to the specific combinations of the above-described features, and may also cover other embodiments in which the above-described features or their equivalents are arbitrarily combined without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A task management method based on Agent is characterized in that Agent is added in a task node in advance, and the method comprises the following steps:
receiving at least one task to be processed, wherein the type of the task to be processed is any one of preset types, and acquiring a starting command, CPU occupation information, memory occupation information and a task executable file in the task to be processed;
receiving idle CPU information and idle memory information of each task node;
determining a target task node based on each idle CPU information and corresponding idle memory information, the CPU occupation information and the memory occupation information;
and sending the task feasibility file to the target task node so as to enable the target task node to execute the task feasibility file.
2. The method of claim 1, wherein determining a target task node based on each of free CPU information and free memory information, the CPU footprint information, and the memory footprint information comprises:
traversing each idle CPU information and corresponding idle memory information, and comparing the CPU occupation information and the memory occupation information with each idle CPU information and corresponding idle memory information;
and taking the task node with idle CPU information more than or equal to the CPU occupation information and corresponding idle memory information more than or equal to the memory occupation information as the target task node.
3. The method of claim 1, further comprising:
and storing the task to be processed, the idle CPU information and the corresponding idle memory information.
4. The method of claim 1, further comprising:
receiving an execution result of the task to be processed fed back by the target task node;
and marking the execution result.
5. The method of claim 4, further comprising:
counting the failure times of executing failed tasks to be processed in the tasks to be processed at intervals of preset time;
comparing the failure times with a preset failure time threshold;
and giving up the processing of the tasks to be processed with the failure times reaching the preset failure threshold value.
6. An Agent-based task management device, characterized in that an Agent is added to a task node in advance, the device comprising:
the system comprises a receiving and obtaining module, a task execution module and a task execution module, wherein the receiving and obtaining module is used for receiving at least one task to be processed, the type of the task to be processed is any one of preset types, and a starting command, CPU occupation information, memory occupation information and a task executable file in the task to be processed are obtained;
the receiving module is used for receiving idle CPU information and idle memory information of each task node;
the determining module is used for determining a target task node based on each piece of idle CPU information and corresponding idle memory information, the CPU occupation information and the memory occupation information;
and the sending and executing module is used for sending the task feasibility file to the target task node so as to enable the target task node to execute the task feasibility file.
7. The apparatus of claim 6, wherein the determining module comprises:
the comparison unit is used for traversing each idle CPU information and the corresponding idle memory information thereof, and comparing the CPU occupation information and the memory occupation information with each idle CPU information and the corresponding idle memory information;
and the determining unit is used for taking the task node of which the idle CPU information is more than or equal to the CPU occupation information and the corresponding idle memory information is more than or equal to the memory occupation information as the target task node.
8. The apparatus of claim 6, further comprising:
and the storage module is used for storing the task to be processed, each piece of idle CPU information and corresponding idle memory information.
9. The apparatus of claim 6, further comprising:
the receiving module is used for receiving the execution result of the task to be processed fed back by the target task node;
and the marking module is used for marking the execution result.
10. The apparatus of claim 9, further comprising:
the counting module is used for counting the failure times of executing failed tasks to be processed in the tasks to be processed at intervals of preset time;
the comparison module is used for comparing the failure times with a preset failure time threshold;
and the abandoning module is used for abandoning the processing of the tasks to be processed with the failure times reaching the preset failure threshold value.
CN202011322403.XA 2020-11-23 2020-11-23 Agent-based task management method and device Pending CN112416534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011322403.XA CN112416534A (en) 2020-11-23 2020-11-23 Agent-based task management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011322403.XA CN112416534A (en) 2020-11-23 2020-11-23 Agent-based task management method and device

Publications (1)

Publication Number Publication Date
CN112416534A true CN112416534A (en) 2021-02-26

Family

ID=74778742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011322403.XA Pending CN112416534A (en) 2020-11-23 2020-11-23 Agent-based task management method and device

Country Status (1)

Country Link
CN (1) CN112416534A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543862A (en) * 2022-09-27 2022-12-30 超聚变数字技术有限公司 Memory management method and related device
CN115640968A (en) * 2022-10-18 2023-01-24 中电金信软件有限公司 Job scheduling method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699445A (en) * 2013-12-19 2014-04-02 北京奇艺世纪科技有限公司 Task scheduling method, device and system
CN105718317A (en) * 2016-01-15 2016-06-29 浪潮(北京)电子信息产业有限公司 Task scheduling method and task scheduling device
CN107729126A (en) * 2016-08-12 2018-02-23 中国移动通信集团浙江有限公司 A kind of method for scheduling task and device of container cloud
CN109478973A (en) * 2016-07-14 2019-03-15 华为技术有限公司 For task schedule, the SDN controller of resource granting and service offer, system and method
CN109656691A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of computing resource
CN109656699A (en) * 2018-12-14 2019-04-19 平安医疗健康管理股份有限公司 Distributed computing method, device, system, equipment and readable storage medium storing program for executing
CN109697122A (en) * 2017-10-20 2019-04-30 华为技术有限公司 Task processing method, equipment and computer storage medium
CN110914805A (en) * 2017-07-12 2020-03-24 华为技术有限公司 Computing system for hierarchical task scheduling

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699445A (en) * 2013-12-19 2014-04-02 北京奇艺世纪科技有限公司 Task scheduling method, device and system
CN105718317A (en) * 2016-01-15 2016-06-29 浪潮(北京)电子信息产业有限公司 Task scheduling method and task scheduling device
CN109478973A (en) * 2016-07-14 2019-03-15 华为技术有限公司 For task schedule, the SDN controller of resource granting and service offer, system and method
CN107729126A (en) * 2016-08-12 2018-02-23 中国移动通信集团浙江有限公司 A kind of method for scheduling task and device of container cloud
CN110914805A (en) * 2017-07-12 2020-03-24 华为技术有限公司 Computing system for hierarchical task scheduling
CN109656691A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of computing resource
CN109697122A (en) * 2017-10-20 2019-04-30 华为技术有限公司 Task processing method, equipment and computer storage medium
CN109656699A (en) * 2018-12-14 2019-04-19 平安医疗健康管理股份有限公司 Distributed computing method, device, system, equipment and readable storage medium storing program for executing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543862A (en) * 2022-09-27 2022-12-30 超聚变数字技术有限公司 Memory management method and related device
CN115543862B (en) * 2022-09-27 2023-09-01 超聚变数字技术有限公司 Memory management method and related device
CN115640968A (en) * 2022-10-18 2023-01-24 中电金信软件有限公司 Job scheduling method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107273195B (en) Big data batch processing method and device and computer system
CN112346829A (en) Method and equipment for task scheduling
CN109739627B (en) Task scheduling method, electronic device and medium
CN112416534A (en) Agent-based task management method and device
CN112748993A (en) Task execution method and device, storage medium and electronic equipment
CN106648839B (en) Data processing method and device
CN108874375B (en) Timer implementation method and device
CN106878365B (en) data synchronization method and device
CN111078468A (en) Service rollback method and device under micro-service architecture
CN110764930A (en) Request or response processing method and device based on message mode
CN108595315B (en) Log collection method, device and equipment
CN110968406B (en) Method, device, storage medium and processor for processing task
CN110888723A (en) Timing task processing method and device
CN110955502B (en) Task scheduling method and device
CN109947843B (en) Method, device and system for determining time in block chain
CN110753006A (en) Data processing method and device and electronic equipment
CN109558249B (en) Control method and device for concurrent operation
CN115454599A (en) Task processing method, system, device, storage medium and electronic equipment
CN111080447B (en) Rotation method and system for neutral node in block chain system
CN110618863A (en) Operation scheduling method based on Raft algorithm
CN112506911A (en) Data quality monitoring method and device, electronic equipment and storage medium
CN110620703A (en) Http-based service node state determination method
CN110659111A (en) Data processing method and system
CN110704517B (en) Method and device for generating task, storage medium and processor
CN110874268A (en) Data processing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211111

Address after: 100192 room 710, scientific research building, No. 15, Xiaoying East Road, Qinghe, Haidian District, Beijing

Applicant after: Beijing Zhongdian Puhua Information Technology Co., Ltd

Address before: 100192 room 710, scientific research building, No. 15, Xiaoying East Road, Qinghe, Haidian District, Beijing

Applicant before: Beijing Zhongdian Puhua Information Technology Co., Ltd

Applicant before: State Grid Information and Communication Industry Group Co., Ltd