CN114726869A - Resource management method and device, storage medium and electronic equipment - Google Patents

Resource management method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114726869A
CN114726869A CN202210341708.8A CN202210341708A CN114726869A CN 114726869 A CN114726869 A CN 114726869A CN 202210341708 A CN202210341708 A CN 202210341708A CN 114726869 A CN114726869 A CN 114726869A
Authority
CN
China
Prior art keywords
task
management
queue
resource
management task
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
CN202210341708.8A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210341708.8A priority Critical patent/CN114726869A/en
Publication of CN114726869A publication Critical patent/CN114726869A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1048Departure or maintenance mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a resource management method and device, a storage medium and an electronic device, wherein the method comprises the following steps: adding each management task generated according to the resource creation information into a task queue, and adding each management task into each detection queue; reading a first management task in a task queue, and taking the management task as a target management task; merging the to-be-processed management tasks corresponding to the target management task obtained from the detection queues to obtain an executable management task; executing the executable management task to realize the resource management operation corresponding to the executable management task; and updating the task queue, and returning to the step of reading the first management task in the task queue until no management task exists in the task queue. The resource management is realized by executing the management task, no additional operation is needed in the process of managing the resources, the resources can be released quickly, and the recovery speed of the resource cluster is accelerated.

Description

Resource management method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of resource management technologies, and in particular, to a resource management method and apparatus, a storage medium, and an electronic device.
Background
At present, most of cloud management platforms have the capacity of resource allocation and self-service construction of management processes in enterprises at the same time, and can meet the requirement that the enterprises consider the realization of self-service of the management processes when applying cloud computing resources, namely, the resource allocation and other management functions are integrated into a whole set of user-oriented cloud computing resource delivery self-service through process arrangement, and the resources in the cloud management platform can be managed by using the service.
The recovery speed of the fault resource in the cloud foundation setting fault self-recovery scene in the cloud management platform is one of indexes of normal work of the cloud management platform, and for the fault resource scene, when resource management is carried out, operations such as resource configuration and the like need to be carried out, so that the resource cannot be rapidly released, and the fault recovery speed of the resource cluster is reduced.
Disclosure of Invention
In view of this, the present invention provides a resource management method and apparatus, a storage medium, and an electronic device, which can release resources and improve the failure recovery speed of a resource cluster.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
the first aspect of the present invention discloses a resource management method, which includes:
acquiring resource creating information;
creating computing resources based on the resource creating information and generating each management task;
adding each management task into a preset task queue;
adding each management task to each preset detection queue;
reading a first management task in a task queue;
taking the read management task as a target management task;
acquiring each to-be-processed management task corresponding to the target management task in each detection queue;
merging the management tasks to be processed to obtain executable management tasks;
executing the executable management task, and realizing resource management operation corresponding to the executable management task on the computing resource;
and updating the task queue, and returning to the step of executing and reading the first management task in the task queue until no management task exists in the task queue.
The above method, optionally, further includes:
and adding the created computing resources into a preset resource cluster.
Optionally, in the method, adding each management task to each preset detection queue includes:
determining a task type of each management task;
and for each management task, determining a detection queue corresponding to the task type of the management task in each detection queue as a target detection queue, and adding the management task to the target detection queue.
Optionally, in the method, the obtaining, in each detection queue, each to-be-processed management task corresponding to the target management task includes:
analyzing the target management task to acquire deployment object information in the target management task;
and determining each management task corresponding to the deployment object information in each detection queue as a to-be-processed management task.
Optionally, in the method, the merging the to-be-processed management tasks to obtain an executable management task includes:
determining the task type of each to-be-processed management task;
matching the task types of the to-be-processed management tasks in a preset task rule to determine the task execution type;
and merging the management tasks to be processed to obtain executable management tasks corresponding to the task execution types.
Optionally, in the method, the updating the task queue includes:
and determining each management task corresponding to the deployment object information in the task queue, deleting each determined management task from the task queue, and finishing updating the task queue.
A second aspect of the present invention discloses a resource management apparatus, including:
a first acquisition unit configured to acquire resource creation information;
a generating unit configured to create a computing resource based on the resource creation information and generate each management task;
the first adding unit is used for adding each management task to a preset task queue;
the second adding unit is used for adding each management task to each preset detection queue;
the reading unit is used for reading a first management task in the task queue;
the determining unit is used for taking the read management task as a target management task;
a second obtaining unit, configured to obtain, in each detection queue, each to-be-processed management task corresponding to the target management task;
the merging processing unit is used for merging the management tasks to be processed to obtain executable management tasks;
the execution unit is used for executing the executable management task and realizing resource management operation corresponding to the executable management task on the computing resource;
and the updating unit is used for updating the task queue and calling the reading unit to execute the step of reading the first management task in the task queue when the management task exists in the updated task queue.
The above apparatus, optionally, further comprises:
and the third adding unit is used for adding the created computing resources to the preset resource cluster.
The above apparatus, optionally, the second adding unit includes:
a first determining subunit, configured to determine a task type of each of the management tasks;
and the adding subunit is configured to, for each management task, determine a detection queue corresponding to the task type of the management task in each detection queue as a target detection queue, and add the management task to the target detection queue.
The above apparatus, optionally, the second obtaining unit includes:
the analysis subunit is used for analyzing the target management task to acquire deployment object information in the target management task;
and the second determining subunit is configured to determine each management task corresponding to the deployment object information in each detection queue as a to-be-processed management task.
The above apparatus, optionally, the merging processing unit includes:
the third determining subunit is used for determining the task type of each to-be-processed management task;
the matching subunit is used for matching the task type of each to-be-processed management task in a preset task rule to determine a task execution type;
and the merging processing subunit is used for merging the management tasks to be processed to obtain an executable management task corresponding to the task execution type.
The above apparatus, optionally, the update unit includes:
and the updating subunit is used for determining each management task corresponding to the deployment object information in the task queue, deleting each determined management task from the task queue, and completing the updating of the task queue.
A third aspect of the present invention discloses a storage medium, which includes stored instructions, wherein when the instructions are executed, a device on which the storage medium is located is controlled to execute the resource management method described above.
In a fourth aspect, the present invention discloses an electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the method for resource management as described above.
Compared with the prior art, the invention has the following advantages:
the invention provides a resource management method and device, a storage medium and an electronic device, wherein the method comprises the following steps: adding each management task generated according to the resource creation information into a task queue, and adding each management task into each detection queue; reading a first management task in a task queue, and taking the management task as a target management task; merging the to-be-processed management tasks corresponding to the target management task acquired from the detection queues to obtain an executable management task; executing the executable management task to realize the resource management operation corresponding to the executable management task; and updating the task queue, and returning to the step of reading the first management task in the task queue until no management task exists in the task queue. The resource management is realized by executing the management task, and the resource management can be realized without extra operation and waiting in the process of managing the resources, so that the resources can be released quickly, and the recovery speed of the resource cluster is accelerated.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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 embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for resource management according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for adding each management task to each preset detection queue according to an embodiment of the present invention;
FIG. 3 is an exemplary diagram of a queue for managing tasks according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for acquiring each pending management task corresponding to a target management task in each detection queue according to an embodiment of the present invention;
fig. 5 is a flowchart of a method for merging management tasks to be processed to obtain an executable management task according to an embodiment of the present invention;
fig. 6 is a diagram illustrating a scenario of a resource management method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a resource management apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
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.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The invention relates to contents such as a cloud computing platform, a cloud management platform, banking IT management, resource management, fault self-healing and the like, and the cloud computing platform, the cloud management platform, the banking IT management, the resource management and the fault self-healing are explained in a related way:
the cloud computing platform is also called a cloud platform, and refers to a platform capable of providing various cloud services such as IaaS, PaaS, SaaS, and the like, wherein the cloud service is a way that can dynamically and flexibly obtain resources, software, or application services on demand based on the internet through internet circulation, and may also be called a commodity.
A Cloud Management Platform (CMP) is a product form of an enterprise Cloud strategy first proposed by Gartner. The cloud management platform is independent of IaaS and PaaS, manages cloud computing resources required by application operation based on cloud API, realizes a unified management view of the resources, realizes fusion and delivery of internal processes of enterprises, and finally realizes self-service of the cloud platform.
Banking IT management refers to the aspect of banking IT deployment, maintenance management and the like which are provided with IT management requirements aiming at banking business characteristics, such as a series of related management processes and management functions serving system operation, maintenance and management, such as system user password management, resource monitoring management, configuration management and the like.
Resource management refers to the management of the whole life cycle from construction, operation to extinction of resources, including the configuration change of various resources in the life cycle.
The self-healing of the fault refers to the real-time discovery of alarm, pre-diagnosis and analysis, automatic recovery of the fault and the completion of the peripheral system to realize the closed loop of the whole process. For cloud infrastructure level fault self-healing, discovery of fault resources, isolation of fault resources, recovery of resources, and recovery of resource matching related management and control function configuration are generally referred to.
With the rapid development of information technology and the gradual trend of bank business towards individuation and sensitization, the resource delivery requirement of a bottom infrastructure supporting the operation of the bank business is more individualized and agile, and simultaneously, with the improvement of the refinement and digitization capabilities of IT management of banking industry, the management and control requirement of the resource delivery is more elaborate and comprehensive, so that more management and control links are covered in the resource delivery process, and the management and control force is more detailed. On the background that demands are agile and more precise in management and control, higher requirements are put forward on infrastructure resource delivery capacity, on the one hand, infrastructure resources are released more quickly, on the other hand, more precise management functions are implemented in the resource delivery process, especially in a fault self-healing scene, when fault resources need to be isolated quickly, replacement resources are released quickly under the condition that a user does not sense the fault resources, the service operation demands are met, meanwhile, corresponding enterprise internal management function realization is completed, for traditional cloud service delivery, resource release and resource management and control functions are mostly connected in a resource delivery flow in series, and the resource delivery function design cannot give consideration to double demands of service agility and precise management and control under the background.
At present, most of cloud management platforms have the capabilities of resource allocation and self-service construction of management processes in enterprises at the same time, and can meet the requirement that the enterprises consider the realization of self-service of the management processes when applying cloud computing resources, namely, the resource allocation and other management functions are integrated into a whole set of user-oriented cloud computing resource delivery self-service through process arrangement. The design implementation is an ideal implementation mode for most application scenarios, and the configuration implementation of the enterprise management function is completed while the resource is delivered, but for the cloud infrastructure fault self-healing scenario, the resource cannot be recovered while the configuration of the resource matching related management and control functions is timely recovered, and particularly, under the condition that the management and control functions become refined day by day, that is, the management and control configuration function nodes are more and more, if the resources are delivered after the configuration implementation of all the management and control functions is completed according to the traditional resource delivery mode, the real-time requirement of the fault self-healing cannot be met.
Therefore, in a fault self-healing scene of the cloud management platform, how to quickly release resources and enable the cluster resource self-healing speed to meet requirements become a problem that workers need to solve urgently in order to ensure the normal operation of the cloud management platform.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like. The execution subject of the present invention may be a processor or a server of a computer.
Referring to fig. 1, a flowchart of a method for resource management according to an embodiment of the present invention is specifically described as follows:
s101: resource creation information is acquired.
And acquiring resource creating information sent by a resource manager or an operation and maintenance person, wherein the resource creating information comprises resource demand information for creating computing resources and information for creating management tasks.
S102: computing resources are created based on the resource creation information, and respective management tasks are generated.
Analyzing the resource creating information to acquire resource demand information and task creating information in the resource creating information; computing resources are created based on the resource demand information, and respective management tasks are generated based on the task creation information.
Preferably, after the computing resources are created, the computing resources may be added to a preset resource cluster, where the resource cluster is a collection of each created computing resource.
S103: and adding each management task into a preset task queue.
In the method provided by the embodiment of the invention, a task queue is preset, and the task queue can be a first-in first-out queue.
Adding all the generated management tasks into a preset task queue, preferably adding the management tasks according to the sequence time of the generated management tasks, adding the management tasks according to the urgency degree of execution of the management tasks, and adding the management tasks randomly; furthermore, the present invention has various ways to add each management task to the preset task queue, and is not limited to the above-mentioned example adding way.
S104: and adding each management task to each preset detection queue.
Preferably, the present invention sets a plurality of detection queues, each detection queue corresponding to a different task type, that is, each task type corresponds to one detection queue.
Referring to fig. 2, a flowchart of a method for adding each management task to each preset detection queue according to an embodiment of the present invention is specifically described as follows:
s201: the task type of each management task is determined.
Analyzing each management task, acquiring a task type identifier of each management task, and determining the task type of each management task based on the task type identifier; preferably, the task types in the embodiment of the present invention include, but are not limited to, a new creation type, a capacity expansion and reduction type, and a recovery type, where each task type corresponds to a detection queue; preferably, task1 is a task type identifier that the task type is a new task type, task2 is a task type identifier that the task type is an extended/reduced volume, and task3 is a task type identifier that the task type is a recycled task type.
S202: and for each management task, determining a detection queue corresponding to the task type of the management task in each detection queue as a target detection queue, and adding the management task to the target detection queue.
For example, when the task type of the management task is new, determining the monitoring corresponding to the new monitoring in each detection queue as a target detection queue, and adding the management task to the target detection queue.
Referring to fig. 3, an exemplary diagram of a queue of management tasks provided by the embodiment of the present invention is shown, where a storage task type in a detection queue 1 in the diagram is a newly created management task, a storage task type in a detection queue 2 is a management task of an extended capacity, and a storage task type in a detection queue 3 is a recovered management task; the task queue is used for storing all management tasks. Fig. 3 shows an exemplary diagram after the management task is read from the task queue, and the read task is processed, and then the task queue and each detection queue are updated; part a in fig. 3 may be an example part of the management tasks in the task queue and the respective detection queues before the management task is not read, and part B in fig. 3 may be an example part of the management tasks in the task queue and the respective detection queues after the management tasks are read and updated.
As can be seen from the content of part a in fig. 3, the task queue includes 9 tasks in total, where the task type identifiers of the management task1, the management task2, and the management task 4 in the task queue are all task1, and then the management task1, the management task2, and the management task 4 are all stored in the detection queue 1; if the task type identifiers of the management task3, the management task 6 and the management task 7 in the task queue are all task2, storing the management task3, the management task 6 and the management task 7 in the detection queue 2; if the task identifiers of the management task 5, the management task 8, and the management task 9 in the task queue are all task3, the management task 5, the management task 8, and the management task 9 are stored in the detection queue 3.
By using the task identifiers of the management tasks, the management tasks are classified and stored, and management of the management tasks is facilitated.
S105: judging whether a management task exists in the task queue, and if the management task exists in the detection queue, executing S106; if it is determined that the management task does not exist in the detection queue, S112 is performed.
When it is determined whether the management task exists in the task queue, it is substantially determined whether the task queue is empty, if the management task does not exist in the task queue, it indicates that the task queue is empty, and at this time, step S112 is performed, and if the management task exists in the task queue, it indicates that the task queue is not empty, and at this time, step S106 is performed.
S106: the first management task in the task queue is read.
When there is a management task in the task queue, the first management task in the task queue is read, and referring to part a in fig. 3, the first management task in the task queue is management task 1.
S107: and taking the read management task as a target management task.
The read management task is set as a target management task, and the description of S106 is continued, and the management task1 in fig. 3 is set as a target management task.
S108: and acquiring each to-be-processed management task corresponding to the target management task from each detection queue.
Referring to fig. 4, a flowchart of a method for acquiring each to-be-processed management task corresponding to a target management task in each detection queue according to an embodiment of the present invention is specifically described as follows:
s401: and analyzing the target management task to acquire deployment object information in the target management task.
Further, the deployment object information may be information of a virtual machine, referring to part a in fig. 3, in the figure, the unit1, the unit2, the unit8, and the unit10 are all deployment object information, and different deployment object information corresponds to different deployment objects.
S402: and determining each management task corresponding to the deployment object information in each detection queue as a to-be-processed management task.
And comparing the deployment object information of the target management task with the deployment object information of each management task in each detection queue, and determining each management task in each detection queue consistent with the deployment object information of the target management task as a management task to be processed. Further, after the management task in the detection queue, which is consistent with the deployment object information of the target management task, is determined as the management task to be processed, the management task is extracted from the detection queue and does not exist in the detection queue.
For example, continuing from the description of S106, when the target management task is management task1, and the deployment object information of management task1 is unit1, then management task1 in detection task1, management task3 in detection queue 2, and management task 5 in detection queue 3 are all pending management tasks.
S109: and merging the management tasks to be processed to obtain executable management tasks.
Referring to fig. 5, a flowchart of a method for merging management tasks to be processed to obtain an executable management task according to an embodiment of the present invention is specifically described as follows:
s501: and determining the task type of each management task to be processed.
In the method provided by the embodiment of the present invention, the task type of each to-be-processed management task needs to be determined, and the description about the task type may refer to the relevant description in fig. 2, which is not described herein again.
S502: and matching the task types of the management tasks to be processed in a preset task rule to determine the task execution type.
Preferably, the content of the preset task rule is described, specifically: task1+ task2 is update task1 (note: the task2 has configured the update task1 task); task1+ task3 is 0 (task cancel); task2+ task3 is 0 (task cancel); task1+ task2+ task3 is 0 (task cancel).
In the method provided by the embodiment of the invention, the task execution type comprises two types, one is task cancellation, and the other is configuration updating.
Exemplarily, when the target management task is the management task1, the management tasks to be processed, which are managed without irritation, are the management task1 in the inspection task1, the management task3 in the inspection queue 2, and the management task 5 in the inspection queue 3; the task type of the management task1 in the detection queue 1 is task1 type, the task type of the management task3 in the detection queue 2 is task2 type, the task type of the management task 5 in the detection queue 3 is task3 type, the task1+ task2+ task3 is 0 (task cancel), and the determined task execution type is task cancel type.
S503: and merging the management tasks to be processed to obtain executable management tasks corresponding to the task execution types.
Continuing the description in S502, the management task1, the management task3, and the management task 5 are merged to obtain an executable management task whose task execution type is a task cancel type.
In the method provided by the embodiment of the invention, the management tasks to be processed corresponding to the deployment object information of the target management task are merged, so that the final task execution type can be detected, and the corresponding resource management operation can be conveniently executed.
S110: and executing the executable management task, and realizing resource management operation corresponding to the executable management task for the computing resource.
Preferably, when the task execution type is a cancel type, the executable management task may be canceled when the executable management task is executed, or the computing resource corresponding to the executable management task may be canceled or destroyed, and step S111 may be immediately executed.
Furthermore, when the task execution type of the executable management task is an update type, resource management operations such as resource data management, management tool installation and deployment, monitoring and deployment and the like can be performed on the computing resources, so that delivery of the resources is realized, and the fault resources are recovered.
The executable management task is executed to perform resource management on the computing resource, the computing resource can be destroyed without waiting for the management process of the computing resource to be finished, and the like, so that the releasing speed of the computing resource is accelerated, and the recovery speed of the fault resource is accelerated.
S111: the update processing is performed on the task queue, and the process returns to the execution of S105.
Preferably, after the task queue is updated, each detection queue is also updated.
The specific process of updating the task queue comprises the following steps: determining each management task corresponding to the deployment object information in the task queue, deleting each determined management task from the task queue, and finishing updating the task queue; with reference to part a in fig. 3, continuing the description of S106, the target management task is management task1, the deployment object information of management task1 is unit1, the management tasks corresponding to unit1 in the task queue also include management tasks 3 and 5, and the management tasks 3 and 5 are deleted from the task queue, that is, the update of the task queue is completed, and with reference to part B in fig. 3, the updated task queue is the updated task queue; referring to part B of fig. 3, the detection queue 1, the detection queue 2, and the detection queue 3 are all updated detection queues, and at this time, no management task corresponding to the deployment object information of the target management task exists in the detection queues.
Preferably, after the update processing is performed on the task queue, the management tasks in the task queue are already refreshed, and referring to part B in fig. 3, since the first management task in the task queue is management task2 at this time, after the return execution S105, after the presence of a management task in the task queue is determined, and when the step S106 is executed, it is read that management task2 is present.
In the method provided by the embodiment of the invention, the purpose of updating the task queue is to delete each management task corresponding to the deployment object information of the target management task, so that the merged management tasks can be deleted, the situation of repeatedly executing the same operation is avoided, the speed of executing the management tasks in the task queue is increased, resources can be quickly released in a fault self-healing scene, the management efficiency of the resources is improved, and the fault recovery speed of the resource cluster meets the requirement.
S112: and (6) ending.
In the method provided by the embodiment of the invention, each management task generated according to the resource creation information is added into a task queue, and each management task is added into each detection queue; reading a first management task in a task queue; taking the read management tasks as target management tasks, and acquiring each to-be-processed management task corresponding to the target management tasks in each detection queue; merging the management tasks to be processed to obtain executable management tasks; executing the executable management task to realize the resource management operation corresponding to the executable management task; and updating the task queue, and returning to the step of reading the first management task in the task queue until no management task exists in the task queue. The management tasks are generated by using the resource creation information, the management tasks are used for managing resources in the scene of fault self-healing, after the management tasks to be processed corresponding to the target management tasks are combined to obtain executable management tasks, the resource management operation corresponding to the executable management tasks can be realized, no additional operation is needed in the whole process, the resources can be quickly released in the scene of fault self-healing, and the fault recovery speed of the resource cluster is improved.
According to the resource management method provided by the invention, a common enterprise management flow serial mode of resource creation and management function configuration implementation and the like in a cloud management platform is abandoned, and a mode of separating resource creation and resource management is adopted, so that resources are released rapidly in real time on a resource creation layer according to the self-healing requirement of the fault, and the fault recovery requirement of a cluster is met; according to enterprise management requirements, a resource management layer gradually completes configuration implementation of a series of enterprise IT management and control processes such as resource configuration information storage and management, user password storage and monitoring information storage and the like, and resource closed-loop management is guaranteed. Different resource queues to be managed are divided between a resource creation layer and a resource management layer according to resource creation types and subsequent resource management requirements, deployment objects (minimum deployment implementation units) and task types are used as detection unique values between the queues, and tasks are combined or cancelled according to preset processing logic by presetting the task processing logic when the deployment objects are the same but the task types are different in the detection unique values, so that closed loop and consistency of resource management after resource creation are guaranteed, the speed of resource release can be accelerated, and self-healing of a resource cluster can meet requirements.
Furthermore, the method provided by the invention is compared with the traditional cloud management platform resource management mode, most of the traditional cloud management platform resource management modes are resource creation, resource management and serial processing of the resource management to ensure the standardized configuration of the nano-tubes of all resources, but the method is not suitable for a fault self-healing scene, the fault self-healing scene has frequent destroying and creating actions, and the serial flow needs to complete the whole process of creating or destroying first and then can perform the next action to influence the quick self-healing of the cluster. Referring to fig. 6, which is a scene illustration of a resource management method provided in an embodiment of the present invention, a resource management manner proposed in the present invention divides resource creation and resource management into two sub-processes, where the two sub-processes are connected by a resource management task scheduling module, and the resource management task scheduling module is implemented by a task queue and multiple detection queues; the resource creation sub-process only comprises resource change operations, all the resource change operations generate management tasks, the resource management task scheduling module detects each management task, combines the tasks according to rules, and triggers the resource management sub-process, and the method specifically comprises the following steps: determining a target management task in a task queue, determining each to-be-processed management task corresponding to the target management task in each detection queue, merging each to-be-processed management task to obtain an executable management task, wherein the executable management task is a triggered resource management sub-process, further, the resource management sub-process also comprises resource management operations such as resource data storage, management tool installation and deployment, monitoring and deployment, resource destruction and the like, and further, the operation of destroying the resource directly destroys the resource, namely, the operation is completed. Therefore, in a fault self-healing scene, the release or destruction of the resources in the cluster does not need to wait for the completion of the resource management process, and all existing resources guarantee the closed loop of resource management through the scheduling of the task management module.
Preferably, the invention solidifies the task rule by using the task management mode of the task queue + the detection queue, performs task detection on each management task of the task queue, updates the task queue according to the detection result and executes the management task, thereby realizing resource management, improving the speed of releasing the resource and ensuring that the speed of recovering the resource fault meets the requirement.
Corresponding to fig. 1, the embodiment of the present invention provides a resource management apparatus for supporting the implementation of the method shown in fig. 1 in real life, and the apparatus may be configured in a computer terminal. Referring to fig. 7, a schematic structural diagram of the apparatus is specifically described as follows:
a first obtaining unit 701, configured to obtain resource creation information;
a generating unit 702 configured to create a computing resource based on the resource creation information, and generate each management task;
a first adding unit 703, configured to add each management task to a preset task queue;
a second adding unit 704, configured to add each management task to each preset detection queue;
a reading unit 705, configured to read a first management task in a task queue;
a determining unit 706 configured to take the read management task as a target management task;
a second obtaining unit 707, configured to obtain, in each detection queue, each to-be-processed management task corresponding to the target management task;
a merging processing unit 708, configured to merge the to-be-processed management tasks to obtain executable management tasks;
an execution unit 709, configured to execute the executable management task and implement a resource management operation corresponding to the executable management task on the computing resource;
the updating unit 710 is configured to update the task queue, and call the reading unit to execute a step of reading a first management task in the task queue when a management task exists in the updated task queue.
In the device provided by the embodiment of the invention, each management task generated according to the resource creation information is added into the task queue, and each management task is added into each detection queue; reading a first management task in a task queue; taking the read management tasks as target management tasks, and acquiring each to-be-processed management task corresponding to the target management tasks in each detection queue; merging the management tasks to be processed to obtain executable management tasks; executing the executable management task to realize the resource management operation corresponding to the executable management task; and updating the task queue, and returning to the step of reading the first management task in the task queue until no management task exists in the task queue. The management tasks are generated by using the resource creation information, the management tasks are used for managing resources in a fault self-healing scene, and after the executable management tasks obtained by combining the to-be-processed management tasks corresponding to the target management tasks are executed, the resource management operation corresponding to the executable management tasks can be realized, no additional operation is needed in the whole process, the resources can be quickly released in the fault self-healing scene, and the fault recovery speed of the resource cluster is improved.
In the apparatus provided in the embodiment of the present invention, the apparatus may be further configured to:
and the third adding unit is used for adding the created computing resources to the preset resource cluster.
In the apparatus provided in the embodiment of the present invention, the second adding unit 704 may be configured to:
a first determining subunit, configured to determine a task type of each of the management tasks;
and the adding subunit is configured to, for each management task, determine a detection queue corresponding to the task type of the management task in each detection queue as a target detection queue, and add the management task to the target detection queue.
In the apparatus provided in the embodiment of the present invention, the second obtaining unit 707 may be configured to:
the analysis subunit is used for analyzing the target management task to acquire deployment object information in the target management task;
and the second determining subunit is configured to determine each management task corresponding to the deployment object information in each detection queue as a to-be-processed management task.
In the apparatus provided in the embodiment of the present invention, the merging processing unit 708 may be configured to:
the third determining subunit is used for determining the task type of each to-be-processed management task;
the matching subunit is used for matching the task type of each to-be-processed management task in a preset task rule to determine a task execution type;
and the merging processing subunit is used for merging the to-be-processed management tasks to obtain executable management tasks corresponding to the task execution types.
In the apparatus provided in the embodiment of the present invention, the updating unit 710 may be configured to:
and the updating subunit is used for determining each management task corresponding to the deployment object information in the task queue, deleting each determined management task from the task queue, and completing the updating of the task queue.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the device where the storage medium is located is controlled to execute the resource management method.
An electronic device is further provided, and its structural diagram is shown in fig. 8, which specifically includes a memory 801 and one or more instructions 802, where the one or more instructions 802 are stored in the memory 801, and are configured to be executed by the one or more processors 803 to execute the one or more instructions 802 to perform the above-mentioned resource management method.
The specific implementation procedures and derivatives thereof of the above embodiments are within the scope of the present invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the 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.

Claims (10)

1. A method for resource management, comprising:
acquiring resource creating information;
creating computing resources based on the resource creating information and generating each management task;
adding each management task into a preset task queue;
adding each management task to each preset detection queue;
reading a first management task in a task queue;
taking the read management task as a target management task;
acquiring each to-be-processed management task corresponding to the target management task in each detection queue;
merging the management tasks to be processed to obtain executable management tasks;
executing the executable management task, and realizing resource management operation corresponding to the executable management task on the computing resource;
and updating the task queue, and returning to the step of executing and reading the first management task in the task queue until no management task exists in the task queue.
2. The method of claim 1, further comprising:
and adding the created computing resources into a preset resource cluster.
3. The method according to claim 1, wherein the adding each management task to each preset detection queue comprises:
determining a task type of each management task;
and for each management task, determining a detection queue corresponding to the task type of the management task in each detection queue as a target detection queue, and adding the management task to the target detection queue.
4. The method according to claim 1, wherein the obtaining of each pending management task corresponding to the target management task in each detection queue comprises:
analyzing the target management task to acquire deployment object information in the target management task;
and determining each management task corresponding to the deployment object information in each detection queue as a to-be-processed management task.
5. The method according to claim 1, wherein the merging the to-be-processed management tasks to obtain executable management tasks comprises:
determining the task type of each to-be-processed management task;
matching the task types of the to-be-processed management tasks in a preset task rule to determine the task execution type;
and merging the management tasks to be processed to obtain executable management tasks corresponding to the task execution types.
6. The method according to claim 4, wherein the updating the task queue comprises:
and determining each management task corresponding to the deployment object information in the task queue, deleting each determined management task from the task queue, and finishing updating the task queue.
7. A resource management apparatus, comprising:
a first acquisition unit configured to acquire resource creation information;
a generating unit configured to create a computing resource based on the resource creation information and generate each management task;
the first adding unit is used for adding each management task to a preset task queue;
the second adding unit is used for adding each management task to each preset detection queue;
the reading unit is used for reading a first management task in the task queue;
the determining unit is used for taking the read management task as a target management task;
a second obtaining unit, configured to obtain, in each detection queue, each to-be-processed management task corresponding to the target management task;
the merging processing unit is used for merging the management tasks to be processed to obtain executable management tasks;
the execution unit is used for executing the executable management task and realizing resource management operation corresponding to the executable management task on the computing resource;
and the updating unit is used for updating the task queue and calling the reading unit to execute the step of reading the first management task in the task queue when the management task exists in the updated task queue.
8. The apparatus of claim 7, further comprising:
and the third adding unit is used for adding the created computing resources to the preset resource cluster.
9. A storage medium, comprising stored instructions, wherein when executed, the storage medium controls a device to perform the resource management method according to any one of claims 1 to 6.
10. An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the method of resource management according to any one of claims 1-6.
CN202210341708.8A 2022-04-02 2022-04-02 Resource management method and device, storage medium and electronic equipment Pending CN114726869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210341708.8A CN114726869A (en) 2022-04-02 2022-04-02 Resource management method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210341708.8A CN114726869A (en) 2022-04-02 2022-04-02 Resource management method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114726869A true CN114726869A (en) 2022-07-08

