CN106254359A - A kind of configurable packet parsing system and method - Google Patents

A kind of configurable packet parsing system and method Download PDF

Info

Publication number
CN106254359A
CN106254359A CN201610655079.0A CN201610655079A CN106254359A CN 106254359 A CN106254359 A CN 106254359A CN 201610655079 A CN201610655079 A CN 201610655079A CN 106254359 A CN106254359 A CN 106254359A
Authority
CN
China
Prior art keywords
message
variable
format
module
parsing
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
CN201610655079.0A
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610655079.0A priority Critical patent/CN106254359A/en
Publication of CN106254359A publication Critical patent/CN106254359A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content

Abstract

The invention discloses a kind of configurable packet parsing system, described system includes server end, packet parsing module, variable pond, business module, client, wherein: server end is responsible for receiving message;Packet parsing module unpacks according to the message format defined in configuration file, and the variable after resolving is put into variable pond;By the way of shared drive, share described variable between business module, after Business Processing terminates, the content in variable pond is bundled into new message according to configuration file group and is sent to client.The present invention can pass through the flexible multiple message format of configuration file.According to different business, it is only necessary to write the dynamic base of packet parsing, greatly save the workload of secondary development, the trend of future server engine technique development will be become.

Description

A kind of configurable packet parsing system and method
Technical field
The present invention relates to the design field of packet parsing system, be specifically related to a kind of configurable packet parsing system And method.
Background technology
Nearly ten years, information technology especially computer networking technology is developed rapidly.Wherein, during message is network The carrier of information exchange, is the flow of information good by agreement format organization, and message format can be international convention formula, as TCP/IP assists View message;Can also be the message of specific industry, such as 8583 financial messages;Can also be free message format, as long as following double The standard that side formulates, how to define can.The form that information is arranged according to both sides or international convention is sent to by sender Receiving literary composition, recipient is again by form or the international convention tissue take out information of both sides' agreement, and this is packet parsing;Also it is message The necessary step of of operation, this embodies the final meaning of message.
Summary of the invention
The technical problem to be solved in the present invention is: the present invention is directed to problem above, it is provided that a kind of configurable packet parsing System and method, can pass through the flexible multiple message format of configuration file.According to different business, it is only necessary to write packet parsing Dynamic base, greatly save the workload of secondary development, will become future server engine technique development trend.
The technical solution adopted in the present invention is:
A kind of configurable packet parsing system, described system includes server end, packet parsing module, variable pond, business mould Block, client, wherein:
Server end is responsible for receiving message;
Packet parsing module unpacks according to the message format defined in configuration file, and the variable after resolving is put into variable Pond;
By the way of shared drive, described variable is shared, after Business Processing terminates, in variable pond between business module Appearance is bundled into new message according to configuration file group and is sent to client.
Described method uses the carrier that message exchanges, received server-side message as client and server client information After, packet parsing module unpacks according to the message format defined in configuration file, and the variable after resolving is put into variable pond In, by the way of shared drive, share these variablees between business module, after Business Processing terminates, by the content in variable pond It is bundled into new message according to configuration file group and is sent to client.
Described configuration file is XML file, and described method provides parsing and the group Bao Gong of message by arranging XML file Can, and according in the first step parsing resolving form, message length, message content, analytic message of XML format configuration message Hold and the content of final step parsing, flexible configuration, convenience.
The message format that described packet parsing module support resolves includes: f format, 8583 forms and separator lattice Formula message, can flexible expansion.
The form of message, when secondary development, can be customized by developer according to the demand of business, many to be applied to Plant development and application environment.
Described packet parsing module source file mainly comprises the source documents such as the most individual pack.c, packdeal.c, packpub.c Part, wherein pack.c is the entry program of message format conversion, and packdeal.c is the source file of the message processing different-format, Packpub.c is that message format changes public function.
The invention have the benefit that
The present invention can pass through the flexible multiple message format of configuration file.According to different business, it is only necessary to write packet parsing Dynamic base, greatly save the workload of secondary development, will become future server engine technique development trend.
Accompanying drawing explanation
Fig. 1 is packet parsing module operating diagram;
Fig. 2 is for unpacking workflow diagram;
Fig. 3 is group bag workflow diagram.
Detailed description of the invention
Below in conjunction with the accompanying drawings, according to detailed description of the invention, the present invention is further described:
Embodiment 1:
As it is shown in figure 1, a kind of configurable packet parsing system, described system includes server end, packet parsing module, variable Pond, business module, client, wherein:
Server end is responsible for receiving message;
Packet parsing module unpacks according to the message format defined in configuration file, and the variable after resolving is put into variable Pond;
By the way of shared drive, described variable is shared, after Business Processing terminates, in variable pond between business module Appearance is bundled into new message according to configuration file group and is sent to client.
Embodiment 2
On the basis of embodiment 1, method described in the present embodiment uses message to exchange as client and server client information Carrier, after received server-side message, packet parsing module unpacks according to the message format defined in configuration file, will solve Variable after analysis is put in variable pond, shares these variablees between business module by the way of shared drive, and Business Processing is tied Shu Hou, is bundled into new message by the content in variable pond according to configuration file group and is sent to client.
Embodiment 3
On the basis of embodiment 2, configuration file described in the present embodiment is XML file, and described method is by arranging XML file Parsing and the group packet function of message are provided, and according to the parsing form of XML format configuration message, message length, message content, solution Content that the content of the first step parsing of analysis message and final step resolve etc., flexible configuration, convenience.
Configuration file is specific as follows:
<PKGTYPE>XML</PKGTYPE>
<FIRSTWORK>
<ITEM NAME="#test_code" TYPE="n4" />
</FIRSTWORK>
<ANALYZE>
<PACKAGE RESPCD="#sys12">
<ITEM NAME="#len" TYPE="a8"/>
<ITEM NAME="#service" TYPE="a16" />
<ITEM NAME="#length" TYPE="a4" />
<ITEM NAME="#version" TYPE="a5" />
<ITEM NAME="#usrname" TYPE="a32" />
<ITEM NAME="#password" TYPE="a32" />
<ITEM NAME="#email" TYPE="a40" />
</PACKAGE>
<LASTWORK>
<ITEM NAME="#len" LENGTH="[0..7]"/>
</LASTWORK>
</ANALYZE>
As follows about the concrete form of configuration message:
The form of PKGTYPE: analytic message, such as: XML(XML form), 8583(8583 form), SEP (separator format report Literary composition) etc.;
The bag of PACKAGE: message;
The packing of ANALYZE: message and parsing need the content analyzed;
The territory of ITEM: message, can set name and type according to demand, and wherein n represents integer type, and a represents character string class Type;Type digitized representation length below;
The data structure in message territory:
struct ItemInfo
{
char* name;
char* len;
char* value;
}stItem;
FIRSTWORK: the content that the group bag first step resolves;
LASTWORK: unpack the content that final step resolves.
Embodiment 4
On the basis of embodiment 3, the message format that packet parsing module support described in the present embodiment resolves includes: fixed length lattice Formula, 8583 forms and separator format message, can flexible expansion.
Embodiment 5
On the basis of embodiment 4, the present embodiment developer, can be according to the demand of business when secondary development, to message Form is customized, to be applied to multiple development and application environment.
Embodiment 6
On the basis of any embodiment 1-5, packet parsing module source file described in the present embodiment mainly comprise even a pack.c, The source files such as packdeal.c, packpub.c, wherein pack.c is the entry program of message format conversion, and packdeal.c is Processing the source file of the message of different-format, packpub.c is that message format changes public function.
Embodiment is merely to illustrate the present invention, and not limitation of the present invention, about the ordinary skill of technical field Personnel, without departing from the spirit and scope of the present invention, it is also possible to make a variety of changes and modification, the most all equivalents Technical scheme fall within scope of the invention, the scope of patent protection of the present invention should be defined by the claims.

