Message interaction method and device, storage medium and electronic equipment
Through the target simulator, the communication system of third-party institutions and financial institutions is simulated to interact with messages, and the problem of inefficiency caused by relying on third-party institutions in the existing technology is solved, and efficient testing and encryption and decryption processing is achieved, which improves the efficiency of the data interaction test. System stability and customer experience.
Patent Information
- Application Number
- CN202410938180.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-12
AI Technical Summary
In the prior art, message interaction testing relies on third-party institutions, resulting in low testing efficiency.
The target simulator receives transaction request messages sent by the target financial institution's trading system, analyzes and simulates the interfaces of the third-party institutions, interacts with the target financial institution's trading system, realizes signature verification and decryption processing, and generates target response messages. Reduce dependence on third-party institutions.
Improve the efficiency of message interactive testing, realize the sending and receiving simulation of message of different third-party institutions and transactions, and automatically encrypt and decrypt and add and verify, improve the security and reliability of the system, improve the efficiency of national secrets transformation and System management operation and maintenance level.
Smart Images

Figure CN119011192A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology or other related fields, and in particular, to a message interaction method, device, storage medium and electronic device. Background Art
[0002] There are a large number of scenarios in which the financial systems of financial institutions (such as transfer systems) interact with third-party institutions. As the transformation of domestic encryption in the financial field proceeds in depth, financial institutions need to test the interaction process with third-party institutions during the transformation test. At present, the existing technology relies on third-party institutions when testing message interactions, resulting in low testing efficiency.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a message interaction method, device, storage medium and electronic device to at least solve the technical problem in the prior art that testing message interaction relies on a third party organization, resulting in low testing efficiency.
[0005] According to one aspect of an embodiment of the present invention, a message interaction method is provided, comprising: receiving a transaction request message sent by a transaction system of a target financial institution through a target simulator, wherein the target simulator is used to simulate an interface of a third-party institution to interact with the transaction system of the target financial institution; parsing the transaction request message to obtain transaction identification information and identification information of the third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify identity information of the third-party institution; if the transaction identification information is target transaction identification information, then verifying and decrypting the transaction request message according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is a new version of the transaction identification information after a version update of the old version of the transaction identification information; generating a target response message according to the processing result and the transaction identification information, and returning the target response message to the transaction system of the target financial institution.
[0006] Furthermore, the transaction request message is parsed to obtain transaction identification information and identification information of a third-party institution, including: obtaining a pre-configured message parsing template; parsing the transaction request message according to preset field information in the message parsing template to obtain transaction identification information and identification information of the third-party institution.
[0007] Furthermore, after parsing the transaction request message to obtain the transaction identification information and the identification information of the third-party institution, the method also includes: obtaining the target transaction identification information; matching the transaction identification information with multiple transaction identification information contained in the target transaction identification information to obtain a matching result; if the matching result indicates that there is transaction identification information in the target transaction identification information that is identical to the transaction identification information, determining that the transaction identification information is the target transaction identification information.
[0008] Furthermore, the transaction request message is verified and decrypted based on the identification information of the third-party organization to obtain a processing result, including: obtaining a target key corresponding to the identification information of the third-party organization from the configuration information; and the transaction request message is verified and decrypted based on the target key to obtain a processing result.
[0009] Furthermore, a target response message is generated based on the processing result and the transaction identification information, including: if the processing result indicates a signature verification failure and / or a decryption failure, assembling the messages based on the transaction identification information to obtain a first message; and encrypting and signing the first message based on the target secret key to obtain a target response message.
[0010] Furthermore, a target response message is generated based on the processing result and the transaction identification information, including: if the processing result indicates that the signature verification is successful and the decryption is successful, the message is assembled based on the transaction identification information and the preset transaction return code to obtain a second message; the second message is encrypted and signed based on the target secret key to obtain a target response message.
[0011] Furthermore, the method also includes: after receiving the transaction request message sent by the transaction system of the target financial institution through the target simulator, displaying the transaction request message and the timestamp corresponding to the transaction request message through the visualization window of the target simulator; after returning the target response message to the transaction system of the target financial institution, displaying the target response message and the timestamp corresponding to the target response message through the visualization window of the target simulator.
[0012] According to another aspect of an embodiment of the present invention, a message interaction device is also provided, including: a receiving module, used to receive a transaction request message sent by a transaction system of a target financial institution through a target simulator, wherein the target simulator is used to simulate an interface of a third-party institution to interact with the transaction system of the target financial institution; a first processing module, used to parse the transaction request message to obtain transaction identification information and identification information of the third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify the identity information of the third-party institution; a second processing module, used to verify and decrypt the transaction request message according to the identification information of the third-party institution if the transaction identification information is the target transaction identification information, and obtain a processing result, wherein the target transaction identification information is a new version of the transaction identification information after the old version of the transaction identification information is updated; a sending module, used to generate a target response message based on the processing result and the transaction identification information, and return the target response message to the transaction system of the target financial institution.
[0013] Furthermore, the first processing module includes: a first acquisition module, used to acquire a pre-configured message parsing template; a third processing module, used to parse the transaction request message according to preset field information in the message parsing template to obtain transaction identification information and identification information of a third-party institution.
[0014] Furthermore, the message interaction device also includes: a second acquisition module, which is used to obtain the target transaction identification information after parsing the transaction request message to obtain the transaction identification information and the identification information of the third-party institution; a fourth processing module, which is used to match the transaction identification information with multiple transaction identification information included in the target transaction identification information to obtain a matching result; and a determination module, which is used to determine that the transaction identification information is the target transaction identification information if the matching result indicates that there is transaction identification information in the target transaction identification information that is the same as the transaction identification information.
[0015] Furthermore, the second processing module includes: a third acquisition module, used to obtain a target key corresponding to the identification information of the third-party organization from the configuration information; a fifth processing module, used to verify and decrypt the transaction request message according to the target key to obtain a processing result.
[0016] Furthermore, the sending module includes: a sixth processing module, which is used to assemble the message according to the transaction identification information to obtain the first message if the processing result indicates that the signature verification fails and / or the decryption fails; and a seventh processing module, which is used to encrypt and sign the first message according to the target key to obtain a target response message.
[0017] Furthermore, the sending module also includes: an eighth processing module, which is used to assemble the message according to the transaction identification information and the preset transaction return code to obtain the second message if the processing result indicates that the signature verification is successful and the decryption is successful; a ninth processing module, which is used to encrypt and sign the second message according to the target secret key to obtain the target response message.
[0018] Furthermore, the message interaction device also includes: a first display module, which is used to display the transaction request message and the timestamp corresponding to the transaction request message through the visualization window of the target simulator after receiving the transaction request message sent by the transaction system of the target financial institution through the target simulator; and a second display module, which is used to display the target response message and the timestamp corresponding to the target response message through the visualization window of the target simulator after returning the target response message to the transaction system of the target financial institution.
[0019] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and the computer program implements the above-mentioned message interaction method when executed by a processor.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned message interaction method when running.
[0021] According to another aspect of an embodiment of the present invention, an electronic device is also provided, which includes one or more processors; a memory for storing one or more programs, so that when the one or more programs are executed by the one or more processors, the one or more processors are implemented to run the programs, wherein the programs are configured to execute the above-mentioned message interaction method when running.
[0022] In an embodiment of the present invention, a method of simulating message interaction between a third-party institution and a transaction system of a financial institution through a simulator is adopted. First, a transaction request message sent by the transaction system of a target financial institution is received through a target simulator, wherein the target simulator is used to simulate the interface of the third-party institution to interact with the transaction system of the target financial institution; the transaction request message is parsed to obtain transaction identification information and identification information of the third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify the identity information of the third-party institution; if the transaction identification information is the target transaction identification information, the transaction request message is verified and decrypted according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is a new version of the transaction identification information after the old version of the transaction identification information is updated; a target response message is generated according to the processing result and the transaction identification information, and the target response message is returned to the transaction system of the target financial institution.
[0023] In the above process, the simulator simulates the message interaction between the transaction systems of third-party institutions and financial institutions, which can realize the simulation of message sending and receiving of different third-party institutions and different transactions, and realize automatic encryption and decryption as well as signing and verification of online transactions, overcoming the difficulties such as large transaction volume, multiple transaction types and multiple third-party institutions, thereby making the testing work more accurate and efficient, improving the security and reliability of the system, improving the stability of production transactions of various applications, improving customer experience, and thereby improving the efficiency of national encryption transformation and the level of system management and operation.
[0024] It can be seen that through the technical solution of the present invention, the purpose of reducing the dependence on third-party organizations in the message interaction test process is achieved, thereby achieving the technical effect of improving the test efficiency of message interaction, and further solving the technical problem of relying on third-party organizations when testing message interaction in the prior art, resulting in low test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 is a flow chart of an optional message interaction method according to an embodiment of the present invention;
[0027] Figure 2 is a schematic diagram of an optional message interaction simulator according to an embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of an optional message interaction device according to an embodiment of the present invention;
[0029] Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between the system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0033] Example 1
[0034] According to an embodiment of the present invention, an embodiment of a message interaction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] Figure 1 is a flow chart of an optional message interaction method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0036] Step S101, receiving a transaction request message sent by a transaction system of a target financial institution through a target simulator, wherein the target simulator is used to simulate an interface of a third-party institution to interact with the transaction system of the target financial institution.
[0037] Optionally, in an embodiment of the present invention, a third-party interactive message simulator (i.e., a target simulator) that supports the national encryption algorithm is provided to simulate the interface of a third-party institution through the simulator to interact with the transaction system of a target financial institution (such as a bank), thereby receiving the transaction request message sent by the transaction system of the target financial institution through the target simulator.
[0038] For example, the simulator can be configured with the secret keys of multiple partners (i.e., third-party institutions), and with access / outgoing message templates corresponding to multiple transaction codes. Based on this template, the request message of the target financial institution's transaction system can be parsed, and multiple return codes can be configured, such as success, failure, unknown, etc.
[0039] Optionally, after the configuration is completed, the simulator is turned on, and starts to monitor the set port, waiting for the message access sent by the transaction system of the target financial institution to the third-party institution.
[0040] Step S102, parse the transaction request message to obtain transaction identification information and identification information of a third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify identity information of the third-party institution.
[0041] Optionally, after receiving the transaction request message sent by the transaction system of the target financial institution, for example, after monitoring the request, the message is parsed, that is, the transaction request message is parsed to obtain transaction identification information and identification information of the third-party institution, wherein the transaction identification information may be a transaction code, and the identification information of the third-party institution may be a partner code.
[0042] In an optional embodiment, the transaction request message is parsed to obtain transaction identification information and identification information of a third-party institution, including: obtaining a pre-configured message parsing template; parsing the transaction request message according to preset field information in the message parsing template to obtain transaction identification information and identification information of the third-party institution.
[0043] Optionally, in the process of parsing the transaction request message to obtain the transaction identification information and the identification information of the third-party institution, a pre-configured message parsing template is first obtained, for example, the aforementioned access message template, and then the transaction request message can be parsed according to the preset field information in the message parsing template to obtain the transaction identification information and the identification information of the third-party institution, for example, the transaction code and the partner code are split according to the message parsing template.
[0044] Step S103, if the transaction identification information is the target transaction identification information, the transaction request message is verified and decrypted according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is the new version of the transaction identification information after the old version of the transaction identification information is updated.
[0045] Optionally, the target transaction identification information may be a national secret version of the new transaction code. After the transaction code and the partner code are split out according to the message parsing template, it may be determined whether it is a national secret version of the new transaction code based on the transaction code. If the transaction code is a national secret version of the new transaction code (i.e., if the transaction identification information is the target transaction identification information), the transaction request message may be verified and decrypted based on the partner code to obtain a processing result, for example, by calling the soft encryption interface to perform a verification and decryption process on the message body (MsgBody).
[0046] In an optional embodiment, the transaction request message is verified and decrypted based on the identification information of the third-party organization to obtain a processing result, including: obtaining a target key corresponding to the identification information of the third-party organization from the configuration information; and the transaction request message is verified and decrypted based on the target key to obtain a processing result.
[0047] Optionally, in the process of verifying and decrypting the transaction request message based on the identification information of the third-party organization to obtain the processing result, first obtain the target key corresponding to the identification information of the third-party organization from the configuration information. For example, obtain the keys of the SM2 algorithm and SM4 algorithm corresponding to the local configuration (i.e., the target key) according to the split partner code, and then verify and decrypt the transaction request message based on the keys of the SM2 algorithm and SM4 algorithm to obtain the processing result.
[0048] It should be noted that by verifying and decrypting transaction request messages based on the identification information of a third-party organization, it is possible to simulate the sending and receiving of messages by different third-party organizations and different transactions, and to automatically encrypt and decrypt online transactions as well as verify and sign them. This overcomes the difficulties of large transaction volumes, multiple transaction types, and multiple third-party organizations, thereby making testing more accurate and efficient, improving system security and reliability, enhancing the stability of production transactions of various applications, improving customer experience, and thereby improving the efficiency of national encryption transformation and the level of system management and operation.
[0049] Step S104: Generate a target response message according to the processing result and the transaction identification information, and return the target response message to the transaction system of the target financial institution.
[0050] Optionally, after obtaining the processing result, a target response message may be generated based on the processing result and transaction identification information (ie, transaction code), and the target response message may be returned to the transaction system of the target financial institution.
[0051] In an optional embodiment, a target response message is generated based on the processing result and the transaction identification information, including: if the processing result indicates a signature verification failure and / or a decryption failure, assembling the messages based on the transaction identification information to obtain a first message; and encrypting and signing the first message based on the target key to obtain a target response message.
[0052] Optionally, in the process of generating a target response message based on the processing result and the transaction identification information, if the processing result indicates that the signature verification and / or decryption failed, the message is assembled based on the transaction identification information to obtain a first message, and then the first message is encrypted and signed based on the target secret key to obtain a target response message. For example, the transaction request message is verified and decrypted based on the secret keys of the SM2 algorithm and the SM4 algorithm. If the signature verification and / or decryption fails, the return message (i.e., the first message) is assembled based on the transaction code, and the assembled return message is automatically encrypted and signed based on its partner secret key (such as the corresponding secret key of the SM2 algorithm and the SM4 algorithm) to obtain a target response message to be returned to the transaction system of the target financial institution.
[0053] In an optional embodiment, a target response message is generated based on the processing result and the transaction identification information, including: if the processing result indicates that the signature verification is successful and the decryption is successful, the message is assembled based on the transaction identification information and a preset transaction return code to obtain a second message; the second message is encrypting and signing based on the target secret key to obtain a target response message.
[0054] Optionally, in the process of generating a target response message based on the processing result and the transaction identification information, if the processing result indicates that the signature verification is successful and the decryption is successful, the message is assembled based on the transaction identification information and the preset transaction return code to obtain a second message, and then the second message is encrypted and signed based on the target secret key to obtain a target response message. For example, the transaction request message is verified and decrypted based on the secret key of the SM2 algorithm and the SM4 algorithm. If the signature verification is successful and the decryption is successful, the corresponding transaction message configuration can be read based on the transaction code and the return code pre-configured by the tester, and the return message (i.e., the second message) can be automatically assembled. The assembled return message is automatically encrypted and signed based on its partner secret key (such as the corresponding SM2 algorithm and SM4 algorithm secret key) to obtain a target response message to be returned to the transaction system of the target financial institution.
[0055] It should be noted that by generating the target response message based on the processing results and transaction identification information, it is possible to simulate the sending and receiving of messages of different third-party institutions and different transactions, and realize automatic encryption and decryption as well as signing and verification of online transactions, overcoming difficulties such as large transaction volumes, multiple transaction types, and multiple third-party institutions, thereby making testing more accurate and efficient, improving system security and reliability, enhancing the stability of production transactions of various applications, improving customer experience, and thereby improving the efficiency of national encryption transformation and the level of system management and operation.
[0056] Based on the scheme defined by the above steps S101 to S104, it can be known that in an embodiment of the present invention, a method of simulating message interaction between a third-party institution and a financial institution's transaction system through a simulator is adopted. First, a transaction request message sent by the target financial institution's transaction system is received through a target simulator, wherein the target simulator is used to simulate the interface of the third-party institution to interact with the target financial institution's transaction system; the transaction request message is parsed to obtain transaction identification information and third-party institution identification information, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the third-party institution identification information is used to uniquely identify the identity information of the third-party institution; if the transaction identification information is the target transaction identification information, the transaction request message is verified and decrypted according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is a new version of the transaction identification information after the old version of the transaction identification information is updated; a target response message is generated according to the processing result and the transaction identification information, and the target response message is returned to the transaction system of the target financial institution.
[0057] It is easy to notice that in the above process, by simulating the message interaction between the transaction systems of third-party institutions and financial institutions through the simulator, it is possible to realize the simulation of message sending and receiving of different third-party institutions and different transactions, and realize automatic encryption and decryption as well as signing and verification of online transactions, overcoming the difficulties such as large transaction volume, multiple transaction types and multiple third-party institutions, thereby making the testing work more accurate and efficient, improving the security and reliability of the system, enhancing the stability of production transactions of various applications, improving customer experience, and thereby improving the efficiency of national encryption transformation and the level of system management and operation.
[0058] It can be seen that through the technical solution of the present invention, the purpose of reducing the dependence on third-party organizations in the message interaction test process is achieved, thereby achieving the technical effect of improving the test efficiency of message interaction, and further solving the technical problem of relying on third-party organizations when testing message interaction in the prior art, resulting in low test efficiency.
[0059] In an optional embodiment, after parsing the transaction request message to obtain the transaction identification information and the identification information of the third-party institution, the target transaction identification information is obtained; the transaction identification information is matched with multiple transaction identification information included in the target transaction identification information to obtain a matching result; if the matching result indicates that there is transaction identification information in the target transaction identification information that is identical to the transaction identification information, then the transaction identification information is determined to be the target transaction identification information.
[0060] Optionally, after parsing the transaction request message to obtain the transaction identification information and the identification information of the third-party institution, for example, after splitting the transaction code and the partner code according to the message parsing template, it can be determined whether it is the new national secret version transaction code based on the transaction code.
[0061] Optionally, first obtain the target transaction identification information, then match the transaction identification information with multiple transaction identification information included in the target transaction identification information to obtain a matching result, and if the matching result indicates that there is transaction identification information identical to the transaction identification information in the target transaction identification information, then determine that the transaction identification information is the target transaction identification information. For example, obtain a national secret version of a new transaction code, then match the split transaction code with multiple new transaction codes included in the national secret version of the new transaction code, if a new transaction code identical to the split transaction code is matched from the multiple new transaction codes, then it is considered that the split transaction code is the national secret version of the new transaction code.
[0062] It should be noted that by matching the transaction identification information with multiple transaction identification information contained in the target transaction identification information, it is possible to accurately determine whether the split transaction code is the new national secret version transaction code, thereby improving the efficiency of the national secret transformation.
[0063] In an optional embodiment, after receiving the transaction request message sent by the transaction system of the target financial institution through the target simulator, the transaction request message and the timestamp corresponding to the transaction request message are displayed through the visualization window of the target simulator; after returning the target response message to the transaction system of the target financial institution, the target response message and the timestamp corresponding to the target response message are displayed through the visualization window of the target simulator.
[0064] Optionally, during the simulation test, the simulator will print out the received message, the returned message and the timestamp in the window for the tester to verify the results by backtracking. Figure 2 FIG. 1 is a schematic diagram of an optional message interaction simulator according to an embodiment of the present invention. For example, after receiving a transaction request message sent by a transaction system of a target financial institution through a target simulator, a visualization window (such as Figure 2 The received message display area shown in the figure displays the transaction request message and the timestamp corresponding to the transaction request message; after the target response message is returned to the transaction system of the target financial institution, the target response message and the timestamp corresponding to the target response message can be displayed through the visualization window of the target simulator.
[0065] In an embodiment of the present invention, a method of simulating message interaction between a third-party institution and a transaction system of a financial institution through a simulator is adopted. First, a transaction request message sent by the transaction system of a target financial institution is received through a target simulator, wherein the target simulator is used to simulate the interface of the third-party institution to interact with the transaction system of the target financial institution; the transaction request message is parsed to obtain transaction identification information and identification information of the third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify the identity information of the third-party institution; if the transaction identification information is the target transaction identification information, the transaction request message is verified and decrypted according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is a new version of the transaction identification information after the old version of the transaction identification information is updated; a target response message is generated according to the processing result and the transaction identification information, and the target response message is returned to the transaction system of the target financial institution.
[0066] In the above process, the simulator simulates the message interaction between the transaction systems of third-party institutions and financial institutions, which can realize the simulation of message sending and receiving of different third-party institutions and different transactions, and realize automatic encryption and decryption as well as signing and verification of online transactions, overcoming the difficulties such as large transaction volume, multiple transaction types and multiple third-party institutions, thereby making the testing work more accurate and efficient, improving the security and reliability of the system, improving the stability of production transactions of various applications, improving customer experience, and thereby improving the efficiency of national encryption transformation and the level of system management and operation.
[0067] It can be seen that through the technical solution of the present invention, the purpose of reducing the dependence on third-party organizations in the message interaction test process is achieved, thereby achieving the technical effect of improving the test efficiency of message interaction, and further solving the technical problem of relying on third-party organizations when testing message interaction in the prior art, resulting in low test efficiency.
[0068] Example 2
[0069] According to an embodiment of the present invention, an embodiment of a message interaction device is provided, wherein: Figure 3 is a schematic diagram of an optional message interaction device according to an embodiment of the present invention, such as Figure 3As shown, the device includes: a receiving module 301, which is used to receive a transaction request message sent by a transaction system of a target financial institution through a target simulator, wherein the target simulator is used to simulate an interface of a third-party institution to interact with the transaction system of the target financial institution; a first processing module 302, which is used to parse the transaction request message to obtain transaction identification information and identification information of the third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify identity information of the third-party institution; a second processing module 303, which is used to verify and decrypt the transaction request message according to the identification information of the third-party institution if the transaction identification information is the target transaction identification information, and obtain a processing result, wherein the target transaction identification information is a new version of the transaction identification information after the old version of the transaction identification information is updated; a sending module 304, which is used to generate a target response message according to the processing result and the transaction identification information, and return the target response message to the transaction system of the target financial institution.
[0070] In the message interaction device provided in the embodiment of the present invention, a transaction request message sent by a transaction system of a target financial institution is received by a receiving module 301 through a target simulator, wherein the target simulator is used to simulate an interface of a third-party institution to interact with the transaction system of the target financial institution; a first processing module 302 parses the transaction request message to obtain transaction identification information and identification information of the third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify the identity information of the third-party institution; if the transaction identification information is the target transaction identification information, the second processing module 303 performs signature verification and decryption processing on the transaction request message according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is a new version of the transaction identification information after the old version of the transaction identification information is updated; a sending module 304 generates a target response message based on the processing result and the transaction identification information, and returns the target response message to the transaction system of the target financial institution. By simulating the message interaction between the transaction system of a third-party institution and a financial institution through a simulator, it is possible to simulate the message sending and receiving of different third-party institutions and different transactions, and realize the automatic encryption and decryption and signature verification of online transactions, overcoming the difficulties of large transaction volume, multiple transaction types, and multiple third-party institutions, thereby making the testing work more accurate and efficient, improving the security and reliability of the system, improving the stability of production transactions of various applications, improving customer experience, and thus improving the efficiency of national encryption transformation and the level of system management and operation. The purpose of reducing the dependence on third-party institutions in the message interaction test process is achieved, thereby achieving the technical effect of improving the test efficiency of message interaction, and thus solving the technical problem of relying on third-party institutions when testing message interaction in the prior art, resulting in low test efficiency.
[0071] It should be noted that the above-mentioned receiving module 301, first processing module 302, second processing module 303 and sending module 304 correspond to steps S101 to S104 in the above-mentioned embodiment, and the examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.
[0072] Optionally, the first processing module includes: a first acquisition module, used to acquire a pre-configured message parsing template; and a third processing module, used to parse the transaction request message according to preset field information in the message parsing template to obtain transaction identification information and identification information of a third-party institution.
[0073] Optionally, the message interaction device also includes: a second acquisition module, used to obtain target transaction identification information after parsing the transaction request message to obtain transaction identification information and identification information of a third-party institution; a fourth processing module, used to match the transaction identification information with multiple transaction identification information included in the target transaction identification information to obtain a matching result; and a determination module, used to determine that the transaction identification information is the target transaction identification information if the matching result indicates that there is transaction identification information in the target transaction identification information that is identical to the transaction identification information.
[0074] Optionally, the second processing module includes: a third acquisition module, used to obtain a target key corresponding to the identification information of the third-party organization from the configuration information; and a fifth processing module, used to verify and decrypt the transaction request message based on the target key to obtain a processing result.
[0075] Optionally, the sending module includes: a sixth processing module, which is used to assemble the message according to the transaction identification information to obtain the first message if the processing result indicates that the signature verification fails and / or the decryption fails; and a seventh processing module, which is used to encrypt and sign the first message according to the target key to obtain a target response message.
[0076] Optionally, the sending module also includes: an eighth processing module, which is used to assemble the message according to the transaction identification information and the preset transaction return code to obtain the second message if the processing result indicates that the signature verification is successful and the decryption is successful; and a ninth processing module, which is used to encrypt and sign the second message according to the target secret key to obtain a target response message.
[0077] Optionally, the message interaction device also includes: a first display module, which is used to display the transaction request message and the timestamp corresponding to the transaction request message through the visualization window of the target simulator after receiving the transaction request message sent by the transaction system of the target financial institution through the target simulator; and a second display module, which is used to display the target response message and the timestamp corresponding to the target response message through the visualization window of the target simulator after returning the target response message to the transaction system of the target financial institution.
[0078] Example 3
[0079] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and the computer program implements the above-mentioned message interaction method when executed by a processor.
[0080] Example 4
[0081] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned message interaction method when running.
[0082] Example 5
[0083] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, wherein: Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Figure 4 As shown, the electronic device includes one or more processors; a memory for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors are used to run the programs, wherein the programs are set to execute the above-mentioned message interaction method when running. When the processor executes the program, the following steps are implemented: receiving a transaction request message sent by the transaction system of the target financial institution through a target simulator, wherein the target simulator is used to simulate the interface of a third-party institution to interact with the transaction system of the target financial institution; parsing the transaction request message to obtain transaction identification information and identification information of the third-party institution, wherein the transaction identification information is used to uniquely identify the attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify the identity information of the third-party institution; if the transaction identification information is the target transaction identification information, then the transaction request message is verified and decrypted according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is a new version of the transaction identification information after the old version of the transaction identification information is updated; generating a target response message according to the processing result and the transaction identification information, and returning the target response message to the transaction system of the target financial institution.
[0084] Optionally, when the processor executes the program, the following steps are also implemented: obtaining a pre-configured message parsing template; parsing the transaction request message according to preset field information in the message parsing template to obtain transaction identification information and identification information of a third-party institution.
[0085] Optionally, the processor further implements the following steps when executing the program: after parsing the transaction request message to obtain the transaction identification information and the identification information of the third-party institution, obtaining the target transaction identification information; matching the transaction identification information with multiple transaction identification information contained in the target transaction identification information to obtain a matching result; if the matching result indicates that there is transaction identification information in the target transaction identification information that is identical to the transaction identification information, determining that the transaction identification information is the target transaction identification information.
[0086] Optionally, when the processor executes the program, the following steps are also implemented: obtaining a target key corresponding to the identification information of the third-party organization from the configuration information; and verifying and decrypting the transaction request message based on the target key to obtain a processing result.
[0087] Optionally, the processor further implements the following steps when executing the program: if the processing result indicates a signature verification failure and / or a decryption failure, assemble the message based on the transaction identification information to obtain a first message; encrypt and sign the first message based on the target secret key to obtain a target response message.
[0088] Optionally, the processor also implements the following steps when executing the program: if the processing result indicates that the signature verification is successful and the decryption is successful, the message is assembled according to the transaction identification information and the preset transaction return code to obtain a second message; the second message is encrypted and signed according to the target secret key to obtain a target response message.
[0089] Optionally, the processor also implements the following steps when executing the program: after receiving the transaction request message sent by the transaction system of the target financial institution through the target simulator, displaying the transaction request message and the timestamp corresponding to the transaction request message through the visualization window of the target simulator; after returning the target response message to the transaction system of the target financial institution, displaying the target response message and the timestamp corresponding to the target response message through the visualization window of the target simulator.
[0090] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0091] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0092] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0093] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0094] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0095] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0096] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of 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: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0097] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A message interaction method, characterized in that: include: Receiving a transaction request message sent by a transaction system of a target financial institution through a target simulator, wherein the target simulator is used to simulate an interface of a third-party institution to interact with the transaction system of the target financial institution; Parsing the transaction request message to obtain transaction identification information and identification information of a third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify identity information of the third-party institution; If the transaction identification information is the target transaction identification information, the transaction request message is verified and decrypted according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is the new version of the transaction identification information after the old version of the transaction identification information is updated; A target response message is generated according to the processing result and the transaction identification information, and the target response message is returned to the transaction system of the target financial institution.
2. The method according to claim 1, characterized in that The transaction request message is parsed to obtain transaction identification information and identification information of a third-party institution, including: Get the pre-configured message parsing template; The transaction request message is parsed according to the preset field information in the message parsing template to obtain the transaction identification information and the identification information of the third-party institution.
3. The method according to claim 1, characterized in that After parsing the transaction request message to obtain the transaction identification information and the identification information of the third-party institution, the method further includes: Acquiring the target transaction identification information; Matching the transaction identification information with multiple transaction identification information included in the target transaction identification information to obtain a matching result; If the matching result indicates that there is transaction identification information in the target transaction identification information that is identical to the transaction identification information, then the transaction identification information is determined to be the target transaction identification information.
4. The method according to claim 1, characterized in that: The transaction request message is signature verified and decrypted according to the identification information of the third-party institution to obtain a processing result, including: Acquire a target key corresponding to the identification information of the third-party organization from the configuration information; The transaction request message is signature verified and decrypted according to the target secret key to obtain the processing result.
5. The method according to claim 4, characterized in that Generating a target response message according to the processing result and the transaction identification information, including: If the processing result indicates that the signature verification fails and / or the decryption fails, assembling the messages according to the transaction identification information to obtain a first message; The first message is encrypted and signed according to the target secret key to obtain the target response message.
6. The method according to claim 4, characterized in that Generating a target response message according to the processing result and the transaction identification information, including: If the processing result indicates that the signature verification is successful and the decryption is successful, the message is assembled according to the transaction identification information and the preset transaction return code to obtain a second message; The second message is encrypted and signed according to the target secret key to obtain the target response message.
7. The method according to claim 1, characterized in that The method further comprises: After receiving the transaction request message sent by the transaction system of the target financial institution through the target simulator, displaying the transaction request message and the timestamp corresponding to the transaction request message through the visualization window of the target simulator; After the target response message is returned to the transaction system of the target financial institution, the target response message and the timestamp corresponding to the target response message are displayed through the visualization window of the target simulator.
8. A message interaction device, characterized in that: include: A receiving module, used for receiving a transaction request message sent by a transaction system of a target financial institution through a target simulator, wherein the target simulator is used for simulating an interface of a third-party institution to interact with the transaction system of the target financial institution; A first processing module, configured to parse the transaction request message to obtain transaction identification information and identification information of a third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of the transaction, and the identification information of the third-party institution is used to uniquely identify identity information of the third-party institution; A second processing module is used for, if the transaction identification information is the target transaction identification information, performing signature verification and decryption processing on the transaction request message according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is the new version of the transaction identification information after the old version of the transaction identification information is updated; The sending module is used to generate a target response message according to the processing result and the transaction identification information, and return the target response message to the transaction system of the target financial institution.
9. A computer program product, characterized in that It comprises a computer program, which implements the message interaction method described in any one of claims 1 to 7 when executed by a processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the message interaction method described in any one of claims 1 to 7 when running.
11. An electronic device, characterized in that: The electronic device includes one or more processors; A memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the program is configured to execute the message interaction method described in any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Information obtaining method and device and server
CN108197914A
Online transaction pre-test method and device, medium and electronic device
CN109670803A
Simulation transaction test method, simulator, equipment and storage medium
CN110309022A
Fabric-based transaction concurrency control method and system
CN114240434A
Performance test method and device for transaction system
CN117785630A
Cited By
Transaction processing method
CN121567359A