Family

ID=82242902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210341708.8A Pending CN114726869A (en) 2022-04-02 2022-04-02 Resource management method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114726869A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406987A (en) * 2015-07-29 2017-02-15 阿里巴巴集团控股有限公司 Task execution method and apparatus in cluster
CN107015853A (en) * 2016-10-10 2017-08-04 阿里巴巴集团控股有限公司 The implementation method and device of phased mission system
CN107992359A (en) * 2017-11-27 2018-05-04 江苏海平面数据科技有限公司 The task scheduling algorithm that cost perceives under a kind of cloud environment
CN108762910A (en) * 2018-06-06 2018-11-06 亚信科技(中国)有限公司 A kind of distributed task dispatching method and system
US20180349246A1 (en) * 2017-05-30 2018-12-06 International Business Machines Corporation Parallel task management
CN110347504A (en) * 2019-06-28 2019-10-18 中国科学院空间应用工程与技术中心 Many-core computing resource dispatching method and device
US20200136992A1 (en) * 2018-10-25 2020-04-30 University Of Louisiana At Lafayette System for request aggregation in cloud computing services
CN113742036A (en) * 2020-05-28 2021-12-03 阿里巴巴集团控股有限公司 Index processing method and device and electronic equipment
CN114116158A (en) * 2021-10-28 2022-03-01 中国农业银行股份有限公司浙江省分行 Task scheduling method and system based on SD-WAN system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406987A (en) * 2015-07-29 2017-02-15 阿里巴巴集团控股有限公司 Task execution method and apparatus in cluster
CN107015853A (en) * 2016-10-10 2017-08-04 阿里巴巴集团控股有限公司 The implementation method and device of phased mission system
US20180349246A1 (en) * 2017-05-30 2018-12-06 International Business Machines Corporation Parallel task management
CN107992359A (en) * 2017-11-27 2018-05-04 江苏海平面数据科技有限公司 The task scheduling algorithm that cost perceives under a kind of cloud environment
CN108762910A (en) * 2018-06-06 2018-11-06 亚信科技(中国)有限公司 A kind of distributed task dispatching method and system
US20200136992A1 (en) * 2018-10-25 2020-04-30 University Of Louisiana At Lafayette System for request aggregation in cloud computing services
CN110347504A (en) * 2019-06-28 2019-10-18 中国科学院空间应用工程与技术中心 Many-core computing resource dispatching method and device
CN113742036A (en) * 2020-05-28 2021-12-03 阿里巴巴集团控股有限公司 Index processing method and device and electronic equipment
CN114116158A (en) * 2021-10-28 2022-03-01 中国农业银行股份有限公司浙江省分行 Task scheduling method and system based on SD-WAN system

