WO2020042413A1 - 一种配置编辑过程中状态机的实现方法及*** - Google Patents

一种配置编辑过程中状态机的实现方法及*** Download PDF

Info

Publication number
WO2020042413A1
WO2020042413A1 PCT/CN2018/119292 CN2018119292W WO2020042413A1 WO 2020042413 A1 WO2020042413 A1 WO 2020042413A1 CN 2018119292 W CN2018119292 W CN 2018119292W WO 2020042413 A1 WO2020042413 A1 WO 2020042413A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration
message
protocol
editing process
messages
Prior art date
Application number
PCT/CN2018/119292
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 WO2020042413A1 publication Critical patent/WO2020042413A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6245Modifications to standard FIFO or LIFO
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria

Definitions

  • the present invention relates to the field of configuration management, and in particular to a method and system for implementing a state machine in a configuration editing process.
  • a timing problem may occur due to the abnormality of the state machine of the protocol entity, which may cause the configuration to freeze or fail to be issued.
  • a protocol module based on the MIB (Management Information Base) configuration management interface processes a request for a configuration editing process, it internally continues to perform corresponding protocol state machine processing according to the configuration request.
  • the processing of the configuration editing process triggered this time has not been completed, due to asynchronous random scheduling of messages and the lack of atomic design of the state machine, it may receive a request for subsequent configuration editing processes, or receive a new one that affects the protocol state machine.
  • External messages when the original configuration editing process or protocol logic coding processing is not robust, may affect the integrity of the existing configuration editing process or a protocol logic error occurs. Therefore, when processing a request for the configuration editing process, if multiple operations occur and are processed at the same time, related exceptions may be triggered with probability.
  • the MIB proxy module establishes a basic operation model and MIB state machine for the management objects.
  • the MIB proxy module initiates a MIB request 1 to the operated module, and the operated module performs MIB state machine processing.
  • the MIB state machine processes and interacts with the protocol state machine to nest and invokes the protocol state machine to process the state.
  • the protocol state machine interacts with the cooperation module during the processing.
  • the response message from the cooperation module is returned to the operated module.
  • the operated module also returns a MIB request 1 response to the MIB proxy module.
  • the MIB proxy module may also initiate a MIB request 2 to the operated module, so the following problems will occur in the above situation:
  • the MIB state machine is tightly coupled with the protocol state machine and lacks logical isolation. A complete configuration editing process is not completed, and it responds to new external messages that may affect the protocol state machine, disrupting the atomicity of the configuration editing process.
  • Scheduling is random scheduling. The lack of processing rules for subsequent new messages can guarantee atomicity.
  • the present invention provides a method and system for implementing a state machine during configuration editing.
  • the MIB state machine and the protocol state machine are logically isolated and atomized to solve the MIB state machine and the protocol state machine. Problems that affect each other and create conflict.
  • the present invention adopts a method for implementing a state machine in a configuration editing process, which includes: allocating a serial number to each configuration editing process, and the operated module buffers and receives the response message containing the current serial number Sequential processing, and other request messages received during the configuration editing process are cached separately according to the type. After all response messages that the operation module has completed rely on, the dispatcher sequentially processes the cached other request messages.
  • the request message includes a protocol message and a configuration message
  • the response message includes a protocol response message and a configuration response message; and each type of message is buffered in a first-in-first-out queue FIFO, respectively.
  • the dispatcher sequentially obtains new request messages from the cache, and calls the operated module for processing; after the operated module completes all the response messages it depends on, , The state transitions to the ready state, and restarts a new configuration editing process.
  • the response message that the operated module depends on is a response message necessary for a complete configuration editing process, and the response message is a response to the current request message.
  • the present invention also provides a system for implementing a state machine during configuration editing. Based on a dispatcher and an operated module, the system includes:
  • a tag generating unit which is provided in the operated module and is used to assign a serial number to a message in each configuration editing process
  • FIFOs are set on the dispatcher, and each FIFO is used to buffer a type of message
  • the dispatcher is used to buffer the response message containing the current serial number to the corresponding FIFO, and to buffer other request messages in the corresponding configuration FIFO to the corresponding FIFO, and all the response messages that the operation module depends on to complete Then, the dispatcher schedules a request message for a new configuration editing process.
  • the request message includes a protocol message and a configuration message
  • the response message includes a protocol response message and a configuration response message
  • each type of message is buffered in a FIFO, respectively.
  • the dispatcher processes the configuration response that the operational module depends on.
  • the configuration response message in the message FIFO, the new protocol message and the configuration message are respectively stored in the protocol message FIFO and the configuration message FIFO according to the type, and the received protocol response message is discarded.
  • the dispatcher processes the protocol response that the operating module depends on.
  • the protocol response message in the message FIFO, the new protocol message and the configuration message are respectively stored in the protocol message FIFO and the configuration message FIFO according to the type, and the received configuration response message is discarded.
  • the configuration message and response message triggered during the configuration editing process carry the serial number of the configuration editing process to distinguish the messages of different configuration editing processes.
  • the response of the operation module includes the secondary serial number. The atomicity of the contract response message, configuration process, and protocol processing.
  • the dispatcher identifies the protocol messages, configuration messages, configuration response messages, and protocol response messages, and caches them in different FIFO (First Input First Output) queues.
  • the serial number of the response message effectively identifies the disturbance of external protocol events, thereby ensuring the serialization of the entire processing logic.
  • FIG. 1 is a sequence diagram of a configuration editing process in the prior art
  • FIG. 2 is a working principle diagram of a state machine during a configuration editing process according to a second embodiment of the present invention
  • FIG. 3 is a flowchart of receiving a configuration message by an operation module according to a third embodiment of the present invention.
  • FIG. 4 is a sequence diagram of processing a state machine message during a configuration editing process according to a third embodiment of the present invention.
  • FIG. 5 is a flowchart of receiving a protocol message by an operated module according to a fourth embodiment of the present invention.
  • FIG. 6 is a flowchart of receiving a configuration response message by an operation module according to a fifth embodiment of the present invention.
  • FIG. 7 is a flowchart of a protocol response message received by an operated module according to a sixth embodiment of the present invention.
  • the implementation method of the state machine in the configuration editing process of this embodiment is shown in FIG. 2. Based on the dispatcher, the configuration editing process between the MIB proxy module, the operated module, and the cooperation module is implemented.
  • the implementation method of this embodiment includes: allocating a serial number to each configuration editing process.
  • an operation module buffers a response message that includes the serial number of the time,
  • the other request messages received during the configuration editing process are cached separately according to the type; only after the operation module completes all the response messages that the configuration editing process relies on, the dispatcher processes the cached other request messages in sequence.
  • the request message includes a protocol message and a configuration message
  • the response message includes a protocol response message and a configuration response message; and each type of message is buffered in a FIFO, respectively.
  • this embodiment includes four FIFOs, which are:
  • FIFO-PRO protocol message buffer queue
  • FIFO-CFG Configuration Message Buffer Queue
  • FIFO-CFG-ACK configuration response message buffer queue
  • FIFO-PRO-ACK protocol response message buffer queue
  • the protocol state machine needs to perform message interaction with external modules, and the configuration editing process cannot be completed until the results of the interaction are returned.
  • the message module carries the serial number of the configuration editing process as a tag.
  • the operated module receives a response message containing the serial number of the configuration editing process, and hangs up.
  • FIFO-CFG-ACK is given priority processing, and other messages are linked into different buffer FIFOs according to their types.
  • the configuration editing process refers to a process of modifying a device service configuration.
  • the configuration editing state is a state abstraction of a service module processing a configuration message process
  • a protocol processing state is a state abstraction of a service module processing a protocol message process.
  • the configuration response message or protocol response message that it depends on should have clear interface synchronization design requirements.
  • the request message that depends on the response must have a clear response message design in the cooperating module.
  • the processing flow of the non-dependent response must be designed to ensure follow-up.
  • New configuration messages or protocol messages can continue to be processed to avoid adverse effects. For example, if the protocol signaling source IP is modified, the protocol triggers route deletion and neighbor down. The notification of the neighbor down message can be treated as a non-dependent response message if the protocol standard design does not need to be returned.
  • the operation module should return the processing to completion. , The module enters the ready state.
  • the dispatcher obtains a new request message from FIFO-PRO or FIFO-CFG, calls the operated module for processing, and starts a configuration editing process.
  • the protocol message or configuration message is preferentially selected without special restrictions, and can be randomly selected without affecting the atomicity of the configuration editing process.
  • the operated module transitions to a corresponding state for processing according to different request messages, for example: when obtaining a configuration message, it enters the configuration editing state; when obtaining a protocol message, it enters the protocol processing state.
  • the operated module is in the ready state, if it receives a protocol response message or a configuration response message, it will discard the received message as an exception message.
  • the process of receiving the configuration message by the operating module in this embodiment includes the following steps:
  • the operated module receives a configuration message.
  • the dispatcher determines whether the operated module is in a ready state at this time, and if not, proceeds to S103; if yes, proceeds to S104.
  • the dispatcher buffers the configuration message into the FIFO-CFG and proceeds to S108.
  • the dispatcher calls the operation module to process the received configuration message.
  • the operated module determines whether the current process needs to wait for a configuration response message, and returns the determination result to the dispatcher. If yes, the process proceeds to S106; if not, the process proceeds to S107.
  • the requirements in the process of processing configuration messages are used as the basis for judgment. If an announcement is sent to the cooperation module and the configuration module is relied on to return a configuration response message, it is considered that it is necessary to wait for the configuration response message, otherwise it is not considered necessary to wait for the configuration response message.
  • the dispatcher sets the status of the operated module to the configuration editing state, and proceeds to S108.
  • the dispatcher sets the status of the operated module to the ready state, and proceeds to S108.
  • the dispatcher preferentially schedules the operation module to process the configuration response message in the FIFO-CFG-ACK, the new protocol message, and the configuration message.
  • the dispatcher Stored in FIFO-PRO and FIFO-CFG respectively; if a protocol response message is received, it is discarded as an exception message, and after the operation module returns to the processing completion, the dispatcher will be transitioned to the ready state by the operation module.
  • the operated module enters the configuration editing state.
  • a notification message is initiated to the cooperation module, and the protocol state machine atomic logic of the configuration editing process can only be completed after the cooperation module responds.
  • the notification message carries the serial number of the configuration editing process, and the return value returned to the dispatcher indicates that it needs to wait for a configuration response message.
  • the dispatcher will buffer the new protocol message in FIFO-PRO at this time, and will not schedule processing.
  • the dispatcher schedules the operation module to process the configuration response message.
  • the operated module When the operated module completes the atomic operation (that is, all the configuration response messages buffered in the FIFO-CFG-ACK have been processed), the operated module returns MIB request 1 to the MIB proxy module, and exits the configuration editing state to enter the ready state .
  • the next message is processed according to the schedule of the message dispatcher.
  • Figure 3 shows that in response to the next new protocol message, the operated module enters the protocol processing state and completes the protocol state machine logic. At this time, there is a new configuration editing process.
  • the second request reaches the operated module, it is protected by the dispatcher.
  • the buffer enters the FIFO-CFG and is postponed. Until the protocol processing is completed, it enters the ready state, re-enters the dispatcher, and continues subsequent message processing.
  • the process of receiving a configuration message by an operation module in this embodiment includes the following steps:
  • the operated module receives a protocol message.
  • the dispatcher determines whether the operated module is in a ready state at this time, and if not, proceeds to S203; if yes, proceeds to S204.
  • the dispatcher buffers the protocol message into the FIFO-PRO, and proceeds to S208.
  • the dispatcher calls the protocol message received by the operation module to process.
  • the dispatcher sets the state of the operated module to the protocol processing state, and proceeds to S208.
  • the dispatcher sets the status of the operated module to the ready state, and proceeds to S208.
  • the dispatcher processes the protocol response message in the FIFO-PRO-ACK.
  • the new protocol message and configuration message are stored in In FIFO-PRO and FIFO-CFG, if a configuration response message is received, it is discarded as an exception message until the operation module returns to the processing completion state and transitions to the ready state.
  • the process of receiving a configuration response message by the operated module includes steps:
  • the operated module receives a configuration response message.
  • the dispatcher determines whether the operated module is in a ready state at this time, and if so, proceeds to S303; if not, proceeds to S304.
  • the dispatcher discards the configuration response message as an abnormal message, and proceeds to S309.
  • the dispatcher determines whether the operated module is in the configuration editing state. If not, the process proceeds to S303; if so, the process proceeds to S305.
  • the dispatcher invokes the configuration response message received by the operation module to process.
  • the dispatcher sets the status of the operated module to the ready state, and proceeds to S309.
  • the process of receiving a protocol response message by the operation module in this embodiment includes steps:
  • the operated module receives a protocol response message.
  • the dispatcher determines whether the operated module is in a ready state at this time, and if so, proceeds to S403; if not, proceeds to S404.
  • the dispatcher discards the protocol response message as an abnormal message, and proceeds to S409.
  • the dispatcher determines whether the operated module is in a protocol processing state. If not, the process proceeds to S403; if so, the process proceeds to S405.
  • the dispatcher invokes the protocol response message received by the operation module to process.
  • the dispatcher sets the status of the operated module to the protocol processing state, and proceeds to S409.
  • the dispatcher sets the status of the operated module to the ready state, and proceeds to S409.
  • this embodiment proposes a system for implementing a state machine during configuration editing.
  • the implementation system includes a tag generation unit and multiple FIFOs. Messages are assigned serial numbers during each configuration editing process; multiple FIFOs are set on the dispatcher, and each FIFO is used to buffer a type of message.
  • This embodiment includes FIFO-PRO (protocol message buffer queue), FIFO-CFG (configured message buffer queue), FIFO-CFG-ACK (configured response message buffer queue), and FIFO-PRO-ACK (protocol response message buffer queue).
  • FIFO-PRO protocol message buffer queue
  • FIFO-CFG-ACK configured response message buffer queue
  • FIFO-PRO-ACK protocol response message buffer queue
  • the dispatcher is used to buffer the response message containing the serial number to the corresponding FIFO, and buffer the protocol message and configuration message of the configuration editing process to FIFO-PRO and FIFO-CFG respectively; After the FIFO-CFG-ACK reads and completes all the response messages that it depends on, the dispatcher schedules the request message for the new configuration editing process.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种配置编辑过程中状态机的实现方法及***,涉及配置管理领域,***包括标记生成单元和多个FIFO,标记生成单元用于对每次配置编辑过程中的消息分配序列号;每个FIFO用于缓存一类消息;方法包括:为每一次配置编辑过程分配序列号,***作模块对收到的包含本次序列号的应答消息进行缓存并顺序处理,并将该次配置编辑过程收到的其他请求消息根据类型分别缓存,***作模块完成所依赖的全部应答消息后,调度机顺序处理缓存的其他请求消息。将MIB状态机和协议状态机进行逻辑隔离和原子化处理,解决MIB状态机与协议状态机相互影响并且产生冲突的问题。

