CN114022278A - Simulated transaction processing method and device - Google Patents

Simulated transaction processing method and device Download PDF

Info

Publication number
CN114022278A
CN114022278A CN202111307098.1A CN202111307098A CN114022278A CN 114022278 A CN114022278 A CN 114022278A CN 202111307098 A CN202111307098 A CN 202111307098A CN 114022278 A CN114022278 A CN 114022278A
Authority
CN
China
Prior art keywords
message
cross
sent
bank
assembling
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.)
Granted
Application number
CN202111307098.1A
Other languages
Chinese (zh)
Other versions
CN114022278B (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

Images

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 transactions, 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; carrying out simulation processing on the cross-bank 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 and cross-bank clearing system, so that the problems that in the related technology, when the online payment and cross-bank clearing system is developed and tested, cross-bank coordination transaction processing results are needed, or corresponding messages are manually generated according to different service scenes, efficiency is low and errors are easy to occur can be solved.

Description

Simulated 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 a simulated transaction.
Background
When the existing online payment cross-bank clearing system is developed and tested, a test environment of a cross-bank transaction processing system needs to be accessed for testing. However, the testing environment needs to be applied in advance to be opened, and the opponent bank needs to be frequently coordinated to receive and transmit messages, so that the testing efficiency is low. With the increase of the construction of each payment system, the change frequency of the message format and the business process occurs frequently, so that the development and test difficulty is higher.
When the existing technical scheme is connected with a cross-bank transaction processing system, an environment needs to be applied in advance, and the service time cannot be guaranteed; mutual transaction of the opposite sides needs to be contacted due to lack of cooperation of the opposite sides; various special scenes are difficult to realize, such as poor queuing, clearing queuing, queuing for rescue and the like; various special responses are difficult to realize, such as message discarding, overtime processing, processing modes and the like; error information is difficult to locate, if a program or an environment has a problem, the program or the environment needs to be checked and solved together with other rows, efficiency is low, and testing efficiency is greatly influenced. In the prior art, if the cross-bank transaction processing system is not connected, the corresponding messages need to be generated manually according to different service scenes, so that the efficiency is low and errors are easy to occur.
Aiming at the problems of low efficiency and high possibility of errors caused by the fact that in the related art, when an online payment cross-bank clearing system is developed and tested, cross-bank coordination transaction processing results are needed, or corresponding messages are generated manually according to different service scenes, a solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a method and a device for processing simulated transactions, which are used for at least solving the problems of low efficiency and high possibility of errors caused by the fact that transaction processing results need to be coordinated across lines or corresponding messages are manually generated according to different service scenes when a network payment and cross-bank clearing system is developed and tested in the related art.
According to an 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-bank 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-bank clearing system.
Optionally, the performing simulation processing on the cross-bank transaction message to obtain a simulated expected result includes:
searching a configuration list corresponding to the cross-bank transaction message from a configuration library according to the analyzed message type code in the message header of the cross-bank transaction message;
according to the configuration items in the configuration list, verifying the message domain data of the cross-line transaction message, and meanwhile, assembling a signature plaintext according to signature options;
verifying the analyzed signature ciphertext and the signature plaintext of the cross-bank transaction message, and storing the cross-bank transaction message into a database after the verification is passed;
and calling a business logic class corresponding to the cross-bank transaction message, and executing corresponding logic according to the message domain data and the system parameters to obtain the simulated expected result.
Optionally, assembling a response message according to the expected result includes:
generating a receipt file according to the expected result, storing the receipt file to the database, and generating a record to be sent in a list to be sent;
and capturing 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 capturing a to-be-sent receipt file from the to-be-sent list, and assembling the response message according to the to-be-sent receipt file includes:
acquiring configuration information of the receipt file to be sent from an XML configuration library, verifying the legality 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 the verification is passed;
assembling a signed plaintext according to the configuration information while assembling the message;
carrying out digital signature on the signed plaintext to obtain a signed ciphertext;
and assembling the message according to the signed ciphertext to obtain the response message.
Optionally, the method further comprises:
acquiring message elements 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-bank clearing system;
and receiving a processing result sent by the online payment cross-bank 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 elements;
after the verification is passed, storing the message elements in a database, and simultaneously generating a record to be sent in a list to be sent.
Optionally, assembling the simulated transaction message according to the message element includes:
capturing records to be sent from the list to be sent;
taking out the configuration information of the record to be sent from an XML configuration library;
verifying the legality of data items item by item according to the configuration information to be recorded, and generating a message header and a message body according to a configured xml path after the data items pass the verification;
assembling a signed plaintext according to the configuration information to be sent and recorded 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.
There is also provided, in accordance with another embodiment of the present invention, simulated transaction processing apparatus including:
the analysis module is used for receiving the cross-bank transaction message sent by the online payment cross-bank clearing system and analyzing the cross-bank transaction message;
the simulation processing module is used for carrying out simulation processing on the cross-bank 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-bank clearing system.
Optionally, the analog processing module includes:
the searching submodule is used for searching a configuration list corresponding to the cross-row transaction message from a configuration library according to the analyzed message type code in the message header of the cross-row transaction message;
the verification submodule is used for verifying the message domain data of the cross-row transaction message according to the configuration items in the configuration list and assembling a signature plaintext according to the signature options;
the verification submodule is used for verifying the analyzed signature ciphertext and the signature plaintext of the cross-bank transaction message, and storing the cross-bank transaction message into a database after the verification is passed;
and the execution submodule is used for calling the service logic class corresponding to the cross-row 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 comprises:
the generation submodule is used for generating a receipt file according to the expected result, storing the receipt file to the database and generating a record to be sent in a list to be sent;
and the assembling submodule is used for grabbing a to-be-sent receipt file from the to-be-sent list and assembling the response message according to the to-be-sent receipt file.
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 legality 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 the verification is passed;
assembling a signed plaintext according to the configuration information while assembling the message;
carrying out digital signature on the signed plaintext to obtain a signed ciphertext;
and assembling the message 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 assembling 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-bank clearing system;
and the receiving module is used for receiving a processing result sent by the online payment cross-bank clearing system after the simulated transaction message is processed.
Optionally, the apparatus further comprises:
the checking module is used for checking the message elements;
and the generating module is used for storing the message elements in a database after the verification is passed, and simultaneously generating a record to be sent in a list to be sent.
Optionally, the second assembly module is further configured to:
capturing records to be sent from the list to be sent;
taking out the configuration information of the record to be sent from an XML configuration library;
verifying the legality of data items item by item according to the configuration information to be recorded, and generating a message header and a message body according to a configured xml path after the data items pass the verification;
assembling a signed plaintext according to the configuration information to be sent and recorded 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 invention, a simulated transaction processing system is also provided, which at least comprises the simulated transaction processing device.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the cross-bank transaction message sent by the online payment cross-bank clearing system is received, and the cross-bank transaction message is analyzed; performing simulation processing on the cross-bank 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-bank clearing system, so that the problems that in the related technology, when the online payment cross-bank clearing system is developed and tested, cross-bank coordination transaction processing results are needed, or corresponding messages are manually generated according to different service scenes, efficiency is low and errors are easy to occur can be solved, the transaction processing of the cross-bank transaction processing system is simulated, the expected simulated result of the cross-bank transaction processing messages is obtained, 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 embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal simulating a transaction processing method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a simulated transaction processing method according to an embodiment of the invention;
FIG. 3 is a flow diagram of a simulated transaction processing method according to a preferred embodiment of the invention;
FIG. 4 is a schematic diagram of a simulated cross-bank transaction processing system according to an embodiment of the invention;
FIG. 5 is a block diagram of a simulated transaction processing apparatus according to an embodiment of the invention;
fig. 6 is a block diagram of a simulated transaction processing apparatus according to a preferred embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by 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 of an analog transaction processing method according to an embodiment of the present invention, and as shown in fig. 1, the mobile terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, and optionally, the mobile terminal may further include a transmission device 106 for communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. 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 a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the simulated transaction processing method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The 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 located remotely from the processor 102, which may be connected to the mobile terminal over 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 device 106 is used for receiving or transmitting 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 (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a simulated transaction processing method operating in the mobile terminal or the network architecture is provided, and fig. 2 is a flowchart of the simulated transaction processing method according to the embodiment of the present invention, as shown in fig. 2, 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, carrying out simulation processing on the cross-bank transaction message to obtain a simulated expected result;
step S206, assembling a response message according to the expected result;
and step S208, sending the response message to the online payment cross-bank clearing system.
In an embodiment of the present invention, the step S204 may specifically include: searching a configuration list corresponding to the cross-bank transaction message from a configuration library according to the analyzed message type code in the message header of the cross-bank transaction message; according to the configuration items in the configuration list, verifying the message domain data of the cross-line transaction message, and meanwhile, assembling a signature plaintext according to signature options; verifying the analyzed signature ciphertext and the signature plaintext of the cross-bank transaction message, and storing the cross-bank transaction message into a database after the verification is passed; and calling a business logic class corresponding to the cross-bank transaction message, and executing corresponding logic according to the message domain data and the system parameters to obtain the simulated expected result.
In an embodiment of the present invention, the step S206 may specifically include: generating a receipt file according to the expected result, storing the receipt file to the database, and generating a record to be sent in a list to be sent; 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 legality 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 the verification is passed; assembling a signed plaintext according to the configuration information while assembling the message; carrying out digital signature on the signed plaintext to obtain a signed ciphertext; and assembling the message according to the signed ciphertext to obtain the response message.
In an optional embodiment, the assembled transaction message may also be simulated and sent across banks for the online payment cross-bank clearing system of other banks to process, so as to implement the relevant tests, 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 message elements input through a display interface;
step S304, assembling a simulated transaction message according to the message elements;
step S306, sending the simulated transaction message to the online payment cross-bank clearing system;
and step S308, receiving a processing result sent by the online payment cross-bank clearing system after the simulated transaction message is processed.
Further, after the step S302, the message element is checked; after the verification is passed, storing the message elements in a database, and simultaneously generating a record to be sent in a list to be sent.
In an embodiment of the present invention, the step S304 may specifically include: capturing records to be sent from the list to be sent; taking out the configuration information of the record to be sent from an XML configuration library; verifying the legality of data items item by item according to the configuration information to be recorded, and generating a message header and a message body according to a configured xml path after the data items pass the verification; assembling a signed plaintext according to the configuration information to be sent and recorded 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 transaction of hand receiving and sending, and is autonomously controllable and flexibly configured; the service scene is full-covered, and various queuing, adjustment, rescue, out-of-order receiving and sending and the like are supported; the flexible response mode can customize 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-bank transaction processing system according to an embodiment of the present invention, as shown in fig. 4, 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. The figure is the overall structure of the technical solution.
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 the user input time is greatly saved, the input efficiency is improved, and the error probability is reduced; sending a transaction message, and quickly generating message data through a drop-down box and an input box; and inquiring the message processing result.
And (4) displaying layers, which are 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 to be correct. Realized using RestEasy, SpringMVC.
The service processing layer is one of the core modules and mainly divided into two parts, wherein one part is used for automatically processing the received payment transaction message, correspondingly processing the message according to a defined rule and returning an expected result; the other part is to obtain data from the association table and assemble the data into a complete message according to the input of the user on the console. The technical scheme comprises Annotation Annotation, container management SpringIOC, thread pool threadPool, Web service specification JAX-RS and the like; and technical components, message queue processing MQ, digital signature NetSign, log record LogBack, connection pool HikariCP and the like.
And the access layer provides access service for the online payment cross-bank clearing system and can receive and send messages. Access ways that may be implemented include MQ, WebService, HTTP, and the like.
And (4) processing the xml message, namely acquiring a configuration item list of the corresponding message from the xml configuration library as one of the core modules, checking the message data fields one by one according to the configuration items, continuously executing if the checking is successful, and returning if the checking is failed. For an outgoing message, the module assembles a message header and a message body according to the xml configuration library, generates a plaintext to be signed according to a signature option in the message body, and then assembles the ciphertext with the signature in the plaintext into the message. For receiving messages, 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 options of the message domain, and then delivers the plaintext and the ciphertext to a signature server to verify whether the information is correct.
And the public component encapsulates public functions which can be repeatedly used by each module, and comprises a signature service, a file processing service, a log service and the like. The signature server signs the sent message and checks the received message to ensure the safety, tamper resistance and repudiation resistance of the transaction message. Hard signing is done using NetSign signing servers using SM2 or RSA algorithms.
And the persistent layer is responsible for storing various data generated in the operation of the system into a database, the used technologies are Hibernate and MyBatis, and meanwhile, a cache technology EhCache is also used, so that the performance of the system is improved.
Middleware, which is an infrastructure on which the system operates, may support Weblogic, Tomcat, and the like.
The xml configuration library is one of the core modules, contains the defined rule configuration information of all message domains, including information of type, length, whether empty, range, branch, circulation, whether label is added, xpath path, constraint and the like, and also contains self-defined mapping information, the message domains can be mapped into a database table according to parameters, and if the message is changed, only the configuration items need to be modified. Flexibility and convenience, and strong expandability.
And hardware resources including a database server and a signature server.
The method for sending the message to the online payment cross-bank clearing system by using the simulation cross-bank transaction processing system specifically comprises the following steps: the user enters a page to be sent with the message on the display layer, the page can display all message elements related to the message, and the user selects from the drop-down box or inputs the value of the corresponding element from the text box and submits the value.
The display layer checks the input elements and submits the input elements to the background control layer after verification is carried out; the control layer checks the input elements, calls a service processing layer for processing after error is checked, the service processing layer acquires data from the association table according to the input of a user, assembles the data into a complete message, calls a persistence layer, stores the data in a database, and generates a record to be sent in a list to be sent.
Starting a timing task by the thread pool, capturing a message list to be sent from the list to be sent, then taking out relevant data, and sending the relevant data to an XML message processing module to assemble a message; after receiving the data, the XML message processing module takes out the configuration information of the message from the XML configuration library, verifies the legality of the data items item by item according to the configuration information, and generates a message header and a message body according to a configured XML path if the data item is verified to be correct; and if the verification is wrong, returning error report information. And assembling the signed plaintext according to the configuration items while assembling the message.
After the message is generated, the signed plaintext is digitally signed, and then the encrypted ciphertext is assembled into the message. After the message assembly is completed, the access layer sends the message to the online payment cross-bank clearing system through the MQ.
The method for receiving the message from the online payment cross-bank clearing system by using the simulation cross-bank transaction processing system specifically comprises the following steps:
the access layer receives messages from the online payment cross-bank clearing system from the MQ. And the message is sent to an xml message processing module for analysis. Firstly, a message header and a digital signature ciphertext are analyzed, and then a configuration list corresponding to the message is searched 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. And meanwhile, assembling signed plaintext 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 the verification is correct.
And starting a timing task by the thread pool, capturing the task from the list to be processed, then taking out the related data, and calling the service logic class corresponding to the message to perform service processing. Specifically, the service logic class executes corresponding logic according to message domain data and system parameters, generates an expected result into a receipt message, stores the receipt message in a database, and generates a record to be sent in a list to be sent; starting a timing task by the thread pool, capturing a message list to be sent from the list to be sent, then taking out relevant data, and sending the relevant data to an XML message processing module to assemble a message; after receiving the data, the XML message processing module takes out the configuration information of the message from the XML configuration library, verifies the legality of the data items item by item according to the configuration information, and generates a message header and a message body according to a configured XML path if the data items are verified to be correct; and if the verification is wrong, returning error report information. And assembling the signed plaintext according to the configuration items while assembling the message.
After the message is generated, the signed plaintext is digitally signed, and then the encrypted ciphertext is assembled into the message. After the message assembly is completed, the access layer sends the message to the online payment cross-bank clearing system through the MQ.
There is also provided, in accordance with another embodiment of the present invention, a simulated transaction processing apparatus, fig. 5 being a block diagram of the simulated transaction processing apparatus according to the embodiment of the present invention, as shown in fig. 5, including:
the analysis module 52 is configured to receive a cross-bank transaction message sent by the online payment cross-bank clearing system, and analyze the cross-bank transaction message;
the simulation processing module 54 is configured to perform simulation processing on the cross-bank transaction message to obtain a simulated expected result;
a first assembling module 56, configured to assemble a response message according to the expected result;
and the first sending module 58 is configured to send the response message to the online payment cross-bank clearing system.
Optionally, the analog processing module 54 includes:
the searching submodule is used for searching a configuration list corresponding to the cross-row transaction message from a configuration library according to the analyzed message type code in the message header of the cross-row transaction message;
the verification submodule is used for verifying the message domain data of the cross-row transaction message according to the configuration items in the configuration list and assembling a signature plaintext according to the signature options;
the verification submodule is used for verifying the analyzed signature ciphertext and the signature plaintext of the cross-bank transaction message, and storing the cross-bank transaction message into a database after the verification is passed;
and the execution submodule is used for calling the service logic class corresponding to the cross-row 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 56 comprises:
the generation submodule is used for generating a receipt file according to the expected result, storing the receipt file to the database and generating a record to be sent in a list to be sent;
and the assembling submodule is used for grabbing a to-be-sent receipt file from the to-be-sent list and assembling the response message according to the to-be-sent receipt file.
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 legality 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 the verification is passed;
assembling a signed plaintext according to the configuration information while assembling the message;
carrying out digital signature on the signed plaintext to obtain a signed ciphertext;
and assembling the message according to the signed ciphertext to obtain the response message.
Fig. 6 is a block diagram of a simulated transaction processing apparatus according to a preferred embodiment of the present invention, as shown in fig. 6, the apparatus further comprising:
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 elements;
a second sending module 66, configured to send the simulated transaction message to the online payment cross-bank clearing system;
and the receiving module 68 is configured to receive a processing result sent after the online payment cross-bank clearing system processes the simulated transaction message.
Optionally, the apparatus further comprises:
the checking module is used for checking the message elements;
and the generating module is used for storing the message elements in a database after the verification is passed, and simultaneously generating a record to be sent in a list to be sent.
Optionally, the second assembly module 64 is further configured to:
capturing records to be sent from the list to be sent;
taking out the configuration information of the record to be sent from an XML configuration library;
verifying the legality of data items item by item according to the configuration information to be recorded, and generating a message header and a message body according to a configured xml path after the data items pass the verification;
assembling a signed plaintext according to the configuration information to be sent and recorded 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, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving a cross-bank transaction message sent by the online payment cross-bank clearing system, and analyzing the cross-bank transaction message;
s2, performing simulation processing on the cross-bank transaction message to obtain a simulated expected result;
s3, assembling a response message according to the expected result;
and S4, sending the response message to the online payment cross-bank clearing system.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a cross-bank transaction message sent by the online payment cross-bank clearing system, and analyzing the cross-bank transaction message;
s2, performing simulation processing on the cross-bank transaction message to obtain a simulated expected result;
s3, assembling a response message according to the expected result;
and S4, sending the response message to the online payment cross-bank clearing system.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method of processing a simulated transaction, comprising:
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-bank 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-bank clearing system.
2. The method of claim 1, wherein simulating the cross-bank transaction message to obtain a desired result of simulation comprises:
searching a configuration list corresponding to the cross-bank transaction message from a configuration library according to the analyzed message type code in the message header of the cross-bank transaction message;
according to the configuration items in the configuration list, verifying the message domain data of the cross-line transaction message, and meanwhile, assembling a signature plaintext according to signature options;
verifying the analyzed signature ciphertext and the signature plaintext of the cross-bank transaction message, and storing the cross-bank transaction message into a database after the verification is passed;
and calling a business logic class corresponding to the cross-bank transaction message, and executing corresponding logic according to the message domain data and the system parameters to obtain the simulated expected result.
3. The method of claim 1, wherein assembling a response message based on the expected result comprises:
generating a receipt file according to the expected result, storing the receipt file in a database, and generating a record to be sent in a list to be sent;
and capturing 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.
4. The method according to claim 3, wherein capturing 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 comprises:
acquiring configuration information of the receipt file to be sent from an XML configuration library, verifying the legality 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 the verification is passed;
assembling a signed plaintext according to the configuration information while assembling the message;
carrying out digital signature on the signed plaintext to obtain a signed ciphertext;
and assembling the message according to the signed ciphertext to obtain the response message.
5. The method of claim 1, further comprising:
acquiring message elements 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-bank clearing system;
and receiving a processing result sent by the online payment cross-bank clearing system after the simulated transaction message is processed.
6. The method of claim 5, wherein after obtaining the message element entered via the display interface, the method further comprises:
checking the message elements;
after the verification is passed, storing the message elements in a database, and simultaneously generating a record to be sent in a list to be sent.
7. The method of claim 6, wherein assembling a simulated transaction message from the message elements comprises:
capturing records to be sent from the list to be sent;
taking out the configuration information of the record to be sent from an XML configuration library;
verifying the legality of data items item by item according to the configuration information to be recorded, and generating a message header and a message body according to a configured xml path after the data items pass the verification;
assembling a signed plaintext according to the configuration information to be sent and recorded 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.
8. A simulated transaction processing apparatus comprising:
the analysis module is used for receiving the cross-bank transaction message sent by the online payment cross-bank clearing system and analyzing the cross-bank transaction message;
the simulation processing module is used for carrying out simulation processing on the cross-bank 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-bank clearing system.
9. A simulated transaction processing system comprising at least the apparatus of claim 8.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 7 when executed.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
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 true CN114022278A (en) 2022-02-08
CN114022278B 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)

Cited By (2)

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

Citations (10)

* 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
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

Patent Citations (10)

* 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
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
梁少华: ""网上银行电子商务支付的实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 04, 15 April 2014 (2014-04-15), pages 138 - 562 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN114022278B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN105335293B (en) A kind of automatization test system and method based on interface concurrent
CN105099811B (en) Interface testing method and device
CN108650149A (en) Test method, device, equipment and the computer readable storage medium of server
US8079017B2 (en) Automated QS interface testing framework
CN103533392B (en) A kind of account login method, electronic equipment and system
CN109726128A (en) A kind of method for generating test case, device and server
CN108228444B (en) Test method and device
CN111200523B (en) Method, device, equipment and storage medium for configuring middle platform system
CN112732572A (en) Service testing method, device and system, storage medium and electronic device
CN112988608B (en) Data testing method and device, computer equipment and storage medium
CN109062807B (en) Method and device for testing application program, storage medium and electronic device
CN106713011A (en) Method and system for obtaining test data
CN108345508B (en) Interface call testing method and device
CN114022278A (en) Simulated transaction processing method and device
CN107247661B (en) Method and system for supporting automatic verification of installation package of application
CN112860562B (en) Automatic test method and device
Tanaem et al. STARS: Websocket Design and Implementation
CN111294250B (en) Pressure testing method, device and system
GB2424498A (en) Test simulation using live real-world characteristics
CN114428723A (en) Test system, system test method, related device and storage medium
Choi Python Network Automation Labs: Ansible, pyATS, Docker, and the Twilio API
CN110231965A (en) A kind of cloud device, applied program processing method and electronic equipment
CN114374615B (en) Data virtual interaction simulation method and device, storage medium and electronic device
CN111831530A (en) Test method and device
CN113127325B (en) Method and device for processing problem order and 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