Task execution method, device and electronic device

By setting up task monitoring services on the device, automatically monitoring and managing task configuration centers, the inefficiency problem caused by manual intervention in real-time task deployment in the existing technology is solved, and the automated processing and management of real-time tasks is realized, and data processing is improved. efficiency.

CN112231177BActive Publication Date: 2024-11-26BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011120988.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-19
Publication Date
2024-11-26
Estimated Expiration
2040-10-19

AI Technical Summary

Technical Problem

The prior art requires manual intervention in real-time task deployment, resulting in reduced efficiency in processing related data in real-time tasks, and the inability to automatically sense new tasks and start or stop executable programs.

Method used

By setting up a task monitoring service on the device, listening to the task configuration center in real time, automatically reading and calling the executable program of newly added tasks, the functions of automatically starting and stopping tasks, including listening to newly added and deleted tasks, and executable tasks Restart the program under abnormal conditions.

Benefits of technology

Without manual intervention, the efficiency of processing related data in real-time tasks is improved, automatic start and stop of automatic perception and management tasks is realized, and the automation level of the system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112231177B_ABST
    Figure CN112231177B_ABST
Patent Text Reader

Abstract

The present invention provides a task execution method, device and electronic device, which first monitor whether there is a new task, and if so, read the task configuration parameters of the new task, then call the executable program corresponding to the new task, input the task configuration parameters into the called executable program to start the executable program, and execute the new task through the executable program. This method can automatically monitor the new task, and based on the task configuration parameters of the new task automatically read, automatically start the executable program corresponding to the new task, and then execute the new task, without manual intervention, and improve the processing efficiency of the relevant data in the new task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a task execution method, device and electronic equipment. Background Art

[0002] When deploying a real-time task, it is necessary to process the relevant data in the real-time task through the corresponding executable program. In the related technology, the pre-compiled executable program is generally packaged manually, and then submitted to the running platform using the submission method of the real-time computing framework itself, and the executable program is run through the running platform. In addition, the packaged executable program needs to be submitted to the scheduling system, and the start and stop of the executable program is controlled manually through the scheduling system. This method that requires manual intervention reduces the efficiency of processing the relevant data in the real-time task. Summary of the invention

[0003] The purpose of the present invention is to provide a task execution method, device and electronic device to improve the processing efficiency of relevant data in real-time tasks.

[0004] The present invention provides a task execution method, which is applied to a device running a task monitoring service; the method includes: monitoring whether a new task exists; if the new task exists, reading the task configuration parameters of the new task; calling an executable program corresponding to the new task, inputting the task configuration parameters into the called executable program to start the executable program, and executing the new task through the executable program.

[0005] Furthermore, the device is permanently linked to a preset task configuration center; the step of monitoring whether there is a newly added task includes: monitoring in real time whether there is a task configuration item of the newly added task in the task configuration center.

[0006] Furthermore, the task configuration parameters of the newly added task and the corresponding executable program of the newly added task are all stored in the task configuration center; the task configuration parameters include the task project name of the newly added task and the log pool name of the newly added task.

[0007] Furthermore, the method further includes: monitoring whether there is a deleted target task; if there is the deleted target task, closing the executable program corresponding to the target task.

[0008] Furthermore, the step of monitoring whether there is a target task to be deleted includes: monitoring whether there is a target task with the configuration parameters of the deleted task; if there is a target task with the configuration parameters of the deleted task, confirming that the target task is deleted.

[0009] Furthermore, the task configuration parameters are input into the called executable program to start the executable program. After the step of executing the newly added task through the executable program, the method also includes: monitoring the running status of the executable program; if the executable program exits abnormally, repeating the step of calling the executable program corresponding to the newly added task to restart the executable program.

[0010] Furthermore, after the step of restarting the executable program, the method further includes: sending a message indicating that the executable program has abnormally exited to the user in a preset alarm manner.

[0011] The present invention provides a task execution device, which is set on a device running a task monitoring service; the device includes: a monitoring module, used to monitor whether there is a new task; a reading module, used to read the task configuration parameters of the new task if the new task exists; and a calling module, used to call the executable program corresponding to the new task, input the task configuration parameters into the called executable program to start the executable program, and execute the new task through the executable program.

[0012] An electronic device provided by the present invention includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement any of the task execution methods described above.

[0013] The present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement any of the task execution methods described above.

