WO2012155642A1 - Method and device for scheduling batch operation using restricted resources - Google Patents

Method and device for scheduling batch operation using restricted resources Download PDF

Info

Publication number
WO2012155642A1
WO2012155642A1 PCT/CN2012/072555 CN2012072555W WO2012155642A1 WO 2012155642 A1 WO2012155642 A1 WO 2012155642A1 CN 2012072555 W CN2012072555 W CN 2012072555W WO 2012155642 A1 WO2012155642 A1 WO 2012155642A1
Authority
WO
WIPO (PCT)
Prior art keywords
command message
message
resource
command
restricted
Prior art date
Application number
PCT/CN2012/072555
Other languages
French (fr)
Chinese (zh)
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
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012155642A1 publication Critical patent/WO2012155642A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities

Definitions

  • the present invention relates to a scheduling technique for large-scale messages in the field of network communications, and in particular, to a scheduling method and apparatus for batch operations using restricted resources. Background technique
  • the general scheduling policy only considers the processing capability of the network element device, and does not consider the available resources of the network management system.
  • Bulk-operated messages are usually in one schedule, and operation requests are all sent.
  • a limited resource such as the number of network connections, network bandwidth, and central processing unit (CPU) utilization, it is impossible to use it without restriction.
  • the request operation exceeding the resource capability range is executed, resulting in a decrease in the operation success rate.
  • the current general scheduling strategy assumes that the execution time of all operation requests is substantially the same, without considering that messages requiring restricted resources may be occupied for a long time due to resource constraints. Between. No specific analysis of the reason for the failure of the operation is caused by the problem of the network element device or due to the limited resources of the network management system.
  • a scheduling method for a batch operation using a restricted resource comprising:
  • the request receiver After receiving the command message including the network element identifier sent by the network management client, the request receiver sends the command message to the command message distributor;
  • the command message dispatcher assigns the command message to the corresponding logical reader
  • the logic reader determines whether the command message is a restricted resource message. If the command message is a restricted resource message, the command message applies for a resource token to the resource token pool and sends the command message to the command message scheduler after the application is successful; as well as
  • the command message scheduler sends a command message to the corresponding network element device through the command message sender.
  • the restricted resource message is a message that uses limited resources in the network.
  • the command message distributor allocates the command message to the corresponding logical reader, and the method includes: the command message distributor obtains a logical reader corresponding to the command message according to the network element identifier;
  • the command message allocation fails, the result of the fast failure is created and stored in the operation result storage pool; and if the message in the logical reader If there is no restricted resource message, the command message is assigned to the logical reader.
  • the logic reader applies for the resource token to the resource token pool for the command message, including: the task timer presets the timing time;
  • the logical reader applies for a resource token in the resource token pool for the command message at regular intervals.
  • the logical reader records the number of failed application resource tokens. If the number of failures exceeds a fixed number of times, the application fails. Otherwise, the application succeeds.
  • the logic reader requests a resource token for the command message from the resource token pool. If the application fails, the command message is not processed, and the result of the operation timeout is created and stored in the operation result storage pool.
  • the method further includes: the logic reader determining whether the command message is a restricted resource message, and if the command message is not a restricted resource message, And the logic reader sends the command message to the command message scheduler; and the command message scheduler sends the command message to the corresponding network element device by using the command message sender.
  • the method further includes: the operation result processor listening to the message sent to the network element device, and if the message sent to the network element device is a restricted resource message, informing the resource token pool to release the resource token occupied by the message.
  • a scheduling apparatus for a batch operation using a restricted resource, the apparatus comprising: a request receiver, a command message distributor, a logic reader, a resource token pool, a command message schedule , and command message sender;
  • the request receiver is configured to receive a command message including the network element identifier sent by the network management client, and send the command message to the command message distributor;
  • a command message dispatcher configured to receive a command message and assign the command message to a corresponding logical reader
  • a logical reader configured to determine whether the command message is a restricted resource message, and apply for a resource token to the resource token pool when the command message is a restricted resource message;
  • a resource token pool configured to allocate a resource token for the command message when the command message is a restricted resource message, and send the command message to the command message scheduler after the application is successful;
  • the command message scheduler is configured to send a command message to the control command message sender; the command message sender is configured to send the command message to the corresponding network element device.
  • the restricted resource message is a message that uses limited resources in the network.
  • the device further comprises:
  • the operation result processor is configured to monitor the message sent to the network element device, and if the message sent to the network element device is a restricted resource message, notify the resource token pool to release the resource token occupied by the message.
  • the present invention classifies various command messages in the network management system according to the principle of whether to use restricted resources, and adopts different scheduling strategies for different command messages.
  • the dynamic management of the limited resources in the system solves the practical problem that the number of limited resource messages in a single batch operation needs to be manually controlled, the success rate of the batch operation of the restricted resource message operation is low, and the normal message is generally timed out, and The result type of operation failure is refined, and it is easy to use for operator positioning problems.
  • FIG. 1 is a schematic flowchart of a scheduling method for a batch operation using a restricted resource according to the present invention
  • FIG. 1 is a schematic structural diagram of a scheduling apparatus for a batch operation using a restricted resource according to the present invention
  • FIG. 3 is a flowchart of processing a command message scheduler according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of the operation of distributing a command message according to an embodiment of the present invention. detailed description
  • the flow of the scheduling method for batch operations using restricted resources may include the following steps:
  • Step S101 After receiving the command message including the network element identifier sent by the network management client, the request receiver sends the command message to the command message distributor.
  • Step S102 the command message distributor allocates the command message to the corresponding logical reader.
  • the command message distributor obtains a logical reader corresponding to the command message according to the network element identifier in the command message, and if the current command message in the logical reader and the message in the command message queue have a restricted resource message, the command The message allocation fails, the command message distributor does not assign the command message to the logical reader, and the command message scheduler controls the logical reader to create a fast failed result and stores it through the operation result processor to the operation result storage pool; if the logical reader The current command message in the command message and the command message queue message do not have a restricted resource message, and the command message is assigned to the logical reader.
  • the restricted resource message is a message that uses limited resources in the network.
  • Step S103 The logic reader determines whether the command message is a restricted resource message. If the command message is a restricted resource message, the logic reader applies a resource token to the resource token pool for the command message and sends the command message after the application is successful. To the command message scheduler, if the command message is not a restricted resource message, the logic reader sends a command message to the command message scheduler via the command message distributor.
  • the logic reader processes the resource token for the resource token pool for the command message as follows:
  • the task timer presets the timing time, and the logic reader applies for the resource token in the resource token pool for the command message every regular time.
  • the logical reader records the number of failed application resource tokens. If the number of failures exceeds a preset fixed number of times, the application fails. Otherwise, the application is successful. If the application is successful, the logic reader sends the command message to the command message scheduler through the command message distributor. If the application fails, the command message is not processed, and the result of the operation timeout is created and stored to the operation. Result storage pool.
  • Step S104 The command message scheduler sends the command message to the corresponding network element device by using the command message sender.
  • the operation result processor monitors the message sent to the network element device. If the message sent to the network element device is a restricted resource message, the operation result processor notifies the resource token pool to release the resource token occupied by the message. The number of tokens in the resource token pool is fixed. If the logical reader requests a resource token from the resource token pool, the number of restricted resource messages in the command message currently being processed has reached the resource. If the number of tokens in the token pool is exceeded, the application fails. Otherwise, the application is successful.
  • the operation result processor sends all the operation results to the operation result storage pool, and the request receiver reads the operation result from the operation result storage pool according to the operation result request message sent by the network management client and sends the operation result to the network management client.
  • the scheduling apparatus for batch operation using restricted resources includes a network management client 101, a network management server 111, and a network element device 112.
  • the network management client 101 is configured to assemble a command message including the network element identifier and the operation identifier to the network management server 111. On the other hand, the network management client 101 periodically requests the operation result from the network management server 111, and displays the operation result. On the graphical interface.
  • the network management server 111 is configured to process messages from the network management client 101 and the network element device 112.
  • the network element device 112 receives the command message from the network management server 111, and is connected to the network management system, and is operated and managed by the network management system.
  • the network management server 111 includes:
  • the request receiver 102 is configured to receive a command message including the network element identifier sent by the network management client 101, and receive an operation result request message sent by the network management client 101, and return the operation result to the network management client 101.
  • the command message distributor 103 maintains a command message queue of the logical reader 104 in the network management system, and is configured to distribute the batch command message received by the request receiver 102 to different logical readers. 104 in the command message queue.
  • the logical reader 104 is configured to identify a virtual network element device in the management network management system, and the operation of the virtual network element device is stored in an internal command message queue.
  • the resource token pool 105 is set to control and manage the use of limited resources within the network management system. For example, determining whether the command message is a restricted resource message, and requesting the resource token from the resource token pool when the command message is a restricted resource message.
  • Command message scheduler 106 set to schedule command message, and start command message sender
  • the command message sender 107 is arranged to send a command message to the network element device 112.
  • the operation result processor 108 is arranged to perform corresponding processing and to send the operation result to the operation result storage pool 109 when different types of operation results are generated. At the same time, the message sent to the network element device is monitored, and if the message sent to the network element device is a restricted resource message, the resource token pool is notified.
  • the operation result storage pool 109 is set to store the result of the operation of the command message.
  • the task timer 110 is configured to start timing when the logical reader 104 requests a resource token from the resource token pool 105. If the timeout period is reached, a response timeout result is generated, and the operation result is put into the operation result processor 108. Storage pool 109.
  • the scheduling method for the batch operation using the restricted resource of the present invention includes the following steps:
  • Step S201 After receiving the command message list sent by the network management client 101, the request receiver 102 sends the command message list to the command message distributor 103.
  • Step S202 After receiving the command message list sent by the request receiver 102, the command message distributor 103 parses the network element identifier included in the command message one by one, and sends the command message to the corresponding logical reader 104 according to the network element identifier.
  • Step S203 the logic reader 104 receives the command sent by the command message distributor 103. After the message is placed, the command message is placed in the command message queue, and the task timer 110 is started to start timing.
  • Step S204 after the task timer 110 is started, the timing starts, and after the timeout period is reached, the generated operation result is given to the operation result processor 108 for logical processing.
  • Step S205 the command message scheduler 106 starts working when the system is started, and periodically retrieves whether there is a command message to be sent in the command message distributor 103.
  • Step S206 the command message distributor 103 loops through the current command message of the logical reader 104.
  • Step S207 the logic reader 104 determines whether the current command message is a restricted resource message, if yes, step S208 is performed, otherwise step S209 is performed.
  • Step S208 the logic reader 104 applies for resources to the resource token pool 105 and obtains a resource token.
  • Step S209 the logic reader 104 returns the current command message to the command message distributor.
  • step S210 the command message distributor 103 returns the command messages returned by all the logical readers 104 to the command message scheduler 106.
  • Step S211 the command message scheduler 106 schedules the command message in the logical reader 104, and starts the command message sender 107 to send the message.
  • Step S212 the command message sender 107 receives the command message sent by the command message scheduler 106, and sends a command message to the network element device 112 through the network.
  • step S213 the operation result processor 108 determines whether the resource token is occupied when the newly generated operation result is received. If the resource token is occupied, step S214 is performed; otherwise, step S215 is performed.
  • Step S214 the resource token pool 105 releases the resource token occupied by the operation result for subsequent use by other applicants.
  • Step S215 the operation result processor 108 puts the operation result into the operation result storage pool 109. in.
  • Step S216 the request receiver 102 periodically retrieves the operation result from the operation storage pool 109, and returns it to the network management client 101 for display.
  • the processing flow of the command message scheduler provided by the embodiment of the present invention specifically includes the following steps:
  • Step S301 After the request receiver receives the command message sent by the network management client, the process begins. Step S302, the command message distributor obtains the logical reader identifier according to the command message, determines whether the current command message of the logical reader and the message in the command message queue already have a restricted resource message, and if yes, executes step S315, otherwise, the step is performed. S303.
  • Step S303 the command message distributor adds the command message to the command message queue of the corresponding logical reader.
  • Step S304 the command message distributor starts the task timer and starts timing.
  • Step S305 the command message scheduler cyclically schedules the current command message in the logic reader by using the command message distributor.
  • Step S306 the command message scheduler determines whether the currently scheduled message is a restricted resource message, if yes, step S307 is performed, otherwise step S309 is performed.
  • Step S307 the command message scheduler applies for a resource token from the resource token pool.
  • Step S308 The resource token pool determines whether the application is successful according to the number of the remaining limited resources in the current system. If yes, step S309 is performed; otherwise, step S312 is performed.
  • Step S309 the logic reader's application resource token failure counter is cleared.
  • Step S310 the command message scheduler starts a command message sender, and sends a command message.
  • Step S311 the command message scheduler creates a successful transmission result, and the process ends.
  • Step S312 If the application for the resource token fails, the logical resource reader's request resource token failure counter is incremented by one.
  • Step S313 the command message scheduler determines that the logical reader fails to apply for the resource token. Whether the number exceeds the limit, if yes, step S314 is performed, otherwise step S305 is returned, waiting for the next round to be scheduled again.
  • Step S314 the command message scheduler creates a result of the operation timeout, and the process ends.
  • Step S315 the command message scheduler creates a fast failed result, and the process ends.
  • the processing flow of the operation result processor provided by the embodiment of the present invention includes the following steps:
  • Step S401 After the operation result processor receives different types of operation results generated by different timings of the system, the process starts.
  • Step S402 the operation result processor determines whether the operation result is a timeout result due to a timer arrival time point, and if yes, executes step S403, otherwise performs step S407.
  • Step S403 the operation result processor calls the logical reader corresponding to the operation result, and determines whether the timeout result generated by the timer corresponds to the current command message of the logical reader, and if yes, executes step S404, otherwise performs step S407. .
  • Step S404 the operation result processor determines whether the operation request corresponding to the operation result is a restricted resource message, if yes, step S405 is performed, otherwise step S407 is performed.
  • Step S405 The operation result processor determines whether the number of times the application resource token failure counter of the logic reader exceeds the limit by calling the logical reader corresponding to the operation result. If the limit is not exceeded, step S406 is performed; otherwise, step S407 is performed.
  • Step S406 the operation result processor starts a new timer by calling the logical reader corresponding to the operation result, and if a new timer task arrives at the time point, starts a new round of the loop processing operation result, and loops to step S401.
  • Step S407 Put the operation result into the operation result storage pool, and prepare to return to the network management client to be set to display.
  • Step S408 the operation result processor determines whether the current operation result occupies the resource token by calling the resource token pool, and if yes, executing step S409, otherwise the process ends.
  • Step S409 the resource token pool releases the resource token occupied by the current operation result, so as to be used by other restricted resource messages.
  • Command message distributor 103 All messages enter the portal of the network management system, and are assigned to the logical reader of the specific processing according to the network element identifier of the message. 104.
  • Logic Reader 104 Simulates a real network element device, corresponding to a physical network element. Responsible for managing and maintaining operational messages that are being sent and will be sent on this network element. It consists of a two-part structure, one is "current command message” and the other is "command message queue". The command message queue retrieves the message of the team head one by one, and is placed in the structure of the current command message to identify the command message currently being processed by the logic reader. After the operation result corresponding to the current command message is generated, the current command message is deleted, and the queue header message of the command message queue is taken out.
  • Resource Token Pool 105 Manages the number of resources within the network management system, providing the ability to apply for tokens and release tokens.
  • the command message sender 107 the command message dispatcher 103 retrieves the command message of the executable operation from the logical reader 104, and transmits it to the network element device by calling the command message transmitter 107.
  • the state in which the logic reader of the present invention is in the system operation includes the following possible states, wherein the current command message in the logic reader 104-b, the current command message in the logic reader 104-c, and the logic reading Command message 3 in device 104-d is a restricted resource message:
  • Logic Reader 104-a There are no restricted resource messages in the current command message and command message queue of the logic reader. When the command message distributor 103 schedules a message, the current command message is directly sent by calling the command message sender 107. In addition, if the command message 5 is newly generated at this time, since there is no restricted resource message in the current command message of the logical reader 104-a and the command message queue, and the command message queue is not full, it can be successfully inserted into the command message queue. Waiting to send.
  • the current command message for the logical reader is a restricted resource message. Life When the message distributor 103 schedules the message, it first applies the token to the resource token pool. If the application is successful, the current command message is sent by calling the command message sender 107. In addition, if the command message 5 is newly generated at this time, since the current command message of the logical reader 104-b is a restricted resource message, the result of the fast failure operation is returned, prompting the operator that the network element is performing a time-consuming operation. , please try again later, the command message 5 is no longer inserted into the command message queue.
  • the current command message for the logical reader is a restricted resource message.
  • the message dispatcher 103 schedules the message, it first requests the token in the resource token pool. If the application fails, the command message sender 107 is not called for transmission, but waits for the next request to re-apply the token.
  • the command message 5 is newly generated at this time, since the current command message of the logical reader 104-c is a restricted resource message, the result of the fast failure operation is returned, prompting the operator that the network element is performing time-consuming operations. , please try again later, the command message 5 is no longer inserted into the command message queue.
  • the current command message for the logical reader is not a restricted resource message, but there is a restricted resource message in the command message queue.
  • the command message distributor 103 schedules a message, the current command message is directly sent by calling the command message sender.
  • the command message 5 is newly generated at this time, due to the existence of the restricted resource message in the command message queue of the logical reader 104-d, the result of the fast failure operation is returned, prompting the operator that "the network element is executing time-consuming. Action, please try again later, the command message 5 is no longer inserted into the command message queue.
  • the present invention improves the batch message scheduling policy of multiple similar network elements, and divides the operation request into ordinary messages by using the physical resources and time resources required for operation. And restricted resource messages, and provide adjustments to the corresponding scheduling policy.
  • restricted resource messages and provide adjustments to the corresponding scheduling policy.
  • the concept of "restricted resources” proposed in the present invention and “resource token”, "multi-segment timer”, etc. solve the need for a single batch operation of limited resource messages in practical applications.
  • the actual problem of artificial control, batch operation limited resource message operation success rate and common timeout of common message is affected, and the result type of operation failure is refined, which is very easy to use for operator positioning problem.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed are a method and device for scheduling a batch operation using restricted resources. The method comprises: upon receiving a command message comprising a network element identifier and sent by a network management client, a request receiver sending the command message to a command message distributor; the command message distributor allocating the command message to a corresponding logic reader; the logic reader determining whether the command message is a restricted resource message, and if the command message is a restricted resource message, the logic reader applying for a resource token from a resource token pool for the command message, and after the application succeeds, sending the command message to a command message scheduler; and the command message scheduler sending the command message to a corresponding network element device through a command message sender. In the present invention, various command messages in a network management system are classified according to the principle of whether restricted resources are used, and different scheduling policies are used for different command messages, thereby implementing dynamic management of the restricted resources in the system.

Description

一种对使用受限资源的批量操作的调度方法和装置 技术领域  Scheduling method and device for batch operation using restricted resources
本发明涉及网络通信领域中大批量消息的调度技术, 特别涉及一种对 使用受限资源的批量操作的调度方法和装置。 背景技术  The present invention relates to a scheduling technique for large-scale messages in the field of network communications, and in particular, to a scheduling method and apparatus for batch operations using restricted resources. Background technique
在现有的网管系统中, 可以对多个同类网元进行批量操作, 对于大型 网管系统来说, 管理上千个网元设备也是有可能的。 对于某些操作, 消息 简单, 可以同时对数百个网元设备进行操作, 利用这种网管系统是十分方 便的。 但是对于一些特殊的操作功能, 可能需要使用一些额外的资源, 而 当资源有限时, 就不能满足同时批量操作同样个数的网元设备了。 例如, 现有网管系统中的版本下载功能, 是网元设备通过网管系统中的 FTP ( File Transfer Protocol, 文件传输协议)服务下载版本文件的方式进行的。 这里 FTP服务器支持的最大连接个数和下载时使用的网络带宽等资源都是有限 的, 不可能同时支持数百个网元设备同时进行版本下载操作。 同时, 由于 这种操作比较费时 , 它的执行又对其它简单的操作产生一定的影响。  In an existing network management system, multiple network elements of the same type can be operated in batches. For a large network management system, it is also possible to manage thousands of network element devices. For some operations, the message is simple and can operate on hundreds of network element devices at the same time. It is very convenient to use this network management system. However, for some special operation functions, some additional resources may be needed. When the resources are limited, it is impossible to simultaneously operate the same number of network element devices in batches. For example, the version download function of the existing network management system is performed by the network element device downloading the version file through the FTP (File Transfer Protocol) service in the network management system. Here, the maximum number of connections supported by the FTP server and the network bandwidth used for downloading are limited. It is impossible to simultaneously support hundreds of network element devices to simultaneously download versions. At the same time, because this operation is time consuming, its execution has a certain impact on other simple operations.
目前通用的调度策略只考虑了网元设备的处理能力, 而没有考虑到网 管系统的可利用资源。 批量操作的消息通常在一次调度中, 操作请求被全 部发送。但是,对于类似网络连接数、网络带宽和中央处理器(CPU, Central Processing Unit )利用率等受限资源, 不可能被无限制地使用, 当对需要这 些受限资源的消息进行如此的调度后, 会导致超过资源能力范围的请求操 作被执行, 从而导致操作成功率降低。  At present, the general scheduling policy only considers the processing capability of the network element device, and does not consider the available resources of the network management system. Bulk-operated messages are usually in one schedule, and operation requests are all sent. However, for a limited resource such as the number of network connections, network bandwidth, and central processing unit (CPU) utilization, it is impossible to use it without restriction. When such messages requiring these restricted resources are scheduled as such, , the request operation exceeding the resource capability range is executed, resulting in a decrease in the operation success rate.
另外, 目前通用的调度策略假定所有操作请求的执行时间都是大体相 同的, 而没有考虑到需要受限资源的消息可能会由于资源限制占用很长时 间。 对于操作失败的原因没有具体分析是真的由于网元设备问题导致的, 还是由于网管系统资源受限导致的。 In addition, the current general scheduling strategy assumes that the execution time of all operation requests is substantially the same, without considering that messages requiring restricted resources may be occupied for a long time due to resource constraints. Between. No specific analysis of the reason for the failure of the operation is caused by the problem of the network element device or due to the limited resources of the network management system.
对于这种需要使用受限资源又很耗时的消息进行批量操作的情况, 目 前普遍的做法是, 在界面上加以限制, 使得操作人员每次只能选择少量的 网元批量操作。 但是, 如果这样的话, 在实际的开局或升级场景中, 上千 个设备需要下载版本, 而每次都需要操作人员值守, 需要几百次的操作才 能完成, 这样做无疑效率是低下的。 发明内容  In the case of such a batch operation requiring limited resources and time-consuming messages, it is currently common practice to limit the interface so that the operator can select only a small number of network element batch operations at a time. However, if this is the case, in an actual deployment or upgrade scenario, thousands of devices need to download the version, and each time an operator is required to be on duty, which requires hundreds of operations to complete, which is undoubtedly inefficient. Summary of the invention
本发明的目的在于提供一种对使用受限资源的批量操作的调度方法和 装置, 解决普通消息和受限资源消息同时存在时的调度问题。  It is an object of the present invention to provide a scheduling method and apparatus for batch operations using restricted resources, which solves the scheduling problem when ordinary messages and restricted resource messages coexist.
根据本发明的一个方面, 提供了一种对使用受限资源的批量操作的调 度方法, 所述方法包括:  According to an aspect of the present invention, a scheduling method for a batch operation using a restricted resource is provided, the method comprising:
请求接收器接收到网管客户端发送的包括网元标识的命令消息后, 把 命令消息发送至命令消息分发器;  After receiving the command message including the network element identifier sent by the network management client, the request receiver sends the command message to the command message distributor;
命令消息分发器把命令消息分配给对应的逻辑阅读器;  The command message dispatcher assigns the command message to the corresponding logical reader;
逻辑阅读器判断命令消息是否为受限资源消息, 若命令消息为受限资 源消息, 则为命令消息向资源令牌池申请资源令牌并在申请成功后把命令 消息发送给命令消息调度器; 以及  The logic reader determines whether the command message is a restricted resource message. If the command message is a restricted resource message, the command message applies for a resource token to the resource token pool and sends the command message to the command message scheduler after the application is successful; as well as
命令消息调度器通过命令消息发送器把命令消息发送至对应的网元设 备。  The command message scheduler sends a command message to the corresponding network element device through the command message sender.
优选的, 受限资源消息是使用网络中有限资源的消息。  Preferably, the restricted resource message is a message that uses limited resources in the network.
优选的, 命令消息分发器把命令消息分配给对应的逻辑阅读器, 包括: 命令消息分发器根据网元标识得到与命令消息对应的逻辑阅读器;  Preferably, the command message distributor allocates the command message to the corresponding logical reader, and the method includes: the command message distributor obtains a logical reader corresponding to the command message according to the network element identifier;
若逻辑阅读器中的消息存在受限资源消息, 则命令消息分配失败, 创 建快速失败的结果并存储至操作结果存储池; 以及若逻辑阅读器中的消息 不存在受限资源消息, 则把命令消息分配给该逻辑阅读器。 If the message in the logical reader has a restricted resource message, the command message allocation fails, the result of the fast failure is created and stored in the operation result storage pool; and if the message in the logical reader If there is no restricted resource message, the command message is assigned to the logical reader.
优选的, 逻辑阅读器为命令消息向资源令牌池申请资源令牌, 包括: 任务计时器预先设定定时时间;  Preferably, the logic reader applies for the resource token to the resource token pool for the command message, including: the task timer presets the timing time;
逻辑阅读器每隔定时时间为命令消息在资源令牌池中申请资源令牌; 逻辑阅读器记录申请资源令牌失败次数, 若失败次数超过预先固定次 数, 则申请失败, 否则, 申请成功。  The logical reader applies for a resource token in the resource token pool for the command message at regular intervals. The logical reader records the number of failed application resource tokens. If the number of failures exceeds a fixed number of times, the application fails. Otherwise, the application succeeds.
优选的, 逻辑阅读器向资源令牌池为命令消息申请资源令牌, 若申请 失败, 则不处理命令消息, 创建操作超时的结果并存储至操作结果存储池。  Preferably, the logic reader requests a resource token for the command message from the resource token pool. If the application fails, the command message is not processed, and the result of the operation timeout is created and stored in the operation result storage pool.
优选的, 在命令消息分发器把命令消息分配给对应的逻辑阅读器之后, 所述方法还包括: 逻辑阅读器判断所述命令消息是否为受限资源消息, 若 命令消息不是受限资源消息, 则所述逻辑阅读器把所述命令消息发送给命 令消息调度器; 以及命令消息调度器通过命令消息发送器把命令消息发送 至对应的网元设备。  Preferably, after the command message distributor allocates the command message to the corresponding logical reader, the method further includes: the logic reader determining whether the command message is a restricted resource message, and if the command message is not a restricted resource message, And the logic reader sends the command message to the command message scheduler; and the command message scheduler sends the command message to the corresponding network element device by using the command message sender.
优选的, 方法还包括: 操作结果处理器监听发送至网元设备的消息, 若发送至网元设备的消息为受限资源消息, 则告知资源令牌池释放该消息 占用的资源令牌。  Preferably, the method further includes: the operation result processor listening to the message sent to the network element device, and if the message sent to the network element device is a restricted resource message, informing the resource token pool to release the resource token occupied by the message.
根据本发明的另一方面, 提供了一种对使用受限资源的批量操作的调 度装置, 所述装置包括: 请求接收器、 命令消息分发器、 逻辑阅读器、 资 源令牌池、 命令消息调度器、 和命令消息发送器; 其中,  According to another aspect of the present invention, there is provided a scheduling apparatus for a batch operation using a restricted resource, the apparatus comprising: a request receiver, a command message distributor, a logic reader, a resource token pool, a command message schedule , and command message sender; where
请求接收器, 设置为接收网管客户端发送的包括网元标识的命令消息 并发送至命令消息分发器;  The request receiver is configured to receive a command message including the network element identifier sent by the network management client, and send the command message to the command message distributor;
命令消息分发器, 设置为接收命令消息, 并把命令消息分配给对应的 逻辑阅读器;  a command message dispatcher, configured to receive a command message and assign the command message to a corresponding logical reader;
逻辑阅读器, 设置为判断命令消息是否为受限资源消息, 并当命令消 息是受限资源消息时向资源令牌池申请资源令牌; 资源令牌池, 设置为当命令消息为受限资源消息时为命令消息分配资 源令牌并在申请成功后把命令消息发送给命令消息调度器; a logical reader, configured to determine whether the command message is a restricted resource message, and apply for a resource token to the resource token pool when the command message is a restricted resource message; a resource token pool, configured to allocate a resource token for the command message when the command message is a restricted resource message, and send the command message to the command message scheduler after the application is successful;
命令消息调度器, 设置为控制命令消息发送器发送命令消息; 命令消息发送器, 设置为把命令消息发送至对应的网元设备。  The command message scheduler is configured to send a command message to the control command message sender; the command message sender is configured to send the command message to the corresponding network element device.
优选的, 受限资源消息是使用网络中有限资源的消息。  Preferably, the restricted resource message is a message that uses limited resources in the network.
优选的, 装置还包括:  Preferably, the device further comprises:
操作结果处理器, 设置为监听发送至网元设备的消息, 若发送至网元 设备的消息为受限资源消息, 则告知所述资源令牌池释放该消息占用的资 源令牌。  The operation result processor is configured to monitor the message sent to the network element device, and if the message sent to the network element device is a restricted resource message, notify the resource token pool to release the resource token occupied by the message.
与现有技术相比较, 本发明的有益效果在于: 本发明通过把网管系统 中的多种命令消息按照是否使用受限资源的原则进行分类, 对不同的命令 消息采用不同的调度策略, 实现了系统内的有限资源的动态管理, 解决了 在实际应用中单次批量操作受限资源消息数量需人为控制、 批量操作受限 资源消息操作成功率低和普通消息受影响普遍超时的实际问题, 并且细化 了操作失败的结果类型, 对于操作人员定位问题具有很好的易用性。 附图说明  Compared with the prior art, the present invention has the following advantages: The present invention classifies various command messages in the network management system according to the principle of whether to use restricted resources, and adopts different scheduling strategies for different command messages. The dynamic management of the limited resources in the system solves the practical problem that the number of limited resource messages in a single batch operation needs to be manually controlled, the success rate of the batch operation of the restricted resource message operation is low, and the normal message is generally timed out, and The result type of operation failure is refined, and it is easy to use for operator positioning problems. DRAWINGS
图 1是本发明对使用受限资源的批量操作的调度方法的流程示意图; 图 1是本发明对使用受限资源的批量操作的调度装置的组成结构示意 图;  1 is a schematic flowchart of a scheduling method for a batch operation using a restricted resource according to the present invention; FIG. 1 is a schematic structural diagram of a scheduling apparatus for a batch operation using a restricted resource according to the present invention;
图 3是本发明实施例提供的命令消息调度器的处理流程图;  FIG. 3 is a flowchart of processing a command message scheduler according to an embodiment of the present invention;
图 4是本发明实施例提供的操作结果处理器的处理流程图;  4 is a process flowchart of an operation result processor according to an embodiment of the present invention;
图 5是本发明实施例提供的分发命令消息的工作示意图。 具体实施方式  FIG. 5 is a schematic diagram of the operation of distributing a command message according to an embodiment of the present invention. detailed description
以下结合附图对本发明的优选实施例进行详细说明, 应当理解, 以下 所说明的优选实施例仅用于说明和解释本发明, 并不用于限定本发明。 如图 1 所示, 本发明提供的对使用受限资源的批量操作的调度方法的 流程可以包括如下步驟: DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings, The preferred embodiments illustrated are for illustrative purposes only and are not intended to limit the invention. As shown in FIG. 1 , the flow of the scheduling method for batch operations using restricted resources provided by the present invention may include the following steps:
步驟 S101 , 请求接收器接收到网管客户端发送的包括网元标识的命令 消息后, 把所述命令消息发送至命令消息分发器。  Step S101: After receiving the command message including the network element identifier sent by the network management client, the request receiver sends the command message to the command message distributor.
步驟 S102 ,命令消息分发器把所述命令消息分配给对应的逻辑阅读器。 命令消息分发器根据所述命令消息中的网元标识得到与所述命令消息 对应的逻辑阅读器, 若逻辑阅读器中的当前命令消息和命令消息队列中的 消息存在受限资源消息, 则命令消息分配失败, 命令消息分发器不把所述 命令消息分配给逻辑阅读器, 命令消息调度器控制逻辑阅读器创建快速失 败的结果并通过操作结果处理器存储至操作结果存储池; 若逻辑阅读器中 的当前命令消息和命令消息队列的消息不存在受限资源消息, 则把命令消 息分配给逻辑阅读器。  Step S102, the command message distributor allocates the command message to the corresponding logical reader. The command message distributor obtains a logical reader corresponding to the command message according to the network element identifier in the command message, and if the current command message in the logical reader and the message in the command message queue have a restricted resource message, the command The message allocation fails, the command message distributor does not assign the command message to the logical reader, and the command message scheduler controls the logical reader to create a fast failed result and stores it through the operation result processor to the operation result storage pool; if the logical reader The current command message in the command message and the command message queue message do not have a restricted resource message, and the command message is assigned to the logical reader.
其中, 受限资源消息是使用网络中有限资源的消息。  The restricted resource message is a message that uses limited resources in the network.
步驟 S103 , 逻辑阅读器判断命令消息是否为受限资源消息, 若命令消 息为受限资源消息, 则逻辑阅读器为命令消息向资源令牌池申请资源令牌 并在申请成功后把命令消息发送给命令消息调度器, 若命令消息不是受限 资源消息, 则逻辑阅读器通过命令消息分发器把命令消息发送给命令消息 调度器。  Step S103: The logic reader determines whether the command message is a restricted resource message. If the command message is a restricted resource message, the logic reader applies a resource token to the resource token pool for the command message and sends the command message after the application is successful. To the command message scheduler, if the command message is not a restricted resource message, the logic reader sends a command message to the command message scheduler via the command message distributor.
其中, 逻辑阅读器为命令消息向资源令牌池申请资源令牌的步驟如下: 任务计时器预先设定定时时间, 逻辑阅读器每隔定时时间为命令消息在资 源令牌池中申请资源令牌, 逻辑阅读器记录申请资源令牌失败次数, 若失 败次数超过预先设置的固定次数, 则申请失败, 否则, 申请成功。 若申请 成功, 则逻辑阅读器通过命令消息分发器把命令消息发送给命令消息调度 器, 若申请失败, 则不处理命令消息, 创建操作超时的结果并存储至操作 结果存储池。 The logic reader processes the resource token for the resource token pool for the command message as follows: The task timer presets the timing time, and the logic reader applies for the resource token in the resource token pool for the command message every regular time. The logical reader records the number of failed application resource tokens. If the number of failures exceeds a preset fixed number of times, the application fails. Otherwise, the application is successful. If the application is successful, the logic reader sends the command message to the command message scheduler through the command message distributor. If the application fails, the command message is not processed, and the result of the operation timeout is created and stored to the operation. Result storage pool.
步驟 S104, 命令消息调度器通过命令消息发送器把命令消息发送至对 应的网元设备。  Step S104: The command message scheduler sends the command message to the corresponding network element device by using the command message sender.
此外, 操作结果处理器监听发送至网元设备的消息, 若发送至网元设 备的消息为受限资源消息, 则操作结果处理器告知资源令牌池释放该消息 占用的资源令牌。 其中, 资源令牌池的令牌数量是固定的, 若逻辑阅读器 为命令消息向资源令牌池申请资源令牌时, 若当前正在处理的命令消息中 是受限资源消息的数量已达到资源令牌池的令牌数量, 则申请失败, 否贝' J , 申请成功。  In addition, the operation result processor monitors the message sent to the network element device. If the message sent to the network element device is a restricted resource message, the operation result processor notifies the resource token pool to release the resource token occupied by the message. The number of tokens in the resource token pool is fixed. If the logical reader requests a resource token from the resource token pool, the number of restricted resource messages in the command message currently being processed has reached the resource. If the number of tokens in the token pool is exceeded, the application fails. Otherwise, the application is successful.
操作结果处理器会把所有的操作结果发送至操作结果存储池 , 请求接 收器根据网管客户端发送的操作结果请求消息从操作结果存储池中读取操 作结果并发送给网管客户端。  The operation result processor sends all the operation results to the operation result storage pool, and the request receiver reads the operation result from the operation result storage pool according to the operation result request message sent by the network management client and sends the operation result to the network management client.
如图 1所示, 本发明提供的对使用受限资源的批量操作的调度装置包 括网管客户端 101、 网管服务端 111和网元设备 112。  As shown in FIG. 1, the scheduling apparatus for batch operation using restricted resources provided by the present invention includes a network management client 101, a network management server 111, and a network element device 112.
网管客户端 101 —方面设置为组装包含网元标识和操作标识的命令消 息给网管月良务端 111 , 另一方面网管客户端 101定时向网管月良务端 111请求 操作结果, 并显示操作结果在图形界面上。 网管服务端 111 设置为处理来 自网管客户端 101和网元设备 112的消息。 网元设备 112接收来自网管服 务端 111的命令消息, 与网管系统相连, 由网管系统进行操作管理。  The network management client 101 is configured to assemble a command message including the network element identifier and the operation identifier to the network management server 111. On the other hand, the network management client 101 periodically requests the operation result from the network management server 111, and displays the operation result. On the graphical interface. The network management server 111 is configured to process messages from the network management client 101 and the network element device 112. The network element device 112 receives the command message from the network management server 111, and is connected to the network management system, and is operated and managed by the network management system.
其中, 网管服务端 111包括:  The network management server 111 includes:
请求接收器 102 ,设置为接收网管客户端 101发送的包括网元标识的命 令消息, 以及接收网管客户端 101 发送的操作结果请求消息并将操作结果 返回给网管客户端 101。  The request receiver 102 is configured to receive a command message including the network element identifier sent by the network management client 101, and receive an operation result request message sent by the network management client 101, and return the operation result to the network management client 101.
命令消息分发器 103 ,维护着网管系统中逻辑阅读器 104的命令消息队 列, 设置为将请求接收器 102 收到的批量命令消息分发到不同逻辑阅读器 104的命令消息队列中。 The command message distributor 103 maintains a command message queue of the logical reader 104 in the network management system, and is configured to distribute the batch command message received by the request receiver 102 to different logical readers. 104 in the command message queue.
逻辑阅读器 104,设置为标识管理网管系统中的虚拟网元设备,对该虚 拟网元设备的操作存储在内部的命令消息队列中。  The logical reader 104 is configured to identify a virtual network element device in the management network management system, and the operation of the virtual network element device is stored in an internal command message queue.
资源令牌池 105 , 设置为控制和管理网管系统内有限资源的使用。 如, 判断命令消息是否为受限资源消息, 当命令消息是受限资源消息时向资源 令牌池申请资源令牌。  The resource token pool 105 is set to control and manage the use of limited resources within the network management system. For example, determining whether the command message is a restricted resource message, and requesting the resource token from the resource token pool when the command message is a restricted resource message.
命令消息调度器 106, 设置为调度命令消息, 并启动命令消息发送器 Command message scheduler 106, set to schedule command message, and start command message sender
107。 107.
命令消息发送器 107, 设置为将命令消息发送给网元设备 112。  The command message sender 107 is arranged to send a command message to the network element device 112.
操作结果处理器 108,设置为在产生不同类型的操作结果时, 进行相应 的处理并把操作结果发送给操作结果存储池 109。 同时,监听发送至网元设 备的消息, 若发送至网元设备的消息为受限资源消息, 则告知资源令牌池 The operation result processor 108 is arranged to perform corresponding processing and to send the operation result to the operation result storage pool 109 when different types of operation results are generated. At the same time, the message sent to the network element device is monitored, and if the message sent to the network element device is a restricted resource message, the resource token pool is notified.
105释放该消息占用的资源令牌。 105 releases the resource token occupied by the message.
操作结果存储池 109, 设置为存储命令消息的操作结果。  The operation result storage pool 109 is set to store the result of the operation of the command message.
任务计时器 110,设置为在逻辑阅读器 104向资源令牌池 105申请资源 令牌时开始计时, 如果到达超时时间后, 就生成一个响应超时结果, 并通 过操作结果处理器 108放入操作结果存储池 109。  The task timer 110 is configured to start timing when the logical reader 104 requests a resource token from the resource token pool 105. If the timeout period is reached, a response timeout result is generated, and the operation result is put into the operation result processor 108. Storage pool 109.
对照图 2,本发明的对使用受限资源的批量操作的调度方法包括如下步 驟:  Referring to FIG. 2, the scheduling method for the batch operation using the restricted resource of the present invention includes the following steps:
步驟 S201 , 请求接收器 102接收到网管客户端 101发送的命令消息列 表后, 将命令消息列表发送给命令消息分发器 103。  Step S201: After receiving the command message list sent by the network management client 101, the request receiver 102 sends the command message list to the command message distributor 103.
步驟 S202, 命令消息分发器 103接收到请求接收器 102发送的命令消 息列表后, 逐一解析出命令消息中包含的网元标识, 根据网元标识将命令 消息发送给对应的逻辑阅读器 104。  Step S202: After receiving the command message list sent by the request receiver 102, the command message distributor 103 parses the network element identifier included in the command message one by one, and sends the command message to the corresponding logical reader 104 according to the network element identifier.
步驟 S203 , 逻辑阅读器 104接收到命令消息分发器 103发送的命令消 息后, 将命令消息放到命令消息队列中, 同时启动任务计时器 110, 开始计 时。 Step S203, the logic reader 104 receives the command sent by the command message distributor 103. After the message is placed, the command message is placed in the command message queue, and the task timer 110 is started to start timing.
步驟 S204, 任务计时器 110启动后, 计时开始, 到达超时时间后, 产 生的操作结果交给操作结果处理器 108进行逻辑处理。  Step S204, after the task timer 110 is started, the timing starts, and after the timeout period is reached, the generated operation result is given to the operation result processor 108 for logical processing.
步驟 S205 , 命令消息调度器 106在系统启动时开始工作, 定时检索命 令消息分发器 103中是否有需要发送的命令消息。  Step S205, the command message scheduler 106 starts working when the system is started, and periodically retrieves whether there is a command message to be sent in the command message distributor 103.
步驟 S206, 命令消息分发器 103循环遍历逻辑阅读器 104的当前命令 消息。  Step S206, the command message distributor 103 loops through the current command message of the logical reader 104.
步驟 S207, 逻辑阅读器 104判断当前命令消息是否是受限资源消息, 如果是则执行步驟 S208, 否则执行步驟 S209。  Step S207, the logic reader 104 determines whether the current command message is a restricted resource message, if yes, step S208 is performed, otherwise step S209 is performed.
步驟 S208, 逻辑阅读器 104向资源令牌池 105申请资源并取得资源令 牌。  Step S208, the logic reader 104 applies for resources to the resource token pool 105 and obtains a resource token.
步驟 S209 , 逻辑阅读器 104 将当前命令消息返回给命令消息分发器 Step S209, the logic reader 104 returns the current command message to the command message distributor.
103。 103.
步驟 S210, 命令消息分发器 103将所有逻辑阅读器 104返回的命令消 息返回给命令消息调度器 106。  In step S210, the command message distributor 103 returns the command messages returned by all the logical readers 104 to the command message scheduler 106.
步驟 S211 , 命令消息调度器 106调度逻辑阅读器 104中的命令消息, 并启动命令消息发送器 107发送消息。  Step S211, the command message scheduler 106 schedules the command message in the logical reader 104, and starts the command message sender 107 to send the message.
步驟 S212, 命令消息发送器 107接收到命令消息调度器 106发送的命 令消息, 通过网络向网元设备 112发送命令消息。  Step S212, the command message sender 107 receives the command message sent by the command message scheduler 106, and sends a command message to the network element device 112 through the network.
步驟 S213 , 操作结果处理器 108在收到新产生的操作结果时, 判断是 否占用资源令牌,如果占用资源令牌则执行步驟 S214,否则执行步驟 S215。  In step S213, the operation result processor 108 determines whether the resource token is occupied when the newly generated operation result is received. If the resource token is occupied, step S214 is performed; otherwise, step S215 is performed.
步驟 S214, 资源令牌池 105释放该操作结果占用的资源令牌以便后续 给其他申请者使用。  Step S214, the resource token pool 105 releases the resource token occupied by the operation result for subsequent use by other applicants.
步驟 S215 , 操作结果处理器 108将操作结果放入操作结果存储池 109 中。 Step S215, the operation result processor 108 puts the operation result into the operation result storage pool 109. in.
步驟 S216, 请求接收器 102定时从操作存储池 109中取出操作结果, 返回给网管客户端 101显示。  Step S216, the request receiver 102 periodically retrieves the operation result from the operation storage pool 109, and returns it to the network management client 101 for display.
如图 3 所示, 本发明实施例提供的命令消息调度器的处理流程具体包 括如下步驟:  As shown in FIG. 3, the processing flow of the command message scheduler provided by the embodiment of the present invention specifically includes the following steps:
步驟 S301 ,请求接收器收到网管客户端发送的命令消息后, 流程开始。 步驟 S302 , 命令消息分发器根据命令消息取得逻辑阅读器标识, 判断 该逻辑阅读器的当前命令消息和命令消息队列中的消息是否已经存在受限 资源消息, 如果存在则执行步驟 S315 , 否则执行步驟 S303。  Step S301: After the request receiver receives the command message sent by the network management client, the process begins. Step S302, the command message distributor obtains the logical reader identifier according to the command message, determines whether the current command message of the logical reader and the message in the command message queue already have a restricted resource message, and if yes, executes step S315, otherwise, the step is performed. S303.
步驟 S303 , 命令消息分发器将命令消息加入到对应逻辑阅读器的命令 消息队列中。  Step S303, the command message distributor adds the command message to the command message queue of the corresponding logical reader.
步驟 S304, 命令消息分发器启动任务定时器, 开始计时。  Step S304, the command message distributor starts the task timer and starts timing.
步驟 S305 , 命令消息调度器通过命令消息分发器循环调度逻辑阅读器 内的当前命令消息。  Step S305, the command message scheduler cyclically schedules the current command message in the logic reader by using the command message distributor.
步驟 S306, 命令消息调度器判断当前调度到的消息是否是受限资源消 息, 如果是则执行步驟 S307, 否则执行步驟 S309。  Step S306, the command message scheduler determines whether the currently scheduled message is a restricted resource message, if yes, step S307 is performed, otherwise step S309 is performed.
步驟 S307, 命令消息调度器向资源令牌池申请资源令牌。  Step S307, the command message scheduler applies for a resource token from the resource token pool.
步驟 S308 , 资源令牌池根据当前系统内剩余的受限资源的数量, 判断 申请是否成功, 如果是则执行步驟 S309, 否则执行步驟 S312。  Step S308: The resource token pool determines whether the application is successful according to the number of the remaining limited resources in the current system. If yes, step S309 is performed; otherwise, step S312 is performed.
步驟 S309, 该逻辑阅读器的申请资源令牌失败计数器清零。  Step S309, the logic reader's application resource token failure counter is cleared.
步驟 S310 , 命令消息调度器启动命令消息发送器, 发送命令消息。 步驟 S311 , 命令消息调度器创建发送成功的结果, 流程结束。  Step S310, the command message scheduler starts a command message sender, and sends a command message. Step S311, the command message scheduler creates a successful transmission result, and the process ends.
步驟 S312 , 如果申请资源令牌失败, 该逻辑阅读器的申请资源令牌失 败计数器加 1。  Step S312: If the application for the resource token fails, the logical resource reader's request resource token failure counter is incremented by one.
步驟 S313 , 命令消息调度器判断该逻辑阅读器的申请资源令牌失败次 数是否超过限制, 如果是则执行步驟 S314, 否则返回步驟 S305 , 等待下一 轮再次被调度。 Step S313, the command message scheduler determines that the logical reader fails to apply for the resource token. Whether the number exceeds the limit, if yes, step S314 is performed, otherwise step S305 is returned, waiting for the next round to be scheduled again.
步驟 S314, 命令消息调度器创建操作超时的结果, 流程结束。  Step S314, the command message scheduler creates a result of the operation timeout, and the process ends.
步驟 S315 , 命令消息调度器创建快速失败的结果, 流程结束。  Step S315, the command message scheduler creates a fast failed result, and the process ends.
如图 4所示, 本发明实施例提供的操作结果处理器的处理流程包括如 下步驟:  As shown in FIG. 4, the processing flow of the operation result processor provided by the embodiment of the present invention includes the following steps:
步驟 S401 , 操作结果处理器收到系统不同时机产生的不同类型的操作 结果后, 流程开始。  Step S401: After the operation result processor receives different types of operation results generated by different timings of the system, the process starts.
步驟 S402, 操作结果处理器判断所述操作结果是否是由于定时器到达 时间点所产生的超时结果, 如果是则执行步驟 S403 , 否则执行步驟 S407。  Step S402, the operation result processor determines whether the operation result is a timeout result due to a timer arrival time point, and if yes, executes step S403, otherwise performs step S407.
步驟 S403 , 操作结果处理器调用该操作结果对应的逻辑阅读器, 判断 此时定时器产生的超时结果对应的是否是该逻辑阅读器的当前命令消息, 如果是则执行步驟 S404, 否则执行步驟 S407。  Step S403, the operation result processor calls the logical reader corresponding to the operation result, and determines whether the timeout result generated by the timer corresponds to the current command message of the logical reader, and if yes, executes step S404, otherwise performs step S407. .
步驟 S404, 操作结果处理器判断该操作结果对应的操作请求是否是受 限资源消息, 如果是则执行步驟 S405 , 否则执行步驟 S407。  Step S404, the operation result processor determines whether the operation request corresponding to the operation result is a restricted resource message, if yes, step S405 is performed, otherwise step S407 is performed.
步驟 S405 , 操作结果处理器通过调用该操作结果对应的逻辑阅读器, 判断此逻辑阅读器的申请资源令牌失败计数器的次数是否超过限制, 如果 没有超过限制则执行步驟 S406, 否则执行步驟 S407。  Step S405: The operation result processor determines whether the number of times the application resource token failure counter of the logic reader exceeds the limit by calling the logical reader corresponding to the operation result. If the limit is not exceeded, step S406 is performed; otherwise, step S407 is performed.
步驟 S406, 操作结果处理器通过调用该操作结果对应的逻辑阅读器, 启动新的定时器, 如果新的定时器任务到达时间点后, 开始新的一轮循环 处理操作结果, 循环执行步驟 S401。  Step S406, the operation result processor starts a new timer by calling the logical reader corresponding to the operation result, and if a new timer task arrives at the time point, starts a new round of the loop processing operation result, and loops to step S401.
步驟 S407, 将操作结果放入操作结果存储池中, 准备返回给网管客户 端设置为显示。  Step S407: Put the operation result into the operation result storage pool, and prepare to return to the network management client to be set to display.
步驟 S408, 操作结果处理器通过调用资源令牌池, 判断本次操作结果 是否占用了资源令牌, 如果是则执行步驟 S409, 否则流程结束。 步驟 S409, 资源令牌池释放本次操作结果占用的资源令牌, 以备其他 受限资源消息使用。 Step S408, the operation result processor determines whether the current operation result occupies the resource token by calling the resource token pool, and if yes, executing step S409, otherwise the process ends. Step S409, the resource token pool releases the resource token occupied by the current operation result, so as to be used by other restricted resource messages.
如图 5所示, 本发明实施例提供的分发命令消息的工作过程如下: 命令消息分发器 103: 所有消息进入网管系统的入口, 由其根据消息的 网元标识分配给具体处理的逻辑阅读器 104。  As shown in FIG. 5, the working process of the distribution command message provided by the embodiment of the present invention is as follows: Command message distributor 103: All messages enter the portal of the network management system, and are assigned to the logical reader of the specific processing according to the network element identifier of the message. 104.
逻辑阅读器 104: 模拟真实的网元设备, 与物理网元——对应。 负责管 理和维护该网元上正在发送和将要发送的操作消息。 其中包括两部分结构, 一个是 "当前命令消息", 一个是 "命令消息队列"。 命令消息队列逐一取 出队头的消息, 放在当前命令消息的结构中, 用来标识该逻辑阅读器当前 正在处理的命令消息。 当产生了与当前命令消息对应的操作结果后, 删除 当前命令消息, 再将命令消息队列的队头消息取出。  Logic Reader 104: Simulates a real network element device, corresponding to a physical network element. Responsible for managing and maintaining operational messages that are being sent and will be sent on this network element. It consists of a two-part structure, one is "current command message" and the other is "command message queue". The command message queue retrieves the message of the team head one by one, and is placed in the structure of the current command message to identify the command message currently being processed by the logic reader. After the operation result corresponding to the current command message is generated, the current command message is deleted, and the queue header message of the command message queue is taken out.
资源令牌池 105: 管理网管系统内的资源数量,提供申请令牌和释放令 牌的功能。  Resource Token Pool 105: Manages the number of resources within the network management system, providing the ability to apply for tokens and release tokens.
命令消息发送器 107:命令消息分发器 103从逻辑阅读器 104中取出的 可执行操作的命令消息, 通过调用命令消息发送器 107发送给网元设备。  The command message sender 107: the command message dispatcher 103 retrieves the command message of the executable operation from the logical reader 104, and transmits it to the network element device by calling the command message transmitter 107.
并且, 本发明的逻辑阅读器在系统运行中所处的状态包括以下几种可 能状态, 其中逻辑阅读器 104-b中的当前命令消息、 逻辑阅读器 104-c中的 当前命令消息、 逻辑阅读器 104-d中的命令消息 3是受限资源消息:  Moreover, the state in which the logic reader of the present invention is in the system operation includes the following possible states, wherein the current command message in the logic reader 104-b, the current command message in the logic reader 104-c, and the logic reading Command message 3 in device 104-d is a restricted resource message:
逻辑阅读器 104-a: 该逻辑阅读器的当前命令消息和命令消息队列中均 无受限资源消息。 命令消息分发器 103 调度消息时, 直接将当前命令消息 通过调用命令消息发送器 107进行发送。 另外, 如果此时新产生了命令消 息 5 , 由于逻辑阅读器 104-a的当前命令消息和命令消息队列中均无受限资 源消息, 并且命令消息队列未满, 可以成功插入到命令消息队列中等待发 送。  Logic Reader 104-a: There are no restricted resource messages in the current command message and command message queue of the logic reader. When the command message distributor 103 schedules a message, the current command message is directly sent by calling the command message sender 107. In addition, if the command message 5 is newly generated at this time, since there is no restricted resource message in the current command message of the logical reader 104-a and the command message queue, and the command message queue is not full, it can be successfully inserted into the command message queue. Waiting to send.
逻辑阅读器 104-b: 该逻辑阅读器的当前命令消息是受限资源消息。 命 令消息分发器 103调度消息时, 首先到资源令牌池中申请令牌, 如果申请 成功, 将当前命令消息通过调用命令消息发送器 107进行发送。 另外, 如 果此时新产生了命令消息 5 , 由于逻辑阅读器 104-b的当前命令消息是受限 资源消息, 此时返回快速失败的操作结果, 提示操作人员 "该网元正在执 行耗时操作, 请稍后再试" 的提示, 不再将此命令消息 5插入到命令消息 队列中。 Logic Reader 104-b: The current command message for the logical reader is a restricted resource message. Life When the message distributor 103 schedules the message, it first applies the token to the resource token pool. If the application is successful, the current command message is sent by calling the command message sender 107. In addition, if the command message 5 is newly generated at this time, since the current command message of the logical reader 104-b is a restricted resource message, the result of the fast failure operation is returned, prompting the operator that the network element is performing a time-consuming operation. , please try again later, the command message 5 is no longer inserted into the command message queue.
逻辑阅读器 104-c: 该逻辑阅读器的当前命令消息是受限资源消息。 命 令消息分发器 103调度消息时, 首先到资源令牌池中申请令牌, 如果申请 失败, 不调用命令消息发送器 107进行发送, 而是等待下一次调度时重新 申请令牌。 另外, 如果此时新产生了命令消息 5 , 由于逻辑阅读器 104-c的 当前命令消息是受限资源消息, 此时返回快速失败的操作结果, 提示操作 人员 "该网元正在执行耗时操作, 请稍后再试" 的提示, 不再将此命令消 息 5插入到命令消息队列中。  Logic Reader 104-c: The current command message for the logical reader is a restricted resource message. When the message dispatcher 103 schedules the message, it first requests the token in the resource token pool. If the application fails, the command message sender 107 is not called for transmission, but waits for the next request to re-apply the token. In addition, if the command message 5 is newly generated at this time, since the current command message of the logical reader 104-c is a restricted resource message, the result of the fast failure operation is returned, prompting the operator that the network element is performing time-consuming operations. , please try again later, the command message 5 is no longer inserted into the command message queue.
逻辑阅读器 104-d: 该逻辑阅读器的当前命令消息不是受限资源消息, 但是命令消息队列中存在受限资源消息。 命令消息分发器 103调度消息时, 直接将当前命令消息通过调用命令消息发送器进行发送。 另外, 如果此时 新产生了命令消息 5, 由于逻辑阅读器 104-d的命令消息队列中存在受限资 源消息, 此时返回快速失败的操作结果, 提示操作人员 "该网元正在执行 耗时操作, 请稍后再试" 的提示, 不再将此命令消息 5插入到命令消息队 列中。  Logic Reader 104-d: The current command message for the logical reader is not a restricted resource message, but there is a restricted resource message in the command message queue. When the command message distributor 103 schedules a message, the current command message is directly sent by calling the command message sender. In addition, if the command message 5 is newly generated at this time, due to the existence of the restricted resource message in the command message queue of the logical reader 104-d, the result of the fast failure operation is returned, prompting the operator that "the network element is executing time-consuming. Action, please try again later, the command message 5 is no longer inserted into the command message queue.
综上所述, 本发明具有以下技术效果: 本发明对多个同类网元的批量 消息调度策略进行了改进, 以操作需要使用的物理资源和时间资源多少为 原则, 将操作请求分为普通消息和受限资源消息两类, 并提供了相应的调 度策略上的调整。 本发明中提出的 "受限资源"的概念和 "资源令牌"、 "多 段式定时器" 等, 解决了在实际应用中单次批量操作受限资源消息数量需 人为控制、 批量操作受限资源消息操作成功率低和普通消息受影响普遍超 时的实际问题, 并且细化了操作失败的结果类型, 对于操作人员定位问题 具有很好的易用性。 In summary, the present invention has the following technical effects: The present invention improves the batch message scheduling policy of multiple similar network elements, and divides the operation request into ordinary messages by using the physical resources and time resources required for operation. And restricted resource messages, and provide adjustments to the corresponding scheduling policy. The concept of "restricted resources" proposed in the present invention and "resource token", "multi-segment timer", etc., solve the need for a single batch operation of limited resource messages in practical applications. The actual problem of artificial control, batch operation limited resource message operation success rate and common timeout of common message is affected, and the result type of operation failure is refined, which is very easy to use for operator positioning problem.