Description

一种配置编辑过程中状态机的实现方法及*** 技术领域
本发明涉及配置管理领域,具体来讲涉及一种配置编辑过程中状态机的实现方法及***。
背景技术
主控软件配置编辑过程中,在修改一些需要使协议实体进行状态跃迁的参数过程中,会出现因协议实体状态机异常而引发配置卡死或下发失败的时序问题。
基于MIB(Management Information Base,管理信息库)配置管理接口的协议模块在处理配置编辑过程的请求时,内部还会根据该次配置请求继续进行对应的协议状态机处理。在本次引发的配置编辑过程处理还没有完成时,由于消息异步随机调度及状态机缺乏原子化设计等原因,可能会收到后续配置编辑过程的请求,或者收到新的影响协议状态机的外部消息,在原有配置编辑过程或协议逻辑编码处理不健壮情况下,可能产生对现有配置编辑过程的完整性的影响或发生协议逻辑错误。因此,在处理配置编辑过程的请求时,如果多项操作同时出现并处理会概率触发相关异常。
如图1所示,由于MIB配置对象的复杂性,MIB代理模块针对管理对象建立了基本的操作模型和MIB状态机。常规情况下,MIB代理模块向***作模块发起MIB请求1,***作模块进行MIB状态机处理;同时,MIB状态机处理过程中与协议状态机发生交互嵌套,调用触发协议状态机处理状态,协议状态机处理过程中与配合模块发 生交互,配合模块响应消息返回给***作模块,***作模块还要返回MIB请求1应答给MIB代理模块。在上述过程中,MIB代理模块还可能向***作模块发起MIB请求2,因此上述情况下会出现如下几个问题:
1、MIB状态机与协议状态机耦合紧密,缺乏逻辑隔离,一次完整的配置编辑过程没有完成,就去响应新的可能影响协议状态机的外部消息,扰乱了一次配置编辑过程的原子性。
2、配合模块产生的消息,无法区分是否来自上次配置编辑过程的请求所依赖的返回还是新的与配置编辑过程无关的返回。
3、调度为随机调度,对后续新消息的处理缺乏可以保证原子性的调度规则。
发明内容
针对现有技术中存在的缺陷,本发明提供一种配置编辑过程中状态机的实现方法及***,将MIB状态机和协议状态机进行逻辑隔离和原子化处理,解决MIB状态机与协议状态机相互影响并且产生冲突的问题。
为达到以上目的,本发明采取一种配置编辑过程中状态机的实现方法,包括:为每一次配置编辑过程分配序列号,***作模块对收到的包含本次序列号的应答消息进行缓存并顺序处理,并将该次配置编辑过程中收到的其他请求消息根据类型分别缓存,***作模块完成所依赖的全部应答消息后,调度机顺序处理缓存的其他请求消息。
在上述技术方案的基础上,所述请求消息包括协议消息和配置消息,所述应答消息包括协议应答消息和配置应答消息;且每类消息分别缓存在一个先入先出队列FIFO中。
在上述技术方案的基础上,在每次配置编辑过程中,如果***作 模块处于配置编辑态,当***作模块向调度机返回需要等待配置应答消息时,调度机按顺序处理已缓存的***作模块依赖的配置应答消息,新的协议消息、配置消息按类型分别缓存,并丢弃收到的协议应答消息。
在上述技术方案的基础上,在每次配置编辑过程中,如果***作模块处于协议处理态,当***作模块向调度机返回需要等待协议应答消息时,调度机按顺序处理已缓存的***作模块依赖的协议应答消息,新的协议消息、配置消息按类型分别缓存,丢弃收到的配置应答消息。
在上述技术方案的基础上,只有所述***作模块处于就绪态下,调度机从缓存中顺序获取新的请求消息,调用***作模块进行处理;所述***作模块完成依赖的全部应答消息后,状态跃迁到就绪态,重新开始一次新的配置编辑过程。
在上述技术方案的基础上,所述***作模块所依赖的应答消息为一次完整的配置编辑过程所必须的应答消息,且所述应答消息是对当次请求消息进行的应答。
本发明还提供一种配置编辑过程中状态机的实现***,基于调度机和***作模块,所述实现***包括:
标记生成单元,其设置于***作模块,用于对每次配置编辑过程中的消息分配序列号;
多个FIFO,均设置于调度机,每个FIFO用于缓存一类消息;
所述调度机用于将包含本次序列号的应答消息缓存到对应的FIFO,并将该次配置编辑过程中其他请求消息分别缓存到对应的FIFO中,***作模块完成所依赖的全部应答消息后,调度机调度新的配置编辑过程的请求消息。
在上述技术方案的基础上,所述请求消息包括协议消息和配置消 息,所述应答消息包括协议应答消息和配置应答消息,且每类消息分别缓存在一个FIFO中。
在上述技术方案的基础上,在每次配置编辑过程中,如果***作模块处于配置编辑态,当***作模块向调度机返回需要等待配置应答消息时,调度机处理***作模块依赖的配置应答消息FIFO中的配置应答消息,新的协议消息、配置消息按类型分别存入协议消息FIFO和配置消息FIFO中,并丢弃收到的协议应答消息。
在上述技术方案的基础上,在每次配置编辑过程中,如果***作模块处于协议处理态,当***作模块向调度机返回需要等待协议应答消息时,调度机处理***作模块依赖的协议应答消息FIFO中的协议应答消息,新的协议消息、配置消息按类型分别存入协议消息FIFO和配置消息FIFO中,并丢弃收到的配置应答消息。
本发明的有益效果在于:
1、在原有***消息调度机处理逻辑上,新增状态机的处理逻辑,将原MIB状态机和协议状态机进行逻辑隔离和原子化处理。主要在消息调度框架集中解决相关问题,减少了每个***作模块和配合模块进行时序容错的复杂度。
2、配置编辑过程中触发的配置消息及应答消息携带该次配置编辑过程的序列号,对不同配置编辑过程的消息进行区分,一次完整的配置编辑过程中,***作模块响应包含该次序列号的约定应答消息,配置过程和协议处理过程的原子性。
3、调度机在每次配置编辑过程中,对协议消息、配置消息、配置应答消息、协议应答消息进行识别,并分别缓存在不同的FIFO(First Input First Output,先入先出队列)中,结合应答消息的序列号,有效识别外部协议事件的扰动,从而确保整个处理逻辑的串行化。
附图说明
图1为现有技术中配置编辑过程时序图;
图2为本发明第二实施例配置编辑过程中状态机工作原理图;
图3为本发明第三实施例***作模块接收配置消息流程图;
图4为本发明第三实施例配置编辑过程中状态机消息处理时的时序图;
图5为本发明第四实施例***作模块接收协议消息流程图;
图6为本发明第五实施例***作模块接收配置应答消息流程图;
图7为本发明第六实施例***作模块接收协议应答消息流程图。
具体实施方式
以下结合附图及实施例对本发明作进一步详细说明。
第一实施例
本实施例配置编辑过程中状态机的实现方法,如图2所示,基于调度机,实现MIB代理模块、***作模块和配合模块之间的配置编辑过程。本实施例实现方法包括:为每一次配置编辑过程分配序列号,在一次配置编辑过程中,针对配置编辑过程的请求消息,***作模块对收到的包含本次序列号的应答消息进行缓存,并将该次配置编辑过程收到的其他请求消息根据类型分别缓存;只有***作模块完成该次配置编辑过程所依赖的全部应答消息后,调度机顺序处理缓存的其他请求消息。
第二实施例
基于第一实施例,进一步的,上述请求消息包括协议消息和配置消息,上述应答消息包括协议应答消息和配置应答消息;并且,每一类消息分别缓存在一个FIFO中。
具体的,本实施例包括四个FIFO,分别为:
FIFO-PRO(协议消息缓存队列),用于处理常规协议消息缓存;
FIFO-CFG(配置消息缓存队列),用于处理常规配置消息缓存;
FIFO-CFG-ACK(配置应答消息缓存队列),用于一次完整的配置消息处理所依赖的回应消息缓存;
FIFO-PRO-ACK(协议应答消息缓存队列),用于一次完整的协议消息处理所依赖的回应消息缓存。
本实施例配置编辑过程中所实现的状态机的逻辑如表1所示。
表1
当前态 输入 跃迁态 处理逻辑
就绪态 配置消息 配置编辑态  
就绪态 协议消息 协议处理态  
就绪态 配置应答消息 就绪态 异常消息进行丢弃
就绪态 协议应答消息 就绪态 异常消息进行丢弃
协议处理态 配置消息 协议处理态 缓存到FIFO-CFG
协议处理态 协议消息 协议处理态 缓存到FIFO-PRO
协议处理态 协议应答消息 协议处理态 未完成,需要继续等待协议应答
协议处理态 配置应答消息 协议处理态 异常消息进行丢弃
协议处理态 协议应答消息 就绪态 模块处理完成
配置编辑态 协议消息 配置编辑态 缓存到FIFO-PRO
配置编辑态 配置消息 配置编辑态 缓存到FIFO-CFG
配置编辑态 配置应答消息 配置编辑态 未完成,需要继续等待配置应答
配置编辑态 协议应答消息 配置编辑态 异常消息进行丢弃
配置编辑态 配置应答消息 就绪态 模块处理完成
由于配置编辑过程中有可能影响协议状态机的运行状态,造成协议状态机需要与外部模块进行消息交互,依赖交互的结果返回后才能结束该次配置编辑过程。为了区分***作模块是由配置触发还是外部事件主动触发,在消息汇中携带该次配置编辑过程的序列号作为标记,***作模块收到包含本次配置编辑过程的序列号的应答消息,挂入FIFO-CFG-ACK优先处理,其他消息根据类型分别挂入不同缓存FIFO。
在本发明各实施例中,配置编辑过程是指修改设备业务配置的过 程,配置编辑态是业务模块在处理配置消息过程的状态抽象,协议处理态是业务模块在处理协议消息过程的状态抽象。
***作模块完成一次配置编辑过程所依赖的全部配置应答消息或协议应答消息,并处理完成后进入就绪态,调度机继续处理新的配置消息或协议消息。所依赖的配置应答消息或协议应答消息应该有明确的接口同步依赖设计要求,依赖回应的请求消息在配合模块必须有明确的回应消息设计;同时对非依赖应答的处理流程,设计上必须确保后续新的配置消息或协议消息可以继续处理,避免产生不良影响。例如配置修改协议信令源IP,导致协议触发路由删除和邻居down,邻居down报文的通告如果协议标准设计中不需要返回,则可以作为非依赖的回应消息对待,***作模块应该返回处理完成,模块进入就绪态。
本实施例中,只有***作模块处于就绪态情况下,调度机从FIFO-PRO或FIFO-CFG中获取新的请求消息,调用***作模块进行处理,开始一次配置编辑过程。并且,就绪态下,优先选取协议消息还是配置消息不做特别约束,可以随机选取,不影响配置编辑过程的原子性。***作模块根据请求消息的不同,跃迁到对应的状态进行处理,例如:获取配置消息,就进入配置编辑态;获取协议消息,就进入协议处理态。但是,***作模块处于就绪态情况下,如果收到协议应答消息或配置应答消息,则将收到消息作为异常消息进行丢弃。
第三实施例
基于第二实施例,如图3所示,本实施例中***作模块接收配置消息流程包括如下步骤:
S101.***作模块收到配置消息。
S102.调度机判断***作模块此时是否处于就绪态,如果否,进 入S103;如果是,进入S104。
S103.调度机将配置消息缓存到FIFO-CFG中,进入S108。
S104.调度机调用***作模块处理收到的配置消息。
S105.***作模块判断当前流程是否需要等待配置应答消息,并将判断结果返回调度机,如果是,进入S106;如果否,进入S107。其中,将处理配置消息过程中的需求作为判断依据,如果向配合模块发出通告并依赖配合模块返回配置应答消息,则认为是需要等待配置应答消息的,否则认为不需要等待配置应答消息。
S106.调度机将***作模块的状态设置为配置编辑态,进入S108。
S107.调度机将***作模块的状态设置为就绪态,进入S108。
S108.返回调度机,相当于直接完成本次配置消息的原子处理,之后调度机可以进行后续消息分发。
此时,如果***作模块处于配置编辑态,当***作模块返回需要等待配置应答消息时,调度机优先调度***作模块处理FIFO-CFG-ACK中的配置应答消息,新的协议消息、配置消息分别存入FIFO-PRO和FIFO-CFG中;如果收到协议应答消息,作为异常消息进行丢弃,直到***作模块返回处理完成后,调度机将***作模块的状态跃迁到就绪态。
如图4所示,***作模块进入配置编辑态,在处理配置消息过程中向配合模块发起了通告消息,并且依赖配合模块应答后才能完成本次配置编辑过程的协议状态机原子逻辑,则在通告消息中携带了该次配置编辑过程的序列号,同时返回给调度机的返回值表明需要等待配置应答消息。
如果在配合模块没有回复应答消息前,此时有新的协议消息从配合模块发出给***作模块,调度机此时将新的协议消息缓存在 FIFO-PRO,暂不调度处理。
当***作模块等待的配合模块返回配置应答消息并缓存到FIFO-CFG-ACK后,调度机调度***作模块处理配置应答消息。
当***作模块完成了原子操作后(也就是FIFO-CFG-ACK中缓存的配置应答消息全部处理完毕),此时***作模块返回MIB请求1给MIB代理模块,并退出配置编辑态进入就绪态。
此后,根据消息调度机调度,进行下一个消息的处理。图3所示为响应下一个新的协议消息,***作模块进入协议处理态,完成协议状态机逻辑,此时有新的配置编辑过程第二次请求到达***作模块时,被调度机保护,缓存进入FIFO-CFG,进行延后处理。直到协议处理完成进入就绪态,重新进入调度机,继续后续消息处理。
第四实施例
基于第二实施例,如图5所示,本实施例中***作模块接收配置消息流程包括如下步骤:
S201.***作模块收到协议消息。
S202.调度机判断***作模块此时是否处于就绪态,如果否,进入S203;如果是,进入S204。
S203.调度机将协议消息缓存到FIFO-PRO中,进入S208。
S204.调度机调用***作模块处理收到的协议消息。
S205.***作模块执行完协议消息结束后,判断当前流程是否需要等待协议应答消息,如果是,进入S206;如果否,进入S207。并且***作模块将判断结果返回调度机。
S206.调度机将***作模块的状态设置为协议处理态,进入S208。
S207.调度机将***作模块的状态设置为就绪态,进入S208。
S208.返回调度机,相当于直接完成本次协议消息的原子处理, 之后调度机可以进行后续消息分发。
此时,如果***作模块处于协议处理态,当***作模块返回需要等待协议应答消息时,调度机处理FIFO-PRO-ACK中的协议应答消息,此时新的协议消息、配置消息分别存入FIFO-PRO和FIFO-CFG中,如果收到配置应答消息,作为异常消息进行丢弃,直到***作模块返回处理完成状态跃迁到就绪态。
第五实施例
基于第三实施例,如图6所示,***作模块接收配置应答消息流程包括步骤:
S301.***作模块收到配置应答消息。
S302.调度机判断***作模块此时是否处于就绪态,如果是,进入S303;如果否,进入S304。
S303.调度机将将配置应答消息作为异常消息进行丢弃,进入S309。
S304.调度机判断***作模块是否处于配置编辑态,如果否,进入S303;如果是,进入S305。
S305.调度机调用***作模块处理收到的配置应答消息。
S306.***作模块执行配置应答消息结束后,判断当前流程是否需要继续等待配置应答消息,如果是,进入S307;如果否,进入S308。其中,将处理配置应答消息过程中的需求作为判断依据,如果需要继续向配合模块发出通告并依赖配合模块返回配置应答消息,则需要继续等待配置应答消息。
S307.调度机将***作模块的状态设置为配置编辑态,进入S309。
S308.调度机将***作模块的状态设置为就绪态,进入S309。
S309.返回调度机,直接完成本次配置应答消息原子处理,之后 调度机可以进行后续消息分发。
第六实施例
基于第四实施例,如图7所示,本实施例***作模块接收协议应答消息流程包括步骤:
S401.***作模块收到协议应答消息。
S402.调度机判断***作模块此时是否处于就绪态,如果是,进入S403;如果否,进入S404。
S403.调度机将协议应答消息作为异常消息进行丢弃,进入S409。
S404.调度机判断***作模块是否处于协议处理态,如果否,进入S403;如果是,进入S405。
S405.调度机调用***作模块处理收到的协议应答消息。
S406.***作模块执行协议应答消息结束后,判断当前流程是否需要继续等待协议应答消息,如果是,进入S407;如果否,进入S408。其中,将处理协议应答消息过程中的需求作为判断依据,如果需要继续向配合模块发出通告并依赖配合模块返回协议应答消息,则需要继续等待配置应答消息。
S407.调度机将***作模块的状态设置为协议处理态,进入S409。
S408.调度机将***作模块的状态设置为就绪态,进入S409。
S409.返回调度机,直接完成本次配置应答消息原子处理,之后调度机可以进行后续消息分发。
第七实施例
基于上述实施例,本实施例提出一种配置编辑过程中状态机的实现***,基于图2中的调度机和***作模块,实现***包括标记生成单元和多个FIFO,标记生成单元用于对每次配置编辑过程中的消息分配序列号;多个FIFO均设置于调度机,每个FIFO用于缓存一类 消息。
本实施例中包括FIFO-PRO(协议消息缓存队列)、FIFO-CFG(配置消息缓存队列)、FIFO-CFG-ACK(配置应答消息缓存队列)和FIFO-PRO-ACK(协议应答消息缓存队列)四个FIFO。其中,调度机用于将包含本次序列号的应答消息缓存到对应的FIFO,并将该次配置编辑过程的协议消息和配置消息分别缓存到FIFO-PRO和FIFO-CFG中;***作模块从FIFO-CFG-ACK读取并完成所依赖的全部应答消息后,调度机调度新的配置编辑过程的请求消息。
本发明不局限于上述实施方式,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围之内。本说明书中未作详细描述的内容属于本领域专业技术人员公知的现有技术。