[0014] The task execution method, device and electronic device provided by the present invention first monitor whether there is a new task, and if so, read the task configuration parameters of the new task, then call the executable program corresponding to the new task, input the task configuration parameters into the called executable program to start the executable program, and execute the new task through the executable program. This method can automatically monitor the new task, and based on the task configuration parameters of the new task automatically read, automatically start the executable program corresponding to the new task, and then execute the new task, without manual intervention, and improve the processing efficiency of the relevant data in the new task. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0016] Figure 1 A schematic diagram of a task deployment method in the prior art provided by an embodiment of the present invention;

[0017] Figure 2 A flowchart of a task execution method provided by an embodiment of the present invention;

[0018] Figure 3 A flowchart of another task execution method provided by an embodiment of the present invention;

[0019] Figure 4 A flowchart of another task execution method provided by an embodiment of the present invention;

[0020] Figure 5 A flowchart of another task execution method provided by an embodiment of the present invention;

[0021] Figure 6 A schematic diagram of a task execution method provided by an embodiment of the present invention;

[0022] Figure 7 A schematic diagram of the structure of a task execution device provided by an embodiment of the present invention;

[0023] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] At present, in the deployment of real-time tasks, the conventional practice is to manually package the pre-compiled executable program through the submit method of the real-time computing framework itself, and then submit it to the running platform, so that the real-time task can be run according to the expected implementation plan. Among them, the running platform can be understood as a big data cluster connected by multiple servers. In addition, it is necessary to submit the packaged executable program to the scheduling system through scheduling technology, and manually start and close the execution status of the executable program through the scheduling system.

[0026] like Figure 1 The schematic diagram of a task deployment method in the prior art is shown. Taking the Flink or Spark real-time computing framework as an example, after the real-time computing program is packaged, it is submitted to the big data cluster through the submit submission method of the Flink or Spark real-time computing framework itself, where Flink can be understood as a distributed stream data flow engine; Spark can be understood as a fast and general computing engine designed for large-scale data processing. When there is a new task, this method cannot automatically sense the new task, and manual intervention is required to process the relevant data in the new task through the executable program. It cannot achieve the effect of automatically starting and stopping the executable program after sensing the new task, which reduces the efficiency of processing the relevant data in the real-time task.

[0027] Based on this, an embodiment of the present invention provides a task execution method, which can be applied to devices such as mobile terminals and computers, and in particular, can be applied to devices running a task monitoring service.

[0028] To facilitate understanding of this embodiment, a task execution method disclosed in an embodiment of the present invention is first introduced in detail; the method is applied to a device running a task monitoring service; the task monitoring service can be in the form of a task monitoring program, and the task monitoring service can implement monitoring through a preset monitoring mechanism, such as a watch monitoring mechanism. Figure 2 As shown, the method comprises the following steps:

[0029] Step S202, monitoring whether there is a new task.

[0030] The above-mentioned newly added tasks can be understood as newly created or newly generated tasks. For example, a new task is created in the log service product, and the task configuration items of the new task include a new project and log pool, etc. In actual implementation, the device running the task monitoring service can monitor whether there are newly created or newly generated tasks through a preset monitoring mechanism, such as the watch monitoring mechanism.

[0031] Step S204: If there is a new task, read the task configuration parameters of the new task.

[0032] The above-mentioned task configuration parameters can be understood as the relevant configuration parameters in the newly added task. For example, if a new task is created in the log service product, the task configuration parameters of the new task may include the newly added task project name and log pool name, etc.; if a newly created or newly generated task is detected, it is usually necessary to read the relevant task configuration parameters of the newly created or newly generated task, such as reading the task project name and log pool name of the newly added task.

[0033] Step S206, calling the executable program corresponding to the newly added task, inputting the task configuration parameters into the called executable program to start the executable program, and executing the newly added task through the executable program.

[0034] The above-mentioned executable program is usually a binary executable program that can be floated in the storage space of the operating system; the executable program can be loaded into the memory, loaded and executed by the operating system; in actual implementation, the executable program is usually pre-compiled, and different tasks usually correspond to different executable programs. When a new task is monitored and the task configuration parameters of the new task are read, the executable program corresponding to the new task can be called, and the read task configuration parameters are input into the executable program as startup parameters to start the executable program, so that the new task can be executed through the executable program. For example, if a new task is created in the log service product, the task configuration items of the new task include a new project and log pool, then the data of the project and log pool can be processed by the executable program.

[0035] A task execution method provided by an embodiment of the present invention first monitors whether a new task exists, and if so, reads the task configuration parameters of the new task, then calls the executable program corresponding to the new task, inputs the task configuration parameters into the called executable program, starts the executable program, and executes the new task through the executable program. This method can automatically monitor the new task, and based on the task configuration parameters of the new task automatically read, automatically starts the executable program corresponding to the new task, and then executes the new task, without manual intervention, thereby improving the processing efficiency of the relevant data in the new task.

[0036] An embodiment of the present invention also provides another task execution method, which is implemented on the basis of the method of the above-mentioned embodiment; the method focuses on describing the specific process of monitoring whether there are new tasks, in which the device is long-linked to a preset task configuration center; the task configuration center can be understood as a basic service component that can uniformly manage various application configurations, such as an etcd configuration center, etc., wherein the etcd can be understood as a distributed consistency key-value storage system, mainly used for shared configuration and service discovery; in actual implementation, a long-link monitoring can be established between a device running a task monitoring service and a preset task configuration center. For example, a long-link monitoring can be established through a watch mechanism so that a device running a task monitoring service can monitor whether there are new tasks in the task configuration center, etc.

[0037] The task configuration parameters of the newly added task and the corresponding executable program of the newly added task are all saved in the task configuration center; wherein the task configuration parameters include the task project name of the newly added task and the log pool name of the newly added task; for example, the task project name of the newly added task is Project A, and the log pool names of the newly added task are Log Pool A and Log Pool B, etc.

[0038] In actual implementation, task configuration parameters of multiple different tasks are usually saved in a task configuration center, and executable programs corresponding to multiple different tasks are usually also saved in the task configuration center after being pre-compiled, that is, the task configuration parameters of the newly added task and the corresponding executable program are saved in the task configuration center, and the task configuration parameters of the newly added task can be read from the task configuration center, and the executable program corresponding to the newly added task can be called. For example, if the task configuration center is an etcd configuration center, the task configuration parameters of the newly added task and the executable program corresponding to the newly added task are all saved in the etcd configuration center, and the task configuration parameters of the newly added task can be read from the etcd configuration center, and the executable program corresponding to the newly added task can be called.

[0039] like Figure 3 As shown, the method comprises the following steps:

[0040] Step S302: monitor in real time whether there is a task configuration item for a newly added task in the task configuration center.

[0041] The above-mentioned task configuration items can be understood as configuration items that need to be included in the configuration management scope of the newly added task. The task configuration items may include multiple ones. For example, a new task is created in the log service product. The task configuration items of the new task may include projects and log pools, etc. In actual implementation, since the device running the task monitoring service establishes a long link with the preset task configuration center, it is possible to monitor in real time whether there are task configuration items for the newly added task in the task configuration center.

[0042] Step S304: If there is a new task, read the task configuration parameters of the new task.

[0043] Step S306, calling the executable program corresponding to the newly added task, inputting the task configuration parameters into the called executable program to start the executable program, and executing the newly added task through the executable program.

[0044] Another task execution method provided by an embodiment of the present invention first monitors in real time whether there is a task configuration item of a newly added task in the task configuration center. If there is a newly added task, read the task configuration parameters of the newly added task; then call the executable program corresponding to the newly added task, input the task configuration parameters into the called executable program, start the executable program, and execute the newly added task through the executable program. This method can automatically monitor the newly added task, and based on the task configuration parameters of the newly added task automatically read, automatically start the executable program corresponding to the newly added task, and then execute the newly added task, without the need for manual intervention, thereby improving the processing efficiency of the relevant data in the newly added task.

[0045] The embodiment of the present invention also provides another task execution method, which is implemented on the basis of the method in the above embodiment; Figure 4 As shown, the method comprises the following steps:

[0046] Step S402, monitoring whether there is a new task.

[0047] Step S404: if there is a new task, read the task configuration parameters of the new task.

[0048] Step S406, calling the executable program corresponding to the newly added task, inputting the task configuration parameters into the called executable program to start the executable program, and executing the newly added task through the executable program.

[0049] Step S408, monitoring whether there is a target task to be deleted.

