[go: up one dir, main page]

CN104660548B - Diameter message resolution methods and device - Google Patents

Diameter message resolution methods and device Download PDF

Info

Publication number
CN104660548B
CN104660548B CN201310581296.6A CN201310581296A CN104660548B CN 104660548 B CN104660548 B CN 104660548B CN 201310581296 A CN201310581296 A CN 201310581296A CN 104660548 B CN104660548 B CN 104660548B
Authority
CN
China
Prior art keywords
message
avp
resolvers
diameter
diameter message
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
CN201310581296.6A
Other languages
Chinese (zh)
Other versions
CN104660548A (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.)
SHENZHEN XINWEI TELECOMM TECHNOLOGY Co Ltd
Beijing Xinwei Telecom Technology Inc
Original Assignee
SHENZHEN XINWEI TELECOMM TECHNOLOGY Co Ltd
Beijing Xinwei Telecom Technology Inc
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 SHENZHEN XINWEI TELECOMM TECHNOLOGY Co Ltd, Beijing Xinwei Telecom Technology Inc filed Critical SHENZHEN XINWEI TELECOMM TECHNOLOGY Co Ltd
Priority to CN201310581296.6A priority Critical patent/CN104660548B/en
Publication of CN104660548A publication Critical patent/CN104660548A/en
Application granted granted Critical
Publication of CN104660548B publication Critical patent/CN104660548B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention proposes a kind of diameter message resolution methods, including:Message analytic tree is set, and builds message analytic tree object, wherein, the message analytic tree is set according to pre-defined message format, and the message analytic tree is used to parse diameter message;Parsing node corresponding to being matched using the message analytic tree object to the diameter message received from tree;Physical fit is carried out to the diameter message with corresponding parsing node, until all atom belonging values of the diameter message are completed to AVP dissection process;Data are extracted in the diameter message after analytically completing.

Description

Diameter message resolution methods and device
Technical field
The present invention relates to internet arena, in particular to diameter message resolution methods and device.
Background technology
Diameter be IETF exploitation aaa protocol of new generation, AAA be Authentication (certification), Authorization (mandate), Accounting (charging).Diameter includes the different application extension agreement of basic agreement. Diameter basic agreements provide a basic framework for various application extension agreements, and it defines message format and message Extended method, the treatment mechanism of message, the Security Assurance Mechanism of the transmission mechanism of agreement and agreement etc..
Diameter possesses good autgmentability and universal, with the continuous development of diameter agreements and complete Kind, the field of diameter applications and scope are also more and more extensive, and the thing followed is for its performance, reliability and disappeared Cease the requirement also more and more higher of the scalability of decoding;Simultaneously diameter agreements be one be carried on it is real-time on SCTP/TCP Agreement, in many applications due to requiring that it has efficient message handling ability using the usage scenario of itself, such as in real time Charging etc. is applied.
Good autgmentability possessed by Diameter is to have benefited from diameter message institute in itself in very broad aspect The high scalability having.Diameter message be one can spread tree, a rather than flat static structure. In order to efficiently parse diameter message, obviously can not possibly be allocated in advance for non-static data structure by internal memory (interior Deposit pond) or resolving in directly new/delete mode build message.
Currently for the parsing of diameter message, all use substantially in resolving and directly pass through new/delete side Formula builds message, while the parsing to message is also to be driven by message data, pass through in resolving search it is corresponding Rule verified, analyzing efficiency is relatively low, can not meet to require under the application scenarios for having high request to message analyzing efficiency.
For above mentioned problem present in correlation technique, there is presently no propose rational solution.
The content of the invention
The invention provides diameter message resolution methods and device, is disappeared with least solving diameter in correlation technique Cease the problem of analyzing efficiency is low.
According to an aspect of the invention, there is provided a kind of diameter message resolution methods, including:
Message analytic tree is set, and builds message analytic tree object, wherein, the message analytic tree is according to pre-defined Message format set, the message analytic tree be used for diameter message is parsed;Use the message analytic tree Object parses node corresponding to being matched to the diameter message received from tree;With corresponding parsing node to described Diameter message carries out physical fit, until all atom belonging values of the diameter message are complete to AVP dissection process Into;Data are extracted in the diameter message after analytically completing.
Preferably, the message analytic tree includes:Physical fit device, behavior adapter, AVP resolvers and data pick-up Device, wherein, the physical fit device is used for the adaptation of message structure;The behavior adapter is used for the diameter message The number that middle AVP occurs is tested;The AVP resolvers are used to the AVP in the diameter message be identified;Institute State data pick-up device to couple with the AVP resolvers, the extraction for carrying out content is handled.
Preferably, the physical fit device includes:Permanent order physical fit device and on-fixed sequential organization adapter, its In, the permanent order adapter is used to parse the message elements of permanent order structure successively;The on-fixed order Adapter is used to parse the unfixed message elements in position.
Preferably, the AVP resolvers include:Atom A VP resolvers and compound AVP resolvers, wherein, the atom solution Parser is the minimum unit for parsing, and the compound AVP resolvers include multiple atom A VP resolvers.
Preferably, before extracting the data in the diameter message after analytically completing, methods described Also include:The distribution of internal memory is carried out, wherein, the distribution of the internal memory is the memory pool by being bundled on the AVP resolvers Come what is be allocated, wherein, each AVP resolvers bind a memory pool.
Preferably, memory pool managing internal memory by the way of busy, not busy chained list, wherein, distributed using the memory pool During internal memory, memory pool takes out memory block from not busy chained list and adds the initial address of the memory block in busy chained list.
According to an aspect of the present invention, a kind of diameter message resolver is additionally provided, it is characterised in that bag Include:Setup module, for setting message analytic tree, and message analytic tree object is built, wherein, the message analytic tree is basis What pre-defined message format was set, the message analytic tree is used to parse diameter message;Matching module, use The parsing node corresponding to matched using the message analytic tree object to the diameter message received from tree;It is adapted to mould Block, for carrying out physical fit to the diameter message with corresponding parsing node, until the institute of the diameter message There is atom belonging value to complete AVP dissection process;Abstraction module, in the diameter message after analytically completing Extract data.
Preferably, the message analytic tree includes:Physical fit device, behavior adapter, AVP resolvers and data pick-up Device, wherein, the physical fit device is used for the adaptation of message structure;The behavior adapter is used for the diameter message The number that middle AVP occurs is tested;The AVP resolvers are used to the AVP in the diameter message be identified;Institute State data pick-up device to couple with the AVP resolvers, the extraction for carrying out content is handled.
Preferably, the physical fit device includes:Permanent order physical fit device and on-fixed sequential organization adapter, its In, the permanent order adapter is used to parse the message elements of permanent order structure successively;The on-fixed order Adapter is used to parse the unfixed message elements in position;And/or the AVP resolvers include:Atom A VP is parsed Device and compound AVP resolvers, wherein, the atom resolver is the minimum unit for parsing, the compound AVP resolvers bag Include multiple atom A VP resolvers.
Preferably, in addition to:Distribute module, for extraction number in the diameter message after analytically completing According to the distribution for carrying out internal memory before, wherein, the distribution of the internal memory be by be bundled in the memory pool on the AVP resolvers come It is allocated, wherein, each AVP resolvers bind a memory pool.
By the present invention, solve in correlation technique that message analyzing efficiency is low, having high request to message analyzing efficiency The problem of can not meeting to require under application scenarios, improve the efficiency of message parsing.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, forms the part of the application, this hair Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the diameter message resolution methods of the embodiment of the present invention;
Fig. 2 is the block diagram of the diameter message analytic trees of the embodiment of the present invention;
Fig. 3 is the preferred flow charts of the diameter message resolution methods of the embodiment of the present invention;
Fig. 4 is the block diagram of the diameter message resolvers of the embodiment of the present invention;
Fig. 5 is the preferred block diagram of the block diagram of the diameter message resolvers of the embodiment of the present invention;
Fig. 6 is the preferred flow charts one of the diameter message resolution methods of the embodiment of the present invention;
Fig. 7 is the flow chart of the message processing procedure of the permanent order adapter of the embodiment of the present invention;
Fig. 8 is the flow chart of the message processing procedure of the on-fixed order adapter of the embodiment of the present invention;
Fig. 9 is the flow chart of the message processing procedure of the atom A VP resolvers of the embodiment of the present invention;
Figure 10 is the flow chart of the message processing procedure of the compound AVP resolvers of the embodiment of the present invention.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In the present embodiment, there is provided a kind of diameter message resolution methods, Fig. 1 are according to embodiments of the present invention The flow chart of diameter message resolution methods, as shown in figure 1, the flow comprises the following steps:
Step S102, message analytic tree is set, and builds message analytic tree object, wherein, the message analytic tree is basis What pre-defined message format was set, the message analytic tree is used to parse diameter message;
Step S104, match corresponding solution from tree to the diameter message received using the message analytic tree object Analyse node;Physical fit is carried out to the diameter message with corresponding parsing node, until all originals of the diameter message Sub- property value is completed to AVP dissection process;
Step S106, analytically extract data in the diameter message after completion.
By above-mentioned steps, message analytic tree is built in advance, matches corresponding parsing node, with corresponding parsing node to this Diameter message carries out physical fit, and the resolving of message drives by analytic tree, reduces in resolving frequently internal memory New/delete is operated, and improves the efficiency of message parsing.
Parsing tree construction can have many kinds, in the present embodiment, there is provided a kind of preferable structure, Fig. 2 are according to this The block diagram of the diameter message analytic trees of inventive embodiments, as shown in Fig. 2 the message analytic tree 10 includes:Physical fit device 101st, behavior adapter 102, AVP resolvers 103 and data withdrawal device 104, wherein, the physical fit device 101 is used for message knot The adaptation of structure;Behavior adapter 102 is used to test to the number that AVP in the diameter message occurs;The AVP is parsed Device 103 is used to the AVP in the diameter message be identified;The data pick-up device 104 couples with the AVP resolvers 103, Extraction for carrying out content is handled.
In order to easily facilitate processing, physical fit device can include:Permanent order physical fit device and on-fixed order are tied Structure adapter, wherein, the permanent order adapter is used to parse the message elements of permanent order structure successively;This is non-solid Determine order adapter to be used to parse the unfixed message elements in position.
Preferably, AVP can include atom A VP and compound AVP, in order to adapt to two kinds of AVP, AVP resolvers It can include:Atom A VP resolvers and compound AVP resolvers, wherein, the atom resolver is the minimum unit for parsing, The compound AVP resolvers include multiple atom A VP resolvers.
Fig. 3 is the preferred flow charts of diameter message resolution methods according to embodiments of the present invention, as shown in figure 3, Before extracting the data in the diameter message after analytically completing, this method also includes:
Step S105, the distribution of internal memory is carried out, wherein, the distribution of the internal memory is by being bundled on the AVP resolvers Memory pool is allocated, wherein, each AVP resolvers bind a memory pool.
Preferably, memory pool managing internal memory by the way of busy, not busy chained list, wherein, use the memory pool storage allocation When, memory pool takes out memory block from not busy chained list and adds the initial address of the memory block in busy chained list.
According to an aspect of the present invention, a kind of diameter message resolver is additionally provided, Fig. 4 is according to the present invention The block diagram of the diameter message resolvers of embodiment, as shown in figure 4, the device includes:
Setup module 20, for setting message analytic tree, and message analytic tree object is built, wherein, the message analytic tree It is to be set according to pre-defined message format, the message analytic tree is used to parse diameter message;
Matching module 40, for being matched using the message analytic tree object to the diameter message received from tree pair The parsing node answered;Adaptation module, for carrying out physical fit to the diameter message with corresponding parsing node, until this All atom belonging values of diameter message are completed to AVP dissection process;
Abstraction module 60, for extracting data in the diameter message after analytically completing.
Preferably, the message analytic tree includes:Physical fit device, behavior adapter, AVP resolvers and data withdrawal device, Wherein, the physical fit device is used for the adaptation of message structure;Behavior adapter is used to AVP in the diameter message occur Number test;The AVP resolvers are used to the AVP in the diameter message be identified;The data pick-up device with The AVP resolvers are coupled, and the extraction for carrying out content is handled.
Preferably, the physical fit device includes:Permanent order physical fit device and on-fixed sequential organization adapter, its In, the permanent order adapter is used to parse the message elements of permanent order structure successively;On-fixed order is adapted to Device is used to parse the unfixed message elements in position;And/or the AVP resolvers include:Atom A VP resolvers and multiple AVP resolvers are closed, wherein, the atom resolver is the minimum unit for parsing, and the compound AVP resolvers include multiple originals Sub- AVP resolvers.
The preferred block diagram of the block diagram of diameter message resolvers according to embodiments of the present invention Fig. 5, as shown in figure 5, Diameter message resolvers also include:Distribute module 50, in the diameter message after analytically completing The distribution of internal memory is carried out before extracting data, wherein, the distribution of the internal memory is the memory pool by being bundled on the AVP resolvers Come what is be allocated, wherein, each AVP resolvers bind a memory pool.
A preferred embodiment is illustrated below in conjunction with the accompanying drawings.
There is provided a kind of diameter message resolution methods in the preferred embodiment, Fig. 6 is according to embodiments of the present invention The preferred flow charts one of diameter message resolution methods, as shown in fig. 6, this method key step includes:
S601, according to the message format of definition, suitable message parsing tree construction is set;
S602, according to the message analytic tree of setting, message analytic tree object is built in internal memory;
S603, message analytic tree match suitable parsing node according to the diameter message received from tree.And create An empty message is built, is preserved for the message after parsing;
S604, physical fit is carried out to message body with the parsing node matched, matched by circulation and recurrence, Zhi Daosuo There are all completions of atom A VP analytic structures to handle;
S605, the memory pool set with AVP resolvers carry out Memory Allocation;
S606, the data pick-up device set with AVP resolvers are carried out extracting data from message and are put into the allocated In internal memory;
S607, message AVP will be parsed and be put into message object;
S608, after message use, message is submitted into total memory pool and reclaimed.
Structure message analytic tree, analytic tree are made up of polytype node in advance, complete different functions.The solution of message Analysis process is driven by analytic tree, non-common data-driven, and an AVP resolver is responsible for parsing an AVP structure in message, Reduce frequently internal memory new/delete operations in resolving.AVP resolvers are bound with memory pool, can be rapidly performed by difference The Memory Allocation AVP resolvers of size are bound in structure with data pick-up device, need not be searched in resolving, once Structure is reused, and can be rapidly performed by data pick-up method;AVP resolvers are in structure with behavior adapter bundle, parsing During need not be searched, once structure reuse, data pick-up method can be rapidly performed by, message can be greatly improved The efficiency of parsing.Newly-increased diameter information orders code either adjusts any structure or type of information order code, it is only necessary to Reset the structure of analytic tree, it is not necessary to make other any modifications.
Diameter message is made up of diameter message headers and multiple identical or different types of avp. Diameter message headers are fixed, and AVP rule is defined by ABNF normal forms.
ABNF normal forms, which define rule to the AVP of diameter message, can be abstracted as structure description rule and behavior description rule Then.The form of diameter message is defined using ABNF normal forms in basic agreement, and each diameter message is by multiple phases Same or different AVP (Attribute-Value-Pairs) compositions, reference configuration are as follows:
<Group-Relate-Request>::=<Diameter Header:838,REQ,PXY>
<Session-Id>
<Auth-Session-State>
{Origin-Host}
{Origin-Realm}
[Vendor-Specific-Application-Id]
{Origin-Host}
{Origin-Realm}
[Destination-Host]
{Destination-Realm}
{UDN}
*{PTT-Group-Node}
*[Proxy-Info]
*[Route-Record]
“<>" angle brackets provide fixed position occur AVP;" { } " braces provides the AVP that must occur;“<>" point Bracket provides the AVP of optional appearance;* this AVP of table can repeat.And the AVP for forming message can be one by multiple bases The AVP, i.e. AVP or of a Group types basic AVP of the composite construction of plinth AVP compositions.
Message analytic tree can be obtained by above-mentioned be abstracted, analytic tree includes following four part:
1. physical fit device
2. behavior adapter
3.AVP resolvers
4. data pick-up device
Structure description rule mainly describes the position of AVP appearance;I.e. "<>" " { } " " [] ", "<>", represent that AVP is appeared in and disappear Fixed position in breath;" { } " " [] " represents AVP in the message without fixed position.
The number that the main description AVP of behavior description rule occurs;That is " n*m ", the minimum number that n marks occur, m are represented Existing maximum times, it is 0 that " * ", which identifies minimum occurrence number, is up to infinity.
Previously described diameter message structures can use parsing tree representation, as follows:
Parse node
| _ permanent order adapter
| _ atom A VP resolvers<Session-Id>:Behavior adapter 1*1
| _ atom A VP resolvers<Auth-Session-State>:Behavior adapter 1*1
| _ on-fixed order adapter
| _ atom A VP resolvers { Origin-Host }:Behavior adapter 1*1
| _ atom A VP resolvers { Origin-Realm }:Behavior adapter 1*1
| _ atom A VP resolvers { Destination-Realm }:Behavior adapter 1*1
| _ atom A VP resolvers { UDN }:Behavior adapter 1*1
| _ compound AVP resolvers { PTT-Group-Node }:Behavior adapter 0*n
| _ atom A VP resolvers { GID }:Behavior adapter 1*1
| _ atom A VP resolvers { Relate-Type }:Behavior adapter 1*1
| _ atom A VP resolvers { Relate-Result }:Behavior adapter 1*1
| _ atom A VP resolvers [Vendor-Specific-Application-Id]:Behavior adapter 0*1
| _ atom A VP resolvers [Destination-Host]:Behavior adapter 0*1
| _ atom A VP resolvers [Proxy-Info]:Behavior adapter 0*n
| _ atom A VP resolvers [Route-Record]:Behavior adapter 0*n
Physical fit device, permanent order physical fit device and on-fixed sequential organization adapter can be divided into
Physical fit device only carries out the adaptation of message structure, without the extraction of specific message content data;Structure is fitted Orchestration can be included mutually, and the message analytic tree logical construction of a completion is formed with AVP resolvers.
Permanent order adapter, a collecting structure is represented, multiple minor structure units, these subclass are included in the structure Unit is a sequential organization, i.e., these minor structure unit positions in set are changeless.Therefore parsed in message When can carry out the parsing of message successively according to the structural order that analytic tree defines for the message elements of permanent order structure.It is right For diameter message, message can be solved according to message header, message body as the superiors' permanent order adapter structure Analysis.
On-fixed order adapter, a collecting structure is represented, multiple minor structure units, these subsets are included in the structure Closing the position of unit can not fix.As in above-mentioned structure, Origin-Host AVP (A), Origin-Realm AVP (B), Three AVP of Destination-Realm AVP (C) appearance order can be ABC, can be BAC or CAB.
AVP resolvers, it can be atomized AVP resolvers and compound AVP resolvers according to its structure:
Atom A VP resolvers, represent the AVP structures of a single structure, and it is a minimum resolution unit, one An AVP for carrying specific data message is included in AVP resolvers.
Compound AVP resolvers, the AVP structures of a Group type are represented, it can include one or more atoms/multiple Close the resolution unit of structure.
AVP resolvers carry out the identification of AVP in message.
Behavior adapter verifies to AVP occurrence numbers in message.
Data pick-up device is bound with AVP parsing node parsings, completes extraction, the conversion of content.
The message processing procedure of physical fit device:
For permanent order adapter, the minor structure unit included by it (AVP resolvers) is arranged in order for order, Therefore the matching way used is matched one by one according to minor structure unit (AVP resolvers) order set in analytic tree, For example, in the permanent order adapter of above-mentioned Group-Relate-Request command codes message, first to Session-Id AVP Corresponding AVP resolvers do further matching treatment, after identification, are matched to resolver corresponding to second AVP, Finished until all minor structure units that permanent order adapter is included all match.Fig. 7 according to the embodiment of the present invention fixation The flow chart of the message processing procedure of order adapter, as shown in fig. 7, comprising the following steps that of including of the process:
S701, a sub- construction unit in start to process permanent order adapter;
S702, dissection process is carried out to sub- construction unit (AVP resolvers).Return to the result of minor structure unit.Such as The current minor structure unit resolves success of fruit, then continue S704 processing, if parsing failure, carries out S707 processing;
S704, judges whether all minor structure units included of current permanent order adapter are all disposed, if No, then continue S702 processing, carry out the parsing of next minor structure unit;If it is disposed, then it represents that can be with Terminate the processing of current permanent order adapter;
S706, after adapter is disposed, carry out behavior adaptation procedure processing corresponding to adapter;
S707, the mistake occurred in resolving is handled, be substantially carried out setting of error code etc..
For on-fixed order adapter, the position that the minor structure unit included by it (AVP resolvers) is occurred is simultaneously Do not fix, so needing to carry out Preliminary Analysis to message data, then with the minor structure unit progress included in adapter With identification, it is further processed after the match is successful.Know that all message datas are disposed.Fig. 8 is according to the embodiment of the present invention The flow chart of the message processing procedure of on-fixed order adapter, as shown in figure 8, comprising the following steps that of including of the process:
S801, start to process on-fixed order adapter;
S802, pre-parsed is carried out to message content, it is main to parse the header information of AVP in message, and header is preserved For follow-up further dissection process;
S803, the AVP headers obtained to pre-parsed are handled, in the minor structure unit of on-fixed order adapter AVP resolvers corresponding to matching.If the match is successful, the judgement of S804 steps, if it fails to match, description messages can be carried out In there is unrecognizable message, then perform S809, report mistake;
S804, message to be resolved is judged, check whether message has been disposed, if Message Processing finishes, S805 processing is then carried out, if be not disposed, S802 processing is carried out, until Message Processing finishes;
S805, behavior adaptation procedure processing is carried out to all minor structure units of on-fixed order adapter.Specific processing Process is subsequently being described in detail;
S806, the result that the behavior adaptation of inspection returns, if behavior is adapted to the processing for successfully, continuing to walk, If behavior adaptation result adaptation.Then carry out S809 error handle;
S807, due to simply carrying out pre-parsed to the minor structure unit of on-fixed physical fit device in above the step of, Complete data processing is not carried out, so needing further to carry out dissection process to data.
Wherein, in S802 steps, to message carry out pre-parsed when, it is necessary to which the length in correct message is tentatively sentenced It is disconnected, detector whether within the scope of message-length, if beyond message-length scope, can be directly at submittal error Reason, no longer carry out follow-up processing, the consumption of such reducibleness energy.Improve the efficiency of parsing.
The message processing procedure of AVP resolvers:
AVP resolvers include atom A VP resolvers and compound AVP resolvers.
For atom A VP resolvers, it is an indivisible minimum unit, and it does not include other any sub- knots Structure unit.Atom A VP resolvers all as fixation/revocable physical fit device and the minor structure unit of compound AVP resolvers, For matching the extraction of corresponding AVP and valid data in message.Fig. 9 disappears according to the atom A VP resolvers of the embodiment of the present invention The flow chart of processing procedure is ceased, is comprised the following steps as shown in figure 9, opening processing procedure:
S901, the processing of atom resolver start;
S902, reads the header in message to be resolved, and main information mainly includes AVP command codes and AVP length informations;
S903, the length information in AVP headers is verified substantially, judge whether it exceedes the length of information to be resolved Degree.If effective, then S904 processing is carried out, otherwise carry out S407 error handle;
S904, judges whether the command code in AVP headers matches with the command code set in current resolver.Such as The match is successful for fruit, then can perform S905;
S905, the step are that AVP data corresponding to current resolver are extracted, and data pick-up is set according to resolver Withdrawal device corresponding to the data type selection put is extracted.Scope is extracted to be extracted according to the length included in header. If occurring mistake in extraction process, submittal error processing is performed into S907;
According to the dtd--data type definition in diameter protocol specifications, the withdrawal device of one Types Below of definition
Data pick-up device Rule declaration
OctetString data pick-up devices The data of OctetString types are extracted
Interger32 data pick-up devices The data of Interger32 types are extracted
Interger64 data pick-up devices The data of Interger64 types are extracted
Unsigned32 data pick-up devices The data of Unsigned32 types are extracted
Unsigned64 data pick-up devices The data of Unsigned64 types are extracted
Float32 data pick-up devices The data of Float32 types are extracted
Float64 data pick-up devices The data of Float64 types are extracted
Grouped data pick-up devices The data of Grouped types are extracted
Address data pick-up devices The data of Address types are extracted
Time data pick-up devices The data of Time types are extracted
UTF8String data pick-up devices The data of UTF8String types are extracted
DiameterIdentity data pick-up devices The data of DiameterIdentity types are extracted
DiameterURI data pick-up devices The data of DiameterURI types are extracted
Enumerated data pick-up devices The data of Enumerated types are extracted
IPFilterRule data pick-up devices The data of IPFilterRule types are extracted
QoSFilterRule data pick-up devices The data of QoSFilterRule types are extracted
S906, resolver are disposed.
, it is necessary to carry out the distribution of internal memory wherein before data pick-up is carried out, Memory Allocation is by being bundled on resolver Memory pool be allocated.Each resolver binds the memory pool of a distribution regular length.These memory pools it is unified by One manager manages.Manager externally provides the recovery interface of a message.When message use finishes, united by manager One recovery.
Memory pool managing internal memory by the way of busy, not busy chained list.Using in memory pool during storage allocation, memory pool is from not busy chain Memory block is taken out in table and the initial address of memory block is added in busy chained list.Manager is according to corresponding message when message reclaims In avp content objects length search corresponding to memory pool, and the initial address of memory block is put into the not busy chained list of memory pool In.The size of memory pool can be pre-allocated according to specific application scenarios.
For compound AVP resolvers, it can include the combining structure unit of one or more minor structure unit, it Composition structure is similar to an analytic tree, can include the adapter of fixation/on-fixed order.So resolving is different from atom AVP resolvers, and it is more closely similar to the resolving of a message.Figure 10 disappears according to the compound AVP resolvers of the embodiment of the present invention The flow chart of processing procedure is ceased, as shown in Figure 10, process is as follows:
S1001, compound AVP resolvers start to process;
S1002, reads the header in message to be resolved, and main information mainly includes AVP command codes and AVP length informations. For the AVP of composite construction as the AVP of atomic structure, it also has AVP command code information;
S1003, judges whether the command code in AVP headers matches with the command code set in current resolver. If the match is successful, S1004 can perform.If mismatched, there is mistake in this explanation parsing, it is impossible to continues to parse, then Carry out S509 error handle;
S1004, the length information in AVP headers is verified substantially, judge whether it exceedes information to be resolved Length.If effective, then S1005 processing is carried out, otherwise carry out S1009 error handle;
S1005, to comprising minor structure unit parse.Because compound AVP resolvers include one or more Minor structure unit, this step are that the analytic method of minor structure unit corresponding to calling is parsed, and are the mistakes of a nesting allocation Journey;
S1006, judge whether all minor structure units are disposed in compound AVP resolvers, if be disposed, only The processing of destructed S1007 steps.If also minor structure unit is not handled, continue S1005 processing procedure;
S1007, compound AVP resolvers are used for the AVP for parsing composite construction, and it is the AVP structures of a standard, so it Comprising data be in an effective scope.Current procedures need to check the data in current analytic structure data area Whether all parsing finishes, and is finished if do not parsed, and description messages are wrong, then needs to carry out S1009 error handle;
S1008, compound AVP resolvers are disposed;
S1009, error handle.
The processing procedure of behavior adapter:Behavior adapter verifies to AVP occurrence numbers in message, its processing Process is relatively easy, and mainly the AVP after parsing is verified, and confirms that AVP occurrence numbers meet the rule of setting.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they In multiple modules or step be fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific Hardware and software combines.
It should be only above the preferred embodiments of the present invention, be not intended to limit the invention, for the technology of this area For personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (8)

  1. A kind of 1. diameter message resolution methods, it is characterised in that including:
    Message analytic tree is set, and builds message analytic tree object, wherein, the message analytic tree is disappeared according to pre-defined Cease what form was set, the message analytic tree is used to parse diameter message;
    Parsing node corresponding to being matched using the message analytic tree object to the diameter message received from tree;
    Physical fit is carried out to the diameter message with corresponding parsing node, until all originals of the diameter message Sub- property value is completed to AVP dissection process;
    Data are extracted in the diameter message after analytically completing;
    The message analytic tree includes:Physical fit device, behavior adapter, AVP resolvers and data withdrawal device, wherein, it is described Physical fit device is used for the adaptation of message structure;The behavior adapter is used for what is occurred to AVP in the diameter message Number is tested;The AVP resolvers are used to the AVP in the diameter message be identified;The data pick-up Device is coupled with the AVP resolvers, and the extraction for carrying out content is handled.
  2. 2. according to the method for claim 1, it is characterised in that the physical fit device includes:Permanent order physical fit Device and on-fixed sequential organization adapter, wherein, the permanent order physical fit device is used for the message to permanent order structure Unit is parsed successively;The on-fixed sequential organization adapter is used to parse the unfixed message elements in position.
  3. 3. according to the method for claim 1, it is characterised in that the AVP resolvers include:Atom A VP resolvers and multiple AVP resolvers are closed, wherein, the atom A VP resolvers are the minimum units for parsing, and the compound AVP resolvers include Multiple atom A VP resolvers.
  4. 4. according to the method in any one of claims 1 to 3, it is characterised in that described in after analytically completing Before the data are extracted in diameter message, methods described also includes:
    The distribution of internal memory is carried out, wherein, the distribution of the internal memory is entered by being bundled in the memory pool on the AVP resolvers Row distribution, wherein, each AVP resolvers bind a memory pool.
  5. 5. according to the method for claim 4, it is characterised in that the memory pool is managed interior by the way of busy, not busy chained list Deposit, wherein, during using the memory pool storage allocation, memory pool takes out memory block from not busy chained list and by the memory block In the busy chained list of beginning address addition.
  6. A kind of 6. diameter message resolver, it is characterised in that including:
    Setup module, for setting message analytic tree, and message analytic tree object is built, wherein, the message analytic tree is root Set according to pre-defined message format, the message analytic tree is used to parse diameter message;
    Matching module, corresponding to being matched using the message analytic tree object to the diameter message received from tree Parse node;
    Adaptation module, for carrying out physical fit to the diameter message with corresponding parsing node, until described All atom belonging values of diameter message are completed to AVP dissection process;
    Abstraction module, for extracting data in the diameter message after analytically completing;
    The message analytic tree includes:Physical fit device, behavior adapter, AVP resolvers and data withdrawal device, wherein, it is described Physical fit device is used for the adaptation of message structure;The behavior adapter is used for what is occurred to AVP in the diameter message Number is tested;The AVP resolvers are used to the AVP in the diameter message be identified;The data pick-up Device is coupled with the AVP resolvers, and the extraction for carrying out content is handled.
  7. 7. device according to claim 6, it is characterised in that the physical fit device includes:Permanent order physical fit Device and on-fixed sequential organization adapter, wherein, the permanent order physical fit device is used for the message to permanent order structure Unit is parsed successively;The on-fixed sequential organization adapter is used to parse the unfixed message elements in position; And/or the AVP resolvers include:Atom A VP resolvers and compound AVP resolvers, wherein, the atom A VP resolvers are For the minimum unit of parsing, the compound AVP resolvers include multiple atom A VP resolvers.
  8. 8. the device according to claim 6 or 7, it is characterised in that also include:
    Distribute module, for carrying out point of internal memory before data are extracted in the diameter message after analytically completing Match somebody with somebody, wherein, the distribution of the internal memory is allocated by being bundled in the memory pool on the AVP resolvers, wherein, institute State each AVP resolvers and bind a memory pool.
CN201310581296.6A 2013-11-19 2013-11-19 Diameter message resolution methods and device Expired - Fee Related CN104660548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310581296.6A CN104660548B (en) 2013-11-19 2013-11-19 Diameter message resolution methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310581296.6A CN104660548B (en) 2013-11-19 2013-11-19 Diameter message resolution methods and device

Publications (2)

Publication Number Publication Date
CN104660548A CN104660548A (en) 2015-05-27
CN104660548B true CN104660548B (en) 2018-01-19

Family

ID=53251257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310581296.6A Expired - Fee Related CN104660548B (en) 2013-11-19 2013-11-19 Diameter message resolution methods and device

Country Status (1)

Country Link
CN (1) CN104660548B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141328A (en) * 2007-10-11 2008-03-12 中兴通讯股份有限公司 Method and device for simulating Diameter server terminal
CN101872303A (en) * 2010-06-03 2010-10-27 深圳天源迪科信息技术股份有限公司 Method for processing Diameter protocol message
CN102025699A (en) * 2009-09-22 2011-04-20 华为技术有限公司 Methods and devices for capsulating and decapsulating Diameter message

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100753820B1 (en) * 2005-12-10 2007-08-31 한국전자통신연구원 Network System and Communication Method for Initial Operation of Secure Mobile IPv6 Mobile Node Based on Preshared Key
US8539033B2 (en) * 2010-06-29 2013-09-17 Alcatel Lucent Diameter session audits
US8879431B2 (en) * 2011-05-16 2014-11-04 F5 Networks, Inc. Method for load balancing of requests' processing of diameter servers

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141328A (en) * 2007-10-11 2008-03-12 中兴通讯股份有限公司 Method and device for simulating Diameter server terminal
CN102025699A (en) * 2009-09-22 2011-04-20 华为技术有限公司 Methods and devices for capsulating and decapsulating Diameter message
CN101872303A (en) * 2010-06-03 2010-10-27 深圳天源迪科信息技术股份有限公司 Method for processing Diameter protocol message

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高速无线互联网中Diameter和移动性管理融合技术的研究和实现;王玉辉;《中国优秀硕士学位论文全文数据库信息科技辑(2006)》;20060515(第5期);全文 *

Also Published As

Publication number Publication date
CN104660548A (en) 2015-05-27

Similar Documents

Publication Publication Date Title
Cavalli et al. New approaches for passive testing using an extended finite state machine specification
Marrero et al. Model checking for security protocols
CN106815526A (en) A kind of safety-type database storage system based on block chain technology
WO2008022821A1 (en) Method and arrangement for provision of a wire-free mesh network
CN107547213A (en) A kind of recognition methods of business rule and device
CN105656891A (en) Weak password checking method and device
CN104618010A (en) Optical network resource information checking method
CN109242460A (en) A kind of payment system and its account checking method based on multiple channel of disbursement
CN101426008B (en) Audit method and system based on back display
CN110086802A (en) Method for authenticating and device for session
CN104660548B (en) Diameter message resolution methods and device
Dahl et al. Formal analysis of privacy for anonymous location based services
Miller et al. Coping with nondeterminism in network protocol testing
Chatzikokolakis et al. A framework for analyzing probabilistic protocols and its application to the partial secrets exchange
Sidhu et al. Verification of NBS class 4 transport protocol
Gebremichael et al. Analysis of the Zeroconf protocol using Uppaal
CN107733915A (en) The method and apparatus that identity validation is completed by terminal and server interaction
Zhou et al. Fast automatic synthesis of security protocols using backward search
Liu et al. Tackling the infinite state space of a multimedia control protocol service specification
Brinksma et al. Applications of fair testing
Devillers et al. A compositional Petri net translation of general π-calculus terms
Leshkowitz Round complexity versus randomness complexity in interactive proofs
Ramsokul et al. Aseha: A framework for modelling and verification ofweb services protocols
Choppy et al. Petrireve: proving Petri net properties with rewriting systems
Gutnik et al. Representing conversations for scalable overhearing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20191121

Granted publication date: 20180119

PP01 Preservation of patent right
PD01 Discharge of preservation of patent

Date of cancellation: 20200710

Granted publication date: 20180119

PD01 Discharge of preservation of patent
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180119

Termination date: 20201119

CF01 Termination of patent right due to non-payment of annual fee