Task frequency conversion method, device, electronic equipment, storage medium
Technical field
The present invention relates to computer application technologies more particularly to a kind of task frequency conversion method, device, electronics to set
Standby, storage medium.
Background technique
The offline task scheduling system of big data is the production system of big data underlying platform core, is visualized for workflow
The mass data of exploitation and trustship scheduling O&M is processed offline, supports the comprehensive trustship tune of task according to time and dependence
Degree, support the task of daily ranks up to ten thousand it is accurate according to DAG (Directed Acyclic Graph, directed acyclic graph) relationship,
Punctual operation.
Need the task of management and running up to up to ten thousand in Large-Scale Interconnected net company daily or even hundreds of thousands of magnitudes.Task fortune
Capable trigger condition is generally divided into time trigger, upstream relies on triggering;The operation frequency of task also can on demand scene it is different, example
Such as, the operation frequency of task may include: monthly discharge, all frequency, the day frequency, the hour frequency, even the half an hour frequency, 15
Minute frequency etc..Configuration task upstream and downstream dependence when, the dependence of different frequency has actual demand, as day task rely on
Hour, hour rely on day, day and rely on hour and day etc. simultaneously, this demand often different demander to same configuration all
There are different understanding, trigger condition and purposes, and deepened the complexity of task triggering design significantly, as a result often system is real
Existing support pattern is limited, and scalability is poor.
Current techniques defect is to lack the dependence of the different frequencys, can only do limited spread in Downstream Jobs, do from
The user of service of line task exploitation is for configuring the cause that understands differently realized, being easy to obscure;Downstream Jobs to upstream different frequencies
Secondary combine scenes judge, more scenes will do a patch, task iteration, increasingly heavier.
Summary of the invention
The present invention provides a kind of task frequency conversion method, device, electricity to overcome defect existing for above-mentioned the relevant technologies
Sub- equipment, storage medium, and then one is overcome caused by the limitation and defect due to the relevant technologies at least to a certain extent
Or multiple problems.
According to an aspect of the present invention, a kind of task frequency conversion method is provided, comprising:
Determine the dependence of each task, each task associated task frequency;
In identified dependence, when dependence task and the task frequency for being relied on task are inconsistent, at least portion
Divide the dependence task and be relied on progress task frequency conversion between task, so as to be relied on the task frequency of task and rely on
The task frequency of task is identical.
Optionally, right when dependence task and the task frequency for being relied on task are inconsistent in identified dependence
Each dependence task and be relied between task progress task frequency conversion so that in the dependence each task task
The frequency is identical.
Optionally, the task frequency conversion is triggered and is relied on according to whether the task that is relied on hits pre-determining trigger condition
The execution of task.
Optionally, when being relied on the task frequency of task and being less than the task frequency of dependence task, the pre-determining triggers item
Part includes:
It is relied on task and runs succeeded for the first time and trigger dependence task;
In period indicated by the task frequency of dependence task, this, which is relied on task and all runs succeeded, triggers dependence task;
It is relied on task execution success pre-determined number triggering dependence task.
Optionally, when being relied on the task frequency of task and being greater than the task frequency of dependence task, the pre-determining triggers item
Part includes:
By the period that the task frequency of dependence task indicates, the time for being relied on task execution success or failure, root are determined
It executes or suspends according to identified time trigger dependence task and execute.
Optionally, the pre-determining trigger condition is pre-configured trigger condition from least one and/or at least one is customized
It configures in trigger condition and determines.
Optionally, the task frequency include year the frequency, monthly discharge, all frequencys, the day frequency, the hour frequency, half an hour frequency
It is one or more in secondary, 15 minutes frequencys, the minute frequency.
According to another aspect of the invention, a kind of task frequency conversion equipment is also provided, comprising:
Determining module, for determining the dependence of each task, each task associated task frequency;
Task frequency conversion module is used in identified dependence, dependence task and being relied on task of the task
When the frequency is inconsistent, in at least partly described dependence task and be relied between task progress task frequency conversion so that by according to
Rely the task frequency of task identical as the task frequency of dependence task.
According to another aspect of the invention, a kind of electronic equipment is also provided, the electronic equipment includes: processor;Storage
Medium, is stored thereon with computer program, and the computer program executes step as described above when being run by the processor.
According to another aspect of the invention, a kind of storage medium is also provided, computer journey is stored on the storage medium
Sequence, the computer program execute step as described above when being run by processor.
Compared with prior art, present invention has an advantage that
The step of present invention is converted by the offer task frequency, the judgement triggering by the task frequency and patrolling from task execution
Removing in volume, individually exploitation and the conversion of the design objective frequency, task, which only executes, is responsible for execution, hereby it is achieved that different frequency are appointed
The frequency of being engaged in conversion, not only may be implemented the conversion of high frequency to low frequency, low frequency to high frequency, can also be the customized special frequency, greatly
The flexibility of task configuration is increased greatly.And management and running, the triggering of task can guarantee to complete between same frequency task, right
Whether all will not due to needing do across frequency judgement, the system of greatly reducing is set if being completed etc. in the verification of historical data, task
The complexity of meter.
Detailed description of the invention
Its example embodiment is described in detail by referring to accompanying drawing, above and other feature of the invention and advantage will become
It is more obvious.
Fig. 1 shows the flow chart of task frequency conversion method according to an embodiment of the present invention.
Fig. 2 shows the schematic diagrames of the task frequency conversion method of a specific embodiment according to the present invention.
Fig. 3 shows the schematic diagram of the task frequency conversion method of another specific embodiment according to the present invention.
Fig. 4 shows the schematic diagram of task frequency conversion equipment according to an embodiment of the present invention.
Fig. 5 schematically shows a kind of computer readable storage medium schematic diagram in exemplary embodiment of the present.
Fig. 6 schematically shows a kind of electronic equipment schematic diagram in exemplary embodiment of the present.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot
Structure or characteristic can be incorporated in any suitable manner in one or more embodiments.
In addition, attached drawing is only schematic illustrations of the invention, it is not necessarily drawn to scale.Identical attached drawing mark in figure
Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in the drawings are function
Energy entity, not necessarily must be corresponding with physically or logically independent entity.These function can be realized using software form
Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place
These functional entitys are realized in reason device device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all steps.For example, the step of having
It can also decompose, and the step of having can merge or part merges, therefore, the sequence actually executed is possible to according to the actual situation
Change.
Fig. 1 shows the flow chart of task frequency conversion method according to an embodiment of the present invention.With reference to Fig. 1, the task
Frequency conversion method includes the following steps:
Step S110: the dependence of each task, each task associated task frequency are determined;
Step S120: in identified dependence, when dependence task and the task frequency for being relied on task are inconsistent,
In at least partly described dependence task and it is relied on progress task frequency conversion between task, so as to be relied on the task frequency of task
It is secondary identical as the task frequency of dependence task.
In the task frequency conversion method of exemplary embodiments of the present invention, by providing the step of task frequency conversion
Suddenly, it is removed by the judgement triggering of the task frequency and from the logic of task execution, individually exploitation and the conversion of the design objective frequency, appoint
Business, which only executes, is responsible for execution, hereby it is achieved that the task frequency conversion of different frequency, not only may be implemented high frequency to low frequency, low frequency
To the conversion of high frequency, the customized special frequency can also be, considerably increase the flexibility of task configuration.And the scheduling of task
Management, triggering can guarantee to complete between same frequency task, and whether the verification of historical data, task are completed etc. all will not be by
In needing to do across the frequency judgement, the complexity of system design is greatly reduced.
Specifically, in various embodiments of the present invention, the task frequency include year the frequency, monthly discharge, all frequencys,
It is its frequency, the hour frequency, the half an hour frequency, 15 minutes frequencys, one or more in the minute frequency.The present invention not as
Limit, the half a year frequency, the season frequency or other customized frequencys are all within protection scope of the present invention.The present invention due to the provision of
The step of task frequency is converted, allows system to support any customized frequency, and system flexibility is high.
Specifically, in various embodiments of the present invention, above-mentioned steps S120 can be in identified dependence
In, dependence task and the task frequency for being relied on task it is inconsistent when, to each dependence task and be relied between task into
Row task frequency conversion, so that the task frequency of each task is identical in the dependence.It is appreciated that dependence task with by according to
Rely task the task frequency it is inconsistent when, the dependence task inconsistent to part and be relied between task carry out task frequency
Secondary conversion improves the flexibility of system;To all inconsistent dependence task and it is relied on progress task frequency between task
Secondary conversion improves the system expandability, and reduces the complexity of system design.
Specifically, in various embodiments of the present invention, the task frequency conversion can be basis and be relied on task
Whether pre-determining trigger condition is hit to trigger the execution of dependence task.Hereby it is achieved that trigger condition and task execution are decoupled,
Without realizing the judgement of trigger condition in task.Further, the pre-determining trigger condition is pre-configured touching from least one
Clockwork spring part and/or at least one custom-configure in trigger condition determine.In other words, multiple pre-configuration triggerings can be set in user
Condition, for present dependency dependence task and be relied on task, can be chosen from multiple pre-configuration trigger condition
Pre-determining trigger condition.In further embodiments, user can be directed to the dependence task of present dependency and be relied on and appoint
Business custom-configures trigger condition (such as there are when the custom task frequency in present dependency), thus, it is possible to be selected from
Definition configuration trigger condition is as pre-determining trigger condition.The present invention is not limited thereto, and it will not be described here.
A specific embodiment of the invention is described below with reference to Fig. 2, Fig. 2 shows a specific embodiments according to the present invention
The schematic diagram of task frequency conversion method.Fig. 2 shows dependence task 203 and dependence task 203 be relied on task 201 and by
Dependence task 202.Wherein, the task frequency of dependence task 203 is the day frequency, and the task frequency for being relied on task 201 is day frequency
Secondary, the task frequency for being relied on task 202 is the hour frequency.In the dependence, it is relied on task 202 and dependence task
203 frequency is inconsistent, therefore, executes the conversion of the step S210 task frequency in the task that is relied on 202 and dependence task 203.
In the present embodiment, the task frequency for being relied on task 202 is less than the task frequency of dependence task 203.Therefore, appoint
The pre-determining trigger condition of business frequency conversion may include: to be relied on task and run succeeded for the first time to trigger dependence task;According to
Rely indicated by the task frequency of task in the period, this, which is relied on task and all runs succeeded, triggers dependence task;It is relied on task
The pre-determined number that runs succeeded triggers dependence task.
For example, being run succeeded for the first time for being relied on task triggers dependence task, under actual scene, the hour frequency is appointed
Business for the first time succeed after trigger day task, the task 202 of the hour frequency executes for the first time be 0 point, when 0 point this it is small when the frequency task hold
When going successfully, i.e., executable day frequency task 203 (in the case that in day, frequency task 201 runs succeeded);Frequency when small
Task 202 executes failure at 0 point, then executes by the hour again at 1 point, until the task 202 of this hour frequency runs succeeded, i.e.,
Executable day frequency task 203 (in the case that in day, frequency task 201 runs succeeded).This general applicable data covering of configuration
The hour task of property
For another example in the period indicated by the task frequency for dependence task, this is relied on task and all runs succeeded touching
Send out dependence task, in practical applications, can daily period (24 hours) indicated by frequency task 203, it is interior when 24 is small, it is small
When the frequency task 202 all run succeeded, i.e., executable 203 (the case where frequency task 201 runs succeeded in day of day frequency task
Under).This set is generally applicable in hour task by the scene of data time fragment, i.e. dependence task needs preceding 24 hours each
Hour all succeeds later
In another example for being relied on task execution success pre-determined number triggering dependence task, in practical applications, Ke Yishe
Determine pre-determined number N (N is the integer greater than 1), the task 202 of the hour frequency runs succeeded after n times, i.e., the executable day frequency is appointed
203 (in the case that frequency task 201 runs succeeded in day) of business.Data have all collected neat before this scene is applicable in 0-N hours
Situation.
Above is only schematically to describe multiple embodiments of the invention, pre-determining trigger condition of the invention not with
This is limited, for example, it is also possible to include that setting is relied on task execution not less than n times failure, is relied on task execution odd-times, idol
For several times etc., it will not be described here.
A specific embodiment of the invention is described below with reference to Fig. 3, Fig. 3 shows an another specific implementation according to the present invention
The schematic diagram of the task frequency conversion method of example.What Fig. 3 showed dependence task 303 and dependence task 303 is relied on task 301
With the task that is relied on 302.Wherein, the task frequency of dependence task 303 is the hour frequency, is relied on the task frequency of task 301
For the hour frequency, the task frequency for being relied on task 302 is the day frequency.In the dependence, it is relied on task 302 and relies on
The frequency of task 303 is inconsistent, therefore, executes the step S310 task frequency in the task that is relied on 302 and dependence task 303 and turns
It changes.
In the present embodiment, the task frequency for being relied on task 302 is greater than the task frequency of dependence task 303.Therefore, appoint
The pre-determining trigger condition of business frequency conversion may include: the period indicated by the task frequency of dependence task, determine quilt
Dependence task runs succeeded or the time of failure, and execution is executed or suspended according to identified time trigger dependence task.For example,
In the present embodiment, it is relied on task 302 to run succeeded at 6 points, then dependence task 303 is triggered per hour since 7 points;Or
Person is relied on task 302 and runs succeeded at 6 points, then dependence task 303 triggers per hour from 0 point to 6 points, and stops after 7 points
Only trigger.
It is above only to schematically depict embodiments of the present invention, the present invention is not limited thereto.
The schematic diagram of task frequency conversion equipment according to an embodiment of the present invention is shown referring to Fig. 4, Fig. 4.Using
In each node server of publicly-owned cloud cluster.Task frequency conversion equipment and each module can be by the forms of software and/or hardware
It realizes.The task frequency conversion equipment 400 comprises determining that module 410, task frequency conversion module 420.
Determining module 410 is used to determine the dependence of each task, each task associated task frequency;
Task frequency conversion module 420 is used in identified dependence, and dependence task is appointed with the task that is relied on
When the frequency of being engaged in is inconsistent, in at least partly described dependence task and it is relied on progress task frequency conversion between task, so that by
The task frequency of dependence task and the task frequency of dependence task are identical.
In the task frequency conversion equipment of exemplary embodiments of the present invention, by providing the step of task frequency conversion
Suddenly, it is removed by the judgement triggering of the task frequency and from the logic of task execution, individually exploitation and the conversion of the design objective frequency, appoint
Business, which only executes, is responsible for execution, hereby it is achieved that the task frequency conversion of different frequency, not only may be implemented high frequency to low frequency, low frequency
To the conversion of high frequency, the customized special frequency can also be, considerably increase the flexibility of task configuration.And the scheduling of task
Management, triggering can guarantee to complete between same frequency task, and whether the verification of historical data, task are completed etc. all will not be by
In needing to do across the frequency judgement, the complexity of system design is greatly reduced.
Fig. 4 is only to show schematically task frequency conversion equipment 400 provided by the invention, without prejudice to structure of the present invention
Under the premise of think of, the fractionation of module, increases all within protection scope of the present invention merging.
In an exemplary embodiment of the present invention, a kind of computer readable storage medium is additionally provided, meter is stored thereon with
Calculation machine program, the program may be implemented the task frequency described in any one above-mentioned embodiment and convert when being executed by such as processor
The step of method.In some possible embodiments, various aspects of the invention are also implemented as a kind of program product
Form comprising program code, when described program product is run on the terminal device, said program code is for making the end
End equipment executes described in the above-mentioned task frequency conversion method part of this specification various exemplary embodiment party according to the present invention
The step of formula.
Refering to what is shown in Fig. 5, describing the program product for realizing the above method of embodiment according to the present invention
700, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device,
Such as it is run on PC.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be with
To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or
It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter
Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or
System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive
List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only
Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory
(CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer readable storage medium may include in a base band or the data as the propagation of carrier wave a part are believed
Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism
Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing
Readable medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or
Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet
Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages
Code, described program design language include object oriented program language-Java, C++ etc., further include conventional
Procedural programming language-such as " C " language or similar programming language.Program code can be fully in tenant
It calculates and executes in equipment, partly executed in tenant's equipment, being executed as an independent software package, partially in tenant's calculating
Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far
Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network
(WAN), it is connected to tenant and calculates equipment, or, it may be connected to external computing device (such as utilize ISP
To be connected by internet).
In an exemplary embodiment of the present invention, a kind of electronic equipment is also provided, which may include processor,
And the memory of the executable instruction for storing the processor.Wherein, the processor is configured to via described in execution
Executable instruction is come the step of executing task frequency conversion method described in any one above-mentioned embodiment.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or
Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete
The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here
Referred to as circuit, " module " or " system ".
The electronic equipment 500 of this embodiment according to the present invention is described referring to Fig. 6.The electronics that Fig. 6 is shown
Equipment 500 is only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 500 is showed in the form of universal computing device.The component of electronic equipment 500 can wrap
It includes but is not limited to: at least one processing unit 510, at least one storage unit 520, (including the storage of the different system components of connection
Unit 520 and processing unit 510) bus 530, display unit 540 etc..
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 510
Row, so that the processing unit 510 executes described in the above-mentioned task frequency conversion method part of this specification according to the present invention
The step of various illustrative embodiments.For example, the processing unit 510 can execute step as shown in Figure 1.
The storage unit 520 may include the readable medium of volatile memory cell form, such as random access memory
Unit (RAM) 5201 and/or cache memory unit 5202 can further include read-only memory unit (ROM) 5203.
The storage unit 520 can also include program/practical work with one group of (at least one) program module 5205
Tool 5204, such program module 5205 includes but is not limited to: operating system, one or more application program, other programs
It may include the realization of network environment in module and program data, each of these examples or certain combination.
Bus 530 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage
Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures
Local bus.
Electronic equipment 500 can also be with one or more external equipments 600 (such as keyboard, sensing equipment, bluetooth equipment
Deng) communication, the equipment that also tenant can be enabled interact with the electronic equipment 500 with one or more communicates, and/or with make
Any equipment (such as the router, modulation /demodulation that the electronic equipment 500 can be communicated with one or more of the other calculating equipment
Device etc.) communication.This communication can be carried out by input/output (I/O) interface 550.Also, electronic equipment 500 can be with
By network adapter 560 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network,
Such as internet) communication.Network adapter 560 can be communicated by bus 530 with other modules of electronic equipment 500.It should
Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 500, including but unlimited
In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number
According to backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention
The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server or network equipment etc.) executes the above-mentioned task of embodiment according to the present invention
Frequency conversion method.
Compared with prior art, present invention has an advantage that
The step of present invention is converted by the offer task frequency, the judgement triggering by the task frequency and patrolling from task execution
Removing in volume, individually exploitation and the conversion of the design objective frequency, task, which only executes, is responsible for execution, hereby it is achieved that different frequency are appointed
The frequency of being engaged in conversion, not only may be implemented the conversion of high frequency to low frequency, low frequency to high frequency, can also be the customized special frequency, greatly
The flexibility of task configuration is increased greatly.And management and running, the triggering of task can guarantee to complete between same frequency task, right
Whether all will not due to needing do across frequency judgement, the system of greatly reducing is set if being completed etc. in the verification of historical data, task
The complexity of meter.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by appended
Claim is pointed out.