CN112231177A - Task execution method and device and electronic equipment - Google Patents

Task execution method and device and electronic equipment Download PDF

Info

Publication number
CN112231177A
CN112231177A CN202011120988.7A CN202011120988A CN112231177A CN 112231177 A CN112231177 A CN 112231177A CN 202011120988 A CN202011120988 A CN 202011120988A CN 112231177 A CN112231177 A CN 112231177A
Authority
CN
China
Prior art keywords
task
newly added
executable program
exists
configuration parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011120988.7A
Other languages
Chinese (zh)
Inventor
刘彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011120988.7A priority Critical patent/CN112231177A/en
Publication of CN112231177A publication Critical patent/CN112231177A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3017Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is implementing multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The invention provides a task execution method, a device and electronic equipment, which are characterized in that whether a newly added task exists is monitored, if yes, task configuration parameters of the newly added task are read, then an executable program corresponding to the newly added task is called, the task configuration parameters are input into the called executable program to start the executable program, and the newly added task is executed through the executable program. The method can automatically monitor the newly added task, automatically starts the executable program corresponding to the newly added task based on the automatically read task configuration parameters of the newly added task, and then executes the newly added task without manual intervention, thereby improving the processing efficiency of related data in the newly added task.

Description

Task execution method and device and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for task execution, and an electronic device.
Background
In the related technology, after the pre-compiled executable program is generally packed manually, the executable program is submitted to an operating platform in a submission mode of a real-time computing framework, and the executable program is operated through the operating platform.
Disclosure of Invention
The invention aims to provide a task execution method, a task execution device and electronic equipment, so as to improve the processing efficiency of related data in a real-time task.
The invention provides a task execution method, which is applied to equipment running a task monitoring service; the method comprises the following steps: monitoring whether a newly added task exists; if the newly added task exists, reading task configuration parameters of the newly added task; and 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.
Further, the equipment is long-chained with a preset task configuration center; the step of monitoring whether a new task exists includes: and monitoring whether the task configuration item of the newly added task exists in the task configuration center in real time.
Further, the task configuration parameters of the newly added task and the corresponding executable program of the newly added task are stored in the task configuration center; the task configuration parameters comprise the task project name of the newly added task and the log pool name of the newly added task.
Further, the method further comprises: monitoring whether a deleted target task exists; and if the deleted target task exists, closing the executable program corresponding to the target task.
Further, the step of monitoring whether the deleted target task exists includes: monitoring whether a target task with deleted task configuration parameters exists or not; and if the target task with the deleted task configuration parameters exists, confirming that the target task is deleted.
Further, after the step of inputting the task configuration parameters into the called executable program to start the executable program and executing the new task by the executable program, the method further includes: monitoring the running state of the executable program; and if the executable program exits abnormally, repeatedly executing the step of calling the executable program corresponding to the newly added task to restart the executable program.
Further, after the step of restarting the executable program, the method further comprises: and sending the message of abnormal exit of the executable program to a user according to a preset alarm mode.
The invention provides a task execution device, which is arranged on equipment running with task monitoring service; the device comprises: the monitoring module is used for monitoring whether a newly added task exists or not; the reading module is used for reading the task configuration parameters of the newly added task if the newly added task exists; and the calling module is used for calling the executable program corresponding to the newly added task, inputting the task configuration parameters into the called executable program so as to start the executable program, and executing the newly added task through the executable program.
The invention provides an electronic device, which comprises a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to realize the task execution method.
The present invention provides a machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to carry out a method of task execution as described in any one of the above.
The invention provides a task execution method, a device and electronic equipment. The method can automatically monitor the newly added task, automatically starts the executable program corresponding to the newly added task based on the automatically read task configuration parameters of the newly added task, and then executes the newly added task without manual intervention, thereby improving the processing efficiency of related data in the newly added task.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a task deployment manner in the prior art according to an embodiment of the present invention;
fig. 2 is a flowchart of a task execution method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another task execution method provided by an embodiment of the present invention;
FIG. 4 is a flowchart of another task execution method provided by an embodiment of the present invention;
FIG. 5 is a flowchart of another task execution method provided by an embodiment of the present invention;
FIG. 6 is a diagram illustrating a task execution manner according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a task execution device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, in the deployment of real-time tasks, a conventional method is to manually pack pre-compiled executable programs in a submit mode of a real-time computing framework itself, and then submit the packed executable programs to an operating platform, so as to achieve the operation of the real-time tasks according to an expected implementation scheme, wherein the operating platform can be understood as a large data cluster linked by a plurality of servers, in addition, the packed executable programs need to be submitted to a scheduling system through a scheduling technology, and the execution state of the executable programs needs to be started and closed manually through the scheduling system.
As shown in fig. 1, a schematic diagram of a task deployment manner in the prior art takes a Flink or Spark real-time computing framework as an example, a real-time computing program is packaged and then submitted to a big data cluster through a submit submission manner possessed by the Flink or Spark real-time computing framework itself, where the Flink can be understood as a distributed stream data streaming engine; spark can be understood as a fast, general-purpose computing engine designed for large-scale data processing. After a new task exists, the method cannot automatically sense the new task, and can process the related data in the new task through the executable program only by manual intervention, so that the effects of automatically starting and automatically stopping the executable program after sensing the new task cannot be achieved, and the efficiency of processing the related data in the real-time task is reduced.
Based on this, the embodiment of the present invention provides a task execution method, and the technology may be applied to a mobile terminal, a computer, and other devices, and particularly may be applied to a device running a task listening service.
In order to facilitate understanding of the embodiment, a task execution method disclosed in the embodiment of the present invention is first described in detail; the method is applied to equipment running a task monitoring service; the task listening service may be in the form of a task listener, and the task listening service may implement listening through a preset listening mechanism, for example, a watch listening mechanism. As shown in fig. 2, the method comprises the steps of:
step S202, whether a new task exists is monitored.
The newly added task may be understood as a newly created or newly generated task, for example, a new task is created in the journal service product, and the task configuration item of the new task includes a new project and a journal pool, etc.; in actual implementation, the device running the task monitoring service may monitor whether there is a newly created or newly generated task through a preset monitoring mechanism, such as a watch monitoring mechanism.
And step S204, if the newly added task exists, reading task configuration parameters of the newly added task.
The task configuration parameters may be understood as related 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 a name of a newly added task item and a name of a log pool; if a newly created or newly generated task is monitored, it is usually necessary to read the relevant task configuration parameters of the newly created or newly generated task, for example, read the task item name and the log pool name of the newly added task.
Step S206, an executable program corresponding to the newly added task is called, the task configuration parameters are input into the called executable program to start the executable program, and the newly added task is executed through the executable program.
The executable program is typically a binary executable program that can be floatingly located in the operating system memory space; the executable program can be loaded into a memory and loaded and executed by an operating system; in actual implementation, the executable program is usually pre-compiled, and different tasks usually correspond to different executable programs, and after a newly added task is monitored and task configuration parameters of the newly added task are read, the executable program corresponding to the newly added task can be called, and the read task configuration parameters are input into the executable program as start parameters to start the executable program, so that the newly added task can be executed through the executable program, for example, if a new task is created in a log service product, task configuration items of the new task include a new project and a log pool, and data of the project and the log pool can be processed through the executable program.
The task execution method provided by the embodiment of the invention comprises the steps of monitoring whether a newly added task exists or not, reading a task configuration parameter of the newly added task if the newly added task exists, calling an executable program corresponding to the newly added task, inputting the task configuration parameter into the called executable program to start the executable program, and executing the newly added task through the executable program. The method can automatically monitor the newly added task, automatically starts the executable program corresponding to the newly added task based on the automatically read task configuration parameters of the newly added task, and then executes the newly added task without manual intervention, thereby improving the processing efficiency of related data in the newly added task.
The embodiment of the invention also provides another task execution method, which is realized on the basis of the method of the embodiment; the method mainly describes a specific process of monitoring whether a newly added task exists, and in the method, equipment is in long link with a preset task configuration center; the task configuration center can be understood as a basic service component which can uniformly manage various application configurations, such as an etcd configuration center and the like, wherein the etcd can be understood as a distributed consistent key value storage system which is mainly used for shared configuration and service discovery; in practical implementation, long link monitoring can be established between the device running the task monitoring service and a preset task configuration center, for example, the long link monitoring can be established through a watch mechanism, so that the device running the task monitoring service can monitor whether a new task exists in the task configuration center or not.
The task configuration parameters of the newly added task and the corresponding executable program of the newly added task are stored in a task configuration center; the task configuration parameters comprise a task project name of the newly added task and a log pool name of the newly added task; for example, the task item name of the newly added task is item a, and the log pool names of the newly added task are log pool a and log pool B.
In practical implementation, task configuration parameters of a plurality of different tasks are usually stored in a task configuration center, and executable programs corresponding to the plurality of different tasks are usually stored in the task configuration center after being pre-compiled, that is, the task configuration parameters of the newly added task and the corresponding executable programs are stored 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 programs corresponding to the newly added task are called.
As shown in fig. 3, the method comprises the steps of:
step S302, monitoring whether a task configuration item of a newly added task exists in the task configuration center in real time.
The task configuration item may be understood as a configuration item that needs to be included in the configuration management category in the newly added task, and the task configuration item may include a plurality of task configuration items, for example, a new task is created in the log service product, and the task configuration item of the new task may include a project, a log pool, and the like; in actual implementation, since the device running the task monitoring service establishes a long link with the preset task configuration center, whether a task configuration item of a newly added task exists in the task configuration center can be monitored in real time.
And step S304, if the newly added task exists, reading task configuration parameters of the newly added task.
Step S306, 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.
The other task execution method provided by the embodiment of the invention comprises the steps of firstly monitoring whether a task configuration item of a newly added task exists in a task configuration center in real time, and reading task configuration parameters of the newly added task if the newly added task exists; and then 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. The method can automatically monitor the newly added task, automatically starts the executable program corresponding to the newly added task based on the automatically read task configuration parameters of the newly added task, and then executes the newly added task without manual intervention, thereby improving the processing efficiency of related data in the newly added task.
The embodiment of the invention also provides another task execution method, which is realized on the basis of the method of the embodiment; as shown in fig. 4, the method includes the steps of:
step S402, whether a new task exists is monitored.
And step S404, if the newly added task exists, reading task configuration parameters of the newly added task.
Step S406, invoking an executable program corresponding to the newly added task, inputting the task configuration parameter into the invoked executable program to start the executable program, and executing the newly added task through the executable program.
Step S408, whether the deleted target task exists is monitored.
The target task can be understood as a deleted specified task in a plurality of different tasks; for example, if the task configuration parameters of different tasks are stored in the task configuration center, that is, the task configuration center includes a plurality of different tasks, the designated task deleted from the plurality of different tasks is the target task; in practical implementation, the device running the task monitoring service may monitor whether the deleted target task exists, for example, if the device running the task monitoring service establishes a long link with a preset task configuration center, it may monitor whether the deleted target task exists in the task configuration center in real time.
Specifically, the step S408 can be implemented by the following steps one and two:
step one, monitoring whether a target task with deleted task configuration parameters exists.
In actual implementation, because different tasks usually have corresponding task configuration parameters, whether a target task is deleted can be confirmed 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 the device running the task monitoring service establishes a long link with the task configuration center, it may be determined whether the target task is deleted by monitoring whether the target task with the deleted task configuration parameters exists in the task configuration center.
And step two, if the target task with the deleted task configuration parameters exists, the target task is confirmed to be deleted.
If the target task with the deleted task configuration parameters is monitored, the target task can be confirmed to be deleted; for example, if the task configuration parameters of the target task include item a, log pool a, and log pool B, if it is monitored that item a, log pool a, and log pool B are deleted, it can be confirmed that the target task is deleted.
Step S410, if the deleted target task exists, closing the executable program corresponding to the target task.
When it is monitored that a target task is deleted, a closing operation is usually triggered, and the closing operation may also be referred to as a kill operation, so as to close an executable program corresponding to the target task, thereby avoiding occupying resources.
Another task execution method provided in the embodiments of the present invention includes monitoring whether a newly added task exists, reading a task configuration parameter of the newly added task if the newly added task exists, then calling an executable program corresponding to the newly added task, inputting the task configuration parameter into the called executable program to start the executable program, and executing the newly added task through the executable program; and monitoring whether the deleted target task exists, and if so, closing the executable program corresponding to the target task. The method can automatically monitor the newly added task, automatically start the executable program corresponding to the newly added task based on the automatically read task configuration parameters of the newly added task, further execute the newly added task, and automatically close the executable program corresponding to the target task after automatically monitoring the deleted target task without manual intervention, thereby improving the data processing efficiency.
The embodiment of the invention also provides another task execution method, which is realized on the basis of the method of the embodiment; as shown in fig. 5, the method includes the steps of:
step S502, whether a new task exists is monitored.
Step S504, if the newly added task exists, the task configuration parameters of the newly added task are read.
Step S506, an executable program corresponding to the newly added task is called, and the task configuration parameters are input into the called executable program to start the executable program, and the newly added task is executed through the executable program.
Step S508, monitoring the running status of the executable program.
The running state may include normal running of the executable program or abnormal running of the executable program; in actual implementation, after the executable program is started, the device running the task monitoring service can monitor whether the running state of the executable program is normal or not; the running state of the executable program can be monitored according to a preset monitoring frequency, the preset monitoring frequency can be monitored in real time or periodically, and the like, and the setting can be specifically carried out according to the actual requirement, and is not limited herein.
Step S510, if the executable program exits abnormally, the step of calling the executable program corresponding to the newly added task is repeatedly executed to restart the executable program.
In actual implementation, if it is monitored that the executable program runs abnormally, for example, when it is monitored that the executable program exits abnormally, the executable program is pulled up again automatically, which may also be understood as repeatedly calling the executable program corresponding to the newly added task, and the task configuration parameters of the newly added task are input into the repeatedly called executable program to restart the executable program, and the newly added task is executed through the restarted executable program.
Step S512, according to the preset alarm mode, the message of abnormal exit of the executable program is sent to the user.
The preset warning mode may include a mode of sending a short message or sending a mail, and the preset warning mode may be specifically set according to actual requirements, when it is monitored that the executable program abnormally exits, the executable program is usually restarted first, and then a warning is given to the user according to the preset warning mode, such as a mode of sending a short message or sending a mail, to notify the user that the executable program abnormally exits, so as to remind the user to perform corresponding processing on the abnormal situation.
Another task execution method provided in the embodiments of the present invention includes monitoring whether a newly added task exists, reading a task configuration parameter of the newly added task if the newly added task exists, then calling an executable program corresponding to the newly added task, inputting the task configuration parameter into the called executable program to start the executable program, and executing the newly added task through the executable program; and monitoring the running state of the executable program, and if the executable program exits abnormally, repeatedly executing the step of calling the executable program corresponding to the newly added task to restart the executable program. And sending the message of abnormal exit of the executable program to the user according to a preset alarm mode. The method can automatically monitor the newly added task, automatically starts the executable program corresponding to the newly added task based on the automatically read task configuration parameters of the newly added task, and then executes the newly added task without manual intervention, thereby improving the processing efficiency of related data in the newly added task.
To further understand the above embodiments, a schematic diagram of a task execution manner shown in fig. 6 is provided below, in fig. 6, a task aware service (corresponding to the above task listening service, which may also be referred to as a task listener) establishes a long link with a configuration center (corresponding to the above task configuration center) through a watch mechanism, and can listen in real time whether a task configuration item of a newly added task exists in the configuration center, where the configuration center may be an etcd configuration center or the like.
When a new task is generated, that is, a task configuration item of the new task is generated, taking the task configuration item of the new task as an item and a log pool in fig. 6 as an example, where the task item name of the new task is item a, and the log pool name of the new task is log pool a and log pool B, then item a, log pool a and log pool B are stored in a configuration center (task configuration parameters corresponding to the new task are stored in the task configuration center), and a task sensing service can sense the new task, at this time, the task sensing service will read the task item name and the log pool name of the new task from the configuration center, that is, read item a, log pool a and log pool B, and then call a real-time calculation program (corresponding to the executable program) corresponding to the new task compiled in advance, and transfer the read task item name and log pool name as start parameters into an actual calculation program to be called, to start the actual computation program, and the related data operation of the project and the log pool can be processed through the actual computation program; specifically, in a big data cluster, related data in the log a in the item a can be processed through a real-time computing program; and processing the related data in the log B in the item A by a real-time computing program.
When the task awareness service monitors that an item and a log pool are deleted, a kill operation (also referred to as a closing operation) is also usually triggered, and a corresponding executable program kill is dropped so as to avoid occupying resources (corresponding to the executable program corresponding to the target task, if the deleted target task exists, closing the target task); in the whole process from the start to the close of the real-time calculation program, the task sensing service and the configuration center keep a long chain connection state, and after the real-time calculation program is closed, the long chain connection is disconnected.
In addition, the task awareness service may also periodically monitor the running state of the executable program, for example, when the executable program encounters an abnormal condition and stops, the task program is usually automatically pulled up again (corresponding to the above-mentioned step of repeatedly executing the step of calling the executable program corresponding to the newly added task to restart the executable program if the executable program exits abnormally), and then a short message and an email alert (corresponding to the above-mentioned preset alert manner) are sent to notify the developer that the real-time computing program has an abnormal stop condition (corresponding to the above-mentioned message of abnormally exiting the executable program to the user).
According to the task execution method, if a task is automatically created on a business, for example, an item and a log pool are created in a log service product, a background automatically starts a real-time computing program corresponding to the item and the log pool to process data of the item and the log pool, and under the condition of no manual intervention, the task perception service is used for realizing the automatic management function of the automatically started and stopped tasks.
In order to verify the task execution method, the method is operated on a log service line of a big data product, the operation state is good, the expected target is successfully achieved, and the management operation of 20 tasks is achieved at present.
The embodiment of the invention also provides a structural schematic diagram of the task execution device, and the device is arranged on equipment running with the task monitoring service; as shown in fig. 7, the apparatus includes: a monitoring module 70, configured to monitor whether a new task exists; a reading module 71, configured to read a task configuration parameter of a newly added task if the newly added task exists; the calling module 72 is configured to call an executable program corresponding to the newly added task, and input the task configuration parameter into the called executable program to start the executable program, so that the newly added task is executed through the executable program.
The task execution device provided by the embodiment of the invention firstly monitors whether a newly added task exists, if so, reads the task configuration parameter of the newly added task, then calls the executable program corresponding to the newly added task, inputs the task configuration parameter into the called executable program to start the executable program, and executes the newly added task through the executable program. The device can automatically monitor the newly added task, automatically starts the executable program corresponding to the newly added task based on the automatically read task configuration parameters of the newly added task, and then executes the newly added task without manual intervention, thereby improving the processing efficiency of related data in the newly added task.
Further, the equipment is long-chained with a preset task configuration center; the listening module 70 is further configured to: and monitoring whether a task configuration item of a newly added task exists in the task configuration center in real time.
Further, the task configuration parameters of the newly added task and the corresponding executable program of the newly added task are stored in the task configuration center; the task configuration parameters comprise the task project name of the newly added task and the log pool name of the newly added task.
Further, the apparatus is further configured to: monitoring whether a deleted target task exists; and if the deleted target task exists, closing the executable program corresponding to the target task.
Further, the apparatus is further configured to: monitoring whether a target task with deleted task configuration parameters exists or not; and if the target task with the deleted task configuration parameters exists, confirming that the target task is deleted.
Further, the apparatus is further configured to: monitoring the running state of the executable program; and if the executable program exits abnormally, repeatedly executing the step of calling the executable program corresponding to the newly added task to restart the executable program.
Further, the apparatus is further configured to: and sending the message of abnormal exit of the executable program to the user according to a preset alarm mode.
The task execution device provided in the embodiment of the present invention has the same implementation principle and technical effect as those of the task execution method embodiment, and for brief description, reference may be made to corresponding contents in the task execution method embodiment where no mention is made in the task execution device embodiment.
An embodiment of the present invention further provides an electronic device, which is shown in fig. 8, and the electronic device includes a processor 130 and a memory 131, where 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 task execution method.
Further, the electronic device shown in fig. 8 further includes a bus 132 and a communication interface 133, and the processor 130, the communication interface 133, and the memory 131 are connected through the bus 132.
The Memory 131 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system 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, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 132 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 8, but that does not indicate only one bus or one type of bus.
The processor 130 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 130. The Processor 130 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. 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 foregoing embodiment in combination with the hardware thereof.
The embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the task execution method.
The task execution method, the task execution device, and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementations may refer to the method embodiments and are not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that the following embodiments are merely illustrative of the present invention, and not restrictive, and the scope of the present invention is not limited thereto: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A task execution method is characterized in that the method is applied to equipment running a task monitoring service; the method comprises the following steps:
monitoring whether a newly added task exists;
if the newly added task exists, reading task configuration parameters of the newly added task;
and 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.
2. The method of claim 1, wherein the device is long-chained with a preset task configuration center; the step of monitoring whether a new task exists includes: and monitoring whether the task configuration item of the newly added task exists in the task configuration center in real time.
3. The method of claim 2, wherein the task configuration parameters of the newly added task and the corresponding executable program of the newly added task are stored in the task configuration center;
the task configuration parameters comprise the task project name of the newly added task and the log pool name of the newly added task.
4. The method of claim 1, further comprising:
monitoring whether a deleted target task exists;
and if the deleted target task exists, closing the executable program corresponding to the target task.
5. The method of claim 4, wherein the step of listening for the existence of the deleted target task comprises:
monitoring whether a target task with deleted task configuration parameters exists or not;
and if the target task with the deleted task configuration parameters exists, confirming that the target task is deleted.
6. The method of claim 1, wherein the step of entering the task configuration parameters into the called executable program to launch the executable program, wherein the newly added task is executed by the executable program, the method further comprising:
monitoring the running state of the executable program;
and if the executable program exits abnormally, repeatedly executing the step of calling the executable program corresponding to the newly added task to restart the executable program.
7. The method of claim 6, wherein after the step of restarting the executable program, the method further comprises:
and sending the message of abnormal exit of the executable program to a user according to a preset alarm mode.
8. A task execution device is characterized in that the device is arranged on equipment running a task monitoring service; the device comprises:
the monitoring module is used for monitoring whether a newly added task exists or not;
the reading module is used for reading the task configuration parameters of the newly added task if the newly added task exists;
and the calling module is used for calling the executable program corresponding to the newly added task, inputting the task configuration parameters into the called executable program so as to start the executable program, and executing the newly added task through the executable program.
9. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the task execution method of any one of claims 1-7.
10. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to carry out the task execution method of any of claims 1 to 7.
CN202011120988.7A 2020-10-19 2020-10-19 Task execution method and device and electronic equipment Pending CN112231177A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011120988.7A CN112231177A (en) 2020-10-19 2020-10-19 Task execution method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011120988.7A CN112231177A (en) 2020-10-19 2020-10-19 Task execution method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112231177A true CN112231177A (en) 2021-01-15

