CN109035020B - Method and device for returning transaction information - Google Patents

Method and device for returning transaction information Download PDF

Info

Publication number
CN109035020B
CN109035020B CN201810769379.0A CN201810769379A CN109035020B CN 109035020 B CN109035020 B CN 109035020B CN 201810769379 A CN201810769379 A CN 201810769379A CN 109035020 B CN109035020 B CN 109035020B
Authority
CN
China
Prior art keywords
transaction
information
transaction request
response
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810769379.0A
Other languages
Chinese (zh)
Other versions
CN109035020A (en
Inventor
黄思成
区述辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201810769379.0A priority Critical patent/CN109035020B/en
Publication of CN109035020A publication Critical patent/CN109035020A/en
Application granted granted Critical
Publication of CN109035020B publication Critical patent/CN109035020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/53Network services using third party service providers

Abstract

The application discloses a method and a device for returning transaction information, wherein a transaction request is firstly obtained, service data processing is carried out according to the transaction request, then a communication mode corresponding to response information is determined, if the communication mode is synchronous response, the response information of the transaction request is packaged according to a preset configuration rule, first message information is obtained and is sent to a real-time return queue, if the communication mode is asynchronous response, after asynchronous response data are received, the asynchronous response data are packaged according to the preset configuration rule, corresponding second message information is obtained and is sent to a system corresponding to the transaction request. The method and the device can determine how the response information of the transaction request is generated and returned by determining the communication mode, the packaging mode and the transaction path of the information through the pre-configured adaptation rules in the return process of the transaction information without concerning the change of the transaction path and the channel, thereby avoiding the problem that a new version system needs to be repeatedly developed due to the expansion of a business system framework and the channel in the prior art.

Description

Method and device for returning transaction information
Technical Field
The invention relates to the field of information processing, in particular to a method and a device for returning transaction information.
Background
The credit business develops rapidly in the financial industry in recent years, so that vast clients can manage own money and assets more conveniently.
At present, a lot of systems related to credit business are provided, such as a marketing system, a limit system, a financing system, a public accumulation fund system, a credit investigation system, a loan system and the like, but there are also many channels through which a customer can apply for credit business, such as an internet bank, a mobile banking system, a financial institution business system and the like, and different systems requiring access interaction are also different for different credit business applications, which requires that the whole system architecture can be adapted to access from various channels to process transaction requests of complex links. In the prior art, for specific service data, a transaction path in the whole system framework is fixed, and a communication mode of the transaction is rigid, so that the existing transaction link cannot be reused when a new channel is subsequently added into the system framework, and a new version needs to be redeveloped to realize normal access of a new channel. However, in the face of the increasing number of increasingly complex traffic types and access systems of financial institutions, the above approach will result in a large investment in development costs.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for returning transaction information, so as to overcome the problem in the prior art that a new version system needs to be repeatedly developed subsequently due to the fixed transaction path and the rigid transaction communication mode in the business system framework.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for returning transaction information, comprising:
the business processing module acquires a transaction request and processes business data according to the transaction request;
the business processing module determines a communication mode corresponding to response information of the transaction request according to a first preset rule, wherein the communication mode comprises a synchronous response and an asynchronous response;
if the transaction request is synchronous response, the service processing module performs package processing on response information of the transaction request according to a second preset rule and a third preset rule to obtain corresponding first message information, and sends the first message information to a real-time return queue, so that a processor sends the first message information in the real-time return queue to a system corresponding to the transaction request in real time;
if the transaction request is asynchronous response, the service processing module sends an asynchronous response request to an asynchronous response module, and the asynchronous response request corresponds to the transaction request;
and after receiving the asynchronous response request and asynchronous response data, the asynchronous response module performs packet processing on the asynchronous response data according to the second preset rule and the third preset rule to obtain corresponding second message information, and sends the second message information to a system corresponding to the transaction request.
Optionally, the method further includes:
the corresponding relation between the service type and/or the transaction request time and the communication mode, the corresponding relation between the service type and the group package mode and the corresponding relation between the service type and the transaction path are configured in advance.
Optionally, if the first preset rule includes a correspondence between a service type and/or transaction request time and a communication manner, the determining, by the service processing module according to the first preset rule, a communication manner corresponding to response information of the transaction request includes:
the business processing module determines the business type of the response information of the transaction request and/or the request time of the transaction request;
and the service processing module determines a communication mode corresponding to the response information of the transaction request according to the corresponding relation between the preset service type and/or transaction request time and the communication mode.
Optionally, the service processing module performs packet processing on the response information of the transaction request according to a second preset rule and a third preset rule to obtain corresponding first message information, including:
the business processing module packs the response information of the transaction request into a message body according to a second preset rule;
and the service processing module determines a transaction path of response information of the transaction request according to a third preset rule, and assembles a message header matched with the determined transaction path for the message body according to the determined transaction path to obtain first message information.
Optionally, the second preset rule includes a correspondence between a service type and a group packaging mode, the group packaging mode includes a fixed-length group packaging mode and a variable group packaging mode, and the third preset rule includes a correspondence between a service type and a transaction path, so that the service processing module packages response information of the transaction request into a message body according to the second preset rule, including:
determining a group packaging mode corresponding to the response information of the transaction request according to a corresponding relation between a preset service type and the group packaging mode;
packaging the response information of the transaction request into a fixed-length message or a variable message according to the determined packaging mode;
the business processing module determines a transaction path of the response information of the transaction request according to a third preset rule, and the transaction path comprises the following steps:
and determining the transaction path of the response information of the transaction request according to the corresponding relation between the preset service type and the transaction path.
A transaction information return apparatus comprising:
the request processing module is used for acquiring a transaction request and processing service data according to the transaction request;
the communication mode determining module is used for determining a communication mode corresponding to response information of the transaction request according to a first preset rule, wherein the communication mode comprises a synchronous response and an asynchronous response;
the synchronous response module is used for packaging and processing the response information of the transaction request according to a second preset rule and a third preset rule when the determined communication mode is synchronous response to obtain corresponding first message information, and sending the first message information to a real-time return queue so that the processor sends the first message information in the real-time return queue to a system corresponding to the transaction request in real time;
the asynchronous response module is used for sending an asynchronous response request to the asynchronous response module when the determined communication mode is asynchronous response, and the asynchronous response request corresponds to the transaction request;
and the asynchronous response module is used for performing packet processing on the asynchronous response data according to the second preset rule and the third preset rule after receiving the asynchronous response request and receiving asynchronous response data to obtain corresponding second message information, and sending the second message information to a system corresponding to the transaction request.
Optionally, the method further includes:
and the rule configuration module is used for configuring the corresponding relation between the service type and/or the transaction request time and the communication mode, the corresponding relation between the service type and the group packaging mode and the corresponding relation between the service type and the transaction path in advance.
Optionally, the first preset rule includes a correspondence between a service type and/or a transaction request time and a communication manner, and the communication manner determining module includes:
the information determining module is used for determining the service type of the response information of the transaction request and/or the request time of the transaction request;
and the communication determining submodule is used for determining a communication mode corresponding to the response information of the transaction request according to the corresponding relation between the preset service type and/or the transaction request time and the communication mode.
Optionally, the synchronization response module includes:
the message body organization module is used for packaging the response information of the transaction request into a message body according to a second preset rule;
the message header organization module is used for determining a transaction path of response information of the transaction request according to a third preset rule, and assembling a message header matched with the determined transaction path for the message body according to the determined transaction path to obtain first message information;
and the message sending module is used for sending the first message information to a real-time return queue so that the processor sends the first message information in the real-time return queue to a system corresponding to the transaction request information in real time.
Optionally, the second preset rule includes a correspondence between a service type and a group package manner, the group package manner includes a fixed-length group package and a variable group package, and the third preset rule includes a correspondence between a service type and a transaction path, so that the packet body organizing module includes:
the group package determining module is used for determining a group package mode corresponding to the response information of the transaction request according to a corresponding relation between a preset service type and the group package mode;
the message body organization submodule is used for grouping the response information of the transaction request into a fixed-length message or a variable message according to the determined grouping mode;
the message header organization module comprises:
the path determining module is used for determining a transaction path of the response information of the transaction request according to the corresponding relation between the preset service type and the transaction path;
and the message header organization sub-module is used for assembling the message header matched with the determined transaction path for the message body according to the determined transaction path to obtain first message information.
According to the technical scheme, compared with the prior art, the embodiment of the invention discloses a method and a device for returning transaction information. The method and the device can determine how the response information of the transaction request is generated and returned by determining the communication mode, the packaging mode and the transaction path of the information through the pre-configured adaptation rules in the return process of the transaction information without concerning the change of the transaction path and the channel, thereby avoiding the problem that a new version system needs to be repeatedly developed due to the expansion of a business system framework and the channel in the prior art.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for returning transaction information according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for determining a communication mode according to an embodiment of the present invention;
fig. 3 is a flowchart of obtaining first message information according to the embodiment of the present invention;
FIG. 4 is a flow chart of another method for returning transaction information according to the embodiment of the invention;
FIG. 5 is a schematic structural diagram of a transaction information return apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a communication method determining module according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a synchronization response module according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another transaction information return device disclosed in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for returning transaction information according to an embodiment of the present invention, and referring to fig. 1, the method for returning transaction information may include:
step 101: and the business processing module acquires the transaction request and processes business data according to the transaction request.
The transaction request may be, but is not limited to, an XML message request based on SOCKET, a fixed length message based on SOCKET, and the like. In this embodiment, the transaction request may be a transaction request that is processed by other modules through corresponding security check, service routing, priority ordering, traffic control, and the like, and is converted into internal data. After the transaction requests are processed, the transaction requests can be sent to a request queue, and the service processing module obtains a plurality of transaction requests from the request queue.
After the transaction request is obtained, the service processing module may perform service data processing according to the transaction request. Specifically, for example, the transaction request may be a message for inquiring credit investigation of a customer, information for inquiring public deposit of the customer, information for inquiring deposit and loan of the customer in a core banking system, information for inquiring credit card of the customer in a credit card system, information for inquiring public security of the customer, and decision pricing by an organization data sending and evaluating system, and the service processing module may send the transaction request packet to a related system after determining a system to which the transaction request needs to be related. If the transaction request is to inquire the customer's accumulation information, the business processing module can send the transaction request packet to an accumulation system to obtain the customer's accumulation data. The acquired data may be stored in a specific database according to the configuration.
Step 102: and the business processing module determines a communication mode corresponding to the response information of the transaction request according to a first preset rule, wherein the communication mode comprises a synchronous response and an asynchronous response, and the step 103 or 104 is carried out.
Before returning the response information of the transaction request, the service processing module needs to first determine a communication mode required when the response information of the transaction request is returned. In this embodiment, the communication mode may include two communication modes, namely, a synchronous response mode and an asynchronous response mode. The subsequent processing steps are different under different communication modes.
Step 103: and when synchronous response is carried out, the business processing module carries out package processing on response information of the transaction request according to a second preset rule and a third preset rule to obtain corresponding first message information, and sends the first message information to a real-time return queue, so that the processor sends the first message information in the real-time return queue to a system corresponding to the transaction request information in real time.
When the communication mode corresponding to the response information of the transaction request is synchronous response, the service processing module may perform packet processing on the response information of the transaction request according to a preset rule. In this embodiment, the response speed or the communication mode for generating the response information with a faster acquisition speed may be set as the synchronous response. The response information may be generated directly, for example, an acceptance notification of a certain transaction request, or may be acquired from another system, and after the response information is determined, the service processing module may package and process the response information to generate the first message information, and write the first message information into a real-time return queue inside the whole service system. The instructions in the real-time return queue are sequentially executed by the service system processor in real time, the first message information is written into the real-time return queue, and the service system processor can return the first message information to the system sending the transaction request in real time.
Step 104: and in the asynchronous response, the service processing module sends an asynchronous response request to an asynchronous response module, wherein the asynchronous response request corresponds to the transaction request.
When the communication mode corresponding to the response information of the transaction request is asynchronous response, an asynchronous response request needs to be sent to an asynchronous response module to instruct the asynchronous response module to execute subsequent asynchronous response work. The asynchronous response request is a request indicating that response information of the transaction request is asynchronously returned, and thus corresponds to the transaction request. Specifically, the asynchronous response request may include information related to the transaction request.
Step 105: and after receiving the asynchronous response request and asynchronous response data, the asynchronous response module performs packet processing on the asynchronous response data according to the second preset rule and the third preset rule to obtain corresponding second message information, and sends the second message information to a system corresponding to the transaction request information.
Since the asynchronous response usually needs to acquire information from other systems, such as credit investigation information from credit investigation system, it is often necessary to wait for a certain time. After receiving the asynchronous response request, the asynchronous response module waits for asynchronous response data, and after all the asynchronous response data are acquired, the asynchronous response data can be packaged according to a preset rule to obtain second message information. Due to the asynchronous response communication mode, after the second message information is obtained, the second message information does not need to be written into a real-time return queue, and the second message information is directly sent to a system corresponding to the transaction request according to the corresponding transaction request.
In the embodiment, the transaction information returning method can determine how the response information of the transaction request is generated and returned by determining the communication mode, the packaging mode and the transaction path of the information through the preset adaptation rules in the transaction information returning process without concerning the change of the transaction path and the channel, thereby avoiding the problem that a new version system needs to be repeatedly developed due to the expansion of a service system framework and the channel in the prior art.
Fig. 2 is a flowchart of determining a communication manner disclosed in an embodiment of the present invention, and referring to fig. 2, in the embodiment, the first preset rule may include a correspondence between a service type and/or a transaction request time and a communication manner, and the determining, by the service processing module according to the first preset rule, the communication manner corresponding to the response information of the transaction request may include:
step 201: and the business processing module determines the business type of the response information of the transaction request and/or the request time of the transaction request.
Step 202: and the service processing module determines a communication mode corresponding to the response information of the transaction request according to the corresponding relation between the preset service type and/or transaction request time and the communication mode.
Specifically, the correspondence between the service type and/or the transaction request time and the communication mode may be set according to the service scenario and the service requirement. For example 23 a night: the 7:00 morning from 00 to the next morning is a service idle stage, communication modes of some services can be configured into a synchronous mode, and other time periods are asynchronous modes; it can also be set that the transaction A must be in a synchronous mode and the transaction B must be in an asynchronous mode. The setting mode is flexible and can be set randomly according to the routine requirement.
Fig. 3 is a flowchart of obtaining first message information disclosed in an embodiment of the present invention, and referring to fig. 3, in the embodiment, the packet processing is performed on the response information of the transaction request by the service processing module according to a second preset rule and a third preset rule, so as to obtain corresponding first message information, where the packet processing may include:
step 301: and the business processing module packages the response information of the transaction request into a message body according to a second preset rule.
Step 302: and the service processing module determines a transaction path of response information of the transaction request according to a third preset rule, and assembles a message header matched with the determined transaction path for the message body according to the determined transaction path to obtain first message information.
In a specific implementation, the second preset rule may include a correspondence between a service type and a group packaging manner, the group packaging manner may include a fixed-length group packaging manner and a variable group packaging manner, and the third preset rule may include a correspondence between a service type and a transaction path, and then the service processing module packages response information of the transaction request into a body of a message according to the second preset rule, which may include: and according to the corresponding relation between the preset service type and the group packaging mode, determining the group packaging mode corresponding to the response information of the transaction request, and according to the determined group packaging mode, packaging the response information of the transaction request into a fixed-length message or a variable message. The determining, by the service processing module according to a third preset rule, a transaction path of response information of the transaction request may include: and determining the transaction path of the response information of the transaction request according to the corresponding relation between the preset service type and the transaction path. Specifically, the service type corresponding to the response information of the transaction request may be determined first, and then the transaction path of the response information of the transaction request may be determined according to a preset correspondence between the service type and the transaction path.
Fig. 4 is a flowchart of another transaction information return method disclosed in the embodiment of the present invention, and as shown in fig. 4, the transaction information return method may include:
step 401: the corresponding relation between the service type and/or the transaction request time and the communication mode, the corresponding relation between the service type and the group package mode and the corresponding relation between the service type and the transaction path are configured in advance.
Step 402: and the business processing module acquires the transaction request and processes business data according to the transaction request.
Step 403: and the service processing module determines a communication mode corresponding to response information of the transaction request according to the corresponding relation between the service type and/or the transaction request time and the communication mode, wherein the communication mode comprises synchronous response and asynchronous response, and the step 404 or 405 is carried out.
Step 404: and when synchronous response is carried out, the service processing module carries out package processing on response information of the transaction request according to the corresponding relation between the service type and the package mode and the corresponding relation between the service type and the transaction path to obtain corresponding first message information, and sends the first message information to a real-time return queue, so that the processor sends the first message information in the real-time return queue to a system corresponding to the transaction request in real time.
Step 405: and in the asynchronous response, the service processing module sends an asynchronous response request to an asynchronous response module, wherein the asynchronous response request corresponds to the transaction request.
Step 406: and after receiving the asynchronous response request and asynchronous response data, the asynchronous response module packages the asynchronous response data according to the corresponding relation between the service type and the package mode and the corresponding relation between the service type and the transaction path to obtain corresponding second message information, and sends the second message information to a system corresponding to the transaction request.
In this embodiment, the adaptation rules of the information including the service type and the communication mode, the group packaging mode, and the transaction path are configured in advance, so that the generation and transmission of the response information are performed directly by using the corresponding rules in the subsequent response work of the transaction request. According to the method for returning the transaction information, in the process of returning the transaction information, corresponding actions are executed only according to the preset rules without concerning the change of transaction paths and channels, so that the problem that a new version system needs to be repeatedly developed due to the expansion of a service system framework and channels in the prior art is solved.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
The method is described in detail in the embodiments disclosed above, and the method of the present invention can be implemented by various types of apparatuses, so that the present invention also discloses an apparatus, and the following detailed description will be given of specific embodiments.
Fig. 5 is a schematic structural diagram of a transaction information returning device according to an embodiment of the present invention, and referring to fig. 5, the transaction information returning device 50 may include:
the request processing module 501 is configured to obtain a transaction request, and perform service data processing according to the transaction request.
The transaction request may be, but is not limited to, an XML message request based on SOCKET, a fixed length message based on SOCKET, and the like. In this embodiment, the transaction request may be a transaction request that is processed by other modules through corresponding security check, service routing, priority ordering, traffic control, and the like, and is converted into internal data.
After the transaction request is obtained, service data processing can be performed according to the transaction request. Specifically, the transaction request may be, for example, a message for inquiring credit investigation of a customer, information of public deposit of the customer, information of loan deposit of the customer in a core banking system, information of credit card of the customer in a credit card system, information of public security of the customer, decision-making pricing by an organization data sending and evaluating system, and after a system to which the transaction request needs to be related is determined, the transaction request may be packaged and sent to a related system. If the transaction request is to inquire the customer's accumulation information, the transaction request packet can be sent to the accumulation system to obtain the accumulation data of the customer. The acquired data may be stored in a specific database according to the configuration.
A communication mode determining module 502, configured to determine, according to a first preset rule, a communication mode corresponding to the response information of the transaction request, where the communication mode includes a synchronous response and an asynchronous response.
Before returning the response information of the transaction request, a communication mode required when the response information of the transaction request is returned needs to be determined. In this embodiment, the communication mode may include two communication modes, namely, a synchronous response mode and an asynchronous response mode. The subsequent processing steps are different under different communication modes.
And the synchronous response module 503 is configured to, when the determined communication manner is a synchronous response, perform packet packaging processing on the response information of the transaction request according to a second preset rule and a third preset rule to obtain corresponding first message information, and send the first message information to a real-time return queue, so that the processor sends the first message information in the real-time return queue to a system corresponding to the transaction request in real time.
When the communication mode corresponding to the response information of the transaction request is synchronous response, the response information of the transaction request can be packaged according to a preset rule. In this embodiment, the response speed or the communication mode for generating the response information with a faster acquisition speed may be set as the synchronous response. The response information may be generated directly, such as an acceptance notification of a certain transaction request, or may be acquired from another system, and after the response information is determined, the response information may be packaged to generate the first message information, and the first message information may be written into a real-time return queue inside the whole service system. The instructions in the real-time return queue are sequentially executed by the service system processor in real time, the first message information is written into the real-time return queue, and the service system processor can return the first message information to the system sending the transaction request in real time.
The asynchronous request module 504 is configured to send an asynchronous response request to the asynchronous response module when the determined communication manner is an asynchronous response, where the asynchronous response request corresponds to the transaction request.
When the communication mode corresponding to the response information of the transaction request is asynchronous response, an asynchronous response request needs to be sent to an asynchronous response module to instruct the asynchronous response module to execute subsequent asynchronous response work. The asynchronous response request is a request indicating that response information of the transaction request is asynchronously returned, and thus corresponds to the transaction request. Specifically, the asynchronous response request may include information related to the transaction request.
And the asynchronous response module 505 is configured to, after receiving the asynchronous response request and receiving asynchronous response data, perform packet processing on the asynchronous response data according to the second preset rule and the third preset rule to obtain corresponding second message information, and send the second message information to a system corresponding to the transaction request.
Since the asynchronous response usually needs to acquire information from other systems, such as credit investigation information from credit investigation system, it is often necessary to wait for a certain time. After receiving the asynchronous response request, the asynchronous response module waits for asynchronous response data, and after all the asynchronous response data are acquired, the asynchronous response data can be packaged according to a preset rule to obtain second message information. Due to the asynchronous response communication mode, after the second message information is obtained, the second message information does not need to be written into a real-time return queue, and the second message information is directly sent to a system corresponding to the transaction request according to the corresponding transaction request.
In this embodiment, the transaction information returning device may determine how to generate and return the response information of the transaction request by determining the communication mode, the group packaging mode, and the transaction path of the information through a pre-configured adaptation rule in the process of returning the transaction information, without considering the change of the transaction path and the channel, thereby avoiding the problem that a new version system needs to be repeatedly developed due to the expansion of a business system framework and a channel in the prior art.
Fig. 6 is a schematic structural diagram of a communication method determining module according to an embodiment of the present invention. In the above embodiment, the first preset rule may include a correspondence between a service type and/or a transaction request time and a communication method. Referring to fig. 6, the communication method determining module 502 may include:
the information determining module 601 is configured to determine a service type to which the response information of the transaction request belongs and/or a request time of the transaction request.
The communication determining submodule 602 is configured to determine a communication manner corresponding to the response information of the transaction request according to a preset correspondence between a service type and/or transaction request time and the communication manner.
Specifically, the correspondence between the service type and/or the transaction request time and the communication mode may be set according to the service scenario and the service requirement. For example 23 a night: the 7:00 morning from 00 to the next morning is a service idle stage, communication modes of some services can be configured into a synchronous mode, and other time periods are asynchronous modes; it can also be set that the transaction A must be in a synchronous mode and the transaction B must be in an asynchronous mode. The setting mode is flexible and can be set randomly according to the routine requirement.
Fig. 7 is a schematic structural diagram of a synchronization response module disclosed in the embodiment of the present invention, and referring to fig. 7, the synchronization response module 503 may include:
and the message body organizing module 701 is configured to package the response information of the transaction request into a message body according to a second preset rule.
A message header organization module 702, configured to determine a transaction path of the response information of the transaction request according to a third preset rule, and assemble a message header matching the determined transaction path for the message body according to the determined transaction path, so as to obtain first message information.
In a specific implementation, the second preset rule may include a correspondence between a service type and a group packaging manner, the group packaging manner may include a fixed-length group packaging and a variable group packaging, and the third preset rule may include a correspondence between a service type and a transaction path, so that the packet body organizing module 701 may specifically include: the group package determining module is used for determining a group package mode corresponding to the response information of the transaction request according to a corresponding relation between a preset service type and the group package mode; and the message body organization submodule is used for grouping the response information of the transaction request into a fixed-length message or a variable message according to the determined grouping mode. The message header organizing module 702 may specifically be configured to: and determining the transaction path of the response information of the transaction request according to the corresponding relation between the preset service type and the transaction path. Specifically, the service type corresponding to the response information of the transaction request may be determined first, and then the transaction path of the response information of the transaction request may be determined according to a preset correspondence between the service type and the transaction path.
A message sending module 703 is configured to send the first message information to a real-time return queue, so that the processor sends the first message information in the real-time return queue to a system corresponding to the transaction request information in real time.
Fig. 8 is a schematic structural diagram of another transaction information return apparatus disclosed in the embodiment of the present invention, and as shown in fig. 8, the transaction information return apparatus 80 may include:
the rule configuration module 801 is configured to pre-configure a correspondence between a service type and/or a transaction request time and a communication mode, a correspondence between a service type and a package mode, and a correspondence between a service type and a transaction path.
The request processing module 501 is configured to obtain a transaction request, and perform service data processing according to the transaction request.
A communication mode determining module 502, configured to determine, according to a first preset rule, a communication mode corresponding to the response information of the transaction request, where the communication mode includes a synchronous response and an asynchronous response.
And the synchronous response module 503 is configured to, when the determined communication manner is a synchronous response, perform packet packaging processing on the response information of the transaction request according to a second preset rule and a third preset rule to obtain corresponding first message information, and send the first message information to a real-time return queue, so that the processor sends the first message information in the real-time return queue to a system corresponding to the transaction request in real time.
The asynchronous request module 504 is configured to send an asynchronous response request to the asynchronous response module when the determined communication manner is an asynchronous response, where the asynchronous response request corresponds to the transaction request.
And the asynchronous response module 505 is configured to, after receiving the asynchronous response request and receiving asynchronous response data, perform packet processing on the asynchronous response data according to the second preset rule and the third preset rule to obtain corresponding second message information, and send the second message information to a system corresponding to the transaction request.
In this embodiment, the adaptation rules of the information including the service type and the communication mode, the group packaging mode, and the transaction path are configured in advance, so that the generation and transmission of the response information are performed directly by using the corresponding rules in the subsequent response work of the transaction request. The transaction information returning device only executes corresponding actions according to preset rules in the transaction information returning process, does not concern about changes of transaction paths and channels, and avoids the problem that a new version system needs to be repeatedly developed due to expansion of a service system framework and channels in the prior art.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for returning transaction information, comprising:
the corresponding relation between the service type and/or the transaction request time and the communication mode, the corresponding relation between the service type and the packaging mode and the corresponding relation between the service type and the transaction path are configured in advance;
the business processing module acquires a transaction request and processes business data according to the transaction request;
the business processing module determines a communication mode corresponding to response information of the transaction request according to a first preset rule, wherein the communication mode comprises a synchronous response and an asynchronous response, and the first preset rule comprises a corresponding relation between a business type and/or transaction request time and the communication mode;
if the transaction request is synchronous response, the service processing module performs package processing on response information of the transaction request according to a second preset rule and a third preset rule to obtain corresponding first message information, and sends the first message information to a real-time return queue, so that a processor sends the first message information in the real-time return queue to a system corresponding to the transaction request in real time, wherein the second preset rule comprises a corresponding relation between a service type and a package mode, and the third preset rule comprises a corresponding relation between the service type and a transaction path;
if the transaction request is asynchronous response, the service processing module sends an asynchronous response request to an asynchronous response module, and the asynchronous response request corresponds to the transaction request;
and after receiving the asynchronous response request and asynchronous response data, the asynchronous response module performs packet processing on the asynchronous response data according to the second preset rule and the third preset rule to obtain corresponding second message information, and sends the second message information to a system corresponding to the transaction request.
2. The method according to claim 1, wherein the first preset rule includes a correspondence between a service type and/or a transaction request time and a communication method, and the determining, by the service processing module according to the first preset rule, the communication method corresponding to the response information of the transaction request includes:
the business processing module determines the business type of the response information of the transaction request and/or the request time of the transaction request;
and the service processing module determines a communication mode corresponding to the response information of the transaction request according to the corresponding relation between the preset service type and/or transaction request time and the communication mode.
3. The method for returning the transaction information according to claim 1, wherein the service processing module performs packet processing on the response information of the transaction request according to a second preset rule and a third preset rule to obtain corresponding first message information, and the method comprises:
the business processing module packs the response information of the transaction request into a message body according to a second preset rule;
and the service processing module determines a transaction path of response information of the transaction request according to a third preset rule, and assembles a message header matched with the determined transaction path for the message body according to the determined transaction path to obtain first message information.
4. The method according to claim 3, wherein the second preset rule includes a correspondence between a service type and a group packaging method, the group packaging method includes a fixed-length group packaging and a variable group packaging, the third preset rule includes a correspondence between a service type and a transaction path, and the service processing module packages the response information of the transaction request into a message according to the second preset rule, including:
determining a group packaging mode corresponding to the response information of the transaction request according to a corresponding relation between a preset service type and the group packaging mode;
packaging the response information of the transaction request into a fixed-length message or a variable message according to the determined packaging mode;
the business processing module determines a transaction path of the response information of the transaction request according to a third preset rule, and the transaction path comprises the following steps:
and determining the transaction path of the response information of the transaction request according to the corresponding relation between the preset service type and the transaction path.
5. An apparatus for returning transaction information, comprising:
the request processing module is used for acquiring a transaction request and processing service data according to the transaction request;
the communication mode determining module is used for determining a communication mode corresponding to response information of the transaction request according to a first preset rule, wherein the communication mode comprises a synchronous response and an asynchronous response, and the first preset rule comprises a corresponding relation between a service type and/or transaction request time and the communication mode;
the synchronous response module is used for packaging and processing response information of the transaction request according to a second preset rule and a third preset rule when the determined communication mode is synchronous response to obtain corresponding first message information, and sending the first message information to a real-time return queue so that a processor sends the first message information in the real-time return queue to a system corresponding to the transaction request in real time, wherein the second preset rule comprises a corresponding relation between a service type and a packaging mode, and the third preset rule comprises a corresponding relation between the service type and a transaction path;
the asynchronous response module is used for sending an asynchronous response request to the asynchronous response module when the determined communication mode is asynchronous response, and the asynchronous response request corresponds to the transaction request;
the asynchronous response module is used for performing packet processing on the asynchronous response data according to the second preset rule and the third preset rule after receiving the asynchronous response request and receiving the asynchronous response data to obtain corresponding second message information, and sending the second message information to a system corresponding to the transaction request;
and the rule configuration module is used for configuring the corresponding relation between the service type and/or the transaction request time and the communication mode, the corresponding relation between the service type and the group packaging mode and the corresponding relation between the service type and the transaction path in advance.
6. The apparatus for returning transaction information according to claim 5, wherein the first preset rule includes a correspondence between a service type and/or a transaction request time and a communication method, and the communication method determining module includes:
the information determining module is used for determining the service type of the response information of the transaction request and/or the request time of the transaction request;
and the communication determining submodule is used for determining a communication mode corresponding to the response information of the transaction request according to the corresponding relation between the preset service type and/or the transaction request time and the communication mode.
7. The apparatus for returning transaction information according to claim 5, wherein the synchronization response module comprises:
the message body organization module is used for packaging the response information of the transaction request into a message body according to a second preset rule;
the message header organization module is used for determining a transaction path of response information of the transaction request according to a third preset rule, and assembling a message header matched with the determined transaction path for the message body according to the determined transaction path to obtain first message information;
and the message sending module is used for sending the first message information to a real-time return queue so that the processor sends the first message information in the real-time return queue to a system corresponding to the transaction request information in real time.
8. The apparatus for returning transaction information according to claim 7, wherein the second preset rule includes a correspondence between a service type and a group packaging mode, the group packaging mode includes a fixed-length group packaging and a variable group packaging, and the third preset rule includes a correspondence between a service type and a transaction path, and then the packet body organizing module includes:
the group package determining module is used for determining a group package mode corresponding to the response information of the transaction request according to a corresponding relation between a preset service type and the group package mode;
the message body organization submodule is used for grouping the response information of the transaction request into a fixed-length message or a variable message according to the determined grouping mode;
the message header organization module comprises:
the path determining module is used for determining a transaction path of the response information of the transaction request according to the corresponding relation between the preset service type and the transaction path;
and the message header organization sub-module is used for assembling the message header matched with the determined transaction path for the message body according to the determined transaction path to obtain first message information.
CN201810769379.0A 2018-07-13 2018-07-13 Method and device for returning transaction information Active CN109035020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810769379.0A CN109035020B (en) 2018-07-13 2018-07-13 Method and device for returning transaction information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810769379.0A CN109035020B (en) 2018-07-13 2018-07-13 Method and device for returning transaction information

Publications (2)

Publication Number Publication Date
CN109035020A CN109035020A (en) 2018-12-18
CN109035020B true CN109035020B (en) 2022-03-04

Family

ID=64642011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810769379.0A Active CN109035020B (en) 2018-07-13 2018-07-13 Method and device for returning transaction information

Country Status (1)

Country Link
CN (1) CN109035020B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256373B (en) * 2021-05-17 2023-11-07 北京京东振世信息技术有限公司 Document distribution method, device and server
CN114257577A (en) * 2021-12-08 2022-03-29 长城计算机软件与系统有限公司 Service request message response method and system for micro service

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987925A (en) * 2006-12-29 2007-06-27 中国建设银行股份有限公司 Complex front platform of financial system and transfering method transaction data
CN104407922A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Asynchronous batch-processing dispatching method and system
CN107798127A (en) * 2017-11-14 2018-03-13 中国银行股份有限公司 A kind of method of data synchronization and device of bank's mainframe and personal computer

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9177304B2 (en) * 2003-06-27 2015-11-03 Tafmo Australia Pty Ltd. Electronic transaction system
US20140379558A1 (en) * 2013-06-20 2014-12-25 Microsoft Corporation Extensible Interface for Synchronous and Asynchronous Payment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987925A (en) * 2006-12-29 2007-06-27 中国建设银行股份有限公司 Complex front platform of financial system and transfering method transaction data
CN104407922A (en) * 2014-10-29 2015-03-11 中国建设银行股份有限公司 Asynchronous batch-processing dispatching method and system
CN107798127A (en) * 2017-11-14 2018-03-13 中国银行股份有限公司 A kind of method of data synchronization and device of bank's mainframe and personal computer

Also Published As

Publication number Publication date
CN109035020A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN107819861A (en) Business data processing method, apparatus and system
CN113409045B (en) Data processing method and device based on block chain and electronic equipment
CN105260292B (en) A kind of log recording method, apparatus and system
CN109102270A (en) Transaction verification method, computer equipment and the storage medium of block chain number Token
CN112486830B (en) Pressure testing method, device and system for block chain network
WO2020139514A1 (en) Blockchain-based recordkeeping method and apparatus
CN109035020B (en) Method and device for returning transaction information
US20110145844A1 (en) Systems and methods for facilitating call request aggregation over a network
CN108959465B (en) Method and device for storing and reading service data and server
CN112288577B (en) Transaction processing method, device, electronic equipment and medium for distributed service
CN107330572A (en) Air control method, apparatus and system
CN111598575A (en) Business process control method and device, electronic equipment and readable storage medium
CN109800063A (en) Business method for parallel processing, device, server, storage medium
CN108897729B (en) Transaction template sharing method and device, electronic equipment and storage medium
CN113052688A (en) Credit card handling method and device based on block chain
CN110910106A (en) Cash management message processing method and system
CN110210976A (en) A kind of method of commerce and its equipment based on block chain
CN109345249A (en) A kind of payment fail processing method and device
CN110852744A (en) Method, device, terminal equipment and medium for switching transaction channels
WO2021121030A1 (en) Resource transfer method, settlement terminal, and server node
CN113177843A (en) Cross-bank loan service processing method and device based on block chain
US20090144381A1 (en) Method and system for data formatting
CN105721185B (en) Information transferring method and its device between computer system service node
CN112990906B (en) Data processing method, device and system, computer storage medium and electronic equipment
CN111127003B (en) Wallet account payment method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant