CN100464546C - An ASN.1 protocol processor - Google Patents

An ASN.1 protocol processor Download PDF

Info

Publication number
CN100464546C
CN100464546C CNB031053505A CN03105350A CN100464546C CN 100464546 C CN100464546 C CN 100464546C CN B031053505 A CNB031053505 A CN B031053505A CN 03105350 A CN03105350 A CN 03105350A CN 100464546 C CN100464546 C CN 100464546C
Authority
CN
China
Prior art keywords
protocol
data
asn
server end
client
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.)
Expired - Fee Related
Application number
CNB031053505A
Other languages
Chinese (zh)
Other versions
CN1525714A (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB031053505A priority Critical patent/CN100464546C/en
Publication of CN1525714A publication Critical patent/CN1525714A/en
Application granted granted Critical
Publication of CN100464546C publication Critical patent/CN100464546C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The invention discloses a kind of ASN.1 protocol processor, which is used in the protocol interaction between client end and server end and the conversion of protocol data and type flow data. It includes: the protocol data description model which is built with the ASN.1 protocol, and protocol process flow model which is built with protocol process flow coding; the protocol data description model stores the ASN.1 protocol description information described with expansion mark language, and ASN.1 protocol data needed by the protocol process flow set according to the description information; the protocol process model carries on protocol interaction and protocol conversion according to the protocol data description model information, and according to the built protocol process flow. The invention can decrease the difficulty of development and workload of system maintenance.

Description

A kind of ASN.1 protocol processor
Technical field
The present invention relates to a kind of ASN.1 protocol processes technology, particularly a kind of ASN.1 protocol processor.
Background technology
The ASN.1 agreement is a kind of abstract grammar mark standard, in order to definition heterogeneous system, for example data interaction between Windows and the unix system.The ASN.1 agreement is widely used at field of telecommunications, is mainly used in the client/server structure to communicate, and its process comprises:
1, sets up being connected of client and server end;
2, carrying out protocol interaction handles and protocol encoding and decoding;
3, close connection.
Said process usually by client a software module---the ASN.1 protocol processor is realized.Wherein step 2 protocol interaction process comprises data transmission and Data Receiving, needs the ASN.1 protocol data is carried out encoding operation before transmission, needs after the reception server end bytes of stream data is carried out decode operation, realizes comparatively complicated.
At present, in adopting of the most webmaster/application system developments of ASN.1 agreement as communication protocol, the processing method of ASN.1 protocol processor is: all use Java to carry out protocol interaction to every agreement and handle and finish encoding and decoding work, ASN.1 protocol data and bytes of stream data are carried out data transaction mutually, realize application layer encoding and decoding the ASN.1 data.Java language is a kind of cross-platform programming language, and it makes the code portable.The basic process of its protocol interaction is referring to Fig. 1, and Fig. 1 is a prior art ASN.1 protocol processor schematic diagram.
Referring to shown in Figure 1, prior art ASN.1 protocol processor 100 is only handled by a protocol interaction and coding/decoding program 101 constitutes, and all processing procedures are all finished by it.At first, set up being connected between client and the server end by ASN.1 protocol processor 100; Then, the client application system submits the ASN.1 request to ASN.1 protocol processor 100; Protocol interaction in the ASN.1 protocol processor 100 is handled and coding/decoding program 101, after using the bytes of stream data that Java can receive this protocol code as server end, the ASN.1 request that is converted to bytes of stream data is sent to the application system of server end; After the application system of server end receives this request, send the ASN.1 response to ASN.1 protocol processor 100; Protocol interaction is handled and coding/decoding program 101, after use Java is decoded as the ASN.1 protocol data with this response message, the ASN.1 response of handling is sent to the application system of client; The application system of client receives the ASN.1 response, finishes protocol interaction; At last, ASN.1 protocol processor 100 is closed between client and the server end this and is connected.
Because existing technology is all to use Java to carry out protocol interaction in application program to every agreement to handle and encoding and decoding work, realize application layer encoding and decoding to the ASN.1 data, make the program code of some large and medium-sized software systems reach ten thousand line code levels, caused the workload of huge exploitation and maintenance, to using developer's knowledge and skills topology requirement height.Simultaneously, very high owing to all functions are all finished by a program to the accuracy requirement of program, there is small mistake to be difficult to debugging, the workload that has increased debugging again and safeguarded.
The XML technology of rising in recent years (eXtensible Markup Language, extending mark language) is a kind of received text form that Web goes up the expression structured message, can all convert the data of different data format to the XML form, by the function served as bridge of XML, between heterogeneous system, realize data migration.
The XML technology also is not applied in the processing of ASN.1 communication protocol at present.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of ASN.1 protocol processor, reduce difficulty and workload that the webmaster application protocol is handled application and development.
For achieving the above object, technical scheme of the present invention specifically is achieved in that
A kind of ASN.1 protocol processor, be used for carrying out between the client and server end conversion of protocol interaction and protocol data and bytes of stream data, this protocol processor comprises: the protocol data describing module and the protocol processes process module that has solidified the protocol processes process encoding of having solidified the ASN.1 agreement;
Wherein, the ASN.1 protocol description information that protocol data describing module storage is described with extending mark language (XML), and be stored in carry out protocol interaction before, the needed ASN.1 protocol data of protocol processes flow process that is provided with according to this descriptor;
The protocol processes process module is according to the ASN.1 request of client, from the protocol data describing module, take out corresponding ASN.1 protocol description information, and according to this descriptor the ASN.1 request of client is encoded to the bytes of stream data that server end can receive and sends to server end; Maybe will be decoded as the ASN.1 protocol data from the bytes of stream data that server end receives and return to client.
Described protocol processes process module can further comprise: solidified the protocol processes flow process layer of protocol interaction process, the codec layer of having solidified encoding-decoding process and articulamentum;
Protocol processes flow process layer receives the ASN.1 request that client is sent, and takes out corresponding ASN.1 protocol description information from the protocol data describing module, sends to codec layer; Codec layer is encoded to the bytes of stream data that server end can receive, Apple Talk Echo Protocol Apple Talk handling process layer according to this descriptor with the ASN.1 of client request; Protocol processes flow process layer sends to server end with this bytes of stream data through articulamentum;
Or protocol processes flow process layer will send to codec layer through articulamentum from the bytes of stream data that server end receives; Codec layer is decoded as the loopback of ASN.1 protocol data with this bytes of stream data and gives protocol processes flow process layer; Protocol processes flow process layer returns to client with this ASN.1 protocol data;
And articulamentum is controlled by protocol processes flow process layer, set up being connected of client and server end, and after a protocol interaction is finished, keep being connected of client and server end, when needs carry out next time protocol interaction, directly use the connection of maintenance to communicate.
Described protocol processes flow process layer can further comprise: solidified the simple queries flow process unit of data query process and solidified the data subscription flow process unit of subscription data process; Described protocol data describing module further comprises: server end information and the descriptor that need enter above-mentioned which flow process unit;
Described simple queries flow process unit, when being used in client query server end data, control user end to server end sends the one query request, and receives the data query that server end returns;
Described data are subscribed to the flow process unit, and when being used in client subscription server end data, control user end to server end sends subscribe request one time, and receives all subscription data that repeatedly returned by server end.
Described articulamentum can further comprise: connection pool unit and connection pool manager; Connection pool manager control connection pool unit is set up and is kept being connected of client and server end.
Described protocol data describing module can further comprise: the descriptor of the title of every ASN.1 agreement, command code, type of message, request msg type and response data type.
As seen from the above technical solutions, this ASN.1 protocol processor of the present invention has reduced the difficulty and the workload of application and development.When the design of protocol change, the modification of protocol processes part only need be revised description document, and need not to revise coding.Greatly reduce system's maintenance workload in the future.Simultaneously, reduced the scale of application system.
Description of drawings
Fig. 1 is a prior art ASN.1 protocol processor schematic diagram;
Fig. 2 is a preferred embodiment schematic diagram of the ASN.1 protocol processor of the present invention's use;
Fig. 3 is the structural representation of protocol data describing module embodiment illustrated in fig. 2.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
ASN.1 protocol processor of the present invention, the protocol processes process encoding is cured as the protocol processes process module, peel off from handling process changing the most frequent data module in the protocol processes process simultaneously, mode with the XML description document is set up the protocol data describing module to the ASN.1 protocol data, realizes that automatically the ASN.1 data send and receive.
Carry out ASN.1 protocol interaction process abstract, and generally be that the java program coding is cured as the protocol processes process module with its software coding, comprise two quasi-protocol process flow module: simple queries process module and data are subscribed to (being sometimes referred to as Real-time Data Service) process module.In addition, encoding-decoding process is cured as codec, calls, make the encoding and decoding rule also can replace easily and reuse by above-mentioned process module.The protocol processes process is cured, makes that processing procedure was constant when concrete agreement changed.
Simultaneously, use the XML language to ASN.1 protocol data and server info and which flow process information such as to handle by and be described, set up the protocol data describing module.Wherein, the ASN.1 protocol data has comprised the descriptors such as title, command code, type of message, request msg type and response data type of all ASN.1 agreements.Data content in this protocol data describing module is provided with when bringing into operation in system, when concrete agreement changes, is provided with or revises getting final product in the time of only need bringing into operation in system, does not need to change processing procedure.
Like this, ASN.1 protocol processor of the present invention is referring to Fig. 2.Fig. 2 is a preferred embodiment schematic diagram of the ASN.1 protocol processor of the present invention's use, as shown in Figure 2, protocol processor 200 of the present invention comprises the protocol data describing module 201 of having solidified the ASN.1 agreement and has solidified the agreement process module 202 of protocol processes process encoding.
Wherein, the structure of protocol data describing module 201 is referring to Fig. 3, and Fig. 3 is the structural representation of protocol data describing module embodiment illustrated in fig. 2.Protocol definition 301 in the protocol data describing module 201 comprises a plurality of protocol family definition 302; Protocol family definition 302 comprises server definition 303 and all protocol definitions 306; Server definition 303 comprises server name 304 and flow process unit number 305; A protocol definition 307 in all protocol definitions 306 comprises the information such as agreement name 308, protocol command sign indicating number 309, type of message 310, request msg type 311 and response data 312 of unique identification agreement.Type of message 310 wherein is send modes of predefine type of message specified protocol, does not generally make an amendment, and other definition can define according to the content of concrete agreement.Data content wherein is provided with when bringing into operation in system.320 expression definition thereafter are not only one among the figure, can be for a plurality of.
Agreement process module 202 comprises protocol processes flow process layer 203, articulamentum 204 that has solidified the protocol interaction process and the codec layer 205 of having solidified encoding-decoding process.
Protocol processes flow process layer 203 receives the ASN.1 request that client is sent, and takes out corresponding ASN.1 protocol description information from protocol data describing module 201, sends to codec layer 205; Codec layer 205 is encoded to the bytes of stream data that server end can receive, Apple Talk Echo Protocol Apple Talk handling process layer 203 according to this descriptor with the ASN.1 of client request; Protocol processes flow process layer 203 sends to server end with this bytes of stream data through articulamentum 204;
Or protocol processes flow process layer 203 will send to codec layer 205 through articulamentum 204 from the bytes of stream data that server end receives; Codec layer 205 is decoded as the loopback of ASN.1 protocol data with this bytes of stream data and gives protocol processes flow process layer 203; Protocol processes flow process layer 203 returns to client with this ASN.1 protocol data;
In addition, protocol processes flow process layer 203 can also comprise the simple queries flow process unit that has solidified the data query process and solidify the data subscription flow process unit (not illustrating among Fig. 2) of subscription data process.
Simple queries flow process unit is used for when client query server end data, and control user end to server end sends the one query request, and receives the data query that server end returns, and the characteristics of data query process are one time.Typical applications is certain user's of inquiry a information, inquiry bill or the like.
Data are subscribed to the flow process unit and are used for when client subscription server end data, and control user end to server end sends subscribe request one time, and receives repeatedly all subscription data that server end returns.The data subscription procedure is: client is sent out and is once asked self is registered to server end, and later server end directly sends back to the data of subscribing to the client of registration.This mutual typical feature is many times.It is real-time alarm that the typical case uses, and in a single day server end receives warning information, each alarm information can be sent to the client of all registrations.
Articulamentum 204 also comprises connection pool unit 207 and connection pool manager 206, communicate by protocol processes flow process layer 203 and connection pool manager 206, set up being connected of client and server end by connection pool manager 206 control connection pool units 207, and after finishing, a protocol interaction keeps being connected of client and server end, when needs carried out next time protocol interaction, directly the connection with maintenance communicated.
By the above embodiments as seen, this ASN.1 protocol processor of the present invention has reduced the difficulty and the workload of application and development.When the design of protocol change, the modification of protocol processes part only need be revised description document, and need not to revise coding.Greatly reduce system's maintenance workload in the future.Simultaneously, the scale of application system also is able to reduction to a certain degree.And, realize details because shielded the protocol interaction flow process, reduce application developer's knowledge and skills topology requirement, thereby reduced personnel's training cost.

Claims (5)

1. ASN.1 protocol processor, be used between the client and server end, carrying out the conversion of protocol interaction and protocol data and bytes of stream data, it is characterized in that this protocol processor comprises: the protocol data describing module and the protocol processes process module that has solidified the protocol processes process encoding of having solidified the ASN.1 agreement;
Wherein, the ASN.1 protocol description information that protocol data describing module storage is described with extending mark language (XML), and be stored in carry out protocol interaction before, the needed ASN.1 protocol data of protocol processes flow process that is provided with according to this descriptor;
The protocol processes process module is according to the ASN.1 request of client, from the protocol data describing module, take out corresponding ASN.1 protocol description information, and according to this descriptor the ASN.1 request of client is encoded to the bytes of stream data that server end can receive and sends to server end; Maybe will be decoded as the ASN.1 protocol data from the bytes of stream data that server end receives and return to client.
2. protocol processor as claimed in claim 1 is characterized in that, described protocol processes process module further comprises: solidified the protocol processes flow process layer of protocol interaction process, the codec layer of having solidified encoding-decoding process and articulamentum;
Protocol processes flow process layer receives the ASN.1 request that client is sent, and takes out corresponding ASN.1 protocol description information from the protocol data describing module, sends to codec layer; Codec layer is encoded to the bytes of stream data that server end can receive, Apple Talk Echo Protocol Apple Talk handling process layer according to this descriptor with the ASN.1 of client request; Protocol processes flow process layer sends to server end with this bytes of stream data through articulamentum;
Or protocol processes flow process layer will send to codec layer through articulamentum from the bytes of stream data that server end receives; Codec layer is decoded as the loopback of ASN.1 protocol data with this bytes of stream data and gives protocol processes flow process layer; Protocol processes flow process layer returns to client with this ASN.1 protocol data;
And articulamentum is controlled by protocol processes flow process layer, set up being connected of client and server end, and after a protocol interaction is finished, keep being connected of client and server end, when needs carry out next time protocol interaction, directly use the connection of maintenance to communicate.
3. protocol processor as claimed in claim 2 is characterized in that, described protocol processes flow process layer further comprises: solidified the simple queries flow process unit of data query process and solidified the data subscription flow process unit of subscription data process; Described protocol data describing module further comprises: server end information and the descriptor that need enter above-mentioned which flow process unit;
Described simple queries flow process unit is used for when client query server end data, and control user end to server end sends the one query request, and receives the data query that server end returns;
Described data are subscribed to the flow process unit, are used for when client subscription server end data, and control user end to server end sends subscribe request one time, and receives all subscription data that repeatedly returned by server end.
4. protocol processor as claimed in claim 2 is characterized in that, described articulamentum further comprises: connection pool unit and connection pool manager; Connection pool manager control connection pool unit is set up and is kept being connected of client and server end.
5. as claim 1 or 3 described protocol processors, it is characterized in that described protocol data describing module further comprises: the descriptor of the title of every ASN.1 agreement, command code, type of message, request msg type and response data type.
CNB031053505A 2003-02-25 2003-02-25 An ASN.1 protocol processor Expired - Fee Related CN100464546C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031053505A CN100464546C (en) 2003-02-25 2003-02-25 An ASN.1 protocol processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031053505A CN100464546C (en) 2003-02-25 2003-02-25 An ASN.1 protocol processor

Publications (2)

Publication Number Publication Date
CN1525714A CN1525714A (en) 2004-09-01
CN100464546C true CN100464546C (en) 2009-02-25

Family

ID=34282621

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031053505A Expired - Fee Related CN100464546C (en) 2003-02-25 2003-02-25 An ASN.1 protocol processor

Country Status (1)

Country Link
CN (1) CN100464546C (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100466652C (en) * 2004-09-24 2009-03-04 华为技术有限公司 Coding and decoding method of information
US8533357B2 (en) * 2004-12-03 2013-09-10 Microsoft Corporation Mechanism for binding a structured data protocol to a protocol offering up byte streams
CN100393077C (en) * 2004-12-06 2008-06-04 中兴通讯股份有限公司 Compression of command messages between boards
CN1972276B (en) * 2006-11-26 2010-08-11 华为技术有限公司 A management method and system for protocol access
CN101222365B (en) * 2008-01-23 2010-12-08 中兴通讯股份有限公司 Similar C structure interface packet processing method
CN101834848B (en) * 2010-03-29 2013-04-24 北京航空航天大学 Method for describing protocol by using XML and protocol resolving system built by same
CN101827105B (en) * 2010-05-03 2013-02-06 北京大学 Optimization method of protocol processor design
CN101854231A (en) * 2010-05-27 2010-10-06 武汉虹信通信技术有限责任公司 Protocol encoding and decoding method based on protocol model
CN102262560B (en) * 2010-05-27 2016-12-28 阿里巴巴集团控股有限公司 The call method of a kind of remote service, Apparatus and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1258978A (en) * 1998-12-30 2000-07-05 三星电子株式会社 Data communication channel processing equipment, protocol stack structure and their operating method for transmitter
US20020129331A1 (en) * 2000-12-15 2002-09-12 Ibm Corporation Strategy for dynamically modeling ASN.1 data to an object model

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1258978A (en) * 1998-12-30 2000-07-05 三星电子株式会社 Data communication channel processing equipment, protocol stack structure and their operating method for transmitter
US20020129331A1 (en) * 2000-12-15 2002-09-12 Ibm Corporation Strategy for dynamically modeling ASN.1 data to an object model

Also Published As

Publication number Publication date
CN1525714A (en) 2004-09-01

Similar Documents

Publication Publication Date Title
CN102594833B (en) A kind of communication protocol adapting method and system
CN101197812B (en) System and method for implementing page invocation
CN1859359B (en) Realizing method and its device for communication protocol described by abstract grammar rule
CN112527528A (en) Data transmission method, device and storage medium based on message queue
EP2352269B1 (en) Service access method and system
US7418708B2 (en) JMS integration into an application server
CA2511912A1 (en) System and method for building and execution of platform-neutral generic services' client applications
CN100464546C (en) An ASN.1 protocol processor
CN101807205B (en) Processing module, device, and method for processing of xml data
US8020051B2 (en) Message handling in a service-oriented architecture
US20070204054A1 (en) ASN.1 protocol processor and method for ASN.1 protocol processing
CN114885044B (en) Self-adaptive analysis processing method for heterogeneous monitoring data packet of measurement and control equipment
CN101021786A (en) Method for calling universal structure
CN112131087B (en) Decoupling system for simulation software communication layer and business application layer and implementation method
CN101202689A (en) Network robot system and method of communication therein
CA2255133A1 (en) Method and apparatus for efficient representation of variable length identifiers in a distributed object system
KR100670605B1 (en) System and method for servicing multimedia contents and recording medium thereof
CN102111160A (en) Coding and decoding system and codec for reactive system test
CN102571541A (en) Message encoding-decoding method and device
CN105024923B (en) The method and device that message category based on XMPP extension message is realized
CN115373815A (en) Task scheduling method and device, electronic equipment and storage medium
CN105791342A (en) Configuration-based monitoring method, device and system
CN101145959A (en) A method and system for automatic realization of network management function
CN102821116B (en) A kind of online service provides method, device and information system
CN115357240B (en) Micro-service model construction method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090225

Termination date: 20160225