CN108733459A - A kind of method of distributed timing, server and system - Google Patents

A kind of method of distributed timing, server and system Download PDF

Info

Publication number
CN108733459A
CN108733459A CN201710240842.8A CN201710240842A CN108733459A CN 108733459 A CN108733459 A CN 108733459A CN 201710240842 A CN201710240842 A CN 201710240842A CN 108733459 A CN108733459 A CN 108733459A
Authority
CN
China
Prior art keywords
task
lock
node
execution node
current
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.)
Granted
Application number
CN201710240842.8A
Other languages
Chinese (zh)
Other versions
CN108733459B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710240842.8A priority Critical patent/CN108733459B/en
Publication of CN108733459A publication Critical patent/CN108733459A/en
Application granted granted Critical
Publication of CN108733459B publication Critical patent/CN108733459B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/62Establishing a time schedule for servicing the requests
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mathematical Physics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

An embodiment of the present invention provides a kind of method of distributed timing, server and system, the method includes:Determine first object task execution node, in the case where meeting preset condition, determine that the second goal task executes node, preset condition is that target duration is greater than or equal to preset time period, and the task lock release solicited message of first object task execution node transmission is not received in target duration, task lock is sent to the second goal task and executes node, task lock is used to indicate the second goal task and executes node execution current task.It can be seen that, task distribution formula lock service node can determine that delay machine occurs in first object task execution node, then the task immigration on first object task execution node to the second goal task can be executed node by task distribution formula lock service node, it is controlled so as to the global example that executes to current task, improves the efficiency being managed to each task execution node.

Description

A kind of method of distributed timing, server and system
Technical field
The present invention relates to field of communication technology more particularly to a kind of method of distributed timing, server and it is System.
Background technology
The concept of more example timed tasks refers to same timed task can run multiple examples, more example timings simultaneously Task in operation system using especially extensively, such as timing accounting report, timing notice related system processing affairs, periodically from Message is consumed in one queue and does a series of scene of asynchronous background process tasks such as corresponding processing.It is how real in concrete application During example timed task, it will be a prodigious problem to manage these good more example timed tasks, such as a kind of task It maximum simultaneously can execute how many a examples, a task execution time is more than to execute how the period is handled, task abnormity exits How to handle and a kind of task executed on more machines how management and control a series of problems, such as.
Management of the one-of-a-kind system realization to more example timed tasks can be used in the prior art, and one-of-a-kind system includes that agency saves Point, agent node reside background loop and check whether task expires, if task expires, agent node can carry out holding for task One-of-a-kind system can be deployed on multiple machines in a particular application and realize that more examples execute by row.
Delay machine occurs for a machine in the one-of-a-kind system that the prior art is provided, then the task on the machine of delay machine without Method is migrated automatically, although can be deployed to one-of-a-kind system on multiple machines, heavy dependence manually goes realization task Migration, reduces the efficiency of task execution and the efficiency of task immigration, uncontrollable to the execution example case of individual task, pipe Reason is got up relatively difficult.
Invention content
An embodiment of the present invention provides a kind of method for the distributed timing that can realize task Autonomic Migration Framework, server with And system.
First aspect of the embodiment of the present invention provides a kind of method of distributed timing, including:
Determine that first object task execution node, the first object task execution node are to have received appointing for task lock Business executes node, and the task lock is used to indicate the first object task execution node and executes current task;
In the case where meeting preset condition, determine that the second goal task executes node, the first object task execution It is mutually different task execution node that node and second goal task, which execute node, and the preset condition is target duration More than or equal to preset time period, and appointing for the first object task execution node transmission is not received in the target duration Business lock release solicited message, the difference at when target a length of current time and target start time point, the target start time For point to send the time point of the task lock, the task lock release solicited message is used to indicate the first object task execution The current task is completed in node executed;
Task lock is sent to second goal task and executes node, the task lock is used to indicate described second Goal task executes node and executes the current task.
Second aspect of the embodiment of the present invention provides a kind of method of distributed timing, including:
The current task that reception task Distribution Center sends executes temporal information;
Temporal information is executed according to the current task and configures timer, and the timer is used for described as predecessor to executing The initial time of business carries out timing;
It is had timed out if the timer is counted, sending task to task distribution formula lock service node locks solicited message, The task lock solicited message is for asking the task distribution formula lock service node to send task lock, and the task lock is for referring to Show execution current task;
If receiving the task lock, the current task is executed according to task lock.
The third aspect of the embodiment of the present invention provides a kind of server, including:
First determination unit, for determining that first object task execution node, the first object task execution node be The task execution node of task lock is had received, the task lock is used to indicate the first object task execution node execution and works as Preceding task;
Second determination unit, it is described in the case where meeting preset condition, determining that the second goal task executes node It is mutually different task execution node that first object task execution node and second goal task, which execute node, described pre- If condition, which is target duration, is greater than or equal to preset time period, and does not receive the first object task in the target duration Execute the task lock release solicited message that node is sent, the difference at when target a length of current time and target start time point, The target start time point is the time point for sending the task lock, and the task lock release solicited message is used to indicate described The current task is completed in first object task execution node executed;
First transmission unit executes node, the task for task lock to be sent to second goal task Lock is used to indicate second goal task and executes the node execution current task.
Fourth aspect of the embodiment of the present invention provides a kind of server, including:
First receiving unit, the current task for receiving the transmission of task Distribution Center execute temporal information;
Dispensing unit, for according to the current task execute temporal information configure timer, the timer for pair The initial time for executing the current task carries out timing;
First transmission unit, if being had timed out based on timer institute, to task distribution formula lock service node hair Task is sent to lock solicited message, the task lock solicited message is for asking the task distribution formula lock service node to send task Lock, the task lock are used to indicate execution current task;
If second receiving unit executes the current task for receiving the task lock according to task lock.
The 5th aspect of the embodiment of the present invention provides a kind of distributed timing system, including:Configuration center, monitoring center, Task Distribution Center, task distribution formula lock service node and multiple tasks execute node;
The configuration center includes current for sending configuration information to the task Distribution Center, the configuration information Task execution time information and task execution node listing, the task execution node listing include multiple described for executing The task execution node of current task;
The task Distribution Center be used for by the configuration information be sent to task distribution formula lock service node and The multiple task execution node;
The monitoring center be used for the task distribution formula lock service node and the multiple task execution node into Row monitoring;
Task distribution formula lock service node is for executing method shown in first aspect of the embodiment of the present invention, described Business executes node for executing method shown in second aspect of the embodiment of the present invention.
The 6th aspect of the embodiment of the present invention provides a kind of server, including:
One or more processors, memory, bus system and one or more program, the processor and described Memory is connected by the bus system;
Wherein one or more of programs are stored in the memory, and one or more of programs include referring to It enables, described instruction makes the server execute the side as shown in first aspect of the embodiment of the present invention when being executed by the server Method.
The 7th aspect of the embodiment of the present invention provides a kind of server, including:
One or more processors, memory, bus system and one or more program, the processor and described Memory is connected by the bus system;
Wherein one or more of programs are stored in the memory, and one or more of programs include referring to It enables, described instruction makes the server execute the side as shown in second aspect of the embodiment of the present invention when being executed by the server Method.
An embodiment of the present invention provides a kind of method of distributed timing, server and system, the method includes:Really Determine first object task execution node, in the case where meeting preset condition, determines that the second goal task executes node, it is described pre- If condition, which is target duration, is greater than or equal to preset time period, and does not receive the first object task in the target duration The task lock release solicited message that node is sent is executed, task lock is sent to second goal task and executes node, The task lock is used to indicate second goal task and executes the node execution current task.As it can be seen that the task distribution Formula lock service node can determine that delay machine occurs in the first object task execution node, then the task distribution formula lock service section Task immigration on the first object task execution node to second goal task can be executed node by point, so as to The global example that executes of current task is controlled, the efficiency being managed to each task execution node is improved.
Description of the drawings
Fig. 1 is a kind of example structure schematic diagram of distributed timing system provided by the present invention;
Fig. 2 is a kind of example structure schematic diagram of server provided by the present invention;
Fig. 3 is a kind of embodiment step flow chart of the method for distributed timing provided by the present invention;
Fig. 4 is another embodiment step flow chart of the method for distributed timing provided by the present invention;
Fig. 5 is another embodiment step flow chart of the method for distributed timing provided by the present invention;
Fig. 6 is a kind of example structure schematic diagram that task distribution formula provided by the present invention locks service node;
Fig. 7 is a kind of example structure schematic diagram of task execution node provided by the present invention.
Specific implementation mode
Task immigration efficiency can be promoted an embodiment of the present invention provides a kind of and convenient for the side of the distributed timing managed Method, method shown in embodiment, first corresponds to the method shown in the embodiment of the present invention below for a better understanding of the present invention The concrete structure of distributed timing system illustrates:
As shown in Figure 1, distributed timing system shown in the present embodiment includes:
Configuration center 101, monitoring center 102,103 (full name in English of task Distribution Center:Task Distribute Server, English abbreviation:TDS), task distribution formula locks 104 (full name in English of service node:Task Lock Server, English letter Claim:TLS, multiple tasks execute 105 (full name in English of node:Task Exec Agent, English abbreviation:TEA).
The distributed timing system shown in the present embodiment is used to execute the side of distributed timing shown in the present embodiment Method, wherein the distributed timing system, which refers to, the multiple application programs of operation, each application program to be referred to as in the same time One task.
Wherein, task is a logical concept, refers to being completed by software for task or a series of reaches certain jointly The operation of one purpose.
The configuration center 101, the monitoring center 102, the task Distribution Center 103, institute shown in the present embodiment Stating task distribution formula lock service node 104 and the task execution node 105 can be deployed on server.
For example, configuration information corresponding with the configuration center 101 is configured on server, then the server can be The distributed timing system is as the configuration center 101.
For another example, configuration information corresponding with the monitoring center 102 is configured on server, then the server can be The distributed timing system is as the monitoring center 102.
The configuration center 101 and the monitoring center 102 are configurable on not shown in it should be clear that, the present embodiment It on same server, or is configured on identical server, does not limit in the present embodiment specifically.
Likewise, configuration information corresponding with the task Distribution Center 103 can be configured on server, then the service Device can be in the distributed timing system as the task Distribution Center 103.
For another example, configuration information corresponding with task distribution formula lock service node 104 is configured on server, then should Server can lock service node 104 in the distributed timing system as the task distribution formula.
The task Distribution Center 103 shown in it should be clear that, the present embodiment and task distribution formula lock service Node 104 is configurable on a different server, or is configured on identical server, does not limit in the present embodiment specifically It is fixed.
Likewise, configuration information corresponding with the task execution node 105 can be configured on server, then the service Device can be in the distributed timing system as the task execution node 105.
In the present embodiment, the different task execution nodes 105 configures on a different server, so that making It is used to execute the different instances of same task for the different servers of the task execution node 105.
The concrete structure of server shown in the present embodiment is described in detail below:
The concrete structure of server shown in the present embodiment is illustrated below in conjunction with shown in Fig. 2, wherein Fig. 2 is this A kind of example structure schematic diagram of provided server is provided.
The server includes input unit 205, processor 203, output unit 201, communication unit 207, memory 204, the components such as radio circuit 208.
These components are communicated by one or more bus.It will be understood by those skilled in the art that shown in Figure 2 The structure of server does not constitute limitation of the invention, it can also be hub-and-spoke configuration, may be used also either busbar network To include either combining certain components or different components arrangement than illustrating more or fewer components.
The server includes:
Output unit 201, for exporting image to be shown.
Specifically, the output unit 201 includes but not limited to image output unit 2011 and voice output unit 2012.
The image output unit 2011 is used for output character, picture and/or video.The image output unit 2011 can Including display panel, for example, by using liquid crystal display (full name in English:Liquid Crystal Display, English abbreviation: LCD), Organic Light Emitting Diode (full name in English:Organic Light-Emitting Diode, English abbreviation:OLED), field is sent out Penetrate display (full name in English:Field emission display, English abbreviation FED) etc. forms come the display panel that configures. Or the image output unit 2011 may include reflected displaying device, such as electrophoresis-type (electrophoretic) display Device, or utilize interference of light modulation tech (full name in English:Interferometric Modulation of Light) display Device.
The image output unit 2011 may include individual monitor or various sizes of multiple displays.In the present invention Specific implementation mode in, display panel that touch screen also can simultaneously as output unit 201.
For example, after touch screen detects touch or close gesture operation on it, processor 203 is sent to true The type for determining touch event, being followed by subsequent processing device 203, according to the type of touch event to provide corresponding vision on a display panel defeated Go out.Although in fig. 2, input unit 205 and output unit 201 are to realize the input of server as two independent components And output function, but in some embodiments it is possible to it is touch screen is integrated with display panel and realize the defeated of server Enter and output function.For example, the image output unit 2011 can show various Graphic User Interfaces (full name in English: Graphical User Interface, English abbreviation GUI) using as virtual controlling component, including but not limited to window, scrolling Axis, icon and scrapbook, so that user is operated by touch control manner.
In the specific embodiment of the invention, the image output unit 2011 includes filter and amplifier, and being used for will The video filtering and amplification that processor 203 is exported.Voice output unit 2012 includes digital analog converter, is used for handle The audio signal that device 203 is exported is converted to analog format from number format.
Processor 203, for running corresponding code, docking is collected mail to cease and be handled, to generate and export corresponding boundary Face.
Specifically, the processor 203 is the control centre of server, entirely serviced using various interfaces and connection The various pieces of device by running or execute the software program and/or module that are stored in memory, and are called and are stored in Data in reservoir, with the various functions of execute server and/or processing data.The processor 203 can be by integrated circuit (full name in English:Integrated Circuit, English abbreviation:IC it) forms, such as the IC that can be encapsulated by single is formed, It can be formed by connecting the encapsulation IC of more identical functions or different function.
For example, the processor 203 can only include central processing unit (full name in English:Central Processing Unit, English abbreviation:CPU), it can also be graphics processor (full name in English:Graphics Processing Unit, English abbreviation:GPU), digital signal processor (full name in English:Digital Signal Processor, English abbreviation: DSP the combination of the control chip (such as baseband chip)) and in communication unit.In embodiments of the present invention, CPU can be Single operation core can also include multioperation core.
Memory 204, is used for store code and data, and code is run for processor 203.
Specifically, memory 204 can be used for storing software program and module, processor 203 is stored in by operation The software program and module of reservoir 204, the various function application to execute server and realization data processing.Memory 204 include mainly program storage area and data storage area, wherein program storage area can storage program area, at least one function Required application program, such as sound playing program, image playing program etc.;Data storage area can be stored according to server Use created data (such as audio data, phone directory etc.) etc..
In the specific embodiment of the invention, memory 204 may include volatile memory, such as non-volatile dynamic Random access memory (full name in English:Nonvolatile Random Access Memory, English abbreviation NVRAM), phase change Random access memory (full name in English:Phase Change RAM, English abbreviation PRAM), magnetic-resistance random access memory (English Full name:Magetoresistive RAM, English abbreviation MRAM) etc., can also include nonvolatile memory, for example, at least one A disk memory, Electrical Erasable programmable read only memory (full name in English:Electrically Erasable Programmable Read-Only Memory, English abbreviation EEPROM), flush memory device, such as anti-or flash memory (full name in English: NOR flash memory) or anti-and flash memory (full name in English:NAND flash memory).
Nonvolatile storage stores the operating system and application program performed by processor 203.The processor 203 is from institute Nonvolatile storage load operating program is stated to be stored in mass storage to memory and by digital content with data.The behaviour As system include for controlling and managing general system tasks, such as memory management, storage device control, power management etc., with And contribute to the various assemblies communicated between various software and hardwares and/or driver.
In embodiments of the present invention, the operating system can be the android system of Google companies, Apple public affairs This kind of insertion of Windows operating system etc. or Vxworks of the iOS system or Microsoft Corporation exploitation of taking charge of exploitation Formula operating system.
The application program include be mounted on server on any application, including but not limited to browser, Email, Instant message service, word processing, keyboard be virtual, widget (Widget), encryption, digital copyright management, speech recognition, Speech reproduction, positioning (such as the function of being provided by global positioning system), music etc..
Input unit 205, for realizing in the interaction of user and server and/or information input to server.
For example, the input unit 205 can receive number input by user or character information, with generation and user setting Or the related signal input of function control.In the specific embodiment of the invention, input unit 205 can be touch screen, also may be used To be other human-computer interaction interfaces, such as entity enter key, microphone etc., other external information capture devices are can also be, such as Camera etc..
Touch screen shown in the embodiment of the present invention, collectable user touches on it or close operational motion.For example it uses Family using any suitable object or attachment such as finger, stylus on the touchscreen or close to the position of touch screen operational motion, And corresponding attachment device is driven according to preset formula.Optionally, touch screen may include touch detecting apparatus and touch Two parts of controller.Wherein, the touch operation of touch detecting apparatus detection user, and the touch operation detected is converted to Electric signal, and send the electric signal to touch controller;Touch controller receives the electricity from touch detecting apparatus Signal, and it is converted into contact coordinate, then give the processor 203.
The touch controller can also receive the order that processor 203 is sent and execution.In addition, the touch screen can be with Touch screen is realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.
The present invention other embodiment in, entity enter key used by the input unit 205 may include but One be not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating lever etc. Kind is a variety of.The input unit 205 of microphone form can collect the voice of user or environment input and convert thereof into telecommunications Number form, order that processor 203 is executable.
In some other embodiment of the present invention, the input unit 205 can also be various kinds of sensors part, such as Hall device, the physical quantity for detecting server, such as power, torque, pressure, stress, position, displacement, speed, acceleration, Angle, angular speed, revolution, rotating speed and working condition changed time etc. are transformed into electricity to be detected and control. Some other senser elements can also include accrued gravity-feed tank, triaxial accelerometer, gyroscope, electronic compass, ambient light sensing Device, proximity sensor, temperature sensor, humidity sensor, pressure sensor, heart rate sensor, Fingerprint Identification Unit etc..
Communication unit 207 makes server by the communication channel to be connected to remote service for establishing communication channel Device, and from media data under the remote server.The communication unit 207 may include WLAN (full name in English: Wireless Local Area Network, English abbreviation:Wireless LAN) module, bluetooth module, baseband module etc. be logical Believe module and the corresponding radio frequency (full name in English of the communication module:Radio Frequency, English abbreviation:RF) circuit, For carrying out WLAN communication, Bluetooth communication, infrared communication and/or cellular communications system communication, such as broadband Multiple access (the full name in English of code point:Wideband Code Division Multiple Access, English abbreviation:W-CDMA) And/or high-speed downstream packet access (full name in English:High Speed Downlink Packet Access, English abbreviation HSDPA).The communication module is used to control the communication of each component in server, and can support direct memory access.
In the different embodiments of the present invention, the various communication modules in the communication unit 207 are generally with integrated electricity Road chip (full name in English:Integrated Circuit Chip) form occur, and the property of can be chosen combine, without Including all communication modules and corresponding antenna sets.For example, the communication unit 207 can only include baseband chip, radio frequency core Piece and corresponding antenna in a cellular communication system to provide communication function.It is established via the communication unit 207 Wireless communication connection, such as WLAN access or WCDMA accesses, the server can be connected to Cellular Networks, and (English is complete Claim:Cellular Network) or internet.In some optional embodiments of the present invention, in the communication unit 207 Communication module, such as baseband module are desirably integrated into processor 203, typical as high pass (Qualcomm) company provides APQ+MDM series platforms.
Radio circuit 208, for sending and receiving signal in information transmit-receive or communication process.For example, by the downlink of base station After information receives, handled to processor 203;In addition, the data for designing uplink are sent to base station.In general, the radio circuit 208 include the known circuits for executing these functions, including but not limited to antenna system, radio frequency transceiver, one or more Amplifier, tuner, one or more oscillators, digital signal processor, encoding and decoding (Codec) chipset, user identity mould Block (SIM) card, memory etc..In addition, radio circuit 208 can also be communicated with network and other equipment by radio communication.
The wireless communication can use any communication standard or agreement, including but not limited to global system for mobile communications (full name in English:Global System of Mobile communication, English abbreviation:GSM), general grouped wireless takes Business (full name in English:General Packet Radio Service, English abbreviation:GPRS), CDMA (full name in English: Code Division Multiple Access, English abbreviation:CDMA), wideband code division multiple access (full name in English:Wideband Code Division Multiple Access, English abbreviation:WCDMA), high speed uplink downlink packet access technology (English Full name:High Speed Uplink Packet Access, English abbreviation:HSUPA), long term evolution (full name in English:Long Term Evolution, English abbreviation:LTE), Email, short message service (full name in English:Short Messaging Service, English abbreviation:SMS) etc..
Power supply 209, for being powered to the different components of server to maintain its operation.Understand as generality, institute Battery that power supply 209 can be built-in, such as common lithium ion battery, Ni-MH battery etc. are stated, also includes directly to server External power supply of power supply, such as AC adapters etc..In certain embodiments of the present invention, the power supply 209 can also be made more Widely to define, such as can also include power-supply management system, charging system, power failure detection circuit, power supply changeover device Or inverter, power supply status indicator (such as light emitting diode), and it is associated with the generation of the electric energy of server, management and distribution Other any components.
Based on distributed timing system shown in FIG. 1 and server shown in Fig. 2, shown in Fig. 3, to this hair The specific execution flow of the method for distributed timing shown in bright embodiment is described in detail:
Step 301, configuration center configure to generate configuration information current task.
Specifically, developer can realize the configuration to current task by the configuration center.
More specifically, developer can input holding for the current task included by the configuration information to the configuration center Row parameter and current task execute the parameter informations such as temporal information.
Wherein, the execution parameter of the current task is used to indicate how the task execution node 105 executes described work as Preceding task.
The current task execution temporal information is used to indicate each task execution node 105 and executes the current task Time.
The configuration information shown in the present embodiment further includes task execution node listing, the task execution node listing Including multiple task execution nodes for executing the current task.
I.e. the task execution node listing shown in the present embodiment establishes current task and described current for executing The correspondence of the task execution node of task.
It is illustrated below to how to configure the task execution node listing:
The maximum number N1 for executing the required example of current task is determined first;
Determine that the number of the task execution list included by the task execution node listing is N2, even if described to ensure For executing any task execution node delay machine of current task in task execution node listing, this of delay machine can be ensured The example that business executes current task performed on node can migrate, then the task execution node row shown in the present embodiment The number N 2 of task execution list included by table needs to be more than the maximum number N1 for executing the required example of current task, from Even and if so that there is delay machine in any task execution node for executing the current task in the task execution node listing, then Task execution node for executing current task can rapidly will be another in task immigration to the task execution node listing On task execution node, specific tasks transition process ask it is as described below shown in, do not repeat in this step specifically.
It is described in detail below to how task execution node to be configured in the task execution node listing:
Determine that goal task executes node, it is to need to configure the task execution node that the goal task, which executes node, Task execution node in list.
Optionally, it can determine that the goal task executes node by the task Distribution Center;
Specifically, the IP for the server for executing node configured with the goal task can be obtained by the task Distribution Center Address, and the IP address of the server got is sent to the configuration center.
Optionally, request task configuration information can be sent to ask into from task execution node to the task Distribution Center Node is executed for the goal task.
Specifically, the task execution node is to the request task configuration information transmitted by the task Distribution Center In may include the IP address of the task execution node so that the task Distribution Center is by the IP of the server got Location is sent to the configuration center.
After its IP address is sent to the task Distribution Center by the goal task execution node, the goal task Executing node can be registered to the task Distribution Center, and the goal task to succeed in registration is again held by the task Distribution Center The IP address of row node is sent to the configuration center, so that the configuration center can create the task execution node row Table.
It should be clear that, the present embodiment is optional example to the explanation of the establishment mode of the task execution node listing, It does not limit, in a particular application, other modes can also be used and created, for example, directly can be held task by developer The IP address of row node is input to described configuration center etc..
Also it should be clear that, the present embodiment is optional example to the explanation of the content included by the configuration information, no It limits, is distributed as long as each node of distributed timing system shown in the present embodiment can be realized according to the configuration information The execution of the method for formula timing, for example, the configuration information may also include mission script information etc..
The configuration information is sent to the task Distribution Center by step 302, the configuration center.
The configuration information is sent to the task distribution formula and locks service node by step 303, the task Distribution Center.
In the present embodiment, the task Distribution Center is after receiving the configuration information, you can the institute that will be had received It states configuration information and is sent to the task distribution formula lock service node.
Step 304, task distribution formula lock service node check what the task distribution formula lock service node was stored Whether configuration information is synchronous with the task Distribution Center configuration information stored, if it is not, 305 are thened follow the steps, if so, Execute step 306.
In the present embodiment, the task distribution formula locks service node during executing flow shown in the present embodiment, The configuration information stored to task distribution formula lock service node itself is needed to be stored with the task Distribution Center Whether configuration information, which synchronizes, is judged;
If the configuration information that the task distribution formula lock service node itself is stored is deposited with the task Distribution Center The configuration information of storage has synchronized, then the step 306 shown in the present embodiment is directly executed, if task distribution formula locks service node itself The configuration information stored is not synchronous with the task Distribution Center configuration information stored, thens follow the steps 305.
Step 305, task distribution formula lock service node update the configuration information.
In the present embodiment, task distribution formula lock service node itself institute is determined in task distribution formula lock service node In the case that the configuration information of storage is not synchronous with the task Distribution Center configuration information stored, then the task distribution Formula locks service node and obtains the newest configuration information to the task Distribution Center, then so that task distribution formula lock clothes Business node is synchronous with the task Distribution Center.
Step 306, task distribution formula lock service node configuration task lock resource.
It is stored with the task Distribution Center in the configuration information that task distribution formula lock service node is stored In the case that configuration information synchronizes, the step 306 shown in the present embodiment is executed.
In the present embodiment, by it is illustrated above it is found that the configuration information shown in the present embodiment include specify number, In, it is described to specify number the number for being used to indicate the example for executing the current task.
For example, specifying number included by configuration information shown in the present embodiment is 10, then explanation is for executing as predecessor The number of the example of business is 10, i.e., executes the current task by 10 examples.
The task distribution formula lock service node shown in the present embodiment can specify number configuration task lock money according to described Source.
Specifically, the task lock resource shown in the present embodiment includes at least one task lock, and the task The number for locking the task lock included by resource is equal with the number of the example.
Task lock shown in the present embodiment has ensured that an example of the current task only can be in a task execution section Point executes, and an example of the current task has been ensured in the same time using task lock shown in the present embodiment, only can be One task execution node executes.
For example, if the number of the example for executing current task is 10, the task shown in the present embodiment is locked The number of task lock included by resource is 10.
It should be clear that, the present embodiment is optional example to the explanation of the number of the example for executing current task, It does not limit.
The task lock resource includes task instances number atom shown in the present embodiment, and the task instances number atom is used for Task lock included by task lock resource is counted.
In the initial state, i.e., the described task distribution formula lock service saves the task instances number atom shown in the present embodiment In the case that point does not send task lock to the task execution node, then task instances number atom is counted number and the example Number it is equal.
The configuration information is sent to each task execution node by step 307, the task Distribution Center.
Include that current task executes temporal information in the configuration information shown in the present embodiment, the current task is held Illustrating for row temporal information please refer to shown in above-mentioned steps, not repeat in this step specifically.
Specifically, the task Distribution Center shown in the present embodiment determines the task execution node listing, described The configuration information can be sent respectively to each task execution node on the task execution node listing by business Distribution Center.
Step 308, the task execution node are loaded into timer.
Specifically, each task execution node is after getting the current task and executing temporal information, you can according to The current task executes temporal information and configures the timer.
Wherein, the timer is used to carry out timing to the initial time for executing the current task.
If specifically, the timer timing time has arrived, illustrate to work as predecessor performed by the task execution node Business expires, then the task execution node needs to execute the current task.
If the timer timing time does not arrive, illustrate that the current task performed by the task execution node does not arrive Phase, then the task execution node need not execute the current task.
Step 309, the task execution node send task to task distribution formula lock service node and lock solicited message.
It in the present embodiment, is had timed out if the timer is counted, the task execution node can determine described The current task that business executes performed by node expires, and in the present embodiment, needs to execute institute in task execution node determination In the case of stating current task, the task execution node shown in the present embodiment will not directly execute the current task, and It is the step 309 being first carried out shown in the present embodiment.
Wherein, the task lock solicited message is for asking the task distribution formula lock service node to send the task Lock, the task lock are used to indicate the task execution node and execute current task.
As it can be seen that using method shown in the present embodiment, the task execution node is determining the timer then, then needs Service node is locked to the task distribution formula and obtains task lock, if the task execution node does not get the task Lock, then the current task is not carried out in the task execution node, is only had received in the task execution node described Task is locked, and the current task can be just executed.
Step 310, task distribution formula lock service node receive the task and lock solicited message.
Step 311, the task distribution formula lock service node and send task lock to first object task execution node.
Specifically, the task distribution formula lock service node shown in the present embodiment is true according to task lock solicited message Whether the number of the remaining task lock is greater than or equal to 1 in the fixed task lock resource.
It is found that the task instances number atom shown in the present embodiment is based on carrying out task lock shown in above-mentioned steps Number, illustrating please refer to shown in above-mentioned steps, not repeat in this step specifically.
The number that the task instances number atom is counted illustrates to execute the required task execution section of the current task The number of point.
The task distribution formula lock service node shown in the present embodiment is first after receiving the task lock solicited message First determine whether the number that the task instances number atom is counted is greater than or equal to 1, if what the task instances number atom was counted Whether number is greater than or equal to 1, then illustrates that executing the current task also needs at least one task execution node, if described The number that pragmatic number of cases atom is counted is less than 1, then illustrates that executing the current task has not needed task execution node.
In the present embodiment, if the number that the task instances number atom is counted is greater than or equal to 1, i.e., the described task lock money The number of the remaining task lock is greater than or equal to 1 in source, then the task distribution formula lock service node determines first object Task execution node.
The detailed process of the first object task execution node is determined to task distribution formula lock service node below It is described in detail:
Optionally, if task distribution formula lock service node receives the task lock that a task execution node is sent and asks Seek information, then in the case where the number that the task instances number atom is counted is greater than or equal to 1, the task distribution formula lock clothes Business node is that can determine that it is the first object task execution to send the task execution node of the task lock solicited message Node.
Optionally, if task distribution formula lock service node receives the task lock that multiple tasks execution node is sent and asks Information is sought, then the task distribution formula lock service node can create sorted lists.
Wherein, the sorted lists include multiple task execution nodes for having sent the task lock solicited message.
Specifically, the sorted lists are to lock the sequencing of solicited message to multiple described by the task received The list that task execution node is ranked up.
More specifically, the task distribution formula lock service node determines sequence highest priority in the sorted lists Task execution node is the first object task execution node.
Optionally, the task distribution formula lock service node also can determine that a task random in the sorted lists is held Row node is the first object task execution node.
The present embodiment is optional example to the explanation of the concrete mode of the determination first object task execution node, no It limits, as long as the task execution node that the first object task execution node is the transmission task lock solicited message is It can.
The task distribution formula locks service node after determining the first object task execution node, you can to described First object task execution node sends any task lock in the task lock resource.
It should be clear that, the present embodiment is suitable based on the priority for receiving the task lock solicited message to the sorted lists The explanation that sequence is ranked up is optional example, is not limited, in a particular application, the sorted lists may be based on other rows Sequence sequence is ranked up the task execution node, for example, based on remaining memory size of node etc. is executed.
Step 312, task distribution formula lock service node control the task lock included by the task lock resource Number subtract one.
Specifically, the task distribution formula lock service node shown in the present embodiment controls task instances number atom institute The number of meter subtracts one.
As it can be seen that as long as the task distribution formula shown in the present embodiment locks service node to the first object task execution Node sends a task lock, then the task distribution formula lock service node is that the task instances number atom can control to be counted Number subtracts one.
Task lock is sent to the first object task execution node in task distribution formula lock service node Afterwards, there are two types of possible execution flows, one kind is another as shown in step 313 to step 315, such as step 316 to step 317 It is shown.
Task lock is sent to second goal task and held by step 313, task distribution formula lock service node Row node.
Specifically, the lock resource is sent to the first object task execution by the task distribution formula lock service node After node, you can carry out timing to target duration.
More specifically, the task distribution formula lock service node may be configured with timer, and the timer is used for described Target duration carries out timing.
The difference at a length of current time and target start time point when the target, the target start time point are described appoint Business distributed lock service node sends the time point of the task lock.
The task distribution formula lock service node judges that the first object whether is received in the target duration is appointed It is engaged in executing the task lock release solicited message that node is sent, wherein the first object task execution node is described in determining After the completion of first object task execution node executes the strength of corresponding current task, it can lock and take to the task distribution formula The node transmission task of being engaged in locks release solicited message, so that the task distribution formula is locked service node and released according to task lock It puts solicited message and can determine whether out that the strength of corresponding current task is executed completion by the first object task execution node.
In this step, if task distribution formula lock service node is judged in the case of meeting preset condition, it is determined that Second goal task executes node.
Wherein, the preset condition is greater than or equal to preset time period for the timer in the target duration, and in institute It states and does not receive the task lock release solicited message that the first object task execution node is sent in target duration.
Optionally, developer shown in the present embodiment can be directly described pre- to task distribution formula lock service node input The preset time period can be sent to configuration center 101 or the task Distribution Center 103 by setting duration or the developer, tool Body does not limit in the present embodiment, as long as task distribution formula lock service node can get the preset time period i.e. It can.
In the case where meeting the preset condition, then illustrate that the first object task execution node does not have for a long time It executes and completes the current task, then illustrate that delay machine has occurred for the first object task execution node, i.e., the described first object Task execution node can not continue the execution of current task.
The task distribution formula shown in the present embodiment locks service node in the case where determination meets the preset condition, For the normal execution of the current task, it is determined that the second goal task executes node.
By above-mentioned shown it is found that in the task distribution formula lock service node and task distribution shown in the present embodiment The heart, which synchronizes, is configured with the configuration information, i.e., the described task distribution formula lock service node is each equipped with the task Distribution Center The task execution node listing included by the configuration information.
The first object being located in the task execution node listing is determined in task distribution formula lock service node When task execution node delay machine, then the task distribution formula lock service node can determine in the task execution node listing Second goal task executes node.
How the present embodiment in the task execution node listing to determine the second goal task execution node It does not limit, as long as it is mutually different that the first object task execution node and second goal task, which execute node, Business executes node.
Optionally, the task distribution formula lock service node shown in the present embodiment can determine institute according to the sorted lists The second goal task node is stated, illustrating for the sorted lists please refer to shown in above-mentioned steps, specifically in this step not It repeats.
During determining the first object task execution node, the task distribution formula lock service node has determined that It is when the task execution node for going out the highest priority in the sorted lists is the first object task execution node, then described Task distribution formula locks service node can be by the first object task execution knot removal, then in this step, the task point Cloth lock service node can determine that the task execution node of highest priority in the sorted lists is second mesh Mark task execution node.
Specifically, the task distribution formula lock service node shown in the present embodiment is being determined to meet the preset condition In the case of, then the number for controlling the task lock included by the task lock resource adds one.
More specifically, the task distribution formula lock service node shown in the present embodiment locks the task included by resource Any task lock be sent to second goal task and execute node.
Step 314, task distribution formula lock service node control the task lock included by the task lock resource Number subtract one.
In the present embodiment, second target will be given to appoint transmitted by the task in task distribution formula lock service node After business executes node, you can control the number that the task instances number atom is counted and subtract one.
As it can be seen that as long as the task distribution formula lock service node shown in the present embodiment is executed to second goal task Node sends a task lock, then the task distribution formula lock service node is that the task instances number atom can control to be counted Number subtracts one.
Step 315, the second goal task node execute the current task.
In the present embodiment, in the case where second task node receives task lock, then second target Task execution node can execute current task according to the configuration information having received.
Step 316, the first object task execution node send task lock to task distribution formula lock service node Discharge solicited message.
In the present embodiment, the first object task execution node is in the case where receiving the task lock, you can sentences Whether the current task of breaking executes completion.
Optionally, the first object task execution node, can be periodic in the case where receiving the task lock Judge whether the current task executes completion.
If the first object task execution node judges that the current task executes completion, the first object is appointed Business executes node and produces the task lock release solicited message.
The task can be locked release solicited message and be sent to the task point by the first object task execution node Cloth locks service node, so that the task distribution formula locks service node and determines institute according to task lock release solicited message It states first object task execution node and executes the current task completion.
Wherein, status information can be sent to the task by the first object task execution node shown in the present embodiment Distribution Center and monitoring center, it is described as predecessor that the status information is used to indicate the first object task execution node execution The state of business, so that the monitoring center can be believed according to the state that the first object task execution node reports Breath can do the executive condition of corresponding alarm and observation mission.
Step 317, task distribution formula lock service node control the task lock included by the task lock resource Number add one.
Specifically, task distribution formula lock service node shown in the present embodiment is asked receiving the task lock release When seeking information, you can determine that the current task is completed in the first object task execution node executed, then the present embodiment Shown in task distribution formula lock service node control the number that the task instances number atom is counted and add one.
In the present embodiment, the task is locked into release when possessing all task execution nodes for executing the current task When solicited message is sent to the task distribution formula lock service node, then the task distribution formula locks the task of service node The number that instance number atom is counted is equal to the number of the example, and illustrating for the number of the example please refer to above-mentioned steps It is shown, it does not repeat in the present embodiment specifically.
The present embodiment does not limit the application scenarios of method shown in the present embodiment, for example, side shown in the present embodiment Method is adaptable in complicated operation system, for example needs a large amount of batch processing task in backstage, can not be straight on single server It connects the task of completion, have a dependence or multiple tasks is executed between task and goes to seize simultaneously and consume in message queue The timed tasks such as message, business side are being the methods shown in the present embodiment, can cope with these a large amount of more example tasks.
In the application scenarios of method shown in concrete application the present embodiment, it can carry what a task types up to a hundred were stablized Operation either appoints more examples including the relevant business timed task of data of enterprise's point business and BOSS business behind Business transfer and monitoring are accomplished perfectly to solve, and developer only needs the realization for paying close attention to service logic and the quantity to example It is configured, without paying close attention to monitoring and dynamic migration.
Advantageous effect using method shown in the present embodiment is:
It is not mutually isolated to be respectively used to execute shown in the present embodiment between the task execution node of current task, The task distribution formula lock service node can be managed each task execution node, the task distribution formula lock service section Task can be locked the first object task execution node occurred to currently needing to carry out current task execution by point, then first mesh Mark task execution node then carries out the execution of current task, if the task distribution in the case where receiving the task lock Formula lock service node is not received by the task lock that the first object task node is sent more than the preset time period and releases Solicited message is put, then the task distribution formula lock service node can directly determine that the first object task execution node goes out Existing delay machine, then the task distribution formula lock service node can be by the first object task execution node shown in the present embodiment On task can migrate to second goal task and execute node, controlled so as to the global example that executes to current task System, improves the efficiency being managed to each task execution node, and method shown in the present embodiment can be pressed in current task In the case of being executed according to normal cycle, if there is delay machine, timing frequency can be readjusted, ensures that the normal of more examples is held Row, and flexible configuration can be carried out to example quantity, it is more efficient.
Below in conjunction with the tool for the method for executing the distributed timing shown in Fig. 4 to task distribution formula lock service node Body flow is described in detail:
Step 401, task distribution formula lock service node receive the configuration information that task Distribution Center sends.
The configuration information includes that the execution parameter of current task and current task execute the parameter informations such as temporal information, And the configuration information further includes task execution node listing, the task execution node listing includes multiple described for executing The task execution node of current task, the task execution node listing shown in the present embodiment establish current task and Correspondence for the task execution node for executing the current task.
Step 402, task distribution formula lock service node check what the task distribution formula lock service node was stored Whether configuration information is synchronous with the task Distribution Center configuration information stored, if it is not, 403 are thened follow the steps, if so, Execute step 404.
In the present embodiment, the task distribution formula locks service node during executing flow shown in the present embodiment, The configuration information stored to task distribution formula lock service node itself is needed to be stored with the task Distribution Center Whether configuration information, which synchronizes, is judged;
If the configuration information that the task distribution formula lock service node itself is stored is deposited with the task Distribution Center The configuration information of storage has synchronized, then the step 404 shown in the present embodiment is directly executed, if task distribution formula locks service node itself The configuration information stored is not synchronous with the task Distribution Center configuration information stored, thens follow the steps 403.
Step 403, task distribution formula lock service node update the configuration information.
In the present embodiment, task distribution formula lock service node itself institute is determined in task distribution formula lock service node In the case that the configuration information of storage is not synchronous with the task Distribution Center configuration information stored, then the task distribution Formula locks service node and obtains the newest configuration information to the task Distribution Center, then so that task distribution formula lock clothes Business node is synchronous with the task Distribution Center.
Step 404, task distribution formula lock service node configuration task lock resource.
It is stored with the task Distribution Center in the configuration information that task distribution formula lock service node is stored In the case that configuration information synchronizes, the step 404 shown in the present embodiment is executed.
In the present embodiment, by it is illustrated above it is found that the configuration information shown in the present embodiment include specify number, In, it is described to specify number the number for being used to indicate the example for executing the current task.
Specifically, the task lock resource shown in the present embodiment includes at least one task lock, and the task The number for locking the task lock included by resource is equal with the number of the example.
Task lock shown in the present embodiment has ensured that an example of the current task only can be in a task execution section Point executes, and an example of the current task has been ensured in the same time using task lock shown in the present embodiment, only can be One task execution node executes.
The task lock resource includes task instances number atom shown in the present embodiment, and the task instances number atom is used for Task lock included by task lock resource is counted.
In the initial state, i.e., the described task distribution formula lock service saves the task instances number atom shown in the present embodiment In the case that point does not send task lock to the task execution node, then task instances number atom is counted number and the example Number it is equal.
Step 405, task distribution formula lock service node receive task and lock solicited message.
Specifically, each task execution node is after getting the current task and executing temporal information, you can according to The current task executes temporal information and configures the timer.
Wherein, the timer is used to carry out timing to the initial time for executing the current task.
If specifically, the timer timing time has arrived, illustrate to work as predecessor performed by the task execution node Business expires, then the task execution node needs to execute the current task.
If the timer timing time does not arrive, illustrate that the current task performed by the task execution node does not arrive Phase, then the task execution node need not execute the current task.
It in the present embodiment, is had timed out if the timer is counted, the task execution node can determine described The current task that business executes performed by node expires, and in the present embodiment, needs to execute institute in task execution node determination In the case of stating current task, the task execution node shown in the present embodiment will not directly execute the current task, and It is that task lock solicited message is sent to the task distribution formula first to lock service node.
Wherein, the task lock solicited message is for asking the task distribution formula lock service node to send the task Lock, the task lock are used to indicate the task execution node and execute current task.
As it can be seen that using method shown in the present embodiment, the task execution node is determining the timer then, then needs Service node is locked to the task distribution formula and obtains task lock, if the task execution node does not get the task Lock, then the current task is not carried out in the task execution node, is only had received in the task execution node described Task is locked, and the current task can be just executed.
Step 406, task distribution formula lock service node judge the number of remaining task lock in the task lock resource Whether mesh is greater than or equal to 1, if so, 407 are thened follow the steps, if it is not, thening follow the steps 409.
Specifically, the task instances number atom shown in the present embodiment is used to count task lock, illustrate It please refer to shown in above-mentioned steps, not repeat in this step specifically.
The number that the task instances number atom is counted illustrates to execute the required task execution section of the current task The number of point.
The task distribution formula lock service node shown in the present embodiment is first after receiving the task lock solicited message First determine whether the number that the task instances number atom is counted is greater than or equal to 1, if what the task instances number atom was counted Whether number is greater than or equal to 1, then illustrates that executing the current task also needs at least one task execution node, if described The number that pragmatic number of cases atom is counted is less than 1, then illustrates that executing the current task has not needed task execution node.
Step 407, task distribution formula lock service node determine first object task execution node.
The detailed process of the first object task execution node is determined to task distribution formula lock service node below It is described in detail:
Optionally, if task distribution formula lock service node receives the task lock that a task execution node is sent and asks Seek information, then in the case where the number that the task instances number atom is counted is greater than or equal to 1, the task distribution formula lock clothes Business node is that can determine that it is the first object task execution to send the task execution node of the task lock solicited message Node.
Optionally, if task distribution formula lock service node receives the task lock that multiple tasks execution node is sent and asks Information is sought, then the task distribution formula lock service node can create sorted lists.
Wherein, the sorted lists include multiple task execution nodes for having sent the task lock solicited message.
Specifically, the sorted lists are to lock the sequencing of solicited message to multiple described by the task received The list that task execution node is ranked up.
More specifically, the task distribution formula lock service node determines sequence highest priority in the sorted lists Task execution node is the first object task execution node.
Optionally, the task distribution formula lock service node also can determine that a task random in the sorted lists is held Row node is the first object task execution node.
The present embodiment is optional example to the explanation of the concrete mode of the determination first object task execution node, no It limits, as long as the task execution node that the first object task execution node is the transmission task lock solicited message is It can.
Task lock is sent to the first object task execution section by step 408, task distribution formula lock service node Point.
The task distribution formula lock service node shown in the present embodiment indicates the first object by task lock Task execution node can perform the current task.
Step 409, task distribution formula lock service node control the task lock included by the task lock resource Number subtract one.
Specifically, the task distribution formula lock service node shown in the present embodiment controls task instances number atom institute The number of meter subtracts one.
As it can be seen that as long as the task distribution formula shown in the present embodiment locks service node to the first object task execution Node sends a task lock, then the task distribution formula lock service node is that the task instances number atom can control to be counted Number subtracts one.
Step 410, task distribution formula lock service node determine task lock distribution failure.
Specifically, the remaining task lock in task distribution formula lock service node determines the task lock resource In the case that number is less than 1, then the explanation task execution node for executing the current task has been assigned, then without New task execution node need to be called to carry out the execution of current task, then the task distribution formula lock service node determines that task is locked Distribution failure.
Specifically, the case where task can be locked distribution failure by the task distribution formula lock service node, is reported in monitoring The heart.
Step 411, task distribution formula lock service node judge whether to meet preset condition, if so, thening follow the steps 412。
Body, the lock resource is sent to the first object task execution section by the task distribution formula lock service node After point, you can carry out timing to target duration.
More specifically, the task distribution formula lock service node may be configured with timer, and the timer is used for described Target duration carries out timing.
The difference at a length of current time and target start time point when the target, the target start time point are described appoint Business distributed lock service node sends the time point of the task lock.
The task distribution formula lock service node judges that the first object whether is received in the target duration is appointed It is engaged in executing the task lock release solicited message that node is sent, wherein the first object task execution node is described in determining After the completion of first object task execution node executes the strength of corresponding current task, it can lock and take to the task distribution formula The node transmission task of being engaged in locks release solicited message, so that the task distribution formula is locked service node and released according to task lock It puts solicited message and can determine whether out that the strength of corresponding current task is executed completion by the first object task execution node.
Wherein, the preset condition is greater than or equal to preset time period for the timer in the target duration, and in institute It states and does not receive the task lock release solicited message that the first object task execution node is sent in target duration.
Optionally, developer shown in the present embodiment can be directly described pre- to task distribution formula lock service node input The preset time period can be sent to configuration center 101 or the task Distribution Center 103 by setting duration or the developer, tool Body does not limit in the present embodiment, as long as task distribution formula lock service node can get the preset time period i.e. It can.
In the case where meeting the preset condition, then illustrate that the first object task execution node does not have for a long time It executes and completes the current task, then illustrate that delay machine has occurred for the first object task execution node, i.e., the described first object Task execution node can not continue the execution of current task.
Step 412, task distribution formula lock service node determine that second goal task executes node.
The task distribution formula shown in the present embodiment locks service node in the case where determination meets the preset condition, For the normal execution of the current task, it is determined that the second goal task executes node.
By above-mentioned shown it is found that in the task distribution formula lock service node and task distribution shown in the present embodiment The heart, which synchronizes, is configured with the configuration information, i.e., the described task distribution formula lock service node is each equipped with the task Distribution Center The task execution node listing included by the configuration information.
The first object being located in the task execution node listing is determined in task distribution formula lock service node When task execution node delay machine, then the task distribution formula lock service node can determine in the task execution node listing Second goal task executes node.
How the present embodiment in the task execution node listing to determine the second goal task execution node It does not limit, as long as it is mutually different that the first object task execution node and second goal task, which execute node, Business executes node.
Optionally, the task distribution formula lock service node shown in the present embodiment can determine institute according to the sorted lists The second goal task node is stated, illustrating for the sorted lists please refer to shown in above-mentioned steps, specifically in this step not It repeats.
During determining the first object task execution node, the task distribution formula lock service node has determined that It is when the task execution node for going out the highest priority in the sorted lists is the first object task execution node, then described Task distribution formula locks service node can be by the first object task execution knot removal, then in this step, the task point Cloth lock service node can determine that the task execution node of highest priority in the sorted lists is second mesh Mark task execution node.
Step 413, task distribution formula lock service node control the task lock included by the task lock resource Number add one.
Specifically, the task distribution formula lock service node shown in the present embodiment is being determined to meet the preset condition In the case of, then the number for controlling the task lock included by the task lock resource adds one.
Step 414, the task distribution formula lock service node and execute node transmission task lock to second goal task.
The task is locked any institute included by resource by the task distribution formula lock service node shown in the present embodiment It states task lock and is sent to the second goal task execution node.
Step 415, task distribution formula lock service node control the task lock included by the task lock resource Number subtract one.
In the present embodiment, second target will be given to appoint transmitted by the task in task distribution formula lock service node After business executes node, you can control the number that the task instances number atom is counted and subtract one.
As it can be seen that as long as the task distribution formula lock service node shown in the present embodiment is executed to second goal task Node sends a task lock, then the task distribution formula lock service node is that the task instances number atom can control to be counted Number subtracts one.
Step 416, task distribution formula lock service node receive times that the first object task execution node is sent Business lock release solicited message.
In the present embodiment, the first object task execution node is in the case where receiving the task lock, you can sentences Whether the current task of breaking executes completion.
Optionally, the first object task execution node, can be periodic in the case where receiving the task lock Judge whether the current task executes completion.
If the first object task execution node judges that the current task executes completion, the first object is appointed Business executes node and produces the task lock release solicited message.
The task can be locked release solicited message and be sent to the task point by the first object task execution node Cloth locks service node, so that the task distribution formula locks service node and determines institute according to task lock release solicited message It states first object task execution node and executes the current task completion.
Wherein, status information can be sent to the task by the first object task execution node shown in the present embodiment Distribution Center and monitoring center, it is described as predecessor that the status information is used to indicate the first object task execution node execution The state of business, so that the monitoring center can be believed according to the state that the first object task execution node reports Breath can do the executive condition of corresponding alarm and observation mission.
Step 417, task distribution formula lock service node control the task lock included by the task lock resource Number add one.
Specifically, task distribution formula lock service node shown in the present embodiment is asked receiving the task lock release When seeking information, you can determine that the current task is completed in the first object task execution node executed, then the present embodiment Shown in task distribution formula lock service node control the number that the task instances number atom is counted and add one.
In the present embodiment, the task is locked into release when possessing all task execution nodes for executing the current task When solicited message is sent to the task distribution formula lock service node, then the task distribution formula locks the task of service node The number that instance number atom is counted is equal to the number of the example, and illustrating for the number of the example please refer to above-mentioned steps It is shown, it does not repeat in the present embodiment specifically.
Advantageous effect using method shown in the present embodiment is:
It is not mutually isolated to be respectively used to execute shown in the present embodiment between the task execution node of current task, The task distribution formula lock service node can be managed each task execution node, the task distribution formula lock service section Task can be locked the first object task execution node occurred to currently needing to carry out current task execution by point, then first mesh Mark task execution node then carries out the execution of current task, if the task distribution in the case where receiving the task lock Formula lock service node is not received by the task lock that the first object task node is sent more than the preset time period and releases Solicited message is put, then the task distribution formula lock service node can directly determine that the first object task execution node goes out Existing delay machine, then the task distribution formula lock service node can be by the first object task execution node shown in the present embodiment On task can migrate to second goal task and execute node, controlled so as to the global example that executes to current task System, improves the efficiency being managed to each task execution node, and method shown in the present embodiment can be pressed in current task In the case of being executed according to normal cycle, if there is delay machine, timing frequency can be readjusted, ensures that the normal of more examples is held Row, and flexible configuration can be carried out to example quantity, it is more efficient.
Below in conjunction with the method for executing the distributed timing shown in Fig. 5 to the task execution node detailed process into Row is described in detail:
Step 501, task execution node receive the configuration information that task Distribution Center sends.
Wherein, the execution parameter of the current task included by the configuration information and current task execute temporal information etc. Parameter information.
Wherein, the execution parameter of the current task is used to indicate how the task execution node 105 executes described work as Preceding task.
The current task execution temporal information is used to indicate each task execution node 105 and executes the current task Time.
Step 502, task execution node configure timer.
It is configured specifically, the task execution node shown in the present embodiment executes temporal information according to the current task Timer, the timer are used to carry out timing to the initial time for executing the current task.
Specifically, each task execution node is after getting the current task and executing temporal information, you can according to The current task executes temporal information and configures the timer.
Wherein, the timer is used to carry out timing to the initial time for executing the current task.
If specifically, the timer timing time has arrived, illustrate to work as predecessor performed by the task execution node Business expires, then the task execution node needs to execute the current task.
If the timer timing time does not arrive, illustrate that the current task performed by the task execution node does not arrive Phase, then the task execution node need not execute the current task.
Step 503, the task execution node send task to task distribution formula lock service node and lock solicited message.
It is had timed out if the timer is counted, task lock request letter is sent to task distribution formula lock service node Breath, the task lock solicited message for asking the task distribution formula lock service node to send task lock, use by the task lock Current task is executed in instruction.
Step 504, the task execution node judge whether task lock asks success, if so, 505 are thened follow the steps, if It is no, then return to step 502.
In the present embodiment, if the task execution node can receive the task lock, illustrate that the task lock is asked Work(of hoping for success illustrates the task lock request failure if the task execution node can not receive the task lock.
Step 505, the task execution node execute the current task.
If the task execution node receives the task lock, the current task is executed according to task lock.
The detailed process for executing the current task to the task execution node below is described in detail.
Specifically, the task execution node shown in the present embodiment can fork subprocess to carry out the current task It executes.
More specifically, the execution of the current task can be carried out by fork () function.
Fork () function is used to create a new process from an already present process, and new process is known as subprocess, And former process is known as parent process.The subprocess is for executing current task shown in the present embodiment.
The subprocess obtained using fork () function is a duplicate of parent process, it is inherited entirely from parent process The address space of process, including the filec descriptor of process context, code segment, process stacks, memory information, opening, signal Control setting, process priority, process group number, work at present catalogue, root, resource constraint and control terminal etc., and it is sub into Exclusive only its process number of journey, resource use and timer etc..
Step 506, the task execution node judge whether the current task executes completion, if so, thening follow the steps 507。
Step 507, the task execution node send task lock release request to task distribution formula lock service node Information.
Specifically, if the task execution node judges that the current task executed is completed, to the task point Cloth locks service node and sends task lock release solicited message, and the task lock release solicited message is used to indicate described as predecessor Business executed is completed, so that the task distribution formula locks service node and locks the solicited message control task lock according to the task Number add one.
Step 508, the task execution node report status information.
Specifically, the task execution node shown in the present embodiment distributes the state information report to the task Center and the monitoring center.
Status information shown in the present embodiment may be used to indicate the task execution node execution current task and have become Work(.
Each task execution node shown in the present embodiment will not be carried out when receiving the configuration information as predecessor The execution of business, but task lock solicited message is sent to task distribution formula first and locks service node, only described in receiving In the case that task distribution formula locks the task lock that service node is sent, the execution of current task can be just carried out, so that task Distributed lock service node can control the global example that executes of current task, improve and carried out to each task execution node The efficiency of management, and method shown in the present embodiment can be in the case where current task be executed according to normal cycle, if occurring Delay machine can then readjust timing frequency, ensure the normal execution of more examples, and can flexibly be matched to example quantity It sets, it is more efficient.
Shown in Fig. 6, the embodiment of the present invention also provides a kind of server, specifically, it is the present embodiment that Fig. 6, which is provided, Shown in server task distribution formula lock service node concrete structure;
The task distribution formula lock service node of the server shown in the present embodiment is used to execute the side of distributed timing Method, the task distribution formula lock service node of the server shown in the present embodiment execute the specific of the method for the distributed timing Illustrate to refer to shown in above-described embodiment, not repeat in the present embodiment specifically.
The server includes:
Third receiving unit 601, the task execution node listing sent for receiving the task Distribution Center, described It includes multiple for executing the task execution node of the current task, and the task execution section that business, which executes node listing, The number of the task execution node included by point list is more than the number of the task lock included by task lock resource Mesh, the first object task execution node are located in the task execution node listing.
First receiving unit 602, it is described to specify number for referring to for receiving specifying number for task Distribution Center transmission Show the number for the example for executing the current task;
First dispensing unit 603 locks resource for specifying number configuration task according to, and the task lock resource includes At least one task lock, and the number phase of the number and the example of the task lock included by task lock resource Deng.
First determination unit 604, for determining first object task execution node, the first object task execution node To have received the task execution node of task lock, the task lock is used to indicate the first object task execution node and executes Current task;
Optionally, first determination unit 604 includes:
First receiving module 6041, the task for receiving the transmission of task execution node lock solicited message;
First determining module 6042, it is remaining in the task lock resource for being determined according to task lock solicited message Whether the number of the task lock is greater than or equal to 1;
Second determining module 6043, if determining remaining institute in the task lock resource for first determining module The number for stating task lock is greater than or equal to 1, it is determined that the first object task execution node, the first object task execution Node is the task execution node for sending the task lock solicited message;
Sending module 6044, any task lock for locking the task in resource are sent to the first object and appoint Business executes node;
Optionally, first determination unit 604 includes:
Second receiving module 6045, the task lock request letter sent respectively for receiving multiple task execution nodes Breath;
Creation module 6046, for creating sorted lists, the sorted lists include multiple task execution nodes, institute It is to lock the sequencing of solicited message to multiple task execution nodes progress by the task received to state sorted lists The list of sequence;
Third determining module 6047, the task execution node for determining sequence highest priority in the sorted lists For the first object task execution node.
Second dispensing unit 605, the number for controlling the task lock included by the task lock resource subtract one.
Second receiving unit 606 locks release for receiving the task that the first object task execution node is sent Solicited message;
Third dispensing unit 607 is controlled for locking solicited message according to the task included by the task lock resource The number of the task lock adds one.
Second determination unit 608, in the case where meeting preset condition, determining that the second goal task executes node, It is mutually different task execution node, institute that the first object task execution node and second goal task, which execute node, It is that target duration is greater than or equal to preset time period, and does not receive the first object in the target duration to state preset condition The task lock release solicited message that task execution node is sent, when target at a length of current time and target start time point Difference, the target start time point are the time point for sending the task lock, and the task lock release solicited message is used to indicate The current task is completed in the first object task execution node executed;
Second determination unit 608 is additionally operable to, and determines that second target is appointed in the task execution node listing Business executes node, and the first object task execution node and second goal task execute node and be located at the task execution In node listing;
4th dispensing unit 609, in the case where meeting the preset condition, then controlling task lock resource institute Including the task lock number add one;
First transmission unit 610 is sent to the second goal task execution node for locking the task, described Business lock is used to indicate second goal task and executes the node execution current task.
5th dispensing unit 611, the number for controlling the task lock included by the task lock resource subtract one.
The method that the task distribution formula lock service node of the server shown in the present embodiment executes the distributed timing The explanation of advantageous effect please refer to shown in above-described embodiment, do not repeat in the present embodiment specifically.
Shown in Fig. 7, the embodiment of the present invention also provides a kind of server, is specifically the task execution of the server Node, the method that the task execution node of the server is used to execute distributed timing, the server shown in the present embodiment Task execution node execute the illustrating for method of the distributed timing and please refer to shown in above-described embodiment, specifically at this It is not repeated in embodiment.
The server includes:
First receiving unit 701, the current task for receiving the transmission of task Distribution Center execute temporal information;
Dispensing unit 702 configures timer for executing temporal information according to the current task, and the timer is used for Initial time to executing the current task carries out timing;
First transmission unit 703 locks service node if being had timed out based on timer institute to task distribution formula Transmission task locks solicited message, and the task lock solicited message is for asking the task distribution formula lock service node to send task Lock, the task lock are used to indicate execution current task;
If second receiving unit 704 executes described as predecessor for receiving the task lock according to task lock Business.
Judging unit 705, for judging whether the current task executes completion;
Second transmission unit 706, if judging that the current task executed is completed for the judging unit, to institute It states task distribution formula lock service node and sends task lock release solicited message, the task lock release solicited message is used to indicate institute Current task executed completion is stated, so that the task distribution formula locks service node and locks solicited message control institute according to the task The number for stating task lock adds one.
The task execution node shown in the present embodiment executes the explanation of the advantageous effect of the method for the distributed timing It please refer to shown in above-described embodiment, not repeat in the present embodiment specifically.
Based on server shown in Fig. 2, one or more programs are stored in the memory 204, it is one or Multiple programs include instruction, and described instruction makes the server execute as shown in above-described embodiment when being executed by the server Distributed timing method, specific implementation procedure please refer to shown in above-described embodiment, not do in the present embodiment specifically superfluous It states.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Stating embodiment, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these Modification or replacement, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (14)

1. a kind of method of distributed timing, which is characterized in that including:
Determine that first object task execution node, the first object task execution node are that the task that the task that has received is locked is held Row node, the task lock are used to indicate the first object task execution node and execute current task;
In the case where meeting preset condition, determine that the second goal task executes node, the first object task execution node It is mutually different task execution node to execute node with second goal task, and the preset condition is that target duration is more than Or it is equal to preset time period, and do not receive the task that the first object task execution node is sent in the target duration and lock Solicited message, the difference at when target a length of current time and target start time point are discharged, the target start time point is The time point of the task lock is sent, the task lock release solicited message is used to indicate the first object task execution node The current task is completed in executed;
Task lock is sent to second goal task and executes node, the task lock is used to indicate second target Task execution node executes the current task.
2. according to the method described in claim 1, it is characterized in that, before the determining first object task execution node, institute The method of stating further includes:
What reception task Distribution Center sent specifies number, described to specify number the example for being used to indicate and executing the current task Number;
Resource is locked according to the configuration task that specifies number, and task lock resource includes at least one task lock, and institute The number for stating the task lock included by task lock resource is equal with the number of the example.
3. according to the method described in claim 2, it is characterized in that, the determining first object task execution node includes:
It receives the task that task execution node is sent and locks solicited message;
Solicited message, which is locked, according to the task determines whether the number of the remaining task lock in the task lock resource is more than Or it is equal to 1;
If the number of the remaining task lock is greater than or equal to 1 in the task lock resource, it is determined that the first object is appointed Business executes node, and the first object task execution node is the task execution node for sending the task lock solicited message;
The task is locked into any task lock in resource and is sent to the first object task execution node;
The method further includes:
The number for controlling the task lock included by the task lock resource subtracts one.
4. according to the method described in claim 3, it is characterized in that, the determining first object task execution node includes:
Receive the task lock solicited message that multiple task execution nodes are sent respectively;
Sorted lists are created, the sorted lists include multiple task execution nodes, and the sorted lists are by receiving Task lock solicited message sequencing list that multiple task execution nodes are ranked up;
Determine that the task execution node of sequence highest priority in the sorted lists is the first object task execution section Point.
5. according to the method described in claim 2, it is characterized in that, the method further includes:
Receive the task lock release solicited message that the first object task execution node is sent;
The number that the task lock included by the task lock resource is controlled according to task lock solicited message adds one.
6. according to the method described in claim 2, it is characterized in that, before the determining first object task execution node, institute The method of stating further includes:
The task execution node listing that the task Distribution Center sends is received, the task execution node listing includes multiple use In the task execution node for executing the current task, and the task included by the task execution node listing is held The number of row node is more than the number of the task lock included by task lock resource, the first object task execution section Point is located in the task execution node listing.
7. according to the method described in claim 6, it is characterized in that, the method further includes:
In the case where meeting the preset condition, then the number for controlling the task lock included by the task lock resource adds One;
The second goal task of the determination executes node:
Determine that second goal task executes node, the first object task execution in the task execution node listing Node and second goal task execute node and are located in the task execution node listing;
Described lock task is sent to after the second goal task execution node, and the method further includes:
The number for controlling the task lock included by the task lock resource subtracts one.
8. a kind of method of distributed timing, which is characterized in that including:
The current task that reception task Distribution Center sends executes temporal information;
Temporal information is executed according to the current task and configures timer, and the timer is used for executing the current task Initial time carries out timing;
It is had timed out if the timer is counted, sending task to task distribution formula lock service node locks solicited message, described For asking the task distribution formula lock service node to send task lock, the task lock is used to indicate to be held task lock solicited message Row current task;
If receiving the task lock, the current task is executed according to task lock.
9. according to the method described in claim 8, it is characterized in that, it is described according to task lock execute the current task it Afterwards, the method further includes:
Judge whether the current task executes completion;
If judging, the current task executed is completed, and task lock release is sent to task distribution formula lock service node Solicited message, the task lock release solicited message is used to indicate the current task executed and completes, so that the task point The number that cloth lock service node controls the task lock according to task lock solicited message adds one.
10. a kind of server, which is characterized in that including:
First determination unit, for determining that first object task execution node, the first object task execution node are to have connect The task execution node of task lock is received, the task lock is used to indicate the first object task execution node and executes as predecessor Business;
Second determination unit, in the case where meeting preset condition, determine the second goal task execute node, described first It is mutually different task execution node, the default item that goal task, which executes node and second goal task execution node, Part is that target duration is greater than or equal to preset time period, and does not receive the first object task execution in the target duration The task lock release solicited message that node is sent, the difference at when target a length of current time and target start time point are described Target start time point is the time point for sending the task lock, and the task lock release solicited message is used to indicate described first Goal task executes node executed and completes the current task;
First transmission unit executes node for task lock to be sent to second goal task, and the task lock is used Node, which is executed, in instruction second goal task executes the current task.
11. a kind of server, which is characterized in that including:
First receiving unit, the current task for receiving the transmission of task Distribution Center execute temporal information;
Dispensing unit configures timer for executing temporal information according to the current task, and the timer is used for executing The initial time of the current task carries out timing;
First transmission unit sends to task distribution formula lock service node and appoints if being had timed out based on timer institute Business lock solicited message, the task lock solicited message is for asking the task distribution formula lock service node to send task lock, institute It states task lock and is used to indicate execution current task;
If second receiving unit executes the current task for receiving the task lock according to task lock.
12. a kind of distributed timing system, which is characterized in that including:Configuration center, monitoring center, task Distribution Center, task Distributed lock service node and multiple tasks execute node;
For the configuration center for sending configuration information to the task Distribution Center, the configuration information includes current task Temporal information and task execution node listing are executed, the task execution node listing includes multiple described current for executing The task execution node of task;
The task Distribution Center is used to the configuration information being sent to task distribution formula lock service node and described Multiple tasks execute node;
The monitoring center is used to lock service node to the task distribution formula and the multiple task execution node is supervised Control;
The task distribution formula lock service node divides for executing as described in shown in claim 1 to any one of claim 7 The method of cloth timing, the task execution node is for executing the distributed timing as shown in claim 8 or claim 9 Method.
13. a kind of server, which is characterized in that including:
One or more processors, memory, bus system and one or more programs, the processor and the storage Device is connected by the bus system;
Wherein one or more of programs are stored in the memory, and one or more of programs include instruction, institute State instruction makes the server execute such as claim 1 to claim 7 any one of them when being executed by the server Method.
14. a kind of server, which is characterized in that including:
One or more processors, memory, bus system and one or more programs, the processor and the storage Device is connected by the bus system;
Wherein one or more of programs are stored in the memory, and one or more of programs include instruction, institute State instruction makes the server execute method as claimed in claim 8 or claim 9 when being executed by the server.
CN201710240842.8A 2017-04-13 2017-04-13 Distributed timing method, server and system Active CN108733459B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710240842.8A CN108733459B (en) 2017-04-13 2017-04-13 Distributed timing method, server and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710240842.8A CN108733459B (en) 2017-04-13 2017-04-13 Distributed timing method, server and system

Publications (2)

Publication Number Publication Date
CN108733459A true CN108733459A (en) 2018-11-02
CN108733459B CN108733459B (en) 2023-07-14

Family

ID=63925057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710240842.8A Active CN108733459B (en) 2017-04-13 2017-04-13 Distributed timing method, server and system

Country Status (1)

Country Link
CN (1) CN108733459B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558234A (en) * 2018-11-30 2019-04-02 中国联合网络通信集团有限公司 A kind of timed task dispatching method and device
CN110134505A (en) * 2019-05-15 2019-08-16 湖南麒麟信安科技有限公司 A kind of distributed computing method of group system, system and medium
CN111027196A (en) * 2019-12-03 2020-04-17 南方电网科学研究院有限责任公司 Simulation analysis task processing method and device for power equipment and storage medium
CN112148445A (en) * 2020-09-09 2020-12-29 倍智智能数据运营有限公司 Distributed task scheduling method based on big data technology
CN112414473A (en) * 2020-12-04 2021-02-26 合肥科博软件技术有限公司 Method and system for performing point inspection on equipment
CN112596915A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Distributed lock scheduling method, device, equipment and medium
CN112598529A (en) * 2020-12-15 2021-04-02 泰康保险集团股份有限公司 Data processing method and device, computer readable storage medium and electronic equipment
CN114221863A (en) * 2022-02-22 2022-03-22 湖南云畅网络科技有限公司 Intelligent node election method for distributed cluster
CN114257591A (en) * 2021-12-16 2022-03-29 富盛科技股份有限公司 Networking method and system for weak centralized distributed system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050209804A1 (en) * 2004-03-17 2005-09-22 International Business Machines Corporation Method and system for maintaining and examining timers for network connections
CN102521044A (en) * 2011-12-30 2012-06-27 北京拓明科技有限公司 Distributed task scheduling method and system based on messaging middleware
CN103744724A (en) * 2014-02-19 2014-04-23 互联网域名系统北京市工程研究中心有限公司 Timed task clustering method and device thereof
CN103761148A (en) * 2014-01-26 2014-04-30 北京京东尚科信息技术有限公司 Control method for cluster timing scheduling tasks
CN105100259A (en) * 2015-08-18 2015-11-25 北京京东尚科信息技术有限公司 Distributed timed task execution method and system
CN105677468A (en) * 2016-01-06 2016-06-15 北京京东尚科信息技术有限公司 Cache and designing method thereof and scheduling method and scheduling device using cache
CN105700937A (en) * 2016-01-04 2016-06-22 北京百度网讯科技有限公司 Multi-thread task processing method and device
CN106126332A (en) * 2016-06-27 2016-11-16 北京京东尚科信息技术有限公司 Distributed timing task scheduling system and method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050209804A1 (en) * 2004-03-17 2005-09-22 International Business Machines Corporation Method and system for maintaining and examining timers for network connections
CN102521044A (en) * 2011-12-30 2012-06-27 北京拓明科技有限公司 Distributed task scheduling method and system based on messaging middleware
CN103761148A (en) * 2014-01-26 2014-04-30 北京京东尚科信息技术有限公司 Control method for cluster timing scheduling tasks
CN103744724A (en) * 2014-02-19 2014-04-23 互联网域名系统北京市工程研究中心有限公司 Timed task clustering method and device thereof
CN105100259A (en) * 2015-08-18 2015-11-25 北京京东尚科信息技术有限公司 Distributed timed task execution method and system
CN105700937A (en) * 2016-01-04 2016-06-22 北京百度网讯科技有限公司 Multi-thread task processing method and device
CN105677468A (en) * 2016-01-06 2016-06-15 北京京东尚科信息技术有限公司 Cache and designing method thereof and scheduling method and scheduling device using cache
CN106126332A (en) * 2016-06-27 2016-11-16 北京京东尚科信息技术有限公司 Distributed timing task scheduling system and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
郝卫东等: "《云计算及其实践教程》", 31 July 2014, pages: 140 - 142 *
陈士玉: "合作网站数据资源接入系统的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, pages 138 - 474 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558234A (en) * 2018-11-30 2019-04-02 中国联合网络通信集团有限公司 A kind of timed task dispatching method and device
CN110134505A (en) * 2019-05-15 2019-08-16 湖南麒麟信安科技有限公司 A kind of distributed computing method of group system, system and medium
CN111027196A (en) * 2019-12-03 2020-04-17 南方电网科学研究院有限责任公司 Simulation analysis task processing method and device for power equipment and storage medium
CN111027196B (en) * 2019-12-03 2023-04-28 南方电网科学研究院有限责任公司 Simulation analysis task processing method and device for power equipment and storage medium
CN112148445A (en) * 2020-09-09 2020-12-29 倍智智能数据运营有限公司 Distributed task scheduling method based on big data technology
CN112414473A (en) * 2020-12-04 2021-02-26 合肥科博软件技术有限公司 Method and system for performing point inspection on equipment
CN112598529A (en) * 2020-12-15 2021-04-02 泰康保险集团股份有限公司 Data processing method and device, computer readable storage medium and electronic equipment
CN112598529B (en) * 2020-12-15 2023-08-29 泰康保险集团股份有限公司 Data processing method and device, computer readable storage medium and electronic equipment
CN112596915A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Distributed lock scheduling method, device, equipment and medium
CN114257591A (en) * 2021-12-16 2022-03-29 富盛科技股份有限公司 Networking method and system for weak centralized distributed system
CN114221863A (en) * 2022-02-22 2022-03-22 湖南云畅网络科技有限公司 Intelligent node election method for distributed cluster

Also Published As

Publication number Publication date
CN108733459B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN108733459A (en) A kind of method of distributed timing, server and system
CN108880867B (en) Network equipment data acquisition method and system
CN104142868B (en) Establish the method and device of connection
CN105005909A (en) Method and device for predicting lost users
CN106528282A (en) Method, device and terminal for closing process
CN110032512A (en) A kind of adjustment method of small routine, relevant device and terminal
CN107220077B (en) Using the management-control method and management and control devices of starting
CN104598513A (en) Data flow control method and system based on webpage frame
CN109726067A (en) A kind of process monitoring method and client device
CN106227588A (en) The creation method of a kind of multi-instance object, device and mobile terminal
CN106778117A (en) Authority open method, apparatus and system
CN109978482A (en) Workflow processing method, device, equipment and storage medium
CN106105168A (en) A kind of method, terminal and portable electric appts calling transfer
CN108287706A (en) Data processing method and device
CN107506251A (en) The method and device resetted to smart machine
CN105138107B (en) Downloading method of mobile terminal, device and mobile terminal
CN105049374B (en) Dispatching method, device and the mobile terminal of downloading task
CN106462352B (en) A kind of processing method, device and the terminal of fingerprint event
CN103793267A (en) Queue access method and device
CN103729283B (en) System log output method and device and terminal device
CN104751333B (en) A kind of method, apparatus and system of information exchange
CN108762983A (en) Multi-medium data restoration methods and device
CN107533688A (en) A kind of method for processing business and equipment
CN107463524A (en) A kind of method and relevant device for accessing data
CN106708501A (en) Activity monitoring method and device

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
GR01 Patent grant
GR01 Patent grant