Claims (6)

1. a configurable packet parsing system, it is characterised in that described system include server end, packet parsing module, Variable pond, business module, client, wherein:
Server end is responsible for receiving message;
Packet parsing module unpacks according to the message format defined in configuration file, and the variable after resolving is put into variable Pond;
By the way of shared drive, described variable is shared, after Business Processing terminates, in variable pond between business module Appearance is bundled into new message according to configuration file group and is sent to client.
2. the configurable message parsing method of one based on claim 1, it is characterised in that described method uses message conduct The carrier of client and server client information exchange, after received server-side message, packet parsing module is according in configuration file The message format of definition unpacks, and the variable after resolving is put in variable pond, by shared drive between business module Mode shares these variablees, after Business Processing terminates, according to configuration file group, the content in variable pond is bundled into new message and sends out Deliver to client.
The configurable message parsing method of one the most according to claim 2, it is characterised in that described configuration file is XML file, described method provides parsing and the group packet function of message by arranging XML file, and according to XML format configuration report It is interior that the content of the first step parsing resolving form, message length, message content, analytic message of literary composition and final step resolve Hold.
The configurable message parsing method of one the most according to claim 3, it is characterised in that described packet parsing module Support that the message format resolved includes: f format, 8583 forms and separator format message.
The configurable message parsing method of one the most according to claim 4, it is characterised in that developer opens at secondary When sending out, according to the demand of business, the form of message can be customized.
6. according to the arbitrary described configurable message parsing method of one of claim 1-5, it is characterised in that described message solution Analysis module source file mainly comprises even pack.c, packdeal.c, packpub.c source file, and wherein pack.c is message lattice The entry program of formula conversion, packdeal.c is the source file of the message processing different-format, and packpub.c is that message format turns Change public function.
CN201610655079.0A 2016-08-11 2016-08-11 A kind of configurable packet parsing system and method Pending CN106254359A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610655079.0A CN106254359A (en) 2016-08-11 2016-08-11 A kind of configurable packet parsing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610655079.0A CN106254359A (en) 2016-08-11 2016-08-11 A kind of configurable packet parsing system and method

