CN104468174B - The method and apparatus that a kind of cluster server performs task - Google Patents
The method and apparatus that a kind of cluster server performs task Download PDFInfo
- Publication number
- CN104468174B CN104468174B CN201310453196.5A CN201310453196A CN104468174B CN 104468174 B CN104468174 B CN 104468174B CN 201310453196 A CN201310453196 A CN 201310453196A CN 104468174 B CN104468174 B CN 104468174B
- Authority
- CN
- China
- Prior art keywords
- task
- pending
- node server
- mark
- execution
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 230000005540 biological transmission Effects 0.000 claims abstract description 8
- 230000004044 response Effects 0.000 claims description 30
- 238000004891 communication Methods 0.000 abstract description 2
- 230000003111 delayed effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000001934 delay Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000006386 neutralization reaction Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention discloses the method and apparatus that a kind of cluster server performs task, belong to field of Internet communication.Methods described includes:It is the pending mission bit stream being not carried out that task status is obtained from task status table;Obtain the mark for the node server for performing pending task;When reaching the timestamp for performing pending task, the mark of pending task is sent to node server, node server is obtained according to the mark of pending task and performs pending task;When node server performs pending mission failure, transmission task responds to management node server, management node server is set to be revised as being not carried out by the task status of pending task, so that other node servers in cluster in addition to the node server perform the pending task.Described device includes:First acquisition module, the second acquisition module, the first sending module and the second sending module.The method that the present invention is provided ensure that cluster server performs the reliability of task.
Description
Technical field
The present invention relates to field of Internet communication, the method and apparatus that more particularly to a kind of cluster server performs task.
Background technology
Timer, server one timer of correspondence are set in cluster server;Pending is performed when reaching
During the timestamp of business, the corresponding server of Timer Controlling performs pending task.
Prior art provides a kind of method that cluster server performs task, Ke Yiwei:Multiple timers in cluster
Simultaneously by the ID of the number of units of server in cluster and pending task(Identity, identity number)Carry out modulo operation,
Obtain performing the numbering of the node server of the pending task;When reaching the timestamp for performing pending task, with the section
The mark that the corresponding timer of numbering of point server sends pending task gives the node server, and the node server is received
The mark of the pending task, obtains according to the mark of the pending task and performs the pending task.
During the present invention is realized, inventor has found that prior art at least has problems with:
When the node server delays machine, the pending tasks carrying failure, so that cluster of the prior art takes
The method for device execution task of being engaged in is unreliable.
The content of the invention
In order that solving problem of the prior art, the invention provides the method and dress that a kind of cluster server performs task
Put.The technical scheme is as follows:
On the one hand, the invention provides a kind of method that cluster server performs task, methods described includes:
It is the pending mission bit stream being not carried out, the pending mission bit stream that task status is obtained from task status table
The timestamp of mark and the execution pending task including pending task;
Obtain the mark for the node server for performing the pending task;
When reaching the timestamp for performing the pending task, treated according to being sent the mark of the node server
The mark of execution task makes the node server be obtained simultaneously according to the mark of the pending task to the node server
Perform the pending task;
When the node server performs the pending mission failure, transmission task responds to management node service
Device, the task response carrier state information is unfinished, and the status information is used to point out the management node server institute
The task status of pending task is stated, the management node server is responded according to the task by the pending task
Task status is revised as being not carried out, so as to be treated described in other node servers execution in cluster in addition to the node server
Execution task.
Preferably, it is described to be obtained from task status table after task status is the pending mission bit stream being not carried out, institute
Stating method also includes:
Send task requests and give management node server, the task requests carry the mark of the pending task, made
During the task status of the pending task is modified to carry out by the management node server according to the task requests.
Preferably, the task status that obtained from task status table is the pending mission bit stream being not carried out, including:
It is the mission bit stream being not carried out to obtain task status;
The execution that calculating the mission bit stream includes needs the timestamp of execution task and the difference of current time stamp;
Minimum value is selected from the difference;
It regard the corresponding mission bit stream of the minimum value as the pending mission bit stream.
Preferably, it is described obtain pending mission bit stream from task status table before, methods described also includes:
The mark of task is performed the need for receiving user's input and is performed described needs the timestamp of execution task;
The mark for needing execution task and the execution timestamp for needing execution task are stored in the task
In state table.
Preferably, the mark for obtaining the node server for performing the pending task, including:
A node server is randomly choosed from cluster server, the node server of the selection is regard as execution institute
State the node server of pending task;
Or, the load of the node server in cluster server, the minimum node server of selection load, by institute
The minimum node server of load is stated as the node server for performing the pending task.
On the other hand, the invention provides the device that a kind of cluster server performs task, described device includes:
First acquisition module, is the pending mission bit stream that is not carried out for obtaining task status from task status table,
The pending mission bit stream includes the mark of pending task and performs the timestamp of the pending task;
Second acquisition module, the mark for obtaining the node server for performing the pending task;
First sending module, for when reaching the timestamp for performing the pending task, according to the node serve
The mark that the mark of device sends the pending task makes the node server wait to hold according to the node server
The mark of row task obtains and performs the pending task;
Second sending module, for when the node server performs the pending mission failure, sending task and ringing
Management node server should be given, the task response carrier state information is unfinished, and the status information is described for pointing out
The task status of pending task described in management node server, the management node server is responded according to the task will
The task status of the pending task is revised as being not carried out, so that other nodes in cluster in addition to the node server
Server performs the pending task.
Preferably, described device also includes:
3rd sending module, management node server is given for sending task requests, the task requests carry described in treat
The mark of execution task, makes the management node server according to the task requests by the task status of the pending task
In being modified to carry out.
Preferably, first acquisition module, including:
Acquiring unit, is the mission bit stream that is not carried out for obtaining task status;
Computing unit, the execution included for calculating the mission bit stream needs the timestamp and current time of execution task
The difference of stamp;
First choice unit, for selecting minimum value from the difference, the corresponding mission bit stream of the minimum value is made
For the pending mission bit stream.
Preferably, described device also includes:
Receiving module, for receiving user's input the need for perform the mark of task and perform the execution task of needing
Timestamp;
Preserving module, for the mark for needing execution task and the execution timestamp for needing execution task to be protected
Exist in the task status table.
Preferably, second acquisition module, including:
Second selecting unit, for randomly choosing a node server from cluster server, by the section of the selection
Point server is used as the node server for performing the pending task;
Or, the 3rd selecting unit, for the load of the node server in cluster server, selection load is minimum
Node server, the minimum node server of the load is used as to the node server for performing the pending task.
In the embodiment of the present invention, when node server performs pending mission failure, timer sends task and responded to
Management node server, task response carrier state information is unfinished, and management node server is responded according to the task will
The task status of pending task is revised as being not carried out, and holds other node servers in cluster in addition to the node server
The row pending task.Therefore, the machine even if node server is delayed, also can be performed the pending task, so as to ensure that
Cluster server performs the reliability of task.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, makes required in being described below to embodiment
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing.
Fig. 1 is the method flow diagram that the cluster server that the embodiment of the present invention 1 is provided performs task;
Fig. 2 is the method flow diagram that the cluster server that the embodiment of the present invention 2 is provided performs task;
Fig. 3 is the apparatus structure schematic diagram that the cluster server that the embodiment of the present invention 3 is provided performs task.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment 1
The embodiments of the invention provide a kind of method that cluster server performs task.Referring to Fig. 1, wherein, this method bag
Include:
101:It is the pending mission bit stream being not carried out that timer obtains task status from task status table, and this is pending
Mission bit stream includes the mark of pending task and performs the timestamp of pending task;
102:Timer obtains the mark for the node server for performing pending task;
103:When reaching the timestamp for performing pending task, timer sends according to the mark of node server and waits to hold
The mark of row task makes node server be obtained according to the mark of pending task and performs pending to node server
Business;
104:When node server performs pending mission failure, timer sends task and responds to management node service
Device, task response carrier state information is unfinished, and the status information is used to point out management node server pending task
Task status, make management node server according to the task response task status of pending task is revised as being not carried out,
So that other node servers in cluster in addition to the node server perform the pending task.
In the embodiment of the present invention, when node server performs pending mission failure, timer sends task and responded to
Management node server, task response carrier state information is unfinished, and management node server is responded according to the task will
The task status of pending task is revised as being not carried out, and holds other node servers in cluster in addition to the node server
The row pending task.Therefore, the machine even if node server is delayed, also can be performed the pending task, so as to ensure that
Cluster server performs the reliability of task.
Embodiment 2
The embodiments of the invention provide a kind of method that cluster server performs task.Referring to Fig. 2, wherein, this method bag
Include:
201:Timer performs the mark of task and execution the need for receiving user's input needs the timestamp of execution task;
Wherein, timer is any timer in cluster server, in cluster server, disposes at least one timing
Device.
, wherein it is desired to which explanation is, it is necessary to which it is the task that user inputs to perform task;The timestamp for needing execution task is
At the time of execution needs execution task correspondence.
Wherein, when user needs to allow cluster server to need execution task in the execution of some timestamp, user's input is needed
The mark and execution for performing task need the timestamp of execution task to timer, and timer is held the need for receiving user's input
The mark of row task and execution need the timestamp of execution task.
For example, user is needed in 2013-9-18-12:When 00 transmission short message is to good friend's first, user inputs in timer
Send the mark of short message task and send the timestamp 2013-9-18-12 of short message:00, timer receives user's input
Send the mark of short message task and send the timestamp 2013-9-18-12 of short message:00.
202:The mark and execution that need execution task are needed the timestamp of execution task to be stored in task shape by timer
In state table;
Specifically, timer binding needs the mark of execution task and execution to need the timestamp of execution task, it would be desirable to
The mark of execution task, execution need the timestamp of execution task, the corresponding relation of task status three to be stored in task status
In table.
Wherein, task status includes being not carried out, performs neutralization executed.
Wherein, it is not carried out referring to that the needs perform task and do not performed by node server;Refer to that the needs are performed in execution
Task is performed by node server;Executed refers to that the needs perform task and perform completion by node server.
For example, the mark and execution that need execution task are needed the timestamp of execution task to be stored in task shape by timer
In state table, as shown in table 1:
Table 1
Need to perform task identification | Execution needs the timestamp of execution task | Task status |
Send short message | 2013-9-18-12:00 | It is not carried out |
…… | …… | …… |
, wherein it is desired to perform task for job_name, the job_name user can be configured and change according to hobby,
Job_name is not specifically limited in embodiments of the present invention.
203:It is the pending mission bit stream being not carried out that timer obtains task status from task status table, and this is pending
Mission bit stream includes the mark of pending task and performs the timestamp of the pending task;
, wherein it is desired to which explanation, pending task is will being performed for task;The timestamp of pending task is to hold
At the time of the pending task of row is corresponding.
Wherein, timer obtains the operation that task status is the pending mission bit stream being not carried out from task status table,
Can be:
It is the mission bit stream being not carried out that timer obtains task status from task status table, is from the task status of acquisition
A mission bit stream is randomly choosed in the mission bit stream being not carried out, is believed randomly selected mission bit stream as pending task
Breath.
Wherein, timer obtains the operation that task status is the pending mission bit stream being not carried out from task status table,
Can also be:
It is the mission bit stream being not carried out that task status is obtained from task status table;Obtained according to the mission bit stream being not carried out
The execution needs the timestamp of execution task, obtains current time stamp;The execution that calculating task information includes needs execution task
Timestamp and current time stamp difference;Minimum value is selected from difference;Using the corresponding mission bit stream of minimum value as waiting to hold
Row mission bit stream.
Wherein, in embodiments of the present invention, the execution that mission bit stream includes is needed into the timestamp of execution task and current
The minimum mission bit stream of the difference of timestamp, so as to ensure the promptness of tasks carrying, is carried as pending mission bit stream
High cluster server performs the reliability of task.
204:Timer sends task requests and gives management node server, and the task requests carry the mark of pending task
Know;
Wherein, management node server is any node server in cluster server, and management node server is not only
Task can be performed to cluster server to be managed, the management node server can also carry out pending task.
Wherein, timer is obtained after pending mission bit stream, is sent task requests and is given management node server, to notify pipe
Manage the task status that node server changes pending task, such as step 205.
For example, timer obtains pending mission bit stream from table 1 includes pending task identification:Send short message and hold
The timestamp of the pending task of row:2013-9-18-12:After 00, send task requests and give management node server, the task please
Seek the mark for carrying pending task:Short message is sent, to notify management node server to change the task shape of pending task
State.
205:Management node server receives the task requests that timer is sent, and according to the task requests by pending
During the task status of business is arranged to carry out;
Specifically, management node server receives the task requests that timer is sent, and is obtained according to the task requests and waits to hold
The mark of row task, according to the mark of pending task by the task status of pending task by being not carried out in being modified to carry out.
Wherein, during the task status of pending task is modified to carry out by management node server, to prevent in cluster
Node server repeats the pending task.
For example, management node server receives the task requests that timer is sent, obtain pending according to the task requests
The mark of task:Short message is sent, according to the mark of pending task:Send short message by the task status of pending task by
It is not carried out in being modified to carry out, amended task status table is as shown in table 2:
Table 2
Need to perform task identification | Execution needs the timestamp of execution task | Task status |
Send short message | 2013-9-18-12:00 | In execution |
…… | …… | …… |
206:Timer obtains the mark for the node server for performing pending task;
Wherein, when timer obtains pending task, timer obtains the node server for performing pending task.
Wherein, timer obtains the operation of the mark for the node server for performing pending task, Ke Yiwei:
Timer randomly chooses a node server from cluster server, regard the node server of selection as execution
The node server of pending task.
Wherein, timer obtains the operation of the mark for the node server for performing pending task, can also be:
The load of node server of the timer in cluster server, the minimum node server of selection load, will
Minimum node server is loaded as the node server for performing pending task.
207:When reaching the timestamp for performing pending task, timer sends according to the mark of node server and waits to hold
The mark of row task is to node server;
Specifically, timer obtains the timestamp for performing pending task according to pending mission bit stream, is treated according to execution
The timestamp of execution task starts timing, and when reaching the timestamp for performing pending task, timer is according to node server
Mark send the mark of pending task to node server.
208:Node server receives the mark for the pending task that timer is sent, and is obtained according to the mark of pending task
Take and perform pending task;
Specifically, node server receives the mark for the pending task that timer is sent, according to the mark of pending task
Know and obtain pending task, according to the pending task of pending tasks carrying of acquisition.
For example, when reaching the timestamp for performing pending task, timer sends according to the mark of node server 1 and treated
The mark of execution task:Short message is sent to node server 1;Node server 1 receives the pending task that timer is sent
Mark:Short message is sent, pending task is obtained according to the mark of pending task:Send short message and give good friend's first, concurrently
Short message is sent to give good friend's first.
209:When node server performs pending mission failure, timer sends task and responds to management node service
Device, task response carrier state information is unfinished, and the status information is used to point out management node server pending task
Task status;
Wherein, after node server execution task terminates, timer sends task and responds to management node server, this
Business response carrier state information, the status information is used for the task status for pointing out the pending task of management node, the status information
Can be not complete or completed.
Wherein, when node server performs pending mission failure, timer sends task and responds to management node clothes
Business device, task response carries the status information that node server performs pending task, and the status information is unfinished;Work as section
When point server performs pending Mission Success, timer sends task and responds to management node server, and task response is taken
The status information of pending task is performed with node server, the status information is to have completed.
210:Management node server receives the task response that timer is sent, and will be pending according to task response
The task status of task is revised as being not carried out, and is somebody's turn to do so that other node servers in cluster in addition to the node server are performed
Pending task.
Wherein, when node server performs pending mission failure, timer sends task and responds to management node clothes
Business device, task response carries the status information that node server performs pending task, and the status information is unfinished;Management
Node server receives the task response that timer is sent, and performs pending according to task response acquisition node server
The status information of business:Do not complete, according to the status information:Do not complete and be revised as the task status of pending task in execution
It is not carried out, so that other node servers in cluster in addition to the node server obtain the pending task, and execution should
Pending task.
Further, when node server performs pending Mission Success, timer sends task and responds to management section
Point server, task response carries the status information that node server performs pending task, and the status information is to have completed;
Management node server receives the task response that timer is sent, and obtains node server according to task response and perform and wait to hold
The status information of row task:It has been completed that, according to the status information:Complete to repair the task status of pending task in execution
It is changed to executed.
For example, node server 1 performs pending task:When transmission short message fails to good friend's first, task response is sent
Management node server is given, the status information that task response carrying node server 1 performs pending task is unfinished;Pipe
The task response that node server receiving node server 1 is sent is managed, and is responded according to the task by the task of pending task
State is revised as being not carried out in execution, and amended task status table is as shown in table 1.Node server 1 performs pending
Business:When sending short message to the success of good friend's first, transmission task responds to management node server, and task response carries node clothes
Business device 1 performs the status information of pending task to have completed;The task that management node server receiving node server 1 is sent
Response, and the task status of pending task is revised as by executed, amended task in execution according to task response
State table is as shown in table 3:
Table 3
Need to perform task identification | Execution needs the timestamp of execution task | Task status |
Send short message | 2013-9-18-12:00 | Executed |
…… | …… | …… |
In the embodiment of the present invention, when node server performs pending mission failure, timer sends task and responded to
Management node server, task response carrier state information is unfinished, and management node server is responded according to the task will
The task status of pending task is revised as being not carried out, and holds other node servers in cluster in addition to the node server
The row pending task.Therefore, the machine even if node server is delayed, also can be performed the pending task, so as to ensure that
Cluster server performs the reliability of task.
Embodiment 3
The embodiments of the invention provide the device that a kind of cluster server performs task.Referring to Fig. 3, wherein, the device bag
Include:
First acquisition module 301, is that the pending task being not carried out is believed for obtaining task status from task status table
Breath, the pending mission bit stream includes the mark of pending task and performs the timestamp of pending task;
Second acquisition module 302, the mark for obtaining the node server for performing pending task;
First sending module 303, for when reaching the timestamp for performing pending task, according to the mark of node server
The mark for sending pending task is known to node server, node server is obtained and is performed according to the mark of pending task
Pending task;
Second sending module 304, for when node server performs pending mission failure, transmission task to respond to pipe
Node server is managed, task response carrier state information is unfinished, and the status information is used to point out management node server
The task status of pending task, makes management node server be responded according to the task and changes the task status of pending task
To be not carried out, so that other node servers in cluster in addition to the node server perform the pending task.
Preferably, the device also includes:
3rd sending module 305, management node server is given for sending task requests, and the task requests carry pending
The mark of task, makes during the task status of pending task is modified to carry out by management node server according to task requests.
Preferably, first acquisition module 301, including:
Acquiring unit 3011, is the mission bit stream that is not carried out for obtaining task status;
Computing unit 3012, the execution included for calculating task information needs the timestamp and current time of execution task
The difference of stamp;
First choice unit 3013, for selecting minimum value from difference, using the corresponding mission bit stream of minimum value as treating
Perform mission bit stream.
Preferably, the device also includes:
Receiving module 306, execution task is needed for receiving the mark of execution task and execution the need for user inputs
Timestamp;
Preserving module 307, for needing the timestamp of execution task to be stored in the mark and execution that need execution task
In task status table.
Preferably, second acquisition module 302, including:
Second selecting unit 3021, for randomly choosing a node server from cluster server, by the section of selection
Point server is used as the node server for performing pending task;
Or, the 3rd selecting unit 3022, for the load of the node server in cluster server, selection load
Minimum node server, will load minimum node server as the node server for performing pending task.
In the embodiment of the present invention, when node server performs pending mission failure, timer sends task and responded to
Management node server, task response carrier state information is unfinished, and management node server is responded according to the task will
The task status of pending task is revised as being not carried out, and holds other node servers in cluster in addition to the node server
The row pending task.Therefore, the machine even if node server is delayed, also can be performed the pending task, so as to ensure that
Cluster server performs the reliability of task.
It should be noted that:The device that the cluster server that above-described embodiment is provided performs task is performed in cluster server
, can be as needed and by above-mentioned work(only with the division progress of above-mentioned each functional module for example, in practical application during task
It can distribute and be completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, more than completion
The all or part of function of description.In addition, the cluster server that above-described embodiment is provided performs the device of task and cluster takes
The embodiment of the method that business device performs task belongs to same design, and it implements process and refers to embodiment of the method, no longer goes to live in the household of one's in-laws on getting married here
State.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can be by hardware
To complete, the hardware of correlation can also be instructed to complete by program, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.
Claims (8)
1. a kind of method that cluster server performs task, it is characterised in that methods described includes:
It is the pending mission bit stream being not carried out that task status is obtained from task status table, and the pending mission bit stream includes
The mark of pending task and the timestamp for performing the pending task;
Obtain the mark for the node server for performing the pending task;
When reaching the timestamp for performing the pending task, send described pending according to the mark of the node server
The mark of task makes the node server obtain and perform according to the mark of the pending task to the node server
The pending task;
When the node server performs the pending mission failure, transmission task responds to management node server, institute
It is unfinished to state task response carrier state information, and the status information is used to point out to wait to hold described in the management node server
The task status of row task, makes the management node server be responded according to the task by the task shape of the pending task
State is revised as being not carried out, so that other node servers in cluster in addition to the node server perform described pending
Business;
The task status that obtained from task status table is the pending mission bit stream being not carried out, including:
It is the mission bit stream being not carried out to obtain task status;
The execution that calculating the mission bit stream includes needs the timestamp of execution task and the difference of current time stamp;
Minimum value is selected from the difference;
It regard the corresponding mission bit stream of the minimum value as the pending mission bit stream.
2. the method as described in claim 1, it is characterised in that described to obtain task status from task status table to be not carried out
Pending mission bit stream after, methods described also includes:
Send task requests and give management node server, the task requests carry the mark of the pending task, make described
During the task status of the pending task is modified to carry out by management node server according to the task requests.
3. the method as described in claim 1, it is characterised in that it is described obtained from task status table pending mission bit stream it
Before, methods described also includes:
The mark of task is performed the need for receiving user's input and is performed described needs the timestamp of execution task;
The mark for needing execution task and the execution timestamp for needing execution task are stored in the task status
In table.
4. the method as described in claim 1, it is characterised in that the acquisition performs the node server of the pending task
Mark, including:
A node server is randomly choosed from cluster server, will be treated described in the node server of the selection as execution
The node server of execution task;
Or, the load of the node server in cluster server, the minimum node server of selection load will be described negative
Minimum node server is carried as the node server for performing the pending task.
5. a kind of cluster server performs the device of task, it is characterised in that described device includes:
First acquisition module, is the pending mission bit stream that is not carried out for obtaining task status from task status table, described
Pending mission bit stream includes the mark of pending task and performs the timestamp of the pending task;
Second acquisition module, the mark for obtaining the node server for performing the pending task;
First sending module, for when reaching the timestamp for performing the pending task, according to the node server
Mark sends the mark of the pending task to the node server, makes the node server according to described pending
The mark of business obtains and performs the pending task;
Second sending module, for when the node server performs the pending mission failure, transmission task to be responded to
Management node server, the task response carrier state information is unfinished, and the status information is used to point out the management
The task status of pending task described in node server, makes the management node server will be described according to task response
The task status of pending task is revised as being not carried out, so that other node serves in cluster in addition to the node server
Device performs the pending task;
First acquisition module, including:
Acquiring unit, is the mission bit stream that is not carried out for obtaining task status;
Computing unit, the execution that includes for calculating the mission bit stream needs the timestamp and current time stamp of execution task
Difference;
First choice unit, for selecting minimum value from the difference, regard the corresponding mission bit stream of the minimum value as institute
State pending mission bit stream.
6. device as claimed in claim 5, it is characterised in that described device also includes:
3rd sending module, gives management node server, the task requests carry described pending for sending task requests
The mark of task, makes the management node server be changed the task status of the pending task according to the task requests
For in execution.
7. device as claimed in claim 5, it is characterised in that described device also includes:
Receiving module, for receiving user's input the need for perform the mark of task and perform and described need the time of execution task
Stamp;
Preserving module, for the mark for needing execution task and the execution timestamp for needing execution task to be stored in
In the task status table.
8. device as claimed in claim 5, it is characterised in that second acquisition module, including:
Second selecting unit, for randomly choosing a node server from cluster server, the node of the selection is taken
Device be engaged in as the node server for performing the pending task;
Or, the 3rd selecting unit, for the load of the node server in cluster server, the minimum section of selection load
Point server, regard the minimum node server of the load as the node server for performing the pending task.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310453196.5A CN104468174B (en) | 2013-09-25 | 2013-09-25 | The method and apparatus that a kind of cluster server performs task |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310453196.5A CN104468174B (en) | 2013-09-25 | 2013-09-25 | The method and apparatus that a kind of cluster server performs task |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104468174A CN104468174A (en) | 2015-03-25 |
CN104468174B true CN104468174B (en) | 2017-10-13 |
Family
ID=52913593
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310453196.5A Active CN104468174B (en) | 2013-09-25 | 2013-09-25 | The method and apparatus that a kind of cluster server performs task |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104468174B (en) |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105100280B (en) * | 2015-08-31 | 2019-09-13 | 广州酷狗计算机科技有限公司 | Method for allocating tasks and device |
CN106569878A (en) * | 2015-10-08 | 2017-04-19 | 北京奇虎科技有限公司 | Distributed timing task management method and system |
CN105959346A (en) * | 2016-04-19 | 2016-09-21 | 中国银联股份有限公司 | Data processing system and data processing method based on server cluster |
CN106227596A (en) * | 2016-07-13 | 2016-12-14 | 百度在线网络技术(北京)有限公司 | Mission Monitor method and apparatus for task scheduling server |
CN107678840B (en) * | 2016-08-01 | 2021-08-24 | 百度在线网络技术(北京)有限公司 | System, method and device for running tasks |
CN106339255B (en) * | 2016-08-24 | 2019-10-11 | 北京小米移动软件有限公司 | Dispatching method, system, device and the server of timed task |
CN107636551B (en) * | 2016-09-22 | 2021-11-30 | 深圳市大疆创新科技有限公司 | Flight control method and device and intelligent terminal |
CN106529673B (en) * | 2016-11-17 | 2019-05-03 | 北京百度网讯科技有限公司 | Deep learning network training method and device based on artificial intelligence |
CN107181788A (en) * | 2017-03-31 | 2017-09-19 | 北京奇艺世纪科技有限公司 | A kind of task processing method and device |
CN107040607A (en) * | 2017-05-19 | 2017-08-11 | 郑州云海信息技术有限公司 | A kind of server data distribution system |
CN109144744A (en) * | 2017-06-28 | 2019-01-04 | 北京京东尚科信息技术有限公司 | Task processing system, method and apparatus |
CN107832165A (en) * | 2017-11-23 | 2018-03-23 | 国云科技股份有限公司 | A kind of method for lifting distributed system processing request stability |
CN108446171B (en) * | 2018-02-01 | 2022-07-08 | 平安科技(深圳)有限公司 | Electronic device, distributed system execution task allocation method and storage medium |
CN110650172B (en) * | 2018-06-27 | 2022-04-19 | 阿里巴巴(中国)有限公司 | Streaming task processing method and device and server |
CN113448699A (en) * | 2020-12-30 | 2021-09-28 | 北京新氧科技有限公司 | Distributed timed task processing system, method and related device |
CN113608851A (en) * | 2021-08-03 | 2021-11-05 | 北京金山云网络技术有限公司 | Task allocation method and device, electronic equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101236513A (en) * | 2007-01-30 | 2008-08-06 | 阿里巴巴公司 | Distributed task system and distributed task management process |
CN101471810A (en) * | 2007-12-28 | 2009-07-01 | 华为技术有限公司 | Method, device and system for implementing task in cluster circumstance |
CN101715001A (en) * | 2009-10-21 | 2010-05-26 | 南京邮电大学 | Method for controlling execution of grid task |
CN101834890A (en) * | 2010-04-02 | 2010-09-15 | 浪潮(北京)电子信息产业有限公司 | An intelligent management system and method for a distributed system |
CN102075358A (en) * | 2010-12-31 | 2011-05-25 | 网宿科技股份有限公司 | System and method for distributing and deploying content of large-scale server cluster |
CN102508709A (en) * | 2011-11-30 | 2012-06-20 | 国电南瑞科技股份有限公司 | Distributed-cache-based acquisition task scheduling method in purchase, supply and selling integrated electric energy acquiring and monitoring system |
CN102880503A (en) * | 2012-08-24 | 2013-01-16 | 新浪网技术(中国)有限公司 | Data analysis system and data analysis method |
CN103227839A (en) * | 2013-05-10 | 2013-07-31 | 网宿科技股份有限公司 | Management system for regional autonomy of content distribution network server |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8700310B2 (en) * | 2008-02-05 | 2014-04-15 | Madhavi Jayanthi | Mobile device and server for facilitating GPS based services |
-
2013
- 2013-09-25 CN CN201310453196.5A patent/CN104468174B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101236513A (en) * | 2007-01-30 | 2008-08-06 | 阿里巴巴公司 | Distributed task system and distributed task management process |
CN101471810A (en) * | 2007-12-28 | 2009-07-01 | 华为技术有限公司 | Method, device and system for implementing task in cluster circumstance |
CN101715001A (en) * | 2009-10-21 | 2010-05-26 | 南京邮电大学 | Method for controlling execution of grid task |
CN101834890A (en) * | 2010-04-02 | 2010-09-15 | 浪潮(北京)电子信息产业有限公司 | An intelligent management system and method for a distributed system |
CN102075358A (en) * | 2010-12-31 | 2011-05-25 | 网宿科技股份有限公司 | System and method for distributing and deploying content of large-scale server cluster |
CN102508709A (en) * | 2011-11-30 | 2012-06-20 | 国电南瑞科技股份有限公司 | Distributed-cache-based acquisition task scheduling method in purchase, supply and selling integrated electric energy acquiring and monitoring system |
CN102880503A (en) * | 2012-08-24 | 2013-01-16 | 新浪网技术(中国)有限公司 | Data analysis system and data analysis method |
CN103227839A (en) * | 2013-05-10 | 2013-07-31 | 网宿科技股份有限公司 | Management system for regional autonomy of content distribution network server |
Non-Patent Citations (1)
Title |
---|
基于分布式软负载均衡的重试框架设计与实现;郑响萍, 周晓峰;《工业控制计算机》;20130525;第20卷(第3期);第121-122页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104468174A (en) | 2015-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104468174B (en) | The method and apparatus that a kind of cluster server performs task | |
CN110703980B (en) | A file transmission method and device | |
CN103207785B (en) | The processing method of data download request, Apparatus and system | |
CN104113435B (en) | Generate the method and device of mark | |
CN106530083A (en) | Multi-chain management method and system based on block chain | |
CN105099898B (en) | A kind of PPPOE message forwarding methods and BRAS servers | |
CN105429811B (en) | network management system and method | |
CN103034475B (en) | Distributed Parallel Computing method, Apparatus and system | |
CN104253850A (en) | Distributed task scheduling method and system | |
CN102737065A (en) | Method and device for acquiring data | |
CN101651623B (en) | Generation method and device for access control list application | |
CN107404512A (en) | Resource subscription method, resource subscription device and resource subscription Xi System | |
CN106101290A (en) | A kind of method and system of server cluster management | |
CN110011930A (en) | The load-balancing method and device of multi-joint alliance's chain in a kind of block chain | |
CN110020043B (en) | Page crawling method, device, storage medium and processor | |
JP2016046736A (en) | Service chaining system, service chaining forwarder device, and service chaining method | |
CN105608531A (en) | Method and device for task scheduling | |
CN104954155B (en) | The network equipment with multiple business boards and multi-service plate sharing method | |
US20160087759A1 (en) | Tuple recovery | |
CN107770034A (en) | A kind of message treatment method and device | |
CN104618388B (en) | Fast registration login method and corresponding resetting server, information server | |
CN106027356B (en) | A kind of conversion method and device of Tunnel Identifier | |
CN108153494B (en) | A kind of I/O request processing method and processing device | |
CN106850382A (en) | A kind of flow lead method and device | |
CN104735174B (en) | A kind of implementation method and device of HTTP Transparent Proxies |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder |
Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080 Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd. Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building block A room 602 Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd. |
|
CP02 | Change in the address of a patent holder |