CN104468174B - A method and apparatus clustered servers perform tasks - Google Patents

A method and apparatus clustered servers perform tasks Download PDF

Info

Publication number
CN104468174B
CN104468174B CN 201310453196 CN201310453196A CN104468174B CN 104468174 B CN104468174 B CN 104468174B CN 201310453196 CN201310453196 CN 201310453196 CN 201310453196 A CN201310453196 A CN 201310453196A CN 104468174 B CN104468174 B CN 104468174B
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
task
server
executed
node
tasks
Prior art date
Application number
CN 201310453196
Other languages
Chinese (zh)
Other versions
CN104468174A (en )
Inventor
席淑海
Original Assignee
北京新媒传信科技有限公司
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
Grant date

Links

Abstract

本发明公开了一种集群服务器执行任务的方法和装置,属于互联网通信领域。 The present invention discloses a method and apparatus of a cluster server to perform tasks, the field of communications Internet. 所述方法包括:从任务状态表中获取任务状态为未执行的待执行任务信息;获取执行待执行任务的节点服务器的标识;当到达执行待执行任务的时间戳时,发送待执行任务的标识给节点服务器,使节点服务器根据待执行任务的标识获取并执行待执行任务;当节点服务器执行待执行任务失败时,发送任务响应给管理节点服务器,使管理节点服务器将待执行任务的任务状态修改为未执行,以使集群中除该节点服务器之外的其他节点服务器执行该待执行任务。 The method comprising: acquiring from the task status of the task state table information for tasks to be executed unexecuted; execution server node acquires the identification task to be executed; when performing arrival time stamp task to be executed, the transmission task to be executed identification to the node server, so that the node server retrieves and executes the tasks to be executed in accordance with the identification tasks to be; when the node server performs tasks to be executed fails, sending task in response to the management node server, so that the management node server tasks to be executed task state modification is not performed, so that in addition to the other node server node server to perform the tasks to be executed in the cluster. 所述装置包括:第一获取模块、第二获取模块、第一发送模块和第二发送模块。 The apparatus comprising: a first acquisition module, a second acquisition module, a first transmitting module and a second sending module. 本发明提供的方法能够保证了集群服务器执行任务的可靠性。 The present invention provides a method capable of ensuring the reliability of a cluster server to perform tasks.

Description

一种集群服务器执行任务的方法和装置 A method and apparatus clustered servers perform tasks

技术领域 FIELD

[0001] 本发明涉及互联网通信领域,特别涉及一种集群服务器执行任务的方法和装置。 [0001] The present invention relates to the field of Internet communications, and particularly relates to a method and apparatus for performing a task server cluster.

背景技术 Background technique

[0002] 在集群服务器中设置定时器,一个服务器对应一个定时器;当到达执行待执行任务的时间戳时,定时器控制与之对应的服务器执行待执行任务。 [0002] timer provided in the server cluster, a server corresponding to a timer; and when performing arrival time stamp task to be executed, the corresponding timer control server performs tasks to be executed.

[0003] 现有技术提供了一种集群服务器执行任务的方法,可以为:集群中的多个定时器同时将集群中服务器的台数和待执行任务的ID (Identity,身份标识号码)进行取模运算, 得到执行该待执行任务的节点服务器的编号;当到达执行待执行任务的时间戳时,与该节点服务器的编号对应的定时器发送待执行任务的标识给该节点服务器,该节点服务器接收该待执行任务的标识,根据该待执行任务的标识获取并执行该待执行任务。 [0003] The prior art provides a method of cluster server to perform tasks, may be: a plurality of timers in the cluster while the number of servers in the cluster and the task to be executed ID (Identity, identification number) modulo calculation is performed to obtain the number of the node server task to be executed; when performing arrival time stamp task to be executed, the node number corresponding to the server identifier transmission timer task to be executed to the server node, the server node receives the mission to be to identify, acquire and execute the tasks to be executed based on the identity of the task to be executed.

[0004] 在实现本发明的过程中,发明人发现现有技术至少存在以下问题: [0004] During the implementation of the present invention, the inventors found that the prior art has at least the following problems:

[0005] 当该节点服务器宕机时,该待执行任务执行失败,从而使得现有技术中的集群服务器执行任务的方法不可靠。 [0005] When the server node is down, the failed task to be executed, so that the method of the prior art cluster server to perform tasks unreliable.

发明内容 SUMMARY

[0006] 为了使解决现有技术的问题,本发明提供了一种集群服务器执行任务的方法和装置。 [0006] In order to solve the problems of the prior art, the present invention provides a method and apparatus for a cluster server to perform tasks. 所述技术方案如下: The technical solutions are as follows:

[0007] —方面,本发明提供了一种集群服务器执行任务的方法,所述方法包括: [0007] - aspect, the present invention provides a method of performing a task server cluster, the method comprising:

[0008] 从任务状态表中获取任务状态为未执行的待执行任务信息,所述待执行任务信息包括待执行任务的标识和执行所述待执行任务的时间戳; [0008] acquired from the task status of the task state table information for tasks to be executed is not performed, the tasks to be executed and identification information comprises performing the task to be executed time stamp task to be executed;

[0009] 获取执行所述待执行任务的节点服务器的标识; [0009] Gets the server node perform the identification task to be executed;

[0010] 当到达执行所述待执行任务的时间戳时,根据所述节点服务器的标识发送所述待执行任务的标识给所述节点服务器,使所述节点服务器根据所述待执行任务的标识获取并执行所述待执行任务; [0010] When execution reaches the time stamp task to be executed, according to the identifier of the server node transmits the tasks to be performed to the identification server node, the server node according to the identifier of the task to be executed obtaining and executing the tasks to be executed;

[0011] 当所述节点服务器执行所述待执行任务失败时,发送任务响应给管理节点服务器,所述任务响应携带状态信息为未完成,所述状态信息用于提示所述管理节点服务器所述待执行任务的任务状态,使所述管理节点服务器根据所述任务响应将所述待执行任务的任务状态修改为未执行,以使集群中除所述节点服务器之外的其他节点服务器执行所述待执行任务。 [0011] node when the server fails to execute the tasks to be executed, in response to the transmission job server management node, the task state information carried in the response is not completed, the prompt for the status information of the management node server tasks of the tasks to be executed, the task management server node status in response to the task to be executed is not performed according to the modified task, so that other nodes in the cluster server other than the server node performing the tasks to be executed.

[0012] 优选地,所述从任务状态表中获取任务状态为未执行的待执行任务信息之后,所述方法还包括: After [0012] Preferably, the acquisition task from the task state table for the state information of tasks to be executed is not performed, the method further comprising:

[0013] 发送任务请求给管理节点服务器,所述任务请求携带所述待执行任务的标识,使所述管理节点服务器根据所述任务请求将所述待执行任务的任务状态修改为执行中。 [0013] send the task request to the server management node, the task request carries the identifier of the task to be executed, the server management node requests the status of a task to be executed to perform tasks in accordance with the modified task.

[0014] 优选地,所述从任务状态表中获取任务状态为未执行的待执行任务信息,包括: [0014] Preferably, the acquisition task from the task state table for the tasks to be executed state information is not performed, comprising:

[0015] 获取任务状态为未执行的任务信息; [0015] The task information acquisition task state is not performed;

[0016] 计算所述任务信息包括的执行需要执行任务的时间戳和当前时间戳的差值; [0016] The task information comprises calculating the difference between the timestamp and current timestamp performing the tasks need to be performed;

[0017] 从所述差值中选择最小值; [0017] The difference in the minimum value is selected from;

[0018] 将所述最小值对应的任务信息作为所述待执行任务信息。 [0018] The task information corresponding to the minimum value of the tasks to be executed as information.

[0019] 优选地,所述从任务状态表中获取待执行任务信息之前,所述方法还包括: Before [0019] Preferably, the information acquisition tasks to be executed from the task state table, the method further comprising:

[0020] 接收用户输入的需要执行任务的标识和执行所述需要执行任务的时间戳; [0020] identification tasks need to be performed and the user input receiving the timestamp need to perform tasks;

[0021] 将所述需要执行任务的标识和执行所述需要执行任务的时间戳保存在所述任务状态表中。 [0021] The time stamps need to perform the task of identifying and executing to perform the tasks stored in the task state table.

[0022] 优选地,所述获取执行所述待执行任务的节点服务器的标识,包括: [0022] Preferably, the server node performing the identifier acquisition tasks to be executed, comprising:

[0023] 从集群服务器中随机选择一个节点服务器,将所述选择的节点服务器作为执行所述待执行任务的节点服务器; [0023] selects a node from the server cluster server randomly, the selected node as the node server performs the server task to be executed;

[0024] 或者,根据集群服务器中的节点服务器的负载,选择负载最小的节点服务器,将所述负载最小的节点服务器作为执行所述待执行任务的节点服务器。 [0024] Alternatively, according to the load of the cluster server node server selects the least loaded server node, the server node as the least loaded server node executing the task to be executed.

[0025] 另一方面,本发明提供了一种集群服务器执行任务的装置,所述装置包括: [0025] another aspect, the present invention provides an apparatus for a cluster server to perform tasks, the apparatus comprising:

[0026] 第一获取模块,用于从任务状态表中获取任务状态为未执行的待执行任务信息, 所述待执行任务信息包括待执行任务的标识和执行所述待执行任务的时间戳; [0026] The first acquiring module, for acquiring the status of the task from the task state table information for tasks to be executed is not performed, the tasks to be executed and identification information comprises performing the task to be executed time stamp task to be executed;

[0027] 第二获取模块,用于获取执行所述待执行任务的节点服务器的标识; [0027] The second acquiring module, for acquiring the node identifier of the server performing the tasks to be executed;

[0028] 第一发送模块,用于当到达执行所述待执行任务的时间戳时,根据所述节点服务器的标识发送所述待执行任务的标识给所述节点服务器,使所述节点服务器根据所述待执行任务的标识获取并执行所述待执行任务; [0028] The first sending module, configured to, when executed reaches the time stamp task to be executed, according to the identifier of the server node transmits the tasks to be performed to the identification server node, the server node according to identification of the task to be executed and executing the acquisition tasks to be executed;

[0029] 第二发送模块,用于当所述节点服务器执行所述待执行任务失败时,发送任务响应给管理节点服务器,所述任务响应携带状态信息为未完成,所述状态信息用于提示所述管理节点服务器所述待执行任务的任务状态,使所述管理节点服务器根据所述任务响应将所述待执行任务的任务状态修改为未执行,以使集群中除所述节点服务器之外的其他节点服务器执行所述待执行任务。 [0029] The second sending module, configured to, when the server node to execute the tasks to be executed fails, sending a response to the management node server task, the task response carries state information is not completed, the status information for prompting the management server node than the state of performing the task to be the task, the task server management node status in response to the task to be executed is not performed according to the modified task, so that in addition to the cluster node server a server node executing the other tasks to be executed.

[0030] 优选地,所述装置还包括: [0030] Preferably, said apparatus further comprising:

[0031] 第三发送模块,用于发送任务请求给管理节点服务器,所述任务请求携带所述待执行任务的标识,使所述管理节点服务器根据所述任务请求将所述待执行任务的任务状态修改为执行中。 [0031] a third sending module, configured to send a request to the management node server task, task request carries the identifier of the task to be executed, the server management node according to the task request the task to be executed task status changed to execution.

[0032] 优选地,所述第一获取模块,包括: [0032] Preferably, the first acquiring module, comprising:

[0033] 获取单元,用于获取任务状态为未执行的任务信息; [0033] acquiring unit, for acquiring the task status of the task information that is not performed;

[0034] 计算单元,用于计算所述任务信息包括的执行需要执行任务的时间戳和当前时间戳的差值; [0034] calculation means for calculating a difference tasks need to be performed to calculate the timestamp and current time stamp included in the task information;

[0035] 第一选择单元,用于从所述差值中选择最小值,将所述最小值对应的任务信息作为所述待执行任务信息。 [0035] The first selecting unit for selecting a minimum value from the difference value, the minimum value of the task information corresponding to the tasks to be executed as information.

[0036] 优选地,所述装置还包括: [0036] Preferably, said apparatus further comprising:

[0037] 接收模块,用于接收用户输入的需要执行任务的标识和执行所述需要执行任务的时间戳; [0037] a receiving module, for identifying the tasks need to be performed, and receiving a user input of the time stamp need to perform tasks;

[0038] 保存模块,用于将所述需要执行任务的标识和执行所述需要执行任务的时间戳保存在所述任务状态表中。 [0038] The storage module, a time stamp for identifying the need to perform tasks and perform the required tasks stored in the task state table.

[0039] 优选地,所述第二获取模块,包括: [0039] Preferably, the second acquiring module, comprising:

[0040] 第二选择单元,用于从集群服务器中随机选择一个节点服务器,将所述选择的节点服务器作为执行所述待执行任务的节点服务器; [0040] The second selecting unit for selecting a node from the server cluster server randomly, the selected node as the node server performs the server task to be executed;

[0041] 或者,第三选择单元,用于根据集群服务器中的节点服务器的负载,选择负载最小的节点服务器,将所述负载最小的节点服务器作为执行所述待执行任务的节点服务器。 [0041] Alternatively, the third selecting unit, according to the load for the cluster server node server selects the least loaded server node, the server node as the least loaded server node executing the task to be executed.

