Message interaction method and device, storage medium and electronic equipment

By simulating the interface of a third-party institution to interact with the transaction system of a financial institution through a simulator, and parsing and processing transaction request messages, the inefficiency caused by relying on third-party institutions for message interaction testing is solved, and efficient testing and system stability improvement are achieved.

CN119011192BActive Publication Date: 2025-11-04INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410938180.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2025-11-04
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

In existing technologies, message interaction testing relies on third-party organizations, resulting in low testing efficiency.

Method used

The simulator simulates the interaction between a third-party institution's interface and the financial institution's transaction system, parses transaction request messages, performs signature verification and decryption, generates response messages, and displays the interaction process through a visual window.

Benefits of technology

It enabled the simulation of message sending and receiving across different third-party institutions and transactions, improving testing efficiency, enhancing system security and reliability, and increasing the efficiency of national cryptographic standard transformation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011192B_ABST
    Figure CN119011192B_ABST
Patent Text Reader

Abstract

The application discloses a message interaction method and device, a storage medium and electronic equipment, and relates to the field of financial technology or other related fields.The method comprises the following steps: receiving a transaction request message sent by a transaction system of a target financial institution through a target simulator, the target simulator being used for simulating the interaction between the interface of a third-party institution and the transaction system of the target financial institution; analyzing the transaction request message to obtain transaction identification information and identification information of the third-party institution; if the transaction identification information is 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; and 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.The application solves the technical problem that the test efficiency is low due to the dependence on a third-party institution when testing the message interaction in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of financial technology or other related fields, in particular, to a message interaction method and device, a storage medium and an electronic device. BACKGROUND

[0002] There are a large number of scenarios for the financial system (such as a transfer system) of a financial institution to interact with a third-party institution. With the deepening of the financial field of domestic cryptographic transformation, the financial institution needs to test the interaction process with the third-party institution during the transformation test. At present, the existing technology relies on a third-party institution when testing message interaction, resulting in low test efficiency.

[0003] At present, no effective solution has been proposed for the above problems. SUMMARY

[0004] The embodiments of the present application provide a message interaction method and device, a storage medium and an electronic device to at least solve the technical problem that the existing technology relies on a third-party institution when testing message interaction, resulting in low test efficiency.

[0005] According to an aspect of the embodiments of the present application, 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 the interface of a third-party institution to interact with the transaction system of the target financial institution; analyzing 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 target transaction identification information, then 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 new transaction identification information after version updating of old 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] Further, the analyzing the transaction request message to obtain the transaction identification information and the identification information of the third-party institution comprises: obtaining a pre-configured message analysis template; analyzing the transaction request message according to preset field information in the message analysis template to obtain the transaction identification information and the identification information of the third-party institution.

[0007] Further, after the transaction request message is parsed to obtain the transaction identification information and the identification information of the third-party institution, the method further includes: obtaining target transaction identification information; matching the transaction identification information with a plurality of transaction identification information contained in the target transaction identification information to obtain a matching result; and if the matching result indicates that there is the same transaction identification information in the target transaction identification information as the transaction identification information, determining that the transaction identification information is the target transaction identification information.

[0008] Further, the transaction request message is signed and decrypted according to the identification information of the third-party institution to obtain a processing result, including: obtaining a target secret key corresponding to the identification information of the third-party institution from the configuration information; and signing and decrypting the transaction request message according to the target secret key to obtain the processing result.

[0009] Further, the target response message is generated according to the processing result and the transaction identification information, including: if the processing result indicates that the signature fails and / or the decryption fails, the first message is assembled according to the transaction identification information; and the first message is encrypted and signed according to the target secret key to obtain the target response message.

[0010] Further, the target response message is generated according to the processing result and the transaction identification information, including: if the processing result indicates that the signature succeeds and the decryption succeeds, the second message is assembled according to the transaction identification information and a preset transaction return code; and the second message is encrypted and signed according to the target secret key to obtain the target response message.

[0011] Further, the method further 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 visual window of the target simulator; and 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 visual window of the target simulator.

[0012] According to another aspect of the embodiments of the present application, a message interaction device is further provided, comprising: a receiving module, configured 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 configured to simulate 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 the third-party institution, wherein the transaction identification information is used to uniquely identify attribute information of a 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, configured to, if the transaction identification information is target transaction identification information, perform 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 new version transaction identification information after version update of old version transaction identification information; and a sending module, configured 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.

[0013] Further, the first processing module comprises: a first obtaining module, configured to obtain a pre-configured message parsing template; and a third processing module, configured to parse the transaction request message according to preset field information in the message parsing template to obtain the transaction identification information and the identification information of the third-party institution.

[0014] Further, the message interaction device further comprises: a second obtaining module, configured 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, configured to match the transaction identification information with a plurality of transaction identification information contained in the target transaction identification information to obtain a matching result; and a determining module, configured to, if the matching result indicates that there is the same transaction identification information as the transaction identification information in the target transaction identification information, determine that the transaction identification information is the target transaction identification information.

[0015] Further, the second processing module comprises: a third obtaining module, configured to obtain a target secret key corresponding to the identification information of the third-party institution from configuration information; and a fifth processing module, configured to perform signature verification and decryption processing on the transaction request message according to the target secret key to obtain the processing result.

[0016] Further, the sending module comprises: a sixth processing module, configured to, if the processing result indicates that the signature verification fails and / or the decryption fails, perform message assembly according to the transaction identification information to obtain a first message; and a seventh processing module, configured to perform encryption and signature processing on the first message according to the target secret key to obtain the target response message.

[0017] Further, the sending module further comprises: an eighth processing module configured to, if the processing result indicates that the signature verification succeeds and the decryption succeeds, perform packet assembling according to the transaction identification information and a preset transaction return code to obtain a second packet; and a ninth processing module configured to perform encryption and signature processing on the second packet according to the target secret key to obtain a target response packet.

[0018] Further, the packet interaction apparatus further comprises: a first display module configured to, after receiving the transaction request packet sent by the transaction system of the target financial institution through the target simulator, display the transaction request packet and a timestamp corresponding to the transaction request packet through a visual window of the target simulator; and a second display module configured to, after returning the target response packet to the transaction system of the target financial institution, display the target response packet and a timestamp corresponding to the target response packet through the visual window of the target simulator.

[0019] According to another aspect of the embodiments of the present application, a computer program product is further provided, comprising a computer program, which, when executed by a processor, implements the packet interaction method described above.

[0020] According to another aspect of the embodiments of the present application, a computer readable storage medium is further provided, which stores a computer program, wherein the computer program is configured to execute the packet interaction method described above when executed.

[0021] According to another aspect of the embodiments of the present application, an electronic device is further provided, which comprises one or more processors, and a memory configured to store one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement a program configured to execute the packet interaction method described above.

[0022] In the embodiments of the present application, the packet interaction between the third-party institution and the transaction system of the financial institution is simulated through a simulator. First, the transaction request packet sent by the transaction system of the target financial institution is received through the target simulator, wherein the target simulator is configured to simulate the interface of the third-party institution to interact with the transaction system of the target financial institution. The transaction request packet is parsed to obtain the transaction identification information and the identification information of the third-party institution, wherein the transaction identification information is configured to uniquely identify the attribute information of the transaction, and the identification information of the third-party institution is configured 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 packet is subjected to signature verification and decryption processing 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 transaction identification information after the version update of the old version transaction identification information. The target response packet is generated according to the processing result and the transaction identification information, and the target response packet is returned to the transaction system of the target financial institution.

[0023] In the above process, the third party institution and the financial institution transaction system are simulated by the simulator to realize the message exchange simulation of different third party institutions and different transactions, realize the automatic encryption and decryption and signature verification of online transactions, overcome the difficulties of large transaction volume, multiple transaction types and multiple third party institutions, thereby making the test work more accurate and efficient, improving the system security and reliability, improving the stability of each application production transaction, improving the customer experience, thereby improving the efficiency of the national secret transformation, and improving the system management and operation level.

[0024] Therefore, through the technical scheme of the present application, the dependence on the third party institution in the message interaction test process is reduced, thereby realizing the technical effect of improving the test efficiency of the message interaction, and further solving the technical problem of low test efficiency caused by the dependence on the third party institution in the prior art. BRIEF DESCRIPTION OF DRAWINGS

