Message processing method and simulator for banking system testing

By providing message processing methods and simulators in bank system testing, the problems of supervision system shutdown and message type identification are solved, and efficient, accurate and flexible message processing of bank system testing is achieved, and encryption and non-encryption processing is supported. , automatically identify the message type, reducing the workload of code transformation.

CN115052053BActive Publication Date: 2024-12-17INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210889976.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2024-12-17
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

During the banking system testing, the main and backup switching or downtime maintenance of the regulatory system causes unstable testing environment, affecting the accuracy and efficiency of the test. The existing simulator cannot support automatic identification of different packet types and flexible switching of encryption and non-encryption processing. .

Method used

Provide a message processing method and simulator for banking system testing. By receiving and parsing messages, determining message types, filling message templates, generating response messages, and supporting encryption and non-encryption processing, with automatic identification The message type and switching key function reduce the workload of code transformation.

Benefits of technology

Improve the accuracy and efficiency of bank system testing, solve the joint test problem when the supervision system is down, supports quick payment of all messages to send and receive messages, automatically identify message types, reduces the workload of code transformation, and improves the test Flexibility and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115052053B_ABST
    Figure CN115052053B_ABST
Patent Text Reader

Abstract

The present application provides a message processing method and simulator for testing a banking system, which can be used in the financial field or other fields. The method includes: receiving a message sent by a banking system under test, and obtaining a message type corresponding to the message; determining a message template of the message according to the message type; filling the message template with the message, and returning the filled message as a response message to the banking system under test. The present application can improve the accuracy and efficiency of message processing for banking system testing, thereby improving the reliability and efficiency of banking system testing. The present application can improve the accuracy and efficiency of message processing for banking system testing, thereby improving the reliability and efficiency of banking system testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a message processing method and a simulator for testing a banking system. Background Art

[0002] With the rapid development of IT technology, the number of banking business systems is increasing, so the demand for testing banking business systems is also increasing.

[0003] During the software development process, in order to test the sending and receiving of messages in the banking business system, it is usually necessary to use the regulatory agency's regulatory system to ensure that the regulatory system is started and the network is connected normally. However, the regulatory system may have master-slave switching and other situations, resulting in downtime for maintenance or inability to provide services. The reliability of the test environment is low, affecting the accuracy and efficiency of the test during the software development process. Summary of the invention

[0004] In response to the problems in the prior art, the present application proposes a message processing method and simulator for bank system testing, which can improve the accuracy and efficiency of message processing for bank system testing, and further improve the reliability and efficiency of bank system testing.

[0005] In order to solve the above technical problems, this application provides the following technical solutions:

[0006] In a first aspect, the present application provides a message processing method for banking system testing, comprising:

[0007] Receive the message sent by the bank system under test and obtain the message type corresponding to the message;

[0008] Determining a message template for the message according to the message type;

[0009] The message template is filled with the message, and the filled message is returned as a response message to the bank system under test.

[0010] Further, the receiving of a message sent by the bank system under test and obtaining a message type corresponding to the message includes:

[0011] Receive messages sent by the bank system under test;

[0012] Determine whether the message is a plaintext message, and if so, obtain the message type from the message; if the message is an encrypted message, decrypt the message and obtain the message type from the decrypted message.

[0013] Further, the receiving of a message sent by the bank system under test and obtaining a message type corresponding to the message includes:

[0014] Receive messages sent by the bank system under test;

[0015] Parsing the message to obtain values ​​of multiple message elements;

[0016] Save the value of each message element in its corresponding variable;

[0017] From the variable corresponding to the message type, obtain the message type corresponding to the message.

[0018] Further, the applying the message to fill the message template and returning the filled message as a response message to the bank system under test includes:

[0019] Filling the message template with the message body in the message to obtain a filled message body;

[0020] Filling a preconfigured message header template with the message header in the message to obtain a filled message header;

[0021] The filled message body and message header are combined to obtain the response message and the response message is returned to the bank system under test.

[0022] Further, after receiving the message sent by the tested bank system and obtaining the message type corresponding to the message, the method further includes:

[0023] According to the pre-configured message template and message type correspondence table, determine whether there is a message template corresponding to the message type in the pre-configured message templates; if not, generate a message template corresponding to the message type, and add the correspondence between the message template and the message type to the pre-configured message template and message type correspondence table.

[0024] Further, the receiving of a message sent by the bank system under test and obtaining a message type corresponding to the message includes:

[0025] If the pre-configured simulator switch is in the on state, the message sent by the bank system under test is received, and the message type corresponding to the message is obtained.

[0026] Further, returning the filled message as a response message to the bank system under test includes:

[0027] The message obtained after filling is used as a response message and then encrypted and returned to the bank system under test.

[0028] In a second aspect, the present application provides a simulator for testing a banking system, comprising:

[0029] A receiving module, used to receive a message sent by the bank system under test and obtain a message type corresponding to the message;

[0030] A determination module, used to determine a message template of the message according to the message type;

[0031] A processing module is used to fill the message template with the message, and return the filled message as a response message to the bank system under test.

[0032] Furthermore, the receiving module includes:

[0033] A first receiving unit, used for receiving a message sent by a bank system under test;

[0034] The first obtaining unit is used to determine whether the message is a plaintext message. If so, the message type is obtained from the message. If the message is an encrypted message, the message is decrypted and the message type is obtained from the decrypted message.

[0035] Furthermore, the receiving module includes:

[0036] A second receiving unit, used for receiving a message sent by the bank system under test;

[0037] A parsing unit, used for parsing the message to obtain values ​​of multiple message elements;

[0038] A storage unit, used to store the value of each message element in its corresponding variable;

[0039] The second obtaining unit is used to obtain the message type corresponding to the message from the variable corresponding to the message type.

[0040] Furthermore, the processing module includes:

[0041] A first filling unit, used to fill the message template with a message body in the message to obtain a filled message body;

[0042] A second filling unit, used to apply the message header in the message to fill the preconfigured message header template to obtain a filled message header;

[0043] The response unit is used to combine the filled message body and message header to obtain the response message and return the response message to the bank system under test.

[0044] Furthermore, the simulator for banking system testing further comprises:

[0045] A new module is newly added, which is used to determine whether there is a message template corresponding to the message type in the preconfigured message templates according to the preconfigured message template and message type correspondence table. If not, a message template corresponding to the message type is generated, and the correspondence between the message template and the message type is added to the preconfigured message template and message type correspondence table.

[0046] Furthermore, the simulator for banking system testing further comprises:

[0047] The switching module is used to receive the message sent by the bank system under test and obtain the message type corresponding to the message if the pre-configured simulator switch is in the on state.

[0048] Furthermore, the response module includes:

[0049] The encryption unit is used to encrypt the message obtained after filling as a response message and return it to the bank system under test.

[0050] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the message processing method for testing a banking system when executing the program.

[0051] In a fourth aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, which, when executed, implement the message processing method for banking system testing.

[0052] It can be seen from the above technical solution that the present application provides a message processing method and simulator for bank system testing. The method includes: receiving a message sent by the bank system under test, and obtaining the message type corresponding to the message; determining the message template of the message according to the message type; applying the message to fill the message template, and returning the filled message as a response message to the bank system under test, which can improve the accuracy and efficiency of message processing for bank system testing, and thus improve the reliability and efficiency of bank system testing; specifically, it can solve the problem of affecting the joint test of bank business system receiving and sending messages when the receiving and sending environment is shut down for maintenance or unable to provide services; the simulator supports the receiving and sending test of all messages of this quick payment, and supports encrypted and non-encrypted simulation tests; it can be flexibly switched by adding a simulator encryption switch, and the encryption test is normally covered when the switch is on; when the switch is off, the log tracking is plain text, and the problem analysis is faster and the test efficiency is higher. This solves the dependence on the external environment and ensures that the project can be developed normally and most problems can be reproduced at any time; the simulator can automatically identify the message type, and each time a new type is added, it only needs to add the corresponding type of message template to automatically identify and return the specified message. When adding a new message type, the workload of code modification is relatively small. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 It is a schematic diagram of the digital certificate application process in the prior art;

[0055] Figure 2 It is a schematic diagram of the relationship between participating bank A, participating bank B and the regulatory agency corresponding to the message signature verification and encryption and decryption process in the prior art;

[0056] Figure 3 It is a flowchart of a message processing method for bank system testing in an embodiment of the present application;

[0057] Figure 4 It is a flowchart of step 401 and step 402 of the message processing method for bank system testing in an embodiment of the present application;

[0058] Figure 5 It is a flowchart of steps 501 to 504 of the message processing method for bank system testing in an embodiment of the present application;

[0059] Figure 6 It is a flowchart of steps 601 to 603 of the message processing method for bank system testing in an embodiment of the present application;

[0060] Figure 7 It is a flowchart of a process of determining whether to apply a simulator in an example of the present application;

[0061] Figure 8 It is a flowchart of a process of determining whether to apply a simulator to decrypt a message in an example of the present application;

[0062] Fig. 9 It is a logical schematic diagram of a message processing method for bank system testing in an example of the present application;

[0063] Fig.10 It is a flowchart of message processing for banking system testing in a specific application example of this application;

[0064] Fig.11 A schematic block diagram of the system structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0065] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0066] At present, the simulator cannot support automatic identification of different message types under specific messages. The simulator and message types are developed one-to-one. Each time a type is added, the input, output, encryption and decryption related code modules of the whole process need to be added and modified, which is time-consuming and laborious. It also does not support customized switching of specified key encryption and non-encryption, but only supports encryption or non-encryption, and does not support switching. It also supports different message formats for different messages, and the customization is very strong. For example, a region has customized according to the standard message, and can only rely on the fast payment system of its central bank institution to start and the network to be connected normally before the test can be carried out normally.

[0067] In order to solve the problems existing in the above-mentioned prior art, the embodiment of the present application provides a message processing method and simulator for bank system testing, which can overcome the problem that the regulatory system is unable to provide services externally and can ensure the normal simulation of message reception and sending of the bank's internal system, support encryption and non-encryption processing of messages according to the keys provided by the regulatory system, and can normally identify the reception and return of different messages.

[0068] At present, the digital certificate application process is as follows Figure 1 As shown, S11: participating bank A applies for a certificate from the regulatory agency; S12: the regulatory agency applies for a certificate from the certificate issuing authority; S13: participating bank A downloads the certificate from the regulatory agency: the regulatory agency's signature certificate public key, participating bank A's encryption certificate private key; the message signature verification and encryption and decryption process is, S21: participating bank A signature, encryption operation: use A bank's private key to sign, use the regulatory agency's public key to encrypt; S22: regulatory agency decryption, signature verification operation: use the regulatory agency's private key to decrypt, use A bank's public key to verify; S23: regulatory agency signature, encryption operation: use the regulatory agency's private key to sign, use B bank's public key to encrypt; S24: participating bank B decryption, signature verification operation: use bank B's private key to decrypt, use the regulatory agency's public key to verify. When executing the message signature verification and encryption and decryption process, the communication relationship between participating banks A, B and the regulatory agency is as follows: Figure 2 shown.

[0069] It should be noted that the message processing method and simulator for testing a banking system disclosed in the present application can be used in the field of financial technology, and can also be used in any field outside the field of financial technology. The application field of the message processing method and simulator for testing a banking system disclosed in the present application is not limited.

[0070] The details are described through the following embodiments.

[0071] In order to improve the accuracy and efficiency of message processing for bank system testing, and thus improve the reliability and efficiency of bank system testing, this embodiment provides a message processing method for bank system testing, wherein the execution subject is a simulator for bank system testing. The simulator for bank system testing can be deployed in a server, such as a bank server, and can also be deployed in a tester's computer, such as a Figure 3 As shown, the method specifically includes the following contents:

[0072] Step 301: Receive a message sent by the bank system under test, and obtain the message type corresponding to the message.

[0073] Specifically, the message may be a message used to test the bank system under test, and the message may include message type information; the bank system under test may be a convenient payment system. In an example, a fragment of the message may be as shown in Table 1, and the message type in Table 1 is: ***.***.001.001.01.

[0074] Table 1

[0075]

[0076]

[0077] Specifically, as shown in Table 2 and Table 3, the message types may include:

[0078] Table 2

[0079]

[0080]

[0081] Table 3

[0082]

[0083]

[0084] Among them, the request message can represent the message sent by the initiator, and the response message and error message can represent the messages received by the initiator; if an error message is returned to the tested bank system as a participating institution, it can indicate that the tested bank system is abnormal.

[0085] Step 302: Determine a message template for the message according to the message type.

[0086] In one example, the message template may be as shown in Table 4.

[0087] Table 4

[0088]

[0089]

[0090] Step 303: Fill the message template with the message, and return the filled message as a response message to the bank system under test.

[0091] Specifically, the message obtained after filling can be a message that meets the message format requirements of the regulatory system; the format of each variable in the message template is "$variable name"; the value of the variable obtained by parsing 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 empty when filling the message template. According to the message type, it can be identified which variables and templates need to be filled in the corresponding message, and the template can be named according to the message type. The message template can be generated after testing and verification, and the actual content is extracted as a variable and then used; different types of messages need to be sent in accordance with the format established by the regulatory agency. Furthermore, it is also possible to monitor the entire process of the message processing method in real time to test whether the bank system to be tested generates messages or forwards messages, etc. is abnormal; in the entire process of executing the message processing method, if the simulator reports an error, it can be determined that the bank system to be tested generates messages or forwards messages, etc. is abnormal.

[0092] In order to achieve flexible processing of encrypted and plaintext messages and improve the wide range of simulator application scenarios, see Figure 4 In one embodiment of the present application, step 301 includes:

[0093] Step 401: Receive a message sent by the bank system under test.

[0094] Step 402: Determine whether the message is a plaintext message. If so, obtain the message type from the message. If the message is an encrypted message, decrypt the message and obtain the message type from the decrypted message.

[0095] To reduce the amount of code in the simulator, see Figure 5 In one embodiment of the present application, step 301 includes:

[0096] Step 501: Receive a message sent by the bank system under test.

[0097] Step 502: Parse the message to obtain values ​​of multiple message elements.

[0098] Step 503: Save the value of each message element in its corresponding variable.

[0099] Step 504: Obtain the message type corresponding to the message from the variable corresponding to the message type.

[0100] For example, according to the message structure, the message type field is MsgDefIdr, and its position in the message corresponds to the message elements MsgDefIdr, AppHdr, BizData, MsgBody, and FpsMsg from the inside to the outside. When parsing the message, the message type will be saved in the MsgDefIdr_AppHdr_BizData_MsgBody_FpsMsg variable. You only need to get the value of this variable to determine the message type.

[0101] Since the message header structures of various message types are the same, in order to further reduce the amount of simulator code and reduce repeated operations, see Figure 6 In one embodiment of the present application, step 303 includes:

[0102] Step 601: Fill the message template with the message body in the message to obtain a filled message body.

[0103] Specifically, the message template may be a message template corresponding to a message body in the message.

[0104] Step 602: Use the message header in the message to fill the preconfigured message header template to obtain a filled message header.

[0105] Specifically, a message header template and message templates corresponding to each message type may be pre-configured in the simulator; the pre-configured message header template may be set according to actual conditions, and this application does not impose any restrictions on this.

[0106] Step 603: Combine the filled message body and message header to obtain the response message and return the response message to the bank system under test.

[0107] Specifically, the common parts can be adjusted uniformly without adjusting the message header for each message type separately; when a new message type is added, the pre-configured message header template can be reused without any additional modification.

[0108] In order to improve the universality of the message template, in one embodiment of the present application, after step 301, the following is further included:

[0109] According to the pre-configured message template and message type correspondence table, determine whether there is a message template corresponding to the message type in the pre-configured message templates; if not, generate a message template corresponding to the message type, and add the correspondence between the message template and the message type to the pre-configured message template and message type correspondence table.

[0110] Specifically, the simulator project may pre-configure message template resources and the message template and message type correspondence table, and the pre-configured message template and message type correspondence table may include: the correspondence between the name of the configured message template and the message type; and may implement processing of messages of multiple message types.

[0111] In order to further improve the flexibility of bank system testing, in one embodiment of the present application, step 301 includes: if the preconfigured simulator switch is in the on state, receiving a message sent by the bank system under test, and obtaining a message type corresponding to the message.

[0112] Specifically, if the pre-configured simulator switch is in the off state, the bank system under test sends the message to the supervision system; the pre-configured simulator switch can be set in the simulator or the bank system under test. Figure 7 As shown, in one example, the bank system under test can receive a request message and determine whether the simulator switch is in the on state. If so, the request message is forwarded to the simulator; otherwise, the request message is forwarded to the regulatory system to complete the message processing process and improve the flexibility of message testing.

[0113] In order to further improve the security of message transmission, in one embodiment of the present application, step 501 includes: encrypting the filled message as a response message and returning it to the bank system under test.

[0114] In order to further illustrate the present solution, the present application provides an application example of a message processing method for bank system testing, which is specifically described as follows:

[0115] 1. Prepare the plaintext message to be tested.

[0116] 2. Determine whether the encryption switch is turned on. If so, the message can be encrypted and sent to the simulator. Otherwise, the plaintext message is sent to the simulator. The encryption switch can be set in the simulator or the bank system under test.

[0117] 3. Determine whether the encryption switch is on. If so, the simulator decrypts the message. Otherwise, decryption is not required and the message is parsed to obtain the message type. Figure 8As shown, in one example, the bank system under test can receive a request message and forward the request message to the simulator. The simulator determines whether the request message is an encrypted message. If it is an encrypted message, it is decrypted and received according to the key. Otherwise, it does not need to be decrypted and received. Specifically, the message type identification process includes:

[0118] Each message contains a message type field, which is located in a fixed position. Based on this, after parsing the message, the value of the specified element can be obtained to confirm the message type.

[0119] 4. Fill in the specified template message according to the message type.

[0120] Specifically, before the message is filled, the variables to be filled are prepared, the value of each variable is saved in the variable, and then the variable value is filled into the corresponding template by specifying the variable and template path, and the filled message is returned. The format of each variable in the template is "$variable name". If the value of the corresponding variable is not in the context, it is empty by default. According to the message type, it can be identified which variables and templates need to be filled in the corresponding message. The template can be named according to the message type.

[0121] In the message, the content under the AppHdr element is the message header, which has the same structure. Therefore, it is extracted into a single template common.head.amcm.bank.vm. On the one hand, it can reduce the content of each template, and on the other hand, it can reduce repeated operations. The common part can be adjusted uniformly, and there is no need to adjust the message header for each type separately. When adding a new message type, the message header can be reused without additional modification.

[0122] 5. Encrypt the obtained message and return it.

[0123] The message transmission actually happens in the simulator. When receiving a message request, the simulator will return the identified return message according to the message type. For example, if you send ***.***.001.001.01 and respond with ***.***.004.001.01, you only need to configure the corresponding relationship, return the template and the value to be filled.

[0124] When sending or receiving a message, the encryption switch will be determined first. If the switch is on, encryption and decryption will be performed; sending messages requires encryption, and receiving messages requires decryption. SignSN is the signature SN number, EncrptnSN is the encryption SN number, and each SN number corresponds to a key. Both the sending and receiving institutions need to prepare the SN number key in the system in advance. For example, the key can be issued by the Monetary Authority. After encryption, the values ​​of the Sign, Pwd, and MsgBody nodes will be filled, where the value of the MsgBody node is the encrypted content of the message body.

[0125] When processing messages such as transfers and message signature verification, you can also pre-set the return result in the simulator to indicate the success or failure of the message format test. If the message template is filled with the message without error, the message format is correct, otherwise there is an error. You can also manually send a message to the simulator as the recipient's message after the message template is filled with the message, to assume that the business process corresponding to this message is executed successfully. Fig. 9 As shown, the present application provides an example of a message processing method for bank system testing, which is specifically described as follows:

[0126] The simulator receives the message sent by participating bank A and identifies the message type. If the message type is address registration, it determines whether the address registration is successful, generates an address response message, and returns the address response message to participating bank A; if the message type is transfer payment, it determines whether the transfer payment is successful, generates a receipt confirmation message, and returns the receipt confirmation message to participating bank A; if the message type is account verification, it determines whether the account verification is successful, generates a verification result message, and returns the verification result message to participating bank A; if the address registration fails, a rejection message is generated and returned to participating bank A; if the transfer payment fails, a rejection message is generated and returned to participating bank A; if the account verification fails, a rejection message is generated and returned to participating bank A.

[0127] From the software level, in order to improve the accuracy and efficiency of the message processing for the bank system test, and thus improve the reliability and efficiency of the bank system test, the present application provides an embodiment of a simulator for the bank system test for implementing all or part of the contents of the message processing method for the bank system test, see Fig.10 The simulator for banking system testing specifically includes the following contents:

[0128] The receiving module 11 is used to receive the message sent by the bank system under test and obtain the message type corresponding to the message;

[0129] A determination module 12, configured to determine a message template of the message according to the message type;

[0130] The processing module 13 is used to fill the message template with the message, and return the filled message as a response message to the bank system under test.

[0131] In one embodiment of the present application, the receiving module includes:

[0132] A first receiving unit, used for receiving a message sent by a bank system under test;

[0133] The first obtaining unit is used to determine whether the message is a plaintext message. If so, the message type is obtained from the message. If the message is an encrypted message, the message is decrypted and the message type is obtained from the decrypted message.

[0134] In one embodiment of the present application, the receiving module includes:

[0135] A second receiving unit, used for receiving a message sent by the bank system under test;

[0136] A parsing unit, used for parsing the message to obtain values ​​of multiple message elements;

[0137] A storage unit, used to store the value of each message element in its corresponding variable;

[0138] The second obtaining unit is used to obtain the message type corresponding to the message from the variable corresponding to the message type.

[0139] In one embodiment of the present application, the processing module includes:

[0140] A first filling unit, used to fill the message template with a message body in the message to obtain a filled message body;

[0141] A second filling unit, used to apply the message header in the message to fill the preconfigured message header template to obtain a filled message header;

[0142] The response unit is used to combine the filled message body and message header to obtain the response message and return the response message to the bank system under test.

[0143] In one embodiment of the present application, the simulator for banking system testing further includes:

[0144] A new module is newly added, which is used to determine whether there is a message template corresponding to the message type in the preconfigured message templates according to the preconfigured message template and message type correspondence table. If not, a message template corresponding to the message type is generated, and the correspondence between the message template and the message type is added to the preconfigured message template and message type correspondence table.

[0145] In one embodiment of the present application, the simulator for banking system testing further includes:

[0146] The switching module is used to receive the message sent by the bank system under test and obtain the message type corresponding to the message if the pre-configured simulator switch is in the on state.

[0147] In one embodiment of the present application, the response module includes:

[0148] The encryption unit is used to encrypt the message obtained after filling as a response message and return it to the bank system under test.

[0149] The embodiment of the simulator for bank system testing provided in this specification can be specifically used to execute the processing flow of the embodiment of the message processing method for bank system testing described above. Its functions will not be described in detail here, and reference may be made to the detailed description of the embodiment of the message processing method for bank system testing described above.

[0150] As can be seen from the above description, the message processing method and simulator for bank system testing provided by the present application can improve the accuracy and efficiency of message processing for bank system testing, and thus can improve the reliability and efficiency of bank system testing; specifically, it can solve the problem of affecting the joint testing of bank business system sending and receiving messages when the sending and receiving environment is shut down for maintenance or cannot provide services; the simulator supports the sending and receiving test of all messages of this quick payment, and supports encrypted and non-encrypted simulation tests; it can be flexibly switched by adding a simulator encryption switch, and the encryption test is normally covered when the switch is on; when the switch is off, the log tracking is plain text, and the problem analysis is faster and the testing efficiency is higher. Thus, the dependence on the external environment is solved, ensuring that the project can be developed normally and most problems can be reproduced at any time; the simulator can automatically identify the message type, and each new type only needs to add the corresponding type of message template to automatically identify and return the specified message. When adding a new message type, the workload of code transformation is small.

[0151] Fig.11 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Fig.11 As shown, the electronic device may include: a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 communicate with each other through the communication bus 404. The processor 401 may call the logic instructions in the memory 403 to execute the following method: receiving a message sent by the bank system under test and obtaining a message type corresponding to the message; determining a message template of the message according to the message type; filling the message template with the message, and returning the filled message as a response message to the bank system under test.

[0152] In addition, the logic instructions in the above-mentioned memory 403 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0153] The present embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: receiving a message sent by a bank system under test, and obtaining a message type corresponding to the message; determining a message template of the message according to the message type; filling the message template with the message, and returning the filled message as a response message to the bank system under test.

[0154] The present embodiment provides a computer-readable storage medium, which stores a computer program. The computer program enables the computer to execute the methods provided by the above-mentioned method embodiments, for example, including: receiving a message sent by the bank system under test, and obtaining a message type corresponding to the message; determining a message template of the message according to the message type; filling the message template with the message, and returning the filled message as a response message to the bank system under test.

[0155] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0156] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0159] In the description of this specification, the description with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0160] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A message processing method for bank system testing, characterized in that: include: Receive the message sent by the bank system under test and obtain the message type corresponding to the message; Determining a message template for the message according to the message type; Filling the message template with the message, and returning the filled message as a response message to the bank system under test; The applying the message to fill the message template includes: Assign the value of the variable obtained by parsing the message 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, when filling the message template, the value of the variable is defaulted to empty, and the message obtained after filling is a message that meets the message format requirements, and the format of each variable in the message template is: $variable name; The receiving of a message sent by the bank system under test and obtaining a message type corresponding to the message includes: Determine whether the pre-configured simulator switch is in the on state, and if the pre-configured simulator switch is in the on state, receive the message sent by the bank system under test; Determine whether the message is a plaintext message. If so, parse the message to obtain values ​​of multiple message elements, save the values ​​of each message element in a corresponding variable, and obtain the message type corresponding to the message from the variable corresponding to the message type; If the message is an encrypted message, decrypt the message, parse the decrypted message, obtain values ​​of multiple message elements, save the values ​​of each message element in a corresponding variable, and obtain the message type corresponding to the message from the variable corresponding to the message type; the message types include: address registration, transfer payment and account verification; The message processing method for bank system testing further includes: if the pre-configured simulator switch is not turned on, forwarding the message to the supervision system to complete the message processing process; The applying the message to fill the message template and returning the filled message as a response message to the bank system under test includes: Filling the message template with the message body in the message to obtain a filled message body; Filling a preconfigured message header template with the message header in the message to obtain a filled message header; Combining the filled message body and message header to obtain the response message and returning the response message to the bank system under test; After receiving the message sent by the tested bank system and obtaining the message type corresponding to the message, the method further includes: According to the pre-configured message template and message type correspondence table, determine whether there is a message template corresponding to the message type in the pre-configured message template, if not, generate a message template corresponding to the message type, and add the correspondence between the message template and the message type to the pre-configured message template and message type correspondence table, and reuse the pre-configured message header template when adding a new message type; The step of returning the filled message as a response message to the bank system under test includes: The padded message is used as a response message and then encrypted and returned to the bank system under test; The message processing method for bank system testing further includes: By real-time monitoring of the entire process of the message processing method, it is tested whether the message generation or message forwarding of the bank system under test is abnormal; in the entire process of executing the message processing method, if the simulator reports an error, it is determined that the message generation or message forwarding of the bank system under test is abnormal.