Claims

权利要求书 Claim
1、 一种对使用受限资源的批量操作的调度方法, 所述方法包括: 请求接收器接收到网管客户端发送的包括网元标识的命令消息后, 把 所述命令消息发送至命令消息分发器;  A scheduling method for a batch operation using a restricted resource, the method comprising: after receiving a command message including a network element identifier sent by a network management client, the requesting receiver sends the command message to a command message distribution Device
所述命令消息分发器把所述命令消息分配给对应的逻辑阅读器; 所述逻辑阅读器判断所述命令消息是否为受限资源消息, 若所述命令 消息为受限资源消息, 则为所述命令消息向资源令牌池申请资源令牌并在 申请成功后把所述命令消息发送给命令消息调度器; 以及  The command message distributor allocates the command message to a corresponding logical reader; the logic reader determines whether the command message is a restricted resource message, and if the command message is a restricted resource message, The command message requests a resource token from the resource token pool and sends the command message to the command message scheduler after the application is successful;
所述命令消息调度器通过命令消息发送器把所述命令消息发送至对应 的网元设备。  The command message scheduler sends the command message to the corresponding network element device by using a command message sender.
2、 根据权利要求 1所述的方法, 所述受限资源消息是使用网络中有限 资源的消息。  2. The method of claim 1, the restricted resource message being a message that uses limited resources in the network.
3、 根据权利要求 2所述的方法, 所述命令消息分发器把所述命令消息 分配给对应的逻辑阅读器, 包括:  3. The method of claim 2, the command message distributor assigning the command message to a corresponding logical reader, comprising:
所述命令消息分发器根据所述网元标识得到与所述命令消息对应的逻 辑阅读器;  The command message distributor obtains a logical reader corresponding to the command message according to the network element identifier;
若所述逻辑阅读器中的消息存在受限资源消息, 则命令消息分配失败, 创建快速失败的结果并存储至操作结果存储池; 以及  If the message in the logical reader has a restricted resource message, the command message allocation fails, and the fast failed result is created and stored in the operation result storage pool;
若所述逻辑阅读器中的消息不存在受限资源消息, 则把所述命令消息 分配给所述逻辑阅读器。  If the message in the logical reader does not have a restricted resource message, the command message is assigned to the logical reader.
4、 根据权利要求 3所述的方法, 所述逻辑阅读器为所述命令消息向资 源令牌池申请资源令牌, 包括:  4. The method according to claim 3, the logic reader applying for the resource token to the resource token pool for the command message, including:
任务计时器预先设定定时时间;  The task timer presets the timing time;
所述逻辑阅读器每隔所述定时时间为所述命令消息在资源令牌池中申 请资源令牌; 以及 所述逻辑阅读器记录申请资源令牌失败次数, 若失败次数超过预先固 定次数, 则申请失败, 否则, 申请成功。 The logic reader requests a resource token in the resource token pool for the command message every time the timing message is; and The logical reader records the number of failed application resource tokens. If the number of failures exceeds a fixed number of times, the application fails. Otherwise, the application is successful.
5、 根据权利要求 4所述的方法, 所述方法还包括: 所述逻辑阅读器向 资源令牌池为所述命令消息申请资源令牌, 若申请失败, 则不处理所述命 令消息 , 创建操作超时的结果并存储至操作结果存储池。  5. The method according to claim 4, the method further comprising: the logic reader applying a resource token to the resource token pool for the command message, and if the application fails, not processing the command message, creating The result of the operation timeout is stored in the operation result storage pool.
6、 根据权利要求 5所述的方法, 在所述命令消息分发器把命令消息分 配给对应的逻辑阅读器之后, 所述方法还包括:  The method of claim 5, after the command message distributor assigns the command message to the corresponding logical reader, the method further includes:
所述逻辑阅读器判断所述命令消息是否为受限资源消息, 若所述命令 消息不是受限资源消息, 则所述逻辑阅读器把所述命令消息发送给命令消 息调度器; 以及  The logic reader determines whether the command message is a restricted resource message, and if the command message is not a restricted resource message, the logic reader sends the command message to a command message scheduler;
所述命令消息调度器通过命令消息发送器把所述命令消息发送至对应 的网元设备。  The command message scheduler sends the command message to the corresponding network element device by using a command message sender.
7、 根据权利要求 6所述的方法, 所述方法还包括:  7. The method of claim 6, further comprising:
操作结果处理器监听发送至网元设备的消息, 若发送至网元设备的消 息为受限资源消息, 则告知资源令牌池释放该消息占用的资源令牌。  The operation result processor listens to the message sent to the network element device, and if the message sent to the network element device is a restricted resource message, instructs the resource token pool to release the resource token occupied by the message.
8、 一种对使用受限资源的批量操作的调度装置, 所述装置包括: 请求 接收器、 命令消息分发器、 逻辑阅读器、 资源令牌池、 命令消息调度器、 和命令消息发送器; 其中,  8. A scheduling apparatus for batch operations using restricted resources, the apparatus comprising: a request receiver, a command message distributor, a logic reader, a resource token pool, a command message scheduler, and a command message sender; among them,
请求接收器, 设置为接收网管客户端发送的包括网元标识的命令消息 并发送至命令消息分发器;  The request receiver is configured to receive a command message including the network element identifier sent by the network management client, and send the command message to the command message distributor;
命令消息分发器, 设置为接收所述命令消息, 并把所述命令消息分配 给对应的逻辑阅读器;  a command message dispatcher configured to receive the command message and assign the command message to a corresponding logical reader;
逻辑阅读器, 设置为判断所述命令消息是否为受限资源消息, 并当所 述命令消息是受限资源消息时向资源令牌池申请资源令牌;  a logic reader, configured to determine whether the command message is a restricted resource message, and request a resource token from the resource token pool when the command message is a restricted resource message;
资源令牌池, 设置为当所述命令消息为受限资源消息时为所述命令消 息分配资源令牌并在申请成功后把所述命令消息发送给命令消息调度器; 命令消息调度器, 设置为控制命令消息发送器发送所述命令消息; 以 及 a resource token pool, set to be the command when the command message is a restricted resource message Allocating a resource token and sending the command message to the command message scheduler after the application is successful; the command message scheduler is configured to send the command message by the control command message sender;
命令消息发送器, 设置为把所述命令消息发送至对应的网元设备。  The command message sender is configured to send the command message to the corresponding network element device.
9、 根据权利要求 8所述的装置, 所述受限资源消息是使用网络中有限 资源的消息。 9. The apparatus of claim 8, the restricted resource message being a message that uses limited resources in the network.
10、 根据权利要求 9所述的装置, 所述装置还包括:  10. The device of claim 9, the device further comprising:
操作结果处理器, 设置为监听发送至网元设备的消息, 若发送至网元 设备的消息为受限资源消息, 则告知所述资源令牌池释放该消息占用的资 源令牌。  The operation result processor is configured to monitor the message sent to the network element device, and if the message sent to the network element device is a restricted resource message, notify the resource token pool to release the resource token occupied by the message.
PCT/CN2012/072555 2011-07-21 2012-03-19 Method and device for scheduling batch operation using restricted resources WO2012155642A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110205667.1A CN102891806B (en) 2011-07-21 2011-07-21 A kind of dispatching method to the batch operation using limited resources and device
CN201110205667.1 2011-07-21