[0042] 本发明实施例中,当节点服务器执行待执行任务失败时,定时器发送任务响应给管理节点服务器,该任务响应携带状态信息为未完成,管理节点服务器根据该任务响应将待执行任务的任务状态修改为未执行,使集群中除该节点服务器之外的其他节点服务器执行该待执行任务。 [0042] Example embodiments of the present invention, when a node fails server performs tasks to be executed, the timer transmits a response to the management node server task, the task response carries state information is not completed, the management server node in response to the task according to the task to be performed the task status modification is not performed, so that other nodes in the cluster server other than the server node to execute the tasks to be executed. 因此,即使该节点服务器宕机,也能使该待执行任务被执行,从而保证了集群服务器执行任务的可靠性。 Thus, even if the server node is down, but also enables the tasks to be executed is executed, thus ensuring the reliability of a cluster server to perform tasks.

附图说明 BRIEF DESCRIPTION

[0043] 为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 [0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, as briefly described in the introduction to the accompanying drawings required for use in describing the embodiments. Apparently, the drawings in the following description are only some of the present invention. embodiments, those of ordinary skill in the art is concerned, without creative efforts, can derive from these drawings other drawings.

[0044] 图1是本发明实施例1提供的集群服务器执行任务的方法流程图; [0044] FIG. 1 is a method of performing a task server cluster is a flowchart of an embodiment of the present invention;

[0045] 图2是本发明实施例2提供的集群服务器执行任务的方法流程图; [0045] FIG. 2 is a method of performing a task server cluster Example 2 is a flowchart of embodiments of the present invention;

[0046] 图3是本发明实施例3提供的集群服务器执行任务的装置结构示意图。 [0046] FIG. 3 is a configuration diagram of an apparatus according to the cluster server 3 perform tasks provided by the present invention.

具体实施方式 Detailed ways

[0047] 为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。 [0047] To make the objectives, technical solutions, and advantages of the present invention will become apparent in conjunction with the accompanying drawings of the following embodiments of the present invention will be described in further detail.

[0048] 实施例1 [0048] Example 1

[0049] 本发明实施例提供了一种集群服务器执行任务的方法。 Embodiment [0049] The present invention provides a method of performing a task server cluster. 参见图1,其中,该方法包括: Referring to Figure 1, wherein the method comprises:

[0050] 101:定时器从任务状态表中获取任务状态为未执行的待执行任务信息,该待执行任务信息包括待执行任务的标识和执行待执行任务的时间戳; [0050] 101: Get Timer task from the task state table for the state information is not to be executed to perform tasks, the tasks to be executed and identification information includes an execution task to be executed time stamp task to be executed;

[0051] 102:定时器获取执行待执行任务的节点服务器的标识; [0051] 102: timer execution server node acquires the identification task to be executed;

[0052] 103:当到达执行待执行任务的时间戳时,定时器根据节点服务器的标识发送待执行任务的标识给节点服务器,使节点服务器根据待执行任务的标识获取并执行待执行任务; [0052] 103: When execution reaches the time stamp task to be executed, the timer sends the identification task to be executed according to the identifier of the server node to the server node, so the server node retrieves and executes the tasks to be executed according to the identifier of the task to be performed;

[0053] 104:当节点服务器执行待执行任务失败时,定时器发送任务响应给管理节点服务器,该任务响应携带状态信息为未完成,该状态信息用于提示管理节点服务器待执行任务的任务状态,使管理节点服务器根据该任务响应将待执行任务的任务状态修改为未执行, 以使集群中除该节点服务器之外的其他节点服务器执行该待执行任务。 [0053] 104: when a node fails server performs tasks to be executed, the timer transmits a response to the management node server task, the task response carries state information is not completed, the status information for suggesting task state management node server task to be executed , so as to modify the management server node is not performed, so that other nodes in the cluster server other than the server node to execute the tasks to be executed in response to the state of the task based on the task to be executed task.

[0054] 本发明实施例中,当节点服务器执行待执行任务失败时,定时器发送任务响应给管理节点服务器,该任务响应携带状态信息为未完成,管理节点服务器根据该任务响应将待执行任务的任务状态修改为未执行,使集群中除该节点服务器之外的其他节点服务器执行该待执行任务。 [0054] Example embodiments of the present invention, when a node fails server performs tasks to be executed, the timer transmits a response to the management node server task, the task response carries state information is not completed, the management server node in response to the task according to the task to be performed the task status modification is not performed, so that other nodes in the cluster server other than the server node to execute the tasks to be executed. 因此,即使该节点服务器宕机,也能使该待执行任务被执行,从而保证了集群服务器执行任务的可靠性。 Thus, even if the server node is down, but also enables the tasks to be executed is executed, thus ensuring the reliability of a cluster server to perform tasks.

[0055] 实施例2 [0055] Example 2

[0056] 本发明实施例提供了一种集群服务器执行任务的方法。 Embodiment [0056] The present invention provides a method of performing a task server cluster. 参见图2,其中,该方法包括: Referring to Figure 2, wherein the method comprises:

[0057] 201:定时器接收用户输入的需要执行任务的标识和执行需要执行任务的时间戳; [0057] 201: receiving time stamp timer identity and perform the tasks need to be performed task input by the user;

[0058] 其中,定时器为集群服务器中的任一定时器,在集群服务器中,部署至少一台定时器。 [0058] wherein the cluster server timers any of the timers in the server cluster, deploy at least one timer.

[0059] 其中,需要说明的是,需要执行任务为用户输入的任务;需要执行任务的时间戳为执行需要执行任务对应的时刻。 [0059] wherein, should be noted that, to perform the tasks of the tasks a user input; timestamp need to perform tasks needed for the execution timing corresponding to the task execution.

[0060] 其中,当用户需要让集群服务器在某个时间戳执行需要执行任务时,用户输入需要执行任务的标识和执行需要执行任务的时间戳给定时器,定时器接收用户输入的需要执行任务的标识和执行需要执行任务的时间戳。 [0060] wherein, when the user needs to make a cluster server when a time stamp execution task requires user input to identify needs and perform tasks to perform tasks require time stamp to the timer, the timer receiving user input required to perform tasks identification and implementation of timestamps need to perform the task.

[0061] 例如,用户需要在2013-9-18-12:00发送短消息给好友甲时,用户在定时器中输入发送短消息任务的标识和发送短消息的时间戳2013-9-18-12:00,定时器接收用户输入的发送短消息任务的标识和发送短消息的时间戳2013-9-18-12:00。 [0061] For example, the user needs to 2013-9-18-12: sending a short message to a friend A 00, sending a short message the user inputs the task identifier and sending a short message in the timer stamp 2013-9-18- 12:00 identification task timer to send short messages to receive user input and time stamp to send a short message 2013-9-18-12: 00.

[0062] 202:定时器将需要执行任务的标识和执行需要执行任务的时间戳保存在任务状态表中; [0062] 202: timer timestamp need to perform tasks need to be performed and an identification of the task stored in the task state table;

[0063] 具体地,定时器绑定需要执行任务的标识和执行需要执行任务的时间戳,将需要执行任务的标识、执行需要执行任务的时间戮、任务状态二者的对应关系保存在任务状态表中。 [0063] Specifically, the timer binding need to perform identification and time stamp of the tasks need to perform a task, a corresponding relationship between the two identification tasks need to be performed, need to perform the task execution time stamps, the task in the task state saving state table.

[0064] 其中,任务状态包括未执行、执行中和已执行。 [0064] wherein the state comprises tasks not performed, and execution has been performed.

[0065] 其中,未执行是指该需要执行任务未被节点服务器执行;执行中是指该需要执行任务正在被节点服务器执行;已执行是指该需要执行任务已经被节点服务器执行完成。 [0065] wherein not performed means that the server node requires to perform tasks not performed; means that the execution perform the tasks being performed by the node server; is meant that the executed perform the tasks have been performed to complete the server node.

[0066] 例如,定时器将需要执行任务的标识和执行需要执行任务的时间戳保存在任务状态表中,如表1所不: [0066] For example, the timer will time stamp and perform the tasks need to be performed to identify the task in the task state table stored, not in Table 1:

[0067] 表1 [0067] TABLE 1

Figure CN104468174BD00071

[0069] 其中,需要执行任务为job_name,该job_name用户可以根据喜好进行设置并更改, 在本发明实施例中不对j〇b_name做具体限定。 [0069] wherein job_name need to perform tasks, which can be set according job_name user preferences and changes, in the embodiment do not j〇b_name particularly limited in the present invention.

[0070] 203:定时器从任务状态表中获取任务状态为未执行的待执行任务信息,该待执行任务信息包括待执行任务的标识和执行该待执行任务的时间戳; [0070] 203: Get Timer task from the task state table for the state information is not to be executed to perform tasks, the tasks to be executed includes a time stamp information identifying the tasks to be executed and execution of tasks to be executed;

[0071] 其中,需要说明的是,待执行任务为即将被执行的任务;待执行任务的时间戳为执行待执行任务对应的时刻。 [0071] wherein Incidentally, tasks to be executed for a task to be executed; time stamp to be executed to perform tasks corresponding to the task to be performed.

[0072] 其中,定时器从任务状态表中获取任务状态为未执行的待执行任务信息的操作, 可以为: [0072] wherein the timer acquires the task from the task state table for the state information of the operation task to be performed is not performed, it may be:

[0073] 定时器从任务状态表中获取任务状态为未执行的任务彳目息,从获取的任务状态为未执行的任务信息中随机选择一个任务信息,将随机选择的任务信息作为待执行任务信息。 [0073] Gets the timer task from the task state for the task in the state table information left foot mesh unexecuted state acquiring from the task information of the task is not performed randomly select a task information, the task information randomly selected as the tasks to be executed information.

[0074] 其中,定时器从任务状态表中获取任务状态为未执行的待执行任务信息的操作, 还可以为: [0074] wherein the timer acquires the task from the task state table for the state information of tasks to be executed is not performed operations, may also be:

[0075] 从任务状态表中获取任务状态为未执行的任务信息;根据未执行的任务信息获取该执行需要执行任务的时间戳,获取当前时间戳;计算任务信息包括的执行需要执行任务的时间戳和当前时间戳的差值;从差值中选择最小值;将最小值对应的任务信息作为待执行任务信息。 [0075] Gets the state of the task from the task information for the task in the state table is not performed; acquires a time stamp of the need to perform a task according to the task execution information is not performed, obtaining current timestamp; time information included in computing tasks need to be performed tasks difference between the timestamp and current timestamp; selecting the minimum value from the difference; the task information corresponding to the minimum information as tasks to be executed.

[0076] 其中,在本发明实施例中,将任务信息包括的执行需要执行任务的时间戳和当前时间戳的差值最小的任务信息作为待执行任务信息,从而能够保证任务执行的及时性,提高集群服务器执行任务的可靠性。 [0076] wherein, in the embodiment of the present invention, the difference information includes a timestamp task of tasks need to be performed and the current time stamp information as the smallest task to be executed task information, it is possible to ensure the timely execution of the task, improve the reliability of clustered servers perform tasks.

[0077] 204:定时器发送任务请求给管理节点服务器,该任务请求携带待执行任务的标识; [0077] 204: timer task request to send the management server node, the request carries the identifier of the task task to be executed;

[0078] 其中,管理节点服务器为集群服务器中的任一节点服务器,管理节点服务器不仅可以对集群服务器执行任务进行管理,该管理节点服务器还可以执行待执行任务。 [0078] wherein the cluster management server node server to a node server either, not only the server management node cluster management server perform a task, the server node can also perform management tasks to be executed.

[0079] 其中,定时器获取待执行任务信息后,发送任务请求给管理节点服务器,以通知管理节点服务器修改待执行任务的任务状态,如步骤205。 After [0079] wherein the timer information acquisition tasks to be executed, the node transmits a task request to the management server, to inform the management node server modifies the task status of the task to be performed, as in step 205.

[0080] 例如,定时器从表1中获取待执行任务信息包括待执行任务标识:发送短消息和执行待执行任务的时间戳:2013-9-18-12:00后,发送任务请求给管理节点服务器,该任务请求携带待执行任务的标识:发送短消息,以通知管理节点服务器修改待执行任务的任务状ίέτ O [0080] For example, the timer information acquisition tasks to be executed comprising identifying tasks to be executed from Table 1: the time stamp sending a short message and execution of tasks to be executed: 2013-9-18-12: 00 sends a task request to the management a node server, the request carries the identifier of the task task to be executed: sending a short message to inform the management node server change task like the task to be executed ίέτ O

[0081] 205:管理节点服务器接收定时器发送的任务请求,并根据该任务请求将待执行任务的任务状态设置为执行中; [0081] 205: management server node receives a task request sent by a timer, and request the task to be executed to perform the task state set according to the task;

[0082] 具体地,管理节点服务器接收定时器发送的任务请求,根据该任务请求获取待执行任务的标识,根据待执行任务的标识将待执行任务的任务状态由未执行修改为执行中。 [0082] Specifically, the management server node receives a task request transmission timer acquires the identification task to be executed according to the task request, according to the task is not performed by the modified state identification task to be executed will be executed for the task execution.

[0083] 其中,管理节点服务器将待执行任务的任务状态修改为执行中,以防止集群中的节点服务器重复执行该待执行任务。 [0083] wherein, node server management tasks to be executed to perform the task state modification in order to prevent the server nodes in the cluster to repeat the tasks to be executed.

[0084] 例如,管理节点服务器接收定时器发送的任务请求,根据该任务请求获取待执行任务的标识:发送短消息,根据待执行任务的标识:发送短消息将待执行任务的任务状态由未执行修改为执行中,修改后的任务状态表如表2所示: [0084] For example, server management node receives the task request transmission timer acquires the identification task to be executed according to the task request: sending a short message, according to the identification task to be performed: sending a short message the task to be performed by the task state is not modified to perform the execution, the modified task status table shown in table 2:

[0085] 表2 [0085] TABLE 2

Figure CN104468174BD00081

[0087] 206:定时器获取执行待执行任务的节点服务器的标识; [0087] 206: timer execution server node acquires the identification task to be executed;

[0088] 其中,定时器获取待执行任务时,定时器获取执行待执行任务的节点服务器。 [0088] in which, when the timer acquisition tasks to be executed, the timer obtain node server performs task to be executed.

[0089] 其中,定时器获取执行待执行任务的节点服务器的标识的操作,可以为: [0089] wherein, performing the timer operation identifier acquisition tasks to be executed in the server node, can be:

[0090] 定时器从集群服务器中随机选择一个节点服务器,将选择的节点服务器作为执行待执行任务的节点服务器。 [0090] Timer select a node from the server cluster server randomly, the selected node as the node server performs tasks to be executed in the server.

[0091] 其中,定时器获取执行待执行任务的节点服务器的标识的操作,还可以为: [0091] wherein, performing the timer operation identifier acquisition tasks to be executed in the server node, may also be:

[0092] 定时器根据集群服务器中的节点服务器的负载,选择负载最小的节点服务器,将负载最小的节点服务器作为执行待执行任务的节点服务器。 [0092] The cluster server timer according to the load of the server nodes, the nodes selected minimum load server, the load server as a node of the smallest node server performs task to be executed.

[0093] 207:当到达执行待执行任务的时间戳时,定时器根据节点服务器的标识发送待执行任务的标识给节点服务器; [0093] 207: When execution reaches the time stamp task to be executed, the timer sends the identification task to be executed according to the identifier to a server node of a server node;

[0094] 具体地,定时器根据待执行任务信息获取执行待执行任务的时间戳,根据执行待执行任务的时间戳开始计时,当到达执行待执行任务的时间戳时,定时器根据节点服务器的标识发送待执行任务的标识给节点服务器。 [0094] Specifically, the timer performs acquires a time stamp task to be executed in accordance with information on tasks to be executed, based on timestamp task to be executed to start timing, when performing arrival time stamp task to be executed, the node server timer according to identity identity, send a mission to the node server.

[0095] 208:节点服务器接收定时器发送的待执行任务的标识,根据待执行任务的标识获取并执行待执行任务; [0095] 208: identifies tasks to be sent by the node server timers receives, retrieves and executes the tasks to be executed according to the identifier of the task to be performed;

[0096] 具体地,节点服务器接收定时器发送的待执行任务的标识,根据待执行任务的标识获取待执行任务,根据获取的待执行任务执行待执行任务。 [0096] Specifically, the node server receives identification tasks to be sent by the timer, the identification acquisition tasks to be executed in accordance with the task to be performed, tasks to be executed according to the acquired execution of tasks to be executed.

[0097] 例如,当到达执行待执行任务的时间戳时,定时器根据节点服务器1的标识发送待执行任务的标识:发送短消息给节点服务器1;节点服务器1接收定时器发送的待执行任务的标识:发送短消息,根据待执行任务的标识获取待执行任务:发送短消息给好友甲,并发送短消息给好友甲。 [0097] For example, when performing arrival time stamp task to be executed, the timer sends the identification task to be executed according to the identifier of a server node: sending a short message to a server node; tasks to be executed by the node server 1 receives the transmitted timer identification of: sending a short message, the identification acquisition tasks to be executed according to the task to be performed: sending a short message to a friend a, and a sends a short message to a friend.

[0098] 209:当节点服务器执行待执行任务失败时,定时器发送任务响应给管理节点服务器,该任务响应携带状态信息为未完成,该状态信息用于提示管理节点服务器待执行任务的任务状态; [0098] 209: when a node fails server performs tasks to be executed, the timer transmits a response to the management node server task, the task response carries state information is not completed, the status information used to prompt the management node server tasks to be executed task state ;

[0099] 其中,节点服务器执行任务结束后,定时器发送任务响应给管理节点服务器,该任务响应携带状态信息,该状态信息用于提示管理节点待执行任务的任务状态,该状态信息可以为未完成或已完成。 [0099] wherein, after the task execution server node, in response to the timer sending task management node server, the response carries task state information, the status information is used to prompt the task state management node task to be executed, the status information may not complete or completed.

[0100] 其中,当节点服务器执行待执行任务失败时,定时器发送任务响应给管理节点服务器,该任务响应携带节点服务器执行待执行任务的状态信息,该状态信息为未完成;当节点服务器执行待执行任务成功时,定时器发送任务响应给管理节点服务器,该任务响应携带节点服务器执行待执行任务的状态信息,该状态信息为已完成。 [0100] wherein, when a node fails server performs tasks to be executed, in response to the timer sending task management server node, the server node response carries the task execution tasks to be executed state information, the status information is not completed; performed when a node server to be a successful mission, task timer sends a response to the management node server, the server node response carries task execution pending task status information, the status information is complete.

[0101] 210:管理节点服务器接收定时器发送的任务响应,并根据该任务响应将待执行的任务的任务状态修改为未执行,以使集群中除该节点服务器之外的其他节点服务器执行该待执行任务。 [0101] 210: server task management node receives the response sent by the timer, and modify not performed, so that other nodes in the cluster server other than the server node executes the task according to the task status of the task to be performed in response to tasks to be executed.

[0102] 其中,当节点服务器执行待执行任务失败时,定时器发送任务响应给管理节点服务器,该任务响应携带节点服务器执行待执行任务的状态信息,该状态信息为未完成;管理节点服务器接收定时器发送的任务响应,并根据该任务响应获取节点服务器执行待执行任务的状态信息:未完成,根据该状态信息:未完成将待执行任务的任务状态由执行中修改为未执行,以使集群中除该节点服务器之外的其他节点服务器获取该待执行任务,并执行该待执行任务。 [0102] wherein, when a node fails server performs tasks to be executed, in response to the timer sending task management server node, the server node response carries the task execution tasks to be executed state information, the status information is not completed; server management node receives task transmitted response timer, and acquires the node server in response to execution of tasks to be executed based on the job state information: not complete, according to the state information: the unfinished task status of the task to be executed as modified by the execution is not performed, so that in addition to the cluster node server node server acquires the other tasks to be executed, and executes the tasks to be executed.

[0103]进一步地,当节点服务器执行待执行任务成功时,定时器发送任务响应给管理节点服务器,该任务响应携带节点服务器执行待执行任务的状态信息,该状态信息为已完成; 管理节点服务器接收定时器发送的任务响应,并根据该任务响应获取节点服务器执行待执行任务的状态信息:已完成,根据该状态信息:已完成将待执行任务的任务状态由执行中修改为已执行。 [0103] Further, when the node server performs tasks to be executed successfully, in response to the timer sending task management server node, the server node response carries the task execution tasks to be executed state information, the status information is completed; management node server task response sent by the receiving timer, and in response the server node based on the acquired task execution tasks to be executed state information: completed, according to the state information: completed task state modification to be performed as a task performed by execution.

[0104] 例如,节点服务器1执行待执行任务:发送短消息给好友甲失败时,发送任务响应给管理节点服务器,该任务响应携带节点服务器1执行待执行任务的状态信息为未完成;管理节点服务器接收节点服务器1发送的任务响应,并根据该任务响应将待执行任务的任务状态由执行中修改为未执行,修改后的任务状态表如表1所示。 [0104] For example, the node server 1 executes the tasks to be executed: When sending a short message to a friend A fails, sending task in response to the management node server, the task response carries the node server state of performing tasks to be executed in an information is not completed; management node server receives the server node transmits a response to the task, and based on the state of the task in response to task execution tasks to be modified is not performed by the execution, the task state table modified as shown in table 1. 节点服务器1执行待执行任务:发送短消息给好友甲成功时,发送任务响应给管理节点服务器,该任务响应携带节点服务器1执行待执行任务的状态信息为已完成;管理节点服务器接收节点服务器1发送的任务响应,并根据该任务响应将待执行任务的任务状态由执行中修改为已执行,修改后的任务状态表如表3所不: Node server 1 performs tasks to be executed: When sending a short message to a friend A successfully transmits tasks in response to the management node server, the task response carries the node server state of performing tasks to be executed in an information has been completed; management node server receives the node server 1 transmitted in response to the task, and based on the modified task status of the task to be executed in response to a task execution as performed by the, the modified task status table as shown in table 3 is not:

[0105] 表3 [0105] TABLE 3

Figure CN104468174BD00101

[0107] 本发明实施例中,当节点服务器执行待执行任务失败时,定时器发送任务响应给管理节点服务器,该任务响应携带状态信息为未完成,管理节点服务器根据该任务响应将待执行任务的任务状态修改为未执行,使集群中除该节点服务器之外的其他节点服务器执行该待执行任务。 Embodiment [0107] of the present invention, when a node fails server performs tasks to be executed, the timer transmits a response to the management node server task, the task response carries state information is not completed, the management server node in response to the task according to the task to be performed the task status modification is not performed, so that other nodes in the cluster server other than the server node to execute the tasks to be executed. 因此,即使该节点服务器宕机,也能使该待执行任务被执行,从而保证了集群服务器执行任务的可靠性。 Thus, even if the server node is down, but also enables the tasks to be executed is executed, thus ensuring the reliability of a cluster server to perform tasks.

[0108] 实施例3 [0108] Example 3

[0109] 本发明实施例提供了一种集群服务器执行任务的装置。 Embodiment [0109] The present invention provides an apparatus for a cluster server to perform tasks. 参见图3,其中,该装置包括: Referring to Figure 3, wherein, the apparatus comprising:

[0110] 第一获取模块301,用于从任务状态表中获取任务状态为未执行的待执行任务信息,该待执行任务信息包括待执行任务的标识和执行待执行任务的时间戳; [0110] a first obtaining module 301, configured to obtain state task from the task state table identifier and timestamp execution of tasks to be executed for the task to be executed to be executed unexecuted task information, the task information to be performed including;

[0111] 第二获取模块302,用于获取执行待执行任务的节点服务器的标识; [0111] The second obtaining module 302, configured to obtain the identification of the node server performs task to be executed;

[0112] 第一发送模块303,用于当到达执行待执行任务的时间戳时,根据节点服务器的标识发送待执行任务的标识给节点服务器,使节点服务器根据待执行任务的标识获取并执行待执行任务; [0112] The first sending module 303, configured to, when performing arrival time stamp task to be executed, the transmission identification task to be executed according to the identifier of the node server to a node server, according to the identifier of the node server acquires tasks to be performed and be mission;

[0113] 第二发送模块304,用于当节点服务器执行待执行任务失败时,发送任务响应给管理节点服务器,该任务响应携带状态信息为未完成,该状态信息用于提示管理节点服务器待执行任务的任务状态,使管理节点服务器根据该任务响应将待执行任务的任务状态修改为未执行,以使集群中除该节点服务器之外的其他节点服务器执行该待执行任务。 [0113] The second sending module 304, configured to, when a node fails server performs tasks to be executed, in response to the transmission job server management node, the task state information carried in the response is not completed, the status information used to prompt the server management node to be performed task status of the task, the task server response so that the management node status based on the task to be executed for the task modification is not performed, so that other nodes in the cluster server other than the server node to execute the tasks to be executed.

[0114] 优选地,该装置还包括: [0114] Preferably, the apparatus further comprising:

[0115] 第三发送模块305,用于发送任务请求给管理节点服务器,该任务请求携带待执行任务的标识,使管理节点服务器根据任务请求将待执行任务的任务状态修改为执行中。 [0115] The third sending module 305, configured to send a request to the management node server task, task request carries the identifier of the task to be executed, so that the management node server task request in accordance with status of the task to be modified to perform the task execution.

[0116] 优选地,该第一获取模块301,包括: [0116] Preferably, the first acquisition module 301, comprising:

[0117] 获取单元3011,用于获取任务状态为未执行的任务信息; [0117] acquiring unit 3011, configured to obtain information about the task status of the task has not been executed;

[0118] 计算单元3012,用于计算任务信息包括的执行需要执行任务的时间戳和当前时间戳的差值; [0118] calculation unit 3012 for calculating the difference information including the tasks need to be performed timestamp and current timestamp task of;

[0119] 第一选择单元3013,用于从差值中选择最小值,将最小值对应的任务信息作为待执行任务信息。 [0119] 3013 first selecting means for selecting a minimum value from the difference, the task information corresponding to the minimum information as tasks to be executed.

[0120] 优选地,该装置还包括: [0120] Preferably, the apparatus further comprising:

[0121] 接收模块306,用于接收用户输入的需要执行任务的标识和执行需要执行任务的时间戳; [0121] a receiving module 306, and the time stamp identifies the tasks need to be performed to receive user input needs to perform the task;

[0122] 保存模块307,用于将需要执行任务的标识和执行需要执行任务的时间戳保存在任务状态表中。 [0122] storage module 307, a time stamp for identifying the need to perform tasks need to be performed and stored in the task status of the task table.

[0123] 优选地,该第二获取模块302,包括: [0123] Preferably, the second acquiring module 302, comprising:

[0124] 第二选择单元3021,用于从集群服务器中随机选择一个节点服务器,将选择的节点服务器作为执行待执行任务的节点服务器; [0124] The second selection unit 3021 configured to select a node from the server cluster server randomly, the selected node as a node server performs the server task to be executed;

[0125] 或者,第三选择单元3022,用于根据集群服务器中的节点服务器的负载,选择负载最小的节点服务器,将负载最小的节点服务器作为执行待执行任务的节点服务器。 [0125] Alternatively, the third selecting unit 3022, according to the load of the cluster server node server selects the least loaded server node, the server node as the least loaded server node performs task to be executed.

[0126] 本发明实施例中,当节点服务器执行待执行任务失败时,定时器发送任务响应给管理节点服务器,该任务响应携带状态信息为未完成,管理节点服务器根据该任务响应将待执行任务的任务状态修改为未执行,使集群中除该节点服务器之外的其他节点服务器执行该待执行任务。 Embodiment [0126] of the present invention, when a node fails server performs tasks to be executed, the timer transmits a response to the management node server task, the task response carries state information is not completed, the management server node in response to the task according to the task to be performed the task status modification is not performed, so that other nodes in the cluster server other than the server node to execute the tasks to be executed. 因此,即使该节点服务器宕机,也能使该待执行任务被执行,从而保证了集群服务器执行任务的可靠性。 Thus, even if the server node is down, but also enables the tasks to be executed is executed, thus ensuring the reliability of a cluster server to perform tasks.

[0127] 需要说明的是:上述实施例提供的集群服务器执行任务的装置在集群服务器执行任务时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。 [0127] Note that: the cluster server apparatus performs the above tasks provided by the embodiment when the cluster server executes the task division of the foregoing functional modules illustrated practical application, the above functions may be required performed by different functional modules, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. 另外,上述实施例提供的集群服务器执行任务的装置与集群服务器执行任务的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。 Further, the above-described embodiment of the method and apparatus to perform tasks trunking server cluster server to perform tasks according to embodiments provide the same concept embodiments thereof specific implementation process method, it will not be repeated here.

[0128] 本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。 [0128] Those of ordinary skill in the art may understand that the above embodiments all or part of the steps may be implemented by hardware, by a program instruction may be relevant hardware, the program may be stored in a computer-readable storage medium in the above-mentioned storage medium may be a read-only memory, magnetic or optical disk.

[0129] 以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 [0129] The foregoing is only preferred embodiments of the present invention, not intended to limit the present invention within the spirit and principle of the present invention, any modification, equivalent replacement, or improvement, it should be included in the present within the scope of the invention.

Claims (8)

1. 一种集群服务器执行任务的方法,其特征在于,所述方法包括: 从任务状态表中获取任务状态为未执行的待执行任务信息,所述待执行任务信息包括待执行任务的标识和执行所述待执行任务的时间戳; 获取执行所述待执行任务的节点服务器的标识; 当到达执行所述待执行任务的时间戳时,根据所述节点服务器的标识发送所述待执行任务的标识给所述节点服务器,使所述节点服务器根据所述待执行任务的标识获取并执行所述待执行任务; 当所述节点服务器执行所述待执行任务失败时,发送任务响应给管理节点服务器,所述任务响应携带状态信息为未完成,所述状态信息用于提示所述管理节点服务器所述待执行任务的任务状态,使所述管理节点服务器根据所述任务响应将所述待执行任务的任务状态修改为未执行,以使集群中除所述节点服务器之外 1. A method for trunking server perform a task, wherein, said method comprising: acquiring from the task status of the task state table information for tasks to be executed is not performed, the tasks to be executed includes information identifying tasks to be performed and performing the time stamp task to be executed; obtaining identification server node executing the task to be executed; executed when reaching the stamp task to be executed, according to the identifier of the node transmitting the server task to be executed ID to the server node, the server node retrieves and executes the tasks to be executed based on the identification task to be executed; server when the node fails to execute the tasks to be executed, in response to the transmission job management node server the response carries the task is not completed status information, the status information of the management node is used to prompt the server to be executed task status of the task, the task management node server according to the tasks to be executed in response to the the task status modification is not performed, so that in addition to the cluster node server 的其他节点服务器执行所述待执行任务; 所述从任务状态表中获取任务状态为未执行的待执行任务信息,包括: 获取任务状态为未执行的任务ig息; 计算所述任务信息包括的执行需要执行任务的时间戳和当前时间戳的差值; 从所述差值中选择最小值; 将所述最小值对应的任务信息作为所述待执行任务信息。 A server node executing the other tasks to be executed; the acquisition task from the task state table for the state information is not to be executed to perform tasks, comprising: task status acquiring task information ig unexecuted; includes calculating the task information the difference between the timestamp and current timestamp execution of tasks need to be performed; the minimum value is selected from said difference; and task information corresponding to the minimum value of the tasks to be executed as information.
2. 如权利要求1所述的方法,其特征在于,所述从任务状态表中获取任务状态为未执行的待执行任务信息之后,所述方法还包括: 发送任务请求给管理节点服务器,所述任务请求携带所述待执行任务的标识,使所述管理节点服务器根据所述任务请求将所述待执行任务的任务状态修改为执行中。 After 2. The method according to claim 1, characterized in that, the task state is acquiring information unexecuted tasks to be executed from the task state table, the method further comprising: sending a task request to the management server node, the said task request carries the identifier of the task to be executed, the task state management node requests the server to be modified to perform a task according to the task execution.
3. 如权利要求1所述的方法,其特征在于,所述从任务状态表中获取待执行任务信息之前,所述方法还包括: 接收用户输入的需要执行任务的标识和执行所述需要执行任务的时间戳; 将所述需要执行任务的标识和执行所述需要执行任务的时间戳保存在所述任务状态表中。 3. The method according to claim 1, wherein the tasks to be executed before acquiring information, the method further comprises from the task state table: receiving user input needs to perform a task identity and the need to perform execution timestamp task; timestamp identifying the need to perform tasks and execute the required tasks stored in the task state table.
4. 如权利要求1所述的方法,其特征在于,所述获取执行所述待执行任务的节点服务器的标识,包括: 从集群服务器中随机选择一个节点服务器,将所述选择的节点服务器作为执行所述待执行任务的节点服务器; 或者,根据集群服务器中的节点服务器的负载,选择负载最小的节点服务器,将所述负载最小的节点服务器作为执行所述待执行任务的节点服务器。 4. The method according to claim 1, wherein the obtaining the node identifier server executing the task to be executed, comprising: selecting a node from the server cluster server randomly, the selected node as a server server node performing the task to be executed; or, according to the load of the server cluster node server selects the least loaded server node, the server node as the least loaded server node executing the task to be executed.
5. —种集群服务器执行任务的装置,其特征在于,所述装置包括: 第一获取模块,用于从任务状态表中获取任务状态为未执行的待执行任务信息,所述待执行任务信息包括待执行任务的标识和执行所述待执行任务的时间戳; 第二获取模块,用于获取执行所述待执行任务的节点服务器的标识; 第一发送模块,用于当到达执行所述待执行任务的时间戳时,根据所述节点服务器的标识发送所述待执行任务的标识给所述节点服务器,使所述节点服务器根据所述待执行任务的标识获取并执行所述待执行任务; 第二发送模块,用于当所述节点服务器执行所述待执行任务失败时,发送任务响应给管理节点服务器,所述任务响应携带状态信息为未完成,所述状态信息用于提示所述管理节点服务器所述待执行任务的任务状态,使所述管理节点服务器根据所述任务响 5 - Species cluster server apparatus performs a task, wherein, said means comprising: a first acquiring module, for acquiring the status of the task from the task state table information for tasks to be executed is not performed, the task information to be performed comprising performing tasks to be executed and identifies the task to be performed timestamp; a second acquiring module, for identifying the node server acquires the execution of the tasks to be executed; a first sending module, configured to, when performing the reaching be mission time stamp, the server according to the identifier of the node transmitting the identification task to be executed to the server node, the server node retrieves and executes the tasks to be executed based on the identification task to be executed; a second sending module, configured to, when the server executes the tasks to be executed when the node fails, the node transmits to the management server in response to the task, the task response carries state information is not completed, the status of the management information for prompting the server node of the task to be executed state of the task, the task management server according to the ring node 应将所述待执行任务的任务状态修改为未执行,以使集群中除所述节点服务器之外的其他节点服务器执行所述待执行任务; 所述第一获取模块,包括: 获取单兀,用于获取任务状态为未执行的任务ί目息; 计算单元,用于计算所述任务信息包括的执行需要执行任务的时间戳和当前时间戳的差值; 第一选择单元,用于从所述差值中选择最小值,将所述最小值对应的任务信息作为所述待执行任务信息。 The task status should be modified to perform tasks not performed, so that other nodes in the cluster server other than the server node performing the tasks to be executed; a first acquisition module, comprising: obtaining a single Wu, tasks for acquiring state information for the task has not been executed ί mesh; calculation means for calculating a difference timestamp tasks need to be performed and the current timestamp calculation information included in said task; first selecting means, for from the said selected minimum difference, and task information corresponding to the minimum value of the tasks to be executed as information.
6. 如权利要求5所述的装置,其特征在于,所述装置还包括: 第三发送模块,用于发送任务请求给管理节点服务器,所述任务请求携带所述待执行任务的标识,使所述管理节点服务器根据所述任务请求将所述待执行任务的任务状态修改为执行中。 6. The apparatus according to claim 5, characterized in that said apparatus further comprises: a third sending module, configured to send a request to the management node server task, task request carries the identifier of the task to be executed, so that the server management node according to the state of the task requests to the task execution tasks to be executed for the modification.
7. 如权利要求5所述的装置,其特征在于,所述装置还包括: 接收模块,用于接收用户输入的需要执行任务的标识和执行所述需要执行任务的时间戳; 保存模块,用于将所述需要执行任务的标识和执行所述需要执行任务的时间戳保存在所述任务状态表中。 7. The apparatus according to claim 5, characterized in that said apparatus further comprises: a receiving module, for identifying a task execution and requires user input receiving the timestamp need to perform tasks; storing module, with the need to perform a time stamp to identify and perform tasks need to perform the task stored in the task state table.
8. 如权利要求5所述的装置,其特征在于,所述第二获取模块,包括: 第二选择单元,用于从集群服务器中随机选择一个节点服务器,将所述选择的节点服务器作为执行所述待执行任务的节点服务器; 或者,第三选择单元,用于根据集群服务器中的节点服务器的负载,选择负载最小的节点服务器,将所述负载最小的节点服务器作为执行所述待执行任务的节点服务器。 8. The apparatus according to claim 5, wherein the second acquisition module, comprising: a second selecting unit for selecting a node from the server cluster server randomly, the node selected as the execution server the node server task to be executed; or, a third selecting unit, according to the load for the cluster server node server selects the least loaded server node, the server node with the smallest load as the execution of the tasks to be executed the node server.
CN 201310453196 2013-09-25 2013-09-25 A method and apparatus clustered servers perform tasks CN104468174B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201310453196 CN104468174B (en) 2013-09-25 2013-09-25 A method and apparatus clustered servers perform tasks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201310453196 CN104468174B (en) 2013-09-25 2013-09-25 A method and apparatus clustered servers perform tasks

Publications (2)

Publication Number Publication Date
CN104468174A true 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
CN 201310453196 CN104468174B (en) 2013-09-25 2013-09-25 A method and apparatus clustered servers perform tasks

Country Status (1)

Country Link
CN (1) CN104468174B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100280A (en) * 2015-08-31 2015-11-25 广州酷狗计算机科技有限公司 Task allocation method and device
CN105959346A (en) * 2016-04-19 2016-09-21 中国银联股份有限公司 Data processing system and data processing method based on server cluster
CN106529673A (en) * 2016-11-17 2017-03-22 北京百度网讯科技有限公司 Deep learning network training method and device based on artificial intelligence

Citations (8)

* Cited by examiner, † Cited by third party
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 浪潮(北京)电子信息产业有限公司 Intelligent management system and method of 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 Data Analysis System and Method
CN103227839A (en) * 2013-05-10 2013-07-31 网宿科技股份有限公司 Management system for regional autonomy of content distribution network server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
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 浪潮(北京)电子信息产业有限公司 Intelligent management system and method of 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 Data Analysis System and Method
CN103227839A (en) * 2013-05-10 2013-07-31 网宿科技股份有限公司 Management system for regional autonomy of content distribution network server

Also Published As

Publication number Publication date Type
CN104468174A (en) 2015-03-25 application

Similar Documents

Publication Publication Date Title
US20120311116A1 (en) Sychronization of configuration file of virtual application distribution chassis
CN102521044A (en) Distributed task scheduling method and system based on messaging middleware
CN102204210A (en) Method, server, and system for starting application
US20140082131A1 (en) Automatically configured management service payloads for cloud it services delivery
US20140201564A1 (en) Healing cloud services during upgrades
US20140082156A1 (en) Multi-redundant switchable process pooling for cloud it services delivery
US20060129414A1 (en) Transaction control arrangement for device management system
CN101140528A (en) Method, device and system for realizing timing tasks load equilibria in cluster
CN101645801A (en) Software version upgrading method based on cluster management and order exchange board
Shraer et al. Dynamic Reconfiguration of Primary/Backup Clusters.
CN102222042A (en) Automatic software testing method based on cloud computing
CN104298526A (en) Software updating method and device
CN102945175A (en) Terminal software online upgrading system and method based on cloud computing environment
CN102763086A (en) Task processing system for distributed computation and task processing method for distributed computation
CN1770121A (en) Updating software while it is running
CN103259672A (en) Software upgrading method and software upgrading system
US20150026125A1 (en) System and method for synchronizing data between communication devices in a networked environment without a central server
WO2012054160A2 (en) High availability of machines during patching
US20150264122A1 (en) Provisioner for cluster management system
CN102238032A (en) Cache-server-based system parameter management method
CN102508677A (en) Data processing device, application program downloading method and device
CN103685385A (en) Method, system and device for file synchronization
CN103064745A (en) Method and system for distributing and processing tasks
CN103986762A (en) Process state detection method and device
CN104052803A (en) Decentralized distributed rendering method and system

Legal Events

Date Code Title Description
C06 Publication
GR01