2. A simulator for testing banking systems, characterized in that: include: A receiving module, used to receive a message sent by the bank system under test and obtain a message type corresponding to the message; A determination module, used to determine a message template of the message according to the message type; A processing module, used for filling the message template with the message, and returning the filled message as a response message to the bank system under test; The applying the message to fill the message template includes: Assign the value of the variable obtained by parsing the message 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, when filling the message template, the value of the variable is defaulted to empty, and the message obtained after filling is a message that meets the message format requirements, and the format of each variable in the message template is: $variable name; The receiving of a message sent by the bank system under test and obtaining a message type corresponding to the message includes: Determine whether the pre-configured simulator switch is in the on state, and if the pre-configured simulator switch is in the on state, receive the message sent by the bank system under test; Determine whether the message is a plaintext message. If so, parse the message to obtain values ​​of multiple message elements, save the values ​​of each message element in a corresponding variable, and obtain the message type corresponding to the message from the variable corresponding to the message type; If the message is an encrypted message, decrypt the message, parse the decrypted message, obtain values ​​of multiple message elements, save the values ​​of each message element in a corresponding variable, and obtain the message type corresponding to the message from the variable corresponding to the message type; the message types include: address registration, transfer payment and account verification; The simulator for bank system testing is further used to: if the pre-configured simulator switch is not turned on, forward the message to the supervision system to complete the message processing process; The applying the message to fill the message template and returning the filled message as a response message to the bank system under test includes: Filling the message template with the message body in the message to obtain a filled message body; Filling a preconfigured message header template with the message header in the message to obtain a filled message header; Combining the filled message body and message header to obtain the response message and returning the response message to the bank system under test; After receiving the message sent by the tested bank system and obtaining the message type corresponding to the message, the method further includes: According to the pre-configured message template and message type correspondence table, determine whether there is a message template corresponding to the message type in the pre-configured message template, if not, generate a message template corresponding to the message type, and add the correspondence between the message template and the message type to the pre-configured message template and message type correspondence table, and reuse the pre-configured message header template when adding a new message type; The step of returning the filled message as a response message to the bank system under test includes: The padded message is used as a response message and then encrypted and returned to the bank system under test; The simulator for banking system testing is also used for: By real-time monitoring of the entire process of the message processing method, it is tested whether the message generation or message forwarding of the bank system under test is abnormal; in the entire process of executing the message processing method, if the simulator reports an error, it is determined that the message generation or message forwarding of the bank system under test is abnormal.

3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the message processing method for bank system testing described in claim 1 is implemented.

4. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed, the message processing method for bank system testing described in claim 1 is implemented.

Citation Information

Patent Citations

  • Message testing method for front-end system, and simulation baffle system

    CN106027330A

  • Test method and device and storage medium

    CN111159053A

  • Request message processing method, equipment, server and medium

    CN113438134A