CN112905321A - Event response type task triggering method and device, electronic equipment and storage medium - Google Patents
Event response type task triggering method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112905321A CN112905321A CN202110168876.7A CN202110168876A CN112905321A CN 112905321 A CN112905321 A CN 112905321A CN 202110168876 A CN202110168876 A CN 202110168876A CN 112905321 A CN112905321 A CN 112905321A
- Authority
- CN
- China
- Prior art keywords
- task
- event
- responsive
- corresponding task
- acquiring
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000004044 response Effects 0.000 title abstract description 16
- 238000012545 processing Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012790 confirmation Methods 0.000 abstract description 7
- 230000008569 process Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 239000013307 optical fiber Substances 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000013589 supplement Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000011112 process operation Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention discloses an event response type task triggering method, an event response type task triggering device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface; executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule; and executing the unprocessed secondary tasks according to the secondary task scheduling relation. According to the event-responsive task triggering method provided by the embodiment of the invention, the task is submitted in an event-responsive active triggering mode, the secondary task depending on the upper level is also based on the event-responsive active triggering, the problems that the program is complex and manual confirmation is needed when the secondary task is repeatedly updated in the prior art are solved, the task is submitted in the event-responsive active triggering mode, the manual operation is reduced, and the user experience is improved.
Description
Technical Field
The present invention relates to task technologies, and in particular, to an event-responsive task triggering method and apparatus, an electronic device, and a storage medium.
Background
The basic principle and the function of the existing open-source big data scheduling system in the market and the customized scheduling system developed by part of companies are that a user creates a workflow (work flow) comprising a plurality of Job (tasks), the workflow is packed and uploaded to a server through the dependency relationship between Job(s) configured by the user, corresponding scheduling trigger time and period are configured, and corresponding work flow is executed according to the dependency relationship of Job configured by the user. The existing technical scheme can only determine the dependency relationship between the jobs according to the upstream and downstream relationship configured by the user in advance. The whole workflow triggering mode is triggered by scheduling triggering time and period timing configured by a user, and once workflow is triggered and executed, the workflow is difficult to execute for the second time.
In the actual application scene of big data, after a user optimizes, upgrades and changes the workflow calculation rule and the code which are already running online, a large amount of manual operation is needed for calculating the historical data according to a new calculation rule, namely rerunning the historical data, all jobs related to the workflow are combed, tasks are submitted again, and the dependency relationship among the tasks needs to be confirmed manually. In addition, workflow of the user is not always a timing and periodic driving scene, and there are also scenes with active event triggering, and existing scheduling schemes and systems of these application scenes cannot be realized.
Disclosure of Invention
The invention provides an event response type task triggering method and device, electronic equipment and a storage medium, which are used for submitting tasks based on an event response type active triggering mode, reducing manual operation and improving user experience.
In a first aspect, an embodiment of the present invention discloses an event-responsive task triggering method, including:
acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface;
executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule;
and executing the unprocessed secondary tasks according to the secondary task scheduling relation.
Optionally, the obtaining an external call interface, and generating a submission command of a corresponding task according to the call interface includes:
acquiring an external calling interface;
acquiring parameter information according to the external calling interface;
and generating a submission command of the corresponding task according to the parameter information.
Optionally, the generating a submission command of the corresponding task according to the parameter information includes:
inquiring whether the corresponding task meets the calling condition or not according to the parameter information;
and if the calling condition is met, reading the preset field of the corresponding task and generating a submitting command.
Optionally, the generating a submission command of the corresponding task according to the parameter information includes:
reading a corresponding task in a database to obtain a preset field;
and generating a submission command of the corresponding task according to the preset field and the configured resource information.
Optionally, the executing the corresponding task according to the submission command and obtaining the secondary task scheduling relationship of the corresponding task according to a preset rule includes:
the corresponding task is executed according to the submitting command;
judging whether the corresponding task is executed successfully;
and if the execution is successful, acquiring the secondary task scheduling relation of the corresponding task according to a preset rule.
Optionally, executing the unprocessed secondary task according to the secondary task scheduling relationship includes:
judging whether a plurality of unprocessed secondary tasks exist at the same time according to the secondary task scheduling relation;
and if the plurality of unprocessed secondary tasks exist simultaneously, processing the plurality of unprocessed secondary tasks simultaneously.
Optionally, if the plurality of unprocessed secondary tasks exist simultaneously, the simultaneously processing the plurality of unprocessed secondary tasks includes:
and if the plurality of the secondary tasks exist simultaneously, acquiring a plurality of external calling interfaces and processing the plurality of unprocessed secondary tasks simultaneously.
In a second aspect, an embodiment of the present invention provides an event-responsive task triggering apparatus, including:
the interface calling module is used for acquiring an external calling interface and generating a submission command of a corresponding task according to the calling interface;
the task obtaining module is used for executing the corresponding task according to the submission command and obtaining a secondary task scheduling relation of the corresponding task according to a preset rule;
and the task processing module is used for executing the unprocessed secondary tasks according to the secondary task scheduling relation.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement an event-responsive task triggering method as in any above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program comprising program instructions, which when executed by a processor, implement any of the event-responsive task triggering methods described above.
The embodiment of the invention discloses an event response type task triggering method, an event response type task triggering device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface; executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule; and executing the unprocessed secondary tasks according to the secondary task scheduling relation. According to the event-responsive task triggering method provided by the embodiment of the invention, the task is submitted in an event-responsive active triggering mode, the secondary task depending on the upper level is also based on the event-responsive active triggering, the problems that the program is complex and manual confirmation is needed when the secondary task is repeatedly updated in the prior art are solved, the task is submitted in the event-responsive active triggering mode, the manual operation is reduced, and the user experience is improved.
Drawings
Fig. 1 is a flowchart of an event-responsive task triggering method according to an embodiment of the present invention;
fig. 2 is a task processing diagram of triggering execution of a workflow based on a business event in an embodiment of the present invention;
fig. 3 is a flowchart of an event-responsive task triggering method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an event-responsive task triggering device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, elements, or the like, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, a first module may be termed a second module, and, similarly, a second module may be termed a first module, without departing from the scope of the present application. The first module and the second module are both modules, but they are not the same module. The terms "first", "second", etc. are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Example one
Fig. 1 is a flowchart of an event-responsive task triggering method according to an embodiment of the present invention, where the event-responsive task triggering method according to the embodiment of the present invention is suitable for a user to dance, and specifically, the event-responsive task triggering method according to the embodiment of the present invention includes:
In this embodiment, the external calling interface is a URL interface, the URL interface provided by the server is actually a WEB service, and the interaction between the two parties can be realized through http calling. Illustratively, in this embodiment, the url structure is as follows:
http://${url_ip}:${port}/api/updateDataStatustaskName=${taskName}&partiti on=${partition}&flag=true
$ url _ ip }: IP information for task scheduling system
$ port }: external access port of task scheduling system
$ taskName }: task name to trigger driving
$ part }: data partition corresponding to the driving task to be triggered
In this embodiment, the generating a submission command for a corresponding task according to the parameter information includes: reading a corresponding task in a database to obtain a preset field; and generating a submission command of the corresponding task according to the preset field and the configured resource information. The step of generating a submission command of the corresponding task according to the parameter information comprises: inquiring whether the corresponding task meets the calling condition or not according to the parameter information; and if the calling condition is met, reading the preset field of the corresponding task and generating a submitting command. After the calling interface is obtained, the system starts to read the cpu \ mem field of the task in the database, and after the resource information configured for the task by the user in advance is obtained, the following task submitting command is generated:
the task execution method comprises the following steps of 1, task-submit-class RunBitMap-master-yard-default-mode cluster-driver-memory 10 g-executive-memory 14 g-num-executors 20-executive-registers 2/home/readcommand/mytmp/taskName. Specifically, the server back end firstly queries a record book corresponding to the instantiated task from the database, checks status fields, determines whether the status fields meet the called precondition, can be called and triggered only when the task is in the wait state or the failure state, and does not execute the task submitting command and returns a calling failure state code at the web front end if the status fields are in the success state, so that the task calling error is reduced, and the effect of improving the system stability is realized.
In this embodiment, specifically, step 100 further includes:
and 101, acquiring an external calling interface.
And 102, acquiring parameter information according to the external calling interface.
And 103, generating a submission command of the corresponding task according to the parameter information.
In this embodiment, the parameter information is parameter information that is transmitted by the web service by analyzing the url, and after the web service calls the url interface, the backend server takes the parameter information to start a series of process operations of task scheduling.
And step 110, executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule.
In this embodiment, after a submission command of the first-level task is generated, the system submits the task to yarn, yarn is a new Hadoop resource manager, which is a universal resource management system and can provide uniform resource management and scheduling for upper-layer applications, the introduction of the Hadoop resource manager brings great benefits to the cluster in the aspects of utilization rate, uniform resource management, data sharing and the like, the task is normally executed on a large data platform, and at this time, the system monitors the execution state of the task in real time. Once execution is successful, the trigger schedule of the initiating secondary task is started. The secondary task scheduling relationship may be set by a user, such as data identity between two tasks or creation time identity, etc.
And step 120, executing the unprocessed secondary task according to the secondary task scheduling relation.
In this embodiment, after the corresponding task is successfully executed, the system may query the database for the secondary task that is not processed by the currently successfully executed task, and after the lower-level task is completed, the system may continue to query the secondary task of the secondary task, and so on, until the secondary task is empty or not, or the status of the secondary task is success. The user can also set the corresponding task to perform self-checking at regular time, thereby realizing the processing of all tasks.
In this embodiment, for example, in the workflow executed based on the triggering of the service event, when the data source meets a certain condition or a certain event occurs, the url is called to perform task driving, and a corresponding instantiated task is executed, so that cyclic idle running of a task period is avoided, and response delay caused by time disjointing between task execution and the event occurrence is avoided. For example, when the data source generates a data packet and immediately starts to execute the calculation task of the data, the url interface may be called to trigger the execution of the task after the data packet generation is finished. And the task does not need to be periodically scanned and executed, cluster resources are wasted if the data packet is not generated by idle running, and data processing is not timely enough.
For example, referring to fig. 2, fig. 2 is a schematic diagram of task processing for executing a workflow based on service event triggering in this embodiment, in fig. 2, when a data packet depended on by an ods _ to _ dwd _ erp _ sa _ fh task arrives, a url of the task driving the ods _ to _ dwd _ erp _ sa _ fh is called, and when the ods _ to _ dwd _ erp _ sa _ fh task is successfully executed, all secondary task states driven by the task are queried:
dwd_to_dws_erp_sa_kh_season,
dwd_to_dws_erp_sa_season,
dwd_to_ads_erp_sa_fh_kh,
dwd_to_ads_erp_sa_fh_kh_ym,
dws_to_ads_erp_sa_kh_score
and if the state of the secondary task meets the requirement of execution, generating a corresponding submission command to start execution, and performing task calling of the ads layer in the same way.
The embodiment of the invention discloses an event response type task triggering method, which comprises the following steps: acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface; executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule; and executing the unprocessed secondary tasks according to the secondary task scheduling relation. According to the event-responsive task triggering method provided by the embodiment of the invention, the task is submitted in an event-responsive active triggering mode, the secondary task depending on the upper level is also based on the event-responsive active triggering, the problems that the program is complex and manual confirmation is needed when the secondary task is repeatedly updated in the prior art are solved, the task is submitted in the event-responsive active triggering mode, the manual operation is reduced, and the user experience is improved.
Example two
Fig. 3 is a flowchart of an event-responsive task triggering method according to an embodiment of the present invention, where the event-responsive task triggering method according to the embodiment of the present invention is suitable for a user to dance, and specifically, the event-responsive task triggering method according to the embodiment of the present invention includes:
and 200, acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface.
And 210, executing the corresponding task according to the submission command.
In this embodiment, when the corresponding task is executed, after the corresponding instantiated task meets the condition of being called to be executed, the system starts to read the cpu \ mem field of the task in the database, and generates a submission command after acquiring resource information configured by the user for the task in advance.
And step 220, judging whether the corresponding task is executed successfully.
In this embodiment, the server back end firstly queries a database for a record corresponding to an instantiated task, checks a status field, determines whether a called precondition is satisfied, can be triggered only when the task is in a wait state or a failure state, and if the task is in a success state, does not execute a task submission command, and returns a call failure status code at the web front end.
And step 230, if the execution is successful, acquiring a secondary task scheduling relation of the corresponding task according to a preset rule.
And 240, judging whether a plurality of unprocessed secondary tasks exist at the same time according to the secondary task scheduling relation.
And step 250, if the plurality of unprocessed secondary tasks exist simultaneously, processing the plurality of unprocessed secondary tasks simultaneously.
In this embodiment, after the triggering and scheduling of the secondary task is started, the system may query the secondary task currently executing the successful task from the database, and determine whether the secondary task is in an unprocessed state, and when the secondary task is in an unprocessed state, process a plurality of unprocessed secondary tasks at the same time. Specifically, if the plurality of external calling interfaces exist simultaneously, the plurality of unprocessed secondary tasks are processed simultaneously by the plurality of external calling interfaces. When the task is successfully executed, the system inquires the subordinate task of the current successfully executed task from the database, see the outputName field, and generates the scheduling url according to the subordinate task, if the task has a plurality of subordinate tasks, a plurality of urls are simultaneously generated, the url starts to perform the scheduling process, and the scheduling process is executed in a circulating mode as shown in step 1 until the outputName of the task is empty or the subordinate task is in a success state and does not meet the execution condition, and the circulating process is terminated.
For example, the method provided in this embodiment may actively supplement and refresh the data result based on the data source change, specifically, in some scenarios, if the data source changes and modifies, a subsequent task depending on the data needs to perform cleaning calculation according to the newly modified data source, so as to implement synchronous update of the task and the data source. Monitoring information such as the size and the modification time of a data source, modifying the states of a first-level task and all secondary tasks depending on the data source in a circulating and recursive mode once the data source file is modified and updated, changing the success state into the wait state, calling a url triggering the first-level task, and enabling all task flows depending on the data source to be executed again and sequentially. Therefore, the purpose of synchronous refreshing of the task and the data source is achieved.
The method provided in this embodiment may further replace the algorithm and the statistical rule to actively supplement and record the result of refreshing the data, specifically, after the algorithm is updated, the corresponding task and the task-driven secondary task state are modified, the success state is changed into the wait state, and then the url of the modified algorithm task is called, so as to update the data calculation rule.
The embodiment of the invention discloses an event response type task triggering method, which comprises the following steps: acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface; executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule; and executing the unprocessed secondary tasks according to the secondary task scheduling relation. According to the event-responsive task triggering method provided by the embodiment of the invention, the task is submitted in an event-responsive active triggering mode, the secondary task depending on the upper level is also based on the event-responsive active triggering, the problems that the program is complex and manual confirmation is needed when the secondary task is repeatedly updated in the prior art are solved, the task is submitted in the event-responsive active triggering mode, the manual operation is reduced, and the user experience is improved.
EXAMPLE III
The event response type task triggering device provided by the embodiment of the invention can implement the event response type based task triggering method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Fig. 4 is a schematic structural diagram of an event-responsive task triggering apparatus 300 according to an embodiment of the present invention. Referring to fig. 4, the event-responsive task triggering apparatus 300 according to the embodiment of the present invention may specifically include:
the interface calling module 310 is configured to obtain an external calling interface, and generate a submission command of a corresponding task according to the calling interface;
the task obtaining module 320 is configured to execute the corresponding task according to the submission command and obtain a secondary task scheduling relationship of the corresponding task according to a preset rule;
and the task processing module 330 is configured to execute the unprocessed secondary task according to the secondary task scheduling relationship.
Further, the acquiring an external call interface and generating a submission command of a corresponding task according to the call interface includes:
acquiring an external calling interface;
acquiring parameter information according to the external calling interface;
and generating a submission command of the corresponding task according to the parameter information.
Further, the generating of the submission command of the corresponding task according to the parameter information includes:
inquiring whether the corresponding task meets the calling condition or not according to the parameter information;
and if the calling condition is met, reading the preset field of the corresponding task and generating a submitting command.
Further, the generating of the submission command of the corresponding task according to the parameter information includes:
reading a corresponding task in a database to obtain a preset field;
and generating a submission command of the corresponding task according to the preset field and the configured resource information.
Further, the executing the corresponding task according to the submission command and obtaining the secondary task scheduling relationship of the corresponding task according to a preset rule includes:
the corresponding task is executed according to the submitting command;
judging whether the corresponding task is executed successfully;
and if the execution is successful, acquiring the secondary task scheduling relation of the corresponding task according to a preset rule.
Further, executing the unprocessed secondary task according to the secondary task scheduling relationship includes:
judging whether a plurality of unprocessed secondary tasks exist at the same time according to the secondary task scheduling relation;
and if the plurality of unprocessed secondary tasks exist simultaneously, processing the plurality of unprocessed secondary tasks simultaneously.
Further, the processing the plurality of unprocessed secondary tasks simultaneously if the plurality of unprocessed secondary tasks exist simultaneously comprises:
and if the plurality of the secondary tasks exist simultaneously, acquiring a plurality of external calling interfaces and processing the plurality of unprocessed secondary tasks simultaneously.
The embodiment of the invention discloses an event response type task triggering device, which comprises: the interface calling module is used for acquiring an external calling interface and generating a submission command of a corresponding task according to the calling interface; the task obtaining module is used for executing the corresponding task according to the submission command and obtaining a secondary task scheduling relation of the corresponding task according to a preset rule; and the task processing module is used for executing the unprocessed secondary tasks according to the secondary task scheduling relation. According to the event-responsive task triggering method provided by the embodiment of the invention, the task is submitted in an event-responsive active triggering mode, the secondary task depending on the upper level is also based on the event-responsive active triggering, the problems that the program is complex and manual confirmation is needed when the secondary task is repeatedly updated in the prior art are solved, the task is submitted in the event-responsive active triggering mode, the manual operation is reduced, and the user experience is improved.
Example four
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 5, the electronic device includes a memory 410 and a processor 420, where the number of the processors 420 in the device may be one or more, and one processor 420 is taken as an example in fig. 5; the memory 410 and the processor 420 in the server may be connected by a bus or other means, and fig. 5 illustrates the connection by the bus as an example.
The memory 410 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the event-responsive task triggering method in the embodiment of the present invention (for example, the interface calling module 310, the task obtaining module 320, the task processing module 330, and the data matching module 340 in the event-responsive task triggering device 300), and the processor 420 executes various functional applications and data processing of the server/terminal/server by running the software programs, instructions, and modules stored in the memory 410, that is, implementing the event-responsive task triggering method described above.
Wherein the processor 420 is configured to run the computer program stored in the memory 410, and implement the following steps:
acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface;
executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule;
and executing the unprocessed secondary tasks according to the secondary task scheduling relation.
In one embodiment, the computer program of the electronic device provided in the embodiment of the present invention is not limited to the above method operations, and may also perform related operations in the event-responsive task triggering method provided in any embodiment of the present invention.
The memory 410 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 410 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 410 may further include memory located remotely from the processor 420, which may be connected to a server/terminal/server through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiment of the invention discloses event response type task triggering electronic equipment, which is used for executing the following method: acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface; executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule; and executing the unprocessed secondary tasks according to the secondary task scheduling relation. According to the event-responsive task triggering method provided by the embodiment of the invention, the task is submitted in an event-responsive active triggering mode, the secondary task depending on the upper level is also based on the event-responsive active triggering, the problems that the program is complex and manual confirmation is needed when the secondary task is repeatedly updated in the prior art are solved, the task is submitted in the event-responsive active triggering mode, the manual operation is reduced, and the user experience is improved.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform an event-responsive task triggering method, the method including:
acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface;
executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule;
and executing the unprocessed secondary tasks according to the secondary task scheduling relation.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in an event-responsive task triggering method provided by any embodiment of the present invention.
The computer-readable storage media of embodiments of the invention may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The embodiment of the invention discloses an event response type task trigger storage medium, which is used for executing the following method: acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface; executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule; and executing the unprocessed secondary tasks according to the secondary task scheduling relation. According to the event-responsive task triggering method provided by the embodiment of the invention, the task is submitted in an event-responsive active triggering mode, the secondary task depending on the upper level is also based on the event-responsive active triggering, the problems that the program is complex and manual confirmation is needed when the secondary task is repeatedly updated in the prior art are solved, the task is submitted in the event-responsive active triggering mode, the manual operation is reduced, and the user experience is improved.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. An event-responsive task triggering method, comprising:
acquiring an external calling interface, and generating a submission command of a corresponding task according to the calling interface;
executing the corresponding task according to the submission command and acquiring a secondary task scheduling relation of the corresponding task according to a preset rule;
and executing the unprocessed secondary tasks according to the secondary task scheduling relation.
2. The event-responsive task triggering method according to claim 1, wherein the acquiring an external call interface and generating a submission command for a corresponding task according to the call interface includes:
acquiring an external calling interface;
acquiring parameter information according to the external calling interface;
and generating a submission command of the corresponding task according to the parameter information.
3. The event-responsive task triggering method of claim 2, wherein the generating of the submission command for the corresponding task based on the parameter information comprises:
inquiring whether the corresponding task meets the calling condition or not according to the parameter information;
and if the calling condition is met, reading the preset field of the corresponding task and generating a submitting command.
4. The event-responsive task triggering method of claim 2, wherein the generating of the submission command for the corresponding task based on the parameter information comprises:
reading a corresponding task in a database to obtain a preset field;
and generating a submission command of the corresponding task according to the preset field and the configured resource information.
5. The event-responsive task triggering method according to claim 1, wherein the executing the corresponding task according to the submission command and obtaining the secondary task scheduling relationship of the corresponding task according to a preset rule comprises:
the corresponding task is executed according to the submitting command;
judging whether the corresponding task is executed successfully;
and if the execution is successful, acquiring the secondary task scheduling relation of the corresponding task according to a preset rule.
6. An event-responsive task triggering method as recited in claim 1, wherein executing the unprocessed secondary task according to the secondary task scheduling relationship comprises:
judging whether a plurality of unprocessed secondary tasks exist at the same time according to the secondary task scheduling relation;
and if the plurality of unprocessed secondary tasks exist simultaneously, processing the plurality of unprocessed secondary tasks simultaneously.
7. An event-responsive task triggering method as recited in claim 6, wherein said concurrently processing the plurality of unprocessed secondary tasks if concurrently present comprises:
and if the plurality of the secondary tasks exist simultaneously, acquiring a plurality of external calling interfaces and processing the plurality of unprocessed secondary tasks simultaneously.
8. An event-responsive task trigger device, comprising:
the interface calling module is used for acquiring an external calling interface and generating a submission command of a corresponding task according to the calling interface;
the task obtaining module is used for executing the corresponding task according to the submission command and obtaining a secondary task scheduling relation of the corresponding task according to a preset rule;
and the task processing module is used for executing the unprocessed secondary tasks according to the secondary task scheduling relation.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement an event-responsive task triggering method as recited in any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, said computer program comprising program instructions, characterized in that the program instructions, when executed by a processor, implement the event-responsive task triggering method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110168876.7A CN112905321A (en) | 2021-02-07 | 2021-02-07 | Event response type task triggering method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110168876.7A CN112905321A (en) | 2021-02-07 | 2021-02-07 | Event response type task triggering method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112905321A true CN112905321A (en) | 2021-06-04 |
Family
ID=76123676
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110168876.7A Pending CN112905321A (en) | 2021-02-07 | 2021-02-07 | Event response type task triggering method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112905321A (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104461502A (en) * | 2014-11-03 | 2015-03-25 | 广州汇讯营销咨询有限公司 | Task management method and system based on Hadoop |
CN106528275A (en) * | 2015-09-10 | 2017-03-22 | 网易(杭州)网络有限公司 | Processing method of data tasks and task scheduler |
US20170178056A1 (en) * | 2015-12-18 | 2017-06-22 | International Business Machines Corporation | Flexible business task flow |
CN107016479A (en) * | 2016-01-28 | 2017-08-04 | 五八同城信息技术有限公司 | Task scheduling and managing method, apparatus and system |
CN110888721A (en) * | 2019-10-15 | 2020-03-17 | 平安科技(深圳)有限公司 | Task scheduling method and related device |
CN110895486A (en) * | 2018-09-12 | 2020-03-20 | 北京奇虎科技有限公司 | Distributed task scheduling system |
CN110895485A (en) * | 2018-09-12 | 2020-03-20 | 北京奇虎科技有限公司 | Task scheduling system |
CN110895487A (en) * | 2018-09-12 | 2020-03-20 | 北京奇虎科技有限公司 | Distributed task scheduling system |
CN110895484A (en) * | 2018-09-12 | 2020-03-20 | 北京奇虎科技有限公司 | Task scheduling method and device |
CN111125444A (en) * | 2019-12-10 | 2020-05-08 | 中国平安财产保险股份有限公司 | Big data task scheduling management method, device, equipment and storage medium |
CN111597028A (en) * | 2020-05-19 | 2020-08-28 | 北京百度网讯科技有限公司 | Method and device for task scheduling |
-
2021
- 2021-02-07 CN CN202110168876.7A patent/CN112905321A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104461502A (en) * | 2014-11-03 | 2015-03-25 | 广州汇讯营销咨询有限公司 | Task management method and system based on Hadoop |
CN106528275A (en) * | 2015-09-10 | 2017-03-22 | 网易(杭州)网络有限公司 | Processing method of data tasks and task scheduler |
US20170178056A1 (en) * | 2015-12-18 | 2017-06-22 | International Business Machines Corporation | Flexible business task flow |
CN107016479A (en) * | 2016-01-28 | 2017-08-04 | 五八同城信息技术有限公司 | Task scheduling and managing method, apparatus and system |
CN110895486A (en) * | 2018-09-12 | 2020-03-20 | 北京奇虎科技有限公司 | Distributed task scheduling system |
CN110895485A (en) * | 2018-09-12 | 2020-03-20 | 北京奇虎科技有限公司 | Task scheduling system |
CN110895487A (en) * | 2018-09-12 | 2020-03-20 | 北京奇虎科技有限公司 | Distributed task scheduling system |
CN110895484A (en) * | 2018-09-12 | 2020-03-20 | 北京奇虎科技有限公司 | Task scheduling method and device |
CN110888721A (en) * | 2019-10-15 | 2020-03-17 | 平安科技(深圳)有限公司 | Task scheduling method and related device |
CN111125444A (en) * | 2019-12-10 | 2020-05-08 | 中国平安财产保险股份有限公司 | Big data task scheduling management method, device, equipment and storage medium |
CN111597028A (en) * | 2020-05-19 | 2020-08-28 | 北京百度网讯科技有限公司 | Method and device for task scheduling |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11188380B2 (en) | Method and apparatus for processing task in smart device | |
CN107729139B (en) | Method and device for concurrently acquiring resources | |
CN111258565B (en) | Method, system, server and storage medium for generating applet | |
US9904585B1 (en) | Error handling in executing workflow state machines | |
US10033816B2 (en) | Workflow service using state transfer | |
US11507419B2 (en) | Method,electronic device and computer program product for scheduling computer resources in a task processing environment | |
US10803413B1 (en) | Workflow service with translator | |
CN110781180B (en) | Data screening method and data screening device | |
CN112579304A (en) | Resource scheduling method, device, equipment and medium based on distributed platform | |
CN114116149A (en) | Task scheduling method, device, equipment and medium | |
CN113127335A (en) | System testing method and device | |
AU2015288125B2 (en) | Control in initiating atomic tasks on a server platform | |
US20210149746A1 (en) | Method, System, Computer Readable Medium, and Device for Scheduling Computational Operation Based on Graph Data | |
CN117076096A (en) | Task flow execution method and device, computer readable medium and electronic equipment | |
CN111752728A (en) | Message transmission method and device | |
CN110750362A (en) | Method and apparatus for analyzing biological information, and storage medium | |
CN112860421A (en) | Method, apparatus and computer program product for job processing | |
CN112905321A (en) | Event response type task triggering method and device, electronic equipment and storage medium | |
CN114003384B (en) | Task management method, device and equipment | |
CN113326172B (en) | Operation and maintenance knowledge processing method, device and equipment | |
CN115268909A (en) | Method, system and terminal for establishing and running construction task at web front end | |
CN111190725B (en) | Task processing method, device, storage medium and server | |
CN113098960A (en) | Service operation method, device, server and storage medium | |
CN113032118A (en) | Asynchronous operation processing method for computer application program and corresponding system | |
CN111400060A (en) | Equipment linkage method, device, server and medium |
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 |