Claims (10)

  1. 一种配置编辑过程中状态机的实现方法,其特征在于,包括:
    为每一次配置编辑过程分配序列号,***作模块对收到的包含本次序列号的应答消息进行缓存并顺序处理,并将该次配置编辑过程中收到的其他请求消息根据类型分别缓存,***作模块完成所依赖的全部应答消息后,调度机顺序处理缓存的其他请求消息。
  2. 如权利要求1所述的配置编辑过程中状态机的实现方法,其特征在于:所述请求消息包括协议消息和配置消息,所述应答消息包括协议应答消息和配置应答消息;且每类消息分别缓存在一个先入先出队列FIFO中。
  3. 如权利要求2所述的配置编辑过程中状态机的实现方法,其特征在于:在每次配置编辑过程中,如果***作模块处于配置编辑态,当***作模块向调度机返回需要等待配置应答消息时,调度机按顺序处理已缓存的***作模块依赖的配置应答消息,新的协议消息、配置消息按类型分别缓存,并丢弃收到的协议应答消息。
  4. 如权利要求2所述的配置编辑过程中状态机的实现方法,其特征在于:在每次配置编辑过程中,如果***作模块处于协议处理态,当***作模块向调度机返回需要等待协议应答消息时,调度机按顺序处理已缓存的***作模块依赖的协议应答消息,新的协议消息、配置消息按类型分别缓存,丢弃收到的配置应答消息。
  5. 如权利要求1所述的配置编辑过程中状态机的实现方法,其特征在于:只有所述***作模块处于就绪态下,调度机从缓存中顺序获取新的请求消息,调用***作模块进行处理;
    所述***作模块完成依赖的全部应答消息后,状态跃迁到就绪态,重新开始一次新的配置编辑过程。
  6. 如权利要求1-5任一项所述的配置编辑过程中状态机的实现方法,其特征在于:所述***作模块所依赖的应答消息为一次完整的配置编辑过程所必须的应答消息,且所述应答消息是对当次请求消息进行的应答。
  7. 一种配置编辑过程中状态机的实现***,基于调度机和***作模块,其特征在于,所述实现***包括:
    标记生成单元,其设置于***作模块,用于对每次配置编辑过程中的消息分配序列号;
    多个FIFO,均设置于调度机,每个FIFO用于缓存一类消息;
    所述调度机用于将包含本次序列号的应答消息缓存到对应的FIFO,并将该次配置编辑过程中其他请求消息分别缓存到对应的FIFO中,***作模块完成所依赖的全部应答消息后,调度机调度新的配置编辑过程的请求消息。
  8. 如权利要求7所述的配置编辑过程中状态机的实现***,其特征在于:所述请求消息包括协议消息和配置消息,所述应答消息包括协议应答消息和配置应答消息,且每类消息分别缓存在一个FIFO中。
  9. 如权利要求8所述的配置编辑过程中状态机的实现***,其特征在于:在每次配置编辑过程中,如果***作模块处于配置编辑态,当***作模块向调度机返回需要等待配置应答消息时,调度机处理***作模块依赖的配置应答消息FIFO中的配置应答消息,新的协议消息、配置消息按类型分别存入协议消息FIFO和配置消息FIFO中,并丢弃收到的协议应答消息。
  10. 如权利要求8所述的配置编辑过程中状态机的实现***,其特征在于:在每次配置编辑过程中,如果***作模块处于协议处理态, 当***作模块向调度机返回需要等待协议应答消息时,调度机处理***作模块依赖的协议应答消息FIFO中的协议应答消息,新的协议消息、配置消息按类型分别存入协议消息FIFO和配置消息FIFO中,并丢弃收到的配置应答消息。
