WO2012010016A1 - 通知的处理方法及装置 - Google Patents

通知的处理方法及装置 Download PDF

Info

Publication number
WO2012010016A1
WO2012010016A1 PCT/CN2011/075335 CN2011075335W WO2012010016A1 WO 2012010016 A1 WO2012010016 A1 WO 2012010016A1 CN 2011075335 W CN2011075335 W CN 2011075335W WO 2012010016 A1 WO2012010016 A1 WO 2012010016A1
Authority
WO
WIPO (PCT)
Prior art keywords
notification
sent
notifications
processed
processing
Prior art date
Application number
PCT/CN2011/075335
Other languages
English (en)
French (fr)
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 WO2012010016A1 publication Critical patent/WO2012010016A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1881Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with schedule organisation, e.g. priority, sequence management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J14/00Optical multiplex systems
    • H04J14/02Wavelength-division multiplex systems
    • H04J14/0227Operation, administration, maintenance or provisioning [OAMP] of WDM networks, e.g. media access, routing or wavelength allocation
    • H04J14/0254Optical medium access

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for processing a notification.
  • notifications such as resource notifications (including resource creation, modification, deletion notification), alarm notifications (including alarm generation, modification, and disappearance notification).
  • each type of notification needs to be serially processed according to the order in which the notifications are created.
  • the orderly notifications that are commonly used in the industry are handled as follows: A queue buffer receives a notification, the thread takes a notification from the queue, and processes the notification, wherein all processing steps of the notification are performed serially. After processing the notification, the next notification is taken out for processing until all notifications are processed.
  • the present invention provides a notification processing method and apparatus to solve at least one of the above problems, in view of the problem that the processing of the notification in the optical transmission network management system takes a long time and the processing efficiency is low.
  • a notification processing method includes: receiving a plurality of notifications generated from a generation source; processing a plurality of notifications, performing parallel processing on some or all of the plurality of notifications; and transmitting the plurality of notifications in the received order The notification that the processing is completed.
  • the method further includes: sorting each of the plurality of notifications according to the received order, and assigning the sort order index to the number of the notification; sending in the order of receiving
  • the notification that is processed in the multiple notifications includes: determining whether the obtained number of the processed notifications is consistent with the currently saved number, and if yes, determining that the processed notification is a pending notification, otherwise, the processed processing is cached. Notice.
  • the method further includes: in the processed notification, searching whether there is a consecutive one or more numbers corresponding to the number of the notification to be sent If yes, send a notification corresponding to one or more consecutive numbers together with the notification to be sent; otherwise, send the to-be-sent.
  • the method further includes: updating the currently saved number after each notification is sent, wherein the updated current saved number is the sum of the value of the number saved before the current transmission and the number of the sent notification, current The initial value of the saved number is 1.
  • the method further includes: sending a notification to be sent; determining whether the number of the next notification of the processed notification obtained in the processed notification is consistent with the currently saved number, if Yes, send the next notification, otherwise, cache the next notification.
  • the method further includes: updating the currently saved number after each notification is sent, wherein the updated current saved number has a value of 1 added before the current transmission, and the initial value of the currently saved number is 1. .
  • a notification processing apparatus includes: a notification receiving module configured to receive a plurality of notifications generated from a generation source; and a processing module configured to perform parallel processing on some or all of the plurality of notifications when the plurality of notifications are processed; The notification sending module is configured to send the processed notifications in the plurality of notifications in the order in which the notification receiving module receives the notification.
  • the device further includes: a notification number assignment module, configured to sort each of the plurality of notifications according to the received order, and assign the sort order index to the number of the notification;
  • the notification sending module further includes: a determining unit, configured to determine the obtaining Whether the number of the processed notification is consistent with the number currently saved in the notification sending module; and the processing unit is configured to determine that the processed notification is a pending notification when the output of the determining unit is YES, and the output of the determining unit is no When the processed notification is cached.
  • the processing unit is further configured to: in the processed notification, find whether there is a notification corresponding to one or more consecutive numbers after the number of the notification to be sent, and if yes, notify and wait for the consecutive one or more numbers Send a notification to send together, otherwise, send a notification to be sent.
  • the notification sending module further includes: an updating unit, configured to update the currently saved number after each notification is sent, wherein the updated current saved number value is a value of the number saved before the current sending and the sending notification The sum of the numbers, the initial value of the currently saved number is 1.
  • FIG. 3 is a notification processing according to a preferred embodiment of the present invention.
  • FIG. 4 is a flowchart of processing of a notification sending module according to a preferred embodiment of the present invention;
  • FIG. 5 is a flowchart of a notification processing method according to an embodiment of the present invention;
  • FIG. 7 is a sub-flowchart of the notification processing method shown in FIG. 6.
  • the notification processing apparatus includes: a notification receiving module 10, a processing module 12, and a notification sending module 14.
  • the notification receiving module 10 is configured to receive a plurality of notifications generated from the generation source; the processing module 12 is configured to perform parallel processing on some or all of the plurality of notifications when processing the plurality of notifications; for example, the process of notifying the notification 1 1 Parallel processing with process 1 of notification 5.
  • the notification transmitting module 14 is configured to transmit the processed notifications of the plurality of notifications in the order in which the notification receiving module 10 receives the notification.
  • the thread takes the notification from the queue of the cache notification, and all the processing steps of the notification are performed serially, so that the processing time is long and the processing efficiency is low, and the foregoing apparatus provided by the embodiment of the present invention is used.
  • the processing module 12 processes multiple notifications, parallel processing is performed on some or all of the plurality of notifications, which can save processing time and improve processing efficiency.
  • the apparatus may further include: a notification number assignment module 16 configured to sort each of the plurality of notifications according to the received order, and assign the sort order index to the number of the notification.
  • the notification sending unit 14 may further include: a determining unit 140 configured to compare the number of the obtained processed notification with the number currently saved in the notification sending module, and determine whether the processing unit 142 is configured to output in the determining unit. If yes, it is determined that the processed notification is a pending notification, and when the determination unit outputs no, the processed notification is cached.
  • a determining unit 140 configured to compare the number of the obtained processed notification with the number currently saved in the notification sending module, and determine whether the processing unit 142 is configured to output in the determining unit. If yes, it is determined that the processed notification is a pending notification, and when the determination unit outputs no, the processed notification is cached.
  • the notification number assignment module 16 assigns a number after sorting, and the judgment unit 140 of the notification sending module 14 determines the number, and the processing unit 142 performs processing according to the judgment result, thereby effectively preventing the disorder of the notification after the processing module 12 performs the parallel processing, for example, In the case that the received notification is processed first, if the notification is directly sent to the next link, the order of the notification transmission cannot be guaranteed, and the process is processed incorrectly.
  • the processing unit 142 is further configured to: in the processed notification, find whether there is a notification corresponding to one or more consecutive numbers after the number of the notification to be sent, and if yes, the consecutive one or more numbers are corresponding. The notification is sent with the notification to be sent, otherwise, the notification to be sent is sent.
  • the processing unit 142 extracts the notification corresponding to the found consecutive number, and sends the notification to the next processing link.
  • the number of the obtained notification does not need to be judged one by one to correspond to the currently saved number, thereby greatly improving the processing efficiency.
  • the notification sending module 14 may further include: an updating unit 144, configured to update the currently saved number after each notification is sent, where the updated current saved number value is sent this time.
  • the sum of the value of the previously saved number and the number of the notifications sent, the initial value of the currently saved number is 1.
  • the value of the currently saved number starts from 1, and each time one or more notifications are sent, the value is updated to the sum of the value of the number saved before the transmission and the number of the current notification.
  • the processing unit 142 may also send a to-be-sent notification after determining that the processed notification is the to-be-sent notification; and then determine the next one of the processed-completed notifications in the processed notification. Whether the number of the notification is consistent with the currently saved number (that is, whether the number of the obtained notification corresponds to the currently saved number one by one), and if so, the next notification is sent, otherwise, the next notification is cached. After each notification is sent, the currently saved number needs to be updated, wherein the updated current saved number value is incremented by 1 for the value saved before the current transmission, and the current saved number has an initial value of 1. That is, the value of the currently saved number starts with 1, and is incremented by 1 each time a notification is sent.
  • Step S302 The notification receiving module receives the plurality of notifications generated by the notification generation source;
  • Step S304 The notification number assignment module receives the received The notification is assigned a sequence indicating the order in chronological order, and the notification with the assigned number is stored in the unprocessed notification queue;
  • Step S306 The processing module (also referred to as the notification processing thread pool module) asynchronously saves from the unprocessed Receiving the notification in the notification queue, concurrently executing the corresponding parallel processing step, and sending the processed notification to the notification sending module;
  • Step S308 Notifying the sending module of the sent notification, determining whether it needs to be immediately sent to the next processing link, or
  • the cache processing may further be divided into several steps for the step S308
  • Step (3) The found consecutive numbered notification is taken out and sent to the next processing step in batches; Step S310: The value of the to-be-sent notification number is updated, and the value is calculated as: the value of the notification number to be sent + the notification that has been sent The number is noted; the processed notification will execute step S308 until all notifications are sent to the next processing step.
  • FIG. 4 The found consecutive numbered notification is taken out and sent to the next processing step in batches; Step S310: The value of the to-be-sent notification number is updated, and the value is calculated as: the value of the notification number to be sent + the notification that has been sent The number is noted; the processed notification will execute step S308 until all notifications are sent to the next processing step.
  • Step S502 Receive multiple notifications generated from a generation source
  • Step S504 When processing multiple notifications, perform some or all of the multiple notifications Parallel processing
  • Step S506 Send the processed notifications in the plurality of notifications in the order of reception.
  • step S506 may further include the following process: determining The obtained number of the processed notification is consistent with the currently saved number. If yes, it is determined that the processed notification is the pending notification, otherwise, the processed notification is cached.
  • the following processing may be further included: (1) in the processed notification, whether there is one or more consecutive numbers corresponding to the number of the to-be-sent notification Pass ⁇
  • the currently saved number needs to be updated, where the updated current saved number is the sum of the value of the number saved before the current transmission and the number of the sent notifications.
  • the initial value of the previously saved number is 1. That is, the value of the currently stored number starts from 1, and after each one or more notifications are sent, the value is updated to the sum of the value of the number saved before the transmission and the number of the current transmission notification.
  • the notification processing method may further include the following step (step 4: S602-step 4: S610):
  • Step S606 When there is a notification in the unprocessed alarm notification queue, the alarm notification processing thread (corresponding to an example of the processing module described above) is triggered to process the unprocessed alarm notifications in parallel; for example, converting the alarm format of the EMS network management into The alarm format of the NMS network management is to locate the alarm of the NMS network management to the NMS service. These two conversion processes are time-consuming and use parallel processing to improve efficiency.
  • Step S608 The processed alarm notification is sent to the alarm notification sending module (corresponding to an example of the above-mentioned notification sending module;), and the notification sending block checks whether the number of the notification is equal to the to-be-sent notification number recorded by the notification sending block record (ie, the current current The saved number), if equal, determines that the notification is a pending notification; otherwise, the alarm notification is cached in the alarm notification queue to be sent.
  • the alarm notification sending module corresponding to an example of the above-mentioned notification sending module;
  • the notification sending block checks whether the number of the notification is equal to the to-be-sent notification number recorded by the notification sending block record (ie, the current current The saved number), if equal, determines that the notification is a pending notification; otherwise, the alarm notification is cached in the alarm notification queue to be sent.
  • Step S702 Searching in the alarm notification queue to be sent, the to-be-sent After the number is consecutively numbered, the alarm notification is sent to step S704 if a batch of consecutive numbered alarm notifications is found; otherwise, the single alarm notification is sent to the next processing step.
  • Step S704 The found serial number alarm notification is taken out and sent to the next processing step in batches. With the processing method shown in FIG. 7, since it is not necessary to judge one by one whether the number of the acquired notification is consistent with the currently stored number, the processing efficiency can be greatly improved.
  • Step S610 Update the value of the notification number to be sent in the notification transmission block. It should be noted that the processed alarm notification will execute step S608 until all processed alarm notifications are sent to the next processing step.
  • the following processing may also be included:
  • the processing efficiency of the method is lower than the processing efficiency of the former method.
  • the process of parallel processing of multiple ordered notifications is processed in parallel by using a thread pool, which can save processing time and improve processing efficiency.
  • the real-time processing of the ordered notification can be significantly improved, so that the user can obtain the data result as early as possible, and the various risks caused by the delay of the data processing can be reduced.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the computing device may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Where in the invention ⁇ " God and principle Any modifications, equivalent substitutions, improvements, etc. made therein are intended to be included within the scope of the present invention.

