CN103164389A - Method and system for processing user-defined format plane ticket files - Google Patents
Method and system for processing user-defined format plane ticket files Download PDFInfo
- Publication number
- CN103164389A CN103164389A CN2011104179816A CN201110417981A CN103164389A CN 103164389 A CN103164389 A CN 103164389A CN 2011104179816 A CN2011104179816 A CN 2011104179816A CN 201110417981 A CN201110417981 A CN 201110417981A CN 103164389 A CN103164389 A CN 103164389A
- Authority
- CN
- China
- Prior art keywords
- verification
- definition
- node
- rule
- cdr file
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a system for processing user-defined format plane ticket files. The processing method comprises the steps of respectively abstracting format definitions of ticket files from format information of the ticket files provided by different operators and using format definition allocation files for storing format definitions of ticket files of the corresponding operators; respectively abstracting rule definitions of node checking in rule information of ticket node checking provided by the different operators and using rule definition allocation files for storing the rule definitions of node checking of the corresponding operators; and creating a corresponding ticket file object according to the obtained current ticket files, loading the format definitions and the rule definitions, then calling the format definitions and the rule definitions, setting formats and checking rules for the current ticket file object, and coding, decoding and checking the current ticket file object. By means of the embodiment, the method and the system are good in generality, good in expansibility, good in performance and good in reusable performance.
Description
Technical field
The present invention relates to moving communicating field, relate in particular to the disposal route of a kind of user-defined format plane CDR file.
Background technology
The mobile communication roam charge normally comes the implementation data clearance according to the TAP CDR file of GSMA standard, finally reaches the purpose of financial settlement.At present, the charging bill file of the most operators in the whole world all meets the TAP standard, liquidation center is when implementing the ticket clearance like this, only need to realize corresponding encoding and decoding and checkschema according to corresponding several TAP FileVersions (as TAP310, TAP311), can tackle any operator meet TAP ticket standard billing document.
Yet part operator still exists some not meet the CDR file of TAP standard, these CDR files are the plane text formatting normally, common cuts apart form as CSV form, fixed length, also there is the situation of CDR file include file head node, tail node, each independent node also may comprise sub-attribute, may use multiple format with in a file simultaneously, quantity and the method for calibration of node all are not quite similar.That is to say that the non-standard plane CDR file of an operator is user-defined format and verification rule fully.So complicated situation, bring larger pressure to liquidation center.
In the face of this situation, disposal route commonly used is to implement respectively corresponding encoding and decoding and checkschema according to each user-defined format CDR file, this is also to hold most intelligible scheme, but the higher cost that this scheme is brought to liquidation center, because realize cover encoding and decoding and a checkschema not a duck soup, and this scheme does not have versatility, can only be applied on the CDR file corresponding with it.
Another kind of disposal route is the user-defined format CDR file to be converted to the TAP file of standard, and then clears enforcement.The reason that this scheme possesses feasibility is the CDR file of which kind of form no matter, all needs to describe the essential information of conversation, and therefore all there are functional similarity in most of node and TAP standard.But still there is significant shortcoming in this scheme, at first, usually also has larger otherness between non-standard CDR file and TAP CDR file, causes that some node is difficult to coupling when implementing conversion; Secondly, first change to clear again and need to pay conversion cost, reduced system processing power; At last, need to implement corresponding conversion plan for the self-defined CDR file of each class, not possess reusability.
Two kinds of common schemes mentioned above can solve encoding and decoding and the check problem of user-defined format plane CDR file, but have again inevitable major defect simultaneously.At first be that cost is high, then particularly for the appearance of new user-defined format ticket, need to realize new encoding and decoding and the verification scheme of cover fully, or realize a new transformation rule of cover.Long-range it seems, need to there be a kind of scheme, can deal with encoding and decoding and the verification of existing user-defined format plane CDR file, again can be when new user-defined format CDR file occurring, only need to pay less cost and just can complete encoding and decoding and verification to new file.
The present invention is exactly such scheme, the technical matters that this programme will solve is, expensive for the plane CDR file encoding and decoding of existing user-defined format and verification, the problem of system extension deficiency in the face of the appearance of format plane CDR file particularly provides encoding and decoding and the checkschema of a kind of new user-defined format plane CDR file.This scheme is mainly regular by abstract file form and verification, by formal definition and verification rule definition, thus the user-defined format plane CDR file encoding and decoding and the method for calibration that provide a cover reusable, easily expansion, high-level efficiency to reduce costs.
Summary of the invention
The technical problem to be solved in the present invention is, for the defects of prior art, provides a kind of disposal route of user-defined format plane CDR file of favorable expandability.
The technical solution adopted for the present invention to solve the technical problems is: construct the disposal route of a kind of user-defined format plane CDR file, comprising:
Take out the formal definition of CDR file the format information of the CDR file that S10. provides from different operators respectively, and the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator;
Take out the rule definition of node verification the Rule Information of the ticket node verification that S20. provides from different operators respectively, and use the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator;
S30. create corresponding CDR file object according to the current CDR file that obtains, and load formal definition and rule definition respectively from corresponding formal definition configuration file and corresponding rule definition configuration file according to the operator of described current CDR file, then call described formal definition and rule definition, and for described current CDR file object arranges form and the verification rule is set, and described current CDR file object is carried out encoding and decoding and verification.
In the disposal route of user-defined format of the present invention plane CDR file, in step S10, take out the formal definition of CDR file the format information of the CDR file that provides from operator, and the step of formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator comprises specifically:
S11. obtain the CDR file that operator provides;
S12. described CDR file is resolved into a plurality of semantic primitives;
S13. judge one by one whether each semantic primitive is built in pre-stored semantic primitive system, if carry out step S14; If not, define new semantic primitive, then execution in step S14;
Whether the value mode that S14. judges one by one each node is built in pre-stored value mode system, if carry out step S15; If not, define new value mode;
Whether S15. analysis node attribute, and decision node possesses sub-attribute, if not, and execution in step S16; If analyze the value mode of sub-attribute, then execution in step S16;
S16. with semantic primitive, value mode, the nodal community combination analyzed, to determine formal definition;
S17. the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator.
In the disposal route of user-defined format of the present invention plane CDR file, in described step S20, take out the rule definition of node verification the Rule Information of the node verification that provides from operator, and the step of rule definition of using the rule definition configuration file relevant to the sign of operator to store the node verification of respective operator comprises:
S21. semantic primitive is decomposed into a plurality of nodes;
S22. analyze the verification attribute of each node, and judge whether described verification attribute is built in pre-stored verification property system, if, execution in step S23; If not, define new verification attribute, then execution in step S23;
S23. with the verification combinations of attributes of analyzing, to determine the rule definition of node verification;
S24. use the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator.
In the disposal route of user-defined format of the present invention plane CDR file, pre-stored verification attribute in the verification property system comprises: nodename, exist attribute, existence condition, data type, data length, effectively value, have attribute error code, illegal value error code.
The present invention also constructs the disposal system of a kind of user-defined format plane CDR file, comprising:
The formal definition module, the format information that the CDR file that provides from different operators is provided respectively takes out the formal definition of CDR file, and the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator;
The rule definition module, the Rule Information that the ticket node verification that provides from different operators is provided respectively takes out the rule definition of node verification, and uses the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator;
Processing module, be used for creating corresponding CDR file object according to the current CDR file that obtains, and load formal definition and rule definition respectively from corresponding formal definition configuration file and corresponding rule definition configuration file according to the operator of described current CDR file, then call described formal definition and rule definition, and for described current CDR file object arranges form and the verification rule is set, and described current CDR file object is carried out encoding and decoding and verification.
In the disposal system of user-defined format of the present invention plane CDR file, described formal definition module comprises:
Acquiring unit is used for obtaining the CDR file that operator provides;
The first resolving cell is used for described CDR file is resolved into a plurality of semantic primitives;
The first judging unit is used for judging whether each semantic primitive is built in pre-stored semantic primitive system one by one;
The first definition unit is used in the judgement semantic primitive defining new semantic primitive when being built in pre-stored semantic primitive system;
The second judging unit is used for judging one by one whether the value mode of each node is built in pre-stored value mode system;
The second definition unit is used in the value mode of decision node defining new value mode when being built in pre-stored value mode system;
The 3rd judging unit be used for the analysis node attribute, and whether decision node possesses sub-attribute;
Analytic unit is used for analyzing the value mode of sub-attribute when decision node possesses sub-attribute;
The form determining unit, the semantic primitive, value mode, the nodal community that are used for analyzing make up, to determine formal definition;
The first storage unit, the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator.
In the disposal system of user-defined format of the present invention plane CDR file, described rule definition module comprises:
The second resolving cell is used for semantic primitive is decomposed into a plurality of nodes;
The 4th judging unit is used for analyzing the verification attribute of each node, and judges whether described verification attribute is built in pre-stored verification property system;
The 3rd definition unit is used at the described verification attribute of judgement defining new verification attribute when being built in pre-stored verification property system;
The rule determining unit is used for the verification combinations of attributes of analyzing, to determine the rule definition of node verification;
The second storage unit uses the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator.
In the disposal system of user-defined format of the present invention plane CDR file, pre-stored verification attribute in the verification property system comprises: nodename, exist attribute, existence condition, data type, data length, effectively value, have attribute error code, illegal value error code.
Implement technical scheme of the present invention, by with the rules abstraction of the form of the plane CDR file of user-defined format and node verification out, make its modularization, configurableization, therefore versatility is high, for non-special CDR file, only need by simple formal definition and rule definition, then the formal definition and the rule definition that call respective operator can be completed encoding and decoding and verification; Secondly, favorable expandability even new form or checkpoint occur, only needs derive from accordingly form and the checkpoint that makes new advances and realized getting final product, and does not need to pay too large cost; Again, performance is good, because the direct control CDR file with respect to existing scheme, does not have the work of similar conversion, has improved system processing power; At last, reusable is good, and each form and rule can precipitate as infrastructure, finally has a large amount of assemblies, when processing the newtype CDR file, utilizes these assemblies just can efficiently complete by simple assembling.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples, in accompanying drawing:
Fig. 1 is the process flow diagram of the disposal route embodiment one of user-defined format of the present invention plane CDR file;
Fig. 2 is the process flow diagram of step S10 preferred embodiment in Fig. 1;
Fig. 3 is the process flow diagram of step S20 preferred embodiment in Fig. 1;
Fig. 4 is the structural drawing of a kind of self-defined plane CDR file;
Fig. 5 is class of codec graph of a relation of the present invention;
Fig. 6 is format of billing class graph of a relation of the present invention;
Fig. 7 is verification Regularia graph of a relation of the present invention;
Fig. 8 is semantic primitive class graph of a relation of the present invention;
Fig. 9 is CDR file of the present invention and other operation class graphs of a relation;
Figure 10 is format of billing of the present invention (Schema) object cut-away view;
Figure 11 is verification rule objects cut-away view of the present invention;
Figure 12 is the logical diagram of the disposal system embodiment one of user-defined format of the present invention plane CDR file;
Figure 13 is the logical diagram of formal definition module preferred embodiment in Figure 12;
Figure 14 is the logical diagram of rule definition module preferred embodiment in Figure 12.
Embodiment
At first explanation is, the TAP CDR file of standard will be roamed and store after detailed single information is encoded to scale-of-two through ASN, but not the TAP CDR file is in order to reduce complexity, usually all adopt flat file format, because the switch that each operator uses is different, or due to the adding of some customized informations, then or due to CDR file is reprocessed, cause these off-gauge plane CDR file forms and checkpoint multifarious.
For non-standard plane CDR file, its basic format is usually just like Types Below:
1) symbol separation type.As comma-delimited file, also referred to as the CSV form, perhaps oblique line is separated, the ticket writing of the similar form of AAA/BBB/CCC for example, and the data field between every two separators is called a node;
2) fixed length Splittable.Obtain nodal value according to length.As have ABCDEFG, the reference position of stipulating first node is 1, length is that the reference position of 2, the second nodes is 3, length be 5. so the value of first node be AB, the value of second node is CDEFG;
In fact, the complicacy of non-standard plane format of billing is mainly reflected in following aspect:
1) there is additional information in CDR file.Ticket as part operator comprises head file level information or afterbody audit information etc., perhaps comprises a plurality of additional informations, and for additional information, quantity of information wherein and verification mode are not identical yet;
2) same ticket adopts mixed format.In a CDR file end to end additional information, ticket may be all different forms, be the fixed length Splittable as the additional information form, detailed unirecord is-symbol separation type;
3) the single node definition is inconsistent in detail.In CDR file, a detailed list of voice and a GPRS are single in detail, and due to the otherness of the information that will describe, its number of nodes and semanteme are all inconsistent usually;
4) also there is sub-attribute in node.Node in CDR file also may be made of a plurality of sub-attributes, and certain a little attribute may be also optional attribute;
Also there are other various features in the form of non-standard plane ticket, and along with passage of time, also more new features can occur.
Liquidation center is when processing ticket, primary operation will be described exactly detailed each single nodal information and parse, as IMSI (International Mobile Subscriber Identity, international mobile subscriber identity), call start time, duration etc., this process is called decoding.In like manner, the process these nodal informations being organized in outputing to file according to certain format is called coding.When carrying out the encoding and decoding of CDR file, the form of knowing CDR file that must determine.
Detailed unirecord of the description that will be clear that, in detail single in some node be to exist, some node is optional appearance, and some appearance of having ready conditions.Simultaneously because each node has its independently implication, so its codomain also requires to satisfy certain constraint condition.How to judge one in detail single whether effective, with and each node whether effective, complete by verification.Different nodes has different verification rule, for a concrete node, possible checkpoint have whether exist, data type, length, effective value etc., also have the relation that depends on each other for existence between some node.The result of verification need to clearly display, and does not exist as node, and codomain is illegal etc.
Patent of the present invention provides following processing scheme for the plane CDR file that possesses above-mentioned complex characteristic.As shown in Figure 1, in the process flow diagram of the disposal route embodiment one of user-defined format of the present invention plane CDR file, this disposal route comprises:
Take out the formal definition of CDR file the format information of the CDR file that S10. provides from different operators respectively, and the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator;
Take out the rule definition of node verification the Rule Information of the ticket node verification that S20. provides from different operators respectively, and use the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator;
S30. create corresponding CDR file object according to the current CDR file that obtains, and load formal definition and rule definition respectively from corresponding formal definition configuration file and corresponding rule definition configuration file according to the operator of described current CDR file, then call described formal definition and rule definition, and for described current CDR file object arranges form and the verification rule is set, and described current CDR file object is carried out encoding and decoding and verification.
Fig. 2 is the process flow diagram of step S10 preferred embodiment in Fig. 1, step S10 comprises step S11~S20, should be noted that, step S11~S20 only shows the formal definition step of the CDR file of an operator, be to be understood that, the formal definition step of the CDR file of other operator is similar with it, repeats no more.The below illustrates step S11~S20:
S11. obtain the CDR file that operator provides;
S12. described CDR file is resolved into a plurality of semantic primitives;
S13. judge one by one whether each semantic primitive is built in pre-stored semantic primitive system, if carry out step S14; If not, execution in step S18;
S18. define new semantic primitive, then execution in step S14;
Whether the value mode that S14. judges one by one each node is built in pre-stored value mode system, if carry out step S15; If not, execution in step S19;
S19. define new value mode;
Whether S15. analysis node attribute, and decision node possesses sub-attribute, if not, and execution in step S16; If, execution in step S20;
S20. analyze the value mode of sub-attribute, then execution in step S16;
S16. with semantic primitive, value mode, the nodal community combination analyzed, to determine formal definition;
S17. the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator.
Fig. 3 is the process flow diagram of step S20 preferred embodiment in Fig. 1, step S20 comprises step S21~S25, should be noted that, step S21~S25 only shows the rule definition step of the node verification of an operator, be to be understood that, the rule definition step of the node verification of other operator is similar with it, repeats no more.The below illustrates step S21~S25:
S21. semantic primitive is decomposed into a plurality of nodes;
S22. analyze the verification attribute of each node, and judge whether described verification attribute is built in pre-stored verification property system, if, execution in step S23; If not, execution in step S25;
S25. define new verification attribute, then execution in step S23;
S23. with the verification combinations of attributes of analyzing, to determine the rule definition of node verification;
S24. use the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator.
The below illustrates the disposal route of user-defined format plane CDR file:
1) formal definition of abstract CDR file is used configuration file definition format of billing.
Although the form of CDR file is ever-changing, overall abstract, its most basic value form is symbol separation type mentioned above and fixed length Splittable.The complicated normally different semantic primitive of CDR file has adopted different value forms, and CDR file comprises a plurality of semantic primitives.Come if these features are split, the form of a CDR file can be described with following feature:
Additional information value mode is-symbol separation type or fixed length Splittable, or other undefined special value mode?
Does detailed single form have several types? what is respectively its form? is-symbol separation type or fixed length Splittable, or other special value mode?
Does each node have sub-attribute? sub-attribute is-symbol separation type or fixed length Splittable, or other special value mode?
This patent scheme is divided into three factors with the formal definition of CDR file after analyzing as above feature, in conjunction with the form of the described CDR file of Fig. 4, specifically describe as follows:
● semantic primitive.Concrete message unit in the semantic element representation ticket, semantic primitive herein is in higher level, does not relate to concrete nodal information.Semantic primitive in CDR file is as a node (HEADER), tail node (TRAILER), in detail single (CDR) etc.This programme has defined basic semantic primitive, represent to have this semantic primitive as long as the semantic primitive definition appears in agreement, otherwise expression does not exist.If the user needs semantic primitive system is not built in pre-stored semantic primitive system, can also define new semantic primitive.
● value mode.Value mode represents how to obtain the value of certain node from a record, comprise symbol separation type (DELIMITED) and fixed length Splittable (FIXEDLENGTH).For the symbol separation type, only need the definition separator to get final product, as DELIMITED () expression CSV; For the fixed length separation type, need the length of each node of definition etc., represent that as FIXEDLENGTH (1,5,9) first node ' s length is that 1, the second node ' s length is 5, the like.Certainly, the user can also expand new value mode definition.
● nodal community.Nodal community represents mainly whether node has sub-attribute, if having sub-attribute, also needs to define the value mode (SUBFMT) of sub-attribute.For simplicity, agreement is as long as syntactic units exists the SUBFMT definition to represent to have sub-attribute.
For as above three factors, this programme is these factor configurationizations, reaching the purpose that configures the CDR file form with these factors unit, thereby with the complex format decompositionization, unitized more at last.A typical format of billing configuration is as follows:
[HEADER]
FMT=DELIMITED(,)
SUBFMT=FIXLENGTH(3,5,9)
[CDR]
FMT=FIXEDLENGTH(2,4,6,4,5,8,8)
SUBFMT=DELIMITED(/)
[TRAILER]
FMT=FIXLENGTH(3,5)
2) abstract node verification rule is used configuration file defined node verification rule.
The formal definition that ticket has been arranged can be just each semantic primitive with information analysis wherein, and then parse each node, i.e. the process of decoding.As for corresponding node whether exist, whether the node codomain correct, relies on verification and complete analysis, and the verification to node is provided, and needs to know the detailed features of node, this programme is used the attribute representation with its characteristic, each attribute is abstract as follows:
● nodename (NAME)
● there is attribute (EXIST_TYPE, with reference to the TAP standard, value M/C/O represents respectively Mandatory/Conditional/Optional, if be the C type, must specify existence condition)
● existence condition (EXIST_CONDITION is a function name, and when function call was returned successfully, node must exist)
● data type (DATA_TYPE is divided into string, number, datetime)
● data length (DATA_LENGTH, when data type is string, optional specific data length)
● effective value (LEGAL_VALUE, enumerates offset and lists at this corresponding interval value, and interval with "-" expression, the enumerated value CSV is for sky represents not limit)
● there is attribute error code (there are not error code in EXIST_ERR_CODE, node)
● illegal value error code (VALUE_ERR_CODE, illegal value error code) use as above nodal community, substantially can determine the verification rule of a node, if the attribute of above-mentioned definition can't satisfy the verification of some node, the user can the new attribute of self-defining.
Complete the verification rule definition of a CDR file, the node and the order that at first need each semantic primitive of CDR file is comprised define out, and semantic primitive needs herein and the semantic primitive in formal definition are consistent; And then the verification that defines each node is regular.In fact, usually formal definition and rule definition can be incorporated in same configuration file.A typical CDR file verification rule definition is as follows:
[HEADER]
NODE=1,2,3
[CDR]
NODE=4,5,6,7
[TRAIIER]
NODE=8,9
[1]
NAME=MSC_TYPE
EXIST_TYPE=M
DATA_TYPE=NUMBER
LEGAL_VALUE=1-5,11,12,13
EXIST_ERROR_CODE=10
FORMAT_ERROR_CODE=20
VALUE_ERROR_CODE=30
EXIST_CONDITION=
[2]
TAG_NAME=CDR_ID
EXIST_TYPE=C
DATA_TYPE=STRING
DATA_LENGTH=16
EXIST_ERROR_CODE=11
FORMAT_ERROR_CODE=21
VALUE_ERROR_CODE=31
EXIST_CONDITION=VALCDRIDEXIST
3) provide encoding and decoding and validate service framework, can compatible known format and the ticket of verification rule, can in the situation that the newtype ticket is supported in the low cost expansion, the current CDR file that obtains be processed again.
This programme provides cover encoding and decoding and a validate service framework on the basis of abstract formal definition and verification rule, this framework adopts C Plus Plus to realize, can not only the predefined form of natural support and verification rule, also possess extended capability flexibly.The service framework of this programme mainly comprises following target:
● codec (Codec).For two kinds of basic value mode definition, symbol separation type and fixed length separation type, its correspondence is embodied as DelimitCodec and FixedLengthCodec, in conjunction with class of codec graph of a relation shown in Figure 5, both all derive from from abstract base class Codec, possess Decode () and Encode () method.
● format of billing (Schema).This object is used for describing semantic primitive and the formal definition thereof that ticket comprises.
● formal definition loading bin (SchemaLoader).In conjunction with format of billing class graph of a relation shown in Figure 6, after the form that has defined ticket, this object is responsible for loading format information from the formal definition configuration file, after loading is completed, provides interface GetSchema () to allow the user obtain the format of billing object.
● verification rule unit (RuleUnit).Verification rule unit is a class object, each verification entry such as EXIST_TYPE or DATA_TYPE in rule definition, all corresponding verification rule unit object.Whether this class object derives from from base class Rule, provide this rule entries of Validate () method validation by verification.
● node verification rule (ValRule).This object definition the verification rule of a node, usually comprise a plurality of verifications rules unit, Validate () method is provided.
● verification rule loading bin (RuleLoader).In conjunction with verification Regularia graph of a relation shown in Figure 7, after having defined node verification rule, this object is responsible for loading Rule Information from the verification rule file, after loading is completed, provide interface GetCompList () and GetCompRule () to allow the user obtain node listing and verification rule thereof.
● semantic primitive (Component).In conjunction with semantic primitive class graph of a relation shown in Figure 8, semantic primitive is the general designation of a class object, and this class object all derives from from the Component abstract base class, mainly comprises field (Field), node (Node), record (Record).Field represents not have the node of sub-attribute, and Node represents to have the node of sub-attribute.Semantic primitive defined above all derives from from the Record object, comprises a node (Header), tail node (Trailer), in detail single (Cdr).
● CDR file (CDFile).In conjunction with CDR file shown in Figure 9 and other operation class graphs of a relation, this CDR file to as if final target, it utilizes target mentioned above to combine to complete Encode (), Decode () and Validate () to ticket.
In formal definition file and the already present situation of verification rule definition file, it is as follows that the core of this service framework is made flow process:
1, create a formal definition loading bin object, this object obtains the semantic primitive that exists in current CDR file from the formal definition configuration file, the value mode of each semantic primitive, and whether node has sub-attribute and value mode thereof, then these information are stored in the Schema object, Schema object cut-away view as shown in figure 10, a Schema object has comprised all format informations of class CDR file;
2, create a verification rule loading bin object, in conjunction with verification rule objects cut-away view shown in Figure 11, this object obtains node that each semantic primitive comprises and the verification rule of each node from the rule definition configuration file, section has preserved each semantic primitive within it, the node that each semantic primitive comprises, the verification rule of each node.
3, create a CDR file object, when creating the CDR file object, must utilize SetSchema () method and SetRule () method specified format and verification rule, need simultaneously to specify the CDR file path.This object reference formal definition loading bin and verification rule loading bin obtain the semantic primitive that exists in ticket, the node that each semantic primitive comprises, the verification of each node rule is completed encoding and decoding and verification to whole file by calling Decode (), Encode () and Validate () method.
Based on such scheme, we can adopt following treatment step to realize when processing user-defined format plane CDR file:
1. defined file form.At first analyze semantic primitive, then analyze the value mode of each semantic primitive, confirm simultaneously whether node has sub-attribute, and the value mode of sub-attribute.Then it is defined in configuration file.When a kind of new semantic primitive occurring, the user also can self-defined new semantic primitive, only need to derive this semantic primitive from the Record class when realizing, and realize that its corresponding interface gets final product.In like manner, when new value mode occurring, only need to derive from the codec that makes new advances from codec Codec and get final product.
2. the definition verification is regular.According to the semantic primitive in formal definition, determine respectively node and order thereof that each semantic primitive comprises, then according to business rule, the verification attribute of each node is showed.If need to increase new constraint to certain node, the user also can customize a kind of new attribute, only need to derive from and realize that corresponding interface gets final product from the RuleUnit object when realize.
3. create the CDR file object.After above-mentioned two steps are completed, can create CDR file object CDFile, form Schema and verification rule Rule is set, then call its corresponding method and complete encoding and decoding and verification, its typical workflow is as follows:
Figure 12 is the logical diagram of the disposal system embodiment one of user-defined format of the present invention plane CDR file, this disposal system comprises formal definition module 10, rule definition module 20 and the processing module 30 that connects successively, wherein, the format information that the CDR file that provides from different operators is provided respectively for formal definition module 10 takes out the formal definition of CDR file, and the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator; The Rule Information that the ticket node verification that provides from different operators is provided respectively for rule definition module 20 takes out the rule definition of node verification, and uses the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator; Processing module 30 is used for creating corresponding CDR file object according to the current CDR file that obtains, and load formal definition and rule definition respectively from corresponding formal definition configuration file and corresponding rule definition configuration file according to the operator of described current CDR file, then call described formal definition and rule definition, and for described current CDR file object arranges form and the verification rule is set, and described current CDR file object is carried out encoding and decoding and verification.
Figure 13 is the logical diagram of formal definition module preferred embodiment in Figure 12, and this formal definition module comprises acquiring unit 11, the first resolving cell 12, the first judging unit 13, the first definition unit 14, the second judging unit 15, the second definition unit 16, the 3rd judging unit 17, sub-attributive analysis unit 18, form determining unit 19 and the first storage unit 20.Wherein, acquiring unit 11 is used for obtaining the CDR file that operator provides; The first resolving cell 12 is used for described CDR file is resolved into a plurality of semantic primitives; The first judging unit 13 is used for judging whether each semantic primitive is built in pre-stored semantic primitive system one by one; The first definition unit 14 is used at the judgement voice unit defining new semantic primitive when being built in pre-stored semantic primitive system; The second judging unit 15 is used for judging one by one whether the value mode of each node is built in pre-stored value mode system; The second definition unit 16 is used in the value mode of decision node defining new value mode when being built in pre-stored value mode system; The 3rd judging unit 17 is used for the analysis node attribute, and whether decision node possesses sub-attribute; Sub-attributive analysis unit 18 is used for analyzing the value mode of sub-attribute when decision node possesses sub-attribute; Semantic primitive, value mode, nodal community that form determining unit 19 is used for analyzing make up, to determine formal definition; The formal definition that the first storage unit 20 uses the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator
Figure 14 is the logical diagram of rule definition module preferred embodiment in Figure 12, and the rule definition module comprises: the second resolving cell 21, the 4th judging unit 22, the 3rd definition unit 23, regular determining unit 24 and the second storage unit 25.Wherein, the second resolving cell 21 is used for semantic primitive is decomposed into a plurality of nodes; The 4th judging unit 22 is used for analyzing the verification attribute of each node, and judges whether described verification attribute is built in pre-stored verification property system; The 3rd definition unit 23 is used at the described verification attribute of judgement defining new verification attribute when being built in pre-stored verification property system; Rule determining unit 24 is used for the verification combinations of attributes of analyzing, to determine the rule definition of node verification; The second storage unit 25 uses the rule definition configuration file relevant to the sign of operator to store the rule definition of the CDR file of respective operator.
The above is only the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in claim scope of the present invention.
Claims (8)
1. the disposal route of a user-defined format plane CDR file, is characterized in that, comprising:
Take out the formal definition of CDR file the format information of the CDR file that S10. provides from different operators respectively, and the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator;
Take out the rule definition of node verification the Rule Information of the ticket node verification that S20. provides from different operators respectively, and use the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator;
S30. create corresponding CDR file object according to the current CDR file that obtains, and load formal definition and rule definition respectively from corresponding formal definition configuration file and corresponding rule definition configuration file according to the operator of described current CDR file, then call described formal definition and rule definition, and for described current CDR file object arranges form and the verification rule is set, and described current CDR file object is carried out encoding and decoding and verification.
2. the disposal route of user-defined format according to claim 1 plane CDR file, it is characterized in that, in step S10, take out the formal definition of CDR file the format information of the CDR file that provides from operator, and the step of formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator comprises specifically:
S11. obtain the CDR file that operator provides;
S12. described CDR file is resolved into a plurality of semantic primitives;
S13. judge one by one whether each semantic primitive is built in pre-stored semantic primitive system, if carry out step S14; If not, define new semantic primitive, then execution in step S14;
Whether the value mode that S14. judges one by one each node is built in pre-stored value mode system, if carry out step S15; If not, define new value mode;
Whether S15. analysis node attribute, and decision node possesses sub-attribute, if not, and execution in step S16; If analyze the value mode of sub-attribute, then execution in step S16;
S16. with semantic primitive, value mode, the nodal community combination analyzed, to determine formal definition;
S17. the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator.
3. the disposal route of user-defined format according to claim 2 plane CDR file, it is characterized in that, in described step S20, take out the rule definition of node verification the Rule Information of the node verification that provides from operator, and the step of rule definition of using the rule definition configuration file relevant to the sign of operator to store the node verification of respective operator comprises:
S21. semantic primitive is decomposed into a plurality of nodes;
S22. analyze the verification attribute of each node, and judge whether described verification attribute is built in pre-stored verification property system, if, execution in step S23; If not, define new verification attribute, then execution in step S23;
S23. with the verification combinations of attributes of analyzing, to determine the rule definition of node verification;
S24. use the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator.
4. the disposal route of user-defined format according to claim 3 plane CDR file, it is characterized in that, pre-stored verification attribute in the verification property system comprises: nodename, exist attribute, existence condition, data type, data length, effectively value, have attribute error code, illegal value error code.
5. the disposal system of a user-defined format plane CDR file, is characterized in that, comprising:
The formal definition module, the format information that the CDR file that provides from different operators is provided respectively takes out the formal definition of CDR file, and the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator;
The rule definition module, the Rule Information that the ticket node verification that provides from different operators is provided respectively takes out the rule definition of node verification, and uses the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator;
Processing module, be used for creating corresponding CDR file object according to the current CDR file that obtains, and load formal definition and rule definition respectively from corresponding formal definition configuration file and corresponding rule definition configuration file according to the operator of described current CDR file, then call described formal definition and rule definition, and for described current CDR file object arranges form and the verification rule is set, and described current CDR file object is carried out encoding and decoding and verification.
6. the disposal system of user-defined format according to claim 5 plane CDR file, is characterized in that, described formal definition module comprises:
Acquiring unit is used for obtaining the CDR file that operator provides;
The first resolving cell is used for described CDR file is resolved into a plurality of semantic primitives;
The first judging unit is used for judging whether each semantic primitive is built in pre-stored semantic primitive system one by one;
The first definition unit is used in the judgement semantic primitive defining new semantic primitive when being built in pre-stored semantic primitive system;
The second judging unit is used for judging one by one whether the value mode of each node is built in pre-stored value mode system;
The second definition unit is used in the value mode of decision node defining new value mode when being built in pre-stored value mode system;
The 3rd judging unit be used for the analysis node attribute, and whether decision node possesses sub-attribute;
Sub-attributive analysis unit is used for analyzing the value mode of sub-attribute when decision node possesses sub-attribute;
The form determining unit, the semantic primitive, value mode, the nodal community that are used for analyzing make up, to determine formal definition;
The first storage unit, the formal definition of using the formal definition configuration file relevant to the sign of operator to store the CDR file of respective operator.
7. the disposal system of user-defined format according to claim 6 plane CDR file, is characterized in that, described rule definition module comprises:
The second resolving cell is used for semantic primitive is decomposed into a plurality of nodes;
The 4th judging unit is used for analyzing the verification attribute of each node, and judges whether described verification attribute is built in pre-stored verification property system;
The 3rd definition unit is used at the described verification attribute of judgement defining new verification attribute when being built in pre-stored verification property system;
The rule determining unit is used for the verification combinations of attributes of analyzing, to determine the rule definition of node verification;
The second storage unit uses the rule definition configuration file relevant to the sign of operator to store the rule definition of the node verification of respective operator.
8. the disposal system of user-defined format according to claim 7 plane CDR file, it is characterized in that, pre-stored verification attribute in the verification property system comprises: nodename, exist attribute, existence condition, data type, data length, effectively value, have attribute error code, illegal value error code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110417981.6A CN103164389B (en) | 2011-12-14 | 2011-12-14 | A kind of disposal route of user-defined format plane ticket and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110417981.6A CN103164389B (en) | 2011-12-14 | 2011-12-14 | A kind of disposal route of user-defined format plane ticket and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103164389A true CN103164389A (en) | 2013-06-19 |
CN103164389B CN103164389B (en) | 2015-10-28 |
Family
ID=48587485
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110417981.6A Active CN103164389B (en) | 2011-12-14 | 2011-12-14 | A kind of disposal route of user-defined format plane ticket and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103164389B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108809896A (en) * | 2017-04-28 | 2018-11-13 | 阿里巴巴集团控股有限公司 | A kind of information calibration method, device and electronic equipment |
CN108989422A (en) * | 2018-07-12 | 2018-12-11 | 中国建设银行股份有限公司 | A kind of message and document handling method and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1889617A (en) * | 2005-08-26 | 2007-01-03 | 华为技术有限公司 | Charging method in mobile communication system |
CN101459746A (en) * | 2007-12-13 | 2009-06-17 | 华为软件技术有限公司 | Phone bill decoding method and apparatus |
CN101754155A (en) * | 2008-12-17 | 2010-06-23 | 中国移动通信集团山东有限公司 | Call bill format conversion method and device and call bill processing method and system |
-
2011
- 2011-12-14 CN CN201110417981.6A patent/CN103164389B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1889617A (en) * | 2005-08-26 | 2007-01-03 | 华为技术有限公司 | Charging method in mobile communication system |
CN101459746A (en) * | 2007-12-13 | 2009-06-17 | 华为软件技术有限公司 | Phone bill decoding method and apparatus |
CN101754155A (en) * | 2008-12-17 | 2010-06-23 | 中国移动通信集团山东有限公司 | Call bill format conversion method and device and call bill processing method and system |
Non-Patent Citations (1)
Title |
---|
谷晓栋: "电信计费系统计费模块的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 March 2010 (2010-03-15) * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108809896A (en) * | 2017-04-28 | 2018-11-13 | 阿里巴巴集团控股有限公司 | A kind of information calibration method, device and electronic equipment |
CN108989422A (en) * | 2018-07-12 | 2018-12-11 | 中国建设银行股份有限公司 | A kind of message and document handling method and system |
Also Published As
Publication number | Publication date |
---|---|
CN103164389B (en) | 2015-10-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109670081B (en) | Method and device for processing service request | |
CN101334887B (en) | Financial data-handling process and bank enterprise platform device | |
US20080140667A1 (en) | Device and method for creating a transaction log of data exchanges between a portable mobile communications device and other wireless devices | |
CN106548326B (en) | Method and system for linking handling scene and workflow engine of handling scene | |
US20110087641A1 (en) | System for processing and using electronic documents | |
CN112351392B (en) | Cloud communication short message service platform | |
CN103974232A (en) | Method and system for identifying WiFi user terminal | |
CN103164389B (en) | A kind of disposal route of user-defined format plane ticket and system | |
CN114238493A (en) | Block chain data processing method and system based on resource recovery platform | |
WO2007076676A1 (en) | A method for automatically producing pdu coding-decoding code based on asn.1 definition | |
CN101854298A (en) | Automatic link method of message, account correction method and system | |
CN101459746B (en) | Phone bill decoding method and apparatus | |
CN113923268A (en) | Analysis method, equipment and storage medium for multi-version communication protocol | |
CN101116349B (en) | Context cognizance enhancing message transform system, and method for the same | |
CN111324645B (en) | Block chain data processing method and device | |
CN111258940A (en) | Configuration method, service auditing method, system, equipment and storage medium | |
CN116128668A (en) | Method, system and computer storage medium for matching bank certificate subjects | |
CN112650600B (en) | Method, device and computer equipment for pushing message content | |
CN112016340A (en) | Invoice head-up information automatic identification system and method | |
CN111125110B (en) | Non-primary key field checking method, device, computer equipment and storage medium | |
CN101355729B (en) | Method and system for monitoring WAP PUSH information by short message center | |
EP3257235B1 (en) | A method and apparatus for data mediation | |
CN110719254A (en) | Multi-protocol integrated Beidou position service system and service method | |
CN114401202B (en) | Data period monitoring method and storage medium | |
CN104142816B (en) | User's card and its CDMA short message analytic methods |
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 | ||
CP03 | Change of name, title or address |
Address after: 518048 Guangdong province Futian District Shenzhen City Binhe Road, No. 9023, building 11, 41 layers of the country through the Patentee after: Medium shift information technology Co., Ltd. Address before: 518048 Guangdong, Shenzhen Binhe Road, No. 9023 building, state building, floor, No. 14 Patentee before: China Mobile (Shenzhen) Co., Ltd. |
|
CP03 | Change of name, title or address |