CN112396522A - Transaction processing method and device - Google Patents

Transaction processing method and device Download PDF

Info

Publication number
CN112396522A
CN112396522A CN202011303564.4A CN202011303564A CN112396522A CN 112396522 A CN112396522 A CN 112396522A CN 202011303564 A CN202011303564 A CN 202011303564A CN 112396522 A CN112396522 A CN 112396522A
Authority
CN
China
Prior art keywords
response message
transaction
information
total
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011303564.4A
Other languages
Chinese (zh)
Inventor
丁陈飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202011303564.4A priority Critical patent/CN112396522A/en
Publication of CN112396522A publication Critical patent/CN112396522A/en
Pending legal-status Critical Current

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

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a transaction processing method and a device, wherein the method comprises the following steps: when the total transaction is received, analyzing the total transaction flow, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to a corresponding micro-service or host; receiving sub-response message information returned by the corresponding micro-service or host; when determining that the sub-response message information contains authorization information and/or warning information, adding the sub-response message information into the switching area; when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; and obtaining a final total response message according to the preset response identifier and the authorization information and/or the warning information in the exchange area, and processing the total transaction according to the total response message. The invention can realize the unified processing of the multi-sub-transaction authorization information, only needs one-time authorization, has low complexity and repeatability of authorization processing, and further improves the efficiency of transaction processing.

Description

