CN106130811B - Data communications test method and device - Google Patents

Data communications test method and device Download PDF

Info

Publication number
CN106130811B
CN106130811B CN201610384041.4A CN201610384041A CN106130811B CN 106130811 B CN106130811 B CN 106130811B CN 201610384041 A CN201610384041 A CN 201610384041A CN 106130811 B CN106130811 B CN 106130811B
Authority
CN
China
Prior art keywords
message
field
measured
verification
template
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.)
Active
Application number
CN201610384041.4A
Other languages
Chinese (zh)
Other versions
CN106130811A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201610384041.4A priority Critical patent/CN106130811B/en
Publication of CN106130811A publication Critical patent/CN106130811A/en
Application granted granted Critical
Publication of CN106130811B publication Critical patent/CN106130811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • H04L1/0083Formatting with frames or packets; Protocol or part of protocol for error control

Abstract

The present invention provides a kind of data communications test method and devices, this method comprises: creating message template according to the type of message to be measured and SWIFT message international standard;Message is checked using the field to be measured of the message to be measured and the message template generation;The message format and message content of the message to be measured are verified respectively using the SWIFT message international standard and the verification message, generate format check result and content authentication result respectively.The present invention respectively verifies message content and message format using verification message and SWIFT message international standard, can be improved the efficiency and quality of message test.

Description

Data communications test method and device
Technical field
The present invention relates to the field of test technology more particularly to a kind of data communications test method and devices.
Background technique
SWIFT (Society for Worldwide Interbank Financial Telecommunication, ring Financial telecommunications association, ball cooperative bank) message is highly safe, reliable to the financial institutions' offer of more than 8000 of the whole world as one kind, marks Standardization, the Communications service automated, the increasingly attention by each financial circles.Most domestic bank is used in both at present SWIFT message carries out the finance activities such as international finance clearing, receipt and payment clearance, this also proposes the verifying work of message in banking system Higher requirement is gone out.
Currently, to the test of message essentially by having been manually done.When testing SWIFT message, manual one a pair of of message is needed The association attributes and content of each field are verified, and as the field that message is related to increases, field format convention becomes complicated, Verifying message the time it takes and manpower rise at double.For example, if 30 seconds need to be spent by verifying single field, a common report Text includes 60 fields, it is assumed that the accounting of the field comprising valid data is 50%, then the time required to verifying this kind of message Up to 15 minutes.Such message is tested 4 times in a test period domestic demand, then the time for verifying message is up to 1 hour.Institute With the working efficiency of manual test message is usually relatively low.
Moreover, a complete message is defined substantially with the numerical value of code, fixed format, this requires tester in standard Carry out under the premise of business meaning, field structure and rule etc. for really grasping message and test, to each block, field content must be defeated Property, correctness, format etc. are verified.Inevitably there is tester's technical capability deficiency in manual verification message, and test data is covered The not congruent problem of capping, this will directly affect the correctness of test result.So the work quality of manual test message cannot get Guarantee.
Summary of the invention
The present invention provides a kind of data communications test method and device, to improve the efficiency and quality of message test.
The present invention provides a kind of data communications test method, comprising: international according to the type of message to be measured and SWIFT message Standard-creation message template;Message is checked using the field to be measured of the message to be measured and the message template generation;Using institute It states SWIFT message international standard and the verification message carries out school to the message format and message content of the message to be measured respectively It tests, generates format check result and content authentication result respectively.
In one embodiment, this method further include: according to the format check result and the content authentication as a result, by setting Determine the abnormal field information that packed format generates the message to be measured;According to the abnormal field information in the message to be measured Abnormal field be labeled, and the message to be measured after mark is saved as into test result message;According to the test result report Text generates the message test report of the information including type of message, field to be measured, format check result and content authentication result.
In one embodiment, message template is created according to the type of message to be measured and SWIFT message international standard, comprising: According to the message structure of message template described in the SWIFT message international standard and the type definition of the message to be measured;According to The message structure initializes to obtain original template;The message mould is created according to the message structure and the original template Plate.
In one embodiment, message, packet are checked using the field to be measured of the message to be measured and the message template generation It includes: being the message template-setup field data according to the field to be measured, generate initial message;According to the original template Field qualifier and field call format, must defeated field supplement setting column for be not yet arranged field data in the initial message Position data, generate the verification message.
In one embodiment, reported according to the SWIFT message international standard and the type definition of the message to be measured The message structure of literary template, comprising: from the SWIFT message international standard draw standard field;According to the message to be measured Type carries out structuring arrangement to the content of the standard field, generates the message structure.
It in one embodiment, initializes to obtain original template according to the message structure, comprising: according to the message structure Field option is shown, the input of field qualifier value, field data, field data format verifies and the multiplexing of field block carries out Initialization, generates the original template.
In one embodiment, the message template is created according to the message structure and the original template, comprising: according to The message structure is that the original template adds field annotation;The report is generated according to the original template after addition field annotation Literary template.
In one embodiment, it is the message template-setup field data according to the field to be measured, generates initial message, Include: for verification field setting verification label corresponding with the field to be measured in the message template, and is the verification Corresponding field data desired value is arranged in field;According to the field qualifier and field call format of the message template, to setting Verification field after setting field data desired value carries out format check;The verification field that format check passes through is carried out at structuring Reason generates the initial message.
In one embodiment, school is carried out using message format of the SWIFT message international standard to the message to be measured It tests, comprising: must defeated property, field culvert to the covering property of block of the message to be measured, block using the SWIFT message international standard Gai Xing, field must defeated property, qualifier and field data format verified, generate the format check result.
In one embodiment, the message content of the message to be measured is verified using the verification message, comprising: according to The location information of the verification field is obtained according to the verification label;According to the positional information from the message to be measured and described Verification message extracts field data to be measured and verification field data respectively;Compare the core of the field data and corresponding field to be measured To field data, the content authentication result is generated.
The present invention provides a kind of data communications test device, comprising: message template creating unit, for according to message to be measured Type and SWIFT message international standard create message template;Message generation unit is checked, for utilizing the message to be measured Field to be measured and the message template generation check message;Message checking unit, for being marked using the SWIFT message world The quasi- and described verification message respectively verifies the message format and message content of the message to be measured, generates format school respectively Test result and content authentication result.
In one embodiment, the device further include: abnormal field information generating unit, for according to the format check knot Fruit and the content authentication are as a result, generated the abnormal field information of the message to be measured by setting packed format;Test result report Literary generation unit, for being labeled according to the abnormal field information to the abnormal field in the message to be measured, and will mark Message to be measured after note saves as test result message;Message test report generation unit, for according to the test result report Text generates the message test report of the information including type of message, field to be measured, format check result and content authentication result.
In one embodiment, the message template creating unit includes: message structure generation module, for according to The message structure of message template described in SWIFT message international standard and the type definition of the message to be measured;Original template generates Module, for initializing to obtain original template according to the message structure;Message template creation module, for according to the message Structure and the original template create the message template.
In one embodiment, the verification message generation unit includes: initial message generation module, for according to it is described to Survey field is the message template-setup field data, generates initial message;Message generation module is checked, for according to described first The field qualifier and field call format of beginning template, for be not yet arranged in the initial message field data must defeated field mend Setting field data are filled, the verification message is generated.
In one embodiment, the message structure generation module includes: standard field abstraction module, is used for from described SWIFT message international standard draw standard field;Structuring sorting module, for according to the type of the message to be measured to described The content of standard field carries out structuring arrangement, generates the message structure.
In one embodiment, the original template generation module includes: initialization module, for according to the message structure Field option is shown, the input of field qualifier value, field data, field data format verifies and the multiplexing of field block carries out Initialization, generates the original template.
In one embodiment, the message template creation module includes: field annotations module, for according to the message knot Structure is that the original template adds field annotation;Template generation module, for raw according to the original template after addition field annotation At the message template.
In one embodiment, the initial message generation module includes: desired value recording module, for being the message mould Verification field setting verification label corresponding with the field to be measured on plate, and be the corresponding field of verification field setting Data desired value;Desired value correction verification module, for the field qualifier and field call format according to the message template, to setting Verification field after setting field data desired value carries out format check;Field structurized module, for what is passed through to format check It checks field and carries out structuring processing, generate the initial message.
In one embodiment, the message checking unit includes: message format correction verification module, for utilizing the SWIFT Message international standard to the covering property of block of the message to be measured, block must defeated property, covering property of field, field must defeated property, restriction Symbol and field data format are verified, and the format check result is generated.
In one embodiment, the message checking unit includes: field position acquisition module, for marking according to the verification Note obtains the location information of the verification field;Field data extraction module, for according to the positional information from described to be measured Message and the verification message extract field data to be measured and verification field data respectively;Message content correction verification module, for than The verification field data of the field data to be measured and corresponding field, generate the content authentication result.
The data communications test method and device of the embodiment of the present invention, the format and content of message to be measured verify respectively, energy It is enough effectively to promote testing efficiency.After the type for determining message to be measured, SWIFT message international standard can be compareed, test is reported The various field formats of text are verified, and various format issues can be effectively excluded, and have higher inspection efficiency, are not necessarily to tester Member grasps the structure content of message, can be improved test quality with this.The present invention relies on SWIFT message international standard to be measured Message is verified, and can more accurately be held test emphasis, be can be improved testing efficiency and quality.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.In the accompanying drawings:
Fig. 1 is the flow diagram of the data communications test method of one embodiment of the invention;
Fig. 2 is the flow diagram of message template establishment method in one embodiment of the invention;
Fig. 3 is the flow diagram of the message structure generation method of message template in one embodiment of the invention;
Fig. 4 is to be initialized to obtain the schematic diagram of original template according to message structure in one embodiment of the invention;
Fig. 5 is the flow diagram of message template establishment method in one embodiment of the invention;
Fig. 6 is the structural schematic diagram of message template in one embodiment of the invention;
Fig. 7 is the flow diagram that message forming method is checked in one embodiment of the invention;
Fig. 8 is the flow diagram of initial message forming method in one embodiment of the invention;
Fig. 9 is the schematic diagram of one embodiment of the invention intermediate hurdles position data inputting;
Figure 10 is to carry out school for the attribute of each field under each block in message to be measured and block in one embodiment of the invention The method flow schematic diagram tested;
Figure 11 is the method flow verified in one embodiment of the invention for the qualifier of each field in message to be measured Schematic diagram;
Figure 12 is the method stream verified in one embodiment of the invention for the data format of each field in message to be measured Journey schematic diagram;
Figure 13 is the flow diagram of message content method of calibration in one embodiment of the invention;
Figure 14 is the flow diagram of the data communications test method of another embodiment of the present invention;
Figure 15 is the flow diagram of the data communications test method of further embodiment of this invention;
Figure 16 is the structural schematic diagram of the data communications test device of one embodiment of the invention;
Figure 17 is the structural schematic diagram of message template creating unit in one embodiment of the invention;
Figure 18 is the structural schematic diagram of message structure generation module in one embodiment of the invention;
Figure 19 is the structural schematic diagram of message template creation module in one embodiment of the invention;
Figure 20 is the structural schematic diagram that message generation unit is checked in one embodiment of the invention;
Figure 21 is the structural schematic diagram of initial message generation module in one embodiment of the invention;
Figure 22 is the structural schematic diagram of message checking unit in one embodiment of the invention;
Figure 23 is the structural schematic diagram of the data communications test device of another embodiment of the present invention.
Specific embodiment
Understand in order to make the object, technical scheme and advantages of the embodiment of the invention clearer, with reference to the accompanying drawing to this hair Bright embodiment is described in further details.Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but simultaneously It is not as a limitation of the invention.
For being caused at present by inspection by hand, establishment and analysis message, SWIFT message testing efficiency is low and quality obtains The problem of less than guaranteeing, inventor designs a kind of data communications test method by creative work, can effectively solve the problem that hand Work verifies efficiency and quality problems caused when message.
Fig. 1 is the flow diagram of the data communications test method of one embodiment of the invention.As shown in Figure 1, the present invention is real Apply the data communications test method of example, it may include step:
S110: message template is created according to the type of message to be measured and SWIFT message international standard;
S120: message is checked using the field to be measured of the message to be measured and the message template generation;
S130: using the SWIFT message international standard and the verification message respectively to the message of the message to be measured Format and message content are verified, and generate format check result and content authentication result respectively.
The type of above-mentioned message to be measured can be may be generally defined as by three digital representations: MT nnn, such as MT950, MT202, MT541 etc..Wherein, the 1st n can indicate classification, can be used for describing the underlying commerce function of message, such as classification 1= Client's payment and check;2nd n can indicate to be grouped, and can be used for describing the message function in a certain specific classification, such as 11n= The paying by check message of classification 1;3rd n can indicate type, can be used for describing concrete function, such as the request of 112=stopping payment of check State.
In above-mentioned steps S110, which can be the report in need of test obtained from various application systems Text.The type of the message to be measured can be the various type of messages in SWIFT message international standard, and specific type of message can foundation SWIFT message international standard illustrates to determine.
In SWIFT message international standard, message usually divides its content with block, and a block generally comprises several Field.By must defeated property, message block can be divided into must defeated block (Mandatory Sequence) and optional block (Optional Sequence);By repeatability, message block can be divided into repeatable block and not reproducible block.Field (Field) is message The main component of main part is mainly made of field tag name, qualifier and field data content, field data content With certain field format.
Field tag name (Field Tag) shows " information content " of field, is generally separated with ": ", such as according to The format of ": nn [a]: " is defined.Wherein, " n " indicates number, and " a " indicates the option of field, generally with capitalization English letter It indicates, and the left and right of " a " is bracketed with bracket, indicates that the content in bracket can be omitted.Specific field tag name Option can be determined according to the standard field label name format in SWIFT international standard.
Qualifier (Qualifier) can be the character content started in the field of part, usually be made of 1-4 character, One qualifier indicates the field role.In SWIFT message international standard to each field with the presence or absence of qualifier and There is which qualifier and have and is dated.Field data content is specific data included by each field, such as date content 20140620, amount of money content 10000 etc., field data content according in SWIFT message international standard to each field defined Field format is fetched to define.
Field format (Types of Characters) refer to after field tag name the call format with data content, That is field data format indicates that the type in field format can divide following a few classes generally with " number+type ":
N: number is only indicated
A: capitalization is only indicated
C: number or capitalization are indicated
X: character (including number, letter and other spcial characters) all in SWIFT message is indicated
H: number or capitalization A-F are indicated
D: decimal is indicated
!: indicate regular length
*: indicating line number
: indicate minimum length and maximum length.
Such as: 8n: indicate that maximum length is 8 number;4!C: indicate that regular length is 4 character;4*35x: institute is indicated Most 4 rows of the content of filling, every most 35 characters of row;16-64h: indicate minimum length be 16, the number that maximum length is 64 Word or character (A-F).
In one embodiment, above-mentioned message template can be stored, when need again to same type of message into Use can be directly extracted when row test, it is not necessary to repeat creation message template.In another embodiment, above-mentioned SWIFT can be directed to Different message templates is respectively created in various type of messages in message international standard, when needing to treat to observe and predict text and tested When, the message template of respective type can be chosen, from all message templates of creation to test the message to be measured.So One, it is possible to reduce create the time that message template is spent for example within a test period, and then can be improved message test Efficiency.
It, can be in the message template after creating message template according to the type of message to be measured and SWIFT message international standard On the basis of, the information of the field to be measured according to message to be measured generates the message for being checked with message to be measured, that is, checks Message.
In above-mentioned steps S120, the field to be measured of the message to be measured is usually to be included in test scope in the message to be measured Various field regions.The qualifier and field data content of different fields to be measured can be according to fields in SWIFT message international standard Format illustrates to be increased or is deleted.For the content of the field to be measured of above-mentioned message to be measured, can be set for the verification message Field data content is set, for being checked with the field data content of above-mentioned message to be measured, is observed and predicted in text with realizing to treat Appearance is verified.According to above-mentioned SWIFT message international standard, message format can be set for the verification message, it may include field One or more formats such as tag name, qualifier, field data format.
In above-mentioned steps S130, on the basis of the above-mentioned verification message of generation, it may be implemented to treat respectively and observe and predict text Message format and message content carry out verification verification.Specifically, can be compareed after the type of message for determining message to be measured Message format in SWIFT message international standard treats all fields progress format check for observing and predicting text, not by message content school The influence of process is tested, message format checking procedure is easy, with strong points, and the efficiency of message test can be improved with this.It relies on SWIFT message international standard checking prediction message format grasps the structure content of message without tester, can be improved test with this As a result.Moreover, the format for automaticly inspecting message to be measured can only need the time of second grade, the test effect of message can further improve with this Rate.In addition, can be treated in the field data for observing and predicting text according to the field data content of verification message after generating verification message Appearance is verified, and verification content is single, is not susceptible to mistake, and the accuracy of message test can be improved with this.
The data communications test method of the embodiment of the present invention, first according to the type of message of message to be measured and SWIFT message International standard creates message template, and the field to be measured of the message to be measured and the message template generation is recycled to check message, and benefit It is verified with message format of the SWIFT message international standard to the message to be measured, using the verification message to the message to be measured Message content verified.The format check and content authentication of message to be measured carry out respectively, and format check is only knowing message It can be carried out in the case where type, verification efficiency can be improved with this, rely on SWIFT message international standard checking prediction message format, nothing Tester is needed to grasp the structure content of message, message test quality, which can be improved, moreover, verification is with strong points can be improved school Test the accuracy of efficiency and check results.Further, message template is suitable for same type of message, and same-type message to be measured is not Message template must be rebuild.
Message template in the embodiment of the present invention can be created by a variety of specific modes.For example, first basis SWIFT message international standard draw standard field and Initial message structure, then according to setting rule creation message template, and can To add the annotation of corresponding field data content at each field end wherein.
Fig. 2 is the flow diagram of message template establishment method in one embodiment of the invention.As shown in Fig. 2, in above-mentioned step It specifically may include step according to the method for the type of message to be measured and SWIFT message international standard creation message template in rapid S110 It is rapid:
S111: according to message template described in the SWIFT message international standard and the type definition of the message to be measured Message structure;
S112: it initializes to obtain original template according to the message structure;
S113: the message template is created according to the message structure and the original template.
In above-mentioned steps S111, which can be a series of information of the structure of reflection message templates.It should SWIFT message international standard can be the newest international standard of SWIFT tissue publication, can be English edition.The message template Message structure can set message information by stzwctlrred definition and obtain, for example, can pass through the stzwctlrred definition SWIFT message International standard obtains.It, can be from the SWIFT message international standard according to the type of message of setting, such as the type of message to be measured In match standard information corresponding to the type, and then can be arranged to obtain the message knot of message template according to the standard information Structure.
Specifically, can be will be in each field with type of message to the stzwctlrred definition of SWIFT message international standard Related content structurally arranged, the content of arrangement may include the content in SWIFT message international standard.For example, Content corresponding to each option in field tag name can be arranged, it can be to field data content under different options Corresponding linkage arranged, qualifier can be arranged, can annotation to field tag name and remarks arrange Deng.
In above-mentioned steps S112, standard information according to above-mentioned message structure, such as after structural definition can foundation The sequence of each block, each field, is initialized.Initialization process can be by the Content Transformation of message structure at template form.Example Such as, it is shown and is initialized according to option of the option of field in message structure to field, according to the qualifier in message structure Information the value of qualifier is initialized, according to the field number in message structure to the input of the data content of field into Row initialization, initializes the verification of field data format according to the information of the field data format in message structure, root It can be initialized according to the information of the different options of field in message structure and generate corresponding option content.S112 through the above steps Above-mentioned message structure can be processed into template.
In above-mentioned steps S113, standardized report can be created on foreground according to above-mentioned message structure and above-mentioned original template Literary template, so that system operator or user check message using the message template generation.Wait observe and predict in the embodiment of the present invention Text is usually the standardization message obtained according to SWIFT message international standard, so, which can and mark The message to be measured of standardization corresponds to well, is conducive to improve to treat and observes and predicts the accuracy that text carries out format check, improves test knot The quality of fruit.
May include in one embodiment, in above-mentioned message template mark must defeated field label, such as using asterisk as Label, in this way, can make system operator or user easily and rapidly identify in message template must defeated field, help In the efficiency for improving the subsequent generation verification message on the basis of message template.
Fig. 3 is the flow diagram of the message structure generation method of message template in one embodiment of the invention.Such as Fig. 3 institute Show, in above-mentioned steps S111, according to message described in the SWIFT message international standard and the type definition of the message to be measured The method of the message structure of template, it may include step:
S1111: from the SWIFT message international standard draw standard field;
S1112: structuring arrangement is carried out according to content of the type of the message to be measured to the standard field, generates institute State message structure.
In the present embodiment, from SWIFT message international standard draw standard field, and according to the type of message to be measured to extraction The content of standard field carry out the message structure that arranges of structuring, can be corresponding with the format information of message to be measured, It helps to realize to treat and observes and predicts text progress format check.
In one specific embodiment, SWIFT message international standard can be as shown in table 1, which is English Literary version, wherein may include that field must the information such as defeated property, field number, qualifier, field annotation, field option.In above-mentioned steps In S1111, can as needed from SWIFT message international standard shown in table 1 draw standard field relevant information.
1 SWIFT message international standard example of table
Table 2 is the message structure of the SWIFT message international standard structural definition according to shown in table 1.In above-mentioned steps In S1112, the information of the SWIFT message international standard draw standard field according to shown in table 1, and press the class of a message to be measured Type obtains message structure as shown in Table 2 after arranging via structuring.Compared with table 1, the table structure of the table 2 after structuring arrangement It is adjusted, can increase information, those information such as whether remarks, field Chinese, field repeat, whether block is optional can root It is determined according to the type of message to be measured.
Table 2 is according to the message structure example of SWIFT message international standard structural definition
In one embodiment, in above-mentioned steps S112, initialized to obtain the side of original template according to the message structure Method, it may include step:
Field option is shown according to the message structure, the input of field qualifier value, field data, field data lattice Formula verification and the multiplexing of field block are initialized, and the original template is generated.
It, can be by message knot that structuring arranges by being initialized to field relevant information in the present embodiment Structure is converted into template, helps to realize the creation of message template.
In above-mentioned steps, field option can be shown, field limits according to the field sequence under block sequence and block Symbol value, the input of field data and the verification of field data format are initialized.Wherein, show can be according to message knot for field option Field option information in structure is initialized, and field qualifier value can be according to the qualifier of the corresponding field in message structure Value is initialized, and the input of field data can be initialized according to the field data content in message structure, and field data are defeated Entering position can be arranged according to the sequence of block and field, and the verification of field data format can be according to the number of field corresponding in message structure It is initialized according to call format.If there are multiple options for the field of message structure, to the different options in field according to report The content and format of corresponding field respective selection in literary structure are initialized, can auto-initiation in corresponding option Hold.
Structuring can be sorted out to the message structure come through the above steps and be processed into template, specifically, such as can be automatic Amended record colon (such as colon in field signature), the processing of multi-option can be carried out to the field label for having multi-option, can will be limited Fixed symbol carries out the processing of multi-option, can automatically create the typing area of field data, and provide according in SWIFT message international standard Field format limitation control is carried out to input content.Meanwhile different options can be directed to, qualifier and field data format not Linkage control is carried out when consistent.
In above-mentioned steps, by being initialized to the multiplexing of field block, it can be multiplexed to block is repeated.For example, It can be indicated at duplicate block BOB(beginning of block) with "+" number, if clicking the "+" number, this block can be replicated automatically and shown, while "+" number becomes For "-" number, and block can will be repeated if clicking the "-" number and is deleted, be moved in circles with this, template creation effect can be improved Rate.
Fig. 4 is to be initialized to obtain the schematic diagram of original template according to message structure in one embodiment of the invention.Such as Fig. 4 institute Show, left-half is to carry out structuring to the content of the standard field of extraction according to the type of above-mentioned message to be measured to arrange generation Message structure, the message structure are diversified forms, such as arrange by field sequence.Right half can be arrived according to message structure initialization Original template shown in part.The original template may include field signature, field Data input section, block multiplexing label "+" number, The contents such as multi-option.Can be with input field position data in the original template, and format check can be carried out to input content, it is different Field option can correspond to different format control modes.
Fig. 5 is the flow diagram of message template establishment method in one embodiment of the invention.As shown in figure 5, in above-mentioned step In rapid S113, method that the message template is created according to the message structure and the original template, it may include step:
S1131: being that the original template adds field annotation according to the message structure;
S1132: the message template is generated according to the original template after addition field annotation.
In the present embodiment, in above-mentioned steps S1131, according to the content of above-mentioned message structure, such as above-mentioned message structure In the information such as field (English), field (Chinese), remarks and field format, add field annotation for above-mentioned original template, then S1132 for example creates standardized message template on foreground through the above steps.Field annotation in message template can be convenient Understanding of the user to message template.
In one embodiment, field annotation can be first added in message structure, further according to the report after addition field annotation Literary structure is initialized to obtain message template.Table 3 is the message structure example added after message annotation, as shown in table 3, often A field can be corresponding with corresponding message annotation.It may include preparing date/time, qualifier, field format in message annotation Etc. information, this column position is understood with this with can be convenient the case where.
Table 3 adds the message structure example after message annotation
Fig. 6 is the structural schematic diagram of message template in one embodiment of the invention.As shown in fig. 6, the message according to shown in table 3 Structure and message annotation can create corresponding message template on foreground.Wherein, each field can correspond to corresponding field annotation, And must defeated field can be indicated with asterisk, so that user intuitively learns field information.
Fig. 7 is the flow diagram that message forming method is checked in one embodiment of the invention.As shown in fig. 7, in above-mentioned step In rapid S120, the method for the field to be measured of the message to be measured and message template generation verification message is utilized, it may include step It is rapid:
S121: it is the message template-setup field data according to the field to be measured, generates initial message;
S122: according to the field qualifier and field call format of the original template, be in the initial message not yet Be arranged field data must defeated field supplement setting field data, generate the verification message.
In above-mentioned steps S121, can the much information such as field title, field data etc. according to field to be measured be Message template-setup field data, the field data in message template, which can be used for treating, observes and predicts text and carries out content authentication.
Field data can be arranged to the field region for being included in verification test in verification message in S121 through the above steps.Pass through Above-mentioned steps S122 can be according to the rule of the qualifier and format that define to field, further polishing message to be measured and above-mentioned verification The information of part is not collectively covered between message the two.Thus, it is ensured that it is all must defeated field information it is complete, generate one A complete verification message.
In one embodiment, date and cycle be must defeated item, but be not included in the field region of verification test, therefore can polishing day Initial message institute storing data after the information of phase and cycle, polishing date and cycle information can be as follows:
In one embodiment, S121~S122, produces a complete message through the above steps, includes label, column The all the elements such as position, information, verification message generated can be as follows:
:16R:GENL
:28E:1/ONLY
:20C::SEME//ICBCTRANSMSG
:23G:NEWM/CODU
:98a::PREP//20140611
:69a::STAT//20140611/20140613
:22F::SFRE//WEEK
:97A::SAFE//078100003677
:17B::ACTI//Y
:17B::CONS//N
:16S:GENL
Fig. 8 is the flow diagram of initial message forming method in one embodiment of the invention.As shown in figure 8, in above-mentioned step It is the message template-setup field data, the method for generating initial message according to the field to be measured in rapid S121, it may include Step:
S1211: for verification field setting verification label corresponding with the field to be measured in the message template, and it is Corresponding field data desired value is arranged in the verification field;
S1212: according to the field qualifier and field call format of the message template, to setting field data desired value Verification field afterwards carries out format check;
S1213: structuring processing is carried out to the verification field that format check passes through, generates the initial message.
In above-mentioned steps S1211, on the basis of above-mentioned message template, for should test field pair in message to be measured Answer verification message field carry out desired value/desired value typing, i.e., verification message in identify which field for check survey Checked result is tried and sets, above-mentioned verification mark is storable in TFLAG.Desired value/the desired value can be used for and message to be measured In the content of field to be measured be compared, observe and predict text to treat and carry out content authentication.
In the present embodiment, on the basis of generating message template according to SWIFT message international standard decimation rule, by setting Accommodate the desired value (desired value) in the field region into verification test, and automatic polishing must defeated field, one can be accurately generated Field needed for part meets requires, field data are complete, format correctly checks message, so as to more accurate assurance test weight Point.
Fig. 9 is the schematic diagram of one embodiment of the invention intermediate hurdles position data inputting.As shown in figure 9, can be to field data for example The desired value of date/time carries out typing, can also the different field data of different options typing to field.
It, can field data of the S1212 to typing in message template through the above steps after completing field data inputting (desired value/desired value) carries out format check, so that message template field data input follows the limit controlled in message template The requirement of fixed symbol and format etc..S1213 through the above steps can tie field and desired value identified in message template Structureization processing, and can store.In one embodiment, the data stored after structuring can be as follows:
In above-mentioned steps S130, treating the message content verification for observing and predicting text and message format verification can carry out respectively.
In one embodiment, in above-mentioned steps S130, using the SWIFT message international standard to the message to be measured The method that is verified of message format, it may include step:
It must defeated property, field culvert to the covering property of block of the message to be measured, block using the SWIFT message international standard Gai Xing, field must defeated property, qualifier and field data format verified, generate the format check result.
In above-mentioned steps, covering property of block be can refer in message to be measured with the presence or absence of a block or with the presence or absence of an extra area Block.Covering property of field can refer under a block (such as must defeated block) with the presence or absence of a field or with the presence or absence of an extra field.Column Position must the field known to defeated property whether be must defeated field.It can be to be measured according to the block information in SWIFT message international standard The block attributes (including covering property of block, block must defeated property) of message are verified, according in SWIFT message international standard Field information can treat the field attribute (covering property of field, field must defeated property, qualifier and field data format) for observing and predicting text It is verified.
Through the above steps, it can be verified for the message format of message to be measured, verification, qualifier including block Verification, field must defeated property and the verification of data format etc..The method of the present embodiment can effectively exclude field missing, qualifier The problems such as mistake, field data formatting error.
Figure 10 is to carry out school for the attribute of each field under each block in message to be measured and block in one embodiment of the invention The method flow schematic diagram tested.The verification of block attributes may include block must defeated property verification, the verification of field attribute can wrap Include the correctness of each field label in block and must defeated property verification, as shown in Figure 10, specific method of calibration may include walking as follows It is rapid:
S301: according to the block in SWIFT message international standard, verify message to be measured (such as MT541 class message) must be defeated (Mandatory) block whether there is, and if it does not exist, then record check results;
S302: it completes to must be after the verification of defeated block, according to the field in SWIFT message international standard, to the area Bi Shu In block each field must defeated property verified, if wherein lack must defeated field, check results are recorded;
S303: according to the field in SWIFT message international standard, verification must whether there is the column of non-block in defeated block Position, and if it exists, then record check results;
S304: according to the block and field in SWIFT message international standard, each column in optional block is verified in message to be measured Position must defeated property, if lack in the optional block must defeated field, check results are recorded;
S305: according to the field tag name in SWIFT message international standard, the lattice for observing and predicting each field tag name in text are treated Formula is verified, and whether verifies each field tag name front and back with colon beginning and end, and when the field of field tag name selects Whether its option is correct when item is multiple, if the format error as the result is shown of the format check of field tag name, by check results It records.
In one embodiment, the MT541 message to be measured obtained from a setting application system can are as follows:
:16R:GENL
:20C::SEME//TN13395306000021352
:16S:GERL
:16R:TRADDET
:98D::TRAD//20080230
:98A::SETT//20080219
:90B::DEAL/USD97,8
:35B:ISIN CN0006326812
IBM COMPUTER SCIENCE
:16S:TRADDET
:16R:SETDET
:23F::SETR//TRAD
:16R:SETPRTY
:95P::DEAG//GSASHKH1XXX
:16S:SETPRTY
:16R:AMT
:19A::DEAL//USD97800
:16S:AMT
:16R:AMT
:19A::STAM//USD125.5
:16S:AMT
:16R:AMT
:19A::SETT//USD979x5
:16S:AMT
In one embodiment, carrying out the obtained format check result of message format verification to above-mentioned message to be measured can are as follows:
The check results of above-mentioned steps S301~S305 are recordable in the position of corresponding unit, block or field, preferably Ground is recorded in the position understood convenient for user.As shown in above-mentioned format check result, the check results of above-mentioned steps S301 can As the area C therein illustrate shown in " -- lack in this message must the area defeated block C related content ";The verification knot of above-mentioned steps S302 Fruit can be as wherein lack must defeated field 23G;The check results of above-mentioned steps S303 can be as shown in 23F therein;Above-mentioned steps The verification rule of S304 can be similar with the verification rule of step S302;The check results of above-mentioned steps S305 can be such as 98a therein It is shown.
Figure 11 is the method flow verified in one embodiment of the invention for the qualifier of each field in message to be measured Schematic diagram.As shown in figure 11, it is verified, is had with the presence or absence of qualifier and qualifier correctness for each field in message to be measured Body method of calibration may include step:
S401: it according to the field in SWIFT message international standard, treats and observes and predicts in text each message field with the presence or absence of carrying out Verification, if being lacked in field present in SWIFT message international standard or message to be measured in message to be measured, there are SWIFT messages The field being not present in international standard, then record check results;
S402: it according to the field qualifier in SWIFT message international standard, treats and observes and predicts each message field qualifier in text Preceding colon format is verified, if there are colon and wait observe and predict before the qualifier of regulation field in SWIFT message international standard It lacks, then records check results in text;
S403: according to the field dictionary value in SWIFT message international standard, the field observed and predicted in text there are qualifier is treated Dictionary value verified, if mistake, check results are recorded.
The check results of above-mentioned steps S401~S403 are recordable in the position understood convenient for user, such as corresponding field Behind.In one embodiment, treats and observe and predict each field in text with the presence or absence of qualifier and the check results of qualifier correctness It can are as follows:
As shown in above-mentioned format check result, the check results of above-mentioned steps S401 can be as shown in 90B therein;Above-mentioned step The check results of rapid S402 can be as shown in 98A therein;In above-mentioned steps S403, the dictionary value of specific each field is reported in SWIFT It is described in detail in literary international standard, the check results of the step can be as shown in 16S therein.
Figure 12 is the method stream verified in one embodiment of the invention for the data format of each field in message to be measured Journey schematic diagram.As shown in figure 12, it is verified for data content format, that is, field data format of each field in message to be measured, Specific method may include step:
S501: according to SWIFT message international standard intermediate hurdles position data length, it is long that corresponding field data in message to be measured are verified Degree;
S502: according to SWIFT message international standard intermediate hurdles position data precision, corresponding field data in message to be measured are verified Precision;
S503: format is accorded with according to SWIFT message international standard intermediate hurdles bit data word, verifies corresponding field number in message to be measured According to character format;
S504: according to the slash format of SWIFT message international standard intermediate hurdles position data, corresponding field in message to be measured is verified The verification of the slash format of data.
The check results of above-mentioned steps S501~S504 can recorde, such as be recorded in the end of corresponding field.One In a embodiment, treat observe and predict the check results of the data content format of each field in text can be with are as follows:
As shown in above-mentioned format check result, the check results of above-mentioned steps S501 can be as shown in 20C therein;Above-mentioned step The check results of rapid S502 can be as therein: (for the field of numeric type in the embodiment, if any decimal shown in 19A::DEAL Point digit, then decimal point can English comma replacement in SWIFT message international standard);The check results of above-mentioned steps S503 It can be as therein: shown in 19A::SETT;The check results of above-mentioned steps S504 can be as shown in 97A therein.
Figure 13 is the flow diagram of message content method of calibration in one embodiment of the invention.As shown in figure 13, above-mentioned In step S130, the method checking message and being verified to the message content of the message to be measured is utilized, it may include step:
S132: the location information of the verification field is obtained according to the verification label;
S133: field data to be measured are extracted respectively from the message to be measured and the verification message according to the positional information With verification field data;
S134: the verification field data of the field data to be measured and corresponding field generate the content authentication knot Fruit.
The XML definition file of verification message can be automatically parsed first according to verification message.S132 through the above steps again, Verification according to field in verification message identifies (TFLAG), extracts the field area information i.e. location information for being included in verification test, It can be stored in the form of array [<2,20C>,<3,23G>,<4,98a>].
S133 through the above steps, according to the field area information for being included in verification test of extraction, respectively from message to be measured The information of corresponding field extracted with verification message, message X group to be measured, verification message Y group field data can be respectively formed Group.The three groups of field information extracted from verification message can be as follows:
[<2,20C,:SEME//ICBCTRANSMSG>,
<3,23G,NEWM/CODU>,
<4,98A,:PREP//20140611>]
S134 through the above steps, according to the Y group field data of the X group field data group of message to be measured and verification message Group, the content for carrying out corresponding field one by one carries out comparison of coherence, and can record the comparison result of every group of field.If comparison result Unanimously, then it can be denoted as Y, if comparison result is inconsistent, N can be denoted as, while can be reserved for message to be measured and checking the tool in message Body field data, format can be " message field data # to be measured checks message field data ".
After completing message to be measured and checking the comparison of all fields of message, the comparison result of each field can be summarized, and Comparison result can be stored, to make further data processing, generate test report.Comparison result can be as follows:
[<2,20C,Y>,
<3,23G,N,NEWM/DUPL#NEWM/CODU>,
<4,98A,N,:PREP//20140611#:PREP//20140613>]
Figure 14 is the flow diagram of the data communications test method of another embodiment of the present invention.As shown in figure 14, Fig. 1 Shown in data communications test method, may further comprise the step of:
S140: according to the format check result and the content authentication as a result, by setting packed format generate it is described to Observe and predict the abnormal field information of text;
S150: the abnormal field in the message to be measured is labeled according to the abnormal field information, and will mark Message to be measured afterwards saves as test result message;
S160: being generated according to the test result message includes type of message, field to be measured, format check result and content The message test report of the information of check results.
In above-mentioned steps S140, which may include the school to related pattern in one or more messages Test result.The setting packed format can be various forms, can specifically be set as needed.Such as the setting packed format Can be [<1,16R, Y>,<2,20C, Y>,<3,23G, N: 4!c//8!n>......].It, can be according to format in one embodiment Check results calculate inspected field number a1, not by field number b1, and do the statistics of error rate c1=b1/a1, statistical result It can be used for making the test report of message to be measured.
In above-mentioned steps S140, which may include the school to related content in one or more messages Test result.In one embodiment, it can further calculate and check field number a2, not by field number b2, and be error rate c2= The statistics of b2/a2, statistical result can be used for making the test report of message to be measured.
In above-mentioned steps S140, according to format check result and content authentication as a result, can tie two kinds of verifications by field Fruit is integrated, and such as < serial number, field, format checked result, Format Reference value, content checked result, content reference value are formed > information group, wherein the Format Reference value can according to SWIFT message international standard determine, which can be above-mentioned record Desired value/the desired value entered.Information group can be used for making the test report of message to be measured.For example, the information group can be as follows:
[<1,16R,Y,>,
<2,20C,Y,Y,>,
<3,23G,N,:4!c//8!n,N,NEW/DUPL#NEWM/CODU>,
<4,98a,Y,N,:PREP//20140611#:PREP//20140613>]
In above-mentioned steps S150, is treated according to abnormal field information group and observes and predicts the literary corresponding abnormal mark of field progress, And test result message is saved as, facilitate the test result that message to be measured is conveniently learnt by result message.The test result Message can be used for making the test report of message to be measured.For example, test result message can be as follows:
:16R:GENL
:20C::SEME//ICBCTRANSMSG
:23G:NEW/CODU#:4!c//8!N format mismatching;Content mismatches NEWM/CODU
: 98a::PREP//20140611# content mismatches: PREP//20140613
:69a::STAT//20140611/20140613
:22F::SFRE//WEEK
:97A::SAFE//078100003677
:17B::ACTI//Y
:17B::CONS//N
:16S:GENL
In one embodiment, above-mentioned message test report can be according to above-mentioned format check result, content authentication result, statistics As a result, one or more generations in the data such as abnormal field information, information group, test result message.For example, the message is tested Report may include essential information, checked result and attachment three parts.Wherein, which can cover type of message, verification model It encloses, check the information such as conclusion;It is bright that the checked result can cover the abnormal detail of format check result, the exception of content authentication result Carefully, the information such as abnormal conditions shown by field;The attachment can cover message, verification message and test result message to be measured (can Band mark), the content of test report can be as shown in table 4.
4 message test report example of table
Figure 15 is the flow diagram of the data communications test method of further embodiment of this invention.As shown in figure 15, this hair The data communications test method of bright embodiment, it may include step:
S601: the SWIFT message international standard of stzwctlrred definition, i.e. message structure are obtained according to the type of message to be measured;
S602: according to above-mentioned message structure, being initialized, including to must defeated field, must defeated block, qualifier and field Data format is initialized, and the business meaning stated each field annotates, and obtains message template;
S603: it in above-mentioned template message, to the verification field for being included in verification test, according to the guide of message template and mentions Show, carries out data input;
S604: complete verification field data input after, in message template it is remaining must defeated field, according to field The automatic polishing data of attribute;
S605: in conjunction with the information of the verification field of typing and the field information of automatic polishing, generating complete verification message, And the field region for being included in verification test is marked;
S606: message to be measured is obtained, and message format and content are done to the message to be measured according to SWIFT message international standard The verification of format, verification content include cover block, qualifier, must defeated property, data format information;
S607: after completing format check, lattice are saved with the data object of the structuring of<field, inspection result, explanation> Formula check results;
S608: it is marked according to the field in verification message, extracts the field region for being included in verification test, and with this to verification Message and message to be measured extract field information, then carry out to the content consistency of the field information of verification message and message to be measured It compares and checks, that is, verify;
S609: after completing content consistency and checking, with the structural data objects of<field, comparison result, reference point> Save content authentication result;
S610: parsing format check results and content checked result, and the two is integrated into the detailed test at field visual angle As a result, carrying out exception information mark on the basis of message to be measured for the field of test result exception, test result report is formed Text;
S611: the complete message test report containing essential information, checked result and attachment three parts is generated.
In above-mentioned steps S611, which can cover the information such as type of message, check range, verification conclusion;It should Checked result can cover the abnormal detail of format check result, the abnormal detail of content authentication result, the exception shown by field The information such as situation;The attachment can cover message, verification message and test result message to be measured.
Above steps can be in conjunction with the data communications test method of the various embodiments described above in the case where not clashing It uses, for example, format check result and content authentication result can be organized into above-mentioned steps S607 respectively in the various embodiments described above The format<field of the data of middle structuring, inspection result, explanation>and above-mentioned steps S609 structuring data format<column Position, comparison result, reference point > form.
In the present embodiment, have recorded all kinds of managing detailed catalogues of message to be measured test in detail, and formed test result values and The clear control of desired value/desired value, ultimately generates the accurate test report of a specification, and checked result is apparent intuitive.
The data communications test method of the embodiment of the present invention, the format and content of message to be measured verify respectively, can be effective Promote testing efficiency.After the type for determining message to be measured, SWIFT message international standard can be compareed, to each of test packet Kind field format is verified, and various format issues can be effectively excluded, and has higher inspection efficiency, relies on SWIFT message state Border criteria check message format grasps the structure content of message without tester, can be improved message test quality.The present invention It relies on SWIFT message international standard to treat to observe and predict text and verified, can more accurately hold test emphasis, can be improved test Efficiency.
Based on inventive concept identical with data communications test method shown in FIG. 1, the embodiment of the present application also provides one Kind data communications test device, as following example is above-mentioned.The principle and data solved the problems, such as due to data communications test device Communication test method is similar, therefore the implementation of the data communications test device may refer to the implementation of data communications test method, Overlaps will not be repeated.
Figure 16 is the structural schematic diagram of the data communications test device of one embodiment of the invention.As shown in figure 16, of the invention The structural schematic diagram of the data communications test device of embodiment, it may include: message template creating unit 210, verification message generate Unit 220 and message checking unit 230, above-mentioned each unit are linked in sequence.
Message template creating unit 210 is used to create message according to the type and SWIFT message international standard of message to be measured Template.
Check field to be measured and the message template generation core that message generation unit 220 is used to utilize the message to be measured To message.
Message checking unit 230 is used for using the SWIFT message international standard and the verification message respectively to described The message format and message content of message to be measured are verified, and generate format check result and content authentication result respectively.
In message template creating unit 210, which can be needs to carry out from what various application systems obtained The message of test.The type of the message to be measured can be the various type of messages in SWIFT message international standard, specific message class Type can illustrate to determine according to SWIFT message international standard.
In one embodiment, the apparatus may include a storage unit, it can be used for storing above-mentioned message template, Use can be directly extracted when needing again to test same type of message, it is not necessary to repeat creation message template.Separately In one embodiment, different message moulds can be respectively created for the various type of messages in above-mentioned SWIFT message international standard Plate is stored in storage unit, when need to treat observe and predict text and tested when, the report of respective type can be chosen from memory module Literary template, to test the message to be measured.Thus, it is possible to reduce message mould is created for example within a test period The time that plate is spent, and then can be improved message testing efficiency.
Message template creating unit 210 creates message mould according to the type and SWIFT message international standard of message to be measured After plate, verification message generation unit 220 can be on the basis of the message template, the information of the field to be measured according to message to be measured, The message for being checked with message to be measured is generated, i.e. verification message.
In verification message generation unit 220, the field to be measured of the message to be measured is usually to be included in survey in the message to be measured Try the various field regions of range.The qualifier and field data content of different fields to be measured can be marked according to the SWIFT message world Quasi- intermediate hurdles bit format illustrates to be increased or is deleted.
The data communications test device of the embodiment of the present invention determines the report of message to be measured in message template creating unit 210 After literary type, message checking unit 230 can compare the message format in SWIFT message international standard, treat the institute for observing and predicting text There is field to carry out format check, is not influenced by message content checking procedure, message format checking procedure is easy, with strong points, The efficiency of message test can be improved with this.SWIFT message international standard checking prediction message format is relied on, is grasped without tester Message test quality can be improved in the structure content of message.
Figure 17 is the structural schematic diagram of message template creating unit in one embodiment of the invention.As shown in figure 17, the report Literary template creating unit 210 can include: message structure generation module 211, original template generation module 212 and the creation of message template Module 213, above-mentioned each sequence of modules connection.
Message structure generation module 211 is used for the type according to the SWIFT message international standard and the message to be measured Define the message structure of the message template.
Original template generation module 212 according to the message structure for initializing to obtain original template.
Message template creation module 213 is used to create the message mould according to the message structure and the original template Plate.
In message structure generation module 211, which can be a series of letter of the structure of reflection message templates Breath.The message structure of the message template can set message information by stzwctlrred definition and obtain, for example, can pass through structuring The SWIFT message international standard is defined to obtain.It, can be from this according to the type of message of setting, such as the type of message to be measured Standard information corresponding to the type is matched in SWIFT message international standard, and then can arrange to obtain according to the standard information The message structure of message template.
By original template generation module 212, standard information according to above-mentioned message structure, such as after structural definition, It can be initialized according to the sequence of each block, each field.Initialization process can be by the Content Transformation of message structure at template Form.It is initialized for example, being shown according to option of the option of field in message structure to field, according in message structure The information of qualifier initializes the value of qualifier, according to the field number in message structure to the data content of field Input is initialized, and is carried out according to the information of the field data format in message structure to the verification of field data format initial Change, can be initialized according to the information of the different options of field in message structure and generate corresponding option content.By above-mentioned first Above-mentioned message structure can be processed into template by beginning template generation module 212.
In the present embodiment, which can correspond to well with standardized message to be measured, be conducive to It improves to treat and observes and predicts the accuracy that text carries out format check, improve the quality of test result.
Figure 18 is the structural schematic diagram of message structure generation module in one embodiment of the invention.As shown in figure 18, the report Literary structural generation module 211 can include: standard field abstraction module 2111 and structuring sorting module 2112, the two mutually interconnects It connects.
Standard field abstraction module 2111 is used for from the SWIFT message international standard draw standard field.
Structuring sorting module 2112 is used to carry out the content of the standard field according to the type of the message to be measured Structuring arranges, and generates the message structure.
In the present embodiment, by standard field abstraction module 2111 from SWIFT message international standard draw standard field, and Structuring arrangement is carried out to the content of the standard field of extraction according to the type of message to be measured by structuring sorting module 2112 Obtained message structure, can be corresponding with the format information of message to be measured, helps to realize to treat and observes and predicts text progress format school It tests.
In one embodiment, the original template generation module 212 can include: initialization module.
Initialization module for field option is shown according to the message structure, field qualifier value, field data Input, the verification of field data format and the multiplexing of field block are initialized, and the original template is generated.
In the present embodiment, field relevant information is initialized by initialization module, structuring can be arranged To message structure be converted into template, help to realize the creation of message template.
By initialization module structuring can be sorted out come message structure be processed into template, specifically, for example, can from Dynamic amended record colon (such as colon in field signature), the processing of multi-option can be carried out to the field label for having multi-option, can be incited somebody to action Qualifier carries out the processing of multi-option, can automatically create the typing area of field data, and advise according in SWIFT message international standard Fixed field format carries out limitation control to input content.Meanwhile different options can be directed to, in qualifier and field data format Linkage control is carried out when inconsistent.
The multiplexing of field block is initialized by initialization module, can be multiplexed to block is repeated.For example, repeating Block beginning can be indicated with "+" number, if clicking the "+" number, can automatically be replicated this block and be shown, while "+" number becomes "-" number, and can will repeat block if clicking the "-" number and delete, it is moved in circles with this, template creation efficiency can be improved.
Figure 19 is the structural schematic diagram of message template creation module in one embodiment of the invention.As shown in figure 19, the report Literary template creation module 213 can include: field annotations module 2131 and template generation module 2132, the two are connected with each other.
Field annotations module 2131 is used to be that the original template adds field annotation according to the message structure.
Template generation module 2132 is used to generate the message template according to the original template after addition field annotation.
In the present embodiment, field annotations module 2131 is according to the content of above-mentioned message structure, such as in above-mentioned message structure The information such as field (English), field (Chinese), remarks and field format, add field annotation for above-mentioned original template, then lead to It crosses template generation module 2132 and for example creates standardized message template on foreground.Field annotation in message template can be convenient Understanding of the user to message template.
Figure 20 is the structural schematic diagram that message generation unit is checked in one embodiment of the invention.As shown in figure 20, the core To message generation unit 220 can include: initial message generation module 221 and verification message generation module 222, the two mutually interconnects It connects.
Initial message generation module 221 is used to according to the field to be measured be the message template-setup field data, raw At initial message.
Message generation module 222 is checked for field qualifier and field call format according to the original template, is Not yet be arranged in the initial message field data must defeated field supplement setting field data, generate the verification message.
In the present embodiment, initial message generation module 221 can according to field to be measured much information such as field title, Field data etc. are message template-setup field data, and the field data in message template, which can be used for treating, observes and predicts text progress content Verification.Field data can be set to the field region for being included in verification test in verification message.Checking message generation module 222 can be according to It is uncommon between further polishing message to be measured and above-mentioned verification message the two according to the rule of the qualifier and format that are defined to field The information of covering part.Thus, it is ensured that it is all must defeated field information it is complete, generate a complete verification report Text.
Figure 21 is the structural schematic diagram of initial message generation module in one embodiment of the invention.As shown in figure 21, described first Beginning message generation module 221 can include: desired value recording module 2211, desired value correction verification module 2212 and field structurized module 2213, above-mentioned each sequence of modules connection.
Desired value recording module 2211 is used for as verification field corresponding with the field to be measured in the message template Setting verification label, and corresponding field data desired value is set for the verification field.
Desired value correction verification module 2212 is for field qualifier and field call format according to the message template, to setting Verification field after setting field data desired value carries out format check.
The verification field that field structurized module 2213 is used to pass through format check carries out structuring processing, described in generation Initial message.
Desired value recording module 2211 on the basis of above-mentioned message template, for should test field pair in message to be measured Answer verification message field carry out desired value/desired value typing, i.e., verification message in identify which field for check survey Checked result is tried and sets, above-mentioned verification mark is storable in TFLAG.Desired value/the desired value can be used for and message to be measured In the content of field to be measured be compared, observe and predict text to treat and carry out content authentication.
In the present embodiment, on the basis of generating message template according to SWIFT message international standard decimation rule, by setting Accommodate the desired value (desired value) in the field region into verification test, and automatic polishing must defeated field, one can be accurately generated Field needed for part meets requires, field data are complete, format correctly checks message, so as to more accurate assurance test weight Point.
In one embodiment, the message checking unit 230 can include:
Message format correction verification module using block of the SWIFT message international standard to the message to be measured for being covered Property, block must defeated property, covering property of field, field must defeated property, qualifier and field data format verified, generate the format Check results.
In the present embodiment, covering property of block be can refer in message to be measured with the presence or absence of a block or with the presence or absence of an extra area Block.Covering property of field can refer under a block (such as must defeated block) with the presence or absence of a field or with the presence or absence of an extra field.Column Position must the field known to defeated property whether be must defeated field.It can be to be measured according to the block information in SWIFT message international standard The block attributes (including covering property of block, block must defeated property) of message are verified, according in SWIFT message international standard Field information can treat the field attribute (covering property of field, field must defeated property, qualifier and field data format) for observing and predicting text It is verified.By message format correction verification module, can be verified for the message format of message to be measured, the school including block Test, the verification of qualifier, field must defeated property and the verification of data format etc..The method of the present embodiment can effectively exclude field The problems such as missing, qualifier mistake, field data formatting error.
Figure 22 is the structural schematic diagram of message checking unit in one embodiment of the invention.As shown in figure 22, the message school Verification certificate member 230 can include: field position acquisition module 231, field data extraction module 232 and message content correction verification module 233, Above-mentioned each sequence of modules connection.
Field position acquisition module 231 is used to obtain the location information of the verification field according to the verification label.
Field data extraction module 232 is for according to the positional information from the message to be measured and the verification message point Indescribably take field data to be measured and verification field data.
Message content correction verification module 233 is used for the verification field data of the field data to be measured and corresponding field, Generate the content authentication result.
The XML definition file of verification message can be automatically parsed first according to verification message.It is obtained again by above-mentioned field position Modulus block 231, the verification according to field in verification message identify (TFLAG), extract the field area information for being included in verification test That is location information, can with array [<2,20C>,<3,23G>,<4,98a>] form store.
By above-mentioned field data extraction module 232, according to the field area information for being included in verification test of extraction, respectively The information of corresponding field extracted from message to be measured and verification message, message X group to be measured, verification message Y can be respectively formed Group field data group.
By above-mentioned message content correction verification module 233, according to the Y of the X group field data group of message to be measured and verification message Group field data group, the content for carrying out corresponding field one by one carries out comparison of coherence, and can record the comparison result of every group of field. If comparison result is consistent, it can be denoted as Y, if comparison result is inconsistent, N can be denoted as, while can be reserved for message to be measured and verification Specific field data in message, format can be " message field data # to be measured checks message field data ".
Figure 23 is the structural schematic diagram of the data communications test device of another embodiment of the present invention.As shown in figure 23, Figure 16 Shown in data communications test device may also include that abnormal field information generating unit 240, test result message generation unit 250 and message test report generation unit 260, said units are linked in sequence, and abnormal field information generating unit 240 with it is above-mentioned Message checking unit 230 connects.
Abnormal field information generating unit 240 is used for according to the format check result and the content authentication as a result, pressing Setting packed format generates the abnormal field information of the message to be measured.
Test result message generation unit 250 is used for according to the abnormal field information to the exception in the message to be measured Field is labeled, and the message to be measured after mark is saved as test result message.
It includes type of message that message test report generation unit 260, which is used to be generated according to the test result message, to be measured The message test report of the information of field, format check result and content authentication result.
By abnormal field information generating unit 240, which may include in one or more messages The check results of related pattern.The setting packed format can be various forms, can specifically be set as needed.Such as it should Set packed format can for [<1,16R, Y>,<2,20C, Y>,<3,23G, N: 4!c//8!n>......].
In one embodiment, abnormal field information generating unit 240 can calculate inspected column according to format check result Digit a1 not by field number b1, and does the statistics of error rate c1=b1/a1, and statistical result can be used for making message to be measured Test report.
In one embodiment, abnormal field information generating unit 240, which can further calculate, has checked field number a2, does not pass through Field number b2, and the statistics of error rate c2=b2/a2 is done, statistical result can be used for making the test report of message to be measured.
In abnormal field information generating unit 240, according to format check result and content authentication as a result, can be incited somebody to action by field Two kinds of check results are integrated, formation such as < serial number, field, format checked result, Format Reference value, content checked result, Content reference value > information group, wherein the Format Reference value can according to SWIFT message international standard determine, the content reference value It can be desired value/desired value of above-mentioned typing.Information group can be used for making the test report of message to be measured.
In one embodiment, above-mentioned message test report can be according to above-mentioned format check result, content authentication result, statistics As a result, one or more generations in the data such as abnormal field information, information group, test result message.For example, the message is tested Report may include essential information, checked result and attachment three parts.Wherein, which can cover type of message, verification model It encloses, check the information such as conclusion;It is bright that the checked result can cover the abnormal detail of format check result, the exception of content authentication result Carefully, the information such as abnormal conditions shown by field;The attachment can cover message, verification message and test result message to be measured (can Band mark).
In the present embodiment, have recorded all kinds of managing detailed catalogues of message to be measured test in detail, and formed test result values and The clear control of desired value/desired value, ultimately generates the accurate test report of a specification, and checked result is apparent intuitive.
The data communications test device of the embodiment of the present invention, the format and content of message to be measured verify respectively, can be effective Promote testing efficiency.After the type for determining message to be measured, SWIFT message international standard can be compareed, to each of test packet Kind field format is verified, and various format issues can be effectively excluded, and has higher inspection efficiency and test quality.The present invention It relies on SWIFT message international standard to treat to observe and predict text and verified, can more accurately hold test emphasis, can be improved test Efficiency grasps the structure content of message without tester, can be improved message test quality.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In the description of this specification, reference term " one embodiment ", " specific embodiment ", " some implementations Example ", " such as ", the description of " example ", " specific example " or " some examples " etc. mean it is described in conjunction with this embodiment or example Particular features, structures, materials, or characteristics are included at least one embodiment or example of the invention.In the present specification, Schematic expression of the above terms may not refer to the same embodiment or example.Moreover, the specific features of description, knot Structure, material or feature can be combined in any suitable manner in any one or more of the embodiments or examples.
Particular embodiments described above has carried out further in detail the purpose of the present invention, technical scheme and beneficial effects Describe in detail it is bright, it should be understood that the above is only a specific embodiment of the present invention, the guarantor being not intended to limit the present invention Range is protected, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should be included in this Within the protection scope of invention.

Claims (18)

1. a kind of data communications test method characterized by comprising
Message template is created according to the type of message to be measured and SWIFT message international standard;
Message is checked using the field to be measured of the message to be measured and the message template generation;
Using the SWIFT message international standard and the verification message respectively to the message format and message of the message to be measured Content is verified, and generates format check result and content authentication result respectively;
Wherein, message template is created according to the type of message to be measured and SWIFT message international standard, comprising:
According to the message structure of message template described in the SWIFT message international standard and the type definition of the message to be measured;
It initializes to obtain original template according to the message structure;
The message template is created according to the message structure and the original template.
2. data communications test method as described in claim 1, which is characterized in that further include:
According to the format check result and the content authentication as a result, generating the different of the message to be measured by setting packed format Normal field information;
The abnormal field in the message to be measured is labeled according to the abnormal field information, and by after mark wait observe and predict Text saves as test result message;
Generated according to the test result message includes type of message, field to be measured, format check result and content authentication result Information message test report.
3. data communications test method as described in claim 1, which is characterized in that utilize the field to be measured of the message to be measured Message is checked with the message template generation, comprising:
It is the message template-setup field data according to the field to be measured, generates initial message;
According to the field qualifier and field call format of the original template, for field number is not yet arranged in the initial message According to must defeated field supplement setting field data, generate the verification message.
4. data communications test method as described in claim 1, which is characterized in that according to the SWIFT message international standard The message structure of message template described in type definition with the message to be measured, comprising:
From the SWIFT message international standard draw standard field;
Structuring arrangement is carried out according to content of the type of the message to be measured to the standard field, generates the message knot Structure.
5. data communications test method as described in claim 1, which is characterized in that initialize to obtain according to the message structure Original template, comprising:
Field option is shown according to the message structure, the input of field qualifier value, field data, field data format school It tests and the multiplexing of field block is initialized, generate the original template.
6. data communications test method as described in claim 1, which is characterized in that according to the message structure and described initial Template creates the message template, comprising:
It is that the original template adds field annotation according to the message structure;
The message template is generated according to the original template after addition field annotation.
7. data communications test method as claimed in claim 3, which is characterized in that according to the field to be measured be the message Template-setup field data, generate initial message, comprising:
It for verification field setting verification label corresponding with the field to be measured in the message template, and is the verification column Corresponding field data desired value is arranged in position;
According to the field qualifier and field call format of the message template, to the verification column after setting field data desired value Position carries out format check;
Structuring processing is carried out to the verification field that format check passes through, generates the initial message.
8. data communications test method as described in claim 1, which is characterized in that utilize the SWIFT message international standard The message format of the message to be measured is verified, comprising:
Using the SWIFT message international standard to the covering property of block of the message to be measured, block must defeated property, field cover Property, field must defeated property, qualifier and field data format verified, generate the format check result.
9. data communications test method as claimed in claim 7, which is characterized in that using the verification message to described to be measured The message content of message is verified, comprising:
The location information of the verification field is obtained according to the verification label;
Field data to be measured and verification column are extracted respectively from the message to be measured and the verification message according to the positional information Position data;
The verification field data for comparing the field data to be measured and corresponding field, generate the content authentication result.
10. a kind of data communications test device characterized by comprising
Message template creating unit, for creating message template according to the type and SWIFT message international standard of message to be measured;
Message generation unit is checked, for the field to be measured and message template generation verification report using the message to be measured Text;
Message checking unit, for using the SWIFT message international standard and the verification message respectively to described wait observe and predict The message format and message content of text are verified, and generate format check result and content authentication result respectively;
Wherein, the message template creating unit includes:
Message structure generation module, for the type definition institute according to the SWIFT message international standard and the message to be measured State the message structure of message template;
Original template generation module, for initializing to obtain original template according to the message structure;
Message template creation module, for creating the message template according to the message structure and the original template.
11. data communications test device as claimed in claim 10, which is characterized in that further include:
Abnormal field information generating unit is used for according to the format check result and the content authentication as a result, pressing setting group Qualified formula generates the abnormal field information of the message to be measured;
Test result message generation unit, for according to the abnormal field information to the abnormal field in the message to be measured into Rower note, and the message to be measured after mark is saved as into test result message;
Message test report generation unit includes type of message, field to be measured, lattice for being generated according to the test result message The message test report of the information of formula check results and content authentication result.
12. data communications test device as claimed in claim 10, which is characterized in that the verification message generation unit packet It includes:
Initial message generation module generates initial for being the message template-setup field data according to the field to be measured Message;
Message generation module is checked, is described first for the field qualifier and field call format according to the original template Not yet be arranged in beginning message field data must defeated field supplement setting field data, generate the verification message.
13. data communications test device as claimed in claim 10, which is characterized in that the message structure generation module packet It includes:
Standard field abstraction module is used for from the SWIFT message international standard draw standard field;
It is whole to carry out structuring to the content of the standard field for the type according to the message to be measured for structuring sorting module Reason, generates the message structure.
14. data communications test device as claimed in claim 10, which is characterized in that the original template generation module packet It includes:
Initialization module, for being shown according to the message structure to field option, field qualifier value, field data it is defeated Enter, field data format verification and field block multiplexing initialized, generate the original template.
15. data communications test device as claimed in claim 10, which is characterized in that the message template creation module packet It includes:
Field annotations module, for being that the original template adds field annotation according to the message structure;
Template generation module, for generating the message template according to the original template after addition field annotation.
16. data communications test device as claimed in claim 12, which is characterized in that the initial message generation module packet It includes:
Desired value recording module, for for verification field setting verification corresponding with the field to be measured in the message template Label, and corresponding field data desired value is set for the verification field;
Desired value correction verification module, for the field qualifier and field call format according to the message template, to setting field Verification field after data desired value carries out format check;
Field structurized module, the verification field for passing through to format check carry out structuring processing, generate the initial report Text.
17. data communications test device as claimed in claim 10, which is characterized in that the message checking unit includes:
Message format correction verification module, for using the SWIFT message international standard to the covering property of block of the message to be measured, Block must defeated property, covering property of field, field must defeated property, qualifier and field data format verified, generate the format school Test result.
18. data communications test device as claimed in claim 16, which is characterized in that the message checking unit includes:
Field position acquisition module, for obtaining the location information of the verification field according to the verification label;
Field data extraction module, for being extracted respectively from the message to be measured and the verification message according to the positional information Field data to be measured and verification field data;
Message content correction verification module generates institute for the verification field data of the field data to be measured and corresponding field State content authentication result.
CN201610384041.4A 2016-06-02 2016-06-02 Data communications test method and device Active CN106130811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610384041.4A CN106130811B (en) 2016-06-02 2016-06-02 Data communications test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610384041.4A CN106130811B (en) 2016-06-02 2016-06-02 Data communications test method and device

Publications (2)

Publication Number Publication Date
CN106130811A CN106130811A (en) 2016-11-16
CN106130811B true CN106130811B (en) 2019-05-21

Family

ID=57270395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610384041.4A Active CN106130811B (en) 2016-06-02 2016-06-02 Data communications test method and device

Country Status (1)

Country Link
CN (1) CN106130811B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850341A (en) * 2017-01-17 2017-06-13 盛科网络(苏州)有限公司 For the automated software group bag method of exchanger chip simulation performance test
CN107885498A (en) * 2017-11-15 2018-04-06 中国银行股份有限公司 A kind of page display method and device based on self-defined field
CN110336814A (en) * 2019-07-03 2019-10-15 中国银行股份有限公司 A kind of analytic method, equipment and the system of SWIFT message
CN111641662B (en) * 2020-07-01 2023-05-12 中国银行股份有限公司 Message format checking method and device
CN112115682A (en) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 Automatic processing method and device for electronic certificate message based on engine
CN112116453B (en) * 2020-09-28 2024-04-16 中国银行股份有限公司 Verification and report simulation method and device
CN115277887A (en) * 2022-08-03 2022-11-01 中国银行股份有限公司 Message content sending and processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724031A (en) * 2012-05-25 2012-10-10 深圳市华曦达科技股份有限公司 Method and device for quickly checking information message
CN104732441A (en) * 2015-04-07 2015-06-24 中国农业银行股份有限公司 Data checking method and device applicable to fund consignment sale mechanism

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2005234798B2 (en) * 2004-04-26 2009-01-08 Jp Morgan Chase Bank System and method for routing messages

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724031A (en) * 2012-05-25 2012-10-10 深圳市华曦达科技股份有限公司 Method and device for quickly checking information message
CN104732441A (en) * 2015-04-07 2015-06-24 中国农业银行股份有限公司 Data checking method and device applicable to fund consignment sale mechanism

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"支持全球主要货币清算系统的设计和实现";邵冠军;《中国优秀硕士学位论文全文数据库经济与管理科学辑》;20111215;第4-5章

Also Published As

Publication number Publication date
CN106130811A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
CN106130811B (en) Data communications test method and device
US20130014084A1 (en) International Testing Platform
CN105373472B (en) A kind of method of testing and test system of the statistical accuracy based on database
CN104657274B (en) software interface test method and device
CN106570232A (en) Inspection procedure automatic generation method
CN107992519A (en) The multi-source heterogeneous data verification system and method for a kind of smart grid-oriented big data
CN103514092A (en) Method for automatic testing of software system of ATM
CN108460068A (en) Method, apparatus, storage medium and the terminal that report imports and exports
CN110083814A (en) A kind of report form generation method and device, computer readable storage medium
CN101872322A (en) Method for detecting software features on basis of system requirement model
CN106649232A (en) Method for automatically converting financial data into data capable of being understood by non-financial staff
CN101751400A (en) System and method of technical data analysis and system of patent analysis
CN106815725A (en) A kind of transaction verification method and device
CN111782117B (en) Interface display method and device, storage medium and electronic device
CN106598925A (en) Method and system for quickly generating department final statement report data
Cherchiglia et al. Flavor constraints for a vector-like quark of Nelson-Barr type
CN102707938B (en) Table-form software specification manufacturing and supporting method and device
CN110021108A (en) A kind of bill crown word number record, retroactive method and system
CN109189849A (en) A kind of standardization, the data entry method of procedure and system
CN112966482A (en) Report generation method, device and equipment
CN108459846A (en) Software cloud method for customizing and platform
CN105373473B (en) CDR accuracys method of testing and test system based on original signaling decoding
CN107767242A (en) Accounting data processing method and accounting data processing unit
CN103713997B (en) A kind of transformation relation form description and decomposition method
CN109343844A (en) A method of it is compared and is corrected based on Flex bill data

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