CN114022278B - Analog transaction processing method and device - Google Patents

Analog transaction processing method and device Download PDF

Info

Publication number
CN114022278B
CN114022278B CN202111307098.1A CN202111307098A CN114022278B CN 114022278 B CN114022278 B CN 114022278B CN 202111307098 A CN202111307098 A CN 202111307098A CN 114022278 B CN114022278 B CN 114022278B
Authority
CN
China
Prior art keywords
message
cross
sent
assembling
module
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
CN202111307098.1A
Other languages
Chinese (zh)
Other versions
CN114022278A (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.)
Everbright Technology Co ltd
Original Assignee
Everbright Technology Co 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 Everbright Technology Co ltd filed Critical Everbright Technology Co ltd
Priority to CN202111307098.1A priority Critical patent/CN114022278B/en
Publication of CN114022278A publication Critical patent/CN114022278A/en
Application granted granted Critical
Publication of CN114022278B publication Critical patent/CN114022278B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Quality & Reliability (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method and a device for processing simulated transaction, wherein the method comprises the following steps: receiving a cross-bank transaction message sent by an online payment cross-bank clearing system, and analyzing the cross-bank transaction message; performing simulation processing on the cross-line transaction message to obtain a simulated expected result; assembling a response message according to the expected result; the response message is sent to the online payment cross-line clearing system, the problems that the online payment cross-line clearing system needs to coordinate transaction processing results in a cross-line mode or corresponding messages are manually generated according to different business scenes, the efficiency is low and errors are prone to occurring are solved, the expected simulation result of the cross-line transaction processing message is obtained by simulating the transaction processing of the cross-line transaction processing system, a stable and efficient operation environment can be provided, and the testing efficiency is improved.

Description

Analog transaction processing method and device
Technical Field
The invention relates to the field of data processing, in particular to a method and a device for processing simulated transaction.
Background
When the online payment cross-bank clearing system is developed and tested at present, the online payment cross-bank clearing system needs to be connected to the testing environment of the cross-bank transaction processing system for testing. However, the test environment needs to be applied in advance to be opened, and the opponent bank needs to be frequently coordinated to transmit and receive messages, so that the test efficiency is low. With the increasing of the construction force of each payment system, the changing frequency of the message format and the business flow occurs, so that the development and test difficulty is higher.
When the existing technical scheme is connected with a cross-line transaction processing system, the environment needs to be applied in advance, and the service time cannot be ensured; lack of mating of the other party, and need to contact the mutual transmission transaction of the other party; various special scenes are difficult to realize, such as rolling stock queuing, clearing queuing, queuing rescue and the like; various special responses are difficult to realize, such as message discarding, overtime processing, processing modes and the like; the error information is difficult to locate, if the program or environment goes wrong, the opposite side rows are required to be contacted together for checking and solving, the efficiency is low, and the testing efficiency is greatly influenced. In the prior art, if the cross-line transaction processing system is not connected, corresponding messages are required to be manually generated according to different service scenes, so that the efficiency is low and the mistakes are easy to occur.
Aiming at the problems of low efficiency and extremely easy error caused by the fact that when an online payment cross-line clearing system in the related technology is developed and tested, a transaction processing result needs to be coordinated in a cross-line mode or corresponding messages are manually generated according to different service scenes, no solution is provided.
Disclosure of Invention
The embodiment of the invention provides a method and a device for processing simulated transaction, which at least solve the problems that when an online payment cross-line clearing system is developed and tested in the related art, transaction processing results need to be coordinated in a cross-line mode, or corresponding messages are manually generated according to different business scenes, so that the efficiency is low and errors are very easy to occur.
According to one embodiment of the present invention, there is provided a simulated transaction processing method including:
receiving a cross-bank transaction message sent by an online payment cross-bank clearing system, and analyzing the cross-bank transaction message;
performing simulation processing on the cross-line transaction message to obtain a simulated expected result;
assembling a response message according to the expected result;
and sending the response message to the online payment cross-line clearing system.
Optionally, performing simulation processing on the cross-line transaction message to obtain a simulated expected result, where the simulated expected result includes:
searching a configuration list corresponding to the cross-line transaction message from a configuration library according to the analyzed message type codes in the message header of the cross-line transaction message;
verifying the message domain data of the cross-line transaction message according to the configuration items in the configuration list, and meanwhile assembling a signature plaintext according to signature options;
verifying the signature ciphertext and the signature plaintext of the parsed cross-bank transaction message, and storing the cross-bank transaction message into a database after the verification is passed;
and calling a service logic class corresponding to the cross-line transaction message, and executing corresponding logic according to the message domain data and the system parameters to obtain the simulated expected result.
Optionally, assembling the response message according to the expected result includes:
generating a receipt file according to the expected result, storing the receipt file in the database, and generating a record to be transmitted in a list to be transmitted;
and grabbing a receipt file to be sent from the list to be sent, and assembling the response message according to the receipt file to be sent.
Optionally, capturing a response piece file to be sent from the list to be sent, and assembling the response message according to the response piece file to be sent includes:
acquiring configuration information of the receipt file to be sent from an XML configuration library, verifying the validity of the data item by item according to the configuration information, and generating a message header and a message body according to the configured XML path after verification is passed;
assembling the signed text according to the configuration information while assembling the message;
carrying out digital signature on the signed plaintext to obtain a signed ciphertext;
and carrying out message assembly according to the signed ciphertext to obtain the response message.
Optionally, the method further comprises:
acquiring a message element input through a display interface;
assembling a simulated transaction message according to the message elements;
sending the simulated transaction message to the online payment cross-line clearing system;
and receiving a processing result sent by the online payment cross-line clearing system after the simulated transaction message is processed.
Optionally, after obtaining the message element input through the display interface, the method further includes:
checking the message element;
after the verification is passed, the message elements are stored in a database, and a record to be sent is generated in a list to be sent.
Optionally, assembling the simulated transaction message according to the message element includes:
grabbing records to be sent from the list to be sent;
the configuration information of the record to be sent is taken out from an XML configuration library;
verifying the validity of the data item by item according to the configuration information of the record to be sent, and generating a message header and a message body according to the configured xml path after verification is passed;
assembling a signed text according to the configuration information of the record to be sent while assembling the message;
and carrying out digital signature on the signed plaintext to obtain a signed ciphertext, and assembling the encrypted ciphertext into a message to obtain the assembled simulated transaction message.
According to another embodiment of the present invention, there is also provided an analog transaction processing apparatus including:
the analysis module is used for receiving the cross-bank transaction message sent by the cross-bank payment system and analyzing the cross-bank transaction message;
the simulation processing module is used for performing simulation processing on the cross-line transaction message to obtain a simulated expected result;
the first assembly module is used for assembling a response message according to the expected result;
and the first sending module is used for sending the response message to the online payment cross-line clearing system.
Optionally, the analog processing module includes:
the searching sub-module is used for searching a configuration list corresponding to the cross-line transaction message from a configuration library according to the analyzed message type codes in the message header of the cross-line transaction message;
the verification sub-module is used for verifying the message domain data of the cross-line transaction message according to the configuration items in the configuration list and assembling a signature plaintext according to the signature options;
the verification sub-module is used for verifying the resolved signature ciphertext and the signature plaintext of the cross-bank transaction message, and after verification, the cross-bank transaction message is stored in a database;
and the execution sub-module is used for calling the business logic class corresponding to the cross-line transaction message, executing the corresponding logic according to the message domain data and the system parameters and obtaining the simulated expected result.
Optionally, the first assembly module includes:
the generation sub-module is used for generating a receipt file according to the expected result, storing the receipt file in the database, and generating a record to be transmitted in a list to be transmitted at the same time;
and the assembly submodule is used for grabbing a receipt file to be sent from the list to be sent, and assembling the response message according to the receipt file to be sent.
Optionally, the assembly sub-module is further configured to:
acquiring configuration information of the receipt file to be sent from an XML configuration library, verifying the validity of the data item by item according to the configuration information, and generating a message header and a message body according to the configured XML path after verification is passed;
assembling the signed text according to the configuration information while assembling the message;
carrying out digital signature on the signed plaintext to obtain a signed ciphertext;
and carrying out message assembly according to the signed ciphertext to obtain the response message.
Optionally, the apparatus further comprises:
the acquisition module is used for acquiring the message elements input through the display interface;
the second assembly module is used for assembling the simulated transaction message according to the message elements;
the second sending module is used for sending the simulated transaction message to the online payment cross-line clearing system;
and the receiving module is used for receiving a processing result sent by the online payment cross-line clearing system after the online payment cross-line clearing system processes the simulated transaction message.
Optionally, the apparatus further comprises:
the verification module is used for verifying the message elements;
and the generating module is used for storing the message elements in a database after the verification is passed, and generating a record to be transmitted in a list to be transmitted.
Optionally, the second assembly module is further configured to:
grabbing records to be sent from the list to be sent;
the configuration information of the record to be sent is taken out from an XML configuration library;
verifying the validity of the data item by item according to the configuration information of the record to be sent, and generating a message header and a message body according to the configured xml path after verification is passed;
assembling a signed text according to the configuration information of the record to be sent while assembling the message;
and carrying out digital signature on the signed plaintext to obtain a signed ciphertext, and assembling the encrypted ciphertext into a message to obtain the assembled simulated transaction message.
According to another embodiment of the present invention, there is provided a simulated transaction processing system including at least the simulated transaction processing apparatus described above.
According to a further embodiment of the invention, there is also provided a computer-readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, a cross-line transaction message sent by an online payment cross-line clearing system is received, and the cross-line transaction message is analyzed; performing simulation processing on the cross-line transaction message to obtain a simulated expected result; assembling a response message according to the expected result; the response message is sent to the online payment cross-line clearing system, the problems that the efficiency is low and errors are very easy to occur because the corresponding message is manually generated according to different business scenes when the online payment cross-line clearing system is developed and tested in the related art can be solved, the expected simulation result of the cross-line transaction processing message is obtained by simulating the transaction processing of the cross-line transaction processing system, a stable and efficient operation environment can be provided, and the testing efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a block diagram of the hardware architecture of a mobile terminal for simulating a transaction processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a simulated transaction processing method according to an embodiment of the invention;
FIG. 3 is a flow chart of a simulated transaction processing method according to a preferred embodiment of the present invention;
FIG. 4 is a schematic diagram of a simulated cross-line transaction processing system according to an embodiment of the invention;
FIG. 5 is a block diagram of an analog transaction processing device according to an embodiment of the invention;
fig. 6 is a block diagram of an analog transaction processing device according to a preferred embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiment provided in the first embodiment of the present application may be executed in a mobile terminal, a computer terminal or a similar computing device. Taking a mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention, where, as shown in fig. 1, the mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input/output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store computer programs, such as software programs and modules of application software, such as computer programs corresponding to the analog transaction processing method in the embodiment of the present invention, and the processor 102 executes the computer programs stored in the memory 104 to perform various functional applications and data processing, that is, to implement the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for processing a simulated transaction operating on the mobile terminal or the network architecture is provided, and fig. 2 is a flowchart of a method for processing a simulated transaction according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S202, receiving a cross-bank transaction message sent by an online payment cross-bank clearing system, and analyzing the cross-bank transaction message;
step S204, performing simulation processing on the cross-line transaction message to obtain a simulated expected result;
step S206, assembling a response message according to the expected result;
step S208, the response message is sent to the online payment cross-line clearing system.
In the embodiment of the present invention, the step S204 may specifically include: searching a configuration list corresponding to the cross-line transaction message from a configuration library according to the analyzed message type codes in the message header of the cross-line transaction message; verifying the message domain data of the cross-line transaction message according to the configuration items in the configuration list, and meanwhile assembling a signature plaintext according to signature options; verifying the signature ciphertext and the signature plaintext of the parsed cross-bank transaction message, and storing the cross-bank transaction message into a database after the verification is passed; and calling a service logic class corresponding to the cross-line transaction message, and executing corresponding logic according to the message domain data and the system parameters to obtain the simulated expected result.
In the embodiment of the present invention, the step S206 may specifically include: generating a receipt file according to the expected result, storing the receipt file in the database, and generating a record to be transmitted in a list to be transmitted; capturing a receipt file to be sent from the list to be sent, assembling the response message according to the receipt file to be sent, further acquiring configuration information of the receipt file to be sent from an XML configuration library, verifying the validity of data items item by item according to the configuration information, and generating a message header and a message body according to a configured XML path after verification is passed; assembling the signed text according to the configuration information while assembling the message; carrying out digital signature on the signed plaintext to obtain a signed ciphertext; and carrying out message assembly according to the signed ciphertext to obtain the response message.
In an alternative embodiment, the assembled transaction message may be simulated and sent across the rows for processing by the online payment across-row clearing system of other rows to implement the correlation test, and fig. 3 is a flowchart of a simulated transaction processing method according to a preferred embodiment of the present invention, as shown in fig. 3, the flowchart includes the following steps:
step S302, obtaining a message element input through a display interface;
step S304, assembling a simulated transaction message according to the message elements;
step S306, the simulated transaction message is sent to the online payment cross-bank clearing system;
step 308, receiving a processing result sent by the online payment cross-line clearing system after processing the simulated transaction message.
Further, after the step S302, checking the message element; after the verification is passed, the message elements are stored in a database, and a record to be sent is generated in a list to be sent.
In the embodiment of the present invention, the step S304 may specifically include: grabbing records to be sent from the list to be sent; the configuration information of the record to be sent is taken out from an XML configuration library; verifying the validity of the data item by item according to the configuration information of the record to be sent, and generating a message header and a message body according to the configured xml path after verification is passed; assembling a signed text according to the configuration information of the record to be sent while assembling the message; and carrying out digital signature on the signed plaintext to obtain a signed ciphertext, and assembling the encrypted ciphertext into a message to obtain the assembled simulated transaction message.
The embodiment of the invention establishes a simple, easy-to-use, flexible and convenient message processing mode, can provide a stable and efficient operation environment, can simulate the transceiving transaction of a hand, and is independently controllable and flexible to configure; the service scene is fully covered, and various queuing, adjustment, rescue, disorder receiving and transmitting and the like are supported; the flexible response mode can be used for defining a processing mode, a response result and the like, and the test efficiency is improved.
FIG. 4 is a schematic diagram of a simulated cross-line transaction processing system, including a presentation layer, a control layer, a business logic layer, a common component, an access module, a persistence layer, middleware, a resource module, a configuration module, and the like, as shown in FIG. 4, in accordance with an embodiment of the present invention. The figure is the whole structure of the technical proposal.
The display layer is an interface operated by a user, and the content which can be operated by the user comprises: setting various parameters including system-level parameters, application parameters and message-level parameters; transaction data are preset, so that user input time is greatly saved, input efficiency is improved, and error probability is reduced; transmitting a transaction message, and rapidly generating message data through a pull-down box and an input box; inquiring the message processing result.
The presentation layer is mainly realized by using H5, vue, bootstrap, JQuery and other technologies.
And the control layer receives various requests submitted by the user operation interface, checks the parameters, and calls the service processing layer to perform logic processing after the parameters are checked. Using RestEasy, springMVC.
The service processing layer is one of the core modules, and is mainly divided into two parts, wherein one part is used for automatically processing the received payment transaction message, correspondingly processing according to defined rules and returning an expected result; and the other part is to acquire data from the association table according to the input of the user in the console and assemble the data into a complete message. The technical scheme includes annotating the Annography, managing the SpringIOC by the container, managing the thread pool ThreadPool, web service specification JAX-RS, and the like; and technical components, message queue handling MQ, digital signature NetSign, log record log back, connection pool HikariCP, etc.
The access layer provides access service for the online payment cross-line clearing system and can receive and send the message. Access modes that may be implemented include MQ, webService, HTTP, etc.
And (3) processing the xml message, namely acquiring a configuration item list of the corresponding message from an xml configuration library as one of core modules, checking the message data field one by one according to the configuration items, continuing to execute if the checking is successful, and returning if the checking is failed. For outgoing messages, the module assembles a message header and a message body according to an xml configuration library, generates a plaintext to be signed according to a signature option in the message body, and then assembles a ciphertext after the plaintext is signed into the message. For receiving the message, the module disassembles the header, the signature ciphertext and the message body according to the xml configuration library, verifies the disassembled message domain, generates a signature verification plaintext according to the signature option of the message domain, and then sends the plaintext and the ciphertext to the signature server to verify whether the information is correct.
Common components, encapsulated common functions for each module to reuse, including signature services, file processing, log services, etc. The signature server signs the sent message and verifies the received message, so that the safety, tamper resistance and repudiation resistance of the transaction message are ensured. The NetSign signature server is used for making a hard signature, and an SM2 or RSA algorithm is used.
And the persistence layer is responsible for storing various data generated in the system operation into a database, wherein the technology is Hibernate, myBatis, and the caching technology EhCache is also used to improve the system performance.
Middleware, an infrastructure for system operation, may support Weblogic, tomcat, etc.
The xml configuration library is one of the core modules, contains rule configuration information of all defined message domains, including information of type, length, whether the message domains can be empty, range, branch, circulation, whether the message domains are signed, xpath path, constraint and the like, and also contains custom mapping information, and can map the message domains into different database tables according to parameters, if the message is changed, only configuration items need to be modified. Flexible and convenient, and strong expandability.
Hardware resources including database servers, signature servers.
The method for transmitting the message to the online payment cross-bank clearance system by using the simulated cross-bank transaction processing system specifically comprises the following steps: the user enters a page to be sent with a message at a presentation layer, the page presents all message elements related to the message, and the user selects from a drop-down box or inputs the values of corresponding elements from a text box and submits the values.
The display layer verifies the input elements, and submits the verified input elements to the background control layer; the control layer checks the input elements, invokes the service processing layer for processing after the check is correct, and the service processing layer acquires data from the association table according to the input of a user, assembles the data into a complete message, invokes the persistence layer, saves the data in the database, and simultaneously generates a record to be transmitted in the list to be transmitted.
The thread pool starts a timing task, a message list to be sent is grabbed from the list to be sent, then related data is taken out and delivered to an XML message processing module for message assembly; after receiving the data, the XML message processing module extracts the configuration information of the message from the XML configuration library, verifies the legality of the data item by item according to the configuration information, and generates a message header and a message body according to the configured XML path if verification is error-free; if the verification is wrong, the error reporting information is returned. When the message is assembled, the signed text is assembled according to the configuration item.
After the message is generated, the signed plaintext is digitally signed, and then the encrypted ciphertext is assembled into the message. After the message is assembled, the access layer sends the message to the online payment cross-line clearing system through the MQ.
The method for receiving the message from the online payment cross-bank clearing system by using the simulated cross-bank transaction processing system specifically comprises the following steps:
the access layer receives messages from the MQ from the online payment trans-line clearing system. And delivering the message to an xml message processing module for analysis. Firstly, analyzing a message header and a digital signature ciphertext, and then searching a configuration list corresponding to the message in a configuration library according to a message type code in the message header.
And checking the data in the message domain according to the configuration items in the configuration list. While the signed text is assembled according to the signature options. And sending the signature ciphertext and the plaintext to a signature service module for verification, and storing the message into a database after verification is error-free.
And starting a timing task by the thread pool, capturing the task from the to-be-processed list, then taking out related data, and calling a service logic class corresponding to the message to perform service processing. Specifically, the service logic class executes corresponding logic according to the message domain data and the system parameters, generates a response piece message from an expected result, stores the response piece message in a database, and generates a record to be sent in a list to be sent; the thread pool starts a timing task, a message list to be sent is grabbed from the list to be sent, then related data is taken out and delivered to an XML message processing module for message assembly; after receiving the data, the XML message processing module extracts the configuration information of the message from the XML configuration library, verifies the legality of the data item by item according to the configuration information, and generates a message header and a message body according to the configured XML path if verification is error-free; if the verification is wrong, the error reporting information is returned. When the message is assembled, the signed text is assembled according to the configuration item.
After the message is generated, the signed plaintext is digitally signed, and then the encrypted ciphertext is assembled into the message. After the message is assembled, the access layer sends the message to the online payment cross-line clearing system through the MQ.
According to another embodiment of the present invention, there is also provided a simulated transaction processing apparatus, fig. 5 is a block diagram of the simulated transaction processing apparatus according to an embodiment of the present invention, as shown in fig. 5, including:
the parsing module 52 is configured to receive a cross-line transaction message sent by the online payment cross-line clearing system, and parse the cross-line transaction message;
the simulation processing module 54 is configured to perform simulation processing on the cross-line transaction packet to obtain a simulated expected result;
a first assembling module 56, configured to assemble a response message according to the expected result;
a first sending module 58 is configured to send the response message to the online payment cross-line clearing system.
Optionally, the analog processing module 54 includes:
the searching sub-module is used for searching a configuration list corresponding to the cross-line transaction message from a configuration library according to the analyzed message type codes in the message header of the cross-line transaction message;
the verification sub-module is used for verifying the message domain data of the cross-line transaction message according to the configuration items in the configuration list and assembling a signature plaintext according to the signature options;
the verification sub-module is used for verifying the resolved signature ciphertext and the signature plaintext of the cross-bank transaction message, and after verification, the cross-bank transaction message is stored in a database;
and the execution sub-module is used for calling the business logic class corresponding to the cross-line transaction message, executing the corresponding logic according to the message domain data and the system parameters and obtaining the simulated expected result.
Optionally, the first assembling module 56 includes:
the generation sub-module is used for generating a receipt file according to the expected result, storing the receipt file in the database, and generating a record to be transmitted in a list to be transmitted at the same time;
and the assembly submodule is used for grabbing a receipt file to be sent from the list to be sent, and assembling the response message according to the receipt file to be sent.
Optionally, the assembly sub-module is further configured to:
acquiring configuration information of the receipt file to be sent from an XML configuration library, verifying the validity of the data item by item according to the configuration information, and generating a message header and a message body according to the configured XML path after verification is passed;
assembling the signed text according to the configuration information while assembling the message;
carrying out digital signature on the signed plaintext to obtain a signed ciphertext;
and carrying out message assembly according to the signed ciphertext to obtain the response message.
Fig. 6 is a block diagram of an analog transaction processing device according to a preferred embodiment of the present invention, and as shown in fig. 6, the device further includes:
an obtaining module 62, configured to obtain a message element input through a display interface;
a second assembling module 64, configured to assemble a simulated transaction message according to the message element;
a second sending module 66, configured to send the simulated transaction message to the online payment cross-line clearing system;
and the receiving module 68 is configured to receive a processing result sent after the online payment cross-line clearing system processes the analog transaction message.
Optionally, the apparatus further comprises:
the verification module is used for verifying the message elements;
and the generating module is used for storing the message elements in a database after the verification is passed, and generating a record to be transmitted in a list to be transmitted.
Optionally, the second assembly module 64 is further configured to:
grabbing records to be sent from the list to be sent;
the configuration information of the record to be sent is taken out from an XML configuration library;
verifying the validity of the data item by item according to the configuration information of the record to be sent, and generating a message header and a message body according to the configured xml path after verification is passed;
assembling a signed text according to the configuration information of the record to be sent while assembling the message;
and carrying out digital signature on the signed plaintext to obtain a signed ciphertext, and assembling the encrypted ciphertext into a message to obtain the assembled simulated transaction message.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, receiving a cross-bank transaction message sent by an online payment cross-bank clearing system, and analyzing the cross-bank transaction message;
s2, performing simulation processing on the cross-line transaction message to obtain a simulated expected result;
s3, assembling a response message according to the expected result;
s4, sending the response message to the online payment cross-line clearing system.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, receiving a cross-bank transaction message sent by an online payment cross-bank clearing system, and analyzing the cross-bank transaction message;
s2, performing simulation processing on the cross-line transaction message to obtain a simulated expected result;
s3, assembling a response message according to the expected result;
s4, sending the response message to the online payment cross-line clearing system.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (5)

1. A method of simulated transaction processing comprising:
receiving a cross-bank transaction message sent by an online payment cross-bank clearing system, and analyzing the cross-bank transaction message;
searching a configuration list corresponding to the cross-line transaction message from a configuration library according to the analyzed message type codes in the message header of the cross-line transaction message; verifying the message domain data of the cross-line transaction message according to the configuration items in the configuration list, and meanwhile assembling a signature plaintext according to signature options; verifying the signature ciphertext and the signature plaintext of the parsed cross-bank transaction message, and storing the cross-bank transaction message into a database after the verification is passed; calling a business logic class corresponding to the cross-line transaction message, and executing corresponding logic according to the message domain data and the system parameters to obtain a simulated expected result;
generating a receipt file according to the expected result, storing the receipt file in a database, and generating a record to be transmitted in a list to be transmitted;
capturing a receipt file to be sent from the list to be sent, and assembling a response message according to the receipt file to be sent, wherein the response message comprises the following components: acquiring configuration information of the receipt file to be sent from an XML configuration library, verifying the validity of the data item by item according to the configuration information, and generating a message header and a message body according to the configured XML path after verification is passed; assembling the signed text according to the configuration information while assembling the message; carrying out digital signature on the signed plaintext to obtain a signed ciphertext; carrying out message assembly according to the signed ciphertext to obtain the response message;
sending the response message to the online payment cross-line clearing system;
the XML configuration library comprises rule configuration information and mapping information of a message domain, and the rule configuration information is modified under the condition that the message domain is changed;
the method further comprises the steps of: acquiring a message element input through a display interface; grabbing records to be sent from the list to be sent; the configuration information of the record to be sent is taken out from an XML configuration library; verifying the validity of the data item by item according to the configuration information of the record to be sent, and generating a message header and a message body according to the configured xml path after verification is passed; assembling a signed text according to the configuration information of the record to be sent while assembling the message; carrying out digital signature on the signed plaintext to obtain a signed ciphertext, and assembling the encrypted ciphertext into a message to obtain an assembled simulated transaction message; sending the simulated transaction message to the online payment cross-line clearing system; receiving a processing result sent by the online payment cross-line clearing system after processing the simulated transaction message;
after the obtaining the message element input through the display interface, the method further includes: checking the message element; after the verification is passed, the message elements are stored in a database, and a record to be sent is generated in a list to be sent.
2. A simulated transaction processing device, comprising:
the analysis module is used for receiving the cross-bank transaction message sent by the cross-bank payment system and analyzing the cross-bank transaction message;
the simulation processing module is used for performing simulation processing on the cross-line transaction message to obtain a simulated expected result, wherein the simulation processing module comprises: the searching sub-module is used for searching a configuration list corresponding to the cross-line transaction message from a configuration library according to the analyzed message type codes in the message header of the cross-line transaction message; the verification sub-module is used for verifying the message domain data of the cross-line transaction message according to the configuration items in the configuration list and assembling a signature plaintext according to the signature options; the verification sub-module is used for verifying the resolved signature ciphertext and the signature plaintext of the cross-bank transaction message, and after verification, the cross-bank transaction message is stored in a database; the execution sub-module is used for calling the business logic class corresponding to the cross-line transaction message, executing corresponding logic according to the message domain data and the system parameters, and obtaining the simulated expected result;
the generation sub-module is used for generating a receipt file according to the expected result, storing the receipt file in the database, and generating a record to be transmitted in a list to be transmitted at the same time;
the assembly submodule is used for grabbing a receipt file to be sent from the list to be sent and assembling a response message according to the receipt file to be sent; wherein, the equipment submodule is still used for: acquiring configuration information of the receipt file to be sent from an XML configuration library, verifying the validity of the data item by item according to the configuration information, and generating a message header and a message body according to the configured XML path after verification is passed; assembling the signed text according to the configuration information while assembling the message; carrying out digital signature on the signed plaintext to obtain a signed ciphertext; carrying out message assembly according to the signed ciphertext to obtain the response message;
the first sending module is used for sending the response message to the online payment cross-line clearing system;
the XML configuration library comprises rule configuration information and mapping information of a message domain, and the rule configuration information is modified under the condition that the message domain is changed;
the apparatus further comprises: the acquisition module is used for acquiring the message elements input through the display interface; the second assembly module is used for assembling the simulated transaction message according to the message elements, wherein the second assembly module is also used for: grabbing records to be sent from the list to be sent; the configuration information of the record to be sent is taken out from an XML configuration library; verifying the validity of the data item by item according to the configuration information of the record to be sent, and generating a message header and a message body according to the configured xml path after verification is passed; assembling a signed text according to the configuration information of the record to be sent while assembling the message; carrying out digital signature on the signed plaintext to obtain a signed ciphertext, and assembling the encrypted ciphertext into a message to obtain the assembled simulated transaction message; the second sending module is used for sending the simulated transaction message to the online payment cross-line clearing system; the receiving module is used for receiving a processing result sent by the online payment cross-line clearing system after the online payment cross-line clearing system processes the simulated transaction message;
the apparatus further comprises: the verification module is used for verifying the message elements; and the generating module is used for storing the message elements in a database after the verification is passed, and generating a record to be transmitted in a list to be transmitted.
3. A simulated transaction processing system comprising the apparatus of claim 2.
4. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program, wherein the computer program is arranged to execute the method of claim 1 when run.
5. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of claim 1.
CN202111307098.1A 2021-11-05 2021-11-05 Analog transaction processing method and device Active CN114022278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111307098.1A CN114022278B (en) 2021-11-05 2021-11-05 Analog transaction processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111307098.1A CN114022278B (en) 2021-11-05 2021-11-05 Analog transaction processing method and device

Publications (2)

Publication Number Publication Date
CN114022278A CN114022278A (en) 2022-02-08
CN114022278B true CN114022278B (en) 2024-04-02

Family

ID=80061595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111307098.1A Active CN114022278B (en) 2021-11-05 2021-11-05 Analog transaction processing method and device

Country Status (1)

Country Link
CN (1) CN114022278B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615176B (en) * 2022-03-07 2024-05-24 中银金融科技有限公司 Message testing method and device and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780900A (en) * 2014-01-16 2014-05-07 国家电网公司 ONVIF simulating testing device and method
CN105138613A (en) * 2015-08-07 2015-12-09 北京思特奇信息技术股份有限公司 Business object and xml message mutual conversion method and system
CN108932663A (en) * 2018-06-26 2018-12-04 中国银行股份有限公司 A kind of simulation trade matching method and device
CN110473101A (en) * 2019-08-15 2019-11-19 中国银行股份有限公司 Mock trading message processing method and device
CN110580225A (en) * 2019-09-20 2019-12-17 中国银行股份有限公司 Simulation method and device of service system
CN110930608A (en) * 2019-10-31 2020-03-27 福建新大陆支付技术有限公司 POS terminal ISO8583 message testing method and simulation background baffle system
CN111538664A (en) * 2020-04-27 2020-08-14 中国银行股份有限公司 System and method for testing payment marking application
CN111586078A (en) * 2020-06-12 2020-08-25 上海通联金融服务有限公司 8583 message inline transaction simulation tool
CN112905460A (en) * 2021-02-09 2021-06-04 中国工商银行股份有限公司 Device and method for simulating three-party receipt by automatic interface test

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020083213A1 (en) * 2000-09-18 2002-06-27 Oberstein Brien M. Method and system for simulating and certifying complex business applications

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780900A (en) * 2014-01-16 2014-05-07 国家电网公司 ONVIF simulating testing device and method
CN105138613A (en) * 2015-08-07 2015-12-09 北京思特奇信息技术股份有限公司 Business object and xml message mutual conversion method and system
CN108932663A (en) * 2018-06-26 2018-12-04 中国银行股份有限公司 A kind of simulation trade matching method and device
CN110473101A (en) * 2019-08-15 2019-11-19 中国银行股份有限公司 Mock trading message processing method and device
CN110580225A (en) * 2019-09-20 2019-12-17 中国银行股份有限公司 Simulation method and device of service system
CN110930608A (en) * 2019-10-31 2020-03-27 福建新大陆支付技术有限公司 POS terminal ISO8583 message testing method and simulation background baffle system
CN111538664A (en) * 2020-04-27 2020-08-14 中国银行股份有限公司 System and method for testing payment marking application
CN111586078A (en) * 2020-06-12 2020-08-25 上海通联金融服务有限公司 8583 message inline transaction simulation tool
CN112905460A (en) * 2021-02-09 2021-06-04 中国工商银行股份有限公司 Device and method for simulating three-party receipt by automatic interface test

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"网上银行电子商务支付的实现";梁少华;《中国优秀硕士学位论文全文数据库 信息科技辑》;20140415(第04期);第I138-562页 *

Also Published As

Publication number Publication date
CN114022278A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN108650149B (en) Server testing method, device, equipment and computer readable storage medium
CN105335293B (en) A kind of automatization test system and method based on interface concurrent
CN105099811B (en) Interface testing method and device
CN108897691A (en) Data processing method, device, server and medium based on interface analog service
US20070124726A1 (en) Automated QS interface testing framework
CN104660409B (en) The method of system login and certificate server cluster under cluster environment
CN112689005B (en) Message sending method and device, storage medium and electronic device
CN111200523B (en) Method, device, equipment and storage medium for configuring middle platform system
CN105471968B (en) A kind of method for interchanging data, system and data platform server
CN114022278B (en) Analog transaction processing method and device
CN110430126A (en) Instant communication message processing method, device, system, equipment and storage medium
CN109308257A (en) Test assignment executes method, apparatus, electronic equipment and computer storage medium
CN112689020A (en) Message transmission method, message middleware, electronic equipment and storage medium
CN110825538A (en) MQ-based method for dynamically interacting data by self-defining data types
CN110231965A (en) A kind of cloud device, applied program processing method and electronic equipment
Tanaem et al. STARS: Websocket Design and Implementation
CN112422566A (en) Remote call processing method and device, storage medium and electronic device
CN116051090A (en) Method and system for simulating and processing cross-border payment transaction
CN113434399B (en) Service node log processing method and device, storage medium and electronic device
CN114040008B (en) Message processing method and device
Chen et al. Passive interoperability testing for request-response protocols: Method, tool and application on CoAP protocol
CN112671822B (en) Service request processing method, device, storage medium, server and system
CN113825166B (en) Base station testing method and device, electronic equipment and storage medium
CN117676491A (en) Rich media communication message viewing method, device and system
CN117033177A (en) Simulation test method, simulation test device, and computer storage medium

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
GR01 Patent grant
GR01 Patent grant