[0025] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of this application and illustrate embodiments of the present application and the description thereof serve to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0026] Figure 1 is a flowchart of an optional message interaction method according to an embodiment of the present application;

[0027] Figure 2 is a schematic diagram of an optional message interaction simulator according to an embodiment of the present application;

[0028] Figure 3 is a schematic diagram of an optional message interaction device according to an embodiment of the present application;

[0029] Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first", "second", and the like in the description and claims of the application and the above-described accompanying drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units 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, analyzed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties. For example, an interface is provided between the system and the relevant user or institution. Before obtaining the relevant information, the interface needs to send a request to the aforementioned user or institution, and after receiving the consent information feedback from the aforementioned user or institution, the relevant information is obtained.

[0033] Embodiment 1

[0034] According to the embodiments of the present application, 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 the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.

[0035] Figure 1 is a flowchart of an optional message interaction method according to an embodiment of the present application, as Figure 1 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 the interface of a third party institution to interact with the transaction system of the target financial institution.

[0037] Optionally, in the embodiments of the present application, a third-party message interaction simulator (i.e. target simulator) supporting the national secret algorithm is provided to simulate the interface of a third party institution to interact with the transaction system of a target financial institution (such as a bank), so that the target simulator receives the transaction request message sent by the transaction system of the target financial institution.

[0038] For example, the simulator can be configured with keys of multiple partners (i.e. third-party institutions), configured with multiple transaction code corresponding access / in-out message templates, according to which 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 started, and the set port is started to be listened to, and the message access sent by the target financial institution's transaction system to the third-party institution is waited.

[0040] Step S102, 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 the 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.

[0041] Optionally, after receiving the transaction request message sent by the target financial institution's transaction system, for example, after listening to the request, the message is parsed, i.e. the transaction request message is parsed, and the transaction identification information and the third-party institution identification information can be obtained, wherein the transaction identification information can be a transaction code, and the third-party institution identification information can be a partner code.

[0042] In an optional embodiment, the transaction request message is parsed to obtain transaction identification information and third-party institution identification information, comprising: obtaining a pre-configured message parsing template; according to the preset field information in the message parsing template, the transaction request message is parsed to obtain the transaction identification information and the third-party institution identification information.

[0043] Optionally, in the process of parsing the transaction request message to obtain the transaction identification information and the third-party institution identification information, the 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 third-party institution identification information, 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 target transaction identification information, the transaction request message is signed and decrypted according to the third-party institution identification information to obtain a processing result, wherein the target transaction identification information is new version transaction identification information after version update of old version transaction identification information.

[0045] Optionally, the target transaction identification information can be a new transaction code of the national encryption version. After the transaction code and the partner code are split according to the message parsing template, it can be judged whether the transaction code is a new transaction code of the national encryption version. If the transaction code is a new transaction code of the national encryption version (i.e., if the transaction identification information is the target transaction identification information), the transaction request message can be signed and decrypted according to the partner code to obtain a processing result, for example, a soft encryption interface is called to perform a signing and decryption process on the message body (MsgBody).

[0046] In an optional embodiment, the transaction request message is signed and decrypted according to the identification information of the third-party institution to obtain a processing result, including: obtaining a target secret key corresponding to the identification information of the third-party institution from the configuration information; signing and decrypting the transaction request message according to the target secret key to obtain the processing result.

[0047] Optionally, in the process of signing and decrypting the transaction request message according to the identification information of the third-party institution to obtain a processing result, first, a target secret key corresponding to the identification information of the third-party institution is obtained from the configuration information, for example, the SM2 algorithm and the SM4 algorithm secret keys (i.e., the target secret key) corresponding to the split partner code are obtained from the local configuration, and then the transaction request message is signed and decrypted according to the SM2 algorithm and the SM4 algorithm secret keys to obtain the processing result.

[0048] It should be noted that signing and decrypting the transaction request message according to the identification information of the third-party institution can realize message sending and receiving simulation of different third-party institutions and different transactions, realize online transaction automatic encryption and decryption and signing and verification, overcome the difficulties of large transaction volume, multiple transaction types, and multiple third-party institutions, thereby making the test work more accurate and efficient, improving system security and reliability, improving the stability of each application production transaction, improving customer experience, and thus improving the efficiency of national encryption transformation and improving system management and operation level.

[0049] Step S104, 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.

[0050] Optionally, after obtaining the processing result, a target response message can be generated according to the processing result and the transaction identification information (i.e., the transaction code), and the target response message is returned to the transaction system of the target financial institution.

[0051] In an optional embodiment, the target response message is generated according to the processing result and the transaction identification information, including: if the processing result indicates that the signing fails and / or the decryption fails, a first message is assembled according to the transaction identification information; and the first message is encrypted and signed according to the target secret key to obtain the target response message.

[0052] Optionally, in the process of generating the target response message according to the processing result and the transaction identification information, if the processing result represents signature verification failure and / or decryption failure, the message is assembled according to the transaction identification information to obtain a first message, and then the first message is encrypted and signed according to the target key to obtain the target response message. For example, the transaction request message is subjected to signature verification and decryption according to the keys of the SM2 algorithm and the SM4 algorithm, if the signature verification fails and / or the decryption fails, the return message (i.e. the first message) is assembled according to the transaction code, and the assembled return message is automatically encrypted and signed according to the corresponding keys of the SM2 algorithm and the SM4 algorithm to obtain the target response message to be returned to the transaction system of the target financial institution.

[0053] In an optional embodiment, the target response message is generated according to the processing result and the transaction identification information, including: if the processing result represents successful signature verification and successful decryption, the message is assembled according to the transaction identification information and a preset transaction return code to obtain a second message; and the second message is encrypted and signed according to the target key to obtain the target response message.

[0054] Optionally, in the process of generating the target response message according to the processing result and the transaction identification information, if the processing result represents signature verification success and decryption success, the message is assembled according to the transaction identification information and a preset transaction return code to obtain a second message, and then the second message is encrypted and signed according to the target key to obtain the target response message. For example, the transaction request message is subjected to signature verification and decryption according to the keys of the SM2 algorithm and the SM4 algorithm, if the signature verification succeeds and the decryption succeeds, the corresponding transaction message configuration is read according to the transaction code and the return code pre-configured by the tester to automatically assemble the return message (i.e. the second message), and the assembled return message is automatically encrypted and signed according to the corresponding keys of the SM2 algorithm and the SM4 algorithm to obtain the target response message to be returned to the transaction system of the target financial institution.

[0055] It should be noted that the target response message is generated according to the processing result and the transaction identification information, which can realize message sending and receiving simulation of different third-party institutions and different transactions, realize automatic encryption and decryption and signature verification and signature of online transactions, overcome the difficulties of large transaction volume, multiple transaction types and multiple third-party institutions, thereby making the test work more accurate and efficient, improving the system security and reliability, improving the stability of each application production transaction, improving the customer experience, thereby improving the efficiency of the national encryption transformation, and improving the system management and operation level.

[0056] Based on the scheme defined in steps S101 to S104, it can be known that, in the embodiment of the present application, the third-party institution and the financial institution's transaction system are simulated to interact with each other through a simulator, and a transaction request message sent by the transaction system of the 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 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 target transaction identification information, the transaction request message is signed and decrypted according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is new transaction identification information after version update of old transaction identification information; 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 note that, in the above process, the third-party institution and the financial institution's transaction system are simulated to interact with each other through a simulator, which can realize the message sending and receiving simulation of different third-party institutions and different transactions, realize the automatic encryption and decryption and signature verification of online transactions, overcome the difficulties involving large transaction volume, multiple transaction types, and multiple third-party institutions, thereby making the test work more accurate and efficient, improving the system security and reliability, improving the stability of each application production transaction, improving the customer experience, and thus improving the efficiency of the national encryption transformation and improving the system management and operation level.

[0058] As can be seen, through the technical scheme of the present application, the purpose of reducing the dependence on the third-party institution in the message interaction test process is achieved, thereby realizing the technical effect of improving the test efficiency of the message interaction, and thus solving the technical problem of low test efficiency caused by the dependence on the third-party institution in the prior art.

[0059] In an optional embodiment, after the transaction request message is parsed 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 and the multiple transaction identification information contained in the target transaction identification information are matched to obtain a matching result; if the matching result indicates that there is the same transaction identification information in the target transaction identification information as the transaction identification information, it is determined that the transaction identification information is the target transaction identification information.

[0060] Optionally, after the transaction request message is parsed to obtain the transaction identification information and the identification information of the third-party institution, for example, after the transaction code and the partner code are split according to the message parsing template, it can be judged whether it is a national encryption version new transaction code according to the transaction code.

[0061] Optionally, the target transaction identification information is acquired first, and then the transaction identification information is matched with the plurality of transaction identification information contained in the target transaction identification information to obtain a matching result, and if the matching result indicates that the target transaction identification information contains the same transaction identification information as the transaction identification information, it is determined that the transaction identification information is the target transaction identification information. For example, the new transaction code of the national encryption version is acquired, and then the split transaction code is matched with the plurality of new transaction codes contained in the new transaction code of the national encryption version. If the same new transaction code as the split transaction code is matched from the plurality of new transaction codes, it is considered that the split transaction code is the new transaction code of the national encryption version.

[0062] It should be noted that by matching the transaction identification information with the plurality of transaction identification information contained in the target transaction identification information, it can be accurately determined whether the split transaction code is the new transaction code of the national encryption version, thereby improving the national encryption transformation efficiency.

[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 visual 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 visual window of the target simulator.

[0064] Optionally, during the simulation test, the simulator prints the received message, the returned message and the timestamp in the window for the tester to verify the results. Figure 2 is a schematic diagram of an optional message interaction simulator according to an embodiment of the application. For example, 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 can be displayed through the visual window (such as the received message display area shown in Figure 2 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 can be displayed through the visual window of the target simulator.

[0065] In the embodiment of the present application, the third-party institution and the financial institution are simulated to interact with each other through a simulator, and a transaction request message sent by a transaction system of a target financial institution is received by 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 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 target transaction identification information, the transaction request message is signed and decrypted according to the identification information of the third-party institution to obtain a processing result, wherein the target transaction identification information is new transaction identification information after version update of old transaction identification information; 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 third-party institution and the financial institution are simulated to interact with each other through a simulator, which can realize the message sending and receiving simulation of different third-party institutions and different transactions, realize the automatic encryption and decryption and signature verification of online transactions, overcome the difficulties of large transaction volume, multiple transaction types and multiple third-party institutions, thereby making the test work more accurate and efficient, improving the system security and reliability, improving the stability of each application production transaction, improving the customer experience, thereby improving the efficiency of the national secret transformation, and improving the system management and operation level.

[0067] Therefore, through the technical scheme of the present application, the dependence on the third-party institution in the message interaction test process is reduced, thereby realizing the technical effect of improving the test efficiency of the message interaction, and further solving the technical problem that the test efficiency is low due to the dependence on the third-party institution in the message interaction test in the prior art.

[0068] Embodiment 2

[0069] According to the embodiment of the present application, an embodiment of a message interaction device is provided, wherein Figure 3 is a schematic diagram of an optional message interaction device according to the embodiment of the present application, as shown in Figure 3As shown, the device comprises: a receiving module 301, configured 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, configured 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 a 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, configured to, if the transaction identification information is target transaction identification information, perform 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 new version transaction identification information after version updating of old version transaction identification information; and a sending module 304, configured 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 application, the receiving module 301 receives 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; the 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 a transaction, and the identification information of the third-party institution is used to uniquely identify identity information of the third-party institution; 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 if the transaction identification information is target transaction identification information to obtain a processing result, wherein the target transaction identification information is new version transaction identification information after version updating of old version transaction identification information; and the sending module 304 generates a target response message according to 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 third-party institution and the transaction system of the financial institution through the simulator, the message sending and receiving simulation of different third-party institutions and different transactions can be realized, the online transaction can be automatically encrypted and decrypted and signed and verified, the difficulties such as large transaction volume, multiple transaction types and multiple third-party institutions are overcome, so that the test work is more accurate and efficient, the system safety and reliability are improved, the stability of each application production transaction is improved, the customer experience is improved, the national secret transformation efficiency is improved, and the system management and operation level is improved. The purpose of reducing the dependence on the third-party institution in the message interaction test process is achieved, so that the technical effect of improving the test efficiency of the message interaction is achieved, and the technical problem of low test efficiency caused by the dependence on the third-party institution in the message interaction test in the prior art is solved.

[0071] It should be noted that the receiving module 301, the first processing module 302, the second processing module 303 and the sending module 304 correspond to steps S101 to S104 in the above embodiment, and the four modules have the same examples and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above embodiment 1.

[0072] Optionally, the first processing module comprises: a first obtaining module, configured to obtain a pre-configured message parsing template; and a third processing module, configured to parse the transaction request message according to preset field information in the message parsing template to obtain the transaction identification information and the identification information of the third-party institution.

[0073] Optionally, the message interaction apparatus further comprises: a second obtaining module, configured to obtain target transaction identification information after the transaction request message is parsed to obtain the transaction identification information and the identification information of the third-party institution; a fourth processing module, configured to match the transaction identification information with a plurality of transaction identification information contained in the target transaction identification information to obtain a matching result; and a determining module, configured to determine that the transaction identification information is the target transaction identification information if the matching result indicates that there is the same transaction identification information as the transaction identification information in the target transaction identification information.

[0074] Optionally, the second processing module comprises: a third obtaining module, configured to obtain a target secret key corresponding to the identification information of the third-party institution from the configuration information; and a fifth processing module, configured to perform signature verification and decryption processing on the transaction request message according to the target secret key to obtain a processing result.

[0075] Optionally, the sending module comprises: a sixth processing module, configured to perform message assembly according to the transaction identification information to obtain a first message if the processing result indicates that the signature verification fails and / or the decryption fails; and a seventh processing module, configured to perform encryption and signature processing on the first message according to the target secret key to obtain a target response message.

[0076] Optionally, the sending module further comprises: an eighth processing module, configured to perform message assembly according to the transaction identification information and a preset transaction return code to obtain a second message if the processing result indicates that the signature verification succeeds and the decryption succeeds; and a ninth processing module, configured to perform encryption and signature processing on the second message according to the target secret key to obtain the target response message.

[0077] Optionally, the message interaction apparatus further comprises: a first display module, configured to display the transaction request message and a timestamp corresponding to the transaction request message through a visual window of the target simulator after the transaction request message sent by the transaction system of the target financial institution is received through the target simulator; and a second display module, configured to display the target response message and a timestamp corresponding to the target response message through the visual window of the target simulator after the target response message is returned to the transaction system of the target financial institution.

[0078] Embodiment 3

[0079] According to another aspect of the embodiments of the present application, a computer program product is provided, which comprises a computer program, and the computer program, when executed by a processor, implements the packet interaction method described above.

[0080] Embodiment 4

[0081] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is configured to execute the packet interaction method described above when running.

[0082] Embodiment 5

[0083] According to another aspect of the embodiments of the present application, an electronic device is provided, wherein Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present application, as Figure 4 shown, the electronic device comprises one or more processors; a memory configured to store one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement a program for running, wherein the program is configured to execute the packet interaction method described above when running. The processor implements the following steps when executing the program: receiving a transaction request packet sent by a transaction system of a 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 packet 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 target transaction identification information, performing signature verification and decryption processing on the transaction request packet according to the identification information of the third party institution to obtain a processing result, wherein the target transaction identification information is new version transaction identification information after version update of old version transaction identification information; generating a target response packet according to the processing result and the transaction identification information, and returning the target response packet to the transaction system of the target financial institution.

[0084] Optionally, the processor further implements the following steps when executing the program: obtaining a preconfigured packet parsing template; and parsing the transaction request packet according to preset field information in the packet parsing template to obtain the transaction identification information and the identification information of the third party institution.

[0085] Optionally, the processor, when executing the program, further implements the following steps: obtaining target transaction identification information after the transaction request message is parsed to obtain the transaction identification information and the identification information of the third-party institution; matching the transaction identification information with a plurality of transaction identification information contained in the target transaction identification information to obtain a matching result; and determining that the transaction identification information is the target transaction identification information if the matching result indicates that there is the same transaction identification information in the target transaction identification information as the transaction identification information.

[0086] Optionally, the processor, when executing the program, further implements the following steps: obtaining a target secret key corresponding to the identification information of the third-party institution from the configuration information; and performing signature verification and decryption processing on the transaction request message according to the target secret key to obtain a processing result.

[0087] Optionally, the processor, when executing the program, further implements the following steps: performing message assembly according to the transaction identification information to obtain a first message if the processing result indicates that the signature verification fails and / or the decryption fails; and performing encryption and signature processing on the first message according to the target secret key to obtain a target response message.

[0088] Optionally, the processor, when executing the program, further implements the following steps: performing message assembly according to the transaction identification information and a preset transaction return code to obtain a second message if the processing result indicates that the signature verification succeeds and the decryption succeeds; and performing encryption and signature processing on the second message according to the target secret key to obtain a target response message.

[0089] Optionally, the processor, when executing the program, further implements the following steps: displaying the transaction request message and a timestamp corresponding to the transaction request message through a visual window of the target simulator after the transaction request message sent by the transaction system of the target financial institution is received through the target simulator; and displaying the target response message and a timestamp corresponding to the target response message through the visual window of the target simulator after the target response message is returned to the transaction system of the target financial institution.

[0090] The device herein can be a server, a PC, a PAD, a mobile phone, etc.

[0091] The above-mentioned serial numbers of the embodiments of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0092] In the above-mentioned embodiments of the application, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0093] In several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented by other means. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division mode, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between units or modules, which can be electrical or other forms.

[0094] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0095] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0096] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0097] The above is only the preferred embodiment of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.

Claims

1. A message interaction method, characterized by, The method comprises the following steps: 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 the interaction between an interface of a third-party institution and 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 a 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 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 new version transaction identification information after version update of old version 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.

2. The method of claim 1, wherein, The step of parsing the transaction request message to obtain transaction identification information and identification information of a third-party institution comprises the following steps: obtaining a pre-configured message parsing template; parsing the transaction request message according to 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 of claim 1, wherein, After the step of parsing the transaction request message to obtain transaction identification information and identification information of a third-party institution, the method further comprises the following steps: obtaining the target transaction identification information; matching the transaction identification information with a plurality of transaction identification information contained in the target transaction identification information to obtain a matching result; if the matching result indicates that there is the same transaction identification information in the target transaction identification information as the transaction identification information, determining that the transaction identification information is the target transaction identification information.

4. The method of claim 1, wherein, The step of 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 comprises the following steps: obtaining a target secret key corresponding to the identification information of the third-party institution from configuration information; performing signature verification and decryption processing on the transaction request message according to the target secret key to obtain the processing result.

5. The method of claim 4, wherein, The step of generating a target response message according to the processing result and the transaction identification information comprises the following steps: if the processing result indicates that the signature verification fails and / or the decryption fails, performing message assembly according to the transaction identification information to obtain a first message; performing encryption and signature processing on the first message according to the target secret key to obtain the target response message.

6. The method of claim 4, wherein, The step of generating a target response message according to the processing result and the transaction identification information comprises the following steps: if the processing result indicates that the signature verification succeeds and the decryption succeeds, performing message assembly according to the transaction identification information and a preset transaction return code to obtain a second message; performing encryption and signature processing on the second message according to the target secret key to obtain the target response message.

7. The method of claim 1, wherein, The method further comprises the following steps: After receiving a transaction request message sent by a transaction system of a target financial institution through a target simulator, the transaction request message and a timestamp corresponding to the transaction request message are displayed through a visual 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 a timestamp corresponding to the target response message are displayed through the visual window of the target simulator.

8. A message interaction apparatus, characterized by The method comprises the following steps: 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; a first processing module is configured 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 a 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 configured to, if the transaction identification information is target transaction identification information, perform 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 new version transaction identification information after version update of old version transaction identification information; a sending module is configured 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, characterised in that, The computer program is executed by a processor to implement the message interaction method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium and is set to run to execute the message interaction method in any one of claims 1 to 7.

11. An electronic device, comprising: The electronic device comprises one or more processors; a memory is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a program running method, wherein the program is set to run to execute the message interaction method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information obtaining method and device and server

    CN108197914A

  • Blockchain network-based resource request transaction verification method and apparatus, electronic device and computer readable storage medium

    WO2021217928A1