[0050] The above-mentioned target task can be understood as a designated task that is deleted from multiple different tasks; for example, if the task configuration parameters of different tasks are saved in a task configuration center, that is, the task configuration center includes multiple different tasks, the designated task deleted from the multiple different tasks is the above-mentioned target task; in actual implementation, a device running a task monitoring service can monitor whether there is a deleted target task. For example, if a device running a task monitoring service establishes a long link with a preset task configuration center, it can monitor in real time whether there is a deleted target task in the task configuration center.

[0051] Specifically, step S408 can be implemented by the following steps 1 and 2:

[0052] Step 1: Monitor whether there is a target task with the deleted task configuration parameters.

[0053] In actual implementation, since different tasks usually have their corresponding task configuration parameters, it is possible to confirm whether the target task is deleted by monitoring whether the task configuration parameters of the target task are deleted; for example, if the task configuration parameters corresponding to different tasks are stored in the task configuration center, and a device running a task monitoring service has established a long link with the task configuration center, it is possible to confirm whether the target task is deleted by monitoring whether there is a target task with deleted task configuration parameters in the task configuration center.

[0054] Step 2: If there is a target task with the deleted task configuration parameters, confirm that the target task is deleted.

[0055] If it is detected that there is a target task whose task configuration parameters have been deleted, it can be confirmed that the target task has been deleted; for example, if the task configuration parameters of the target task include project A, log pool A, and log pool B, if it is detected that project A, log pool A, and log pool B have been deleted, it can be confirmed that the target task has been deleted.

[0056] Step S410: If there is a target task to be deleted, close the executable program corresponding to the target task.

[0057] When it is detected that a target task is deleted, a closing operation is usually triggered. The closing operation can also be called a kill operation to close the executable program corresponding to the target task to avoid occupying resources.

[0058] Another task execution method provided by an embodiment of the present invention first monitors whether there is a new task. If so, read the task configuration parameters of the new task, then call the executable program corresponding to the new task, input the task configuration parameters into the called executable program to start the executable program, and execute the new task through the executable program; monitor whether there is a deleted target task, and if there is a deleted target task, close the executable program corresponding to the target task. This method can automatically monitor the new task, and based on the automatically read task configuration parameters of the new task, automatically start the executable program corresponding to the new task, and then execute the new task. It can also automatically close the executable program corresponding to the target task after automatically monitoring the deleted target task, without manual intervention, thereby improving data processing efficiency.

[0059] The embodiment of the present invention also provides another task execution method, which is implemented on the basis of the method in the above embodiment; Figure 5 As shown, the method comprises the following steps:

[0060] Step S502: monitor whether there is a new task.

[0061] Step S504: if there is a new task, read the task configuration parameters of the new task.

[0062] Step S506, calling the executable program corresponding to the newly added task, inputting the task configuration parameters into the called executable program to start the executable program, and executing the newly added task through the executable program.

[0063] Step S508: monitoring the running status of the executable program.

[0064] The above-mentioned running status may include that the executable program is running normally or that the executable program is running abnormally, etc.; in actual implementation, after the executable program is started, the device running the task monitoring service can monitor whether the running status of the executable program is normal; the running status of the executable program can be monitored at a preset monitoring frequency, and the preset monitoring frequency can be real-time monitoring or periodic monitoring, etc., which can be set according to actual needs and is not limited here.

[0065] Step S510: If the executable program exits abnormally, the step of calling the executable program corresponding to the newly added task is repeated to restart the executable program.

[0066] In actual implementation, if it is monitored that the executable program is running abnormally, for example, when it is monitored that the executable program exits abnormally, the executable program will usually be automatically pulled up again. It can also be understood as repeatedly calling the executable program corresponding to the newly added task, and inputting the task configuration parameters of the newly added task into the repeatedly called executable program to restart the executable program, and execute the newly added task through the restarted executable program.

[0067] Step S512: sending a message of abnormal exit of the executable program to the user according to a preset alarm method.

[0068] The above-mentioned preset alarm methods may include sending text messages or sending emails, etc., which can be set specifically according to actual needs. When an executable program is detected to have exited abnormally, the executable program will usually be restarted first, and then the user will be alerted in a preset alarm method, such as sending text messages or sending emails, to notify the user that the executable program has exited abnormally, so as to remind the user to take appropriate measures for the abnormal situation.

[0069] Another task execution method provided by an embodiment of the present invention first monitors whether a new task exists. If so, the task configuration parameters of the new task are read, and then the executable program corresponding to the new task is called, and the task configuration parameters are input into the called executable program to start the executable program, and the new task is executed by the executable program; the running status of the executable program is monitored, and if the executable program exits abnormally, the step of calling the executable program corresponding to the new task is repeated to restart the executable program. According to a preset alarm method, a message of abnormal exit of the executable program is sent to the user. This method can automatically monitor the new task, and based on the task configuration parameters of the new task automatically read, the executable program corresponding to the new task is automatically started, and then the new task is executed without manual intervention, thereby improving the processing efficiency of relevant data in the new task.

[0070] To further understand the above embodiments, the following is provided: Figure 6 A schematic diagram of a task execution method is shown in FIG. Figure 6 In the process, the task perception service (corresponding to the above-mentioned task listening service, also called the task listening program) establishes a long link with the configuration center (corresponding to the above-mentioned task configuration center) through the watch mechanism, and can monitor in real time whether there are task configuration items for new tasks in the configuration center, where the configuration center can be an etcd configuration center, etc.

[0071] When a new task is generated, that is, when a task configuration item of the new task is generated, Figure 6 In the example, the task configuration items of the newly added task are project and log pool. The task project name of the newly added task is project A, and the log pool names of the newly added task are log pool A and log pool B. Then project A, log pool A and log pool B are saved in the configuration center (the corresponding task configuration parameters of the above-mentioned newly added task are saved in the task configuration center). The task perception service can perceive that there is a new task. At this time, the task perception service will read the task project name and log pool name of the newly added task from the configuration center, that is, read project A, log pool A and log pool B, and then call the pre-compiled real-time computing program corresponding to the newly added task (corresponding to the above-mentioned executable program), and pass the read task project name and log pool name as startup parameters into the actual computing program called to start the actual computing program. The actual computing program can process the relevant data operations of the project and log pool; specifically, in the big data cluster, the relevant data in log A in project A can be processed by the real-time computing program; the relevant data in log B in project A can be processed by the real-time computing program.

[0072] When the task-aware service detects that a project or log pool has been deleted, it will usually trigger a kill operation (also called a shutdown operation) to kill the corresponding executable program to avoid occupying resources (corresponding to the above if there is a deleted target task, close the executable program corresponding to the target task); from the start to the shutdown of the real-time computing program, the task-aware service and the configuration center maintain a long connection state, and the long connection is disconnected after the real-time computing program is closed.

[0073] In addition, the task awareness service can also periodically monitor the running status of the executable program. For example, when the executable program encounters an abnormal situation and stops, it will usually automatically start the task program again (corresponding to the above-mentioned if the executable program exits abnormally, repeat the steps of calling the executable program corresponding to the newly added task to restart the executable program), and then send SMS and email alerts (corresponding to the above-mentioned preset alert method) to notify the developer that the real-time computing program has stopped abnormally (corresponding to the above-mentioned message of the abnormal exit of the executable program sent to the user).

[0074] With the above task execution method, if a task is automatically created in the business, such as creating a project and a log pool in the log service product, the background will automatically start a real-time computing program corresponding to the project and log pool to process the data of the project and log pool. Without human intervention, the automatic management function of automatically started and stopped tasks is realized through the task awareness service.

[0075] In order to verify the above task execution method, the above method has been run on the big data product log service line. The operation status is good and the expected goals have been successfully achieved. Currently, 20 tasks have been managed.

[0076] The embodiment of the present invention also provides a structural diagram of a task execution device, which is arranged on a device running a task monitoring service; Figure 7 As shown, the device includes: a monitoring module 70, used to monitor whether there is a new task; a reading module 71, used to read the task configuration parameters of the new task if there is a new task; a calling module 72, used to call the executable program corresponding to the new task, input the task configuration parameters into the called executable program to start the executable program, and execute the new task through the executable program.

[0077] A task execution device provided by an embodiment of the present invention first monitors whether a new task exists. If so, the task configuration parameters of the new task are read, and then the executable program corresponding to the new task is called, and the task configuration parameters are input into the called executable program to start the executable program, and the new task is executed by the executable program. The device can automatically monitor the new task, and based on the task configuration parameters of the new task automatically read, automatically start the executable program corresponding to the new task, and then execute the new task, without manual intervention, thereby improving the processing efficiency of the relevant data in the new task.

[0078] Furthermore, the device is long-linked to a preset task configuration center; the monitoring module 70 is also used to monitor in real time whether there are task configuration items for newly added tasks in the task configuration center.

[0079] Furthermore, the task configuration parameters of the newly added task and the corresponding executable program of the newly added task are all stored in the task configuration center; the task configuration parameters include the task project name of the newly added task and the log pool name of the newly added task.

[0080] Furthermore, the device is also used to: monitor whether there is a deleted target task; if there is a deleted target task, close the executable program corresponding to the target task.

[0081] Furthermore, the device is also used to: monitor whether there is a target task with the deleted task configuration parameters; if there is a target task with the deleted task configuration parameters, confirm that the target task is deleted.

[0082] Furthermore, the device is also used to: monitor the running status of the executable program; if the executable program exits abnormally, repeat the step of calling the executable program corresponding to the newly added task to restart the executable program.

[0083] Furthermore, the device is also used to send a message of abnormal exit of the executable program to the user in a preset alarm mode.

[0084] The task execution device provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned task execution method embodiment. For the sake of brief description, for matters not mentioned in the task execution device embodiment, reference may be made to the corresponding contents in the aforementioned task execution method embodiment.

[0085] The embodiment of the present invention further provides an electronic device, see Figure 8 As shown, the electronic device includes a processor 130 and a memory 131 , wherein the memory 131 stores machine executable instructions that can be executed by the processor 130 , and the processor 130 executes the machine executable instructions to implement the above-mentioned task execution method.

[0086] Further, Figure 8 The electronic device shown further includes a bus 132 and a communication interface 133 , and the processor 130 , the communication interface 133 and the memory 131 are connected via the bus 132 .

[0087] The memory 131 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 133 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 132 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0088] The processor 130 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 130. The above processor 130 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131 and completes the steps of the method of the above embodiment in combination with its hardware.

[0089] An embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned task execution method. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0090] The computer program product of the task execution method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0091] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. 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 methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0092] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A task execution method, characterized in that: The method is applied to a device running a task monitoring service; the method comprises: Monitor whether there are new tasks; If the newly added task exists, read the task configuration parameters of the newly added task; Calling an executable program corresponding to the newly added task, inputting the task configuration parameters into the called executable program to start the executable program, and executing the newly added task through the executable program; different tasks correspond to different executable programs; The method further comprises: Monitor whether there is a target task to be deleted; If the deleted target task exists, close the executable program corresponding to the target task.

2. The method according to claim 1, characterized in that The device is long-linked to a preset task configuration center; the step of monitoring whether there is a newly added task includes: monitoring in real time whether there is a task configuration item of the newly added task in the task configuration center.

3. The method according to claim 2, characterized in that The task configuration parameters of the newly added task and the corresponding executable program of the newly added task are all stored in the task configuration center; The task configuration parameters include the task item name of the newly added task and the log pool name of the newly added task.

4. The method according to claim 1, characterized in that: The steps for monitoring whether there is a deleted target task include: Monitor whether there is a target task with the deleted task configuration parameters; If there is a target task whose task configuration parameters are to be deleted, it is confirmed that the target task is deleted.

5. The method according to claim 1, characterized in that After inputting the task configuration parameters into the called executable program to start the executable program and executing the newly added task through the executable program, the method further includes: Monitoring the running status of the executable program; If the executable program exits abnormally, the step of calling the executable program corresponding to the newly added task is repeated to restart the executable program.

6. The method according to claim 5, characterized in that After the step of restarting the executable program, the method further comprises: According to the preset alarm method, a message that the executable program exits abnormally is sent to the user.

7. A task execution device, characterized in that: The device is arranged on a device running a task monitoring service; the device comprises: The monitoring module is used to monitor whether there are new tasks; A reading module, used for reading the task configuration parameters of the newly added task if the newly added task exists; A calling module, used to call the executable program corresponding to the newly added task, input the task configuration parameters into the called executable program, so as to start the executable program, and execute the newly added task through the executable program; different tasks correspond to different executable programs; The device is also used for: Monitor whether there is a target task to be deleted; If the deleted target task exists, close the executable program corresponding to the target task.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the task execution method according to any one of claims 1 to 6.

9. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the task execution method described in any one of claims 1-6.