Publications (1)

Publication Number Publication Date
WO2012155642A1 true WO2012155642A1 (en) 2012-11-22

Family

ID=47176244

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072555 WO2012155642A1 (en) 2011-07-21 2012-03-19 Method and device for scheduling batch operation using restricted resources

Country Status (2)

Country Link
CN (1) CN102891806B (en)
WO (1) WO2012155642A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291212A (en) * 2020-10-16 2021-01-29 北京锐安科技有限公司 Static rule management method and device, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332814B (en) * 2016-04-29 2021-01-01 华为技术有限公司 Request message transmission method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217412A (en) * 2008-01-03 2008-07-09 烽火通信科技股份有限公司 A method of optical network terminal batch grading in passive optical network system on gigabit Ethernet
CN101222367A (en) * 2008-01-28 2008-07-16 中兴通讯股份有限公司 Method and network guard system used for cluster network element updating version file
US20090241117A1 (en) * 2008-03-20 2009-09-24 International Business Machines Corporation Method for integrating flow orchestration and scheduling for a batch of workflows
CN102420698A (en) * 2011-11-21 2012-04-18 天津中兴软件有限责任公司 Dispatching method for bulk operation using limited resource

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217412A (en) * 2008-01-03 2008-07-09 烽火通信科技股份有限公司 A method of optical network terminal batch grading in passive optical network system on gigabit Ethernet
CN101222367A (en) * 2008-01-28 2008-07-16 中兴通讯股份有限公司 Method and network guard system used for cluster network element updating version file
US20090241117A1 (en) * 2008-03-20 2009-09-24 International Business Machines Corporation Method for integrating flow orchestration and scheduling for a batch of workflows
CN102420698A (en) * 2011-11-21 2012-04-18 天津中兴软件有限责任公司 Dispatching method for bulk operation using limited resource

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291212A (en) * 2020-10-16 2021-01-29 北京锐安科技有限公司 Static rule management method and device, electronic equipment and storage medium
CN112291212B (en) * 2020-10-16 2023-02-28 北京锐安科技有限公司 Static rule management method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN102891806B (en) 2017-03-01
CN102891806A (en) 2013-01-23