Landscapes

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

Description

通知的处理方法;^置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种通知的处理方法及装置。 背景技术 在光传送网络管理***中, 需要处理许多类型的通知,例如, 资源通知(包 括资源的创建、 修改、 删除通知), 告警通知 (包括告警的产生、 修改、 消失 通知)等。 其中, 每一类通知中需要根据通知的创建先后顺序, 进行串行处理。 目前业界常见的有序通知的处理方式是: 一个队列緩存接收到的通知, 线 程从该队列中取出一个通知, 并对该通知进行处理, 其中, 对该通知的全部处 理步骤都是串行进行的, 对该通知处理完后, 再取出下一个通知进行处理, 直 至所有通知处理完毕。 显然, 这种处理方式耗费时间较长, 处理效率较氐。 发明内容 针对相关技术中在光传送网络管理***中处理通知时耗费时间较长, 处理 效率较低的问题, 本发明提供了一种通知的处理方法及装置, 以解决上述问题 至少之一。 才艮据本发明的一个方面, 提供了一种通知处理方法。 才艮据本发明的通知处理方法包括: 接收来自于产生源产生的多个通知; 处 理多个通知时, 对多个通知中的部分或全部进程进行并行处理; 按照接收的次 序发送多个通知中处理完毕的通知。
在对多个通知中部分或全部进程进行并行处理之前, 该方法还包括: 按照 接收的次序对多个通知中各个通知排序, 并将排序顺序索引分配为该通知的编 号; 按照接收的次序发送多个通知中处理完毕的通知, 包括: 判断获取到的处 理完毕的通知的编号与当前保存的编号是否一致, 如果是, 确定该处理完毕的 通知为待发送通知, 否则, 緩存该处理完毕的通知。
在确定处理完毕的通知为待发送通知之后, 该方法还包括: 在处理完毕的 通知中, 查找是否存在待发送通知的编号之后连续的一个或多个编号对应的通 知; 如果是, 则将连续的一个或多个编号对应的通知与待发送通知一起发送; 否则, 发送该待发送通 口。
该方法还包括: 在每次发送通知后, 更新当前保存的编号, 其中, 更新的 当前保存的编号的值为本次发送前保存的编号的值与该次发送通知的个数之 和, 当前保存的编号的初始值为 1。
在确定处理完毕的通知为待发送通知之后, 该方法还包括: 发送待发送通 知; 判断处理完毕的通知中获取到的处理完毕的通知的下一个通知的编号是否 与当前保存的编号一致, 如果是, 发送下一个通知, 否则, 緩存下一个通知。
该方法还包括: 在每次发送通知后, 更新当前保存的编号, 其中, 更新的 当前保存的编号的值为本次发送前保存的编号的值加 1 , 当前保存的编号的初 始值为 1。 根据本发明的一个方面, 提供了一种通知处理装置。 根据本发明的通知处理装置包括: 通知接收模块, 设置为接收来自于产生 源产生的多个通知; 处理模块, 设置为处理多个通知时, 对多个通知中部分或 全部进程进行并行处理; 通知发送模块, 设置为按照通知接收模块接收通知的 次序发送多个通知中处理完毕的通知。 该装置还包括: 通知编号分配模块, 设置为按照接收的次序对多个通知中 各个通知排序,并将排序顺序索引分配为该通知的编号;通知发送模块还包括: 判断单元, 设置为判断获取到的处理完毕的通知的编号与通知发送模块中当前 保存的编号是否一致; 处理单元, 设置为在判断单元输出为是时, 确定该处理 完毕的通知为待发送通知, 在判断单元输出为否时, 緩存该处理完毕的通知。 处理单元, 还设置为在处理完毕的通知中, 查找是否存在待发送通知的编 号之后连续的一个或多个编号对应的通知, 如果是, 则将连续的一个或多个编 号对应的通知与待发送通知一起发送, 否则, 发送待发送通知。 通知发送模块还包括: 更新单元, 设置为在每次发送通知后, 更新当前保 存的编号, 其中, 更新的当前保存的编号的值为本次发送前保存的编号的值与 该次发送通知的个数之和, 当前保存的编号的初始值为 1。 通过本发明, 釆用线程池的方式对多个通知可并行处理的进程进行并行处 理, 并将处理好的通知按照接收次序输出。 解决了相关技术中在光传送网络管 理***中处理通知时耗费时间较长, 处理效率较低的问题, 进而可以节省处理 时间, 提高处理效率。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部 分, 本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不 当限定。 在附图中: 图 1为根据本发明实施例的通知处理装置的结构框图; 图 2为根据本发明优选实施例的通知处理装置的结构框图; 图 3为根据本发明优选实施例的通知处理装置中各模块之间信息交互的流 程图; 图 4为才艮据本发明优选实施例的通知发送模块的处理流程图; 图 5为根据本发明实施例的通知处理方法的流程图; 图 6为才艮据本发明实例的通知处理方法的流程图; 图 7为图 6所示的通知处理方法的子流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不 冲突的情况下, 本申请中的实施例及实施例中的特征可以相互组合。 图 1为根据本发明实施例的通知处理装置的结构框图。 如图 1所示, 根据 本发明实施例的通知处理装置包括: 通知接收模块 10、 处理模块 12、 通知发 送模块 14。 通知接收模块 10, 设置为接收来自于产生源产生的多个通知; 处理模块 12 , 设置为处理多个通知时, 对多个通知中部分或全部进程进行 并行处理; 例如, 将通知 1的进程 1与通知 5的进程 1进行并行处理。 通知发送模块 14 , 设置为按照通知接收模块 10接收通知的次序发送多个 通知中处理完毕的通知。 相关技术中, 线程从緩存通知的队列中取通知, 对该通知的全部处理步骤 都是串行进行的, 因此处理时间较长, 处理效率较低, 釆用本发明实施例提供 的上述装置, 处理模块 12 处理多个通知时, 对多个通知中部分或全部进程进 行并行处理, 可以节省处理时间, 提高处理效率。 优选地, 如图 2所示, 上述装置还可以包括: 通知编号分配模块 16 , 设置 为按照接收的次序对多个通知中各个通知排序, 并将排序顺序索引分配为该通 知的编号。 则通知发送模块 14还可以包括: 判断单元 140 , 设置为将获取到的 处理完毕的通知的编号与通知发送模块中当前保存的编号进行比较判断是否 一致; 处理单元 142 , 设置为在判断单元输出为是时, 确定该处理完毕的通知 为待发送通知, 在判断单元输出为否时, 緩存该处理完毕的通知。 通知编号分配模块 16在排序后分配编号,通知发送模块 14的判断单元 140 对该编号进行判断, 处理单元 142根据判断结果进行处理, 可以有效防止处理 模块 12并行处理后通知的乱序, 例如, 在后接收的通知先处理完毕的情况下, 如果将该通知直接发送给下一环节, 则无法保证通知发送的有序性, 从而导致 进程处理错误。 优选地, 处理单元 142 , 还设置为在处理完毕的通知中, 查找是否存在待 发送通知的编号之后连续的一个或多个编号对应的通知, 如果是, 则将连续的 一个或多个编号对应的通知与待发送通知一起发送, 否则, 发送待发送通知。 釆用处理单元 142将找到的连续编号所对应的通知取出, 并 4比量下发到下 一处理环节, 由于无需逐个判断获取的通知的编号是否对应当前保存的编号, 因而可以大大提高处理效率。 优选地, 如图 2所示, 通知发送模块 14还可以包括: 更新单元 144 , 设置 为在每次发送通知后, 更新当前保存的编号, 其中, 更新的当前保存的编号的 值为本次发送前保存的编号的值与该次发送通知的个数之和, 当前保存的编号 的初始值为 1。 上述当前保存的编号的值从 1开始, 在每次发送一个或多个通知后, 该值 更新为本次发送前保存的编号的值与本次发送通知的个数之和。 当然, 在可选实施方式中, 处理单元 142也可以在确定处理完毕的通知为 待发送通知之后, 发送待发送通知; 之后判断上述处理完毕的通知中该获取到 的处理完毕的通知的下一个通知的编号是否与当前保存的编号一致(即逐个判 断获取的通知的编号是否对应当前保存的编号), 如果是, 发送上述下一个通 知, 否则, 緩存上述下一个通知。 其中, 在每次发送通知后, 需要更新上述当前保存的编号, 其中, 更新的 当前保存的编号的值为本次发送前保存的编号的值加 1 , 当前保存的编号的初 始值为 1。 即, 当前保存的编号的值由 1开始, 在每次发送一个通知后增加 1。 以下结合图 3描述通知处理装置中各模块之间进行信息交互的优选实施方 式。 图 3为根据本发明优选实施例的通知处理装置中各模块之间信息交互的流 程图。 如图 3所示, 该通知处理装置中各模块之间的信息交互主要包括以下处 理: 步骤 S302: 通知接收模块接收通知产生源产生的多个通知; 步骤 S304:通知编号分配模块对接收到的通知按时间先后顺序分配一个表 示顺序的编号, 再把分配了编号的通知存入未处理的通知队列中; 步骤 S306: 处理模块(也可以称为通知处理线程池模块)异步地从保存未 处理通知队列中取出通知, 并发执行相应的并行处理步骤, 把处理后的通知发 送到通知发送模块中; 步骤 S308: 通知发送模块对发送过来的通知, 判断是否需要立即发送到下 个处理环节, 还是緩存处理; 对于步骤 S308可以进一步分为包括几个步骤: 步骤( 1 ): 当处理好的通知进入时, 首先检查进入通知的编号是否等于待 发送通知的编号, 若相等, 则执行步骤(2 ); 否则把该通知緩存到待发送的通 知队歹 'J中; 步骤 ( 2 ): 在待发送的通知队列中查找, 该待发送编号后连续的编号通知, 若找到一 4比连续的编号通知, 则进入步 4聚(3 ); 否则只 4巴该单个通知发送到下 个处理环节。 该步骤具体可以参见图 4所示的流程示意图。 步骤 (3 ): 把找到的连续编号的通知取出, 批量发送到下个处理环节; 步骤 S310: 更新待发送通知编号的值, 该值计算方式为: 待发送通知编号 的值 +已发送通知的个数; 需要注意的是, 处理完毕的通知都会执行步骤 S308, 直到所有的通知都被 发送到下个处理环节。 图 5为根据本发明实施例的通知处理方法的流程图。 如图 5所示, 该通知 处理方法可以进一步包括以下处理: 步骤 S502: 接收来自于产生源产生的多个通知; 步骤 S504: 处理多个通知时, 对多个通知中的部分或全部进程进行并行处 理; 步骤 S506: 按照接收的次序发送多个通知中处理完毕的通知。 釆用上述方法, 处理多个通知时, 对多个通知中部分或全部进程进行并行 处理, 可以节省处理时间, 提高处理效率。 优选地, 在执行步骤 S504之前, 还可以包括以下处理: 按照接收的次序 对多个通知中各个通知排序, 并将排序顺序索引分配为该通知的编号; 则步骤 S506可以进一步包括以下处理:判断获取到的处理完毕的通知的编号与当前保 存的编号是否一致, 如果是, 确定该处理完毕的通知为待发送通知, 否则, 緩 存该处理完毕的通知。 优选地,在确定处理完毕的通知为待发送通知之后,还可以包括以下处理: ( 1 ) 在处理完毕的通知中, 查找是否存在该待发送通知的编号之后连续 的一个或多个编号对应的通^
( 2 ) 如果是, 则将连续的一个或多个编号对应的通知与该待发送通知一 起发送;
( 3 ) 否则, 发送该待发送通知。 其中, 在每次发送通知后, 需要更新当前保存的编号, 其中, 更新的当前 保存的编号的值为本次发送前保存的编号的值与该次发送通知的个数之和, 当 前保存的编号的初始值为 1。 即上述当前保存的编号的值从 1开始, 在每次发 送一个或多个通知后, 该值更新为本次发送前保存的编号的值与本次发送通知 的个数之和。 以下结合图 6、 图 7所示的示例详细描述上述优选实施方式。 图 6为根据本发明实例的通知处理方法的流程图。 如图 6所示, 该通知处 理方法可以进一步包括以下步 4聚 (步 4聚 S602-步 4聚 S610 ): 步骤 S602: NMS 网管告警通知接收模块 (相当于上述通知接收模块的一 个示例)接收 EMS网管上报的告警通知。 步骤 S604: 告警通知编号分配模块(相当于上述通知编号分配模块的一个 示例), 对收到告警通知, 按时间先后顺序分配一个编号, 再 分配了编号的 告警通知存入未处理的告警通知队列中。 步骤 S606: 当未处理的告警通知队列中有通知进入时, 触发告警通知处理 线程(相当于上述处理模块的一个示例) 并行处理这些未处理的告警通知; 例 如, 把 EMS网管的告警格式转换为 NMS网管的告警格式, 把 NMS网管的告 警定位到 NMS业务上等操作; 这两个转换过程比较耗时, 特釆用并行处理方 式来提升效率。 步骤 S608: 处理完的告警通知发送到告警通知发送模块(相当于上述通知 发送模块的一个示例;), 通知发送块检查该通知的编号是否等于通知发送块记 录的待发送通知编号 (即上述当前保存的编号), 若相等确定该通知为待发送 通知; 否则把该告警通知緩存到待发送的告警通知队列中。 在优选实施过程中, 如图 7所示, 确定该通知为待发送通知之后, 还可以 包括以下处理 (步骤 S702-步骤 S704 ): 步骤 S702: 在待发送的告警通知队列中查找, 该待发送编号后连续的编号 的告警通知, 若找到一批连续的编号告警通知, 则进入步骤 S704; 否则只把该 单个告警通知发送到下个处理环节。 步骤 S704:把找到的连续编号的告警通知取出,批量发送到下个处理环节。 釆用图 7所示的处理方式, 由于无需逐个判断获取的通知的编号是否与当 前保存的编号相一致, 因而可以大大提高处理效率。 步骤 S610: 更新通知发送块中待发送通知编号的值。 需要注意的是, 处理完毕的告警通知都会执行步骤 S608, 直到所有处理完 的告警通知都被发送到下个处理环节。 可选地, 在确定该处理完毕的通知为待发送通知之后, 也可以包括以下处 理:
( 1 ) 发送该待发送通知;
( 2 ) 判断处理完毕的通知中获取到的处理完毕的通知的下一个通知的编 号是否与当前保存的编号一致(即逐个判断获取的通知的编号是否对应当前保 存的编号), 如果是, 发送下一个通知, 否则, 緩存下一个通知。 其中, 在每次发送通知后, 需要更新当前保存的编号, 其中, 更新的当前 保存的编号的值为本次发送前保存的编号的值加 1 , 当前保存的编号的初始值 为 1。 即, 当前保存的编号的值由 1开始, 在每次发送一个通知后增加 1。 上述方式为通知发送模块的另一种处理方式, 由于需要逐个判断获取的通 知的编号是否对应当前保存的编号, 因而该方式的处理效率氐于前一种方式的 处理效率。 综上所述, 借助本发明提供的上述实施例, 釆用线程池的方式对多个有序 通知可并行处理的进程进行并行处理, 可以节省处理时间, 提高处理效率。 并 且可以显著提高有序通知的处理实时性, 使用户可以尽早地得到数据结果, 可 减少因数据处理有延时导致的各种风险。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以 用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多 个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码 来实现, 从而, 可以将它们存储在存储装置中由计算装置来执行, 并且在某些 情况下, 可以以不同于此处的顺序执行所示出或描述的步骤, 或者将它们分别 制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作成单个集成电 路模块来实现。 这样, 本发明不限制于任何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领 域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的 ^"神和原则 之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之 内。

Claims

权 利 要 求 书
1. 一种通知的处理方法, 包括:
接收来自于产生源产生的多个通知;
处理所述多个通知时, 对所述多个通知中的部分或全部进程进行并 行处理;
按照接收的次序发送所述多个通知中处理完毕的通知。
2. 根据权利要求 1所述的方法, 其中,
在对所述多个通知中部分或全部进程进行并行处理之前, 所述方法 还包括: 按照所述接收的次序对所述多个通知中各个通知排序, 并将排 序顺序索引分配为该通知的编号;
所述按照所述接收的次序发送所述多个通知中处理完毕的通知包 括: 判断获取到的处理完毕的通知的编号与当前保存的编号是否一致, 如果是, 确定该处理完毕的通知为待发送通知, 否则, 緩存该处理完毕 的通知。
3. 根据权利要求 2所述的方法, 其中, 在确定所述处理完毕的通知为待发 送通知之后, 所述方法还包括:
在所述处理完毕的通知中, 查找是否存在所述待发送通知的编号之 后连续的一个或多个编号对应的通知;
如果是, 则将所述连续的一个或多个编号对应的通知与所述待发送 通知一起发送;
否则, 发送所述待发送通 口。
4. 根据权利要求 3所述的方法, 其中, 所述方法还包括: 在每次发送通知 后, 更新所述当前保存的编号, 其中, 所述更新的当前保存的编号的值 为本次发送前保存的编号的值与该次发送通知的个数之和, 所述当前保 存的编号的初始值为 1。
5. 根据权利要求 2所述的方法, 其中, 在确定所述处理完毕的通知为待发 送通知之后, 所述方法还包括: 发送所述待发送通知;
判断所述处理完毕的通知中所述获取到的处理完毕的通知的下一个 通知的编号是否与当前保存的编号一致, 如果是, 发送所述下一个通知, 否则, 緩存所述下一个通知。
6. 根据权利要求 5所述的方法, 其中, 所述方法还包括: 在每次发送通知 后, 更新所述当前保存的编号, 其中, 所述更新的当前保存的编号的值 为本次发送前保存的编号的值加 1 , 所述当前保存的编号的初始值为 1。
7. —种通知的处理装置, 包括:
通知接收模块, 设置为接收来自于产生源产生的多个通知; 处理模块, 设置为处理所述多个通知时, 对所述多个通知中部分或 全部进程进行并行处理;
通知发送模块, 设置为按照所述通知接收模块接收通知的次序发送 所述多个通知中处理完毕的通知。
8. 根据权利要求 7所述的装置, 其中,
所述装置还包括: 通知编号分配模块, 设置为按照所述接收的次序 对所述多个通知中各个通知排序, 并将排序顺序索引分配为该通知的编 号;
所述通知发送模块还包括:
判断单元, 设置为判断获取到的处理完毕的通知的编号与所述通知 发送模块中当前保存的编号是否一致;
处理单元, 设置为在所述判断单元输出为是时, 确定该处理完毕的 通知为待发送通知, 在所述判断单元输出为否时, 緩存该处理完毕的通 知。
9. 根据权利要求 8所述的装置, 其中,
所述处理单元, 还设置为在所述处理完毕的通知中, 查找是否存在 所述待发送通知的编号之后连续的一个或多个编号对应的通知,如果是, 则将所述连续的一个或多个编号对应的通知与所述待发送通知一起发 送, 否则, 发送所述待发送通 口。
10. 根据权利要求 9所述的装置, 其中, 所述通知发送模块还包括: 更新单元, 设置为在每次发送通知后, 更新所述当前保存的编号, 其中, 所述更新的当前保存的编号的值为本次发送前保存的编号的值与 该次发送通知的个数之和, 所述当前保存的编号的初始值为 1。
PCT/CN2011/075335 2010-07-22 2011-06-03 通知的处理方法及装置 WO2012010016A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010238709.7 2010-07-22
CN2010102387097A CN101902273A (zh) 2010-07-22 2010-07-22 通知的处理方法及装置

Publications (1)

Publication Number Publication Date
WO2012010016A1 true WO2012010016A1 (zh) 2012-01-26

Family

ID=43227504

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/075335 WO2012010016A1 (zh) 2010-07-22 2011-06-03 通知的处理方法及装置

Country Status (2)

Country Link
CN (1) CN101902273A (zh)
WO (1) WO2012010016A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902273A (zh) * 2010-07-22 2010-12-01 中兴通讯股份有限公司 通知的处理方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494803A (zh) * 2008-01-25 2009-07-29 日本电气株式会社 通信装置、网络***、路径管理方法和程序
EP2178250A1 (en) * 2008-10-15 2010-04-21 Yamaha Corporation Network system and audio signal processor
CN101715149A (zh) * 2009-07-21 2010-05-26 北京邮电大学 一种多层多域分布式光网络并行跨域故障恢复方法和装置
CN101902273A (zh) * 2010-07-22 2010-12-01 中兴通讯股份有限公司 通知的处理方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494803A (zh) * 2008-01-25 2009-07-29 日本电气株式会社 通信装置、网络***、路径管理方法和程序
EP2178250A1 (en) * 2008-10-15 2010-04-21 Yamaha Corporation Network system and audio signal processor
CN101715149A (zh) * 2009-07-21 2010-05-26 北京邮电大学 一种多层多域分布式光网络并行跨域故障恢复方法和装置
CN101902273A (zh) * 2010-07-22 2010-12-01 中兴通讯股份有限公司 通知的处理方法及装置

Also Published As

Publication number Publication date
CN101902273A (zh) 2010-12-01

Similar Documents

Publication Publication Date Title
JP4872952B2 (ja) Tcpバッファコピー分散並列処理装置、方法及びプログラム
JP2011186530A (ja) 画像転送方法、画像転送システム及びプロジェクター
WO2017198108A1 (zh) 一种处理分片报文的方法及装置
CN114138500B (zh) 资源调度***及方法
JP2016506147A5 (zh)
JPS63500764A (ja) 優先ランダム分割及び競合検出を備えたパケット交換ロ−カル回路綱
CN110365786A (zh) 作业处理***、异步作业调度方法和计算机设备
CN110620722B (zh) 一种订单处理的方法和装置
CN1805411A (zh) 一种处理标签绑定的方法
WO2012010016A1 (zh) 通知的处理方法及装置
CN110999225B (zh) 控制装置
WO2018233592A1 (zh) 消息保序方法、网络节点及存储介质
US20100054195A1 (en) Efficient Deallocation of Network Resources Based on Network Node Location Extrapolation
CN108063803A (zh) 基于分布式订阅发布消息***的消息管理方法及***
US10367708B2 (en) Network coding aware nodes in a distributed network
CN115150280A (zh) 一种数据包发送方法及设备
JP2006197003A (ja) データ伝送方法
TW202101946A (zh) 通信裝置及通信方法以及程式
CN112866133A (zh) 用于获取共用最大分段大小mss的方法及装置
JP2002077204A (ja) ネットワーク通信システム
WO2012024870A1 (zh) 一种数据重传方法及***
CN113535428B (zh) 请求消息和响应消息的处理方法、装置、设备和介质
CN115118727B (zh) 分布式计算架构的数据传输方法、装置、设备及存储介质
JP4249110B2 (ja) ファイル仲介プログラム、ファイル仲介装置およびファイル仲介方法
JP2007259000A (ja) データ転送装置及びデータ転送方法等

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: 11809204

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: 11809204

Country of ref document: EP

Kind code of ref document: A1