Task processing method and device

By receiving cloud resource task requests and determining the calling interface and task necessary data, flexible scheduling and task automation processing of multiple cloud platforms are achieved, and the problems of operational differences and data transmission pressure between cloud platforms in the existing technology are solved, and task processing efficiency and reliability are improved.

CN113535358BActive Publication Date: 2025-03-25INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110817583.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-20
Publication Date
2025-03-25
Estimated Expiration
2041-07-20

AI Technical Summary

Technical Problem

In the prior art, the operating procedures, execution efficiency and configuration management database docking methods between cloud platforms are different, and it is difficult to achieve unified management of multiple cloud platforms. In addition, data transmission pressure is high and manual processing efficiency is poor during task processing.

Method used

Provide a task processing method and device, by receiving cloud resource task requests, determining the calling interface and task necessary data, and calling a third-party cloud platform to execute tasks in turn, realizing flexible scheduling and task automation processing for multiple cloud platforms.

Benefits of technology

It improves task processing efficiency, reduces data transmission pressure, realizes flexible scheduling of multiple cloud platforms, improves task processing reliability, and saves labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113535358B_ABST
    Figure CN113535358B_ABST
Patent Text Reader

Abstract

The present application provides a task processing method and device, which relates to the field of cloud computing technology. The method includes: receiving a cloud resource task request corresponding to a cloud resource task; determining a calling interface of the cloud resource task according to the task information in the cloud resource task request; determining necessary task data of the cloud resource task according to the calling interface and the task information, so that a third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and the task information. The present application can improve the task processing efficiency and reduce the pressure of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a task processing method and device. Background Art

[0002] Cloud platform refers to services based on hardware resources and software resources, providing computing, network and storage capabilities. In the field of financial cloud technology, financial enterprises have many third-party software, slow software updates and iterations, and many personalized needs. In the task processing process, the demander submits cloud resource requirements through the work order system, and executes tasks according to cloud resource requirements. A large number of cloud resource requirements are described in text form, and then the executor parses and allocates the requirements. Cloud resource requirements may require the cooperation of different cloud platforms, such as VMware, Openstack and other private cloud platforms.

[0003] However, since different cloud platforms have their own application and maintenance interfaces, operation procedures, execution efficiency and the way of connecting with the Configuration Management Database (CMDB) are different, it is difficult to manage other cloud platforms on a single cloud platform. At the same time, there is a lot of pressure on data transmission during task processing; manual task allocation and poor processing efficiency are the problems. Summary of the invention

[0004] In response to at least one problem in the prior art, the present application proposes a task processing method and device, which can improve task processing efficiency and reduce data transmission pressure.

[0005] In order to solve the above technical problems, this application provides the following technical solutions:

[0006] In a first aspect, the present application provides a task processing method, comprising:

[0007] receiving a cloud resource task request corresponding to the cloud resource task;

[0008] Determining a calling interface for the cloud resource task according to the task information in the cloud resource task request;

[0009] According to the calling interface and the task information, the necessary task data of the cloud resource task is determined, so that the third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and the task information.

[0010] Furthermore, the task processing method further includes:

[0011] If the cloud resource task request corresponds to multiple cloud resource tasks and there is a dependency relationship between the cloud resource tasks, determining the execution order between the cloud resource tasks according to the dependency relationship;

[0012] Determine a calling interface for each cloud resource task according to task information corresponding to each cloud resource task in the cloud resource task request;

[0013] Determine the necessary task data of each cloud resource task based on the calling interface and task information of the cloud resource task;

[0014] According to the execution order between cloud resource tasks, the necessary task data and task information of each cloud resource task, the third-party cloud platform corresponding to each calling interface is called in turn to execute the corresponding cloud resource task.

[0015] Further, determining the calling interface of the cloud resource task according to the task information in the cloud resource task request includes:

[0016] Determine, according to the task information, a third-party cloud platform corresponding to the cloud resource task;

[0017] According to the third-party cloud platform, a calling interface of the cloud resource task is determined.

[0018] Further, determining the calling interface of the cloud resource task according to the task information in the cloud resource task request includes:

[0019] The cloud resource task is approved according to the task information in the cloud resource task request. If approved, a calling interface of the cloud resource task is determined according to the task information.

[0020] Further, after executing the cloud resource task, the method further includes:

[0021] Receive the execution result returned by the third-party cloud platform, and store the corresponding relationship between the cloud resource task and the third-party cloud platform and the execution result in the target database.

[0022] Further, determining the calling interface of the cloud resource task according to the task information in the cloud resource task request includes:

[0023] Determining whether the cloud resource task is an approval-free task according to the type of the cloud resource task;

[0024] If the cloud resource task is an approval-free task, a calling interface of the cloud resource task is determined according to the task information in the cloud resource task request.

[0025] Further, the method of sequentially calling the third-party cloud platform corresponding to each calling interface to execute the corresponding cloud resource task according to the execution order between the cloud resource tasks, the necessary task data and task information of each cloud resource task, includes:

[0026] The cloud resource task ranked first in the execution order is used as the target cloud resource task, and a calling step is performed, the calling step comprising: calling a third-party cloud platform corresponding to the target cloud resource task to execute the target cloud resource task according to the necessary task data and task information of the target cloud resource task;

[0027] The next cloud resource task is used as the target cloud resource task, and the calling step is performed again until all cloud resource tasks are traversed.

[0028] Furthermore, the task processing method further includes:

[0029] If the cloud resource task request corresponds to multiple cloud resource tasks and there are independent ones among the multiple cloud resource tasks, the multiple cloud resource tasks are divided into multiple cloud resource task groups, each cloud resource task group is independent of each other, and the cloud resource tasks in each cloud resource task group have a dependency relationship;

[0030] Determine the execution order of each cloud resource task in each cloud resource task group according to the dependency relationship corresponding to each cloud resource task group;

[0031] Determine the necessary task data of each cloud resource task based on the calling interface and task information of the cloud resource task;

[0032] According to the execution order between each cloud resource task in each cloud resource task group, the necessary task data and task information of each cloud resource task, the third-party cloud platforms corresponding to each cloud resource task in the cloud resource task group are called to execute the corresponding cloud resource tasks in sequence.

[0033] Further, the method of calling the third-party cloud platforms corresponding to the respective cloud resource tasks in each cloud resource task group to sequentially execute the corresponding cloud resource tasks according to the execution order between the respective cloud resource tasks in each cloud resource task group, the necessary task data and task information of each cloud resource task, further includes:

[0034] If the task execution result of any cloud resource task in the cloud resource task group is failure, the current operation of the cloud resource task group is terminated.

[0035] In a second aspect, the present application provides a task processing device, comprising:

[0036] A receiving module, used for receiving a cloud resource task request corresponding to a cloud resource task;

[0037] A first interface determination module, configured to determine a calling interface of the cloud resource task according to the task information in the cloud resource task request;

[0038] The processing module is used to determine the necessary task data of the cloud resource task according to the calling interface and the task information, so that the third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and the task information.

[0039] Furthermore, the task processing device further includes:

[0040] A sorting module, configured to determine the execution order of the cloud resource tasks according to the dependency relationship if the cloud resource task request corresponds to multiple cloud resource tasks and there is a dependency relationship between the cloud resource tasks;

[0041] A second interface determination module, used to determine a calling interface for each cloud resource task according to the task information in the cloud resource task request;

[0042] A necessary parameter determination module is used to determine the necessary task data of each cloud resource task according to the calling interface and task information of the cloud resource task;

[0043] The calling module is used to call the third-party cloud platform corresponding to each calling interface in turn to execute the corresponding cloud resource task according to the execution order between cloud resource tasks, the necessary task data and task information of each cloud resource task.

[0044] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the task processing method when executing the program.

[0045] In a fourth aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, which implement the task processing method when the instructions are executed.

[0046] It can be seen from the above technical solution that the present application provides a task processing method and device. Among them, the method includes: receiving a cloud resource task request corresponding to a cloud resource task; determining the calling interface of the cloud resource task according to the task information in the cloud resource task request; determining the necessary task data of the cloud resource task according to the calling interface and the task information, so that the third-party cloud platform corresponding to the calling interface can execute the cloud resource task according to the necessary task data and the task information, which can improve the task processing efficiency and reduce the data transmission pressure; specifically, it can realize the flexible scheduling of multiple platforms, alleviate the data transmission pressure, improve the reliability of task processing, and save labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 It is a flowchart of a task processing method in an embodiment of the present application;

[0049] Figure 2 This is a schematic diagram of the interface of a cloud resource task directory in an example of this application;

[0050] Figure 3 This is a schematic diagram of an input box corresponding to task information in an example of this application;

[0051] Figure 4 is a flowchart of a task processing method in another embodiment of the present application;

[0052] Figure 5 is a schematic diagram of the structure of a task processing device in an embodiment of the present application;

[0053] Figure 6 A schematic block diagram of the system structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] In the prior art, cloud resource requirements may require the cooperation of different cloud platforms to complete, and it is difficult to uniformly manage multiple cloud platforms. At the same time, the data required for the cloud platform to perform tasks is usually input by the front end, and the data transmission pressure is relatively large, which affects the transmission efficiency. Based on this, the present application provides a task processing method and device to uniformly manage cloud resource application, approval, allocation and execution, reduce the user's processing cost and learning cost, simplify the processing process, and improve the efficiency of cloud resource task processing. At the same time, it can solve the problems in the prior art, such as unclear task description, no standardization of cloud resource task requests, manual operation required for task allocation, and poor processing efficiency.

