CN101944033A - Device and method for dynamically supporting multiple protocols in embedded system - Google Patents

Device and method for dynamically supporting multiple protocols in embedded system Download PDF

Info

Publication number
CN101944033A
CN101944033A CN2009101583834A CN200910158383A CN101944033A CN 101944033 A CN101944033 A CN 101944033A CN 2009101583834 A CN2009101583834 A CN 2009101583834A CN 200910158383 A CN200910158383 A CN 200910158383A CN 101944033 A CN101944033 A CN 101944033A
Authority
CN
China
Prior art keywords
protocol
script
module
embedded system
protocol stack
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN2009101583834A
Other languages
Chinese (zh)
Inventor
游智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2009101583834A priority Critical patent/CN101944033A/en
Publication of CN101944033A publication Critical patent/CN101944033A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a device and a method for dynamically supporting multiple protocols in an embedded system, relating to the embedded communication equipment field, and solving the problem that the embedded communication equipment is difficult to satisfy the increasing protocol compatibility demand. The device comprises a communication interface module, at least two protocol stack modules and two protocol stack matching script modules corresponding to the two protocol stack modules and a script configuration management module. The method comprises the following steps: calling the protocol content of a version according to a calling order; compiling the called protocol content to the protocol matching script identified by the embedded system; and loading the protocol matching script for the embedded system. The invention can solve the problem of the increasing protocol compatibility demand of the embedded communication equipment.

Description

