Cross-platform task scheduling method and related device
By acquiring and mapping task information, constructing task dependency graphs and using topological sorting algorithms, we solve cross-platform task scheduling problems between different task scheduling systems, achieve collaborative task execution, and improve efficiency and flexibility.
Patent Information
- Application Number
- CN202410859229.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-29
AI Technical Summary
Cross-platform task scheduling between different task scheduling systems is difficult and lacks collaborative execution capabilities, resulting in complex and low-efficiency collaborative task execution.
By obtaining the scheduling system identification and task information to which the subtasks in the cross-platform task belong, map them to a unified format, construct a task dependency graph, and use the topological sorting algorithm to sort, generate a task execution sequence, and schedule the scheduling system to which each subtask belongs. Achieve collaborative execution of cross-platform tasks.
It realizes task collaborative execution between different task scheduling systems, improves task processing efficiency, simplifies the system switching process, reduces integration complexity, and increases system flexibility and maintainability.
Smart Images

Figure CN118860591A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a cross-platform task scheduling method and related devices. Background Art
[0002] At present, different task scheduling systems have independent task scheduling mechanisms, which makes cross-platform task scheduling between different task scheduling systems difficult. Most task scheduling systems lack the ability to coordinate task execution with other task scheduling systems. At present, it is very difficult to modify each task scheduling system to enable the systems to coordinate task execution. Therefore, how to achieve cross-platform task scheduling between different task scheduling systems is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0003] In view of the above problems, the present application provides a cross-platform task scheduling method and related devices to achieve the purpose of cross-platform task scheduling between different task scheduling systems. The specific scheme is as follows:
[0004] The first aspect of the present application provides a cross-platform task scheduling method, comprising:
[0005] Obtaining the system identification and task information of the scheduling system to which each subtask in the cross-platform task belongs; wherein the cross-platform task includes multiple subtasks, and the task information includes the task identification and the task execution condition;
[0006] Mapping the task information of each of the subtasks into a unified format to obtain standard task information of each of the subtasks;
[0007] Constructing a task dependency graph according to the standard task information of each of the subtasks, wherein the task dependency graph includes nodes representing each of the subtasks and directed edges representing dependency relationships between each of the subtasks;
[0008] Using a topological sorting algorithm to sort the subtasks in the task dependency graph to obtain a task execution sequence; the task execution sequence includes the subtasks sorted according to the execution order;
[0009] According to the task execution sequence, the scheduling system to which each of the subtasks belongs is scheduled to execute the cross-platform task.
[0010] In a possible implementation, obtaining the system identifier and task information of the scheduling system to which each subtask in the cross-platform task belongs includes:
[0011] After receiving the scheduling request of the cross-platform task, obtaining system information of the cross-platform task, the system information including a system identifier;
[0012] Based on the system identifier of the scheduling system to which each subtask belongs, a task information request is sent to the scheduling system to which each subtask belongs, so that the scheduling system to which each subtask belongs sends the task information of the corresponding subtask, wherein the task information request includes the task identifier.
[0013] In a possible implementation, the task information of each of the subtasks is mapped to a unified format to obtain standard task information of each of the subtasks, including:
[0014] According to the data format of the task information of each of the subtasks, determining the unified format from a preset standard data format;
[0015] The task information of each of the subtasks is mapped to the unified format through a data structure conversion operation, a field mapping operation, and a property adjustment operation, so as to obtain standard task information of each of the subtasks.
[0016] In a possible implementation, the task execution condition includes data dependency information, time dependency information, and task dependency information. The task dependency graph is constructed based on the standard task information of each subtask, including:
[0017] Determine the data dependency relationship of each of the subtasks based on the data dependency information in the standard task information of each of the subtasks;
[0018] Determining the execution time sequence of each of the subtasks based on the time dependency information in the standard task information of each of the subtasks;
[0019] Determining the task association relationship of each of the subtasks based on the task dependency information in the standard task information of each of the subtasks;
[0020] The task dependency graph is constructed by combining the data dependency, the execution time sequence and the task association relationship.
[0021] In a possible implementation, scheduling the scheduling system to which each of the subtasks belongs to execute the cross-platform task according to the task execution sequence includes:
[0022] Generate a task scheduling plan according to the task information of each subtask and the task execution sequence, wherein the task scheduling plan includes the system identifier, execution time and predecessor task of each subtask;
[0023] Sending a target system scheduling request to a corresponding target scheduling system, so that the target scheduling system executes the corresponding subtask according to the target system scheduling request and feeds back the execution status of the subtask, wherein the target system scheduling includes any system scheduling, and the target system scheduling request includes the execution time and the predecessor task of the subtask belonging to the target scheduling system;
[0024] Receive the execution status of the target subtask fed back by the target scheduling system, and send the execution status of the target subtask to the scheduling system to which all subtasks with the target subtask as a predecessor belong, wherein the target subtask is any one of the subtasks belonging to the target scheduling system.
[0025] In a possible implementation, the cross-platform task scheduling method further includes:
[0026] Monitor the execution status of subtasks of each scheduling system, and issue an alarm prompt if abnormal task execution is detected.
[0027] A second aspect of the present application provides a cross-platform task scheduling device, comprising:
[0028] A task information acquisition unit, used to acquire the system identification and task information of the scheduling system to which each subtask in the cross-platform task belongs; wherein the cross-platform task includes multiple subtasks, and the task information includes the task identification and task execution conditions;
[0029] An information mapping unit, used to map the task information of each of the subtasks into a unified format to obtain standard task information of each of the subtasks;
[0030] A dependency relationship building unit, used to build a task dependency relationship graph according to the standard task information of each of the subtasks, wherein the task dependency relationship graph includes nodes representing each of the subtasks and directed edges representing the dependency relationship between each of the subtasks;
[0031] A task sorting unit, used to sort each of the subtasks in the task dependency graph using a topological sorting algorithm to obtain a task execution sequence; the task execution sequence includes each subtask sorted according to the execution order;
[0032] The task scheduling unit is used to schedule the scheduling system to which each of the subtasks belongs to execute the cross-platform task according to the task execution sequence.
[0033] A third aspect of the present application provides a computer program product, comprising computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the cross-platform task scheduling method of the first aspect or any implementation of the first aspect.
[0034] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0035] The memory is used to store computer programs;
[0036] The processor is used to execute the computer program so that the electronic device can implement the cross-platform task scheduling method of the first aspect or any implementation manner of the first aspect.
[0037] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the cross-platform task scheduling method of the above-mentioned first aspect or any implementation of the first aspect.
[0038] By means of the above technical scheme, the cross-platform task scheduling method and related devices provided by the present application obtain the system identification and task information of the scheduling system to which each subtask in the cross-platform task belongs. The task information of each subtask is mapped to a unified format to obtain the standard task information of each subtask. Based on the standard task information of each subtask, a task dependency graph is constructed. The subtasks in the task dependency graph are sorted using a topological sorting algorithm to obtain a task execution sequence. The task execution sequence includes each subtask sorted according to the execution order. According to the task execution sequence, the scheduling system to which each subtask belongs is scheduled to execute the cross-platform task. It can be seen that this scheme unifies the task information of subtasks of each scheduling system through format mapping. The task information includes task identification and task execution conditions. The task dependency graph includes nodes representing each subtask and directed edges representing the dependency relationship between each subtask. Therefore, the task dependency graph can represent the dependency relationship of subtasks in each scheduling system. Then, based on the topological sorting algorithm, each subtask in the task dependency graph is sorted. The order of each subtask in the obtained task execution sequence satisfies the dependency relationship between each subtask. Scheduling each scheduling system to execute the corresponding subtask based on the task execution sequence can realize the coordinated execution of subtasks according to logical relationships. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0040] Figure 1 A schematic diagram of a cross-platform task scheduling system architecture provided for this application;
[0041] Figure 2 A schematic diagram of the hardware structure of a terminal provided in this application;
[0042] Figure 3 A schematic diagram of the hardware structure of a server provided for this application;
[0043] Figure 4 A flowchart of a cross-platform task scheduling method provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the specific structure of a cross-platform task scheduling system provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of a specific implementation flow of a cross-platform task scheduling method provided in an embodiment of the present application;
[0046] Figure 7 A schematic diagram of the structure of a cross-platform task scheduling device provided in an embodiment of the present application;
[0047] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0049] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0050] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0051] The cross-platform task scheduling method provided by the present invention can be used in the financial field or other fields, for example, it can be used in the execution application scenario of cross-platform tasks in the financial field. Other fields are any fields other than the financial field, for example, the data processing field. The above is only an example and does not limit the application field of the cross-platform task scheduling method provided by the present invention.
[0052] At present, there are many types of systems used in banking systems for task scheduling and execution. However, it is difficult for different scheduling systems to coordinate task execution, which makes cross-platform task collaboration difficult.
[0053] Based on this, the embodiment of the present application provides a solution to realize cross-platform scheduling between different scheduling systems to improve task processing efficiency, see Figure 1 , Figure 1 A schematic diagram of a cross-platform task scheduling system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.
[0054] Among them, a task processing application can be installed on the terminal 100. The above application and web page can provide an interface. The terminal 100 can receive relevant parameters entered by the user on the task processing interface and send the above parameters to the server 200. The server 200 can obtain the processing results based on the received parameters and return the processing results to the terminal 100.
[0055] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the cooperation of the server, and the embodiments of the present application are not limited to this.
[0056] Next describe Figure 1 The product form of the mid-terminal 100;
[0057] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any restrictions on this.
[0058] Figure 2An optional hardware structure diagram of the terminal 100 is shown.
[0059] refer to Figure 2 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.
[0060] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0061] Among them, the input device 132 can receive input data and the like.
[0062] The display unit 140 may be used to display information input by the user or provided to the user, various menus of the terminal 100, interactive interfaces, file displays, and / or playback of any multimedia files. In the embodiment of the present application, the display unit 140 may be used to display the interface for business handling, processing results, etc.
[0063] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.
[0064] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.
[0065] Among them, the memory 120 can be used to store software codes related to the cross-platform task scheduling method, the processor 170 can execute the steps of the cross-platform task scheduling method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve corresponding functions.
[0066] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0067] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.
[0068] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.
[0069] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.
[0070] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .
[0071] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.
[0072] Next describe Figure 1 The product form of the server 200;
[0073] Figure 3 A structural diagram of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.
[0074] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0075] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0076] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a solid state drive (SSD).
[0077] The memory 204 may be used to store software codes related to the cross-platform task scheduling method, and the processor 202 may execute the steps of the cross-platform task scheduling method of the chip, and may also schedule other units to implement corresponding functions.
[0078] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.
[0079] A cross-platform task scheduling method according to an embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0080] Reference Figure 4 , Figure 4 A flow chart of a cross-platform task scheduling method provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, a cross-platform task scheduling method provided by an embodiment of the present application may include S401 to S405, and these steps are described in detail below.
[0081] S401: Obtain the system identification and task information of the scheduling system to which each subtask in the cross-platform task belongs.
[0082] In this embodiment, the cross-platform task includes multiple subtasks, and the task information includes a task identifier and a task execution condition. Optionally, the task execution condition includes at least one of data dependency information, time dependency information, and task dependency information. The data dependency information includes dependency data and corresponding data dependency conditions, the time dependency information includes execution time conditions, and the task dependency information includes a predecessor task and a corresponding task dependency condition.
[0083] S402: Map the task information of each subtask to a unified format to obtain standard task information of each subtask.
[0084] In this embodiment, the data formats of task information of different subtasks of the scheduling system are different. Through a pre-configured mapping algorithm, each information item in the task information of the subtask is mapped to a unified format, wherein the unified format is determined based on the task information of each subtask.
[0085] S403: Construct a task dependency graph based on the standard task information of each subtask.
[0086] In this embodiment, the task dependency graph includes nodes representing each subtask and directed edges representing dependencies between each subtask. Optionally, the dependencies between each subtask are determined based on the task execution conditions in the standard task information, and the task dependency graph is constructed.
[0087] S404: Use a topological sorting algorithm to sort the subtasks in the task dependency graph to obtain a task execution sequence.
[0088] In this embodiment, the task execution sequence includes various subtasks arranged in order of execution.
[0089] S405 . According to the task execution sequence, the scheduling system to which each subtask belongs is scheduled to execute the cross-platform task.
[0090] In this embodiment, according to the execution order of each subtask in the task execution sequence and the system identifier of the scheduling system to which each subtask belongs, the scheduling system to which each subtask belongs is scheduled to execute each subtask according to the execution order.
[0091] It can be seen from the above technical scheme that a cross-platform task scheduling method provided by an embodiment of the present application obtains the system identification and task information of the scheduling system to which each subtask in the cross-platform task belongs. The task information of each subtask is mapped to a unified format to obtain the standard task information of each subtask. Based on the standard task information of each subtask, a task dependency graph is constructed. The subtasks in the task dependency graph are sorted using a topological sorting algorithm to obtain a task execution sequence. The task execution sequence includes each subtask sorted according to the execution order. According to the task execution sequence, the scheduling system to which each subtask belongs is scheduled to execute the cross-platform task. It can be seen that this scheme unifies the task information of subtasks of each scheduling system through format mapping. The task information includes task identification and task execution conditions. The task dependency graph includes nodes representing each subtask and directed edges representing the dependency relationship between each subtask. Therefore, the task dependency graph can represent the dependency relationship of subtasks in each scheduling system. Then, based on the topological sorting algorithm, each subtask in the task dependency graph is sorted. The order of each subtask in the obtained task execution sequence satisfies the dependency relationship between each subtask. Scheduling each scheduling system to execute the corresponding subtask based on the task execution sequence can realize the coordinated execution of subtasks according to logical relationships.
[0092] Taking the MPP (Massively Parallel Processing) scheduling system and TBDS (Tencent Big Data Suite) scheduling system as examples, the current MPP scheduling system and TBDS scheduling system are used by multiple tenants, and there are independent task scheduling mechanisms between the MPP scheduling system and the TBDS scheduling system. The current MPP scheduling system and the TBDS scheduling system have independent task scheduling mechanisms, which makes it difficult for tasks to be executed collaboratively between different systems. Because tasks cannot fully utilize the advantages of different systems, the overall efficiency of data processing is limited. In addition, since the platform dependencies between scheduling systems are difficult to manage, cross-platform collaborative execution is very complicated, which affects the smoothness of the data processing process. When switching systems during the execution of fast platform tasks, there is a lack of a unified scheduling mechanism, which makes the operation cumbersome and error-prone, reducing the flexibility and maintainability of the system.
[0093] Based on this, a cross-platform task scheduling method provided in an embodiment of the present application can be specifically applied to solve the task scheduling independence problem between the MPP scheduling system and the TBDS scheduling system. That is, in a possible implementation, the scheduling system includes the MPP scheduling system and the TBDS scheduling system. Figure 5 , Figure 5 A specific structural diagram of a cross-platform task scheduling system provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the cross-platform task scheduling system includes a scheduling system adapter, a task information mapping module, a cross-platform scheduling engine and a monitoring module. The cross-platform task scheduling system communicates with the scheduling system, namely the MPP scheduling system and the TBDS scheduling system, through the scheduling system adapter.
[0094] Among them, the scheduling system adapter is used to communicate with each scheduling system through a pre-configured interface, obtain task information from each scheduling system, and transmit the task information to the task information mapping module. The task information mapping module is used to map the task information in different scheduling systems to a unified format, and then transmit the task information to the cross-platform scheduling engine. The cross-platform scheduling engine is used to obtain task information in a unified format, obtain the logical dependencies between tasks based on the task information, and further determine the execution order of tasks based on the logical dependencies using a topological sorting algorithm to formulate a cross-platform scheduling plan. The monitoring module is used to monitor the real-time execution status of tasks, ensure that tasks are executed as planned, and handle possible abnormal situations.
[0095] Reference Figure 6 , Figure 6 A schematic diagram of a specific implementation process of a cross-platform task scheduling method provided in an embodiment of the present application is shown in FIG. Figure 6As shown, a cross-platform task scheduling method provided in an embodiment of the present application may include S601 to S610, and these steps are described in detail below.
[0096] S601: After receiving a scheduling request for a cross-platform task, obtain system information of the cross-platform task.
[0097] In this embodiment, the cross-platform task includes multiple subtasks, and the scheduling request includes the task identifier of each subtask, which is used to request scheduling of the cross-platform task. The system information of the cross-platform task includes the system identifier of the scheduling system to which each subtask belongs.
[0098] Taking the cross-platform task including subtasks 1 to 10 as an example, the scheduling request of the cross-platform task is used to request the scheduling of subtasks R1 to R10, and the system information of the cross-platform task includes the system identifiers S1 to S10 of the scheduling systems to which subtasks R1 to R10 belong respectively. Optionally, subtasks 1 to 6 belong to the MPP scheduling system, and subtasks 7 to 10 belong to the TBDS scheduling system.
[0099] It should be noted that each scheduling system is pre-registered in the cross-platform task scheduling system and submits the task identifier of the executable task. The cross-platform task scheduling system builds the correspondence between the system identifier and the task identifier based on the registration information, and further builds a secure communication link between the scheduling system and the cross-platform task scheduling system. After receiving the scheduling request of the cross-platform task, the cross-platform task scheduling system can find the correspondence based on the task identifier of each subtask to obtain the system identifier of the scheduling system to which each subtask belongs.
[0100] It should be noted that the cross-platform scheduling engine may obtain the system information of the cross-platform task after receiving the scheduling request of the cross-platform task.
[0101] S602: Based on the system identifier of the scheduling system to which each subtask belongs, a task information request is sent to the scheduling system to which each subtask belongs, so that the scheduling system to which each subtask belongs sends the task information of the corresponding subtask.
[0102] In this embodiment, the task information request includes a task identifier of a subtask, which is used to request the task information of the subtask, and the task information includes: a task description and a task execution condition. Optionally, the task execution condition includes at least one of data dependency information, time dependency information, and task dependency information. Among them, the data dependency information includes dependency data and corresponding data dependency conditions, the time dependency information includes execution time conditions, and the task dependency information includes predecessor tasks and corresponding task dependency conditions.
[0103] In this embodiment, the scheduling system adapter determines the corresponding interface protocol based on the system identifier of the scheduling system to which each subtask belongs, and sends a task information request to the scheduling system to which each subtask belongs based on the corresponding interface protocol, and receives the task information of each subtask fed back by the scheduling system to which each subtask belongs through the corresponding interface.
[0104] S603: Receive task information of each subtask, and based on the data format of the task information of each subtask, convert the data items in the task information of each subtask into a unified format to obtain standard task information of each subtask.
[0105] In this embodiment, the data formats of various scheduling systems are different, and the data protocols between them and the scheduling system adapters are different. Therefore, the task information of each subtask received by the scheduling system adapter has a different data format. Furthermore, the scheduling system adapter transmits the task information of each subtask in a different data format to the task information mapping module, and the task information mapping module maps the task information of each subtask to a preset unified format based on an intelligent mapping algorithm.
[0106] In this embodiment, the specific method for the task information mapping module to map the task information of each subtask to a preset unified format based on the intelligent mapping algorithm includes:
[0107] The data format of the task information is obtained, a unified format is determined according to the data formats of different task information, and the data formats of the task information of all subtasks are mapped to the unified format.
[0108] In this embodiment, the data format of the task information can be obtained by parsing the task information, or based on the scheduling system corresponding to the task information, the data format corresponding to the scheduling system can be directly obtained.
[0109] In this embodiment, the unified format is selected from pre-configured standard data formats, and the standard data format is a data format that can be parsed and processed by the cross-platform scheduling engine. For example, if the data formats of each task information include at least one standard data format, the standard data format with the most corresponding task information can be selected as the unified format. If the data formats of each task information do not include a standard data format, a standard data format can be randomly selected as the unified format.
[0110] In this embodiment, the task information of each subtask is mapped to a preset unified format at least through a data structure conversion operation, a field mapping operation, and an attribute adjustment operation. For specific mapping methods, refer to the prior art.
[0111] It should be noted that the unified format is a format that can meet the requirements of both the MPP scheduling system and the TBDS scheduling system and can be correctly parsed and processed in the cross-platform scheduling engine. The unified format may be the data format of the MPP scheduling system or the TBDS scheduling system, or it may be a standard data format that is different from the data format of the MPP scheduling system and the TBDS scheduling system.
[0112] In this embodiment, the intelligent mapping algorithm pre-configured in the task information mapping module can be used to convert data structures, map fields, adjust attributes, and other operations according to the task information format and unified format requirements of the MPP scheduling system and the TBDS scheduling system to ensure that the mapping and conversion of task information between different systems are accurate and reliable. This provides data basis for realizing the collaborative execution of tasks between different scheduling systems and improving the overall data processing efficiency.
[0113] It should be further explained that the task information mapping module sends the standard task information of each subtask to the cross-platform scheduling engine.
[0114] S604: Generate a task dependency graph based on the standard task information of each subtask.
[0115] In this embodiment, the task dependency graph includes nodes representing each subtask and directed edges representing the dependency relationship between each subtask, and the directed edges are directed from the predecessor task of the target task to the target task.
[0116] Specifically, the data dependency of each subtask is determined based on the data dependency information in the standard task information of each subtask, the execution time sequence of each subtask is determined based on the time dependency information in the standard task information of each subtask, and the task association relationship of each subtask is determined based on the task dependency information in the standard task information of each subtask. A task dependency graph is constructed by combining the data dependency, execution time sequence, and task association relationship. That is, the task dependency relationship obtained by analysis is represented in the form of a graph to form a cross-platform task dependency graph.
[0117] S605 , sorting each subtask in the task dependency graph using a topological sorting algorithm to obtain a task execution sequence.
[0118] In this embodiment, the task execution sequence includes various subtasks arranged in order of execution.
[0119] In this embodiment, a topological sorting algorithm is used to sort the task dependency graph to determine the execution order of each subtask. The topological sorting algorithm traverses the nodes in the graph and sorts them according to the dependency relationship between the nodes so that no subtask is executed before the predecessor task. The topological sorting algorithm is used to determine the execution order of tasks to ensure that the tasks can be executed collaboratively in a logical order.
[0120] S606: Generate a task scheduling plan based on the task information and task execution sequence of each subtask.
[0121] In this embodiment, the task scheduling plan includes the system identification, execution time and predecessor task of each subtask. Among them, the predecessor task of the target subtask (any subtask) is the subtask that is located before the target subtask in the task execution sequence.
[0122] That is, the task scheduling plan is used to instruct the scheduling system to execute each subtask, as well as the execution timing, wherein the execution timing includes the execution time and the predecessor task.
[0123] S607: Divide each subtask according to the scheduling system to which it belongs to obtain a system scheduling request corresponding to each scheduling system.
[0124] In this embodiment, the system scheduling request of the target scheduling system (any scheduling system) includes the execution time of the subtasks belonging to the target scheduling system and the predecessor tasks.
[0125] It should be noted that the cross-platform scheduling engine executes S604 to S608.
[0126] S608 . Send system scheduling requests to corresponding scheduling systems respectively, so that the scheduling systems execute corresponding subtasks according to the system scheduling requests and feed back the execution status of the subtasks.
[0127] In this embodiment, the system scheduling request is sent to the corresponding scheduling system through the scheduling system adapter based on the system identifier of the subtask in the system scheduling request.
[0128] It should be noted that when the target scheduling system executes the subtask in the system scheduling request, if the predecessor tasks of the target subtask are all subtasks in the target scheduling system, it is determined whether to start executing the target subtask directly based on the execution status of each subtask. If the predecessor tasks of the target subtask include subtasks of other scheduling systems, it is determined whether to start executing the target subtask based on the received subtask execution status notification message.
[0129] S609: Receive the execution status of the target subtask fed back by the target scheduling system, and send the execution status of the target subtask to the scheduling systems to which all subtasks with the target subtask as a predecessor belong.
[0130] In this embodiment, the interaction between the scheduling system and the cross-platform task scheduling is performed through the scheduling system adapter.
[0131] S610: Monitor the execution status of the subtasks of each scheduling system, and issue an alarm prompt instruction if abnormal task execution is detected.
[0132] In this embodiment, the monitoring module will monitor the execution status of each subtask in real time through the scheduling system adapter module and handle abnormal situations. Specifically, when an abnormality occurs in the task execution, such as execution failure, timeout, etc., the real-time monitoring module will immediately receive the execution status and handle it according to the pre-set strategy.
[0133] It should be noted that the monitoring module monitors the execution of tasks in real time through the scheduling system adapter module to ensure that cross-platform tasks are executed according to the task scheduling plan and take timely measures when abnormal situations occur.
[0134] It can be seen from the above technical solutions that the cross-platform task scheduling method provided by the embodiment of the present application communicates information with each scheduling system through a scheduling system adapter to ensure the effectiveness of information transmission, overcomes the information differences between scheduling systems through a task information mapping module, realizes seamless data conversion, and ensures the consistency of cross-platform scheduling. Through the cross-platform scheduling engine, it is ensured that tasks are collaboratively executed according to logical dependencies in different scheduling systems, thereby maximizing the efficiency of task processing. The cross-platform task scheduling system monitors task execution through a monitoring module to improve the correctness of task execution. Furthermore, the cross-platform task scheduling system realizes the collaborative execution of tasks between different scheduling systems, simplifies the system switching process, reduces integration complexity, and increases the flexibility and maintainability of the system.
[0135] It should be noted that the above embodiment is only a specific implementation method of a cross-platform task scheduling method provided by the embodiment of the present application. The present application can also be implemented in other optional ways. For example, the cross-platform task scheduling system can also include a human-computer interaction module, which receives the execution status and monitoring information of each subtask transmitted by the monitoring module, and displays the execution progress and pointing status of the cross-platform task, for example, whether each subtask in the cross-platform task is successfully executed and the overall execution progress. For another example, S603 is only a specific method of mapping the task information of each subtask to a unified format using an intelligent mapping algorithm. In other optional implementations, the task information of each subtask can also be mapped to a preset fixed format through a format conversion rule, and the fixed format is pre-set. For another example, when the present application uses a scheduling system adapter to send a request to each scheduling system, each request is converted into a data format that can be recognized by each scheduling system.
[0136] A cross-platform task scheduling method provided by an embodiment of the present application is introduced above, and a device for executing the above-mentioned cross-platform task scheduling method will be introduced below.
[0137] See also Figure 7 , Figure 7 A schematic diagram of the structure of a cross-platform task scheduling device provided in an embodiment of the present application. Figure 7 As shown, the cross-platform task scheduling device 700 includes:
[0138] The task information acquisition unit 701 is used to acquire the system identification and task information of the scheduling system to which each subtask in the cross-platform task belongs; wherein the cross-platform task includes multiple subtasks, and the task information includes the task identification and the task execution condition;
[0139] An information mapping unit 702 is used to map the task information of each of the subtasks into a unified format to obtain standard task information of each of the subtasks;
[0140] A dependency relationship building unit 703 is used to build a task dependency relationship graph according to the standard task information of each of the subtasks, wherein the task dependency relationship graph includes nodes representing each of the subtasks and directed edges representing the dependency relationship between each of the subtasks;
[0141] The task sorting unit 704 is used to sort the subtasks in the task dependency graph using a topological sorting algorithm to obtain a task execution sequence; the task execution sequence includes the subtasks sorted according to the execution order;
[0142] The task scheduling unit 705 is used to schedule the scheduling system to which each of the subtasks belongs to execute the cross-platform task according to the task execution sequence.
[0143] In a possible implementation, when the task information acquisition unit is used to acquire the system identifier and task information of the scheduling system to which each subtask in the cross-platform task belongs, it is specifically used to:
[0144] After receiving the scheduling request of the cross-platform task, obtaining system information of the cross-platform task, the system information including a system identifier;
[0145] Based on the system identifier of the scheduling system to which each subtask belongs, a task information request is sent to the scheduling system to which each subtask belongs, so that the scheduling system to which each subtask belongs sends the task information of the corresponding subtask, wherein the task information request includes the task identifier.
[0146] In a possible implementation, the information mapping unit is used to map the task information of each of the subtasks into a unified format to obtain the standard task information of each of the subtasks, specifically to:
[0147] According to the data format of the task information of each of the subtasks, determining the unified format from a preset standard data format;
[0148] The task information of each of the subtasks is mapped to the unified format through a data structure conversion operation, a field mapping operation, and a property adjustment operation, so as to obtain standard task information of each of the subtasks.
[0149] In a possible implementation, the task execution condition includes data dependency information, time dependency information, and task dependency information. The dependency relationship building unit is used to build a task dependency relationship graph according to the standard task information of each of the subtasks, specifically for:
[0150] Determine the data dependency relationship of each of the subtasks based on the data dependency information in the standard task information of each of the subtasks;
[0151] Determining the execution time sequence of each of the subtasks based on the time dependency information in the standard task information of each of the subtasks;
[0152] Determining the task association relationship of each of the subtasks based on the task dependency information in the standard task information of each of the subtasks;
[0153] The task dependency graph is constructed by combining the data dependency, the execution time sequence and the task association relationship.
[0154] In a possible implementation, the task scheduling unit is used to schedule the scheduling system to which each of the subtasks belongs to execute the cross-platform task according to the task execution sequence, specifically to:
[0155] Generate a task scheduling plan according to the task information of each subtask and the task execution sequence, wherein the task scheduling plan includes the system identifier, execution time and predecessor task of each subtask;
[0156] Sending a target system scheduling request to a corresponding target scheduling system, so that the target scheduling system executes the corresponding subtask according to the target system scheduling request and feeds back the execution status of the subtask, wherein the target system scheduling includes any system scheduling, and the target system scheduling request includes the execution time and the predecessor task of the subtask belonging to the target scheduling system;
[0157] Receive the execution status of the target subtask fed back by the target scheduling system, and send the execution status of the target subtask to the scheduling system to which all subtasks with the target subtask as a predecessor belong, wherein the target subtask is any one of the subtasks belonging to the target scheduling system.
[0158] In a possible implementation, the cross-platform task scheduling device further includes:
[0159] The monitoring unit is used to monitor the execution status of the subtasks of each scheduling system. If an abnormality in task execution is detected, an alarm prompt instruction is issued.
[0160] The present application also provides an electronic device in an embodiment. Figure 8 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include but is not limited to fixed terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0161] like Figure 8 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0162] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a memory card, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0163] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any cross-platform task scheduling method provided in the embodiment of the present application.
[0164] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any cross-platform task scheduling method provided in an embodiment of the present application.
[0165] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0166] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0167] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0168] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A cross-platform task scheduling method, characterized in that: include: Obtaining the system identification and task information of the scheduling system to which each subtask in the cross-platform task belongs; wherein the cross-platform task includes multiple subtasks, and the task information includes the task identification and the task execution condition; Mapping the task information of each of the subtasks into a unified format to obtain standard task information of each of the subtasks; Constructing a task dependency graph according to the standard task information of each of the subtasks, wherein the task dependency graph includes nodes representing each of the subtasks and directed edges representing dependency relationships between each of the subtasks; Using a topological sorting algorithm to sort the subtasks in the task dependency graph to obtain a task execution sequence; the task execution sequence includes the subtasks sorted according to the execution order; According to the task execution sequence, the scheduling system to which each of the subtasks belongs is scheduled to execute the cross-platform task.
2. The cross-platform task scheduling method according to claim 1, characterized in that: The step of obtaining the system identifier and task information of the scheduling system to which each subtask in the cross-platform task belongs includes: After receiving the scheduling request of the cross-platform task, obtaining system information of the cross-platform task, the system information including a system identifier; Based on the system identifier of the scheduling system to which each subtask belongs, a task information request is sent to the scheduling system to which each subtask belongs, so that the scheduling system to which each subtask belongs sends the task information of the corresponding subtask, wherein the task information request includes the task identifier.
3. The cross-platform task scheduling method according to claim 1, characterized in that: Mapping the task information of each of the subtasks to a unified format to obtain standard task information of each of the subtasks includes: According to the data format of the task information of each of the subtasks, determining the unified format from a preset standard data format; The task information of each of the subtasks is mapped to the unified format through a data structure conversion operation, a field mapping operation, and a property adjustment operation, so as to obtain standard task information of each of the subtasks.
4. The cross-platform task scheduling method according to claim 1, characterized in that: The task execution condition includes data dependency information, time dependency information and task dependency information. The task dependency graph is constructed based on the standard task information of each subtask, including: Determine the data dependency relationship of each of the subtasks based on the data dependency information in the standard task information of each of the subtasks; Determining the execution time sequence of each of the subtasks based on the time dependency information in the standard task information of each of the subtasks; Determining the task association relationship of each of the subtasks based on the task dependency information in the standard task information of each of the subtasks; The task dependency graph is constructed by combining the data dependency, the execution time sequence and the task association relationship.
5. The cross-platform task scheduling method according to claim 1, characterized in that: The step of scheduling the scheduling system to which each of the subtasks belongs to execute the cross-platform task according to the task execution sequence includes: Generate a task scheduling plan according to the task information of each subtask and the task execution sequence, wherein the task scheduling plan includes the system identifier, execution time and predecessor task of each subtask; Sending a target system scheduling request to a corresponding target scheduling system, so that the target scheduling system executes the corresponding subtask according to the target system scheduling request and feeds back the execution status of the subtask, wherein the target system scheduling includes any system scheduling, and the target system scheduling request includes the execution time and the predecessor task of the subtask belonging to the target scheduling system; Receive the execution status of the target subtask fed back by the target scheduling system, and send the execution status of the target subtask to the scheduling system to which all subtasks with the target subtask as a predecessor belong, wherein the target subtask is any one of the subtasks belonging to the target scheduling system.
6. The cross-platform task scheduling method according to claim 1, characterized in that: Also includes: Monitor the execution status of subtasks of each scheduling system, and issue an alarm prompt if abnormal task execution is detected.
7. A cross-platform task scheduling device, characterized in that: include: A task information acquisition unit, used to acquire the system identification and task information of the scheduling system to which each subtask in the cross-platform task belongs; wherein the cross-platform task includes multiple subtasks, and the task information includes the task identification and task execution conditions; An information mapping unit, used to map the task information of each of the subtasks into a unified format to obtain standard task information of each of the subtasks; A dependency relationship building unit, used to build a task dependency relationship graph according to the standard task information of each of the subtasks, wherein the task dependency relationship graph includes nodes representing each of the subtasks and directed edges representing the dependency relationship between each of the subtasks; A task sorting unit, used to sort each of the subtasks in the task dependency graph using a topological sorting algorithm to obtain a task execution sequence; the task execution sequence includes each subtask sorted according to the execution order; The task scheduling unit is used to schedule the scheduling system to which each of the subtasks belongs to execute the cross-platform task according to the task execution sequence.
8. A computer program product, characterized in that It comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the cross-platform task scheduling method as claimed in any one of claims 1 to 6.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the cross-platform task scheduling method as described in any one of claims 1 to 6.
10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the cross-platform task scheduling method as described in any one of claims 1 to 6.
Citation Information
Cited By
Testing method for financial service application program, electronic equipment and storage medium
CN119441054A
Industrial configuration software cross-platform cooperative control method and system based on Gawan
CN120704206A
Cross-platform multi-source heterogeneous data scenarized digital identification method, system and device
CN121278014A
Cross-platform multi-source heterogeneous data scene digital identification method, system and device
CN121278014B