[0056] It should be noted that the task processing method and device disclosed in the present application can be used in the field of financial technology, and can also be used in any field other than the field of financial technology. The application field of the task processing method and device disclosed in the present application is not limited.

[0057] The details are described through the following embodiments.

[0058] In order to improve task processing efficiency and reduce data transmission pressure, this embodiment provides a task processing method in which the execution subject is a task processing device, and the task processing device is not limited to a server, such as Figure 1 As shown, the method specifically includes the following contents:

[0059] Step 100: Receive a cloud resource task request corresponding to a cloud resource task.

[0060] Specifically, a cloud resource task request sent by the front end may be received; the cloud resource task request may correspond to one or more cloud resource tasks; the cloud resource tasks corresponding to the cloud resource task request may be combined into a total task. Cloud resource tasks may include: resource tasks, system tasks, and software tasks; Figure 2 As shown, resource tasks, system tasks and software tasks may be displayed in the form of a task catalog on the front end, and the user may click an icon to determine the type of cloud resource task corresponding to the cloud resource task request. Resource tasks include: server application, server cloning, server expansion, real application clusters (RAC) application and MySQL container application; system tasks include: CPU memory adjustment, file system addition, file system expansion, ASM expansion, IP address switching and clock synchronization; software tasks include: Oracle server installation, WAS and IHS installation, SQL Server installation, Oracle instance installation, Message Queue (MQ) installation, Customer Information Control System (CICS) installation, Oracle client installation, MySQL server installation, MySQL client installation, WAS and IHS upgrade, DBLE installation, JDK installation, Hadoop client installation and Oriental Connection installation. Among them, Oracle server installation means installing Oracle database on the server of the third-party cloud platform, Oracle client installation means installing Oracle database on the client of the third-party cloud platform, MySQL server installation means installing MySQL database on the server of the third-party cloud platform, and MySQL client installation means installing MySQL database on the client of the third-party cloud platform.

[0061] For example, if the cloud resource task request is a server application request, the server application request includes task information such as the operating system version, number of CPU cores, running memory and IP address corresponding to the requested server; in order to improve the standardization and standardization of task information, see Figure 3 The task information may include data selected by the user from the drop-down box on the front end, such as server type and operating system version, so as to eliminate the interference of irregular task information on task processing; the task information may also include data input from the input box on the front end, such as CPU (core) and memory (G), and the data type of the input data may be limited, such as limiting the data type to integer.

[0062] Step 200: Determine a calling interface for the cloud resource task according to the task information in the cloud resource task request.

[0063] Specifically, the correspondence between task information and the calling interface can be pre-stored locally in the task processing device; the calling interface of the cloud resource task is determined according to the task information in the cloud resource task request and the correspondence between the task information and the calling interface; the calling interface can refer to a software class interface, which can be a reference type that defines a protocol; the third-party cloud platform can be a VMware virtual machine platform and an Openstack platform, etc.; each third-party cloud platform can be set in a different server. The calling interface can be an interface of the cloud platform.

[0064] Step 300: Determine the necessary task data of the cloud resource task according to the calling interface and the task information, so that the third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and the task information.

[0065] For example, if the cloud resource task is a server application task, the network segment and network area information can be determined according to the IP address in the cloud resource task request; according to the network segment and network area information, determine whether the server application task is a VMware application task or an Openstack application task; if the server application task is a VMware application task, the third-party cloud platform is the VMware platform, and the calling interface is the interface of the VMware platform, and the interface format is {cpu, mem, osName, hostName, ipAddr, networkName}, and the task information includes: CPU, memory, operating system version and IP address, and the task necessary data contains: data corresponding to the osName, hostName and networkName parameters; input CPU, memory, operating system version and IP address; according to the CPU, memory and IP address, the data corresponding to the cpu, mem and ipAddr parameters can be directly obtained; according to the mapping relationship between the operating system version and the osName parameter stored in the CMDB and the input operating system version, the data corresponding to the osName parameter is obtained, and according to the mapping relationship between the operating system version and the networkName parameter and the input operating system version, the ne tworkName parameter corresponding to the data; through the naming rule, get the hostName parameter corresponding to the data; according to the task information and the necessary task data, call the VMware platform to execute the VMware virtual machine application task; in another server application task, the third-party cloud platform can be cloud platform A, the interface format of cloud platform A is {flavorName, imageName, hostName, ipAddr, vpcID}, input CPU, memory, operating system version and IP address; according to the IP address, the ipAddr parameter corresponding to the data can be directly generated; according to the mapping relationship between the CPU, memory and flavorName parameters and the input CPU and memory, the flavorName parameter corresponding to the data can be determined; according to the mapping relationship between the operating system version and the imageName parameter and the input operating system version, the imageName parameter corresponding to the data is obtained; according to the mapping relationship between the operating system version and the vpcID parameter and the input operating system version, the vpcID parameter corresponding to the data is obtained; through the naming rule, get the hostName parameter corresponding to the data; according to the task information and the necessary task data, call cloud platform A to execute the server application task; each mapping relationship can be set according to the actual situation.

[0066] As can be seen from the above description, the task processing method provided in this embodiment receives a cloud resource task request corresponding to a cloud resource task; determines the calling interface of the cloud resource task according to the task information in the cloud resource task request; determines the necessary task data of the cloud resource task according to the calling interface and the task information, so that the third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and the task information, which can improve the task processing efficiency and reduce the data transmission pressure; specifically, it can realize flexible scheduling of the third-party cloud platform, and at the same time, only needs the front-end to transmit part of the data required to execute the cloud resource task, and generates another part of the data required for the cloud resource task according to the part of the data transmitted by the front-end and the calling interface, that is, the task information and the necessary task data constitute the total task data of the cloud resource task, which can alleviate the pressure of front-end data transmission and reduce the probability of front-end data input errors, thereby improving the efficiency of data transmission and the reliability of data.

[0067] In order to realize the flexible calling of multiple third-party cloud platforms, improve the flexibility of cross-platform task allocation, and improve the automation of task processing, in one embodiment of the present application, see Figure 4 , the task processing method further includes:

[0068] Step 400: If the cloud resource task request corresponds to multiple cloud resource tasks and there is a dependency relationship between the cloud resource tasks, then determine the execution order between the cloud resource tasks according to the dependency relationship.

[0069] Specifically, the dependencies between cloud resource tasks can be stored in advance. For example, server application is configured before all software tasks, all software installation tasks are configured after file system addition, and Oracle instance installation is configured after Oracle server installation. In one example, the cloud resource task request corresponds to multiple cloud resource tasks, namely server application, file system addition, Orcale server installation, and Orcale instance installation.

[0070] Step 500: Determine a calling interface for each cloud resource task according to the task information in the cloud resource task request.

[0071] Specifically, the calling interface of the cloud resource task may be determined according to the task information of each cloud resource task corresponding to the cloud resource task request; and different cloud resource tasks may correspond to different calling interfaces.

[0072] Step 600: Determine the necessary task data of each cloud resource task according to the calling interface and task information of the cloud resource task.

[0073] For example, the necessary task data of cloud resource task X may be determined based on the calling interface and task information of cloud resource task X.

[0074] Step 700: According to the execution order between cloud resource tasks, the necessary task data and task information of each cloud resource task, the third-party cloud platform corresponding to each calling interface is called in turn to execute the corresponding cloud resource task.

[0075] In order to further improve the efficiency of task processing, if there is a cloud resource task that fails to execute, the current cloud resource task can be skipped and the next cloud resource task can be executed until the last cloud resource task is completed. The ratio of the number of successfully executed cloud resource tasks to the total number of cloud resource tasks is calculated and returned to the front end.

[0076] In order to further improve the automation of task processing and reduce data transmission pressure, in one embodiment of the present application, step 200 includes:

[0077] Step 201: Determine the third-party cloud platform corresponding to the cloud resource task according to the task information.

[0078] Specifically, the cloud resource task type may be determined according to the task information, and the third-party cloud platform may be determined according to the pre-stored correspondence between the cloud resource task type and the cloud platform.

[0079] Step 202: Determine the calling interface of the cloud resource task according to the third-party cloud platform.

[0080] In order to further improve the reliability of task processing, in one embodiment of the present application, step 200 includes:

[0081] Step 210: Approving the cloud resource task according to the task information in the cloud resource task request. If approved, determining a calling interface for the cloud resource task according to the task information.

[0082] Specifically, the task information and necessary task data corresponding to the cloud resource task request may be output to the terminal device of the approver for cloud resource task approval.

[0083] In order to facilitate the subsequent viewing of execution results and maintenance of cloud resource tasks, in one embodiment of the present application, after step 300, the following steps are further included:

[0084] Receive the execution result returned by the third-party cloud platform, and store the corresponding relationship between the cloud resource task and the third-party cloud platform and the execution result in the target database.

[0085] Specifically, the target database may refer to a local database of the task processing device or a database in a separate server.

[0086] In order to further improve the flexibility and efficiency of approval, in one embodiment of the present application, step 210 includes:

[0087] Step 211: Determine whether the cloud resource task is an approval-free task based on the type of the cloud resource task.

[0088] Specifically, the correspondence between the type of cloud resource task and the approval method can be pre-stored locally in the task processing device, and the approval method includes: automatic approval method or approval-free method.

[0089] Furthermore, if the current system time does not fall within the preset working time range or the approval scenario is an off-duty state, the cloud resource task request will be output to the approver's terminal device; software installation tasks that do not harm user data (such as Oracle server installation, WAS and IHS installation, SQL Server installation, Oracle instance installation and MQ installation, etc.) or capacity expansion tasks within the resource quota (such as file system expansion tasks) can be used as approval-free tasks.

[0090] Step 212: If the cloud resource task is an approval-free task, a calling interface of the cloud resource task is determined according to the task information in the cloud resource task request.

[0091] Furthermore, the cloud resource task status can be monitored in real time. The task status can include: pending approval, approval rejected, approval passed, task actively cancelled, pending execution, skipped due to execution failure, aborted due to execution failure, and successful execution.

[0092] In order to further improve the reliability of cloud resource task execution, in one embodiment of the present application, step 700 includes:

[0093] Step 701: The cloud resource task that ranks first in the execution order is taken as the target cloud resource task, and a calling step is executed. The calling step includes: based on the necessary task data and task information of the target cloud resource task, calling the third-party cloud platform corresponding to the target cloud resource task to execute the target cloud resource task.

[0094] Specifically, the execution result of the target cloud resource task returned by the third-party cloud platform may be received, and the corresponding relationship between the target cloud resource task and the third-party cloud platform and the execution result may be stored in the target database.

[0095] Step 702: Take the next cloud resource task as the target cloud resource task and execute the calling step again until all cloud resource tasks are traversed.

[0096] In order to improve the efficiency of cloud resource task execution while ensuring the reliability of cloud resource task execution, in one embodiment of the present application, after step 100, the following is further included:

[0097] Step 010: If the cloud resource task request corresponds to multiple cloud resource tasks and there are independent cloud resource tasks among the multiple cloud resource tasks, the multiple cloud resource tasks are divided into multiple cloud resource task groups, each cloud resource task group is independent of each other, and there is a dependency relationship between the cloud resource tasks in each cloud resource task group.

[0098] Specifically, the existence of mutual independence among the multiple cloud resource tasks can indicate that there are cloud resource tasks with no dependencies among the cloud resource tasks corresponding to the cloud resource task requests, and the mutual independence between the groups of cloud resource task groups can indicate that there is no dependency between the cloud resource tasks in any group of cloud resource task groups and the cloud resource tasks in another group of cloud resource task groups; cloud resource tasks without dependencies can be executed in parallel.

[0099] Step 020: Determine the execution order of each cloud resource task in each cloud resource task group according to the dependency relationship corresponding to each cloud resource task group.

[0100] Step 030: Determine the necessary task data of each cloud resource task based on the calling interface and task information of the cloud resource task.

[0101] Step 040: Based on the execution order between each cloud resource task in each cloud resource task group, the necessary task data and task information of each cloud resource task, call the third-party cloud platforms corresponding to each cloud resource task in the cloud resource task group to execute the corresponding cloud resource tasks in sequence.

[0102] In order to further improve the efficiency of cloud resource task processing, in one embodiment of the present application, step 040 also includes:

[0103] If the task execution result of any cloud resource task in the cloud resource task group is failure, the current operation of the cloud resource task group is terminated.

[0104] If the execution of one group of cloud resource task groups is terminated, the execution of cloud resource tasks corresponding to other groups of cloud resource task groups may not be affected, and the efficiency of cloud resource task processing can be further improved.

[0105] In order to further illustrate the present solution, the present application provides an application example of a task processing method, which specifically includes:

[0106] Step 001: Apply for cloud resource tasks.

[0107] Specifically, a cloud resource task catalog is generated and published; different cloud resource tasks can correspond to different cloud platforms. The format of task information for different cloud resource tasks can be standardized and simplified, and task information can be input using a drop-down box selection method to eliminate the impact of non-standard data on task processing; the necessary task data can be determined based on task information, preset mapping relationships, and naming rules, etc., to reduce the amount of data input by users; for example: for server application, user requirements include: 2-core CPU and 4GB memory, for VMware platform, two parameters {CPU:2,MEM:4} need to be transmitted, for cloud platform A, one parameter {flavor:vm_2C4G} needs to be transmitted, and for cloud platform B, one parameter {flavorRef:small_2C4G} needs to be transmitted. Parameters, you can enter 2 core CPU and 4GB memory in the front end, without considering the format requirements of the back end for parameters; you can also determine the template name or image name of the third-party cloud platform by entering the operating system version; for example, if the operating system version entered by the user is SuseLinux12SP5, then according to the mapping relationship between the pre-stored operating system version, cloud platform and image name (template name), the template name corresponding to the VMware platform is determined to be SLE-12-x86_64-SP5, the image name of cloud platform A is KVM_SUSE12SP5_EN, and the image name of cloud platform B is VM_SUSE12SP5. The demander can check multiple cloud resource tasks according to actual needs and freely combine them to form a total task.

[0108] Step 002: Task approval and task assignment.

[0109] Task approval can be done manually, with the approver reviewing the requirements and then approving them. For scenarios where it is not convenient to review during non-working hours or on-the-job, a self-service approval function is provided. The demander can use the self-service approval function to send the application elements (i.e. the above task information and necessary parameters) to the approver via email or SMS. The approver can see the application elements on a personal computer and mobile terminal. After the review is passed, the unique verification code will be notified to the approver via an instant messaging tool. For software installation tasks that do not harm user data and capacity expansion tasks within resource quotas, approval can also be waived.

[0110] Step 003: Execute the task.

[0111] Specifically, the automation engine performs the process of calling, returning, calling back and registering the flow without human intervention. The process of automatically executing tasks is as follows:

[0112] 1. The automation engine determines the execution order of each cloud resource task corresponding to the cloud resource task application based on the preset professional division of labor table.

[0113] 2. The automation engine determines whether the current cloud resource task supports automation. If not, it switches to the manual process. If it supports automation, it switches to the automatic process.

[0114] 3. The current cloud resource task that can be automatically executed, according to the task information of the current cloud resource task, determines the calling interface of the cloud resource task, and the automatic engine generates the necessary task data according to the calling interface and task information, and calls the third-party cloud platform according to the interface format agreed upon by the interface, such as applying for a virtual machine, the interface format of the VMware platform is {cpu, mem, osName, hostName, ipAddr, networkName}, and the interface format of cloud platform A is {flavorName, imageName, hostName, ipAddr, vpcID}. After receiving the call request, the third-party cloud platform generates a unique identifier corresponding to the current cloud resource task as the third-party task number, and returns the call success result and the third-party task number, or returns the call failure result and error information. The automation engine records the total task identifier in the cloud resource task request and the task identifier of the current cloud resource task as the target task identifier in the database; if the call is successful, the task result and the mapping relationship between the target task identifier and the third-party task number are recorded in the database; the task result is one of the call success result, call failure result, execution success result and execution failure result.

[0115] 4. The third-party cloud platform executes its corresponding cloud resource tasks and returns the task execution results.

[0116] If the execution result of the cloud resource task is a failure, the automation engine is called to enter the troubleshooting process, and the automation engine updates the task result corresponding to the cloud resource task in the database to the execution failure result; if the execution result of the cloud resource task is a success, the task result corresponding to the cloud resource task in the database is updated to the execution success result, and the automation engine is called to perform the execution process of the next cloud resource task. The task result and the mapping relationship between the total task identifier and the third-party task number can also be output and displayed.

[0117] From the software level, in order to improve the task processing efficiency and reduce the data transmission pressure, the present application provides an embodiment of a task processing device for implementing all or part of the content of the task processing method, see Figure 5 , the task processing device specifically includes the following contents:

[0118] A receiving module 10 is used to receive a cloud resource task request corresponding to a cloud resource task;

[0119] A first interface determination module 20, configured to determine a calling interface of the cloud resource task according to the task information in the cloud resource task request;

[0120] The processing module 30 is used to determine the necessary task data of the cloud resource task according to the calling interface and the task information, so that the third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and the task information.

[0121] In one embodiment of the present application, the task processing device further includes:

[0122] A sorting module, configured to determine the execution order of the cloud resource tasks according to the dependency relationship if the cloud resource task request corresponds to multiple cloud resource tasks and there is a dependency relationship between the cloud resource tasks;

[0123] A second interface determination module, used to determine a calling interface for each cloud resource task according to the task information in the cloud resource task request;

[0124] A necessary parameter determination module is used to determine the necessary task data of each cloud resource task according to the calling interface and task information of the cloud resource task;

[0125] The calling module is used to call the third-party cloud platform corresponding to each calling interface in turn to execute the corresponding cloud resource task according to the execution order between cloud resource tasks, the necessary task data and task information of each cloud resource task.

[0126] In one embodiment of the present application, the first interface determination module is used to perform the following:

[0127] Determine, according to the task information, a third-party cloud platform corresponding to the cloud resource task;

[0128] According to the third-party cloud platform, a calling interface of the cloud resource task is determined.

[0129] In one embodiment of the present application, the first interface determination module includes:

[0130] The approval unit is used to approve the cloud resource task according to the task information in the cloud resource task request, and if approved, determine the calling interface of the cloud resource task according to the task information.

[0131] In one embodiment of the present application, the task processing method further includes:

[0132] The storage module is used to receive the execution results returned by the third-party cloud platform and store the corresponding relationship between the cloud resource tasks and the third-party cloud platform and the execution results in the target database.

[0133] In one embodiment of the present application, the first interface determination module includes:

[0134] A judgment unit, used to determine whether the cloud resource task is an approval-free task according to the type of the cloud resource task;

[0135] The determining unit is used to determine the calling interface of the cloud resource task according to the task information in the cloud resource task request if the cloud resource task is an approval-free task.

[0136] In one embodiment of the present application, the calling module includes:

[0137] The execution unit is used to take the cloud resource task ranked first in the execution order as the target cloud resource task, and execute the calling step, which includes: calling the third-party cloud platform corresponding to the target cloud resource task to execute the target cloud resource task according to the necessary task data and task information of the target cloud resource task;

[0138] The traversal unit is used to take the next cloud resource task as the target cloud resource task and execute the calling step again until all cloud resource tasks are traversed.

[0139] In one embodiment of the present application, the task processing device further includes:

[0140] A division module, for dividing the multiple cloud resource tasks into multiple cloud resource task groups if the cloud resource task request corresponds to multiple cloud resource tasks and the multiple cloud resource tasks are independent of each other, each cloud resource task group is independent of each other, and the cloud resource tasks in each cloud resource task group have a dependency relationship;

[0141] A sorting module is used to determine the execution order of each cloud resource task in each cloud resource task group according to the dependency relationship corresponding to each cloud resource task group;

[0142] A determination module, used to determine the necessary task data of each cloud resource task according to the calling interface and task information of the cloud resource task;

[0143] The sequential calling module is used to call the third-party cloud platforms corresponding to each cloud resource task in each cloud resource task group to execute the corresponding cloud resource tasks in sequence according to the execution order between each cloud resource task in each cloud resource task group, the necessary task data and task information of each cloud resource task.

[0144] In one embodiment of the present application, the sequential calling module further includes:

[0145] The terminating unit is used to terminate the current operation of the cloud resource task group if the task execution result of any cloud resource task in the cloud resource task group is failure.

[0146] The embodiment of the task processing device provided in this specification can be specifically used to execute the processing flow of the embodiment of the above-mentioned task processing method. Its functions will not be described in detail here, and reference can be made to the detailed description of the embodiment of the above-mentioned task processing method.

[0147] It can be seen from the above description that the task processing method and device provided by this application can improve the efficiency of task processing and reduce the pressure of data transmission; specifically, it can realize flexible scheduling of multiple platforms, alleviate the pressure of data transmission, improve the reliability of task processing, and save labor costs. By publishing a service catalog, the service content and parameters are standardized and simplified, and users combine services into tasks. One task can meet the needs of resource application, software installation, configuration, etc. Task approval and dispatching provide a variety of methods to realize online fast, self-service approval and dispatching functions, and automatically transfer. Task execution supports service combination and service parallelism to improve concurrent execution efficiency. Support the docking of various technical platforms and self-developed tool platforms to realize automated implementation, reduce the amount of manual implementation, and improve the level of automation.

[0148] Figure 6 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 communicate with each other through the communication bus 404. The processor 401 may call the logic instructions in the memory 403 to execute the following method: receiving a cloud resource task request corresponding to a cloud resource task; determining a calling interface of the cloud resource task according to the task information in the cloud resource task request; determining the necessary task data of the cloud resource task according to the calling interface and the task information, so that the third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and the task information.

[0149] In addition, the logic instructions in the above-mentioned memory 403 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0150] The present embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: receiving a cloud resource task request corresponding to a cloud resource task; determining a calling interface of the cloud resource task based on task information in the cloud resource task request; determining necessary task data of the cloud resource task based on the calling interface and task information, so that a third-party cloud platform corresponding to the calling interface executes the cloud resource task based on the necessary task data and task information.

[0151] The present embodiment provides a computer-readable storage medium, which stores a computer program. The computer program enables the computer to execute the methods provided by the above-mentioned method embodiments, for example, including: receiving a cloud resource task request corresponding to a cloud resource task; determining a calling interface of the cloud resource task based on the task information in the cloud resource task request; determining necessary task data of the cloud resource task based on the calling interface and the task information, so that a third-party cloud platform corresponding to the calling interface executes the cloud resource task based on the necessary task data and the task information.

[0152] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0153] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0154] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0156] In the description of this specification, the description with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0157] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A task processing method, characterized in that: include: Receive a cloud resource task request corresponding to a cloud resource task sent by a front end, wherein the front end displays a task catalog, which includes resource tasks, system tasks, and software tasks. The resource tasks include server application and server cloning; the system tasks include CPU memory adjustment, file system addition, and file system expansion; the software tasks include Oracle server installation, SQL Server installation, and Oracle instance installation; Determine the calling interface of the cloud resource task according to the task information in the cloud resource task request, wherein the task information includes: CPU, memory, operating system version and IP address; According to the calling interface and task information, the necessary task data of the cloud resource task is determined so that the third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and task information. The necessary task data includes: data corresponding to the osName, hostName and networkName parameters.

2. The task processing method according to claim 1, characterized in that: Also includes: If the cloud resource task request corresponds to multiple cloud resource tasks and there is a dependency relationship between the cloud resource tasks, determining the execution order between the cloud resource tasks according to the dependency relationship; Determine a calling interface for each cloud resource task according to task information corresponding to each cloud resource task in the cloud resource task request; Determine the necessary task data of each cloud resource task based on the calling interface and task information of the cloud resource task; According to the execution order between cloud resource tasks, the necessary task data and task information of each cloud resource task, the third-party cloud platform corresponding to each calling interface is called in turn to execute the corresponding cloud resource task.

3. The task processing method according to claim 1, characterized in that: The step of determining the calling interface of the cloud resource task according to the task information in the cloud resource task request includes: Determine, according to the task information, a third-party cloud platform corresponding to the cloud resource task; According to the third-party cloud platform, a calling interface of the cloud resource task is determined.

4. The task processing method according to claim 1, characterized in that: The step of determining the calling interface of the cloud resource task according to the task information in the cloud resource task request includes: The cloud resource task is approved according to the task information in the cloud resource task request. If approved, a calling interface of the cloud resource task is determined according to the task information.

5. The task processing method according to claim 1, characterized in that: After executing the cloud resource task, the method further includes: Receive the execution result returned by the third-party cloud platform, and store the corresponding relationship between the cloud resource task and the third-party cloud platform and the execution result in the target database.

6. The task processing method according to claim 1, characterized in that: The step of determining the calling interface of the cloud resource task according to the task information in the cloud resource task request includes: Determining whether the cloud resource task is an approval-free task according to the type of the cloud resource task; If the cloud resource task is an approval-free task, a calling interface of the cloud resource task is determined according to the task information in the cloud resource task request.

7. The task processing method according to claim 2, characterized in that: The method of sequentially calling the third-party cloud platform corresponding to each calling interface to execute the corresponding cloud resource task according to the execution order between the cloud resource tasks, the necessary task data and task information of each cloud resource task, includes: The cloud resource task ranked first in the execution order is used as the target cloud resource task, and a calling step is performed, the calling step comprising: calling a third-party cloud platform corresponding to the target cloud resource task to execute the target cloud resource task according to the necessary task data and task information of the target cloud resource task; The next cloud resource task is used as the target cloud resource task, and the calling step is performed again until all cloud resource tasks are traversed.

8. The task processing method according to claim 1, characterized in that: Also includes: If the cloud resource task request corresponds to multiple cloud resource tasks and there are independent ones among the multiple cloud resource tasks, the multiple cloud resource tasks are divided into multiple cloud resource task groups, each cloud resource task group is independent of each other, and the cloud resource tasks in each cloud resource task group have a dependency relationship; Determine the execution order of each cloud resource task in each cloud resource task group according to the dependency relationship corresponding to each cloud resource task group; Determine the necessary task data of each cloud resource task based on the calling interface and task information of the cloud resource task; According to the execution order between each cloud resource task in each cloud resource task group, the necessary task data and task information of each cloud resource task, the third-party cloud platforms corresponding to each cloud resource task in the cloud resource task group are called to execute the corresponding cloud resource tasks in sequence.

9. The task processing method according to claim 8, characterized in that: The method further includes calling the third-party cloud platforms corresponding to the respective cloud resource tasks in each cloud resource task group to sequentially execute the corresponding cloud resource tasks according to the execution order between the respective cloud resource tasks in each cloud resource task group, the necessary task data and task information of each cloud resource task, and: If the task execution result of any cloud resource task in the cloud resource task group is failure, the current operation of the cloud resource task group is terminated.

10. A task processing device, characterized in that: include: A receiving module is used to receive a cloud resource task request corresponding to a cloud resource task sent by a front end, wherein the front end displays a task catalog, and the task catalog includes resource tasks, system tasks, and software tasks. The resource tasks include server application and server cloning; the system tasks include CPU memory adjustment, file system addition, and file system expansion; the software tasks include Oracle server installation, SQL Server installation, and Oracle instance installation; A first interface determination module, configured to determine a calling interface of the cloud resource task according to task information in the cloud resource task request, wherein the task information includes: CPU, memory, operating system version and IP address; A processing module is used to determine the necessary task data of the cloud resource task according to the calling interface and the task information, so that the third-party cloud platform corresponding to the calling interface executes the cloud resource task according to the necessary task data and the task information, and the necessary task data includes: data corresponding to the osName, hostName and networkName parameters.

11. The task processing device according to claim 10, characterized in that: Also includes: A sorting module, configured to determine the execution order of the cloud resource tasks according to the dependency relationship if the cloud resource task request corresponds to multiple cloud resource tasks and there is a dependency relationship between the cloud resource tasks; A second interface determination module, configured to determine a calling interface for each cloud resource task according to task information corresponding to each cloud resource task in the cloud resource task request; A necessary parameter determination module is used to determine the necessary task data of each cloud resource task according to the calling interface and task information of the cloud resource task; The calling module is used to call the third-party cloud platform corresponding to each calling interface in turn to execute the corresponding cloud resource task according to the execution order between cloud resource tasks, the necessary task data and task information of each cloud resource task.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the task processing method according to any one of claims 1 to 9 is implemented.

13. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the task processing method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method and device for creating resources on cloud platform

    CN110955409A

  • Hybrid cloud resource data management method and device, equipment and medium

    CN112367370A