Similar Documents

Publication Publication Date Title
EP3761170B1 (en) Virtual machine creation method and apparatus
US10372435B2 (en) System, method and program product for updating virtual machine images
US10069749B1 (en) Method and apparatus for disaggregated overlays via application services profiles
CA3000422C (en) Workflow service using state transfer
US10193977B2 (en) System, device and process for dynamic tenant structure adjustment in a distributed resource management system
EP2802998B1 (en) Assignment of resources in virtual machine pools
CN106371894B (en) Configuration method and device and data processing server
US8719415B1 (en) Use of temporarily available computing nodes for dynamic scaling of a cluster
US8752059B2 (en) Computer data processing capacity planning using dependency relationships from a configuration management database
US11010195B2 (en) K-tier architecture scheduling
WO2011156922A1 (en) Method and system for workload distributing and processing across a network of replicated virtual machines
US20140006602A1 (en) System, method and program product for local client device context-aware shared resource and service management
CN113886089B (en) Task processing method, device, system, equipment and medium
CN112231108A (en) Task processing method and device, computer readable storage medium and server
CN112130963A (en) Virtual machine task scheduling method and device, computer equipment and storage medium
US20100121904A1 (en) Resource reservations in a multiprocessor computing environment
CN109347716B (en) Instantiation method and device of consumer VNF
US10733554B2 (en) Information processing apparatus and method for managing connections
CN113297031A (en) Container group protection method and device in container cluster
CN102135899B (en) Transaction control method and device
CN109347661B (en) Instantiation method and device of consumer VNF
CN113051279B (en) Storage method, storage device, electronic equipment and storage medium for data message
CN111143029B (en) Method for realizing consistent and automatic telescopic continuous construction environment of virtual machine based on Gitleab-CI callback integration
US20100122261A1 (en) Application level placement scheduler in a multiprocessor computing environment
CN114726869A (en) Resource management method and device, storage medium and electronic 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