Device and method for dynamically supporting multiple protocols in embedded system
Technical Field
The invention relates to the field of embedded communication equipment, in particular to a device and a method for dynamically supporting multiple protocols in an embedded system.
Background
With the wide application of embedded communication equipment, the variety of introduced communication protocols is increasing, taking the monitoring equipment of the intelligent power supply in the telecommunication field as an example, the updating and upgrading of the intelligent power supply leads the equipment with different protocols to coexist in one network, and higher requirements are provided for the protocol adaptation capability of the monitoring equipment.
At present, the method for supporting different communication protocols on the same device is mainly a method in which device software includes a plurality of protocol decoding and adapting modules for respectively completing corresponding processing, as described in patent No. CN 200510100189. The method compiles and links support modules of multiple protocols into the same version, so that the software version is large in size, a single communication protocol cannot be dynamically chosen or rejected in the version, and modification of any one communication protocol needs to be recompiled and linked to generate a new software version.
Disclosure of Invention
The invention provides a device and a method for dynamically supporting multiple protocols in an embedded system, which are used for solving the problem that embedded communication equipment is difficult to meet the increasing requirement of protocol compatibility.
The invention relates to a device for dynamically supporting multiple protocols in an embedded system, which comprises: the system comprises a communication interface module, at least two protocol stack modules, protocol stack adaptive script modules corresponding to the protocol stack modules one by one, and a script configuration management module; the communication interface module is used for forwarding the call command to a specified protocol stack module according to the received call command; the protocol stack module is respectively used for storing protocols of different versions and sending out the stored protocol contents after receiving the call command; the protocol stack adaptation script module is used for translating the received protocol content into a protocol adaptation script which can be identified by the embedded system; and the script configuration management module is used for managing the protocol stack adaptation script modules and calling the protocol adaptation scripts from the corresponding protocol stack adaptation script modules according to the calling command for loading by the embedded system.
Further still include: and the resource management module is used for managing hardware resources of the embedded system and transmitting the protocol adaptation script called by the script configuration management module to hardware in the embedded system.
A hardware interface abstract module and a driver module; the hardware interface abstract module is used for shielding hardware model difference and providing a uniform read-write hardware channel; and the driver module is used for reading the protocol adaptation script issued by the resource management module through a read-write hardware channel provided by the hardware interface abstract module and issuing a driver to each hardware according to the protocol adaptation script.
Still further still include: and the operating system module is connected with the driver module and is used for managing the resources of the embedded system. And the file system module is connected with the driver module and is used for storing the protocol adaptation script and the data file.
The invention relates to a method for dynamically supporting multiple protocols in an embedded system, which comprises the following steps: calling a version of protocol content according to the calling command; translating the called protocol content into a protocol adaptation script which can be identified by the embedded system; and loading the protocol adaptation script for an embedded system.
Further comprising the steps of: stopping running the script of the current protocol before starting loading the protocol adaptation script; or further comprising the steps of: and stopping running the script of the original protocol after the protocol adaptation script is successfully loaded. And deleting the relevant information of the protocol script which is stopped running.
The invention has the following beneficial effects: because the communication interface module forwards the call command to a specified protocol stack module, the protocol stack module and the corresponding protocol stack adaptation script module are translated to obtain an independent protocol adaptation script, and then the script configuration management module calls the protocol adaptation script for loading by the embedded system. Therefore, the invention does not need to compile and link a plurality of versions of protocols into the same version, thereby avoiding the huge volume of software versions and the need of recompiling and linking to generate new software versions when any one communication protocol is modified. Therefore, the invention can solve the problem that the protocol compatibility requirement of the embedded communication equipment is increased day by day.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram showing a structure of a conventional multiprotocol support apparatus;
FIG. 2 is a block diagram of a dynamic multi-protocol support apparatus according to a first embodiment of the present invention;
FIG. 3 is a block diagram of a dynamic multi-protocol support apparatus according to a second embodiment of the present invention;
fig. 4 is a schematic diagram of software upgrade of a dynamic multi-protocol support apparatus according to a third embodiment of the present invention;
fig. 5 is a flowchart illustrating an implementation of software upgrade of a dynamic multi-protocol support apparatus according to a fourth embodiment of the present invention.
Detailed Description
In order to solve the problem that the protocol compatibility requirement of the embedded communication equipment is increased day by day, the invention provides the following ideas: the parser of the script language is integrated on the device software operating system, and the application program of the user is established on the parser to realize the separation of the protocol support capability and the main version, improve the maintainability of the system and provide convenience for the version management of the device. A series of interface functions are completed between the script parser and the operating system, and in order to ensure the flexibility of the system, the definition of the interface functions is as simple as possible. It should be noted that, in a non-conflicting manner, specific components of the embodiments in the present application may be replaced by components having the same characteristics, and are not limited to the embodiments described. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In the first embodiment, as shown in fig. 1, the device is a block diagram of a conventional multi-protocol support device, and the device is composed of a communication interface module, a resource management module, a protocol stack module of multiple protocols, and a protocol stack adaptation module, and each module is generated in the same executable version when compiled.
Fig. 2 is a device for dynamically supporting multiple protocols according to an embodiment of the present invention, which is composed of a communication interface module, at least two protocol stack modules, protocol stack adaptation script modules corresponding to the protocol stack modules one by one, and a script configuration management module.
The communication interface module provides a uniform calling interface for the network side and is used for forwarding the calling command to a specified protocol stack module according to the received calling command.
The protocol stack modules are respectively used for storing protocols of different versions (namely, the content of the protocols), store the protocol a corresponding to the protocol stack module a in fig. 2, store the protocol B corresponding to the protocol stack module B, store the protocol C corresponding to the protocol stack module C, and send out the stored protocol content after receiving the call command.
The protocol stack adaptation script module translates the protocol analysis program realized by the script into a system call which can be identified by a hardware interface operation or an operating system, namely translates the received protocol content into a protocol adaptation script which can be identified by an embedded system.
The script configuration management module is used for managing script configuration and loading scripts, is a core component for providing dynamic protocol support by the device, and is an interface for an operator to manage and configure equipment protocol support capability. The method is particularly used for managing each protocol stack adaptation script module and calling the protocol adaptation scripts from the corresponding protocol stack adaptation script modules according to the calling command for loading by the embedded system.
The supporting process of multiple protocols is completed by the dynamic configuration of the protocol stack and the protocol adaptation script by the script configuration management module, that is, only the protocol stack and the protocol adaptation script which are locally needed are in the running version of the system at a certain time.
Further, in fig. 2, if the protocol support capability of the current device needs to be upgraded, the script configuration management module may provide an interface to load a new protocol stack and a protocol adaptation script into the system, and when the new protocol stack and the protocol adaptation script are successfully loaded, the old protocol stack and the protocol adaptation module are notified to be down, the new protocol stack and the protocol adaptation script take over the current service, and the main application program in the whole process does not need to be down.
In a second embodiment, referring to fig. 3, a device for dynamically supporting multiple protocols according to a second embodiment of the present invention is shown, which includes: the system comprises a communication interface module, at least two protocol stack modules, protocol stack adaptive script modules corresponding to the protocol stack modules one by one, and a script configuration management module; further still include: the device comprises a resource management module, a hardware interface abstraction module and a driver module; still further still include: an operating system module and a file system module.
The communication interface module provides a uniform calling interface for the network side and is used for forwarding the calling command to a specified protocol stack module according to the received calling command.
The protocol stack modules are respectively used for storing protocols of different versions (namely, the content of the protocols), store the protocol a corresponding to the protocol stack module a in fig. 3, store the protocol B corresponding to the protocol stack module B, store the protocol C corresponding to the protocol stack module C, and send out the stored protocol content after receiving the call command.
The protocol stack adaptation script module translates the protocol analysis program realized by the script into a system call which can be identified by a hardware interface operation or an operating system, namely translates the received protocol content into a protocol adaptation script which can be identified by an embedded system.
The script configuration management module is used for managing script configuration and loading scripts, is a core component for providing dynamic protocol support by the device, and is an interface for an operator to manage and configure equipment protocol support capability. The method is particularly used for managing each protocol stack adaptation script module and calling the protocol adaptation scripts from the corresponding protocol stack adaptation script modules according to the calling command for loading by the embedded system.
And the resource management module is used for managing hardware resources of the embedded system and transmitting the protocol adaptation script called by the script configuration management module to hardware in the embedded system.
And the hardware interface abstract module is used for shielding the difference of hardware models and providing a uniform hardware reading and writing channel for the driver module.
And the driver module is used for reading the protocol adaptation script issued by the resource management module through a read-write hardware channel provided by the hardware interface abstract module and issuing a driver to each hardware according to the protocol adaptation script. And controlling data receiving and sending, and realizing reading and writing of data streams through a cache technology.
And the operating system module is connected with the driver module and is used for managing the resources of the embedded system. In particular, it manages system resources, such as processor, storage, and process resources, when present. There is a relatively simple software means to replace its function when it is not present, such as equal priority resource mobilization by an infinite round-robin function.
And the file system module is connected with the driver module and is used for storing the protocol adaptation script and the data file. If the device does not exist, the functions of the device can be replaced by other devices, such as a Flash Memory (Flash Memory) and a system formed by starting and loading software.
The third embodiment of the device of the present invention can be used for realizing the dynamic upgrade of the software of the embedded device. Fig. 4 is a schematic diagram of a method for dynamically upgrading embedded device software by dynamically supporting multiple protocols according to an embodiment of the present invention, after a version of protocol content is called according to a call command and the called protocol content is translated into a protocol adaptation script recognizable by an embedded system, as shown in fig. 4, the method includes the following steps S302 to S308:
step S302, the script configuration management module loads a new protocol stack and a protocol adaptation script according to the needs, stores the new protocol stack and the new protocol adaptation script in a file system or a memory of the system, and waits to be started;
step S304, the script configuration management module starts a new step analysis virtual machine for running a new protocol stack and a protocol adaptation script module;
step S306, if the operation in the step S304 is successful, stopping the current step analysis virtual machine;
and step S308, deleting the old protocol stack and the protocol adaptation script and releasing the storage space.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The fourth embodiment of the apparatus of the present invention can be used to implement dynamic upgrade of embedded device software. After a version of protocol content is called according to a call command and the called protocol content is translated into a protocol adaptation script recognizable by an embedded system, as shown in fig. 5, the following steps 402 to 412 are included:
step 402: the script configuration management module completes the loading of a new protocol stack and a protocol analysis script under the trigger of an administrator, if the loading is successful, the step 404 is entered, otherwise, the loading is carried out again;
step 404: the script configuration management module starts a new script analysis virtual machine to run a new protocol stack and a protocol adaptation script, the virtual machine and the currently running script analysis virtual machine are independent on a storage space, if the starting is successful, the step 406 is carried out, otherwise, the starting is restarted;
step 406: finishing the service on the premise of ensuring the consistency of the service data after the last service provided by the current virtual machine is finished, and entering step 408 after the service is stopped;
step 408: stopping the currently running step analysis virtual machine to release the memory space;
step 410: the new step resolution virtual machine started in step 404 takes over the service;
step 412: and deleting the old protocol stack and the protocol adaptation script by the script configuration management module to release the storage space, and ending the process.
In summary, the embodiments of the present invention provide a device for dynamically supporting multiple protocols, which can be used to implement a method for dynamically upgrading software of an embedded device, to solve the problem that the embedded communication device is difficult to meet the increasing requirement for protocol compatibility, and provide a flexible protocol support method, thereby improving the deployment efficiency of new protocols and reducing the version management cost of the embedded communication device.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. An apparatus for dynamically supporting multiple protocols in an embedded system, comprising: the system comprises a communication interface module, at least two protocol stack modules, protocol stack adaptive script modules corresponding to the protocol stack modules one by one, and a script configuration management module; wherein,
the communication interface module is used for forwarding the call command to a specified protocol stack module according to the received call command;
the protocol stack module is respectively used for storing protocols of different versions and sending out the stored protocol contents after receiving the call command;
the protocol stack adaptation script module is used for translating the received protocol content into a protocol adaptation script which can be identified by the embedded system;
and the script configuration management module is used for managing the protocol stack adaptation script modules and calling the protocol adaptation scripts from the corresponding protocol stack adaptation script modules according to the calling command for loading by the embedded system.
2. The apparatus for dynamically supporting multiple protocols in an embedded system according to claim 1, further comprising: and the resource management module is used for managing hardware resources of the embedded system and transmitting the protocol adaptation script called by the script configuration management module to hardware in the embedded system.
3. The apparatus for dynamically supporting multiple protocols in an embedded system according to claim 2, further comprising: a hardware interface abstract module and a driver module; wherein,
the hardware interface abstract module is used for shielding hardware model difference and providing a uniform read-write hardware channel;
and the driver module is used for reading the protocol adaptation script issued by the resource management module through a read-write hardware channel provided by the hardware interface abstract module and issuing a driver to each hardware according to the protocol adaptation script.
4. The apparatus for dynamically supporting multiple protocols in an embedded system according to claim 3, further comprising: and the operating system module is connected with the driver module and is used for managing the resources of the embedded system.
5. The apparatus for dynamically supporting multiple protocols in an embedded system according to claim 3, further comprising: and the file system module is connected with the driver module and is used for storing the protocol adaptation script and the data file.
6. A method for dynamically supporting multiple protocols in an embedded system is characterized by comprising the following steps:
calling a version of protocol content according to the calling command;
translating the called protocol content into a protocol adaptation script which can be identified by the embedded system;
and loading the protocol adaptation script for an embedded system.
7. The method for dynamically supporting multiple protocols in an embedded system according to claim 6, further comprising the steps of:
and stopping running the script of the current protocol before starting loading the protocol adaptation script.
8. The method for dynamically supporting multiple protocols in an embedded system according to claim 6, further comprising the steps of:
and stopping running the script of the original protocol after the protocol adaptation script is successfully loaded.
9. The method according to claim 7 or 8, wherein the related information of the protocol script which is stopped is deleted.
CN2009101583834A 2009-07-09 2009-07-09 Device and method for dynamically supporting multiple protocols in embedded system Pending CN101944033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101583834A CN101944033A (en) 2009-07-09 2009-07-09 Device and method for dynamically supporting multiple protocols in embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101583834A CN101944033A (en) 2009-07-09 2009-07-09 Device and method for dynamically supporting multiple protocols in embedded system

