A network transmission data filtering system and method
By designing a network transmission data filtering system, the credit card system has solved the problems of low system scalability and high maintenance costs in various transaction scenarios, and achieved flexible processing of 8583, XML and HTTPS format messages, reducing maintenance Cost and improve development efficiency.
Patent Information
- Application Number
- CN202211476582.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-11-23
AI Technical Summary
Under the traditional method, the credit card system needs to develop multiple pre-systems to connect to different transaction scenarios, resulting in low system scalability and high maintenance costs, and the inability to effectively support multiple message formats.
Design a network transmission data filtering system, including a message receiving module, an Nginx server, an HTTP format message processing module and a protocol codec processor, which can receive and parse request messages in 8583, XML and HTTPS formats, perform bidirectional authentication and Format conversion, forming decoded logs and internal messages, and handling financial and non-financial services.
It improves the scalability of the system, reduces maintenance costs, facilitates post-maintenance and development, and realizes flexible processing of multiple message formats.
Smart Images

Figure CN115834423B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of message processing, and in particular to a network transmission data filtering system and method. Background Art
[0002] With the development of credit cards, there are more and more corresponding transaction scenarios. The front-end of the core system of credit cards must be connected to multiple channels to meet the different transaction scenarios of the bank. Transactions connected to different transaction scenarios have differences in communication links, message formats, transaction controls, etc. The traditional method is to develop different front-end systems for different transaction scenarios, which will reduce system scalability and increase system maintenance costs.
[0003] At present, the credit card system's in-bank channel front-end docking supports in-bank financial transactions, in-bank non-financial transactions, and UnionPay one-click card binding transactions, and supports financial transaction message 8583 format, non-financial transaction message XML format, and one-click card binding transaction message HTTPS format. If implemented in the traditional way, three front-end systems need to be developed to dock with bank requests, and each system corresponds to a set of front-end codes. The code reusability is not high, it is not convenient to expand new filtering controls, and it is impossible to expand support for new message formats, which increases the cost of later maintenance.
[0004] Therefore, it is necessary to provide a network transmission data filtering system and method to improve the scalability of the system and reduce the system maintenance cost, so as to ensure the stable operation of the credit card system. Summary of the invention
[0005] The purpose of the present invention is to provide a network transmission data filtering system and method to improve the scalability of the system and reduce the system maintenance cost, thereby ensuring the stable operation of the credit card system.
[0006] In order to solve the problems existing in the prior art, the present invention provides a network transmission data filtering system, comprising:
[0007] A message receiving module is configured to receive request messages in 8583 format, XML format and HTTPS format;
[0008] Nginx server, configured to implement two-way authentication of HTTPS format request messages and convert HTTPS format request messages into HTTP format request messages;
[0009] An HTTP format message processing module, configured to parse the HTTP format request message into an HTTP request message header and an HTTP request message body, and obtain and retain a message length string and an XML format request message from the HTTP request message body;
[0010] The protocol codec processor includes a custom decoder, a unified message header filter, a default message header filter, a default 8583 filter, an XML decoding filter, and a log filter, which are configured to obtain messages from the message receiving module and the HTTP format message processing module, and decode the 8583 format request message and the XML format request message to form a decoding log and internal messages;
[0011] The business processing module is configured to process financial services and non-financial services respectively according to the internal message formed by the 8583 format request message and the internal message formed by the XML format request message to form response data.
[0012] Optionally, in the network transmission data filtering system, when parsing a 8583 format request message, the message header and the message body are parsed separately.
[0013] Optionally, in the network transmission data filtering system, the protocol codec processor also includes: a custom encoder and an XML encoding filter, which are configured to form a response message of a corresponding format according to the response data and three types of request messages.
[0014] Optionally, in the network transmission data filtering system,
[0015] If the format of the request message is 8583 format, a response message in 8583 format is generated;
[0016] If the request message is in XML format and HTTPS format, an XML format response message is generated.
[0017] Optionally, in the network transmission data filtering system, the HTTP format message processing module is further configured to form an HTTP format response message according to the HTTPS format request message and the corresponding XML format response message.
[0018] Optionally, in the network transmission data filtering system, if the format of the request message is 8583 format, a response message header and a response message body in 8583 format are respectively formed.
[0019] The present invention also provides a method for filtering network transmission data, comprising the following steps:
[0020] Receive 8583 format request messages, XML format request messages, and HTTPS format request messages;
[0021] Implement two-way authentication of HTTPS request messages and convert HTTPS request messages into HTTP request messages;
[0022] Parsing the HTTP format request message to obtain the HTTP request message header and the HTTP request message body, and obtaining and retaining the message length string and the XML format request message from the HTTP request message body;
[0023] Decode 8583 format request messages and XML format request messages to generate decoding logs and internal messages;
[0024] Financial services and non-financial services are processed respectively according to the internal message formed by the 8583 format request message and the internal message formed by the XML format request message to form response data.
[0025] Optionally, the network transmission data filtering method further includes a response step: forming a response message of a corresponding format according to the response data and the three types of request messages;
[0026] If the format of the request message is 8583 format, a response message in 8583 format is generated;
[0027] If the request message is in XML format and HTTPS format, an XML format response message is generated.
[0028] Optionally, in the network transmission data filtering method, if the format of the request message is HTTPS format, an HTTP format response message is formed according to the HTTPS format request message and the corresponding XML format response message.
[0029] Optionally, in the network transmission data filtering method, if the format of the request message is 8583 format, a response message header and a response message body in 8583 format are respectively formed.
[0030] In the network transmission data filtering system and method provided by the present invention, by parsing the HTTPS format request message to generate the XML format request message, the protocol codec processor is used to decode the 8583 format request message and the XML format request message to form a decoding log and an internal message; thus, the 8583 format request message, the XML format request message and the HTTPS format request message can be processed in the filtering system, which is convenient for later maintenance, saves labor costs and improves development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A decoding flow chart of a network transmission data filtering system provided by an embodiment of the present invention;
[0032] Figure 2 Coding flow chart of the network transmission data filtering system provided by the embodiment of the present invention
[0033] Figure 3A module diagram of a network transmission data filtering system provided by an embodiment of the present invention;
[0034] Figure 4 HTTPS message parsing flow chart provided by an embodiment of the present invention;
[0035] Figure 5 HTTPS message encoding flow chart provided for an embodiment of the present invention;
[0036] Figure 6 8583 message parsing flow chart provided for an embodiment of the present invention;
[0037] Figure 7 8583 message encoding flow chart provided for an embodiment of the present invention;
[0038] Figure 8 An XML message parsing flow chart provided for an embodiment of the present invention;
[0039] Fig. 9 The XML message encoding flow chart provided by the embodiment of the present invention. DETAILED DESCRIPTION
[0040] The specific implementation of the present invention will be described in more detail below in conjunction with the schematic diagram. The advantages and features of the present invention will become clearer based on the following description. It should be noted that the drawings are all in a very simplified form and are not in exact proportions, and are only used to facilitate and clearly assist in explaining the purpose of the embodiments of the present invention.
[0041] Hereinafter, if the method described herein includes a series of steps, the order in which the steps are presented herein is not necessarily the only order in which the steps may be performed, and some of the steps described may be omitted and / or some other steps not described herein may be added to the method.
[0042] If implemented in the traditional way, three front-end systems need to be developed to connect to the bank's requests. Each system corresponds to a set of front-end codes. The code reusability is not high, it is not convenient to expand new filtering controls, and it is impossible to expand support for new message formats, which increases the subsequent maintenance costs.
[0043] In order to solve the problems existing in the prior art, the present invention provides a network transmission data filtering system, such as Figure 1-3 As shown, including:
[0044] A message receiving module is configured to receive request messages in 8583 format, XML format and HTTPS format;
[0045] Nginx server, configured to implement two-way authentication of HTTPS format request messages and convert HTTPS format request messages into HTTP format request messages;
[0046] The HTTP format message processing module (HttpProtocolCodecFilter) includes a decoder (SimpleHttpServerDecoder) and an encoder (SimpleHttpServerEncoder), which is configured to parse the HTTP format request message into an HTTP request message header and an HTTP request message body, and obtain and retain a message length string and an XML format request message from the HTTP request message body, wherein the message length string describes the total number of bytes of the message body, the length string is 6 bytes long, and the length is filled with 0, and the message body: the XML format request message records the business information, and describes the business message in XML format;
[0047] The protocol codec processor (ProtocolCodecFilter), including the custom decoder (LVMessageDecoder), the unified header filter (UnifiedHeaderCodecFilter), the default header filter (DefaultFieldsOnlyCodecFilter), the default 8583 filter (Default8583CodecFilter), the XML decoding filter (XmlDecoderFilter) and the log filter (YakTradeLogFilter), is configured to obtain the messages of the message receiving module and the HTTP format message processing module, and decode the 8583 format request message and the XML format request message to form a decoding log and an internal message (YakMessage);
[0048] The business processing module is configured to call BankIoHandler.messageReceived() according to the internal message formed by the 8583 format request message and the internal message formed by the XML format request message, respectively process financial services and non-financial services, and form response data. Preferably, before processing financial services and non-financial services respectively, it is also necessary to determine the MAC algorithm and the PIN algorithm; obtain the transaction type and the message type; and verify the message type.
[0049] Furthermore, when parsing a request message in 8583 format, the message header and the message body are parsed separately.
[0050] Generally, Nginx (engine x) is a high-performance HTTP and reverse proxy web server. Nginx uses HTTPS two-way authentication to ensure security. It is connected to a dedicated line, not to the public network, and uses a self-signed CA root certificate. Nginx configures two-way authentication, and the self-signed CA root certificate private key signs the server and client digital certificates. When the client requests the nginx server to establish a connection, it will synchronize its respective certificates to each other and verify the other party's certificate, and then use the certificate to encrypt the transmission of the negotiated symmetric encryption algorithm and key for subsequent communication. After the connection is established, the nginx server converts it into an HTTP request to the HTTP format message processing module. The HTTP format message processing module strips the http request message header, parses the http request message body, and passes it to the subsequent filter chain for processing.
[0051] Optionally, in the network transmission data filtering system, the protocol codec processor also includes: a custom encoder (LVMessageEncoder) and an xml encoding filter (XmlEncoderFilter), which are configured to form a response message of a corresponding format according to the response data and three types of request messages.
[0052] Further, if the format of the request message is 8583 format, a response message in 8583 format is formed; if the format of the request message is XML format and HTTPS format, an XML format response message is formed. The HTTP format message processing module is also configured to form an HTTP format response message according to the HTTPS format request message and the corresponding XML format response message. If the format of the request message is 8583 format, a response message header and a response message body in 8583 format are formed respectively.
[0053] Preferably, the network transmission data filtering system further includes a log processor (Loggi ngFilter) to generate and process logs.
[0054] The network transmission data filtering system of the present invention can be set in the intra-bank channel front of any bank. The network transmission data filtering system code uses the MINA framework to customize the message parsing filter chain and the message assembly filter chain for the transaction. If the transaction is a financial message in 8583 format, it will be processed by the default 8583 filter (Default8583CodecFilter) according to the configuration, and the corresponding message domain will be parsed for subsequent program processing. If the transaction is a non-financial message in XML format, it will be processed by the xml decoding filter (XmlDecoderFilter) according to the configuration, and the corresponding message domain will be parsed for subsequent program processing. If the transaction is a UnionPay one-key card binding transaction in HTTPS format, the request is first processed by the nginx server for SSL two-way verification, and the nginx server converts HTTPS to HTTP request to the HTTP format message processing module. The HTTP format message processing module will be processed by the decoder (SimpleHttpServerDecoder) according to the configuration, and the HTTP request message body will be parsed. The message body is in XML format, and is processed by the subsequent xml decoding filter (XmlDecoderFilter), and the corresponding message domain will be parsed for subsequent program processing. Similarly, the response message is processed by the respective encoders and the response message is returned. The 8583 format financial message encoder is the default 8583 filter (Default8583CodecFilter), the XML non-financial message encoder is the xml encoding filter (XmlEncoderFilter), and the HTTP format message encoder is the encoder (SimpleHttpServerEncoder).
[0055] The present invention also provides a network transmission data filtering method, using the network transmission data filtering method, such as Figure 1-3 As shown, the following steps are included:
[0056] Receive 8583 format request messages, XML format request messages, and HTTPS format request messages;
[0057] Implement two-way authentication of HTTPS request messages and convert HTTPS request messages into HTTP request messages;
[0058] Parsing the HTTP format request message to obtain the HTTP request message header and the HTTP request message body, and obtaining and retaining the message length string and the XML format request message from the HTTP request message body;
[0059] Decode 8583 format request messages and XML format request messages to generate decoding logs and internal messages;
[0060] Financial services and non-financial services are processed respectively according to the internal message formed by the 8583 format request message and the internal message formed by the XML format request message to form response data.
[0061] Optionally, the network transmission data filtering method further includes a response step: forming a response message of a corresponding format according to the response data and the three types of request messages; if the format of the request message is 8583 format, forming an 8583 format response message; if the format of the request message is XML format and HTTPS format, forming an XML format response message. If the format of the request message is HTTPS format, forming an HTTP format response message according to the HTTPS format request message and the corresponding XML format response message. If the format of the request message is 8583 format, forming a response message header and a response message body in 8583 format respectively.
[0062] Specifically, Figure 4 As shown in the figure, the HTTPS message parsing process is as follows: The HTTP format message processing module inherits the IoFilterAdapter class. The messageReceived() method of the HTTP format message processing module receives the byte stream data, calls the decoder (SimpleHttpServerDecoder) doDecode() method to parse the message, removes the message header, retains the message length string and the XML format request message, and calls the subsequent filter processing. Figure 5 As shown, the HTTPS message encoding process is as follows: the filterWrite() method of the HTTP format message processing module is used to call the encode() method of the encoder (SimpleHttpServerEncoder) to assemble the message, generate the message header, assemble the message length string and the XML format response message into the HTTP format response message, and call the subsequent filter processing.
[0063] like Figure 6 As shown in the figure, the 8583 message parsing process is as follows: after receiving the byte stream data, it is parsed according to the 8583 message format through the default message header filter (DefaultFieldsOnlyCodecFilter, 8583 format, controlled by the switch) and the default 8583 filter (Default8583CodecFilter, 8583 format), and the values of each field are saved to the internal message object (YakMessage). Figure 7As shown, the 8583 message encoding process is as follows: through the default message header filter (DefaultFieldsOnlyCodecFilter, 8583 format, controlled by the switch) and the default 8583 filter (Default8583CodecFilter, 8583 format), the values of each domain field are assembled according to the 8583 message format and saved to IoBuffer.
[0064] like Figure 8 As shown in the figure, the XML message parsing process is as follows: byte stream data is received, then the non-financial message is parsed through the XML decoding filter (XmlDecoderFilter) and saved to the internal message object (YakMessage). Fig. 9 As shown, the XML message encoding process is as follows: after receiving the response data, the non-financial message is assembled through the XML encoding filter (XmlEncoderFilter) and saved in IoBuffer.
[0065] In summary, in the network transmission data filtering system and method provided by the present invention, by parsing the HTTPS format request message to generate the XML format request message, the protocol codec processor is used to decode the 8583 format request message and the XML format request message to form a decoding log and an internal message; thus, the 8583 format request message, the XML format request message and the HTTPS format request message can be processed in the filtering system, which is convenient for later maintenance, saves labor costs and improves development efficiency.
[0066] The above is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any technician in the relevant technical field, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification to the technical solution and technical content disclosed in the present invention, which does not depart from the content of the technical solution of the present invention and still falls within the protection scope of the present invention.
Claims
1. A network transmission data filtering system, characterized in that: include: A message receiving module is configured to receive request messages in 8583 format, XML format and HTTPS format; Nginx server, configured to implement two-way authentication of HTTPS format request messages and convert HTTPS format request messages into HTTP format request messages; An HTTP format message processing module, configured to parse the HTTP format request message into an HTTP request message header and an HTTP request message body, and obtain and retain a message length string and an XML format request message from the HTTP request message body; The protocol codec processor includes a custom decoder, a unified message header filter, a default message header filter, a default 8583 filter, an XML decoding filter, and a log filter, which are configured to obtain messages from the message receiving module and the HTTP format message processing module, and decode the 8583 format request message and the XML format request message to form a decoding log and internal messages; The business processing module is configured to process financial services and non-financial services respectively according to the internal message formed by the 8583 format request message and the internal message formed by the XML format request message to form response data.
2. The network transmission data filtering system according to claim 1, characterized in that: When parsing a request message in 8583 format, the message header and message body are parsed separately.
3. The network transmission data filtering system according to claim 1, characterized in that: The protocol codec processor also includes: a custom encoder and an XML encoding filter, which are configured to form a response message of a corresponding format according to the response data and three types of request messages.
4. The network transmission data filtering system as claimed in claim 3, characterized in that: If the format of the request message is 8583 format, a response message in 8583 format is generated; If the request message is in XML format and HTTPS format, an XML format response message is generated.
5. The network transmission data filtering system as claimed in claim 4, characterized in that: The HTTP format message processing module is also configured to form an HTTP format response message according to the HTTPS format request message and the corresponding XML format response message.
6. The network transmission data filtering system according to claim 4, characterized in that: If the format of the request message is 8583 format, a response message header and a response message body in 8583 format are respectively formed.
7. A method for filtering network transmission data, characterized in that: The following steps are involved: Receive 8583 format request messages, XML format request messages, and HTTPS format request messages; Implement two-way authentication of HTTPS request messages and convert HTTPS request messages into HTTP request messages; Parsing the HTTP format request message to obtain the HTTP request message header and the HTTP request message body, and obtaining and retaining the message length string and the XML format request message from the HTTP request message body; Decode 8583 format request messages and XML format request messages to generate decoding logs and internal messages; Financial services and non-financial services are processed respectively according to the internal message formed by the 8583 format request message and the internal message formed by the XML format request message to form response data.
8. The network transmission data filtering method according to claim 7, characterized in that: The method further includes a response step of: forming a response message of a corresponding format according to the response data and the three types of request messages; If the format of the request message is 8583 format, a response message in 8583 format is generated; If the request message is in XML format and HTTPS format, an XML format response message is generated.
9. The network transmission data filtering method according to claim 8, characterized in that: If the format of the request message is HTTPS format, an HTTP format response message is formed according to the HTTPS format request message and the corresponding XML format response message.
10. The network transmission data filtering method according to claim 8, characterized in that: If the format of the request message is 8583 format, a response message header and a response message body in 8583 format are respectively formed.