Similar Documents

Publication Publication Date Title
CN110290180B (en) Distributed task scheduling method and device, computer equipment and storage medium
RU2293444C2 (en) Method for dispatching scanning of devices for reading data
CN103118076B (en) Upgraded server cluster system and load balancing method thereof
CN101359295B (en) Batch task scheduling and allocating method and system
US20210294658A1 (en) Systems and methods for automatically scaling compute resources based on demand
US7529820B2 (en) Method and apparatus to perform automated task handling
CN105323106B (en) Software upgrading management method, device and system
CN104679528B (en) The newer method and apparatus of application program remote
US20180309715A1 (en) Address assignment method, gateway, and system
CN108733461A (en) Distributed task dispatching method and apparatus
US9407669B1 (en) Communications pacing
WO2021159831A1 (en) Programming platform user code running method, platform, node, device and medium
KR20080060927A (en) Server, client and method for supporting/performing update thereof
WO2012155642A1 (en) Method and device for scheduling batch operation using restricted resources
CN106911741B (en) Method for balancing virtual network management file downloading load and network management server
CN113626213A (en) Event processing method, device and equipment and computer readable storage medium
CN113364888A (en) Service scheduling method, system, electronic device and computer readable storage medium
CN102420698A (en) Dispatching method for bulk operation using limited resource
KR101345373B1 (en) Transmission/reception method and apparatus for real-time system
CN111309457A (en) Method, terminal, collection node and system for collecting meal ordering shop information
CN112448977A (en) System, method, apparatus and computer readable medium for assigning tasks
JP2001166943A (en) Method for distributing software
CN108108234A (en) A kind of distributed task management method and system
CN111045778B (en) Virtual machine creation method, device, server and storage medium
CN111309467A (en) Task distribution method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12786069

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12786069

Country of ref document: EP

Kind code of ref document: A1