WO2011116583A1 - 一种实现对多协议通信组件管理的方法及装置 - Google Patents
一种实现对多协议通信组件管理的方法及装置 Download PDFInfo
- Publication number
- WO2011116583A1 WO2011116583A1 PCT/CN2010/076178 CN2010076178W WO2011116583A1 WO 2011116583 A1 WO2011116583 A1 WO 2011116583A1 CN 2010076178 W CN2010076178 W CN 2010076178W WO 2011116583 A1 WO2011116583 A1 WO 2011116583A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- communication
- message
- protocol
- configuration file
- module
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/321—Interlayer communication protocols or service data unit [SDU] definitions; Interfaces between layers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/329—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]
Definitions
- the present invention relates to a point-to-multipoint communication device in which communication components capture a plurality of communication protocols, and more particularly to a method and apparatus for implementing management of a multi-protocol communication component in such a communication device.
- a management component at a core location for example, a wavelength division monitoring channel management system
- a management component may be attached to subcomponents (boards) with a variety of communication protocols, and the management component will have to implement all the protocols to support the various subcomponents that may appear in the system. This may have the following three problems:
- each project upgrade requires an upgrade of the entire management software in the operating system, which increases the upgrade risk and system downtime.
- the management component must also load all types of communication protocol stacks, create corresponding send and receive tasks, send and receive queues, and Resources such as semaphores cause waste of communication port resources.
- the technical problem to be solved by the present invention is to provide a method and apparatus for implementing management of a multi-protocol communication component, which can implement effective dynamic management of a multi-protocol communication component.
- the present invention provides a method for implementing management of a multi-protocol communication component, which relates to a service application layer and a communication underlayer of a communication device, and the method includes:
- the communication layer of the protocol stack is recorded in a configuration file by the protocol adaptation layer, and the protocol stack is compiled into a dynamic link library and downloaded to the communication device to form one or more communications. Component, and enable communication components.
- the method also includes:
- the communication device When the communication device is initialized at power-on, the communication device is normally operated by creating a corresponding communication task and its sending and receiving queue for the communication component existing in the configuration file through the protocol adaptation layer.
- the method also includes:
- the protocol adaptation layer interacts with the service application layer and the communication port under the communication layer through the sending and receiving queues to implement message distribution and/or protocol learning and dynamic port loading or unloading of the protocol stack.
- Implementing message distribution includes:
- the service application layer transmits the received message message to the protocol adaptation layer through the message receiving queue of the sending and receiving queue;
- the protocol adaptation layer determines the communication type of the corresponding communication component in the configuration file according to the destination address to which the message message is sent, and places the basic element information of the communication into the message header provided for the message message, and is provided with a report.
- the message message of the header is placed in the message sending queue of the corresponding communication task;
- the bottom layer of the communication fills in the message message, the source address and the destination address in the message sending queue to the corresponding entry parameters of the corresponding driver transceiver function, and realizes the coupling with the corresponding interface of the corresponding communication task.
- the protocol adaptation layer After the protocol adaptation layer receives the message from the message receiving queue, it will add the newly added header.
- the type information is recorded in the configuration file and stored as a new communication type.
- Implementing dynamic loading or unloading of the protocol stack includes:
- the protocol adaptation layer adds or deletes the communication type in the configuration file, and loads or unloads the corresponding communication task and its sending and receiving queue after the communication device is powered on again.
- the foregoing method further includes:
- the protocol adaptation layer creates a configuration file according to the configuration of the communication device.
- the configuration file In addition to the communication type of the protocol stack currently supported by the communication device, the configuration file also records the message structure information of the communication type; the protocol currently supported by the communication device The stack is compiled into a dynamic link library.
- the present invention provides an apparatus for implementing management of a multi-protocol communication component, including a service application layer management module and an underlying communication module, and a protocol is further included between the service application layer management module and the communication module.
- the service application layer management module is configured to: transmit the received message message to the protocol adaptation module; the protocol adaptation module is configured to: at least record the communication type of the protocol stack in a configuration file, and compile the protocol stack into a dynamic Linking library downloads, forming one or more communication components, and enabling communication components; at least, distributing received message messages according to communication types recorded in the configuration file when the device is in normal operation;
- the communication module is configured to: deliver the message that is distributed by the protocol adaptation module to the corresponding communication component.
- the protocol adaptation module includes a protocol loading unit, a message distribution unit, and a storage unit, where: the protocol loading unit is configured to: record the communication type of the supported protocol stack into a configuration file saved in the storage unit, and initialize the device on the device. Creating a corresponding communication task and a sending and receiving queue for the communication component existing in the configuration file, and interacting with the service application layer management module and the communication module respectively in the normal operation of the device through the sending and receiving queue;
- the storage unit is set to: save the configuration file
- the message distribution unit is set to: according to the message message received from the message receiving queue of the sending and receiving queue
- the destination address to be sent determines the communication type of the corresponding communication component in the configuration file, and the basic element information of the communication is placed in the message header provided for the message message, and the message message with the message header is placed.
- the corresponding communication task is sent in the message queue.
- the protocol adaptation module includes a protocol learning unit, where:
- the protocol learning unit is configured to: after receiving the message message from the message receiving queue, record the format information of the newly added message header in the configuration file in the storage unit, and save it as a new communication type; the protocol loading unit also sets To: Add or delete the communication type in the configuration file, and load or unload the corresponding communication task and its sending and receiving queue after the device is powered on again.
- the management component uses the plug-and-play, dynamic learning and dynamic loading methods for the communication component, which can greatly reduce the risk of system upgrade and the interruption time of the service, and support the new component. More quickly and quickly;
- this way of dynamically loading according to the communication type can greatly reduce the communication port overhead, which is especially true in embedded systems where resources are particularly tight. important.
- the method and device of the invention can greatly improve the stability and flexibility of the system without increasing the system cost on the basis of the original equipment, so it has a good application prospect and use value.
- FIG. 1 is a structural block diagram of an embodiment of a multi-protocol communication component management apparatus according to the present invention
- FIG. 2 is a structural block diagram of an embodiment of the protocol adaptation module shown in FIG.
- FIG. 3 is a flow chart of an embodiment of a method for managing a multi-protocol communication component according to the present invention.
- an idealized multi-protocol communication component management device such as an application for a communication monitoring Equipment
- its service level can completely ignore the details of each protocol used by the underlying layer, and only need to call the corresponding sending and receiving interfaces to perform the sending and receiving of the message.
- the details of shielding the underlying communication can reduce the coupling of the system, thereby increasing the modularity of the system.
- it can be achieved by simply modifying the configuration file and downloading a new protocol stack module.
- the management device is regarded as a host, and all the service boards are regarded as a type of plug-and-play peripheral, thereby facilitating the hooking and unloading.
- the invention utilizes "plug and play” technology to realize dynamic management of communication protocols.
- various communication modules can be easily hooked up to the system like a peripheral to support multiple communication protocols.
- the invention provides a structure for implementing an embodiment of a multi-protocol communication component management device, which adds a layer of "protocol adaptation module” middleware between the service application layer management module and the underlying communication module, as shown in FIG. :
- the service application layer management module is configured to exchange the received message message (that is, the message body) to the protocol adaptation module by interacting with the protocol adaptation module through the message sending and receiving queue;
- the details of the underlying communication protocol are transparent at this level. It does not need to know what the header format of each communication type is, and only handles the body part of the message. It needs to communicate with the protocol adaptation module through the sending and receiving queues. Regardless of which type of board the message is sent to, the message is first transmitted to the protocol adaptation module through the message receiving queue for processing.
- the protocol adaptation module is used as a core part of the plug-and-play communication protocol, and is used for interacting with the upper layer service application layer management module and the lower layer communication port through the sending and receiving queues, thereby realizing message distribution, protocol learning, and dynamic loading of the communication protocol;
- the creation or deletion of communication tasks and their transceiver queues is dynamically adjusted by the protocol adaptation module.
- the communication module is configured to, in response to the transceiving task, couple the message content, the source address, and the destination address in the message queue from the protocol adaptation module to an interface corresponding to the corresponding transceiving task.
- the communication module fills in the message content, source address, and destination address to the corresponding driver transceiver function. On the corresponding entry parameters, an interface coupling corresponding to the corresponding transceiving task is implemented.
- the destination address here refers to the communication address of each board in the system. These communication addresses are also virtual addresses. To each different physical medium, it needs to be translated into the actual physical address by address resolution, that is, address adaptation. .
- the protocol adaptation module shown in FIG. 1 further includes a protocol loading unit, a protocol learning unit, a message distribution unit, and a storage unit, as shown in FIG. 2, where:
- a protocol loading unit configured to record a type of a board communication (ie, a communication protocol type) used in the communication device in a configuration file or a database, and save the data in the storage unit; when in use, load the corresponding communication component into the Running in RAM;
- the protocol loading unit reads the contents of the configuration file or database when the system is powered on, and creates corresponding communication tasks and sending and receiving queues only for the communication types existing in the configuration file or the database. In this way, when the system needs to support the board of the new communication type, you can add a new protocol by modifying the configuration file or database (modified through the network management or directly modifying). After the power is turned on, the corresponding communication task and sending and receiving queue will be loaded. Resources, while communication protocols not configured in the system are silent and are not enabled.
- the protocol learning unit is configured to: after receiving the message message from the message receiving queue, record the format information of the newly added message header in a configuration file or a database stored in the storage unit;
- the interactive packet includes the packet header and the packet body.
- the main difference between the different types of boards is the format of the packet header, and the packet body is the packet content transmitted through the message queue of the service application layer management module.
- the protocol learning unit puts the format information of the newly added message header in the configuration file or database, which means that a new communication protocol is learned, which is used for the message distribution unit to perform the >3 ⁇ 4 header adaptation processing. In this way, the message distribution unit reads the format information of the packet header after power-on, and combines the packet header and the packet body to form a new packet for transmission.
- the message distribution unit is configured to distribute the message transmitted from the service application layer management module through the message receiving queue to different communication tasks.
- the basic element information of the communication is placed in the message header provided for the message message according to the communication type, and the message message with the message header is placed in the corresponding communication task.
- the basic element information for a communication system includes the source address, the destination address, and the length of the message.
- a storage unit that is used to save the configuration file.
- FIG. 3 shows a flow of an embodiment of the method for managing a multi-protocol communication component of the present invention, including the following steps:
- the modified configuration file and the recompiled dynamic link library are downloaded to the device to form a new component
- dlopen/dlsym/dlclose in the Linux system implements the function of opening, using, and uninstalling the dynamic link library, thereby completing the online upgrade without interrupting the service.
- step 110 is a supplement to step 140 to prevent the system from being restored to the initial state after restarting (ie, the state of the new component is not added), and the configuration file must be modified each time a new component is added/unloaded.
- Step 120 is to implement the stripping of the communication module and the operating system and the application, so that each pass When the letter module is upgraded, it is not necessary to update the entire Bin file (mega-capacity level), but only the dynamic link library (kilobyte level) part of the communication module protocol stack; and the application (in the business application layer management module) ) Some versions are well controlled.
- Step 140 is an important step of the present invention. After upgrading the configuration file and the dynamic link library, the required dynamic link library components can be loaded or unloaded directly from the command line.
- the above method of the present invention is simple and easy to implement in the specific implementation, and is mainly embodied in three links: adding an adaptation layer between the service application layer management module and the underlying communication module, that is, reducing the service and communication module through the protocol adaptation module Degree of coupling between;
- the protocol stack of the communication module is separated from the device system and compiled into a dynamic link library to facilitate the upgrade;
- the purpose of supporting the new communication module can be achieved by simple symbol table replacement.
- the management component uses the plug-and-play, dynamic learning and dynamic loading methods for the communication component, which can greatly reduce the risk of system upgrade and the interruption time of the service, and support the new component. Faster and faster; in addition, if only a few are configured in the system Sub-components of the type, which can dynamically reduce the communication port overhead according to the way the communication type is dynamically loaded, which is particularly important in embedded systems where resources are particularly tight.
- the method and device of the invention can greatly improve the stability and flexibility of the system without increasing the system cost on the basis of the original equipment, so it has a good application prospect and use value.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
Abstract
本发明披露了一种实现对多协议通信组件管理的方法及装置,其中方法涉及通信设备的业务应用层和通信底层;包括:在业务应用层和通信底层之间增加一个协议适配层;当通信设备要对协议栈提供支持时,通过该协议适配层将协议栈的通信类型记载在一配置文件中,并将协议栈编译成动态链接库下载到通信设备,形成一个或多个通信组件,并使能通信组件。本发明能够在原有设备的基础上不增加***成本的前提下使得***稳定性、灵活性大幅提升,因此具有良好的应用前景和使用价值。
Description
一种实现对多协议通信组件管理的方法及装置
技术领域
本发明涉及点对多点通信且通信组件釆取多种通信协议的通信设备, 尤 其涉及在这种通信设备中实现对多协议通信组件管理的方法及装置。
背景技术
在对多点通信且具有釆取多通信协议的通信组件的设备***构建时, 经 常会遇到下面的场景: 对于一个处于核心位置的管理组件(譬如以波分监控 通道管理***为例),它下面可能会挂接具有多种多样通信协议的子组件(单 板) , 则管理组件就不得不实现所有的协议, 用以支持***中可能出现的各 种子组件。 这样一来可能就会存在以下三个问题:
( 1 )对于未来出现的某种新单板, 可能釆用了目前管理组件所不支持的 通信协议类型, 这样新单板的增加就会带来整个管理组件版本的重构。
( 2 )为了支持某种新通信协议的单板, 每次工程升级都需要对在运营系 统的整个管理软件进行升级, 增加了升级风险和***的中断时间。
当***内部需要新增一类通信协议时, 往往需要对整个***进行升级, 其复杂度高且时间过长 (包括下载时间和写 flash时间), 由此带来所有业务 长时间的中断。
( 3 )假如在***中只使用了某一种或少量几种类型的通信协议单板, 管 理组件也必须要加载所有类型的通信协议栈, 创建所对应的发送接收任务、 发送接收队列、 各种信号量等资源, 造成通信口资源的浪费。
在某些应用场景下只有某一种或几种类型单板, 其余通信组件如果卸载 不掉而继续执行空转任务会占用大量的 CPU资源。
综上所述, 可以看出现有的监控设备中的管理组件由于未能对其下单板 的协议栈实行动态管理, 会导致***组建和维护成本极高, 非常不利于*** 的升级, 且会造成设备内 CPU/RAM/FLASH等资源的严重浪费。
发明内容
本发明所要解决的技术问题是提供一种实现对多协议通信组件管理的方 法及装置, 能够对多协议通信组件实行有效的动态管理。
为了解决上述技术问题, 本发明提供了一种实现对多协议通信组件管理 的方法, 涉及通信设备的业务应用层和通信底层, 该方法包括:
在业务应用层和通信底层之间增加一个协议适配层;
当通信设备要对协议栈提供支持时, 通过该协议适配层将协议栈的通信 类型记载在一配置文件中, 并将协议栈编译成动态链接库下载到通信设备, 形成一个或多个通信组件, 并使能通信组件。
该方法还包括:
通信设备在上电初始化时, 通过协议适配层为配置文件中存在的通信组 件创建对应的通信任务及其收发队列, 则通信设备正常运行。
该方法还包括:
在通信设备正常运行过程中, 协议适配层通过收发队列分别与业务应用 层和通信底层的通信端***互, 实现消息分发和 /或协议学习以及协议栈的动 态力口载或卸载。
实现消息分发包括:
业务应用层通过收发队列的消息接收队列将所接收到的报文消息传输给 协议适配层;
协议适配层根据报文消息发往的目的地址判断对应的通信组件在配置文 件中的通信类型, 将通信的基本要素信息置于为报文消息配备的报文头内, 并将配有报文头的报文消息置于对应的通信任务的消息发送队列中;
通信底层将消息发送队列中的 ^艮文消息、 源地址以及目的地址填写到对 应的驱动收发函数相应的入口参数上, 实现与对应的通信任务相应接口的耦 合。
实现协议学习包括:
协议适配层在从消息接收队列收到报文消息后, 将新添加的报文头的格
式信息记载在所述配置文件中, 作为新的通信类型保存。
实现协议栈的动态加载或卸载包括:
协议适配层在配置文件中添加或删除通信类型, 待通信设备重新上电后 加载或卸载相应的通信任务及其收发队列。
在协议适配层将协议栈的通信类型记载在配置文件之前, 上述方法还包 括:
协议适配层根据通信设备的配置情况创建配置文件, 在该配置文件中除 了记载通信设备当前支持的协议栈的通信类型外, 还记载通信类型的报文结 构信息; 将通信设备当前支持的协议栈编译成动态链接库。
为了解决上述技术问题, 本发明提供了一种实现对多协议通信组件管理 的装置, 包括业务应用层管理模块和底层的通信模块, 在业务应用层管理模 块和通信模块之间还包括一协议适配模块, 其中:
业务应用层管理模块设置为:将接收到的报文消息传输给协议适配模块; 协议适配模块设置为: 至少将协议栈的通信类型记载在一配置文件中, 并将协议栈编译成动态链接库下载, 形成一个或多个通信组件, 并使能通信 组件; 至少, 在所述装置正常运行时根据配置文件中记载的通信类型分发收 到的报文消息;
通信模块设置为: 将协议适配模块分发的报文消息下发到相应的通信组 件。
协议适配模块包括协议加载单元、 消息分发单元和存储单元, 其中: 协议加载单元设置为: 将支持的协议栈的通信类型记载到存储单元中保 存的配置文件中, 在所述装置上电初始化时为配置文件中存在的通信组件创 建对应的通信任务及其收发队列, 通过收发队列在所述装置正常运行中分别 与业务应用层管理模块和通信模块交互;
存储单元设置为: 保存配置文件;
消息分发单元设置为: 根据从收发队列的消息接收队列接收的报文消息
发往的目的地址判断对应的通信组件在配置文件中的通信类型, 将通信的基 本要素信息置于为报文消息配备的报文头内, 并将配有报文头的报文消息置 于对应的通信任务的消息发送队列中。
协议适配模块包括协议学习单元, 其中:
协议学习单元设置为: 在从消息接收队列收到报文消息后, 将新添加的 报文头的格式信息记载在存储单元中的配置文件中,作为新的通信类型保存; 协议加载单元还设置为: 在配置文件中添加或删除通信类型, 待装置重 新上电后加载或卸载相应的通信任务及其收发队列。
本发明与现有技术相比, 由于管理组件对通信组件釆用了即插即用、 动 态学习以及动态加载的方法, 能够大幅减小***升级的风险和业务的中断时 间, 对新型组件的支持更加迅速快捷; 此外, 如果***中只配置了少量几种 类型的子组件, 这种根据通信类型动态加载的方式可以大大减少通信口的开 销, 这在资源显得尤为紧张的嵌入式***中显得尤为重要。 本发明的方法及 装置, 能够在原有设备的基础上不增加***成本的前提下使得***稳定性、 灵活性大幅提升, 故具有良好的应用前景和使用价值。
附图概述
图 1为本发明的实现对多协议通信组件管理装置实施例的结构框图; 图 2为图 1中所示的协议适配模块实施例的结构框图;
图 3为本发明的实现对多协议通信组件管理方法实施例的流程图。
本发明的较佳实施方式
以下结合附图和优选实施例对本发明的技术方案进行详细地阐述。 以下 例举的实施例仅仅用于说明和解释本发明, 而不构成对本发明技术方案的限 制。
对于一种理想化的多协议通信组件管理装置 (譬如应用为一个通信监控
设备) , 其业务层面完全可以不知道底层具体所使用的各个协议的细节, 只 需要调用相应的发送和接收接口来执行报文的发送接收。 屏蔽底层通信的细 节可以降低***的耦合性, 从而提高***的模块化程度。 实际上, 对于一种 新协议类型的单板的应用, 只需要通过简单地修改配置文件和下载新的协议 栈模块就能实现。 对此, 如果通过 "即插即用"技术实现, 譬如将管理装置当 成主机, 把所有的业务单板当成一类即插即用的外设, 从而方便地进行挂接、 卸载。
本发明利用 "即插即用"技术来实现通信协议的动态管理。 在此, 各种通 信模块就像一个外设一样可以方便地挂接到***, 来实现对多种通信协议的 支撑。
本发明提出了一种在业务应用层管理模块和底层的通信模块之间增加一 层 "协议适配模块" 中间件的实现多协议通信组件管理装置实施例的结构, 如图 1所示, 其中:
业务应用层管理模块, 用于通过消息收发队列与协议适配模块交互, 将 所接收到的报文消息 (即报文体)传输给协议适配模块;
对于业务应用层管理模块来说, 底层具体的通信协议细节在此层面都是 透明的, 它无需知道每种通信类型的报文头格式是什么样的, 只负责处理报 文体部分。 它需要通过收发队列与协议适配模块交互, 不管消息是发给哪一 类型的单板, 都先统一将报文消息通过消息接收队列传输给协议适配模块进 行才艮文头适配处理。
协议适配模块, 作为通信协议即插即用的核心部分, 用于通过收发队列 分别与上层的业务应用层管理模块和下层的通信端***互, 实现消息分发、 协议学习以及通信协议的动态加载;
通信任务及其收发队列的创建或删除是由协议适配模块来动态调整的。 通信模块, 用于与收发任务相对应, 将来自协议适配模块的消息队列里 的消息内容、 源地址以及目的地址与对应的收发任务相应的接口耦合。
通信模块将消息内容、 源地址以及目的地址填写到对应的驱动收发函数
相应的入口参数上, 实现与对应的收发任务相应的接口耦合。
此处的目的地址是指***内各个单板的通信地址, 这些通信地址还都是 虚拟地址, 到各个不同的物理媒介上需要通过地址解析将其转换成实际的物 理地址, 即进行地址适配。
图 1 中所示的协议适配模块进一步包括协议加载单元、 协议学习单元、 消息分发单元以及存储单元, 如图 2所示, 其中:
协议加载单元, 用于将通信设备中所用到的单板通信类型 (即通信协议 类型) 以配置文件或数据库的形式记载, 并保存在存储单元中; 在使用时, 将对应的通信组件加载到 RAM中运行;
协议加载单元在***上电初始化的时读取该配置文件或数据库的内容, 只对那些在配置文件或者数据库中存在的通信类型创建对应的通信任务以及 收发队列。 这样, 当***需要支持新通信类型的单板时, 就可以通过修改配 置文件或数据库 (通过网管修改或者直接修改) 的方式增添新协议, 重新上 电后就会加载相应的通信任务和收发队列资源, 而***中未配置的通信协议 就处于静默状态不启用。
协议学习单元, 用于在从消息接收队列收到报文消息后, 将新添加的报 文头的格式信息记载在存储单元存储的配置文件或数据库中;
对于不同类型的单板, 存在通信协议格式上的差异。 交互报文包括报文 头和报文体两部分, 不同类型的单板主要差距在报文头的格式上, 而报文体 就是通过上述业务应用层管理模块的消息队列传递过来的报文内容。 协议学 习单元将新添加的报文头的格式信息放在配置文件或数据库中, 意味着学习 到了新的通信协议, 用于消息分发单元进行 >¾文头适配处理。 这样, 消息分 发单元在上电之后去读取报文头部的格式信息, 便将报文头和报文体合并组 成新的报文进行发送。
消息分发单元, 用于将从业务应用层管理模块通过消息接收队列传输的 消息分发给不同的通信任务。
在配置文件中的通信类型, 将通信的基本要素信息置于根据该通信类型为报 文消息配备的报文头内, 并将配有报文头的报文消息置于对应的通信任务的 收发队列的消息发送队列中待通信模块发送。
对于一个通信***的基本要素信息包括源地址、 目的地址和报文长度几 个部分。
存储单元, 用于保存配置文件。
图 3表示了本发明的实现对多协议通信组件管理方法实施例的流程, 包 括以下步骤:
110: 根据通信设备的配置情况创建配置文件, 在配置文件中至少记载设 备当前支持的通信通信类型;
此外, 在配置文件中还记载着设备当前协议的报文结构等其它信息。
120: 将设备当前支持的通信协议栈编译成动态链接库;
130: 当需要设备提供对新的协议栈的支持时, 将为此修改的配置文件和 重新编译的动态链接库下载到设备中, 形成一个新的组件;
140: 使协议栈新的组件生效;
很多操作***都提供了动态链接库管理的接口, 由此可以在不重新启动 ***的前提下动态的加载相应的库文件。 例如 linux ***中的 dlopen/dlsym/dlclose就实现了动态链接库的打开、使用及卸载功能,借此可以 完成不中断业务的在线升级。
150: 创建对应的队列和通信任务, ***进入正常运行状态。
当为新的组件创建完相应的队列和通信任务后, 便就完成了对新协议的 支撑, 由此***便可正常运行。
在此, 步骤 110是对步骤 140的一种补充, 防止***重启后又恢复到初 始状态(即未增添新组件的状态) , 每次增加 /卸载一新的组件, 必须修改配 置文件。
步骤 120是实现通信模块和操作***以及应用程序的剥离, 这样每次通
信模块升级的时候不用更新整个 Bin文件(兆容量级别) , 而只需更新通信 模块协议栈的动态链接库 (千字节级别)部分; 同时也可使应用程序 (处于 业务应用层管理模块中)部分版本得到很好的控制。
步骤 140是本发明重要的一步, 升级完配置文件和动态链接库之后, 可 以直接从命令行加载或卸载所需要动态链接库组件。
本发明上述的方法在具体实施方面简单易行, 主要体现在三个环节上: 在业务应用层管理模块和底层通信模块之间增加一个适配层, 即通过协 议适配模块降低业务和通信模块之间的耦合度;
将通信模块的协议栈从设备***中剥离出来编译成动态链接库, 以方便 升级;
在协议适配模块和通信模块中预留升级接口 , 就可以通过简单的符号表 替换来达到支持新通信模块的目的。
尽管为示例目的, 已经公开了本发明的优选实施例, 本领域的技术人员 将意识到各种改进、 增加和取代也是可能的, 因此, 本发明的范围应当不限 于上述实施例。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。
工业实用性
本发明与现有技术相比, 由于管理组件对通信组件釆用了即插即用、 动 态学习以及动态加载的方法, 能够大幅减小***升级的风险和业务的中断时 间, 对新型组件的支持更加迅速快捷; 此外, 如果***中只配置了少量几种
类型的子组件, 这种才艮据通信类型动态加载的方式可以大大减少通信口的开 销, 这在资源显得尤为紧张的嵌入式***中显得尤为重要。 本发明的方法及 装置, 能够在原有设备的基础上不增加***成本的前提下使得***稳定性、 灵活性大幅提升, 故具有良好的应用前景和使用价值。
Claims
1、 一种实现对多协议通信组件管理的方法, 该方法包括:
在通信设备的业务应用层和通信底层之间增加一个协议适配层; 当所述通信设备要对协议栈提供支持时, 通过所述协议适配层将所述协 议栈的通信类型记载在一配置文件中, 并将所述协议栈编译成动态链接库下 载到所述通信设备, 形成一个或多个通信组件, 并使能所述通信组件。
2、 按照权利要求 1所述的方法, 该方法还包括:
所述通信设备在上电初始化时, 通过所述协议适配层为所述配置文件中 存在的通信组件创建对应的通信任务及其收发队列,所述通信设备正常运行。
3、 按照权利要求 2所述的方法, 该方法还包括:
在所述通信设备正常运行过程中, 所述协议适配层通过所述收发队列分 别与所述业务应用层和所述通信底层的通信端***互, 实现消息分发和 /或协 议学习以及协议栈的动态加载或卸载。
4、 按照权利要求 3所述的方法, 其中, 实现消息分发包括: 所述业务应用层通过所述收发队列的消息接收队列将所接收到的报文消 息传输给所述协议适配层;
所述协议适配层根据所述报文消息发往的目的地址判断对应的通信组件 在所述配置文件中的通信类型, 将通信的基本要素信息置于为所述报文消息 配备的报文头内, 并将配有报文头的报文消息置于对应的通信任务的消息发 送队列中;
所述通信底层将所述消息发送队列中的报文消息、 源地址以及目的地址 填写到对应的驱动收发函数相应的入口参数上, 实现与对应的通信任务相应 接口的耦合。
5、 按照权利要求 4所述的方法, 其中, 实现协议学习包括: 所述协议适配层在从所述消息接收队列收到所述报文消息后, 将新添加 的报文头的格式信息记载在所述配置文件中, 作为新的通信类型保存。
6、 按照权利要求 4所述的方法,其中, 实现协议栈的动态加载或卸载 包括:
所述协议适配层在所述配置文件中添加或删除所述通信类型, 待所述通 信设备重新上电后加载或卸载相应的通信任务及其收发队列。
7、 按照权利要求 1至 6任一项所述的方法,在所述协议适配层将所述 协议栈的通信类型记载在配置文件之前, 所述方法还包括:
所述协议适配层根据所述通信设备的配置情况创建所述配置文件, 在所 述配置文件中除了记载所述通信设备当前支持的协议栈的通信类型外, 还记 载所述通信类型的报文结构信息; 将所述通信设备当前支持的协议栈编译成 动态链接库。
8、 一种实现对多协议通信组件管理的装置,其包括业务应用层管理模 块和底层的通信模块, 在所述业务应用层管理模块和所述通信模块之间所述 装置还包括一协议适配模块, 其中:
所述业务应用层管理模块设置为: 将接收到的报文消息传输给所述协议 适配模块;
所述协议适配模块设置为: 将协议栈的通信类型记载在一配置文件中, 并将所述协议栈编译成动态链接库下载, 形成一个或多个通信组件, 并使能 所述通信组件; 在所述装置正常运行时根据所述配置文件中记载的通信类型 分发收到的所述 文消息;
所述通信模块设置为: 将所述协议适配模块分发的报文消息下发到相应 的通信组件。
9、 按照权利要求 8所述的装置,其中, 所述协议适配模块包括协议加 载单元、 消息分发单元和存储单元,
所述协议加载单元设置为: 将支持的协议栈的通信类型记载到所述存储 单元中保存的所述配置文件中, 在所述装置上电初始化时为所述配置文件中 存在的通信组件创建对应的通信任务及其收发队列, 通过所述收发队列在所 述装置正常运行中分别与所述业务应用层管理模块和所述通信模块交互; 所述存储单元设置为: 保存所述配置文件;
所述消息分发单元设置为: 根据从所述收发队列的消息接收队列接收的 所述报文消息发往的目的地址判断对应的通信组件在所述配置文件中的通信 类型, 将通信的基本要素信息置于为所述报文消息配备的报文头内, 并将配 有报文头的报文消息置于对应的通信任务的消息发送队列中。
10、 按照权利要求 9所述的装置,其中, 所述协议适配模块包括协议学 习单元,
所述协议学习单元设置为:在从所述消息接收队列收到所述报文消息后, 将新添加的报文头的格式信息记载在所述存储单元中的配置文件中, 作为新 的通信类型保存;
所述协议加载单元还设置为: 在所述配置文件中添加或删除所述通信类 型, 待所述装置重新上电后加载或卸载相应的通信任务及其收发队列。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010139681.1 | 2010-03-26 | ||
CN201010139681.1A CN101820361B (zh) | 2010-03-26 | 2010-03-26 | 一种实现对多协议通信组件管理的方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2011116583A1 true WO2011116583A1 (zh) | 2011-09-29 |
Family
ID=42655314
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2010/076178 WO2011116583A1 (zh) | 2010-03-26 | 2010-08-20 | 一种实现对多协议通信组件管理的方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101820361B (zh) |
WO (1) | WO2011116583A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102780997A (zh) * | 2012-06-29 | 2012-11-14 | 深圳市赛格导航科技股份有限公司 | 无线通讯模块的通信方法及装置 |
EP3703328A4 (en) * | 2017-10-25 | 2020-10-28 | Crsc Research & Design Institute Group Co., Ltd. | PROCEDURE FOR SEPARATING AND APPLYING RSSP-II SECURITY PROTOCOL |
CN112131087A (zh) * | 2020-09-19 | 2020-12-25 | 中国电子科技集团公司第二十研究所 | 一种模拟软件通信层与业务应用层解耦***及实现方法 |
CN112985376A (zh) * | 2021-03-08 | 2021-06-18 | 中国电子科技集团公司第二十研究所 | 一种导航传感器自适应接口实现方法 |
CN114979309A (zh) * | 2022-05-18 | 2022-08-30 | 中国电子科技集团公司第二十八研究所 | 一种支持网络化目标数据随遇接入与处理的方法 |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102331931B (zh) * | 2011-07-25 | 2014-05-14 | 深圳万兴信息科技股份有限公司 | 动态库管理方法和装置 |
CN102508661A (zh) * | 2011-10-28 | 2012-06-20 | 航天科工深圳(集团)有限公司 | 一种通讯模块开发配置的方法和装置 |
CN102624685B (zh) * | 2011-11-24 | 2015-05-20 | 高新兴科技集团股份有限公司 | 一种可编码的智能设备协议处理方法 |
JP6714707B2 (ja) | 2016-03-30 | 2020-06-24 | オッポ広東移動通信有限公司Guangdong Oppo Mobile Telecommunications Corp., Ltd. | 中継伝送方法 |
WO2017206186A1 (zh) * | 2016-06-03 | 2017-12-07 | 广东欧珀移动通信有限公司 | 中继传输的方法和装置 |
CN106452833B (zh) * | 2016-08-30 | 2023-08-04 | 南京金水尚阳信息技术有限公司 | 一种rtu多协议动态加载的数据传输方法 |
CN108170491B (zh) * | 2017-12-26 | 2022-01-28 | 五八有限公司 | App动态链接库的配置方法、终端及计算机可读存储介质 |
CN109766194B (zh) * | 2018-11-29 | 2021-02-05 | 南瑞集团有限公司 | 基于消息的低耦合计划任务组件的实现方法及其*** |
CN109885309B (zh) * | 2019-01-14 | 2022-05-24 | 北京中科晶上科技股份有限公司 | 生成用于建立协议栈软件的配置文件的方法 |
CN110502352A (zh) * | 2019-08-21 | 2019-11-26 | 广州慧营智能科技有限公司 | 一种外部设备管理***及使用方法及具备该***的自助机 |
CN111343201A (zh) * | 2020-05-18 | 2020-06-26 | 成都数之联科技有限公司 | 一种快速适配协议变更的解析方法、装置及*** |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008084434A1 (en) * | 2007-01-11 | 2008-07-17 | Philips Intellectual Property & Standards Gmbh | Protocol converter for wireless patient monitoring |
CN101227473A (zh) * | 2008-01-28 | 2008-07-23 | 中兴通讯股份有限公司 | 用于多媒体通信***的主控会议的***及方法 |
US20090073983A1 (en) * | 2007-09-13 | 2009-03-19 | Jin-Hyoung Kim | METHOD AND APPARATUS FOR PROVIDING GATEWAY TO TRANSMIT IPv6 PACKET IN A WIRELESS LOCAL AREA NETWORK SYSTEM |
CN101587351A (zh) * | 2009-05-15 | 2009-11-25 | 深圳市康必达控制技术有限公司 | 智能电子设备可靠通讯的方法 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1567841A (zh) * | 2003-07-04 | 2005-01-19 | 华为技术有限公司 | 一种实现信息转发的设备及方法 |
CN100377556C (zh) * | 2004-01-01 | 2008-03-26 | 浙江大学 | 通信协议的构件化实现方法 |
CN100488263C (zh) * | 2005-07-08 | 2009-05-13 | 北京邮电大学 | 基于控制和应用分离、具有业务生成能力的智能外设*** |
-
2010
- 2010-03-26 CN CN201010139681.1A patent/CN101820361B/zh not_active Expired - Fee Related
- 2010-08-20 WO PCT/CN2010/076178 patent/WO2011116583A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008084434A1 (en) * | 2007-01-11 | 2008-07-17 | Philips Intellectual Property & Standards Gmbh | Protocol converter for wireless patient monitoring |
US20090073983A1 (en) * | 2007-09-13 | 2009-03-19 | Jin-Hyoung Kim | METHOD AND APPARATUS FOR PROVIDING GATEWAY TO TRANSMIT IPv6 PACKET IN A WIRELESS LOCAL AREA NETWORK SYSTEM |
CN101227473A (zh) * | 2008-01-28 | 2008-07-23 | 中兴通讯股份有限公司 | 用于多媒体通信***的主控会议的***及方法 |
CN101587351A (zh) * | 2009-05-15 | 2009-11-25 | 深圳市康必达控制技术有限公司 | 智能电子设备可靠通讯的方法 |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102780997A (zh) * | 2012-06-29 | 2012-11-14 | 深圳市赛格导航科技股份有限公司 | 无线通讯模块的通信方法及装置 |
CN102780997B (zh) * | 2012-06-29 | 2018-06-26 | 深圳市赛格导航科技股份有限公司 | 无线通讯模块的通信方法及装置 |
EP3703328A4 (en) * | 2017-10-25 | 2020-10-28 | Crsc Research & Design Institute Group Co., Ltd. | PROCEDURE FOR SEPARATING AND APPLYING RSSP-II SECURITY PROTOCOL |
CN112131087A (zh) * | 2020-09-19 | 2020-12-25 | 中国电子科技集团公司第二十研究所 | 一种模拟软件通信层与业务应用层解耦***及实现方法 |
CN112131087B (zh) * | 2020-09-19 | 2024-04-16 | 中国电子科技集团公司第二十研究所 | 一种模拟软件通信层与业务应用层解耦***及实现方法 |
CN112985376A (zh) * | 2021-03-08 | 2021-06-18 | 中国电子科技集团公司第二十研究所 | 一种导航传感器自适应接口实现方法 |
CN112985376B (zh) * | 2021-03-08 | 2024-03-15 | 中国电子科技集团公司第二十研究所 | 一种导航传感器自适应接口实现方法 |
CN114979309A (zh) * | 2022-05-18 | 2022-08-30 | 中国电子科技集团公司第二十八研究所 | 一种支持网络化目标数据随遇接入与处理的方法 |
CN114979309B (zh) * | 2022-05-18 | 2023-08-18 | 中国电子科技集团公司第二十八研究所 | 一种支持网络化目标数据随遇接入与处理的方法 |
Also Published As
Publication number | Publication date |
---|---|
CN101820361B (zh) | 2014-08-13 |
CN101820361A (zh) | 2010-09-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2011116583A1 (zh) | 一种实现对多协议通信组件管理的方法及装置 | |
US8966499B2 (en) | Virtual switch extensibility | |
US7197553B2 (en) | Network system having a virtual-service-module | |
US8151258B2 (en) | Managing software patches | |
US20100058329A1 (en) | Method and apparatus for dynamically instantiating services using a service insertion architecture | |
US10313282B1 (en) | Flexible middleware messaging system | |
CN106685679A (zh) | 一种网络服务部署方法和装置 | |
EP3734910B1 (en) | Method and device for upgrading driver | |
WO2009097776A1 (zh) | 一种实现业务升级的***、装置及方法 | |
WO2012113196A1 (zh) | 一种实现主备单板升级的方法及装置 | |
CN109194589B (zh) | 一种mdc实现方法及装置 | |
CN105162667B (zh) | 虚拟机配置方法和装置 | |
US10824486B1 (en) | Two-way clipboard exchange in virtual console | |
JP4071098B2 (ja) | ネットワークフィルタドライバのためのアーキテクチャおよびランタイム環境 | |
CN102707976A (zh) | 一种atca***及其管理固件版本的方法 | |
WO2018040923A1 (zh) | Pos 终端应用包的下载方法、装置及通讯方法 | |
US20110119348A1 (en) | Methods and systems for transmitting disk images | |
WO2024119861A1 (zh) | 一种区块链节点的部署方法、装置及终端设备 | |
US8051191B2 (en) | Ethernet extensibility | |
CN105573801B (zh) | 堆叠***中实现软件升级的方法、装置及*** | |
CN107547277A (zh) | 一种虚拟化控制板实现方法及网络通信设备 | |
US20030154472A1 (en) | Installation server | |
CN115913778A (zh) | 一种基于边车模式的网络策略更新方法、***及存储介质 | |
US20190208023A1 (en) | Systems and methods for smb monitor dialect | |
US7546361B2 (en) | Method and network for delivering management software for a network element |
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: 10848245 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: 10848245 Country of ref document: EP Kind code of ref document: A1 |