Publications (1)

Publication Number Publication Date
CN101944033A true CN101944033A (en) 2011-01-12

Family

ID=43436034

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101583834A Pending CN101944033A (en) 2009-07-09 2009-07-09 Device and method for dynamically supporting multiple protocols in embedded system

Country Status (1)

Country Link
CN (1) CN101944033A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289416A (en) * 2011-07-12 2011-12-21 信雅达系统工程股份有限公司 Image collection method based on virtual hardware equipment
CN106302523A (en) * 2016-09-21 2017-01-04 北京邦天信息技术有限公司 A kind of device and method making smart machine support Multi-protocol coexisting cooperation
CN107688538A (en) * 2017-08-31 2018-02-13 北京蓝海讯通科技股份有限公司 A kind of script execution, device and computing device
CN109639493A (en) * 2018-12-20 2019-04-16 新华三技术有限公司 The network equipment, behavior control device and TSN configuration method
CN109889521A (en) * 2019-02-21 2019-06-14 北京航星永志科技有限公司 Memory, communication channel multiplexing implementation method, device and equipment
CN111427617A (en) * 2019-01-09 2020-07-17 阿里巴巴集团控股有限公司 Data processing method, device and equipment
WO2024119384A1 (en) * 2022-12-06 2024-06-13 北京航天长征飞行器研究所 Dynamically configurable application layer communication protocol testing method

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289416B (en) * 2011-07-12 2015-03-04 信雅达系统工程股份有限公司 Image collection method based on virtual hardware equipment
CN102289416A (en) * 2011-07-12 2011-12-21 信雅达系统工程股份有限公司 Image collection method based on virtual hardware equipment
CN106302523B (en) * 2016-09-21 2022-03-04 北京邦天信息技术有限公司 Device and method for enabling intelligent equipment to support multi-protocol coexistence cooperation
CN106302523A (en) * 2016-09-21 2017-01-04 北京邦天信息技术有限公司 A kind of device and method making smart machine support Multi-protocol coexisting cooperation
CN107688538A (en) * 2017-08-31 2018-02-13 北京蓝海讯通科技股份有限公司 A kind of script execution, device and computing device
CN107688538B (en) * 2017-08-31 2020-11-06 四川睿象科技有限公司 Script execution method and device and computing equipment
CN109639493A (en) * 2018-12-20 2019-04-16 新华三技术有限公司 The network equipment, behavior control device and TSN configuration method
CN109639493B (en) * 2018-12-20 2022-03-25 新华三技术有限公司 Network device, state control device and TSN configuration method
CN111427617A (en) * 2019-01-09 2020-07-17 阿里巴巴集团控股有限公司 Data processing method, device and equipment
CN111427617B (en) * 2019-01-09 2023-05-30 斑马智行网络(香港)有限公司 Data processing method, device and equipment
CN109889521A (en) * 2019-02-21 2019-06-14 北京航星永志科技有限公司 Memory, communication channel multiplexing implementation method, device and equipment
CN109889521B (en) * 2019-02-21 2021-11-19 北京航星永志科技有限公司 Memory, communication channel multiplexing implementation method, device and equipment
WO2024119384A1 (en) * 2022-12-06 2024-06-13 北京航天长征飞行器研究所 Dynamically configurable application layer communication protocol testing method