Publications (1)

Publication Number Publication Date
CN106254359A true CN106254359A (en) 2016-12-21

Family

ID=58078553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610655079.0A Pending CN106254359A (en) 2016-08-11 2016-08-11 A kind of configurable packet parsing system and method

Country Status (1)

Country Link
CN (1) CN106254359A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110351152A (en) * 2019-08-16 2019-10-18 中国银行股份有限公司 Message packet processing unit and method
CN110933077A (en) * 2019-11-29 2020-03-27 深圳市风云实业有限公司 Message parsing system and method
CN113452712A (en) * 2021-06-29 2021-09-28 上海通联金融服务有限公司 Analytic method based on Unionpay ISO 8583 message
CN114338747A (en) * 2021-12-31 2022-04-12 四川启睿克科技有限公司 Cloud scene control system and method supporting user-defined reporting of data messages by equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050050228A1 (en) * 2003-08-29 2005-03-03 Michael Perham Method and apparatus for the use of dynamic XML message formats with web services
CN101547156A (en) * 2009-05-04 2009-09-30 华为技术有限公司 Message parsing method and device
CN102546442A (en) * 2012-03-09 2012-07-04 北京神州数码思特奇信息技术股份有限公司 Communication protocol conversion technology
CN104022857A (en) * 2014-06-23 2014-09-03 浪潮电子信息产业股份有限公司 Server engine frame design method based on multiple working modes
CN104753997A (en) * 2013-12-30 2015-07-01 北京中科九章软件有限公司 Multi-terminal real-time interaction method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050050228A1 (en) * 2003-08-29 2005-03-03 Michael Perham Method and apparatus for the use of dynamic XML message formats with web services
CN101547156A (en) * 2009-05-04 2009-09-30 华为技术有限公司 Message parsing method and device
CN102546442A (en) * 2012-03-09 2012-07-04 北京神州数码思特奇信息技术股份有限公司 Communication protocol conversion technology
CN104753997A (en) * 2013-12-30 2015-07-01 北京中科九章软件有限公司 Multi-terminal real-time interaction method and system
CN104022857A (en) * 2014-06-23 2014-09-03 浪潮电子信息产业股份有限公司 Server engine frame design method based on multiple working modes

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110351152A (en) * 2019-08-16 2019-10-18 中国银行股份有限公司 Message packet processing unit and method
CN110933077A (en) * 2019-11-29 2020-03-27 深圳市风云实业有限公司 Message parsing system and method
CN113452712A (en) * 2021-06-29 2021-09-28 上海通联金融服务有限公司 Analytic method based on Unionpay ISO 8583 message
CN114338747A (en) * 2021-12-31 2022-04-12 四川启睿克科技有限公司 Cloud scene control system and method supporting user-defined reporting of data messages by equipment
CN114338747B (en) * 2021-12-31 2023-07-25 四川启睿克科技有限公司 Cloud scene control system and method supporting device to report data messages in self-defined mode

Similar Documents

Publication Publication Date Title
US9294543B2 (en) Generation of representational state transfer interface from application programming interfaces
CN106254359A (en) A kind of configurable packet parsing system and method
Ludovici et al. TinyCoAP: A novel constrained application protocol (CoAP) implementation for embedding RESTful web services in wireless sensor networks based on TinyOS
US9071561B2 (en) Document object model API for MIME
US20090007253A1 (en) Filtering technique for processing security measures in web service messages
EP1619663A1 (en) Speech enabled computing system
CN104660617B (en) A kind of data transmission system and method
JP2009518755A5 (en)
CN109800259A (en) Collecting method, device and terminal device
Lee et al. Design of a FlexRay/Ethernet gateway and security mechanism for in-vehicle networks
US20100287247A1 (en) Method and system for secure web service data transfer
JP5451897B2 (en) Method for processing SOAP message in network and network
US20120117160A1 (en) Adaptive differential propagation of soap messages
CN101997873A (en) Capability accessing method and accessing platform
Ustun A critical review of IEC 61850 testing tools
CN103514407B (en) The virus method and system of the audio-video document of production net are transferred to from Office Network
CN106341293B (en) A kind of method and device of information system access Enterprise Service Bus
US20160157129A1 (en) Compressing and transmitting structured information
EP3257235B1 (en) A method and apparatus for data mediation
EP2555111A1 (en) Signaling display method and system
Vandervelden et al. Evaluation of 6LoWPAN Generic Header Compression in the Context of a RPL Network
Brito et al. Programmable Data Plane Applications in 5G and Beyond Architectures: A Systematic Review
Zeman et al. Session Initiation Protocol Proxy in a Role of a Quality of Service Control Application in Software-Defined Networks
Kaczmarek Malware instrumentation application to regin analysis
IT201900000292A1 (en) System and method of protocol and semiautomatic memorization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161221