PCT/CN2018/119292 2018-08-28 2018-12-05 一种配置编辑过程中状态机的实现方法及*** WO2020042413A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810987118.6 2018-08-28
CN201810987118.6A CN109246030B (zh) 2018-08-28 2018-08-28 一种配置编辑过程中状态机的实现方法及***

Publications (1)

Publication Number Publication Date
WO2020042413A1 true WO2020042413A1 (zh) 2020-03-05

Family

ID=65068578

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/119292 WO2020042413A1 (zh) 2018-08-28 2018-12-05 一种配置编辑过程中状态机的实现方法及***

Country Status (2)

Country Link
CN (1) CN109246030B (zh)
WO (1) WO2020042413A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111177153A (zh) * 2019-12-27 2020-05-19 北京华环电子股份有限公司 一种基于Net-SNMP的Mib表管理方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1708044A (zh) * 2004-06-08 2005-12-14 华为技术有限公司 基于简单网络管理协议的异步通讯机制处理方法
CN1859408A (zh) * 2006-03-15 2006-11-08 华为技术有限公司 一种进程发送方法
CN101076028A (zh) * 2007-06-21 2007-11-21 中兴通讯股份有限公司 采用snmp协议的通信***和消息交互方法
CN103236950A (zh) * 2013-05-10 2013-08-07 烽火通信科技股份有限公司 用于l3vpn的业务管理装置
CN107360588A (zh) * 2017-09-15 2017-11-17 武汉虹信通信技术有限责任公司 一种小基站oam的消息处理方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6072781A (en) * 1996-10-22 2000-06-06 International Business Machines Corporation Multi-tasking adapter for parallel network applications
CN100571183C (zh) * 2007-08-24 2009-12-16 中国科学院计算技术研究所 一种基于胖树拓扑的屏障操作网络***、装置及方法
CN101399816B (zh) * 2007-09-26 2012-05-23 中兴通讯股份有限公司 一种动态配置数字用户线路设备端口的方法
US7752300B2 (en) * 2007-11-19 2010-07-06 International Business Machines Corporation Automatically determining management information base modules for a device
CN102387031A (zh) * 2011-09-01 2012-03-21 上海大学 基于状态机的snmp网络设备识别及数据获取方法
CN102521007B (zh) * 2011-11-30 2014-12-31 烽火通信科技股份有限公司 一种基于事务调度的网管***对象并发编辑的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1708044A (zh) * 2004-06-08 2005-12-14 华为技术有限公司 基于简单网络管理协议的异步通讯机制处理方法
CN1859408A (zh) * 2006-03-15 2006-11-08 华为技术有限公司 一种进程发送方法
CN101076028A (zh) * 2007-06-21 2007-11-21 中兴通讯股份有限公司 采用snmp协议的通信***和消息交互方法
CN103236950A (zh) * 2013-05-10 2013-08-07 烽火通信科技股份有限公司 用于l3vpn的业务管理装置
CN107360588A (zh) * 2017-09-15 2017-11-17 武汉虹信通信技术有限责任公司 一种小基站oam的消息处理方法