Similar Documents

Publication Publication Date Title
CN101944033A (en) Device and method for dynamically supporting multiple protocols in embedded system
CN110162345B (en) Application program access method and device and storage medium
CN104579719B (en) A kind of upgrade method and system, host computer and optical module of firmware
US8347318B2 (en) Application component communication apparatus of SCA-based system and method thereof
CN101707399B (en) Method and system for acquiring electric energy information
CN109547367B (en) Software radio platform based on SCA
US9710288B2 (en) Method and device for loading application program
CN1710966A (en) Intelligent external system based on control and use separation and having business generation ability
CN101025698A (en) Apparatus for forcibly terminating thread blocked on input/output operation and method for the same
CN103729189A (en) Broadcast protocol conversion method, system and terminal based on LUA
CN105871966A (en) Message distribution method, device and system
CN114064152A (en) Embedded multi-core debugging system based on dynamic loading and debugging method thereof
CN114363170A (en) Container service network configuration method and related product
CN113076144A (en) Power amplifier adaptation method, terminal device, storage medium and computer program product
CN106919391B (en) Embedded system of customizable operating system component facing smart phone
CN101179414A (en) Method of integrating lower network management function in higher network management
CN116643854A (en) Service arrangement method and device, flow controller and task processor
CN112035270A (en) Interface adaptation method, system, device, computer readable medium and electronic equipment
CN100452793C (en) Business transmitting method based on soft exchange network
CN101932145B (en) Device and method for managing software versions in wireless communication system
KR20080024751A (en) Apparatus for lightweighting application through duplicating management of application in environment of osgi middleware for embedded terminal and method thereof
CN111611307A (en) Report exporting method and device
CN110413285A (en) Method for deploying cloud service and method for developing cloud service
CN107357853B (en) Method and device for operating REDIS console and computer system
CN101626431A (en) Processing method and processing system capable of adapting to communication mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110112