Transaction processing method and device
Technical Field
The invention relates to the technical field of data processing, in particular to a transaction processing method and device.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
At present, a total transaction usually involves sending a plurality of sub-transactions, for example, a plurality of outbound transactions to a corresponding micro-service or host, because a traditional core system processes each outbound transaction, an authorization message will pop up a to-be-authorized message at the front end to allow an authorized person to process the message, and the plurality of outbound transactions need to be processed for a plurality of times, the authorization processing complexity and repeatability are high, and the total transaction processing efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a transaction processing method, which is used for reducing the complexity and the repeatability of authorization processing and further improving the efficiency of transaction processing, and comprises the following steps:
when the total transaction is received, analyzing the total transaction flow, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to a corresponding micro-service or host;
receiving sub-response message information returned by the corresponding micro-service or host;
when determining that the sub-response message information contains authorization information and/or warning information, adding the sub-response message information into a pre-established switching area, and executing the step of obtaining a final total response message: when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; obtaining a final total response message according to the preset response identifier and authorization information and/or warning information in the switching area;
and processing the total transaction according to the final total response message.
The embodiment of the invention also provides a transaction processing device, which is used for reducing the complexity and the repeatability of authorization processing and further improving the efficiency of transaction processing, and comprises:
the initiating unit is used for analyzing the total transaction flow when receiving the total transaction, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to the corresponding micro-service or host;
the receiving unit is used for receiving sub-response message information returned by the corresponding micro-service or host;
a total response message determining unit, configured to add the sub-response message information to a pre-established switching area when determining that the sub-response message information includes authorization information and/or warning information, and execute the step of obtaining a final total response message: when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; obtaining a final total response message according to the preset response identifier and authorization information and/or warning information in the switching area;
and the processing unit is used for processing the total transaction according to the final total response message.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the transaction processing method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above transaction processing method is stored in the computer-readable storage medium.
In the embodiment of the invention, compared with the technical scheme that authorization processing is required for multiple times, the complexity and the repeatability of the authorization processing are higher, and the total transaction processing efficiency is low in the prior art, the transaction processing scheme comprises the following steps: when the total transaction is received, analyzing the total transaction flow, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to a corresponding micro-service or host; receiving sub-response message information returned by the corresponding micro-service or host; when determining that the sub-response message information contains authorization information and/or warning information, adding the sub-response message information into a pre-established switching area, and executing the step of obtaining a final total response message: when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; obtaining a final total response message according to the preset response identifier and authorization information and/or warning information in the switching area; the total transaction is processed according to the final total response message, so that the unified processing of the authorization information of the plurality of sub-transactions can be realized, only one authorization is needed, the complexity and the repeatability of the authorization processing are low, and the transaction processing efficiency is further improved.
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 some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a flow chart illustrating a transaction processing method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of transaction processing in an embodiment of the invention;
FIG. 3 is a schematic diagram of a transaction processing device according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a transaction processing device according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a transaction processing device according to another embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Before describing the embodiments of the present invention, terms related to the embodiments of the present invention will be described.
1. The model is an important component in the distributed integrated agent, each transaction generates a series of xml files containing logical mapping, the calling and processing among all the micro-services are realized by analyzing the mapping, and the micro-services are coordinated to realize a complete business process.
2. The warning information is prompt information which does not affect the transaction result (indicating that the transaction is successful and does not need to be corrected) but needs to be noticed in the transaction execution process; for example, the response return response code in the execution of orthogonal easy a0182S501 (a passthrough deposit for private deposit) is WOKA01820007, which indicates that the passbook has been reported to be lost. But the orthogonal easy state is 00 (success state).
The inventors have found the following technical problems: when a complete transaction is integrated and processed by the distributed integrated agent, each outbound transaction not only converts the contents of a request body and the like through a model, but also sends a request message to a corresponding micro service or host through the integration layer according to different transaction codes, and the integration layer correspondingly processes the response message of the micro service or host. The authorization information is in the response header of the response message. In the centralized system of the old system, when each outbound transaction meets the information needing to be authorized, the authorization manager needs to confirm once, and a plurality of outbound transactions are confirmed, so that the confirmation needs to be carried out for a plurality of times.
The invention finds the problems in the prior art, and provides a transaction processing scheme, wherein the authorization is uniformly processed by a plurality of outbound transaction authorization information after the outbound response transaction message is analyzed by a model in a distributed centralized agent, and when the final result needs authorization verification, only authorization management personnel need to authorize once, thereby reducing the complexity of the program and improving the efficiency.
Specifically, in conventional legacy systems, transactions are executed serially, with one transaction executed before the next. Now, in a distributed system, the transaction is returned after each execution and then the next execution. In order to process the authorization information of a plurality of transactions, the authorization information does not need to be prompted for a plurality of times at the front end, and the complexity of the system is reduced. It needs to be processed in the response message returned for each transaction. Since a complete transaction comprises a plurality of outgoing transactions, each transaction may contain one or more response messages and may contain error codes, such as warning messages and error messages, in addition to authorization messages. This aggregated response information often complicates authorization. Therefore, the response head of the response message returned by each outbound call is processed and placed in the switching area, and the response head returns to the front-end page to prompt the authorized manager to operate after the outbound call is processed for multiple times. Then, the authorization information needs to be processed in a centralized way, and when the sub-transaction processes the response message, a memory exchange area is established to store the total response message information to be returned. And then processing the total response message header according to the response header and the authorization information of each response message. The existing distributed core system processes the transaction, and even if a plurality of pieces of authorization information exist in the multi-outgoing-call transaction, the multi-outgoing-call transaction can be prompted only once, so that the efficiency is greatly improved. The transaction processing scheme is described in detail below.
Fig. 1 is a schematic flow chart of a transaction processing method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step 101: when the total transaction is received, analyzing the total transaction flow, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to a corresponding micro-service or host;
step 102: receiving sub-response message information returned by the corresponding micro-service or host;
step 103: when determining that the sub-response message information contains authorization information and/or warning information, adding the sub-response message information into a pre-established switching area, and executing the step of obtaining a final total response message: when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; obtaining a final total response message according to the preset response identifier and authorization information and/or warning information in the switching area;
step 104: and processing the total transaction according to the final total response message.
Compared with the technical scheme that authorization processing is required for multiple times, the authorization processing complexity and repeatability are high, and the total transaction processing efficiency is low in the prior art, the transaction processing method can achieve unified processing of multiple sub-transaction authorization information, only one authorization is needed, the authorization processing complexity and repeatability are low, and further the transaction processing efficiency is improved.
In specific implementation, the transaction processing method provided by the embodiment of the invention can be applied to the calling and processing among micro services and the distributed system scene of distributed integrated agent integration processing, such as a wechat platform and various application applets included in the wechat platform.
In specific implementation, the sub-transactions in the embodiment of the present invention may include outbound transactions and inbound transactions.
In specific implementation, the sub-response message information may be included in the outbound response header shown in fig. 2; the final total response message may include a header and body information of the total response message (e.g., the total return message in fig. 2), where the header may include: the preset response identifier (e.g., the response code 999999999999 in fig. 2) and the authorization identifier (e.g., the authorization code in table 1 below) corresponding to each authorization message are also included if there is an alarm identifier (alarm code). The message body information of the total response message may include: authorization information and/or warning information, etc.
In specific implementation, the total transaction in the embodiment of the invention is a complete transaction, which can correspond to a plurality of sub-transactions (outbound transaction and inbound transaction).
In one embodiment, as shown in fig. 2, the transaction processing method may further include:
when the number of the authorization information in the switching area is determined to be one, taking an authorization identifier corresponding to the authorization information as a response identifier of the total response message;
and obtaining a final total response message according to the response identifier of the total response message and the authorization information and/or the warning information in the switching area.
In specific implementation, as shown in fig. 2, in this embodiment, the final total response packet may include a header and body information of the total response packet (e.g., the total return packet in fig. 2), where the header may include: the response identifier (the authorization identifier corresponding to the piece of authorization information) of the total response message, i.e. the response code (the authorization code in table 1 below, i.e. authorization code: YACA01811523, etc.), etc. The implementation method for obtaining the final total response message further improves the transaction processing efficiency.
In one embodiment, as shown in fig. 2, the transaction processing method may further include:
when only one piece of warning information exists in the switching area, taking a warning identifier corresponding to the piece of warning information as a response identifier of the total response message;
and obtaining the final total response message according to the response identifier of the total response message and the warning information in the switching area.
In this embodiment, the final total response packet may include a header and body information of the total response packet (e.g., the total return packet in fig. 2), where the header may include: the response identifier of the total response message (the warning identifier corresponding to the warning message), i.e. the response code (the warning identifier, such as the warning code mentioned below: WOKA01820007, etc.). The implementation method for obtaining the final total response message further improves the transaction processing efficiency.
In one embodiment, as shown in fig. 2, the transaction processing method may further include:
when the switching area is determined to have more than one warning message, a preset response identifier is set for the total response message;
and obtaining a final total response message according to the preset response identifier and all the warning information in the switching area.
In this embodiment, the final total response packet may include a header and body information of the total response packet (e.g., the total return packet in fig. 2), where the header may include: the response identifier, i.e. the response code (which may also be: 999999999999, and the warning identifier, warning code, corresponding to each warning message) is preset. The implementation method for obtaining the final total response message further improves the transaction processing efficiency.
In one embodiment, as shown in fig. 2, when it is determined that the response message information includes the authorization information and/or the warning information, adding the response message information to the pre-established switching area may include:
when determining that the response message information contains authorization information and/or warning information, adding the response message information into a pre-established switching area;
and removing repeated authorization information or warning information in the switching area to obtain the authorization information and/or the warning information in the switching area.
When the method is specifically implemented, the repeated authorization information or warning information in the exchange area is removed, the authorization information and/or the warning information in the exchange area are obtained, and the transaction processing efficiency is further improved.
In one embodiment, as shown in fig. 2, the transaction processing method may further include:
when the sub-response message information is determined not to contain the authorization information and/or the warning information, whether the corresponding sub-transaction is successfully processed is judged;
after the sub-transaction processing is determined to be successful, obtaining a response identifier of the sub-transaction processing success, and executing the step of obtaining a final total response message; the final total response message also comprises the sub-transaction processing success response identification.
In specific implementation, as shown in fig. 2, after the sub-transaction processing is determined to be successful, a response identifier (for example, a response code referred to below: 000000000000) for successful sub-transaction processing is obtained, and the step of obtaining a final total response message is executed, so that the efficiency of transaction processing is further improved; the final total response message further includes the sub-transaction processing success response identifier, that is, 000000000000 may be added to a message header of a total response message (such as the total return message in fig. 2).
In one embodiment, as shown in fig. 2, the transaction processing method may further include: and after determining that the sub-transactions are not processed successfully, ending the total transaction and feeding back error information.
In specific implementation, as shown in fig. 2, after it is determined that the sub-transactions are not processed successfully, the total transaction is ended, and error information, such as an error code, is fed back, so that the efficiency of transaction processing is further improved.
To facilitate an understanding of how the present invention may be implemented, the transaction processing scheme of the present invention is described in its entirety below.
When a complete transaction is processed by the integration of distributed integrated agents, each outbound transaction converts the contents of a request body and the like through a model. The model is an important component in the distributed integrated agent, each transaction generates a series of xml files containing logical mapping, the calling and processing among all the micro-services are realized by analyzing the mapping, and the micro-services are coordinated to realize a complete business process. And sending a request message to a corresponding micro service or host through the integration layer according to different outbound transaction codes, and correspondingly processing a response message of the micro service or host by the integration layer. The authorization information is in the response header of the response message (sub-response message).
The response message (sub-response message) returned by each outbound transaction is parsed, and if the message contains authorization or warning information, it is added to the switching area, and then the repeated authorization or warning information is removed. The warning information is prompt information which does not affect the transaction result (indicating that the transaction is successful and does not need to be corrected) but needs to be noticed in the transaction execution process; the response return response code as in the execution of orthogonal yi a0182S501 (a passthrough deposit for private deposit) is an alarm code WOKA01820007, which indicates that the passbook has been reported lost. But the transaction status is 00 (success status). If the response message is a successful response code 000000000000, the next transaction is processed; if the abnormal information is the abnormal information, the abnormal information is directly thrown out, and the response message is directly returned.
And finally, setting the response codes of the response messages according to whether the number of the response information (authorization codes and warning codes) of the switching areas is more than 1, if only one response information is provided, setting the response information as the response codes, if the number of the response information is more than 1, setting the response information as 99999999999 (preset response identification) according to the specification, then adding the authorization information and the warning information of the switching areas, setting the authorization information and the warning information into a response header, and ending the total transaction.
In order to facilitate understanding of how the present invention is implemented, a detailed description of a transaction processing method according to an embodiment of the present invention is provided below with reference to fig. 2.
Example one: after the transaction is finished, if the response information in the response message only has one piece of authorization information, the response code is the authorization code:
the transaction A0182S501 is executed, the first transaction is analyzed to be A1051097 (internal account) outbound host through a model, and then the response code returned after the processing is the authorization code YACA01821502 (the customer needs to be authorized when the foreign currency is accumulated in cash on the same day and is equal to or more than 5000.00 equivalent dollars); then the second transaction is the calling microservice in M0182S501, and then the response code returned after the processing is 00000000 (success); and then the sub-transaction of the A0182S501 is ended, a response code YACA01821502 is returned, and the response describes that the customer needs to be authorized when the currency cash accumulated in the foreign currency on the day is larger than or equal to 5000.00 dollars of the equivalent value.
Example two: if the response information in the response message only contains a plurality of pieces of authorization information after the transaction is ended, the response code is 999999999999:
the transaction A0182S501 is executed, the first transaction is analyzed to be A1051097 (internal account) outbound host through a model, and then the response code returned after the processing is the authorization code YACA01821502 (the customer needs to be authorized when the foreign currency is accumulated in cash on the same day and is equal to or more than 5000.00 equivalent dollars); then the second transaction is the call microservice in M0182S501, and then the response code returned after the processing is YACA018215023 (authorization code); then, when the sub-transaction of the A0182S501 is finished, a response code of 999999999999 is returned, and the response is described as Multi Error Inf// format; and the response header contains both authorization codes, if any, as well as the warning code.
Example three: if the response information in the response message has authorization information and an error code after the transaction is finished, the response code is the error code:
the transaction A0182S501 is executed, the first transaction is analyzed to be A1051097 (internal account) outbound host through a model, and then the response code returned after the processing is the authorization code YACA01821502 (the customer needs to be authorized when the foreign currency is accumulated in cash on the same day and is equal to or more than 5000.00 equivalent dollars); then the second transaction is M0182S501 callback microservice, and then the response code returned after processing is YCEA01823085 (error code, indicating that the transaction currency and the internal account currency are not matched); at this time, the a0182S501 transaction is directly ended and an exception is thrown, a response code is returned as YCEA01823085, the response is described as that the transaction currency and the internal account currency are not matched, and the response header has no information of YACA01821502 (thereby it can be seen that the priority of the error code is greater than that of the authorization code, and the priority of the authorization code is greater than that of the warning code).
For ease of understanding, the following authorization information structure definitions are shown, for example, in table 1 below:
authorization attribute numbering Authorization attribute names Authorization code Transaction ID
0001 The money of the RMB revolution to the private card is larger than the parameter and needs to be authorized YACA01811523 A01831701
0002 The amount of the money in the private life period is larger than the parameter and needs to be authorized by the revolution of the RMB YACA01811524 A01831701
0003 The amount of the private currency larger than the parameter needs to be authorized by the revolution of the foreign currency YACA01811529 A01831701
0004 Foreign currency revolution is authorized for private card YACA01811521 A01831701
0005 The accumulated cash-out amount on the day exceeds the limit amount and requires authorization YACA01811522 A01831701
0006 The residual amount after partial withdrawal is not large amount of money to be saved and needs to be authorized YACA01811504 A01833301
0007 The account opening amount is not a large deposit and needs to be authorized YACA01811505 A01833301
0008 Partial pull-ahead authorization YACA01811506 A01833301
TABLE 1
Of course, the authorization information may include more than one, not just as shown in table 1 above. The number of the authorization information codes can cover authorization examples required by a business scene and authorization scenes required by future development, and the authorization information codes have the characteristics of completeness and expansibility. The relationship between the authorization information and the sub-response message may be understood as not: the authorization information is in the message header of the sub-response message, and a plurality of authorization information store the field of the message header, and different response codes are changed according to the number of the authorization information. And reasonably merging different authorization information to obtain a total response message.
To sum up, the transaction processing method provided by the embodiment of the invention has the following advantages:
1. and performing efficient merging processing based on different authorization information.
2. And reasonably processing the relationship between the response message and the authorization information.
3. The method can reasonably process the relation between different error codes and authorization information, and has better robustness.
Embodiments of the present invention further provide a transaction processing apparatus, as described in the following embodiments. Because the principle of the device for solving the problems is similar to the transaction processing method, the implementation of the device can be referred to the implementation of the transaction processing method, and repeated details are not repeated.
Fig. 3 is a schematic structural diagram of a transaction processing device according to an embodiment of the present invention, as shown in fig. 3, the device includes:
the initiating unit 01 is used for analyzing the total transaction flow when receiving the total transaction, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to a corresponding micro-service or host;
a receiving unit 02, configured to receive sub-response message information returned by a corresponding micro service or host;
a total response packet determining unit 03, configured to add the sub response packet information to a pre-established switching area when determining that the sub response packet information includes authorization information and/or warning information, and execute the step of obtaining a final total response packet: when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; obtaining a final total response message according to the preset response identifier and authorization information and/or warning information in the switching area;
and the processing unit 04 is configured to process the total transaction according to the final total response message.
In one embodiment, the total response packet determining unit may be further configured to:
when the number of the authorization information in the switching area is determined to be one, taking an authorization identifier corresponding to the authorization information as a response identifier of the total response message;
and obtaining a final total response message according to the response identifier of the total response message and the authorization information and/or the warning information in the switching area.
In one embodiment, the total response packet determining unit may be further configured to:
when only one piece of warning information exists in the switching area, taking a warning identifier corresponding to the piece of warning information as a response identifier of the total response message;
and obtaining the final total response message according to the response identifier of the total response message and the warning information in the switching area.
In one embodiment, the total response packet determining unit may be further configured to:
when the switching area is determined to have more than one warning message, a preset response identifier is set for the total response message;
and obtaining a final total response message according to the preset response identifier and all the warning information in the switching area.
In one embodiment, as shown in fig. 4, the transaction processing apparatus may further include a deduplication processing unit 05, configured to remove duplicate authorization information or warning information in the exchange area, and obtain the authorization information and/or warning information in the exchange area.
In one embodiment, as shown in fig. 5, the transaction processing apparatus may further include a transaction execution judging unit 06 configured to:
when the sub-response message information is determined not to contain the authorization information and/or the warning information, whether the corresponding sub-transaction is successfully processed is judged;
after the sub-transaction processing is determined to be successful, obtaining a response identifier of the sub-transaction processing success, and executing the step of obtaining a final total response message; the final total response message also comprises the sub-transaction processing success response identification.
In one embodiment, the transaction execution determination unit is further configured to: and after determining that the sub-transactions are not processed successfully, ending the total transaction and feeding back error information.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the transaction processing method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above transaction processing method is stored in the computer-readable storage medium.
In the embodiment of the invention, compared with the technical scheme that authorization processing is required for multiple times, the complexity and the repeatability of the authorization processing are higher, and the total transaction processing efficiency is low in the prior art, the transaction processing scheme comprises the following steps: when the total transaction is received, analyzing the total transaction flow, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to a corresponding micro-service or host; receiving sub-response message information returned by the corresponding micro-service or host; when determining that the sub-response message information contains authorization information and/or warning information, adding the sub-response message information into a pre-established switching area, and executing the step of obtaining a final total response message: when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; obtaining a final total response message according to the preset response identifier and authorization information and/or warning information in the switching area; the total transaction is processed according to the final total response message, so that the unified processing of the authorization information of the plurality of sub-transactions can be realized, only one authorization is needed, the complexity and the repeatability of the authorization processing are low, and the transaction processing efficiency is further improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (16)

1. A transaction processing method, comprising:
when the total transaction is received, analyzing the total transaction flow, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to a corresponding micro-service or host;
receiving sub-response message information returned by the corresponding micro-service or host;
when determining that the sub-response message information contains authorization information and/or warning information, adding the sub-response message information into a pre-established switching area, and executing the step of obtaining a final total response message: when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; obtaining a final total response message according to the preset response identifier and authorization information and/or warning information in the switching area;
and processing the total transaction according to the final total response message.
2. The transaction processing method of claim 1, further comprising:
when the number of the authorization information in the switching area is determined to be one, taking an authorization identifier corresponding to the authorization information as a response identifier of the total response message;
and obtaining a final total response message according to the response identifier of the total response message and the authorization information and/or the warning information in the switching area.
3. The transaction processing method of claim 1, further comprising:
when only one piece of warning information exists in the switching area, taking a warning identifier corresponding to the piece of warning information as a response identifier of the total response message;
and obtaining the final total response message according to the response identifier of the total response message and the warning information in the switching area.
4. The transaction processing method of claim 1, further comprising:
when the switching area is determined to have more than one warning message, a preset response identifier is set for the total response message;
and obtaining a final total response message according to the preset response identifier and all the warning information in the switching area.
5. The transaction processing method of claim 1, wherein adding the response message information to the pre-established switching area upon determining that the response message information includes authorization information and/or warning information comprises:
when determining that the response message information contains authorization information and/or warning information, adding the response message information into a pre-established switching area;
and removing repeated authorization information or warning information in the switching area to obtain the authorization information and/or the warning information in the switching area.
6. The transaction processing method of claim 1, further comprising:
when the sub-response message information is determined not to contain the authorization information and/or the warning information, whether the corresponding sub-transaction is successfully processed is judged;
after the sub-transaction processing is determined to be successful, obtaining a response identifier of the sub-transaction processing success, and executing the step of obtaining a final total response message; the final total response message also comprises the sub-transaction processing success response identification.
7. The transaction processing method of claim 6, further comprising: and after determining that the sub-transactions are not processed successfully, ending the total transaction and feeding back error information.
8. A transaction processing device, comprising:
the initiating unit is used for analyzing the total transaction flow when receiving the total transaction, initiating a plurality of sub-transactions according to the analysis result, and sending each sub-transaction to the corresponding micro-service or host;
the receiving unit is used for receiving sub-response message information returned by the corresponding micro-service or host;
a total response message determining unit, configured to add the sub-response message information to a pre-established switching area when determining that the sub-response message information includes authorization information and/or warning information, and execute the step of obtaining a final total response message: when the number of the authorization information in the exchange area is determined to be more than one, a preset response identifier is set for a total response message corresponding to the total transaction; obtaining a final total response message according to the preset response identifier and authorization information and/or warning information in the switching area;
and the processing unit is used for processing the total transaction according to the final total response message.
9. The transaction-processing apparatus of claim 8, wherein the overall-response-message-determination unit is further configured to:
when the number of the authorization information in the switching area is determined to be one, taking an authorization identifier corresponding to the authorization information as a response identifier of the total response message;
and obtaining a final total response message according to the response identifier of the total response message and the authorization information and/or the warning information in the switching area.
10. The transaction-processing apparatus of claim 8, wherein the overall-response-message-determination unit is further configured to:
when only one piece of warning information exists in the switching area, taking a warning identifier corresponding to the piece of warning information as a response identifier of the total response message;
and obtaining the final total response message according to the response identifier of the total response message and the warning information in the switching area.
11. The transaction-processing apparatus of claim 8, wherein the overall-response-message-determination unit is further configured to:
when the switching area is determined to have more than one warning message, a preset response identifier is set for the total response message;
and obtaining a final total response message according to the preset response identifier and all the warning information in the switching area.
12. The transaction processing apparatus of claim 8, further comprising a deduplication processing unit configured to remove duplicate authorization information or warning information in the exchange area to obtain authorization information and/or warning information in the exchange area.
13. The transaction-processing device of claim 8, further comprising: a transaction execution judgment unit for:
when the sub-response message information is determined not to contain the authorization information and/or the warning information, whether the corresponding sub-transaction is successfully processed is judged;
after the sub-transaction processing is determined to be successful, obtaining a response identifier of the sub-transaction processing success, and executing the step of obtaining a final total response message; the final total response message also comprises the sub-transaction processing success response identification.
14. The transaction-processing apparatus of claim 13, wherein the transaction-execution determining unit is further configured to: and after determining that the sub-transactions are not processed successfully, ending the total transaction and feeding back error information.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when executing the computer program.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 7.
CN202011303564.4A 2020-11-19 2020-11-19 Transaction processing method and device Pending CN112396522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011303564.4A CN112396522A (en) 2020-11-19 2020-11-19 Transaction processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011303564.4A CN112396522A (en) 2020-11-19 2020-11-19 Transaction processing method and device

Publications (1)

Publication Number Publication Date
CN112396522A true CN112396522A (en) 2021-02-23

Family

ID=74605915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011303564.4A Pending CN112396522A (en) 2020-11-19 2020-11-19 Transaction processing method and device

Country Status (1)

Country Link
CN (1) CN112396522A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080006097A (en) * 2006-07-11 2008-01-16 신원정보기술주식회사 Integrated processing system for electronic commercial transaction service and method thereof and recording medium thereof
CN102812480A (en) * 2010-04-02 2012-12-05 艾赛尼斯有限公司 Methods and systems for verifying transactions
CN107958551A (en) * 2017-12-29 2018-04-24 福建省农村信用社联合社 A kind of full channel remote centralized authoring system of the expansible bank of business
CN109272404A (en) * 2018-09-04 2019-01-25 中国建设银行股份有限公司 Business authorization method and device
CN111698233A (en) * 2020-06-03 2020-09-22 中国银行股份有限公司 Message processing method and device
CN111754348A (en) * 2020-06-28 2020-10-09 中国银行股份有限公司 Scene combined transaction method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080006097A (en) * 2006-07-11 2008-01-16 신원정보기술주식회사 Integrated processing system for electronic commercial transaction service and method thereof and recording medium thereof
CN102812480A (en) * 2010-04-02 2012-12-05 艾赛尼斯有限公司 Methods and systems for verifying transactions
CN107958551A (en) * 2017-12-29 2018-04-24 福建省农村信用社联合社 A kind of full channel remote centralized authoring system of the expansible bank of business
CN109272404A (en) * 2018-09-04 2019-01-25 中国建设银行股份有限公司 Business authorization method and device
CN111698233A (en) * 2020-06-03 2020-09-22 中国银行股份有限公司 Message processing method and device
CN111754348A (en) * 2020-06-28 2020-10-09 中国银行股份有限公司 Scene combined transaction method and device

Similar Documents

Publication Publication Date Title
CN108509392B (en) Multi-mechanism account checking method, system, computer equipment and storage medium
CN110910230A (en) Accounting method, accounting system and storage medium
CN107770048A (en) A kind of application message method for pushing and device
CN114022151A (en) Block chain data visualization method and system, electronic device and storage medium
CN107577700A (en) The processing method and processing device of database disaster tolerance
CN112801797A (en) Method and apparatus for processing ticket data using a down-link trusted device
CN111405027B (en) Block chain consensus result screening method, device, computer equipment and storage medium
CN112396522A (en) Transaction processing method and device
CN110689442A (en) Method and system for underwriting
CN110535758A (en) A kind of email processing method and device
CN115983991A (en) Flow adjusting method, device, equipment and medium
CN115345740A (en) Account checking method, account checking device, account checking equipment, account checking storage medium and program product
CN114418738A (en) Cross-border remittance data processing method and device
CN112541810A (en) Risk handling method and device for business data and computer readable storage medium
CN113590662A (en) Method and device for inquiring business transaction result, storage medium and electronic equipment
CN111695901A (en) Accounting voucher processing method, device, equipment and storage medium
CN111488236A (en) Order abnormity processing method, server, storage medium and processing device
CN110659980A (en) Transaction information processing method, system and peripheral system
CN116051122B (en) Work order software system based on logistics scene
CN110059109A (en) Device, method and the storage medium of data query
CN113691683B (en) Telephone customer service waiting processing method and device
CN114172674B (en) Abnormal data detection method, device, equipment and computer medium
CN115687085A (en) Method and device for monitoring test process
CN108876570B (en) Electronic device, method for processing abnormal fund problem and storage medium
CN116109405A (en) Credit card business data authorization method and device based on scenerization parameter system

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