Also Published As

Publication number Publication date
CN109246030A (zh) 2019-01-18
CN109246030B (zh) 2021-06-15

Similar Documents

Publication Publication Date Title
CN106815066B (zh) 一种定时任务调度方法、装置及***
CN104219288B (zh) 基于多线程的分布式数据同步方法及其***
US9424101B2 (en) Method and apparatus for synchronous processing based on multi-core system
WO2012037760A1 (zh) 提升告警处理效率的方法、服务器及***
US20170047069A1 (en) Voice processing method and device
US9766951B2 (en) Hardware synchronization barrier between processing units
US8402190B2 (en) Network adaptor optimization and interrupt reduction
CN113179227B (zh) 基于队列的at指令控制方法
CN111221662B (zh) 任务调度方法、***及装置
WO2016206513A1 (zh) 加速处理数据的方法、分配装置和交换机
WO2020042413A1 (zh) 一种配置编辑过程中状态机的实现方法及***
JP2010277158A (ja) 割り込み通知制御装置および半導体集積回路
CN106301840A (zh) 双向转发检测bfd报文的发送方法及装置
WO2016177081A1 (zh) 通知消息处理方法及装置
CN114168297A (zh) 一种归集任务调度方法、装置、设备及介质
CN109710399B (zh) 一种dsp通信任务调度***及方法
WO2024001411A1 (zh) 多线程调度方法及装置
CN112765087A (zh) 用于在多个处理器之间使通信同步的***和方法
WO2020220225A1 (zh) 资源获取方法、相关装置及计算机存储介质
CN101634956B (zh) 多核处理器消息调度方法及调度器
CN107819622B (zh) Mac地址管理方法及装置
CN110445580A (zh) 数据发送方法及装置、存储介质、电子装置
CN114598593B (zh) 消息处理方法、***、计算设备及计算机存储介质
US9104503B2 (en) Processing a unit of work
CN112527532A (zh) 一种基于消息的路径调度方法

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

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

Country of ref document: EP

Kind code of ref document: A1