Family

ID=74118616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011120988.7A Pending CN112231177A (en) 2020-10-19 2020-10-19 Task execution method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112231177A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506213A (en) * 2017-08-30 2017-12-22 深圳市小牛在线互联网信息咨询有限公司 Dynamic Configuration, device, storage medium and computer equipment
CN108647083A (en) * 2018-04-28 2018-10-12 北京京东金融科技控股有限公司 Task executing method, device, system, electronic equipment and computer-readable medium
CN110365751A (en) * 2019-06-26 2019-10-22 口碑(上海)信息技术有限公司 Method for processing business, device and the equipment of gateway system
US20190324797A1 (en) * 2018-04-18 2019-10-24 Alibaba Group Holding Limited Task processing method, apparatus, and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506213A (en) * 2017-08-30 2017-12-22 深圳市小牛在线互联网信息咨询有限公司 Dynamic Configuration, device, storage medium and computer equipment
US20190324797A1 (en) * 2018-04-18 2019-10-24 Alibaba Group Holding Limited Task processing method, apparatus, and system
CN108647083A (en) * 2018-04-28 2018-10-12 北京京东金融科技控股有限公司 Task executing method, device, system, electronic equipment and computer-readable medium
CN110365751A (en) * 2019-06-26 2019-10-22 口碑(上海)信息技术有限公司 Method for processing business, device and the equipment of gateway system

