CN108055266A - A kind of method and system of 8583 data message of parsing based on position offset - Google Patents
A kind of method and system of 8583 data message of parsing based on position offset Download PDFInfo
- Publication number
- CN108055266A CN108055266A CN201711348777.7A CN201711348777A CN108055266A CN 108055266 A CN108055266 A CN 108055266A CN 201711348777 A CN201711348777 A CN 201711348777A CN 108055266 A CN108055266 A CN 108055266A
- Authority
- CN
- China
- Prior art keywords
- data
- message
- bitmap
- position offset
- lenbitmap
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of methods of 8583 data message of parsing based on position offset, include the following steps:(1)Read heading, the length of analytic message;(2)Bitmap data is read, the presence or absence of each data element is judged according to bitmap data, data element index is established for message, determines the position offset of each data element in message;(3)According to the position offset of each data element in bitmap data and message, the data content of each data element in outgoing packet is parsed.The present invention also proposes a kind of 8583 data message resolution systems of ISO.By the present invention in that the concept with bitmap, establish the mode of data element positions offset and conversion ascii character, in the case where not destroying original message data structural integrity, the analyzing efficiency and bandwagon effect of ISO8583 data messages are improved, is brought convenience to the parsing of 8583 data messages.
Description
Technical field
The present invention relates to a kind of methods of 8583 data message of parsing based on position offset, belong to computer science basis
Technical field.
Background technology
ISO8583 Transaction Information specifications are based on financial transaction electronic information exchange standard between multiple grids, foundation
" ATM/POS/ Unionpay front-end system engineering overall plan " is to being related between the self-service devices such as ATM/POS front-end systems and ATM
Financial class transaction, the transaction of agent service class summarize service class transaction, the transaction of related management class, the transaction of remote control class etc.
Interface carried out specification.Under the unified constraint for the interface that can be converted into exchanging between progress grid in information, each system
Designer can enjoy corresponding flexibility.
Since ISO8583 has the characteristics that such, it is widely adopted as merchandising between different system network by each bank
Standard.ISO8583's widely uses, and the transaction between cross-system provides a standard and general definition, makes to merchandise between net
It is possibly realized.
But the flexibility defined due to ISO8583 data messages and the concept for having used bitmap so that program designer
It is inconvenient that some are brought in the use of ISO8583 data messages.Such as the presence of ISO8583 message datas member is by bitmap
Each decision so that the length and content of each ISO8583 message are likely to difference, and each data element exists
Deviation post is also different in message, and inconvenience is brought using data metadata to program.Have in ISO8583 messages
Data element is with Bit definition, and there are non-ascii characters, when the storage of these messages is inquired about in the database, meeting
Make screen clutter or can not show, the generation of the last MAC verification datas member of message is relatively difficult.
The content of the invention
The technical problems to be solved by the invention are:Solve existing ISO8583 message datas member deviation post do not know to
The problem of read-write is brought proposes a kind of method of 8583 data message of parsing based on position offset.
The present invention uses following technical scheme to solve above-mentioned technical problem:
The present invention proposes a kind of method of 8583 data message of parsing based on position offset, comprises the following steps:
(1)Read heading, the length of analytic message;
(2)Bitmap data is read, the presence or absence of each data element is judged according to bitmap data, establishes data element index for message, really
Determine the position offset of each data element in message;
(3)According to the position offset of each data element in message, the data content of each data element in outgoing packet is parsed.
Further, the method for a kind of 8583 data message of parsing based on position offset of the present invention, step(1)
In analytic message length, location boundary is established, beyond data area during for preventing offset.
Further, the method for a kind of 8583 data message of parsing based on position offset of the present invention, step(1)
In further include:Transaction journal number is obtained, which refers to the transaction journal number of transaction initiator's distribution, initiated by message
Side is inserted.
Further, the method for a kind of 8583 data message of parsing based on position offset of the present invention, step(2)
Specially:
(201)Read bitmap data, by function GetBitMapChart (char* pRealData, char bitMap [16],
Int lenBitMap) bitmap data is obtained, wherein pRealData is message data, and data are stored in bitMap [16], and
According to the first of status of a sovereign figure to determine whether having second bitmap and setting bitmap lengths lenBitMap;
(202)According to the bitmap data bitMap [16] and bitmap lengths lenBitMap of acquisition, using function SetBitFlag
(int bitFlag [lenBitMap]) sets the value bitFlag [lenBitMap] of bitmap mark corresponding with data element, often
The value of position indicates whether the domain occurs in messages:If a position is 0, associated domain is not present in message;If
One position is 1, and associated domain occurs in messages;
(203)Message position offset is established, it is inclined according to the length of member that the arrLength that defines arrays [lenBitMap] stores bits per inch
It moves.
Further, the method for a kind of 8583 data message of parsing based on position offset of the present invention, step(3)
Specially:
(301), take out data metamessage, using function AccquireData (char* pRealData, char* pStrData,
Int lenBitMap) according to message position offset, the data metadata that specified domain number is taken out in ISO8583 messages is stored in
In pStrData;
(302), the hexadecimal data stored in pStrData is converted into ascii character.
Further, the method for a kind of 8583 data message of parsing based on position offset of the present invention, it is entire to report
The length of text including the two bytes of message length, is not represented using hexadecimal number.
Further, the method for a kind of 8583 data message of parsing based on position offset of the present invention, a report
In text there are one or two bitmaps, be respectively status of a sovereign figure and secondary bitmap, be both made of 64 binary digits.
The present invention also proposes a kind of 8583 data message resolution systems, including:
Packet parsing module, for reading heading, the length of analytic message;
Position offset index module for reading bitmap data, judges the presence or absence of each data element according to bitmap data, is message
Data element index is established, determines the position offset of each data element in message;
Data element parsing module for the position offset according to each data element in message, parses every number in outgoing packet
According to the data content of member.
Further, the present invention 8583 data message resolution system of one kind set forth above, position offset index module tool
Body includes:
Bitmap analysis unit for reading bitmap data, passes through function GetBitMapChart (char* pRealData, char
BitMap [16], int lenBitMap) bitmap data is obtained, wherein pRealData is message data, and data are stored in
In bitMap [16], and according to first of status of a sovereign figure to determine whether having second bitmap and setting bitmap lengths
lenBitMap;
Data element indexing units, for the bitmap data bitMap [16] and bitmap lengths lenBitMap according to acquisition, using letter
Number SetBitFlag (int bitFlag [lenBitMap]) sets the value bitFlag of bitmap mark corresponding with data element
[lenBitMap], the value of every indicate whether the domain occurs in messages:If a position is 0, associated domain does not occur
In messages;If a position is 1, associated domain occurs in messages;
Message position offset unit, for storing length of the bits per inch according to member by the arrLength that defines arrays [lenBitMap]
Offset, establishes message position offset.
Further, the present invention 8583 data message resolution system of one kind set forth above, data element parsing module are specific
Including:
Data element retrieval unit, using function AccquireData (char* pRealData, char* pStrData, int
LenBitMap) according to message position offset, the data metadata that specified domain number is taken out in ISO8583 messages is stored in
In pStrData;
Converting unit, for the hexadecimal data stored in pStrData to be converted into ascii character.
The present invention uses above-mentioned technological means, compared with prior art, it is as follows to possess advantage:
The present invention proposes a kind of method for parsing ISO8583 data messages, by establishing data element positions offset and conversion ASCII
The mode of character improves the analyzing efficiency and bandwagon effect of ISO8583 data messages.Meanwhile the method for the present invention do not destroy it is original
In the case of message data structural integrity, data can fast and accurately be parsed, there is lower resource consumption, parsing
Efficiency is improved.
Description of the drawings
Fig. 1 is the ISO8583 message structures in the embodiment of the present invention.
Fig. 2 is the ISO8583 message header structures in the embodiment of the present invention.
Fig. 3 is the ISO8583 bitmap structures in the embodiment of the present invention.
Specific embodiment
Technical scheme is described in further detail below in conjunction with the accompanying drawings:
Those skilled in the art of the present technique are it is understood that unless otherwise defined, all terms used herein(Including technology art
Language and scientific terminology)With the identical meaning of the general understanding with the those of ordinary skill in fields of the present invention.Should also
Understand, those terms such as defined in the general dictionary, which should be understood that, to be had and the meaning in the context of the prior art
The consistent meaning of justice, and unless defined as here, will not be with idealizing or the meaning of overly formal be explained.
The present invention reports the ISO8583 of Bit forms to solve the access and inquiry of ISO8583 messages in the database
Each byte conversion of text is ascii character.Operation to bitmap for convenience, provides function GetBitMapChart ()
Bitmap is taken out for each data element.The difficulty brought in order to which ISO8583 message data member deviation posts is solved not know to read-write,
Data element index is established for ISO8583 messages first, determines the deviation post of each data element in message.Pass through function
AccquireData () can be taken off the information of any data member according to message deviation post index.
Such as Fig. 1, message is made of four parts:Heading, type of message identifier, bitmap(Bit map:To represent each number
According to the presence or absence of member)And data element.The present invention devises a kind of method of 8583 data message of parsing based on position offset,
In this method resolving, resolving includes obtaining bitmap structure, establishes position offset index, obtains data metadata.
Specifically, the method for the present invention comprises the following steps:
Step 1 reads heading, analytic message length.As shown in Fig. 2, the length of entire message do not include message length this two
A byte, is represented using hexadecimal number.Transaction journal number is obtained, which refers to the transaction of transaction initiator's distribution
Serial number, by message, initiator inserts.
Step 2, read bitmap data, as shown in figure 3, in a message can there are one or two bitmaps, respectively based on
Bitmap and secondary bitmap(Both it is made of 64 binary digits).Pass through function GetBitMapChart (char*
PRealData, char bitMap [16], int lenBitMap) bitmap data is obtained, wherein pRealData is message number
According to, data are stored in bitMap [16], and according to first of status of a sovereign figure to determine whether having second bitmap and setting
Bitmap lengths lenBitMap.Char () is a function(Function), can be by the code in other types computer documents
Be converted to character.Int is in C family of languages programming languages(C, C++, C#, Java etc.)In, it is for defining the mark of integer type variable
Symbol.
Step 3, bitmap data bitMap [16] and bitmap lengths lenBitMap according to acquisition, using function
SetBitFlag (int bitFlag [lenBitMap]) sets the value bitFlag of bitmap mark corresponding with data element
[lenBitMap].The value of every indicates whether the domain occurs in messages:If a position is 0, associated domain does not occur
In messages;If a position is 1, associated domain occurs in messages.
Step 4 establishes message position offset, and the arrLength that defines arrays [lenBitMap] stores length of the bits per inch according to member
Degree offset.
Step 5 takes out data metamessage, using function AccquireData (char* pRealData, char*
PStrData, int lenBitMap) data metadata of taking-up specified domain number is stored in pStrData in ISO8583 messages
In.
The hexadecimal data stored in pStrData is converted into ascii character by step 6.
The present invention also proposes a kind of 8583 data message resolution systems, including:
Packet parsing module, for reading heading, the length of analytic message;
Position offset index module for reading bitmap data, judges the presence or absence of each data element according to bitmap data, is message
Data element index is established, determines the position offset of each data element in message;
Data element parsing module for the position offset according to each data element in message, parses every number in outgoing packet
According to the data content of member.
To sum up, the method for the present invention handles ISO8583 messages using position offset mode, and it is right in financial transaction environment to be suitble to
Data message parses.There is lower resource consumption, analyzing efficiency improves.
The above is only some embodiments of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should
It is considered as protection scope of the present invention.
Claims (10)
- A kind of 1. method of 8583 data message of parsing based on position offset, which is characterized in that comprise the following steps:(1)Read heading, the length of analytic message;(2)Bitmap data is read, the presence or absence of each data element is judged according to bitmap data, establishes data element index for message, really Determine the position offset of each data element in message;(3)According to the position offset of each data element in message, the data content of each data element in outgoing packet is parsed.
- 2. a kind of method of 8583 data message of parsing based on position offset according to claim 1, which is characterized in that Step(1)In analytic message length, location boundary is established, beyond data area during for preventing offset.
- 3. a kind of method of 8583 data message of parsing based on position offset according to claim 1, which is characterized in that Step(1)In further include:Transaction journal number is obtained, which refers to the transaction journal number of transaction initiator's distribution, by Message initiator inserts.
- 4. a kind of method of 8583 data message of parsing based on position offset according to claim 1, which is characterized in that Step(2)Specially:(201)Read bitmap data, by function GetBitMapChart (char* pRealData, char bitMap [16], Int lenBitMap) bitmap data is obtained, wherein pRealData is message data, and data are stored in bitMap [16], and According to the first of status of a sovereign figure to determine whether having second bitmap and setting bitmap lengths lenBitMap;(202)According to the bitmap data bitMap [16] and bitmap lengths lenBitMap of acquisition, using function SetBitFlag (int bitFlag [lenBitMap]) sets the value bitFlag [lenBitMap] of bitmap mark corresponding with data element, often The value of position indicates whether the domain occurs in messages:If a position is 0, associated domain is not present in message;If One position is 1, and associated domain occurs in messages;(203)Message position offset is established, it is inclined according to the length of member that the arrLength that defines arrays [lenBitMap] stores bits per inch It moves.
- 5. a kind of method of 8583 data message of parsing based on position offset according to claim 4, which is characterized in that Step(3)Specially:(301), take out data metamessage, using function AccquireData (char* pRealData, char* pStrData, Int lenBitMap) according to message position offset, the data metadata that specified domain number is taken out in ISO8583 messages is stored in In pStrData;(302), the hexadecimal data stored in pStrData is converted into ascii character.
- 6. a kind of method of 8583 data message of parsing based on position offset according to claim 1 or 2 or 4 is any, It is characterized in that, the length of entire message is represented including the two bytes of message length using hexadecimal number.
- 7. a kind of method of 8583 data message of parsing based on position offset according to claim 1 or 2 or 4 is any, It is characterized in that, in a message there are one or two bitmaps, be respectively status of a sovereign figure and secondary bitmap, both by 64 binary systems Position is formed.
- 8. a kind of 8583 data message resolution systems, which is characterized in that including:Packet parsing module, for reading heading, the length of analytic message;Position offset index module for reading bitmap data, judges the presence or absence of each data element according to bitmap data, is message Data element index is established, determines the position offset of each data element in message;Data element parsing module for the position offset according to each data element in message, parses every number in outgoing packet According to the data content of member.
- A kind of 9. 8583 data message resolution system according to claim 8, which is characterized in that position offset index module It specifically includes:Bitmap analysis unit for reading bitmap data, passes through function GetBitMapChart (char* pRealData, char BitMap [16], int lenBitMap) bitmap data is obtained, wherein pRealData is message data, and data are stored in In bitMap [16], and according to first of status of a sovereign figure to determine whether having second bitmap and setting bitmap lengths lenBitMap;Data element indexing units, for the bitmap data bitMap [16] and bitmap lengths lenBitMap according to acquisition, using letter Number SetBitFlag (int bitFlag [lenBitMap]) sets the value bitFlag of bitmap mark corresponding with data element [lenBitMap], the value of every indicate whether the domain occurs in messages:If a position is 0, associated domain does not occur In messages;If a position is 1, associated domain occurs in messages;Message position offset unit, for storing length of the bits per inch according to member by the arrLength that defines arrays [lenBitMap] Offset, establishes message position offset.
- A kind of 10. 8583 data message resolution system according to claim 9, which is characterized in that data element parsing module It specifically includes:Data element retrieval unit, using function AccquireData (char* pRealData, char* pStrData, int LenBitMap) according to message position offset, the data metadata that specified domain number is taken out in ISO8583 messages is stored in In pStrData;Converting unit, for the hexadecimal data stored in pStrData to be converted into ascii character.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711348777.7A CN108055266A (en) | 2017-12-15 | 2017-12-15 | A kind of method and system of 8583 data message of parsing based on position offset |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711348777.7A CN108055266A (en) | 2017-12-15 | 2017-12-15 | A kind of method and system of 8583 data message of parsing based on position offset |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108055266A true CN108055266A (en) | 2018-05-18 |
Family
ID=62132608
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711348777.7A Pending CN108055266A (en) | 2017-12-15 | 2017-12-15 | A kind of method and system of 8583 data message of parsing based on position offset |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108055266A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111627171A (en) * | 2020-04-28 | 2020-09-04 | 深圳壹账通智能科技有限公司 | Test message conversion method, device, equipment and medium of ATMP system |
CN113452712A (en) * | 2021-06-29 | 2021-09-28 | 上海通联金融服务有限公司 | Analytic method based on Unionpay ISO 8583 message |
CN114244917A (en) * | 2020-08-31 | 2022-03-25 | 华为技术有限公司 | Data transmission method, device and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130054468A1 (en) * | 2011-08-25 | 2013-02-28 | Platamovil International BV | System and method for conducting financial transactions |
CN103095644A (en) * | 2011-10-28 | 2013-05-08 | 中国移动通信集团公司 | Data content analytic method and data content analytic device |
CN103428080A (en) * | 2012-05-17 | 2013-12-04 | 中国银联股份有限公司 | Data unpacking and data packing method |
CN103995887A (en) * | 2014-05-30 | 2014-08-20 | 上海达梦数据库有限公司 | Bitmap index compressing method and bitmap index decompressing method |
-
2017
- 2017-12-15 CN CN201711348777.7A patent/CN108055266A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130054468A1 (en) * | 2011-08-25 | 2013-02-28 | Platamovil International BV | System and method for conducting financial transactions |
CN103095644A (en) * | 2011-10-28 | 2013-05-08 | 中国移动通信集团公司 | Data content analytic method and data content analytic device |
CN103428080A (en) * | 2012-05-17 | 2013-12-04 | 中国银联股份有限公司 | Data unpacking and data packing method |
CN103995887A (en) * | 2014-05-30 | 2014-08-20 | 上海达梦数据库有限公司 | Bitmap index compressing method and bitmap index decompressing method |
Non-Patent Citations (2)
Title |
---|
IT_ZUJUN: "8583报文解析", 《CSDN,URL:HTTPS://BLOG.CSDN.NET/U013634862/ARTICLE/DETAILS/48224779》 * |
有头发的猿: "银联ISO8583报文格式、组包和解包过程、TPDU、位图计算", 《CSDN,URL:HTTPS://BLOG.CSDN.NET/QQ_33750826/ARTICLE/DETAILS/53740432》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111627171A (en) * | 2020-04-28 | 2020-09-04 | 深圳壹账通智能科技有限公司 | Test message conversion method, device, equipment and medium of ATMP system |
CN114244917A (en) * | 2020-08-31 | 2022-03-25 | 华为技术有限公司 | Data transmission method, device and system |
CN114244917B (en) * | 2020-08-31 | 2023-06-02 | 华为技术有限公司 | Data transmission method, device and system |
CN113452712A (en) * | 2021-06-29 | 2021-09-28 | 上海通联金融服务有限公司 | Analytic method based on Unionpay ISO 8583 message |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Goodrich et al. | Implementation of an authenticated dictionary with skip lists and commutative hashing | |
CN109086046A (en) | A kind of front-end code automatic generation method and system based on interface specification document | |
CN108055266A (en) | A kind of method and system of 8583 data message of parsing based on position offset | |
CN104982011A (en) | Document classification using multiscale text fingerprints | |
CN107231337B (en) | Verification method and device applied to financial messages | |
CN106534164B (en) | Effective virtual identity depicting method based on cyberspace user identifier | |
WO2007080642A1 (en) | Sheet slip processing program and sheet slip program device | |
US8595828B2 (en) | Computer resource verifying method and computer resource verifying program | |
CN109492382B (en) | Single input box login verification method | |
CN102045268A (en) | Method and device for recovering email data | |
CN102521356A (en) | Regular expression matching equipment and method on basis of deterministic finite automaton | |
CN106296381A (en) | A kind of block chain realizes the method that in process of exchange, tax revenue calculates | |
CN103929499A (en) | Internet of things heterogeneous identification recognition method and system | |
CN107025214A (en) | Data processing method and device | |
CN101116349A (en) | Context cognizance enhancing message transform system, and method for the same | |
CN108572948B (en) | Doorplate information processing method and device | |
CN110070361A (en) | Contract based on block chain deposits card method, equipment and storage medium | |
CN111444270B (en) | Method and system for controlling harmful information based on block chain | |
CN113806782A (en) | Ciphertext judgment method, system and equipment based on transfer matrix | |
CN104899213A (en) | Method and device for resolving organization names | |
CN109739822A (en) | Message storage method, device, equipment and storage medium | |
CN113282662B (en) | Block information processing method, device, equipment and medium | |
CN117170656B (en) | Low-code business form design system based on data visualization | |
CN115439118B (en) | Digital certificate storage management method based on blockchain | |
WO1997016779A2 (en) | Input security and transactions unit and process for input security and transactions involving digital information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180518 |