CN115052053A - Message processing method and simulator for bank system test - Google Patents

Message processing method and simulator for bank system test Download PDF

Info

Publication number
CN115052053A
CN115052053A CN202210889976.3A CN202210889976A CN115052053A CN 115052053 A CN115052053 A CN 115052053A CN 202210889976 A CN202210889976 A CN 202210889976A CN 115052053 A CN115052053 A CN 115052053A
Authority
CN
China
Prior art keywords
message
bank system
template
receiving
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210889976.3A
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210889976.3A priority Critical patent/CN115052053A/en
Publication of CN115052053A publication Critical patent/CN115052053A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Debugging And Monitoring (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a message processing method and a simulator for bank system testing, which can be used in the financial field or other fields, and the method comprises the following steps: receiving a message sent by a tested bank system, and acquiring a message type corresponding to the message; determining a message template of the message according to the message type; and filling the message template by applying the message, and returning the filled message to the tested bank system as a response message. The method and the device can improve the accuracy and the efficiency of message processing for the bank system test, and further can improve the reliability and the efficiency of the bank system test. The method and the device can improve the accuracy and the efficiency of message processing for the bank system test, and further can improve the reliability and the efficiency of the bank system test.

Description

Message processing method and simulator for bank system test
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a message processing method and a simulator for a bank system test.
Background
With the rapid development of IT technology, the number of banking systems is also increasing, and thus, there is an increasing demand for testing the banking systems.
In the software development process, in order to implement the test of the message sent and received by the banking system, a monitoring system of a monitoring mechanism is generally required to be used to ensure that the monitoring system is started and the network is normally connected, but the monitoring system may have the conditions of master-slave switching and the like, which causes shutdown maintenance or fails to provide service, the reliability of the test environment is low, and the accuracy and efficiency of the test in the software development process are affected.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a message processing method and a simulator for bank system testing, which can improve the accuracy and the efficiency of message processing for bank system testing, and further can improve the reliability and the efficiency of bank system testing.
In order to solve the technical problem, the present application provides the following technical solutions:
in a first aspect, the present application provides a message processing method for a bank system test, including:
receiving a message sent by a tested bank system, and acquiring a message type corresponding to the message;
determining a message template of the message according to the message type;
and filling the message template by applying the message, and returning the filled message to the tested bank system as a response message.
Further, the receiving a message sent by the tested bank system and obtaining a message type corresponding to the message includes:
receiving a message sent by a tested bank system;
and judging whether the message is a plaintext message or not, if so, obtaining the message type from the message, and if not, decrypting the message and obtaining the message type from the decrypted message.
Further, the receiving a message sent by the tested bank system and obtaining a message type corresponding to the message includes:
receiving a message sent by a tested bank system;
analyzing the message to obtain values of a plurality of message elements;
storing the value of each message element in the corresponding variable;
and obtaining the message type corresponding to the message from the variable corresponding to the message type.
Further, the applying the message to fill the message template, and returning the message obtained after filling to the tested bank system as a response message includes:
filling the message template by using the message body in the message to obtain the filled message body;
filling a pre-configured message header template by using the message header in the message to obtain a filled message header;
and combining the filled message body and the message header to obtain the response message and returning the response message to the tested bank system.
Further, after receiving the message sent by the tested bank system and obtaining the message type corresponding to the message, the method further includes:
judging whether a message template corresponding to the message type exists in a pre-configured message template according to the pre-configured message template and a message type corresponding relation table, if not, generating the message template corresponding to the message type, and adding the corresponding relation between the message template and the message type to the pre-configured message template and the message type corresponding relation table.
Further, the receiving a message sent by the tested bank system and obtaining a message type corresponding to the message includes:
and if the preconfigured simulator switch is in an on state, receiving a message sent by the tested bank system, and obtaining a message type corresponding to the message.
Further, the returning the message obtained after the filling as a response message to the tested bank system includes:
and encrypting the message obtained after filling as a response message and returning the encrypted message to the tested bank system.
In a second aspect, the present application provides a simulator for testing a banking system, comprising:
the receiving module is used for receiving the message sent by the tested bank system and obtaining the message type corresponding to the message;
the determining module is used for determining a message template of the message according to the message type;
and the processing module is used for filling the message template by applying the message, and returning the filled message to the tested bank system as a response message.
Further, the receiving module includes:
the first receiving unit is used for receiving a message sent by the tested bank system;
a first obtaining unit, configured to determine whether the packet is a plaintext packet, if so, obtain the packet type from the packet, and if so, decrypt the packet, and obtain the packet type from the decrypted packet.
Further, the receiving module includes:
the second receiving unit is used for receiving the message sent by the tested bank system;
the analysis unit is used for analyzing the message to obtain values of a plurality of message elements;
the storage unit is used for storing the value of each message element in the corresponding variable;
and the second obtaining unit is used for obtaining the message type corresponding to the message from the variable corresponding to the message type.
Further, the processing module includes:
the first filling unit is used for filling the message template by using the message body in the message to obtain the filled message body;
a second filling unit, configured to apply a packet header in the packet to fill a pre-configured packet header template, so as to obtain a filled packet header;
and the response unit is used for combining the filled message body and the message header to obtain the response message and returning the response message to the tested bank system.
Further, the simulator for testing the banking system further comprises:
and the newly-added module is used for judging whether a message template corresponding to the message type exists in the pre-configured message template according to the pre-configured message template and the message type corresponding relation table, if not, generating the message template corresponding to the message type, and adding the corresponding relation between the message template and the message type to the pre-configured message template and the message type corresponding relation table.
Further, the simulator for testing the banking system further comprises:
and the switching module is used for receiving the message sent by the tested bank system and obtaining the message type corresponding to the message if the preconfigured simulator switch is in the on state.
Further, the response module includes:
and the encryption unit is used for encrypting the message obtained after filling as a response message and returning the response message to the tested bank system.
In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the message processing method for the bank system test when executing the program.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer instructions that, when executed, implement the message processing method for bank system testing.
According to the technical scheme, the application provides a message processing method and a simulator for testing a bank system. Wherein, the method comprises the following steps: receiving a message sent by a tested bank system, and acquiring a message type corresponding to the message; determining a message template of the message according to the message type; the message template is filled by applying the message, and the filled message is returned to the tested bank system as a response message, so that the accuracy and the efficiency of message processing for testing the bank system can be improved, and the reliability and the efficiency of testing the bank system can be further improved; specifically, the problem that the joint measurement of the receiving and dispatching of the bank business system is influenced when the receiving and dispatching environment is stopped for maintenance or service cannot be provided can be solved; the simulator supports the transmitting and receiving test of all messages of the quick payment, and supports the simulation test of encryption and non-encryption; the encryption switch can be flexibly switched by adding the simulator encryption switch, and the encryption test is normally covered when the switch is turned on; when the switch is off, the log is tracked as a plaintext, the problem analysis is faster, and the test efficiency is higher. Thereby solving the dependence on the external environment and ensuring that the project can be normally researched and developed and reappear most problems at any time; the simulator can automatically identify the message types, only a message template of the corresponding type needs to be added every time a new type is added, the specified message can be automatically identified and returned, and when the message types are added, the modification workload of codes is small.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a digital certificate application process in the prior art;
fig. 2 is a schematic diagram of a relationship between a participating bank a, a participating bank B and a monitoring authority corresponding to a message signature verification and encryption/decryption process in the prior art;
fig. 3 is a schematic flowchart of a message processing method for testing a banking system in an embodiment of the present application;
fig. 4 is a schematic flowchart of steps 401 and 402 of a message processing method for testing a banking system in an embodiment of the present application;
fig. 5 is a schematic flowchart of steps 501 to 504 of a message processing method for testing a banking system in an embodiment of the present application;
fig. 6 is a schematic flowchart of steps 601 to 603 of a message processing method for testing a banking system in an embodiment of the present application;
FIG. 7 is a flow diagram illustrating a process for determining whether to apply a simulator in one example of the present application;
FIG. 8 is a flow chart illustrating a process of determining whether to decrypt a message using a simulator according to an example of the present application;
FIG. 9 is a logic diagram of a message processing method for bank system testing according to an example of the present application;
FIG. 10 is a schematic flow chart of message processing for bank system testing in an embodiment of the present application;
fig. 11 is a schematic block diagram of a system configuration of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The simulator and the message types are developed one-to-one, and the addition and modification of input, output, encryption and decryption related code modules in the whole process are not required for adding one type, so that the time and labor are consumed; the system does not support customized switching of specified key encryption and non-encryption, only supports one of encryption or non-encryption, and does not support switching; and different message formats are required to be supported for returning aiming at different messages, so that customization is very strong. For example, a region is customized according to standard messages, and tests can only be normally conducted by starting a quick payment system of a central banking institution and connecting the network normally.
In order to solve the problems in the prior art, embodiments of the present application provide a message processing method and a simulator for testing a bank system, which can overcome the problem that a monitoring system cannot provide external services, and can normally ensure the simulated receiving and sending of messages of an internal system of a bank, support encrypted and unencrypted message processing according to a secret key provided by the monitoring system, and normally identify the receiving and returning of different messages.
At present, the digital certificate application process is shown in fig. 1, and S11: the participating bank A applies for a certificate to a regulatory agency; s12: the supervision authority applies for a certificate from the certificate authority; s13: participating bank a downloads the certificate from the regulatory body: the public key of the signature certificate of the supervision agency and the private key of the encryption certificate of the participating bank A; the flow of message signature verification and encryption and decryption is S21: participating in the signature and encryption operation of the bank A: signing by using a private key of a bank A and encrypting by using a public key of a supervision institution; s22: decryption and signature verification operations of a supervision mechanism: decrypting by using a private key of a supervision organization, and checking the signature by using a public key of a bank A; s23: signature and encryption operations of a supervision organization: signing by using a private key of a supervision organization, and encrypting by using a public key of a bank B; s24: and participating in decryption and signature verification operations of the bank B: the communication relationship between the participating bank A, B and the supervising authority when performing the processes of message signature verification and encryption and decryption by using the private key of the bank B for decryption and the public key of the supervising authority is shown in FIG. 2.
It should be noted that the message processing method and the simulator for the bank system test disclosed in the present application can be used in the field of financial technology, and can also be used in any field except the field of financial technology.
The following examples are intended to illustrate the details.
In order to improve the accuracy and efficiency of message processing for testing a bank system and further improve the reliability and efficiency of testing the bank system, the present embodiment provides a message processing method for testing a bank system, in which an execution main body is a simulator for testing the bank system, the simulator for testing the bank system may be deployed in a server, such as a bank server, or in a computer of a tester, and the like, as shown in fig. 3, the method specifically includes the following contents:
step 301: and receiving a message sent by the tested bank system, and acquiring a message type corresponding to the message.
Specifically, the message may be a message for testing a tested banking system, and the message may include message type information; the tested bank system may be a convenient payment system, and in an example, the segments of the message may be as shown in table 1, where the message types in table 1 are: ***.***.001.001.01.
TABLE 1
Figure BDA0003767164990000061
Figure BDA0003767164990000071
Specifically, as shown in tables 2 and 3, the packet types may include:
TABLE 2
Figure BDA0003767164990000072
Figure BDA0003767164990000081
TABLE 3
Figure BDA0003767164990000082
Figure BDA0003767164990000091
The inquiry request message can represent a message sent by the initiator, and the response message and the error message can represent a message received by the initiator; if the error message is returned to the tested bank system as the participating mechanism, the abnormal condition of the tested bank system can be represented.
Step 302: and determining a message template of the message according to the message type.
In one example, the message template may be as shown in table 4.
TABLE 4
Figure BDA0003767164990000092
Figure BDA0003767164990000101
Step 303: and filling the message template by applying the message, and returning the filled message to the tested bank system as a response message.
Specifically, the messages obtained after filling may be messages meeting the requirements of the message format of the supervisory system; the format of each variable in the message template is $ variable name "; the value of the variable obtained by analyzing the message can be assigned to the corresponding variable in the message template; if the value of the corresponding variable in the message template does not exist in the message, the value of the variable is defaulted to be null when the message template is filled. According to the message type, it can be identified which variables and which template the corresponding message needs to be filled in, and the naming of the template can be named according to the message type. The message template can be generated after test and verification, and the actual content is extracted as a variable for use; different types of messages need to be sent according to formats established by a supervision authority. Furthermore, whether the generated message or the forwarded message and the like of the bank system to be detected are abnormal can be tested by monitoring the whole flow of the message processing method in real time; in the whole process of executing the message processing method, if the simulator reports an error, the anomaly such as the generation of a message or the forwarding of the message by the bank system to be detected can be determined.
In order to realize flexible processing of encrypted messages and plaintext messages and improve the universality of application scenarios of the simulator, referring to fig. 4, in an embodiment of the present application, step 301 includes:
step 401: and receiving a message sent by the tested bank system.
Step 402: and judging whether the message is a plaintext message or not, if so, obtaining the message type from the message, and if not, decrypting the message and obtaining the message type from the decrypted message.
To reduce the amount of code for the simulator, see fig. 5, in one embodiment of the present application, step 301 comprises:
step 501: and receiving a message sent by the tested bank system.
Step 502: and analyzing the message to obtain the values of a plurality of message elements.
Step 503: and storing the value of each message element in the corresponding variable.
Step 504: and obtaining the message type corresponding to the message from the variable corresponding to the message type.
For example, according to the message structure, the message type field is MsgDefIdr, and the message elements corresponding to the inside-out position of the message are MsgDefIdr, AppHdr, BizData, MsgBody, and fpmsg, respectively, and the message type is stored in the MsgDefIdr _ AppHdr _ BizData _ MsgBody _ fpsg variable during message parsing, and the message type can be determined only by obtaining the value of the variable.
Because the message header structures corresponding to the messages of the various message types are the same, based on this, in order to further reduce the code amount of the simulator and reduce the repeated operations, referring to fig. 6, in an embodiment of the present application, step 303 includes:
step 601: and filling the message template by using the message body in the message to obtain the filled message body.
Specifically, the message template may be a message template corresponding to a message body in a message.
Step 602: and filling a pre-configured message header template by using the message header in the message to obtain the filled message header.
Specifically, a message header template and a message template corresponding to each message type can be configured in advance in the simulator; the preconfigured header template may be set according to actual conditions, which is not limited in this application.
Step 603: and combining the filled message body and the message header to obtain the response message and returning the response message to the tested bank system.
Specifically, the public part can be uniformly adjusted, and the message header does not need to be independently adjusted for each message type; the message header templates pre-configured when the message types are newly added are multiplexed without additional modification.
In order to improve the universality of the message template, in an embodiment of the present application, after step 301, the method further includes:
judging whether a message template corresponding to the message type exists in a pre-configured message template according to the pre-configured message template and a message type corresponding relation table, if not, generating the message template corresponding to the message type, and adding the corresponding relation between the message template and the message type to the pre-configured message template and the message type corresponding relation table.
Specifically, the simulator may be configured with a message template resource and a corresponding relationship table between the message template and the message type in advance, where the corresponding relationship table may include: the corresponding relation between the name of the configured message template and the message type; the method can realize the processing of messages of various message types.
To further increase the flexibility of the bank system test, in an embodiment of the present application, step 301 includes: and if the preconfigured simulator switch is in an on state, receiving a message sent by the tested bank system, and obtaining a message type corresponding to the message.
Specifically, if the preconfigured simulator switch is in a closed state, the tested bank system sends a message to the monitoring system; a pre-configured simulator switch may be provided in the simulator or the bank system under test. As shown in fig. 7, in an example, the tested banking system may receive the request packet, determine whether the switch of the simulator is in an on state, if so, forward the request packet to the simulator, otherwise, forward the request packet to the monitoring system, so as to complete the processing process of the packet next, thereby improving the flexibility of the packet test.
To further improve the security of message transmission, in an embodiment of the present application, step 501 includes: and encrypting the message obtained after filling as a response message and returning the encrypted message to the tested bank system.
To further explain the present solution, the application provides an application example of a message processing method for a bank system test, which is specifically described as follows:
1. a plaintext message to be tested is prepared.
2. Judging whether the encryption switch is in an open state, if so, encrypting the message and then sending the message to the simulator, otherwise, sending the plaintext message to the simulator; the encryption switch may be provided in the simulator or the bank system under test.
3. And judging whether the encryption switch is in an on state, if so, decrypting the message by the simulator, and otherwise, analyzing the message to obtain the message type without decrypting. As shown in fig. 8, in an example, the tested banking system may receive a request message, forward the request message to the simulator, and the simulator determines whether the request message is an encrypted message, and if the request message is the encrypted message, decrypts the receiving process according to the secret key, otherwise, does not need to decrypt the receiving process. Specifically, the packet type identification process includes:
each message comprises a message type field, the position is fixed, and based on the position, the value of the specified element is acquired after the message is analyzed, so that the message type can be confirmed.
4. And filling the appointed template message according to the message type.
Specifically, before the message is filled, variables to be filled are prepared, the value of each variable is stored in the variable, the value of the variable is filled into the corresponding template through the specified variable and the template path, and the filled message is returned. The format of each variable in the template is "$ variable name", and if the value of the corresponding variable is not in context, the default is null. According to the message type, it can be identified which variables and which template the corresponding message needs to be filled in, and the naming of the template can be named according to the message type.
In the message, the content under the AppHdr element is a message header, and the structure is the same, so that the content is extracted as a single template common. When the message type is newly added, the message header can be multiplexed without additional modification.
5. And encrypting the obtained message and returning.
The message transmission actually takes place in the simulator, and when a report sending request is received, the simulator returns the identified return message according to the message type. For example, the template may be returned and the values to be filled may be returned in response to the operation of 001.001.01.
When the message is sent or received, the encryption switch is judged firstly, and if the switch is on, encryption and decryption are carried out; the message is encrypted when sent and decrypted when received. SignSN is a signed SN number and EncrptnSN is an encrypted SN number, each SN number corresponds to a key, and both the sending organization and the receiving organization need to prepare the keys of the SN numbers in advance in the system, for example, the keys may be issued by the bureau of deposit. And after encryption, filling values of Sign, Pwd and Msgbody nodes, wherein the value of the Msgbody node is the encrypted content of the message body.
When messages such as a transfer account, a message signature, a signature and the like are processed, a return result can be preset in the simulator to indicate that the message format test is successful or failed, if the message template is filled with the messages and is not wrongly reported, the message format is correct, otherwise, an error exists; after the message template is filled with the application message, the message is manually sent to the simulator to be used as the report of the receiving party, so as to assume that the execution of the business process corresponding to the message is successful. As shown in fig. 9, the present application provides an example of a message processing method for a bank system test, which is specifically described as follows:
the simulator receives the message sent by the participating bank A, identifies the message type, judges whether the addressing registration is successful if the message type is addressing registration, generates an addressing response message, and returns the addressing response message to the participating bank A; if the message type is transfer payment, judging whether the transfer payment is successful, generating a receipt confirmation message, and returning the receipt confirmation message to the participating bank A; if the message type is account verification, whether the account verification is successful or not is judged, a verification result message is generated, and the verification result message is returned to the participating bank A; if the addressing registration fails, generating a rejection message and returning the rejection message to the participating bank A; if the transfer payment fails, generating a rejection message and returning to the participating bank A; and if the account verification fails, generating a rejection message and returning the rejection message to the participating bank A.
In terms of software, in order to improve the accuracy and efficiency of the message processing for the bank system test and further improve the reliability and efficiency of the bank system test, the present application provides an embodiment of a simulator for the bank system test, which is used for implementing all or part of the contents in the message processing method for the bank system test, and referring to fig. 10, the simulator for the bank system test specifically includes the following contents:
the receiving module 11 is configured to receive a message sent by a tested bank system, and obtain a message type corresponding to the message;
a determining module 12, configured to determine a packet template of the packet according to the packet type;
and the processing module 13 is configured to apply the message to fill the message template, and return the message obtained after filling to the tested bank system as a response message.
In an embodiment of the present application, the receiving module includes:
the first receiving unit is used for receiving a message sent by the tested bank system;
a first obtaining unit, configured to determine whether the packet is a plaintext packet, if so, obtain the packet type from the packet, and if so, decrypt the packet, and obtain the packet type from the decrypted packet.
In an embodiment of the present application, the receiving module includes:
the second receiving unit is used for receiving the message sent by the tested bank system;
the analysis unit is used for analyzing the message to obtain values of a plurality of message elements;
the storage unit is used for storing the value of each message element in the corresponding variable;
and the second obtaining unit is used for obtaining the message type corresponding to the message from the variable corresponding to the message type.
In one embodiment of the present application, the processing module includes:
the first filling unit is used for filling the message template by using the message body in the message to obtain the filled message body;
a second filling unit, configured to apply a packet header in the packet to fill a pre-configured packet header template, so as to obtain a filled packet header;
and the response unit is used for combining the filled message body and the message header to obtain the response message and returning the response message to the tested bank system.
In an embodiment of the present application, the simulator for testing a banking system further includes:
and the newly-added module is used for judging whether a message template corresponding to the message type exists in the pre-configured message template according to the pre-configured message template and the message type corresponding relation table, if not, generating the message template corresponding to the message type, and adding the corresponding relation between the message template and the message type to the pre-configured message template and the message type corresponding relation table.
In an embodiment of the present application, the simulator for testing a banking system further includes:
and the switching module is used for receiving the message sent by the tested bank system and obtaining the message type corresponding to the message if the preconfigured simulator switch is in an on state.
In one embodiment of the present application, the response module includes:
and the encryption unit is used for encrypting the message obtained after filling as a response message and returning the response message to the tested bank system.
The embodiment of the simulator for testing a bank system provided in this specification may be specifically used to execute the processing flow of the embodiment of the message processing method for testing a bank system, and its functions are not described herein again, and refer to the detailed description of the embodiment of the message processing method for testing a bank system.
As can be seen from the above description, the message processing method and the simulator for the bank system test provided by the application can improve the accuracy and efficiency of message processing for the bank system test, and further can improve the reliability and efficiency of the bank system test; specifically, the problem that the joint measurement of the receiving and dispatching of the bank business system is influenced when the receiving and dispatching environment is stopped for maintenance or service cannot be provided can be solved; the simulator supports the transmitting and receiving test of all messages of the quick payment, and supports the simulation test of encryption and non-encryption; the encryption switch can be flexibly switched by adding the simulator encryption switch, and the encryption test is normally covered when the switch is turned on; when the switch is off, the log is tracked as a plaintext, the problem analysis is faster, and the test efficiency is higher. Thereby solving the dependence on the external environment and ensuring that the project can be normally researched and developed and reappear most problems at any time; the simulator can automatically identify the message types, only a message template of the corresponding type needs to be added every time a new type is added, the specified message can be automatically identified and returned, and when the message types are added, the modification workload of codes is small.
Fig. 11 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 11, the electronic device may include: a processor (processor)401, a communication Interface (communication Interface)402, a memory (memory)403 and a communication bus 404, wherein the processor 401, the communication Interface 402 and the memory 403 complete communication with each other through the communication bus 404. Processor 401 may call logic instructions in memory 403 to perform the following method: receiving a message sent by a tested bank system, and acquiring a message type corresponding to the message; determining a message template of the message according to the message type; and filling the message template by applying the message, and returning the filled message to the tested bank system as a response message.
In addition, the logic instructions in the memory 403 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: receiving a message sent by a tested bank system, and acquiring a message type corresponding to the message; determining a message template of the message according to the message type; and filling the message template by applying the message, and returning the filled message to the tested bank system as a response message.
The present embodiment provides a computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the method provided by the above method embodiments, for example, the method includes: receiving a message sent by a tested bank system, and acquiring a message type corresponding to the message; determining a message template of the message according to the message type; and filling the message template by applying the message, and returning the filled message to the tested bank system as a response message.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A message processing method for bank system test is characterized by comprising the following steps:
receiving a message sent by a tested bank system, and acquiring a message type corresponding to the message;
determining a message template of the message according to the message type;
and filling the message template by applying the message, and returning the filled message to the tested bank system as a response message.
2. The message processing method for the bank system test according to claim 1, wherein the receiving the message sent by the tested bank system and obtaining the message type corresponding to the message comprises:
receiving a message sent by a tested bank system;
and judging whether the message is a plaintext message or not, if so, obtaining the message type from the message, and if not, decrypting the message and obtaining the message type from the decrypted message.
3. The message processing method for the bank system test according to claim 1, wherein the receiving the message sent by the tested bank system and obtaining the message type corresponding to the message comprises:
receiving a message sent by a tested bank system;
analyzing the message to obtain values of a plurality of message elements;
storing the value of each message element in the corresponding variable;
and obtaining the message type corresponding to the message from the variable corresponding to the message type.
4. The message processing method for the banking system test as claimed in claim 1, wherein the applying the message to fill the message template and returning the filled message as a response message to the banking system under test comprises:
filling the message template by using the message body in the message to obtain the filled message body;
filling a pre-configured message header template by using the message header in the message to obtain a filled message header;
and combining the filled message body and the message header to obtain the response message and returning the response message to the tested bank system.
5. The message processing method for the banking system test as claimed in claim 1, wherein after receiving the message sent by the banking system under test and obtaining the message type corresponding to the message, the method further comprises:
judging whether a message template corresponding to the message type exists in a pre-configured message template according to the pre-configured message template and a message type corresponding relation table, if not, generating the message template corresponding to the message type, and adding the corresponding relation between the message template and the message type to the pre-configured message template and the message type corresponding relation table.
6. The message processing method for the bank system test according to claim 1, wherein the receiving the message sent by the tested bank system and obtaining the message type corresponding to the message comprises:
and if the preconfigured simulator switch is in an on state, receiving a message sent by the tested bank system, and obtaining a message type corresponding to the message.
7. The message processing method for the banking system test as claimed in claim 1, wherein the step of returning the message obtained after the filling as a response message to the banking system under test comprises:
and encrypting the message obtained after filling as a response message and returning the encrypted message to the tested bank system.
8. A simulator for testing of banking systems, comprising:
the receiving module is used for receiving the message sent by the tested bank system and obtaining the message type corresponding to the message;
the determining module is used for determining a message template of the message according to the message type;
and the processing module is used for filling the message template by applying the message, and returning the filled message to the tested bank system as a response message.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the message processing method for bank system testing of any one of claims 1 to 7 when executing the program.
10. A computer readable storage medium having stored thereon computer instructions, wherein the instructions, when executed, implement the message processing method for bank system testing of any one of claims 1 to 7.
CN202210889976.3A 2022-07-27 2022-07-27 Message processing method and simulator for bank system test Pending CN115052053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210889976.3A CN115052053A (en) 2022-07-27 2022-07-27 Message processing method and simulator for bank system test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210889976.3A CN115052053A (en) 2022-07-27 2022-07-27 Message processing method and simulator for bank system test

Publications (1)

Publication Number Publication Date
CN115052053A true CN115052053A (en) 2022-09-13

Family

ID=83166654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210889976.3A Pending CN115052053A (en) 2022-07-27 2022-07-27 Message processing method and simulator for bank system test

Country Status (1)

Country Link
CN (1) CN115052053A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302971A (en) * 2023-02-07 2023-06-23 北京大学 Extensible test generation method for programmable data plane

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027330A (en) * 2016-05-23 2016-10-12 中国银行股份有限公司 Message testing method for front-end system, and simulation baffle system
WO2019205280A1 (en) * 2018-04-24 2019-10-31 平安科技(深圳)有限公司 Server testing method, apparatus, and device, and computer readable storage medium
CN111159053A (en) * 2020-01-02 2020-05-15 中国银行股份有限公司 Test method, test device and storage medium
CN113438134A (en) * 2021-06-30 2021-09-24 未鲲(上海)科技服务有限公司 Request message processing method, device, server and medium
CN114064327A (en) * 2021-11-30 2022-02-18 中国建设银行股份有限公司 Baffle testing method, device, storage medium and program product

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027330A (en) * 2016-05-23 2016-10-12 中国银行股份有限公司 Message testing method for front-end system, and simulation baffle system
WO2019205280A1 (en) * 2018-04-24 2019-10-31 平安科技(深圳)有限公司 Server testing method, apparatus, and device, and computer readable storage medium
CN111159053A (en) * 2020-01-02 2020-05-15 中国银行股份有限公司 Test method, test device and storage medium
CN113438134A (en) * 2021-06-30 2021-09-24 未鲲(上海)科技服务有限公司 Request message processing method, device, server and medium
CN114064327A (en) * 2021-11-30 2022-02-18 中国建设银行股份有限公司 Baffle testing method, device, storage medium and program product

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302971A (en) * 2023-02-07 2023-06-23 北京大学 Extensible test generation method for programmable data plane

Similar Documents

Publication Publication Date Title
CN111090888B (en) Contract verification method and device
CN108804336A (en) Interactive system test method, device, computer equipment and storage medium
CN113691597B (en) Block chain contract deployment method, device, equipment and storage medium
US7979532B2 (en) Systems and methods for using an access point for testing multiple devices and using several consoles
CN110417502B (en) Block chain link point clock consensus method and device
US20140235207A1 (en) Method for cryptographically verifiable identification of a physical unit in a public, wireless telecommunications network
CN111090581B (en) Intelligent contract testing method, intelligent contract testing device, computer equipment and storage medium
CN110138744A (en) Replace method, apparatus, system, computer equipment and the storage medium of communicating number
CN111522809B (en) Data processing method, system and equipment
CN112737779A (en) Service method and device for cipher machine, cipher machine and storage medium
CN110381075B (en) Block chain-based equipment identity authentication method and device
CN111211911B (en) Collaborative signature method, device, equipment and system
CN111492355B (en) Method and control system for controlling and/or monitoring a device
CN109697370A (en) Database data encipher-decipher method, device, computer equipment and storage medium
WO2017006118A1 (en) Secure distributed encryption system and method
CN112231755A (en) Data authorization method, device and system based on block chain
CN115052053A (en) Message processing method and simulator for bank system test
US20230246845A1 (en) Secret Protection During Software Development Life Cycle
CN110489322B (en) MOCK testing method, device, computer equipment and storage medium
CN113038463B (en) Communication encryption authentication experimental device
CN114553429A (en) Chameleon hash-based block chain cross-chain transaction method and device and storage medium
CN116455572B (en) Data encryption method, device and equipment
CN115022012B (en) Data transmission method, device, system, equipment and storage medium
CN110232570B (en) Information supervision method and device
CN116170759A (en) Local area network access method and system based on WeChat

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