Error transaction processing method, error transaction processing device, and electronic device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]本申请的主要目的在于提供一种差错交易的处理方法、差错交易的处理装置、计算机可读存储介质和电子设备,以至少解决了现有技术中外围系统接入时差错交易场景的识别与处理的难度高的问题
[0014]应用本申请的技术方案,所述差错交易的处理方法,应用在目标系统中,所述目标系统包括API接口,所述方法中,首先,通过所述API接口接收外围系统发送的针对原交易进行差错交易的请求信息,并根据所述请求信息,确定所述请求信息对应的原交易流水信息,所述外围系统为与所述目标系统有业务处理关系的其他系统,所述差错交易为对所述原交易进行纠正的业务;之后,确定接收所述请求信息的所述API接口的编码为统一入口交易码;之后,根据所述统一入口交易码,确定原交易码,并至少根据所述统一入口交易码、所述原交易码以及所述原交易流水信息,确定目标差错交易的差错交易码和差错交易参数信息,所述原交易码为所述原交易的代码,所述差错交易码为所述差错交易的代码;最后,根据所述差错交易码和所述差错交易参数信息,执行所述目标差错交易。该方法通过统一的API接口接收针对原交易进行差错交易的请求信息,根据请求信息,确定对应的原交易流水信息,根据统一入口交易码,确定原交易码,并至少根据统一入口交易码、原交易码以及原交易流水信息,确定目标差错交易的差错交易码和差错交易参数信息,从而可以由目标系统完成差错交易,因此,对外围系统只暴露少量的统一接入的API接口,即可完成多种不同业务场景下的差错交易,进而解决了现有技术中外围系统接入时差错交易场景的识别与处理的难度高的问题。
Smart Images

Figure CN116957768B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and more specifically, to a method for processing erroneous transactions, an apparatus for processing erroneous transactions, a computer-readable storage medium, and an electronic device. Background Technology
[0002] With the rapid development of digital finance in recent years, the core business systems of banks have a wide variety of business types and complex business scenarios. Each business transaction API (Application Programming Interface) has error handling scenarios. When external systems access the core system, they need to identify the erroneous transactions corresponding to each transaction. This is a heavy and complex processing process for external systems, with a large amount of development work and high costs. Summary of the Invention
[0003] The main objective of this application is to provide a method, apparatus, computer-readable storage medium, and electronic device for processing erroneous transactions, so as to at least solve the problem of high difficulty in identifying and processing erroneous transaction scenarios when accessing peripheral systems in the prior art.
[0004] To achieve the above objectives, according to one aspect of this application, a method for processing erroneous transactions is provided, applied in a target system, the target system including an API interface. The method includes: receiving, through the API interface, a request from an external system to perform an erroneous transaction on an original transaction; determining, based on the request information, the original transaction flow information corresponding to the request information, wherein the external system is another system with business processing relationships with the target system, and the erroneous transaction is a business that corrects the original transaction; determining that the encoding of the API interface receiving the request information is a unified entry transaction code; determining, based on the unified entry transaction code, the original transaction code, and the original transaction flow information, determining, at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, an erroneous transaction code and erroneous transaction parameter information for a target erroneous transaction, wherein the original transaction code is the code of the original transaction, and the erroneous transaction code is the code of the erroneous transaction; and executing the target erroneous transaction based on the erroneous transaction code and the erroneous transaction parameter information.
[0005] Optionally, determining the original transaction code based on the unified entry transaction code includes: obtaining a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the unified entry transaction code and the original transaction code service name in the target system; substituting the unified entry transaction code into the first mapping relationship to obtain the original transaction code service name; and determining the code corresponding to the original transaction code service name as the original transaction code.
[0006] Optionally, at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a second mapping relationship and a third mapping relationship, wherein the second mapping relationship is a mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system, and the third mapping relationship is a mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system, and the parameter converter is used to convert the transaction information corresponding to the error transaction code into message data; substituting the unified entry transaction code and the original transaction code into the second mapping relationship to obtain the error transaction code corresponding to the target error transaction; substituting the unified entry transaction code and the original transaction code into the third mapping relationship to obtain the parameter converter corresponding to the target error transaction; receiving the message data sent by the parameter converter, parsing the original transaction flow information and the message data, and determining the error transaction parameter information of the target error transaction.
[0007] Optionally, determining the original transaction log information corresponding to the request information based on the request information includes: responding to the request information by generating original transaction element information, wherein the original transaction element information includes at least one of original transaction serial number, sub-transaction serial number, customer number, and medium number; and determining the transaction log information corresponding to the original transaction element information in the target system as the original transaction log information based on the original transaction element information.
[0008] Optionally, after determining the original transaction code and before determining the error transaction code and error transaction parameter information of the target error transaction, the method further includes: obtaining the error transaction type corresponding to the target error transaction, wherein the error transaction type includes one of error cancellation, error reversal, and error adjustment.
[0009] Optionally, at least based on the unified entry transaction code, the original transaction code, and the original transaction log information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a fourth mapping relationship and a fifth mapping relationship, wherein the fourth mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, the error transaction type, and the error transaction code in the target system, and the fifth mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, the error transaction type, and the parameter converter in the target system, wherein the parameter converter is used... The system converts the transaction information corresponding to the error transaction code into message data; substitutes the unified entry transaction code, the original transaction code, and the error transaction type into the fourth mapping relationship to obtain the error transaction code corresponding to the target error transaction; substitutes the unified entry transaction code, the original transaction code, and the error transaction type into the fifth mapping relationship to obtain the parameter converter corresponding to the target error transaction; receives the message data sent by the parameter converter, parses the original transaction flow information and the message data, and determines the error transaction parameter information of the target error transaction.
[0010] Optionally, after executing the target error transaction, the method further includes: determining result information after executing the target error transaction, and sending the result information to the peripheral system, wherein the result information is at least used to characterize whether the target error transaction was successful.
[0011] According to another aspect of this application, an error transaction processing apparatus is provided, applied in a target system. The target system includes an API interface. The apparatus includes a first determining unit, a second determining unit, a third determining unit, and an execution unit. The first determining unit is configured to receive a request from an external system via the API interface for error transaction processing of an original transaction, and determine the original transaction flow information corresponding to the request information based on the request information. The external system is another system with business processing relationships with the target system, and the error transaction is a business process for correcting the original transaction. The second determining unit is configured to determine that the encoding of the API interface receiving the request information is a unified entry transaction code. The third determining unit is configured to determine the original transaction code based on the unified entry transaction code, and determine the error transaction code and error transaction parameter information of the target error transaction based at least on the unified entry transaction code, the original transaction code, and the original transaction flow information. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction. The execution unit is configured to execute the target error transaction based on the error transaction code and the error transaction parameter information.
[0012] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform any of the error transaction processing methods described above.
[0013] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including a processing method for performing any of the error transactions described above.
[0014] Applying the technical solution of this application, the error transaction processing method is applied in a target system, which includes an API interface. The method first receives a request from an external system to perform an error transaction on the original transaction via the API interface. Based on the request information, the original transaction flow information corresponding to the request information is determined. The external system is another system with business processing relationships with the target system, and the error transaction is a business process that corrects the original transaction. Next, the encoding of the API interface receiving the request information is determined to be a unified entry transaction code. Then, based on the unified entry transaction code, the original transaction code is determined, and at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction. Finally, based on the error transaction code and the error transaction parameter information, the target error transaction is executed. This method receives request information for error transactions targeting the original transaction through a unified API interface. Based on the request information, it determines the corresponding original transaction flow information, determines the original transaction code based on the unified entry transaction code, and determines the error transaction code and error transaction parameter information of the target error transaction based at least on the unified entry transaction code, the original transaction code, and the original transaction flow information. Thus, the target system can complete the error transaction. Therefore, by exposing only a small number of unified access API interfaces to external systems, error transactions under various different business scenarios can be completed, thereby solving the problem of high difficulty in identifying and processing error transaction scenarios when external systems access the system in the existing technology. Attached Figure Description
[0015] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0016] Figure 1A hardware structure block diagram of a mobile terminal for performing an error transaction processing method according to an embodiment of this application is shown.
[0017] Figure 2 A flowchart illustrating a method for processing erroneous transactions according to an embodiment of this application is shown.
[0018] Figure 3 A structural block diagram of an error transaction processing apparatus provided according to an embodiment of this application is shown.
[0019] The above figures include the following reference numerals:
[0020] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0025] API Interface: Application Programming Interface. An API interface is a calling interface provided by an information system for other applications. Other applications call the information system's API interface to enable the information system to execute specific commands or operations to achieve specific processing of business data.
[0026] Transaction code: A transaction code is a unique name encoding used by a program or instruction in an information system to provide an API interface to external systems when executing a complete business operation.
[0027] Parameter converter: A parameter converter is a program that can process the request parameters of transaction A to obtain the request parameters of transaction B.
[0028] Core bank system: The core bank system is the core and foundation of the bank's software system. It is a transaction processing system for various banking businesses. Through transaction processing, it drives accounting and payment clearing, and ultimately achieves the goal of integrated processing of back-office business.
[0029] Peripheral bank system: A peripheral bank system refers to other information systems besides the core bank system that have direct or indirect business processing relationships with the core system.
[0030] Error trading: For example, you want to buy a 100 yuan item at a store, but the cashier mistakenly enters 10 yuan. After explaining the error, the cashier makes a 90 yuan transaction. The normal procedure is to cancel the original transaction and then make the 100 yuan transaction again.
[0031] As described in the background section, the identification and processing of error transaction scenarios during peripheral system access in the prior art is difficult. To solve the above problems, the embodiments of this application provide an error transaction processing method, an error transaction processing device, a computer-readable storage medium, and an electronic device.
[0032] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0033] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of processing erroneous transactions according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0034] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the error transaction processing method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one instance, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] This embodiment provides a method for processing error transactions that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0036] Figure 2 This is a flowchart of a method for processing erroneous transactions according to an embodiment of this application. Figure 2As shown, this method is applied to a target system, which includes an API interface. The method includes the following steps:
[0037] Step S201: Receive request information from an external system to perform an error transaction on the original transaction through the API interface mentioned above, and determine the original transaction flow information corresponding to the request information based on the request information. The external system is another system that has a business processing relationship with the target system, and the error transaction is a business that corrects the original transaction.
[0038] Specifically, if the target system mentioned above can be the bank's core business system, then the peripheral system mentioned above is any other information system that has a direct or indirect business processing relationship with the bank's core business system, excluding the bank's core business system.
[0039] In step S201, based on the aforementioned request information, the original transaction log information corresponding to the request information is determined, including: in response to the aforementioned request information, generating original transaction element information, wherein the original transaction element information includes at least one of the following: original transaction log number, sub-transaction sequence number, customer number, and media number; and based on the aforementioned original transaction element information, determining the transaction log information corresponding to the aforementioned original transaction element information in the target system as the aforementioned original transaction log information. In the event of an error in the original transaction, an error correction transaction is required to correct the error in the original transaction. The relevant information of the original transaction can be determined through the request information.
[0040] In practical applications, the aforementioned original transaction flow information is obtained from the target system. The target system generates the original transaction element information based on the request information sent by the external network system, and then queries the original transaction flow information within the target system based on the original transaction element information.
[0041] Step S202: Determine that the encoding of the API interface that received the above request information is a unified entry transaction code;
[0042] Specifically, the target system mentioned above may include multiple API interfaces. With the API interface as a unified entry point, one API interface can handle multiple transaction transactions, thereby simplifying transactions and reducing development workload and costs.
[0043] Step S203: Based on the unified entry transaction code, determine the original transaction code, and at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, determine the error transaction code and error transaction parameter information of the target error transaction. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction.
[0044] Specifically, the error transaction code and error transaction parameter information that match the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction flow information to the target error transaction are determined. In other words, the error transaction code and error transaction parameter information of the target error transaction are determined within the target system, which greatly reduces the difficulty of accessing the external system, reduces the development and testing costs of the external system, and enables the flexibility and configurability of error transaction processing.
[0045] To accurately obtain the original transaction code, one optional approach involves determining the original transaction code based on the aforementioned unified entry transaction code, including: obtaining a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the aforementioned unified entry transaction code and the original transaction code service name in the aforementioned target system; substituting the aforementioned unified entry transaction code into the aforementioned first mapping relationship to obtain the aforementioned original transaction code service name; and determining the code corresponding to the aforementioned original transaction code service name as the aforementioned original transaction code.
[0046] In practical applications, the target system has a configuration center that stores a first mapping relationship. This first mapping relationship is configured as follows: `Unified Entry Transaction Code.serviceName = Original Transaction Code Retrieval Service Name`. After determining the original transaction code service name through the first mapping relationship, the original transaction code retrieval service can be invoked to obtain the original transaction code.
[0047] In one optional approach, determining the error transaction code and error transaction parameter information of the target error transaction based at least on the unified entry transaction code, the original transaction code, and the original transaction flow information includes: obtaining a second mapping relationship and a third mapping relationship, wherein the second mapping relationship is a mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system, and the third mapping relationship is a mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system, and the parameter converter is used to convert the transaction information corresponding to the error transaction code into message data; substituting the unified entry transaction code and the original transaction code into the second mapping relationship to obtain the error transaction code corresponding to the target error transaction; substituting the unified entry transaction code and the original transaction code into the third mapping relationship to obtain the parameter converter corresponding to the target error transaction; receiving the message data sent by the parameter converter; parsing the original transaction flow information and the message data to determine the error transaction parameter information of the target error transaction. At least based on the second and third mapping relationships, the error transaction code and error transaction parameter information corresponding to the target error transaction can be accurately determined.
[0048] In practical applications, the second and third mapping relationships mentioned above can also be stored in the configuration center. The second mapping relationship is configured as follows: Unified Entry Transaction Code.Original Transaction Code.targetServNo = Error Handling Transaction Code. The third mapping relationship is configured as follows: Unified Entry Transaction Code.Original Transaction Code.converterName = Parameter Converter Name. Based on the unified entry transaction code and the original transaction code, the error transaction code and parameter converter name corresponding to the target error transaction are obtained from the second and third mapping relationships in the configuration center, respectively. The target system invokes the parameter converter corresponding to the target error transaction to convert the transaction information corresponding to the above error transaction code into message data, and assembles the error parameter information based on the original flow information.
[0049] Furthermore, after determining the original transaction code and before determining the error transaction code and error transaction parameter information of the target error transaction, the method further includes: obtaining the error transaction type corresponding to the target error transaction, whereby the error transaction type includes one of error cancellation, error reversal, and error adjustment. By adding error transaction types to the error transaction mapping configuration, it is possible to handle multiple adjustment directions, mapping different error transactions according to different adjustment directions. In this scenario, the external system needs to send the adjustment direction code and the original transaction status in the request information of the unified entry transaction.
[0050] In practical applications, the handling of erroneous transactions in core banking systems can be categorized into three types: error cancellation, error reversal, and error adjustment. Error cancellation cancels the original transaction; error reversal corrects erroneous transaction elements; and error adjustment refers to a cross-system transaction where the processing results of two systems are inconsistent (e.g., a transaction shows as successfully posted in system A but fails in system B). In this case, the transaction in the other system is adjusted to achieve consistency in the transaction result status, taking the target system as the standard. Determining the transaction type further enhances the difficulty of identifying and handling error scenarios. The error transaction type corresponding to the target erroneous transaction can be obtained based on the unified entry transaction code and the sixth mapping relationship. The sixth mapping relationship is configured as follows: unified entry transaction code.unifyTxType = transaction type. Substituting the unified entry transaction code into the sixth mapping relationship yields the error transaction type corresponding to the target erroneous transaction.
[0051] Based on the error transaction type, the matching of error transaction code and error transaction parameter information can be made more accurate. In another optional scheme, at least based on the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined. This includes: obtaining a fourth mapping relationship and a fifth mapping relationship. The fourth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the aforementioned error transaction code in the aforementioned target system. The fifth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the aforementioned error transaction parameter information in the aforementioned target system. The mapping relationship between the data converters is as follows: the parameter converter is used to convert the transaction information corresponding to the error transaction code into message data; the unified entry transaction code, the original transaction code, and the error transaction type are substituted into the fourth mapping relationship to obtain the error transaction code corresponding to the target error transaction; the unified entry transaction code, the original transaction code, and the error transaction type are substituted into the fifth mapping relationship to obtain the parameter converter corresponding to the target error transaction; the message data sent by the parameter converter is received, the original transaction flow information and the message data are parsed, and the error transaction parameter information of the target error transaction is determined.
[0052] In practical applications, the fourth and fifth mapping relationships mentioned above can also be stored in the configuration center. The fourth mapping relationship is configured as follows: Unified Entry Transaction Code.Original Transaction Code.Adjustment Type.targetServNo = Error Handling Transaction Code. The fifth mapping relationship is configured as follows: Unified Entry Transaction Code.Original Transaction Code.Adjustment Type.converterName = Parameter Converter Name.
[0053] Step S204: Execute the target error transaction based on the error transaction code and error transaction parameter information.
[0054] Specifically, the aforementioned target error transaction is executed according to the main logic of the error transaction.
[0055] To facilitate knowing whether the target error transaction was successful, after step S204, the method further includes: determining the result information after executing the target error transaction, and sending the result information to the peripheral system. The result information is used at least to characterize whether the target error transaction was successful.
[0056] In practical applications, the above results may also include account name, transaction amount, and account balance after the transaction.
[0057] The above embodiments receive request information for error transactions targeting the original transaction through a unified API interface. Based on the request information, the corresponding original transaction flow information is determined. Based on the unified entry transaction code, the original transaction code is determined. Based on at least the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined. Thus, the target system can complete the error transaction. Therefore, by exposing only a small number of unified access API interfaces to external systems, error transactions under various different business scenarios can be completed, thereby solving the problem of high difficulty in identifying and processing error transaction scenarios when external systems access the system in the prior art.
[0058] This application also provides an error transaction processing apparatus. It should be noted that the error transaction processing apparatus of this application can be used to execute the error transaction processing method provided in this application. This apparatus is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0059] The following describes the error transaction processing apparatus provided in the embodiments of this application.
[0060] Figure 3 This is a schematic diagram of an error transaction processing apparatus according to an embodiment of this application. Figure 3 As shown, the device is applied in a target system, which includes an API interface. The device includes: a first determining unit 10, a second determining unit 20, a third determining unit 30, and an execution unit 40, wherein:
[0061] The first determining unit 10 is used to receive request information from an external system to perform an error transaction on the original transaction through the API interface, and to determine the original transaction flow information corresponding to the request information based on the request information. The external system is another system that has a business processing relationship with the target system, and the error transaction is a business that corrects the original transaction.
[0062] Specifically, if the target system mentioned above can be the bank's core business system, then the peripheral system mentioned above is any other information system that has a direct or indirect business processing relationship with the bank's core business system, excluding the bank's core business system.
[0063] The aforementioned first determining unit includes a generation module and a first determining module. The generation module, in response to the aforementioned request information, generates original transaction element information, which includes at least one of the following: original transaction serial number, sub-transaction serial number, customer number, and media number. The first determining module, based on the original transaction element information, determines the corresponding transaction serial information in the target system as the original transaction serial information. In the event of an error in the original transaction, an error correction transaction is required to correct the error. The request information can be used to determine the relevant information of the original transaction.
[0064] In practical applications, the aforementioned original transaction flow information is obtained from the target system. The target system generates the original transaction element information based on the request information sent by the external network system, and then queries the original transaction flow information within the target system based on the original transaction element information.
[0065] The second determining unit 20 is used to determine that the encoding of the API interface that receives the above request information is a unified entry transaction code;
[0066] Specifically, the target system mentioned above may include multiple API interfaces. With the API interface as a unified entry point, one API interface can handle multiple transaction transactions, thereby simplifying transactions and reducing development workload and costs.
[0067] The third determining unit 30 is used to determine the original transaction code based on the unified entry transaction code, and at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, to determine the error transaction code and error transaction parameter information of the target error transaction, wherein the original transaction code is the code of the original transaction and the error transaction code is the code of the error transaction.
[0068] Specifically, the error transaction code and error transaction parameter information that match the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction flow information to the target error transaction are determined. In other words, the error transaction code and error transaction parameter information of the target error transaction are determined within the target system, which greatly reduces the difficulty of accessing the external system, reduces the development and testing costs of the external system, and enables the flexibility and configurability of error transaction processing.
[0069] To accurately obtain the original transaction code, in one optional scheme, the third determining unit includes a first obtaining module, a first substitution module, and a second determining module. The first obtaining module is used to obtain a first mapping relationship, which is the mapping relationship between the unified entry transaction code and the original transaction code service name in the target system. The first substitution module is used to substitute the unified entry transaction code into the first mapping relationship to obtain the original transaction code service name. The second determining module is used to determine that the code corresponding to the original transaction code service name is the original transaction code.
[0070] In practical applications, the target system has a configuration center that stores a first mapping relationship. This first mapping relationship is configured as follows: `Unified Entry Transaction Code.serviceName = Original Transaction Code Retrieval Service Name`. After determining the original transaction code service name through the first mapping relationship, the original transaction code retrieval service can be invoked to obtain the original transaction code.
[0071] In one optional embodiment, the third determining unit includes a second acquisition module, a second substitution module, a third substitution module, and a third determining module. The second acquisition module acquires a second mapping relationship and a third mapping relationship. The second mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system. The third mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system. The parameter converter converts the transaction information corresponding to the error transaction code into message data. The second substitution module substitutes the unified entry transaction code and the original transaction code into the second mapping relationship to obtain the error transaction code corresponding to the target error transaction. The third substitution module substitutes the unified entry transaction code and the original transaction code into the third mapping relationship to obtain the parameter converter corresponding to the target error transaction. The third determining module receives the message data sent by the parameter converter, parses the original transaction flow information and the message data, and determines the error transaction parameter information of the target error transaction. At least based on the second and third mapping relationships, the error transaction code and error transaction parameter information corresponding to the target error transaction can be accurately determined.
[0072] In practical applications, the second and third mapping relationships mentioned above can also be stored in the configuration center. The second mapping relationship is configured as follows: Unified Entry Transaction Code.Original Transaction Code.targetServNo = Error Handling Transaction Code, and the third mapping relationship is configured as follows: Unified Entry Transaction Code.Original Transaction Code.converterName = Parameter Converter Name. Based on the unified entry transaction code and the original transaction code, the error transaction code and parameter converter name corresponding to the target error transaction are obtained from the second and third mapping relationships in the configuration center, respectively. The target system invokes the parameter converter corresponding to the target error transaction to convert the transaction information corresponding to the above error transaction code into message data, and assembles the error transaction parameter information based on the original flow information.
[0073] Furthermore, the aforementioned device also includes an acquisition unit. This acquisition unit, after determining the original transaction code and before determining the error transaction code and error transaction parameter information of the target error transaction, acquires the error transaction type corresponding to the target error transaction. The error transaction type includes one of error cancellation, error reversal, and error adjustment. By adding error transaction types to the error transaction mapping configuration, it is possible to handle multiple adjustment directions, mapping different error transactions according to different adjustment directions. In this scenario, the peripheral system needs to send the adjustment direction code and the original transaction status in the request information of the unified entry transaction.
[0074] In practical applications, the handling of erroneous transactions in core banking systems can be categorized into three types: error cancellation, error reversal, and error adjustment. Error cancellation cancels the original transaction; error reversal corrects erroneous transaction elements; and error adjustment refers to a cross-system transaction where the processing results of two systems are inconsistent (e.g., a transaction shows as successfully posted in system A but fails in system B). In this case, the transaction in the other system is adjusted to achieve consistency in the transaction result status, taking the target system as the standard. Determining the transaction type further enhances the difficulty of identifying and handling error scenarios. The error transaction type corresponding to the target erroneous transaction can be obtained based on the unified entry transaction code and the sixth mapping relationship. The sixth mapping relationship is configured as follows: unified entry transaction code.unifyTxType = transaction type. Substituting the unified entry transaction code into the sixth mapping relationship yields the error transaction type corresponding to the target erroneous transaction.
[0075] Based on the error transaction type, the matching of error transaction codes and error transaction parameter information can be made more accurate. In another optional scheme, the third determining unit includes a third acquisition module, a fourth substitution module, a fifth substitution module, and a fourth determining module. The third acquisition module is used to acquire the fourth and fifth mapping relationships. The fourth mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, the error transaction type, and the error transaction code in the target system. The fifth mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, the error transaction type, and the parameter converter in the target system. The device is used to convert the transaction information corresponding to the above-mentioned error transaction code into message data; the fourth substitution module is used to substitute the above-mentioned unified entry transaction code, the above-mentioned original transaction code, and the above-mentioned error transaction type into the above-mentioned fourth mapping relationship to obtain the above-mentioned error transaction code corresponding to the above-mentioned target error transaction; the fifth substitution module is used to substitute the above-mentioned unified entry transaction code, the above-mentioned original transaction code, and the above-mentioned error transaction type into the above-mentioned fifth mapping relationship to obtain the above-mentioned parameter converter corresponding to the above-mentioned target error transaction; the fourth determination module is used to receive the above-mentioned message data sent by the above-mentioned parameter converter, parse the above-mentioned original transaction flow information and the above-mentioned message data, and determine the above-mentioned error transaction parameter information of the above-mentioned target error transaction.
[0076] In practical applications, the fourth and fifth mapping relationships mentioned above can also be stored in the configuration center. The fourth mapping relationship is configured as follows: Unified Entry Transaction Code.Original Transaction Code.Adjustment Type.targetServNo = Error Handling Transaction Code. The fifth mapping relationship is configured as follows: Unified Entry Transaction Code.Original Transaction Code.Adjustment Type.converterName = Parameter Converter Name.
[0077] The execution unit 40 is used to execute the target error transaction according to the error transaction code and the error transaction parameter information.
[0078] Specifically, the aforementioned target error transaction is executed according to the main logic of the error transaction.
[0079] To facilitate knowing whether the target error transaction was successful, after step S204, the above-mentioned device further includes a sending unit. The sending unit is used to determine the result information after executing the target error transaction and send the result information to the peripheral system. The result information is used to at least characterize whether the target error transaction was successful.
[0080] In practical applications, the above results may also include account name, transaction amount, and account balance after the transaction.
[0081] The above embodiments receive request information for error transactions targeting the original transaction through a unified API interface. Based on the request information, the corresponding original transaction flow information is determined. Based on the unified entry transaction code, the original transaction code is determined. Based on at least the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined. Thus, the target system can complete the error transaction. Therefore, by exposing only a small number of unified access API interfaces to external systems, error transactions under various different business scenarios can be completed, thereby solving the problem of high difficulty in identifying and processing error transaction scenarios when external systems access the system in the prior art.
[0082] The aforementioned error transaction processing device includes a processor and a memory. The first determining unit, the second determining unit, the third determining unit, and the execution unit are all stored as program units in the memory. The processor executes the program units stored in the memory to implement the corresponding functions. All of the above modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.
[0083] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the high difficulty in identifying and handling erroneous transaction scenarios during peripheral system access in existing technologies.
[0084] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0085] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the error transaction processing method.
[0086] Specifically, the methods for handling erroneous transactions include:
[0087] Step S201: Receive request information from an external system to perform an error transaction on the original transaction through the API interface mentioned above, and determine the original transaction flow information corresponding to the request information based on the request information. The external system is another system that has a business processing relationship with the target system, and the error transaction is a business that corrects the original transaction.
[0088] Specifically, if the target system mentioned above can be the bank's core business system, then the peripheral system mentioned above is any other information system that has a direct or indirect business processing relationship with the bank's core business system, excluding the bank's core business system.
[0089] Step S202: Determine that the encoding of the API interface that received the above request information is a unified entry transaction code;
[0090] Specifically, the target system mentioned above may include multiple API interfaces. With the API interface as a unified entry point, one API interface can handle multiple transaction transactions, thereby simplifying transactions and reducing development workload and costs.
[0091] Step S203: Based on the unified entry transaction code, determine the original transaction code, and at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, determine the error transaction code and error transaction parameter information of the target error transaction. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction.
[0092] Specifically, the error transaction code and error transaction parameter information that match the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction flow information to the target error transaction are determined. In other words, the error transaction code and error transaction parameter information of the target error transaction are determined within the target system, which greatly reduces the difficulty of accessing the external system, reduces the development and testing costs of the external system, and enables the flexibility and configurability of error transaction processing.
[0093] Step S204: Execute the target error transaction based on the error transaction code and error transaction parameter information.
[0094] Specifically, the aforementioned target error transaction is executed according to the main logic of the error transaction.
[0095] Optionally, determining the original transaction code based on the unified entry transaction code includes: obtaining a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the unified entry transaction code and the original transaction code service name in the target system; substituting the unified entry transaction code into the first mapping relationship to obtain the original transaction code service name; and determining the code corresponding to the original transaction code service name as the original transaction code.
[0096] Optionally, at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a second mapping relationship and a third mapping relationship, wherein the second mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system, and the third mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system, and the parameter converter is used to convert the transaction information corresponding to the error transaction code into message data; substituting the unified entry transaction code and the original transaction code into the second mapping relationship to obtain the error transaction code corresponding to the target error transaction; substituting the unified entry transaction code and the original transaction code into the third mapping relationship to obtain the parameter converter corresponding to the target error transaction; receiving the message data sent by the parameter converter, parsing the original transaction flow information and the message data, and determining the error transaction parameter information of the target error transaction.
[0097] Optionally, determining the original transaction log information corresponding to the above request information based on the above request information includes: responding to the above request information by generating original transaction element information, wherein the original transaction element information includes at least one of the original transaction log number, sub-transaction sequence number, customer number, and media number; and determining the transaction log information corresponding to the original transaction element information in the target system as the original transaction log information based on the original transaction element information.
[0098] Optionally, after determining the original transaction code and before determining the error transaction code and error transaction parameter information of the target error transaction, the above method further includes: obtaining the error transaction type corresponding to the target error transaction, wherein the error transaction type includes one of error cancellation, error reversal, and error adjustment.
[0099] Optionally, based at least on the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction log information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a fourth mapping relationship and a fifth mapping relationship, wherein the fourth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the aforementioned error transaction code in the aforementioned target system, and the aforementioned fifth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the parameter converter in the aforementioned target system, wherein the aforementioned parameter converter uses... The system converts the transaction information corresponding to the aforementioned error transaction code into message data; substitutes the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned error transaction type into the aforementioned fourth mapping relationship to obtain the aforementioned error transaction code corresponding to the aforementioned target error transaction; substitutes the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned error transaction type into the aforementioned fifth mapping relationship to obtain the aforementioned parameter converter corresponding to the aforementioned target error transaction; receives the aforementioned message data sent by the aforementioned parameter converter, parses the aforementioned original transaction flow information and the aforementioned message data, and determines the aforementioned error transaction parameter information of the aforementioned target error transaction.
[0100] Optionally, after executing the target error transaction, the method further includes: determining the result information after executing the target error transaction, and sending the result information to the peripheral system, wherein the result information is at least used to characterize whether the target error transaction was successful.
[0101] This invention provides a processor for running a program, wherein the program executes the error transaction processing method described above.
[0102] Specifically, the methods for handling erroneous transactions include:
[0103] Step S201: Receive request information from an external system to perform an error transaction on the original transaction through the API interface mentioned above, and determine the original transaction flow information corresponding to the request information based on the request information. The external system is another system that has a business processing relationship with the target system, and the error transaction is a business that corrects the original transaction.
[0104] Specifically, if the target system mentioned above can be the bank's core business system, then the peripheral system mentioned above is any other information system that has a direct or indirect business processing relationship with the bank's core business system, excluding the bank's core business system.
[0105] Step S202: Determine that the encoding of the API interface that received the above request information is a unified entry transaction code;
[0106] Specifically, the target system mentioned above may include multiple API interfaces. With the API interface as a unified entry point, one API interface can handle multiple transaction transactions, thereby simplifying transactions and reducing development workload and costs.
[0107] Step S203: Based on the unified entry transaction code, determine the original transaction code, and at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, determine the error transaction code and error transaction parameter information of the target error transaction. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction.
[0108] Specifically, the error transaction code and error transaction parameter information that match the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction flow information to the target error transaction are determined. In other words, the error transaction code and error transaction parameter information of the target error transaction are determined within the target system, which greatly reduces the difficulty of accessing the external system, reduces the development and testing costs of the external system, and enables the flexibility and configurability of error transaction processing.
[0109] Step S204: Execute the target error transaction based on the error transaction code and error transaction parameter information.
[0110] Specifically, the aforementioned target error transaction is executed according to the main logic of the error transaction.
[0111] Optionally, determining the original transaction code based on the unified entry transaction code includes: obtaining a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the unified entry transaction code and the original transaction code service name in the target system; substituting the unified entry transaction code into the first mapping relationship to obtain the original transaction code service name; and determining the code corresponding to the original transaction code service name as the original transaction code.
[0112] Optionally, at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a second mapping relationship and a third mapping relationship, wherein the second mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system, and the third mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system, and the parameter converter is used to convert the transaction information corresponding to the error transaction code into message data; substituting the unified entry transaction code and the original transaction code into the second mapping relationship to obtain the error transaction code corresponding to the target error transaction; substituting the unified entry transaction code and the original transaction code into the third mapping relationship to obtain the parameter converter corresponding to the target error transaction; receiving the message data sent by the parameter converter, parsing the original transaction flow information and the message data, and determining the error transaction parameter information of the target error transaction.
[0113] Optionally, determining the original transaction log information corresponding to the above request information based on the above request information includes: responding to the above request information by generating original transaction element information, wherein the original transaction element information includes at least one of the original transaction log number, sub-transaction sequence number, customer number, and media number; and determining the transaction log information corresponding to the original transaction element information in the target system as the original transaction log information based on the original transaction element information.
[0114] Optionally, after determining the original transaction code and before determining the error transaction code and error transaction parameter information of the target error transaction, the above method further includes: obtaining the error transaction type corresponding to the target error transaction, wherein the error transaction type includes one of error cancellation, error reversal, and error adjustment.
[0115] Optionally, based at least on the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction log information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a fourth mapping relationship and a fifth mapping relationship, wherein the fourth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the aforementioned error transaction code in the aforementioned target system, and the aforementioned fifth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the parameter converter in the aforementioned target system, wherein the aforementioned parameter converter uses... The system converts the transaction information corresponding to the aforementioned error transaction code into message data; substitutes the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned error transaction type into the aforementioned fourth mapping relationship to obtain the aforementioned error transaction code corresponding to the aforementioned target error transaction; substitutes the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned error transaction type into the aforementioned fifth mapping relationship to obtain the aforementioned parameter converter corresponding to the aforementioned target error transaction; receives the aforementioned message data sent by the aforementioned parameter converter, parses the aforementioned original transaction flow information and the aforementioned message data, and determines the aforementioned error transaction parameter information of the aforementioned target error transaction.
[0116] Optionally, after executing the target error transaction, the method further includes: determining the result information after executing the target error transaction, and sending the result information to the peripheral system, wherein the result information is at least used to characterize whether the target error transaction was successful.
[0117] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:
[0118] Step S201: Receive request information from an external system to perform an error transaction on the original transaction through the API interface mentioned above, and determine the original transaction flow information corresponding to the request information based on the request information. The external system is another system that has a business processing relationship with the target system, and the error transaction is a business that corrects the original transaction.
[0119] Specifically, if the target system mentioned above can be the bank's core business system, then the peripheral system mentioned above is any other information system that has a direct or indirect business processing relationship with the bank's core business system, excluding the bank's core business system.
[0120] Step S202: Determine that the encoding of the API interface that received the above request information is a unified entry transaction code;
[0121] Specifically, the target system mentioned above may include multiple API interfaces. With the API interface as a unified entry point, one API interface can handle multiple transaction transactions, thereby simplifying transactions and reducing development workload and costs.
[0122] Step S203: Based on the unified entry transaction code, determine the original transaction code, and at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, determine the error transaction code and error transaction parameter information of the target error transaction. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction.
[0123] Specifically, the error transaction code and error transaction parameter information that match the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction flow information to the target error transaction are determined. In other words, the error transaction code and error transaction parameter information of the target error transaction are determined within the target system, which greatly reduces the difficulty of accessing the external system, reduces the development and testing costs of the external system, and enables the flexibility and configurability of error transaction processing.
[0124] Step S204: Execute the target error transaction based on the error transaction code and error transaction parameter information.
[0125] Specifically, the aforementioned target error transaction is executed according to the main logic of the error transaction.
[0126] Optionally, determining the original transaction code based on the unified entry transaction code includes: obtaining a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the unified entry transaction code and the original transaction code service name in the target system; substituting the unified entry transaction code into the first mapping relationship to obtain the original transaction code service name; and determining the code corresponding to the original transaction code service name as the original transaction code.
[0127] Optionally, at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a second mapping relationship and a third mapping relationship, wherein the second mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system, and the third mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system, and the parameter converter is used to convert the transaction information corresponding to the error transaction code into message data; substituting the unified entry transaction code and the original transaction code into the second mapping relationship to obtain the error transaction code corresponding to the target error transaction; substituting the unified entry transaction code and the original transaction code into the third mapping relationship to obtain the parameter converter corresponding to the target error transaction; receiving the message data sent by the parameter converter, parsing the original transaction flow information and the message data, and determining the error transaction parameter information of the target error transaction.
[0128] Optionally, determining the original transaction log information corresponding to the above request information based on the above request information includes: responding to the above request information by generating original transaction element information, wherein the original transaction element information includes at least one of the original transaction log number, sub-transaction sequence number, customer number, and media number; and determining the transaction log information corresponding to the original transaction element information in the target system as the original transaction log information based on the original transaction element information.
[0129] Optionally, after determining the original transaction code and before determining the error transaction code and error transaction parameter information of the target error transaction, the above method further includes: obtaining the error transaction type corresponding to the target error transaction, wherein the error transaction type includes one of error cancellation, error reversal, and error adjustment.
[0130] Optionally, based at least on the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction log information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a fourth mapping relationship and a fifth mapping relationship, wherein the fourth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the aforementioned error transaction code in the aforementioned target system, and the aforementioned fifth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the parameter converter in the aforementioned target system, wherein the aforementioned parameter converter uses... The system converts the transaction information corresponding to the aforementioned error transaction code into message data; substitutes the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned error transaction type into the aforementioned fourth mapping relationship to obtain the aforementioned error transaction code corresponding to the aforementioned target error transaction; substitutes the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned error transaction type into the aforementioned fifth mapping relationship to obtain the aforementioned parameter converter corresponding to the aforementioned target error transaction; receives the aforementioned message data sent by the aforementioned parameter converter, parses the aforementioned original transaction flow information and the aforementioned message data, and determines the aforementioned error transaction parameter information of the aforementioned target error transaction.
[0131] Optionally, after executing the target error transaction, the method further includes: determining the result information after executing the target error transaction, and sending the result information to the peripheral system, wherein the result information is at least used to characterize whether the target error transaction was successful.
[0132] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0133] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:
[0134] Step S201: Receive request information from an external system to perform an error transaction on the original transaction through the API interface mentioned above, and determine the original transaction flow information corresponding to the request information based on the request information. The external system is another system that has a business processing relationship with the target system, and the error transaction is a business that corrects the original transaction.
[0135] Specifically, if the target system mentioned above can be the bank's core business system, then the peripheral system mentioned above is any other information system that has a direct or indirect business processing relationship with the bank's core business system, excluding the bank's core business system.
[0136] Step S202: Determine that the encoding of the API interface that received the above request information is a unified entry transaction code;
[0137] Specifically, the target system mentioned above may include multiple API interfaces. With the API interface as a unified entry point, one API interface can handle multiple transaction transactions, thereby simplifying transactions and reducing development workload and costs.
[0138] Step S203: Based on the unified entry transaction code, determine the original transaction code, and at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, determine the error transaction code and error transaction parameter information of the target error transaction. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction.
[0139] Specifically, the error transaction code and error transaction parameter information that match the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction flow information to the target error transaction are determined. In other words, the error transaction code and error transaction parameter information of the target error transaction are determined within the target system, which greatly reduces the difficulty of accessing the external system, reduces the development and testing costs of the external system, and enables the flexibility and configurability of error transaction processing.
[0140] Step S204: Execute the target error transaction based on the error transaction code and error transaction parameter information.
[0141] Specifically, the aforementioned target error transaction is executed according to the main logic of the error transaction.
[0142] Optionally, determining the original transaction code based on the unified entry transaction code includes: obtaining a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the unified entry transaction code and the original transaction code service name in the target system; substituting the unified entry transaction code into the first mapping relationship to obtain the original transaction code service name; and determining the code corresponding to the original transaction code service name as the original transaction code.
[0143] Optionally, at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a second mapping relationship and a third mapping relationship, wherein the second mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system, and the third mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system, and the parameter converter is used to convert the transaction information corresponding to the error transaction code into message data; substituting the unified entry transaction code and the original transaction code into the second mapping relationship to obtain the error transaction code corresponding to the target error transaction; substituting the unified entry transaction code and the original transaction code into the third mapping relationship to obtain the parameter converter corresponding to the target error transaction; receiving the message data sent by the parameter converter, parsing the original transaction flow information and the message data, and determining the error transaction parameter information of the target error transaction.
[0144] Optionally, determining the original transaction log information corresponding to the above request information based on the above request information includes: responding to the above request information by generating original transaction element information, wherein the original transaction element information includes at least one of the original transaction log number, sub-transaction sequence number, customer number, and media number; and determining the transaction log information corresponding to the original transaction element information in the target system as the original transaction log information based on the original transaction element information.
[0145] Optionally, after determining the original transaction code and before determining the error transaction code and error transaction parameter information of the target error transaction, the above method further includes: obtaining the error transaction type corresponding to the target error transaction, wherein the error transaction type includes one of error cancellation, error reversal, and error adjustment.
[0146] Optionally, based at least on the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned original transaction log information, the error transaction code and error transaction parameter information of the target error transaction are determined, including: obtaining a fourth mapping relationship and a fifth mapping relationship, wherein the fourth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the aforementioned error transaction code in the aforementioned target system, and the aforementioned fifth mapping relationship is the mapping relationship between the aforementioned unified entry transaction code, the aforementioned original transaction code, the aforementioned error transaction type, and the parameter converter in the aforementioned target system, wherein the aforementioned parameter converter uses... The system converts the transaction information corresponding to the aforementioned error transaction code into message data; substitutes the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned error transaction type into the aforementioned fourth mapping relationship to obtain the aforementioned error transaction code corresponding to the aforementioned target error transaction; substitutes the aforementioned unified entry transaction code, the aforementioned original transaction code, and the aforementioned error transaction type into the aforementioned fifth mapping relationship to obtain the aforementioned parameter converter corresponding to the aforementioned target error transaction; receives the aforementioned message data sent by the aforementioned parameter converter, parses the aforementioned original transaction flow information and the aforementioned message data, and determines the aforementioned error transaction parameter information of the aforementioned target error transaction.
[0147] Optionally, after executing the target error transaction, the method further includes: determining the result information after executing the target error transaction, and sending the result information to the peripheral system, wherein the result information is at least used to characterize whether the target error transaction was successful.
[0148] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0149] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can 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, etc.) containing computer-usable program code.
[0150] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0151] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0152] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0153] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0154] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0155] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0156] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0157] As can be seen from the above description, the embodiments of this application achieve the following technical effects:
[0158] 1) The above-mentioned error transaction processing method of this application is applied to a target system, which includes an API interface. In the above method, firstly, a request information for error transaction of the original transaction sent by an external system is received through the API interface, and the original transaction flow information corresponding to the request information is determined according to the request information. The external system is another system that has a business processing relationship with the target system, and the error transaction is a business that corrects the original transaction. Then, the encoding of the API interface that receives the request information is determined as a unified entry transaction code. Then, the original transaction code is determined according to the unified entry transaction code, and the error transaction code and error transaction parameter information of the target error transaction are determined at least according to the unified entry transaction code, the original transaction code, and the original transaction flow information. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction. Finally, the target error transaction is executed according to the error transaction code and the error transaction parameter information. This method receives request information for error transactions targeting the original transaction through a unified API interface. Based on the request information, it determines the corresponding original transaction flow information, determines the original transaction code based on the unified entry transaction code, and determines the error transaction code and error transaction parameter information of the target error transaction based at least on the unified entry transaction code, the original transaction code, and the original transaction flow information. Thus, the target system can complete the error transaction. Therefore, by exposing only a small number of unified access API interfaces to external systems, error transactions under various different business scenarios can be completed, thereby solving the problem of high difficulty in identifying and processing error transaction scenarios when external systems access the system in the existing technology.
[0159] 2) The error transaction processing apparatus of this application is applied in a target system, the target system including an API interface, and the apparatus including a first determining unit, a second determining unit, a third determining unit, and an execution unit. The first determining unit is used to receive a request from an external system via the API interface for error transaction processing of the original transaction, and determines the original transaction flow information corresponding to the request information based on the request information. The external system is another system with business processing relationships with the target system, and the error transaction is a business process for correcting the original transaction. The second determining unit is used to determine that the encoding of the API interface receiving the request information is a unified entry transaction code. The third determining unit is used to determine the original transaction code based on the unified entry transaction code, and at least based on the unified entry transaction code, the original transaction code, and the original transaction flow information, determine the error transaction code and error transaction parameter information of the target error transaction. The original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction. The execution unit is used to execute the target error transaction based on the error transaction code and the error transaction parameter information. This device receives request information for error transactions against the original transaction through a unified API interface. Based on the request information, it determines the corresponding original transaction flow information, determines the original transaction code based on the unified entry transaction code, and determines the error transaction code and error transaction parameter information of the target error transaction based at least on the unified entry transaction code, the original transaction code, and the original transaction flow information. Thus, the target system can complete the error transaction. Therefore, by exposing only a small number of unified access API interfaces to external systems, error transactions under various different business scenarios can be completed, thereby solving the problem of high difficulty in identifying and processing error transaction scenarios when external systems access the system in the existing technology.
[0160] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for handling erroneous transactions, characterized in that, The method is applied in a target system, which includes an API interface, and includes: The API interface receives a request from an external system to perform an error correction transaction on the original transaction. Based on the request, the API interface determines the original transaction log information corresponding to the request. The external system is another system that has a business processing relationship with the target system. The error correction transaction is a business that corrects the original transaction. The API interface receiving the request information is identified as a unified entry transaction code. Based on the unified entry transaction code, the original transaction code is determined, and based at least on the unified entry transaction code, the original transaction code, and the original transaction flow information, the error transaction code and error transaction parameter information of the target error transaction are determined, wherein the original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction; Execute the target error transaction based on the error transaction code and the error transaction parameter information; Based on the unified entry transaction code, determine the original transaction code, including: Obtain a first mapping relationship, which is the mapping relationship between the unified entry transaction code and the original transaction code service name in the target system; Substitute the unified entry transaction code into the first mapping relationship to obtain the original transaction code service name; The code corresponding to the original transaction code service name is determined to be the original transaction code; Based at least on the unified entry transaction code, the original transaction code, and the original transaction log information, determine the error transaction code and error transaction parameter information of the target error transaction, including: Obtain a second mapping relationship and a third mapping relationship. The second mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system. The third mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system. The parameter converter is used to convert the transaction information corresponding to the error transaction code into message data. Substituting the unified entry transaction code and the original transaction code into the second mapping relationship, the error transaction code corresponding to the target error transaction is obtained; Substituting the unified entry transaction code and the original transaction code into the third mapping relationship, the parameter converter corresponding to the target error transaction is obtained; The system receives the message data sent by the parameter converter, parses the original transaction flow information and the message data, and determines the error transaction parameter information of the target error transaction.
2. The method according to claim 1, characterized in that, Based on the request information, the original transaction log information corresponding to the request information is determined, including: In response to the request information, original transaction element information is generated, which includes at least one of the original transaction serial number, sub-transaction serial number, customer number and medium number. Based on the original transaction element information, the transaction flow information corresponding to the original transaction element information in the target system is determined as the original transaction flow information.
3. The method according to claim 1, characterized in that, After determining the original transaction code and before determining the error transaction code and error transaction parameter information of the target error transaction, the method further includes: Obtain the error transaction type corresponding to the target error transaction, wherein the error transaction type includes one of error cancellation, error reversal, and error adjustment.
4. The method according to claim 3, characterized in that, Based at least on the unified entry transaction code, the original transaction code, and the original transaction log information, determine the error transaction code and error transaction parameter information of the target error transaction, including: Obtain a fourth mapping relationship and a fifth mapping relationship. The fourth mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, the error transaction type, and the error transaction code in the target system. The fifth mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, the error transaction type, and the parameter converter in the target system. The parameter converter is used to convert the transaction information corresponding to the error transaction code into message data. Substituting the unified entry transaction code, the original transaction code, and the error transaction type into the fourth mapping relationship, the error transaction code corresponding to the target error transaction is obtained; Substituting the unified entry transaction code, the original transaction code, and the error transaction type into the fifth mapping relationship, the parameter converter corresponding to the target error transaction is obtained; The system receives the message data sent by the parameter converter, parses the original transaction flow information and the message data, and determines the error transaction parameter information of the target error transaction.
5. The method according to any one of claims 1 to 4, characterized in that, After executing the target error transaction, the method further includes: The result information after executing the target error transaction is determined and sent to the peripheral system. The result information is used at least to characterize whether the target error transaction was successful.
6. An apparatus for processing erroneous transactions, characterized in that, The device is used in a target system, which includes an API interface, and the device includes: The first determining unit is configured to receive, through the API interface, a request from an external system to perform an error transaction on the original transaction, and determine the original transaction flow information corresponding to the request information based on the request information. The external system is another system that has a business processing relationship with the target system, and the error transaction is a business that corrects the original transaction. The second determining unit is used to determine that the encoding of the API interface receiving the request information is a unified entry transaction code; The third determining unit is used to determine the original transaction code based on the unified entry transaction code, and to determine the error transaction code and error transaction parameter information of the target error transaction based at least on the unified entry transaction code, the original transaction code, and the original transaction flow information, wherein the original transaction code is the code of the original transaction, and the error transaction code is the code of the error transaction; An execution unit is configured to execute the target error transaction based on the error transaction code and the error transaction parameter information; The third determining unit includes a first acquisition module, a first substitution module, and a second determining module. The first acquisition module acquires a first mapping relationship, which is a mapping relationship between the unified entry transaction code and the original transaction code service name in the target system. The first substitution module substitutes the unified entry transaction code into the first mapping relationship to obtain the original transaction code service name. The second determining module determines that the code corresponding to the original transaction code service name is the original transaction code. The third determining unit includes a second acquisition module, a second substitution module, a third substitution module, and a third determining module. The second acquisition module acquires a second mapping relationship and a third mapping relationship. The second mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the error transaction code in the target system. The third mapping relationship is the mapping relationship between the unified entry transaction code, the original transaction code, and the parameter converter in the target system. The parameter converter converts the transaction information corresponding to the error transaction code into message data. The second substitution module substitutes the unified entry transaction code and the original transaction code into the second mapping relationship to obtain the error transaction code corresponding to the target error transaction. The third substitution module substitutes the unified entry transaction code and the original transaction code into the third mapping relationship to obtain the parameter converter corresponding to the target error transaction. The third determining module receives the message data sent by the parameter converter, parses the original transaction flow information and the message data, and determines the error transaction parameter information of the target error transaction.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the error transaction processing method according to any one of claims 1 to 5.
8. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including a processing method for performing an error transaction as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Error transaction standardization method and device
CN106603636A