Similar Documents

Publication Publication Date Title
CN108566290B (en) Service configuration management method, system, storage medium and server
WO2017107656A1 (en) Virtualized network element failure self-healing method and device
WO2018019242A1 (en) Self-recovery method and self-recovery system for web server
WO2021121407A1 (en) Capacity changing method and apparatus for virtual machine
CN111130867B (en) Intelligent household equipment alarm method and device based on Internet of things
CN107577527B (en) Task generation and scheduling method and device
CN111865665A (en) Network equipment fault self-healing method and device
CN111949421B (en) SDK calling method, device, electronic equipment and computer readable storage medium
CN111737060A (en) Method and device for processing component exception and electronic equipment
CN112231177A (en) Task execution method and device and electronic equipment
CN111274047A (en) Information processing method, terminal, system, computer device and storage medium
CN112748990A (en) Quartz-based data quality task execution method and device and computer equipment
WO2020037607A1 (en) Data transmission method and apparatus
CN116055291A (en) Method and device for determining abnormal prompt information of node
CN114090268B (en) Container management method and container management system
CN114020356B (en) Method and device for safely closing service
CN111200833A (en) Method and device for determining network element state
CN114490135A (en) Task processing method and device, electronic equipment and storage medium
CN115580522A (en) Method and device for monitoring running state of container cloud platform
CN112860449B (en) Method, system, equipment and medium for preventing restart caused by message overtime
CN114706697A (en) Method, device, equipment, medium and program product for processing message subscription event
CN114064395A (en) Method and device for monitoring health degree of integrated interface, storage medium and electronic equipment
CN114090055A (en) Application program updating method and device, terminal and storage medium
CN112035411A (en) Log alarm method, device and system and electronic equipment
CN113965563A (en) Model-based business processing method and device and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination