CN106528823B - A kind of configuration of message and output method and device - Google Patents

A kind of configuration of message and output method and device Download PDF

Info

Publication number
CN106528823B
CN106528823B CN201611027224.7A CN201611027224A CN106528823B CN 106528823 B CN106528823 B CN 106528823B CN 201611027224 A CN201611027224 A CN 201611027224A CN 106528823 B CN106528823 B CN 106528823B
Authority
CN
China
Prior art keywords
message
data item
length
type
definition
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
CN201611027224.7A
Other languages
Chinese (zh)
Other versions
CN106528823A (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.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201611027224.7A priority Critical patent/CN106528823B/en
Publication of CN106528823A publication Critical patent/CN106528823A/en
Application granted granted Critical
Publication of CN106528823B publication Critical patent/CN106528823B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of configuration of message and output methods and device.The described method includes: carrying out message configuration using XML file, the length and sequencing of each message data item are defined;According to the length and sequencing outgoing message of the message data item.The message configuration of the embodiment of the present invention and output method and device, have abandoned existing System.arraycopy mode, reduce developer's workload, and support a variety of messages, are widely used, improve development efficiency;In addition, the method that the present invention has abandoned read bit can quickly position Error Location using the method for Sequential output message, reduces mistake and search the time, reduce the message testing time, improve message testing efficiency.

Description

A kind of configuration of message and output method and device
Technical field
The present invention relates to technical field of data processing more particularly to a kind of configuration of message and output methods and device.
Background technique
Background that this section is intended to provide an explanation of the embodiments of the present invention set forth in the claims or context.Herein Description recognizes it is the prior art not because not being included in this section.
Currently used message configuration method is all to assemble message using System.arraycopy method, there is Technology is complicated, is easy the disadvantages of error, inefficiency.
By taking following assembling message operation as an example:
System.arraycopy (retBytes, msgCdeOffset, msgCde, msgCdeStart, msgCdeLength);// by first 9 of backstage return code it is put into byte arrays;
RetBytes is source byte arrays message, and msgCdeOffset is the position that source byte arrays start interception, MsgCde is target byte array message, and msgCdeStart is the position that target byte array starts, and msgCdeLength is to want The length of interception.
The meaning of the method for System.arraycopy above is, from the msgCdeOffset of byte arrays retBytes Position starts, and intercepts the byte of msgCdeLength length, is put into the starting position msgCdeStart of msgCde byte arrays.
The method of this assembling message is sufficiently complex, and operation is also troublesome, is very easy in the use of developer Mistake, and doing over again for developer is easily caused, because message is all one one assembling, if intermediate any one Since error, will be checked, item by item debug doing, problematic if it is first item, then all message items are all It rewrites one time.
In addition, current message test method is also very original, expend the physical strength of developer, waste developer when Between.By taking following 5 message contents as an example, 123.56 yuan of Payment Amount, message format is as shown in table 1 below:
Table 1
Message data item-parameter Length Message data item-meaning Data type Remarks
payerAcct 9(17) Payment account number Numeric type
payeeAcct 9(17) Shroff account number Numeric type
currency X(3) Payment currency type Character type CNY
tranAmount 9(15) Payment Amount Amount of money type
tranDate X(10) The date of payment Date type yyyy-MM-dd
It is as follows to send message content:
0000010111234567800000101356789012CNY000000000123562016-03-21
If the 4th Payment Amount message is wrong, developer in investigation, according to the length of message data item into Row read bit is checked one by one:
Payment account number 17: 00000101112345678
Shroff account number 17: 00000101356789012
Payment currency type 3: CNY
Payment Amount 15: 000000000123562
The date of payment 10: 016-03-21
It being operated by read bit, the discovery date has lacked 1, and the message of the amount of money is not also right, by comparing 123.56 yuan of the amount of money, hair The down payment amount of money has lacked one 0.
Therefore, the position of message error how is quickly positioned, and message is fast and efficiently tested, and is badly in need of The big problem solved.
Summary of the invention
The present invention provides a kind of configuration of message and output method, to solve existing System.arraycopy method band The drawback come.
To solve the above-mentioned problems, the embodiment of the present invention provides a kind of configuration of message and output method, comprising:
Message configuration is carried out using XML file, defines the length and sequencing of each message data item;According to the report The length and sequencing outgoing message of literary data item.
Further, in one embodiment, message configuration is carried out using XML file, defines the length of each message data item Degree and sequencing, comprising: define heading and message body respectively using XML file;Use different keyword definition message numbers According to the data type of item;According to the data type composition data of the heading, message body and message data item after definition Stream.
Further, in one embodiment, heading and message body are defined respectively using XML file, comprising: described in definition Heading, including define message length, transaction code and product information;The message body is defined, including fixed according to the transaction code The length and sequencing of adopted message data item.
Further, in one embodiment, using the data type of different keyword definition message data items, comprising: make With the data type of String keyword definition message data item, then the message data item just assembles message according to character type; Using the data type of Number keyword definition message data item, then the message data item is just assembled according to numeric type and is reported Text;Using the data type of Date keyword definition message data item, then the message data item is just assembled according to date type and is reported Text, and the mode defined according to pattern is formatted date data item;Use Amount keyword definition message number According to the data type of item, then the message data item just assembles message, and the mode defined according to decimal according to amount of money type Increase value data item or subtract decimal point.
Further, in one embodiment, according to the length and sequencing outgoing message of the message data item, packet It includes: the debug attribute that message format defines factory transformFactory being arranged to true, then according to the message data The length and sequencing outgoing message of item.
To solve the above-mentioned problems, the embodiment of the present invention also provides a kind of configuration of message and output device, comprising: message is matched Module is set, for carrying out message configuration using XML file, defines the length and sequencing of each message data item;Export mould Block, for the length and sequencing outgoing message according to the message data item.
Further, in one embodiment, the message configuration module is used to carry out message configuration using XML file, fixed The length and sequencing of each message data item of justice, specifically include: message format definition unit, for using XML file Heading and message body are defined respectively;Dtd--data type definition unit, for using the number of different keyword definition message data items According to type;Data flow component units, for the data class according to the heading, message body and message data item after definition Type composition data stream.
Further, in one embodiment, the message format definition unit is used to define message respectively using XML file Head and message body, specifically include: heading definition unit, for defining the heading, including definition message length, transaction Code and product information;Message body definition unit defines message data for defining the message body, including according to the transaction code The length and sequencing of item.
Further, in one embodiment, the dtd--data type definition unit is used to use different keyword definition messages The data type of data item, comprising: using the data type of String keyword definition message data item, then the message data Item just assembles message according to character type;Using the data type of Number keyword definition message data item, then the message number Message just is assembled according to numeric type according to item;Using the data type of Date keyword definition message data item, then the message number Message just is assembled according to date type according to item, and the mode defined according to pattern is formatted date data item;It uses The data type of Amount keyword definition message data item, then the message data item just assembles message according to amount of money type, and And the mode defined according to decimal increases value data item or subtracts decimal point.
Further, in one embodiment, the output module is used for according to the length of the message data item and successively Sequential output message, comprising: the debug attribute that message format defines factory transformFactory is arranged to true, then According to the length and sequencing outgoing message of the message data item.
The message configuration of the embodiment of the present invention and output method and device, have abandoned the existing side System.arraycopy Formula reduces developer's workload, and supports a variety of messages, is widely used, improves development efficiency;In addition, the present invention is got rid of The method for having abandoned read bit can quickly position Error Location using the method for Sequential output message, reduce mistake and search the time, The message testing time is reduced, message testing efficiency is improved.
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 skilled in the art without any creative labor, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is message configuration and the process flow diagram of output method of the embodiment of the present invention;
Fig. 2 is message configuration and the structural schematic diagram of output device of the embodiment of the present invention;
Fig. 3 is the structural schematic diagram of the message configuration module in embodiment illustrated in fig. 2.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Those skilled in the art will understand that embodiments of the present invention can be implemented as a kind of system, device, equipment, Method or computer program product.Therefore, the present disclosure may be embodied in the following forms, it may be assumed that complete hardware, complete soft The form that part (including firmware, resident software, microcode etc.) or hardware and software combine.
Below with reference to several representative embodiments of the invention, the principle and spirit of the present invention are explained in detail.
Message configuration proposed by the present invention and the main thought of output method are: message configuration is carried out using XML file, The length and sequencing of each message data item are defined in XML file, message definition is clear, simple;To different data class Type defines different keywords, supports the data item such as character type, numeric type, date type, amount of money type, uses include key Word, heading and message body can define respectively, and message configuration is convenient, can greatly reduce the workload of developer, reduce artificial Labour;Also, the present invention support fixed length message, elongated message, XML message, 8583 messages, mixing message (fixed length+elongated+ XML configuration and test), covering scope is wide, and developer can be helped to carry out the configuration and test of various messages, improves exploitation Efficiency.
In addition, the technology of sequence printing message configuration item provided by the invention, the sequencing that can be defined according to message Message is printed with length, it is open-and-shut that developer is allowed to see all message items, it can quickly position error message The efficiency of message test is improved in position.Therefore, if to the correctness of message, there are queries between two systems, on message Mistake is sent, the present invention can provide the message of transmission, and it is abnormal for the message received, it can parse the message received, in technology Conceptual level defines interface and carries out technical identification.When that can not obtain the detailed test information such as debug, the present invention can be surveyed Examination, the exception for examining production message (the problem of message abnormal ending, message overlength, message dislocation, message data item are illegal).
Fig. 1 is message configuration and the process flow diagram of output method of the embodiment of the present invention.As shown in Figure 1, comprising:
Step S101 carries out message configuration using XML file, defines the length and sequencing of each message data item; Step S102, according to the length and sequencing outgoing message of the message data item.
In step S101 in the present embodiment, message configuration is carried out using XML file, defines each message data item Length and sequencing, comprising: step S1011 defines heading and message body using XML file respectively;Step S1012, makes With the data type of different keyword definition message data items;Step S1013, according to the heading, the message body after definition And the data type composition data stream of message data item.
Wherein, there is no sequencing relationships, two steps may be performed simultaneously by step S1011 and step S1012.
In step S1011 in the present embodiment, heading and message body are defined respectively using XML file, comprising: definition The heading, including define message length, transaction code and product information;And the message body is defined, including according to Transaction code defines the length and sequencing of message data item.
General System can all define heading and message body, and heading generally comprises message length, transaction code, product information Etc. public informations, message body include information of some specific transaction.
By taking following heading defines file DemoFormatPacket.xml as an example, heading is defined, such as 2 institute of table Show, including message length+transaction code, and message body is defined, with specific reference to transaction code difference:
Table 2
In message configuration above, DATA_LEN represents message length, and program can calculate transaction code length+message body Length is put into the corresponding data field of DATA_LEN, and TRAN_CODE represents transaction code, when transaction code is D0002, is passed through Include keyword and prefix DemoFormat will find message body and define file DemoFormatD0002.xml, DemoFormatD0002.xml is that message body defines file, has corresponded to D0002 transaction:
In XML message configuration file above, " above message format being sent to define " of corresponding following table 3, program is first Heading DemoFormatPacket.xml configuration file is read, message body DemoFormatD0002.xml message is then read Configuration file defines the sequencing and length of message data item, program is according to message data item in two configuration files Sequencing and length assemble message, or by taking following 5 message contents as an example, 123.56 yuan of Payment Amount.
Table 3
Message data item-parameter Length Message data item-meaning Data type Remarks
payerAcct 9(17) Payment account number Numeric type
payeeAcct 9(17) Shroff account number Numeric type
currency X(3) Payment currency type Character type CNY
tranAmount 9(15) Payment Amount Amount of money type
tranDate X(10) The date of payment Date type yyyy-MM-dd
It is as follows to assemble message according to the definition of XML file for program:
If one of them are changed, as long as modification XML file configuration, simple and easy, developer is also easy In understanding, the efficiency of exploitation is greatly improved.By taking the amount of money becomes 16 as an example:
In step S1012 in the present embodiment, the data type of different keyword definition message data items is used, it may be assumed that To different data types, different keywords is defined, the number such as character type, numeric type, date type, amount of money type is supported in the present invention According to item.
1, character type is String keyword, and either elongated or fixed length defines, as long as comprising String keyword, This data item just assembles message according to character type;
2, numeric type is Number keyword, and either elongated or fixed length defines, as long as comprising Number keyword, This data item just assembles message according to numeric type, if data item content is nonnumeric type, program, which will report an error, prompts exploitation Personnel;
3, date type is Date keyword, and either elongated or fixed length defines, as long as comprising Date keyword, this Data item just assembles message according to date type, and the mode defined according to pattern can carry out format to date data item Change;
4, amount of money type is Amount keyword, and either elongated or fixed length defines, as long as comprising Amount keyword, This data item just assembles message according to amount of money type, and the mode defined according to decimal can increase value data item Or subtract decimal point.
In the step S1013 of the present embodiment, complete to postpone matching for heading, message body and data item, then according to fixed The data type composition data stream of the heading, message body and message data item after justice.
The present invention supports fixed length message, elongated message, XML message, 8583 messages, mixing message (fixed length+elongated+XML).
1, fixed length Message processing
Fixed length message as its name suggests be exactly message length be it is fixed, not because each transaction content variation message it is long It spends and changes.Such as interface is defined as follows shown in table 4, input:
Table 4
The message then generated is as follows:
0057D0001F1234567890 R1234567890 CNY000000000010000
After account and amount of money variation, message length is constant:
0057D0001F2345678901 R1234567890 CNY000000000020000
The advantages of fixed length message be format fix, length it is controllable, the disadvantage is that the redundancies such as space can be generated, waste communication is empty Between.
Setting for fixed length message is all to be started in XML file with fix, for example, < fixStringname=" PayerAcct " length=" 17 "/> the account message of 17 regular lengths is represented, program reads the definition of XML file, if FixString is encountered just according to fixed length Message processing.
2, elongated Message processing
Elongated message is exactly that the variation message length of each transaction content can change.There are two types of forms for elongated message, a kind of It is that each data item defines length and content, another is that separators are used between data item.
The message of the first form is as follows:
0051005D0001010F1234567890010R1234567890003CNY005010000
The message of second of form is as follows:
0041$D0001$F1234567890$R1234567890$CNY$010000
The advantages of elongated message, is that format is flexible, saves data space, the disadvantage is that the content to message is uncontrollable.
Setting for elongated message is all to be started in XML file with var, for example, < varStringname=" KEY " type=" LL "></varString>the elongated message indicated with two tens is represented, [0512345] indicates that KEY is The message received, 05 represents the length of message, and 12345 indicate the value of KEY, and program reads the definition of XML file, if encountered VarString is just according to elongated Message processing.
3, XML message is handled
XML message is exactly that the content of message is XML document format.
Setting for XML message is all to be started in XML file with xmlTag, for example, < < xmlTagformat =" true "><number name="AC_CNT"length="4"option="false"></Number></xmlTag> Representing this message data item will be assembled according to XML message standard, and assembling form is numeric type, and the name of xmlTag is AC_CNT is after assembling<aC_CNT>0123456789</AC_CNT>;Program reads the definition of XML file, if encountered XmlTag is just handled according to XML message.
<xmlTag format=" true ">
<number name="AC_CNT"length="4"option="false"></Number>
</xmlTag><!-- customer ID -- >
It is upper send data when, it may appear that the case where above sending XML file format data, data by XML reference format define, The front and back of message increases the definition of XML message head and XML message tail, and XML message is defined as follows:
XML message head definition+XML message body definition+XML message tail definition.
4, ISO8583 Message processing
Setting for iso8583 message is all to be started in XML file with iso8583Fields, such as following report Text definition, bitMap defines which domain that this section of message includes 8583 messages, in the subset that iso8583Fields is defined Just define the specific format in each 8583 message domain.
7,39,63,70 " beginOffset=" 0 " of<iso8583Fields bitMap=">
Foregoing represents such message as ISO8583 message, and the BITMAP for including is 4 equal for 7,39,63,70;
<!-- 7-Transmission Date&Time N10 (MMDDhhmmss) exchange hour -- >
<fixBullBCD name="TIME"length="10"></fixBullBCD>
Foregoing represents this message as the 7th domain in ISO8583 message, is 10 time data item;
</iso8583Fields>
5, Message processing is mixed
It is exactly the data that Baffle baffle system treasured receives for mixing the processing setting of message (fixed length+elongated+XML) It is divided into heading and message body two parts, the message format of heading and packet problem can be different, their combination can be with Are as follows: 1) heading (fixed length message)+message body (elongated message);2) heading (fixed length message)+message body (XML message);1) Heading (elongated message)+message body (XML message).
In step S103 in the present embodiment, according to the length and sequencing outgoing message of the message data item, Its method are as follows: the debug attribute that message format defines factory transformFactory is arranged to true, so that it may support suitable Sequence prints the contents such as message configuration item and message length:
<transformerFactory id=" TransformerFactory ">
<param name="debug">true</param>
</transformerFactory>
The present invention proposes the technology of supplied Sequential output message configuration item, can be according to the sequencing and length that message defines Degree printing message, it is open-and-shut that developer is allowed to see all message items, the position of error message can be quickly positioned, Improve the efficiency of message test.
Program can read debug flag bit, and if it is true, program will define successive suitable according to XML configuration file Sequence and length the outgoing message content on console are as follows:
In test or production environment, often outgoing message content, the content without exporting each message configuration item.Such as To the correctness of message, there are queries between fruit two systems, and for message up sending mistake, the present invention can provide the message of transmission, It is abnormal for the message received, it can parse the message received.When the detailed test information such as debug can not be obtained, as long as mentioning For message content, the present invention can quickly position illegal data item.
Message is had sent for client, server end also has received message, but server end returned packet is illegally wrong Accidentally, client will provide the message of transmission to server end, and quickly position illegal data item.
For example, it is as follows to provide message content:
The present invention is defined as follows according to message:
Test packet data item is as follows:
Two such system can be checked according to the output result of test, find out position and the report of error rapidly Literary data item.
The present invention can also test, examine the exception (such as the problem of message abnormal ending, message overlength) of production message.
Because the present invention understands outgoing message length, as long as the length that the message length of output and message define is carried out pair Than, so that it may the problem of finding message abnormal ending, message overlength.
Such as message is defined as follows, normal length should be changed to 67, as shown in table 5 below:
Table 5
Outgoing message is as follows:
sendDatas:0068D00020000010111234567800000101356789012CNY000000000001 23562016-03-21;Message length is 0068, illustrates message overlength.
It should be noted that although describing the operation of the method for the present invention in the accompanying drawings with particular order, this is not required that Or hint must execute these operations in this particular order, or have to carry out operation shown in whole and be just able to achieve the phase The result of prestige.Additionally or alternatively, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/or will One step is decomposed into execution of multiple steps.
After describing the method for exemplary embodiment of the invention, next, with reference to Fig. 2 to the exemplary reality of the present invention The message configuration and output device for applying mode are introduced.The implementation of the device may refer to the implementation of the above method, repetition Place repeats no more.Term " module " used below and " unit " can be the software and/or hardware for realizing predetermined function. Although module described in following embodiment is preferably realized with software, the combination of hardware or software and hardware Realize to be also that may and be contemplated.
Fig. 2 is message configuration and the structural schematic diagram of output device of the embodiment of the present invention.As shown in Figure 2, comprising:
Message configuration module 101 defines the length of each message data item for carrying out message configuration using XML file And sequencing;Output module 102, for the length and sequencing outgoing message according to the message data item.
Further, in the present embodiment, as shown in figure 3, the message configuration module 101 be used for using XML file into The configuration of row message, defines the length and sequencing of each message data item, specifically includes:
Message format definition unit 1011, for defining heading and message body respectively using XML file;
Dtd--data type definition unit 1012, for using the data type of different keyword definition message data items;
Data flow component units 1013, for according to the heading, message body and the message data item after definition Data type composition data stream.
Further, in the present embodiment, the message format definition unit 1011 is used to define respectively using XML file Heading and message body, specifically include: heading definition unit, for defining the heading, including define message length, Transaction code and product information;And message body definition unit, it is defined for defining the message body, including according to the transaction code The length and sequencing of message data item.
Further, in the present embodiment, the dtd--data type definition unit 1012 is used to use different keyword definitions The data type of message data item, comprising: using the data type of String keyword definition message data item, then the message Data item just assembles message according to character type;Using the data type of Number keyword definition message data item, then the report Literary data item just assembles message according to numeric type;Using the data type of Date keyword definition message data item, then the report Literary data item just assembles message according to date type, and the mode defined according to pattern is formatted date data item; Using the data type of Amount keyword definition message data item, then the message data item is just assembled according to amount of money type and is reported Text, and the mode defined according to decimal increases value data item or subtracts decimal point.
Further, in the present embodiment, the output module 103 is used for length and elder generation according to the message data item Sequential output message afterwards, comprising: the debug attribute that message format defines factory transformFactory is arranged to true, Then according to the length and sequencing outgoing message of the message data item.
The message configuration and output method that the embodiment of the present invention proposes, carry out message configuration using XML file, in XML text The length and sequencing of each message data item are defined in part, message definition is clear, simple;It is fixed to different data types The different keyword of justice, supports the data item such as character type, numeric type, date type, amount of money type, uses include keyword, message Head and message body can define respectively, and message configuration is convenient, can greatly reduce the workload of developer, reduce hand labor;And And the present invention supports fixed length message, elongated message, XML message, 8583 messages, the configuration for mixing message (fixed length+elongated+XML) And test, covering scope is wide, and developer can be helped to carry out the configuration and test of various messages, improves development efficiency.In addition, The method of sequence printing message configuration item provided by the invention can print report according to the sequencing and length that message defines Text, it is open-and-shut that developer is allowed to see all message items, the position of error message can be quickly positioned, message is improved The efficiency of test.
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.
Specific embodiment is applied in the present invention, and principle and implementation of the present invention are described, above embodiments Explanation be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, According to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion in this specification Appearance should not be construed as limiting the invention.

Claims (6)

1. a kind of message configuration and output method characterized by comprising
Message configuration is carried out using XML file, defines the length and sequencing of each message data item;
According to the length and sequencing outgoing message of the message data item;
Wherein, message configuration is carried out using XML file, defines the length and sequencing of each message data item, comprising:
Define heading and message body respectively using XML file, wherein define the heading, including define message length, hand over Easy code and product information, define the message body, including defining the length of message data item and successively suitable according to the transaction code Sequence;
Use the data type of different keyword definition message data items;
According to the data type composition data stream of the heading, message body and message data item after definition;
The length and sequencing that message data item is defined according to the transaction code, comprising:
Determine that message body defines file according to the transaction code.
2. message configuration according to claim 1 and output method, which is characterized in that use different keyword definition messages The data type of data item, comprising:
Using the data type of String keyword definition message data item, then the message data item is just assembled according to character type Message;
Using the data type of Number keyword definition message data item, then the message data item is just assembled according to numeric type Message;
Using the data type of Date keyword definition message data item, then the message data item is just assembled according to date type and is reported Text, and the mode defined according to pattern is formatted date data item;
Using the data type of Amount keyword definition message data item, then the message data item is just assembled according to amount of money type Message, and the mode defined according to decimal increases value data item or subtracts decimal point.
3. message configuration according to claim 1 and output method, which is characterized in that according to the length of the message data item Degree and sequencing outgoing message, comprising:
The debug attribute that message format defines factory transformFactory is arranged to true, then according to the message number According to the length and sequencing outgoing message of item.
4. a kind of message configuration and output device characterized by comprising
Message configuration module, for using XML file carry out message configuration, define each message data item length and successively it is suitable Sequence;
Output module, for the length and sequencing outgoing message according to the message data item;
The message configuration module is used to carry out message configuration using XML file, defines length and the elder generation of each message data item Sequence afterwards, specifically includes:
Message format definition unit, for defining heading and message body respectively using XML file;
Dtd--data type definition unit, for using the data type of different keyword definition message data items;
Data flow component units, for the data type according to the heading, message body and message data item after definition Composition data stream;
The message format definition unit is used to define heading and message body respectively using XML file, specifically includes:
Heading definition unit, for defining the heading, including definition message length, transaction code and product information;
Message body definition unit, for defining the message body, the length including defining message data item according to the transaction code And sequencing;The length and sequencing that message data item is defined according to the transaction code, comprising: according to the transaction Code determines that message body defines file.
5. message configuration according to claim 4 and output device, which is characterized in that the dtd--data type definition unit is used In the data type using different keyword definition message data items, comprising:
Using the data type of String keyword definition message data item, then the message data item is just assembled according to character type Message;
Using the data type of Number keyword definition message data item, then the message data item is just assembled according to numeric type Message;
Using the data type of Date keyword definition message data item, then the message data item is just assembled according to date type and is reported Text, and the mode defined according to pattern is formatted date data item;
Using the data type of Amount keyword definition message data item, then the message data item is just assembled according to amount of money type Message, and the mode defined according to decimal increases value data item or subtracts decimal point.
6. message configuration according to claim 4 and output device, which is characterized in that the output module is used for according to institute State the length and sequencing outgoing message of message data item, comprising:
The debug attribute that message format defines factory transformFactory is arranged to true, then according to the message number According to the length and sequencing outgoing message of item.
CN201611027224.7A 2016-11-18 2016-11-18 A kind of configuration of message and output method and device Active CN106528823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611027224.7A CN106528823B (en) 2016-11-18 2016-11-18 A kind of configuration of message and output method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611027224.7A CN106528823B (en) 2016-11-18 2016-11-18 A kind of configuration of message and output method and device

Publications (2)

Publication Number Publication Date
CN106528823A CN106528823A (en) 2017-03-22
CN106528823B true CN106528823B (en) 2019-08-30

Family

ID=58352777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611027224.7A Active CN106528823B (en) 2016-11-18 2016-11-18 A kind of configuration of message and output method and device

Country Status (1)

Country Link
CN (1) CN106528823B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110633214B (en) * 2019-09-19 2023-12-08 中国银行股份有限公司 Configuration method and device for internal test message
CN111049813B (en) * 2019-12-04 2022-07-12 中国银行股份有限公司 Message assembling method, message analyzing method, message assembling device, message analyzing device and storage medium
CN112187761B (en) * 2020-09-22 2022-12-13 中国建设银行股份有限公司 Message parsing method, message construction method, message parsing device, message construction device, computer equipment and storage medium
CN114040008A (en) * 2021-11-05 2022-02-11 光大科技有限公司 Message processing method and device
CN115190055A (en) * 2022-07-08 2022-10-14 武汉众邦银行股份有限公司 TCP message customized conversion method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697546A (en) * 2009-10-30 2010-04-21 南京中兴软创科技股份有限公司 Method for implementing protocol data unit (PDU) used for packing and unpacking network bytes
US8392561B1 (en) * 2008-06-20 2013-03-05 Arrayent, Inc. Wireless internet product system
CN104572122A (en) * 2015-01-28 2015-04-29 中国工商银行股份有限公司 Software application data generating device and method
CN106027330A (en) * 2016-05-23 2016-10-12 中国银行股份有限公司 Message testing method for front-end system, and simulation baffle system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8392561B1 (en) * 2008-06-20 2013-03-05 Arrayent, Inc. Wireless internet product system
CN101697546A (en) * 2009-10-30 2010-04-21 南京中兴软创科技股份有限公司 Method for implementing protocol data unit (PDU) used for packing and unpacking network bytes
CN104572122A (en) * 2015-01-28 2015-04-29 中国工商银行股份有限公司 Software application data generating device and method
CN106027330A (en) * 2016-05-23 2016-10-12 中国银行股份有限公司 Message testing method for front-end system, and simulation baffle system

Also Published As

Publication number Publication date
CN106528823A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN106528823B (en) A kind of configuration of message and output method and device
CN105808437B (en) Automatic test method and system based on test case data sheet
CN105608088B (en) A kind of database based on configuration file automatically creates and data dynamic recording method
CN110032575A (en) Data query method, apparatus, equipment and storage medium
US6859810B2 (en) Declarative specification and engine for non-isomorphic data mapping
CN109889375A (en) Service message method of calibration, device and computer storage medium
CN106503268B (en) Data comparison methods, devices and systems
CN109408247A (en) Interaction data processing method and device
CN108958959A (en) The method and apparatus for detecting hive tables of data
CN112070608B (en) Information processing method, device, medium and electronic equipment
CN107506190A (en) XML file amending method and device based on Spring frameworks
CN110489087A (en) A kind of method, apparatus, medium and electronic equipment generating fractal structure
JP2012113706A (en) Computer-implemented method, computer program, and data processing system for optimizing database query
CN103631783B (en) A kind of generation method and system of front end page
US20080313291A1 (en) Method and apparatus for encoding data
CN109783565A (en) A kind of method and system that excel data quickly introduce
CN111078276B (en) Application redundant resource processing method, device, equipment and storage medium
US8904354B2 (en) Rule based syntax software test case generator
CN105824647A (en) Form page generating method and device
CN102375859B (en) Method and equipment for processing information
CN109828759A (en) Code compiling method, device, computer installation and storage medium
CN111143228B (en) Test code generation method and device based on decision table method
US8819645B2 (en) Application analysis device
CN108875374A (en) Malice PDF detection method and device based on document node type
CN111125264B (en) Extra-large set analysis method and device based on extended OLAP model

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant