A transaction calling method, device, equipment and storage medium
The public transaction calling method addresses the complexity of banking system interactions by automating data format conversion between Java objects and MAP, enhancing transaction calls through a distributed platform, thus reducing manual workload and errors.
Patent Information
- Application Number
- CN202111576889.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-12-22
AI Technical Summary
The increasing complexity of interactions between banking application systems requires manual modification of transaction call codes due to different transaction interfaces, leading to a high workload and error probability, and incompatibility with the original call method.
A public transaction calling method that automatically converts Java objects to and from MAP format using JAXB technology, allowing seamless interaction through a distributed application interconnection platform, reducing the need for individual code modifications.
This method reduces the workload and error probability by enabling automatic data format exchange between Java objects and MAP, facilitating consistent transaction calls across different interfaces without manual code adjustments.
Smart Images

Figure CN114219643B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the Internet and data processing technology, and in particular to a transaction calling method, device, equipment and storage medium. Background Art
[0002] At present, due to the need for mutual interaction between computer application systems, peripheral systems interact with core systems through remote calling technology Web Service, access the core system Web Service Gateway (BWG), and BWG assembles the request information into a message that can be recognized by the core system host, calls the corresponding host transaction, and parses the return message containing the result and returns it to the peripheral system to complete a transaction call.
[0003] As the number of banking application systems continues to increase, the interaction between systems is becoming increasingly complex. In this context, the distributed application interconnection platform (AIR) has replaced the original BWG and provided distributed access capabilities in the transaction access link. However, the interconnection platform requires that when calling a transaction, the parameters must be input in the form of key-value pairs, that is, MAP. After the transaction is executed, the execution result is returned in the form of a key-value pair. Therefore, the original transaction call performed through Web Service technology needs to be modified according to the requirements of AIR. Due to different transaction interfaces, the MAP required for calling transactions is also different. Therefore, different transactions require manual sorting of different MAPs, and then modifying each transaction call code. The workload is huge and the probability of error is high. In addition, if each transaction call code is modified, it will not be compatible with the original call method. Summary of the invention
[0004] The embodiment of the present invention provides a transaction calling method, apparatus, device and storage medium to realize calling for different transactions, and adopts a public transaction calling method to automatically realize the data form exchange between Java objects and MAP, thereby reducing the amount of code modification.
[0005] In a first aspect, an embodiment of the present invention provides a transaction calling method, which is applied to a peripheral system, and includes:
[0006] In response to a call request for a target transaction, an input Java object is generated according to the target transaction interface definition;
[0007] Using the public transaction calling method, the input Java object is converted into the corresponding input MAP, and then input into the distributed application interconnection platform, so as to call the target transaction in the core system through the distributed application interconnection platform;
[0008] Receive the output MAP returned by the distributed application interconnection platform and convert the output MAP into the corresponding output Java object.
[0009] Optionally, before generating an input Java object according to the target transaction interface definition in response to a call request for the target transaction, the method further includes:
[0010] Read the Web Services Description Language (WSDL) file containing transaction interface information;
[0011] Using JAXB (Java Architecture for XML Binding) technology, the input and output interfaces of all transactions contained in the WSDL file are parsed into corresponding Java classes, and the parsed Java classes are generated into a public Jar package according to the specified package name.
[0012] Optionally, before generating an input Java object according to the target transaction interface definition in response to a call request for the target transaction, the method further includes:
[0013] Creating a transaction configuration table in a database for storing configuration information of each transaction;
[0014] Transaction configuration information includes: transaction code, transaction calling method, and Java class name corresponding to the transaction input and output interface.
[0015] Optionally, before generating the input Java object according to the target transaction interface definition, the following is further included:
[0016] When a call request for a target transaction is detected, the transaction configuration table is queried according to the transaction code carried in the call request to obtain the transaction call method;
[0017] If the value of the transaction call method is the first value, the target transaction is called by the Web Service method;
[0018] If the value of the transaction calling mode is the second value, the public transaction calling method is used to implement the data format conversion between the Java object and the MAP, and the target transaction is called through the distributed application interconnection platform.
[0019] Optionally, in response to a call request for a target transaction, an input Java object is generated according to the target transaction interface definition, including:
[0020] In response to a call request for a target transaction, extract a transaction code and transaction input parameters of the target transaction from the call request;
[0021] Call the Java class of the transaction input interface that matches the transaction code in the public Jar package, and instantiate and generate an input Java object that stores the transaction input parameters.
[0022] Optionally, a public transaction call method is used to convert the input Java object into a corresponding input MAP, including:
[0023] Configure the system number, transaction initiation channel and transaction code carried in the call request as transaction public message header information, and store the transaction public message header information in the input MAP in the form of key-value pairs;
[0024] Using JAXB technology, the input Java object is converted into the corresponding Extensible Markup Language (XML) fragment, the XML fragment is traversed, the access path and value of each XML element node are obtained, and stored in the input MAP in the form of key-value pairs.
[0025] Optionally, convert the output MAP to the corresponding output Java object, including:
[0026] Traverse each key in the output MAP, obtain the access path and value of the XML element node, and reversely generate the XML fragment corresponding to the output MAP;
[0027] From the public Jar package, call the Java class of the transaction output interface that matches the transaction code of the target transaction and instantiate it to generate an output Java object;
[0028] Using JAXB technology, the XML fragment is converted into an output Java object that stores the transaction execution results.
[0029] In a second aspect, an embodiment of the present invention further provides a transaction calling device, which is applied to a peripheral system and includes:
[0030] A transaction call request module, for responding to a call request for a target transaction and generating an input Java object according to a target transaction interface definition;
[0031] An input conversion module is used to convert an input Java object into a corresponding input MAP by using a public transaction calling method, and input the MAP into the distributed application interconnection platform so as to call a target transaction in the core system through the distributed application interconnection platform;
[0032] The output conversion module is used to receive the output MAP returned by the distributed application interconnection platform and convert the output MAP into a corresponding output Java object.
[0033] In a third aspect, an embodiment of the present invention further provides a computer device, in which a peripheral system is deployed, including:
[0034] one or more processors;
[0035] a storage device for storing one or more programs,
[0036] When one or more programs are executed by one or more processors, the one or more processors implement a transaction calling method provided by any embodiment of the present invention.
[0037] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a transaction calling method provided by any embodiment of the present invention.
[0038] The embodiment of the present invention is applied to a peripheral system, and generates an input Java object according to the target transaction interface definition by responding to a call request for a target transaction; adopts a public transaction call method to convert the input Java object into a corresponding input MAP, and inputs the input into a distributed application interconnection platform, so as to call the target transaction in the core system through the distributed application interconnection platform; receives an output MAP returned by the distributed application interconnection platform, and converts the output MAP into a corresponding output Java object, thereby solving the problem in the prior art that each transaction call code is individually modified, which results in a huge workload and a high probability of error, and realizes calls for different transactions, adopts a public transaction call method to automatically realize the data format exchange between the Java object and the MAP, and reduces the amount of code modification. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1a This is a flow chart of a transaction calling method in Embodiment 1 of the present invention;
[0040] Figure 1b This is a flowchart for implementing a transaction call in the first embodiment of the present invention;
[0041] Figure 1c This is a schematic diagram of converting a Java object into a MAP in the first embodiment of the present invention;
[0042] Figure 1d This is a schematic diagram of converting a MAP into a Java object in the first embodiment of the present invention;
[0043] Figure 2 It is a structural diagram of a transaction calling device in the second embodiment of the present invention;
[0044] Figure 3 It is a structural diagram of a computer device in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0046] Embodiment 1
[0047] Figure 1a This is a flow chart of a transaction calling method in the first embodiment of the present invention. This embodiment is applicable to the case where a peripheral system calls a transaction in a core system through a distributed application interconnection platform. The method can be executed by a transaction calling device, which can be implemented by hardware and / or software and can generally be integrated in a computer device deployed with a peripheral system. Figure 1a As shown, the method includes:
[0048] Step 110: In response to the call request for the target transaction, an input Java object is generated according to the target transaction interface definition.
[0049] In this embodiment, the target transaction is a transaction that the local machine calls from the core system through the peripheral system according to user needs. For example, when a user takes a loan from a bank, the loan transaction in the core system needs to be called. When the peripheral system wants to call the target transaction, it can generate an input Java object corresponding to the transaction according to the input interface definition of the target transaction, and then convert the transaction data in the input Java object into a data format to realize the call of the target transaction.
[0050] Optionally, before responding to a call request for a target transaction and generating an input Java object according to the target transaction interface definition, the process may also include: reading a WSDL file containing transaction interface information; using JAXB technology to parse the input and output interfaces of all transactions contained in the WSDL file into corresponding Java classes, and generating a public Jar package with the parsed Java classes according to the specified package name.
[0051] In this embodiment, since the input and output interfaces of each transaction remain basically unchanged, and when calling a transaction, it is necessary to generate a corresponding Java object based on the Java class corresponding to the transaction input and output interface, in order to facilitate the subsequent calling of each transaction, the JAXB technology is used in advance to parse the input and output interfaces of all transactions contained in each WSDL file, and the Java classes corresponding to the input and output interfaces of each transaction obtained by parsing are generated into a public Jar package.
[0052] Among them, the WSDL file is a document written in XML, which is used to describe the Web Service and how to access the Web Service. Java class is a class defined in accordance with the Java language specification. A class is a collection of abstract concepts that represents a common product. The class defines properties and behaviors (methods). JAXB is a technology that can generate Java classes based on XML Schema. JAXB also provides a method to reverse the XML instance document to generate a Java object tree, and can rewrite the content of the Java object tree into an XML instance document.
[0053] Optionally, before generating an input Java object according to the target transaction interface definition in response to a call request for the target transaction, it may also include: creating a transaction configuration table in a database for storing configuration information of each transaction; the transaction configuration information includes: a transaction code, a transaction call method, and a Java class name corresponding to the transaction input and output interface.
[0054] Optionally, before generating the input Java object according to the target transaction interface definition, it may also include: when a call request for the target transaction is detected, querying the transaction configuration table according to the transaction code carried in the call request to obtain the transaction call method; if the value of the transaction call method is a first value, calling the target transaction in the Web Service manner; if the value of the transaction call method is a second value, using a public transaction call method to implement data format conversion between the Java object and the MAP, and calling the target transaction through the distributed application interconnection platform.
[0055] In this embodiment, Figure 1b As shown, since the transaction calling mode can be flexibly switched, both calling the transaction through the Web Service mode and calling the transaction through the distributed application interconnection platform are considered. Therefore, when calling the target transaction, the transaction code is first extracted from the calling request of the target transaction, and the value of the transaction calling mode field in the transaction configuration table is queried according to the transaction code. If the value of the transaction calling mode is 1, it means that the original calling mode is used to call the target transaction through the Web Service technology. If the value of the transaction calling mode is 0, it means that the target transaction is called through the distributed application interconnection platform, and the data format conversion between the Java object and the MAP needs to be realized. Among them, MAP is an unordered set composed of key-value pairs.
[0056] It should be noted that the first value is not limited to 1 and the second value is not limited to 0. The first value and the second value only need to be two different values.
[0057] Optionally, in response to a call request for a target transaction, generating an input Java object according to a target transaction interface definition may include: in response to a call request for a target transaction, extracting a transaction code and transaction input parameters of the target transaction from the call request; calling a Java class of a transaction input interface matching the transaction code in a public Jar package, and instantiating and generating an input Java object storing the transaction input parameters.
[0058] Step 120: Use the public transaction calling method to convert the input Java object into the corresponding input MAP, and input it into the distributed application interconnection platform to call the target transaction in the core system through the distributed application interconnection platform.
[0059] In this embodiment, Figure 1b As shown, if it is found that the transaction calling method of the target transaction is called through the distributed application interconnection platform, the public transaction method proposed in this embodiment is adopted, firstly the public message header information corresponding to the target transaction is set, and then the public message header information and the input Java object data are converted into an input MAP, and then input into the distributed application interconnection platform, so that the distributed application interconnection platform generates a message that can be recognized by the core system according to the input MAP, and sends it to the core system to call the target transaction.
[0060] Optionally, a public transaction calling method is used to convert the input Java object into a corresponding input MAP, which may include: configuring the system number, transaction initiation channel and transaction code carried in the call request as transaction public message header information, and storing the transaction public message header information in the form of a key-value pair in the input MAP; using JAXB technology to convert the input Java object into a corresponding XML fragment, traversing the XML fragment, obtaining the access path and value of each XML element node, and storing them in the form of a key-value pair in the input MAP.
[0061] In this embodiment, each time a transaction is called, the transaction public message header information corresponding to the transaction must be configured, including the system number, transaction initiation channel, transaction code, etc. The transaction public message header information is used when the core system receives the message sent by the distributed application interconnection platform to determine the transaction caller, transaction initiation channel, and the called transaction, and then the core system verifies whether the transaction caller has the corresponding calling qualification based on this information. Therefore, the transaction public message header information needs to be stored in the input MAP in the form of a key-value pair.
[0062] In this embodiment, Figure 1cAs shown, when converting the input Java object storing the transaction input parameters into MAP, the Marshaller interface of the JAXB technology can be used to serialize the input Java object into an XML fragment, and then the XML fragment is traversed to extract the access path and value of each XML element node, and the access path is used as the key and the element node value is used as the value, and the key-value pair information is stored in the input MAP corresponding to the transaction to generate the MAP parameters required by the distributed application interconnection platform to call the transaction.
[0063] Step 130: Receive the output MAP returned by the distributed application interconnection platform, and convert the output MAP into a corresponding output Java object.
[0064] In this embodiment, after receiving the output MAP obtained by the distributed application interconnection platform from the core system, the output MAP is converted into an output Java object through a public transaction calling method for use by the local peripheral system.
[0065] Optionally, converting the output MAP into a corresponding output Java object may include: traversing each key in the output MAP, obtaining the access path and value of the XML element node, and reversely generating an XML fragment corresponding to the output MAP; calling the Java class of the transaction output interface that matches the transaction code of the target transaction from the public Jar package, and instantiating and generating an output Java object; using JAXB technology to convert the XML fragment into an output Java object that stores the transaction execution result.
[0066] In this embodiment, Figure 1d As shown, when the output MAP is converted into an output Java object, all the keys in the output MAP are first taken out, and the access path and value of each XML element node are obtained by traversing each key, and the corresponding XML fragment is generated in reverse. Then, the Unmarshaller interface in the JAXB technology is used to deserialize the XML fragment into an output Java object containing the transaction execution result.
[0067] In this embodiment, the input and output interfaces of the transaction in the WSDL file are parsed into Java classes, and the input Java object storing the called transaction parameters is converted into an input MAP. When the distributed application interconnection platform initiates the transaction, when the distributed application interconnection platform returns the output MAP, the output MAP is automatically converted into a Java object containing the transaction execution result. In other words, only a common transaction call method needs to be provided to meet the call of different transactions, avoiding the need to perform separate modifications for each transaction call, and reducing the amount of code modification.
[0068] The embodiment of the present invention is applied to a peripheral system, and generates an input Java object according to the target transaction interface definition by responding to a call request for a target transaction; adopts a public transaction call method to convert the input Java object into a corresponding input MAP, and inputs the input into a distributed application interconnection platform, so as to call the target transaction in the core system through the distributed application interconnection platform; receives an output MAP returned by the distributed application interconnection platform, and converts the output MAP into a corresponding output Java object, thereby solving the problem in the prior art that each transaction call code is individually modified, which results in a huge workload and a high probability of error, and realizes calls for different transactions, adopts a public transaction call method to automatically realize the data format exchange between the Java object and the MAP, and reduces the amount of code modification.
[0069] Embodiment 2
[0070] Figure 2 This is a schematic diagram of the structure of a transaction calling device in the second embodiment of the present invention. This embodiment is applicable to the case where a peripheral system calls a transaction in a core system through a distributed application interconnection platform. The device can be implemented by hardware and / or software and can generally be integrated in a computer device where a peripheral system is deployed. Figure 2 As shown, the device is applied to peripheral systems including:
[0071] The transaction call request module 210 is used to generate an input Java object according to the target transaction interface definition in response to the call request for the target transaction;
[0072] An input conversion module 220 is used to convert an input Java object into a corresponding input MAP using a public transaction calling method, and input the MAP into the distributed application interconnection platform so as to call a target transaction in the core system through the distributed application interconnection platform;
[0073] The output conversion module 230 is used to receive the output MAP returned by the distributed application interconnection platform and convert the output MAP into a corresponding output Java object.
[0074] The embodiment of the present invention is applied to a peripheral system, and generates an input Java object according to the target transaction interface definition by responding to a call request for a target transaction; adopts a public transaction call method to convert the input Java object into a corresponding input MAP, and inputs the input into a distributed application interconnection platform, so as to call the target transaction in the core system through the distributed application interconnection platform; receives an output MAP returned by the distributed application interconnection platform, and converts the output MAP into a corresponding output Java object, thereby solving the problem in the prior art that each transaction call code is individually modified, which results in a huge workload and a high probability of error, and realizes calls for different transactions, adopts a public transaction call method to automatically realize the data format exchange between the Java object and the MAP, and reduces the amount of code modification.
[0075] Optionally, it further includes: a file parsing module, which is used to generate an input Java object according to the target transaction interface definition in response to a call request for the target transaction.
[0076] Read the Web Service Description Language (WSDL) file containing transaction interface information;
[0077] Using JAXB technology, the input and output interfaces of all transactions contained in the WSDL file are parsed into corresponding Java classes, and the parsed Java classes are generated into a public Jar package according to the specified package name.
[0078] Optionally, it further includes: a transaction configuration table generation module, which is used to generate an input Java object according to the target transaction interface definition in response to a call request for the target transaction.
[0079] Creating a transaction configuration table in a database for storing configuration information of each transaction;
[0080] Transaction configuration information includes: transaction code, transaction calling method, and Java class name corresponding to the transaction input and output interface.
[0081] Optionally, it also includes: a calling mode judgment module, which is used to generate an input Java object according to the target transaction interface definition before:
[0082] When a call request for a target transaction is detected, the transaction configuration table is queried according to the transaction code carried in the call request to obtain the transaction call method;
[0083] If the value of the transaction call method is the first value, the target transaction is called by the Web Service method;
[0084] If the value of the transaction calling mode is the second value, the public transaction calling method is used to implement the data format conversion between the Java object and the MAP, and the target transaction is called through the distributed application interconnection platform.
[0085] Optionally, the transaction call request module 210 is used to:
[0086] In response to a call request for a target transaction, extract a transaction code and transaction input parameters of the target transaction from the call request;
[0087] Call the Java class of the transaction input interface that matches the transaction code in the public Jar package, and instantiate and generate an input Java object that stores the transaction input parameters.
[0088] Optionally, the input conversion module 220 is used to:
[0089] Configure the system number, transaction initiation channel and transaction code carried in the call request as transaction public message header information, and store the transaction public message header information in the input MAP in the form of key-value pairs;
[0090] Using JAXB technology, the input Java object is converted into the corresponding Extensible Markup Language XML fragment, the XML fragment is traversed, the access path and value of each XML element node are obtained, and stored in the input MAP in the form of key-value pairs.
[0091] Optionally, the output conversion module 230 is used to:
[0092] Traverse each key in the output MAP, obtain the access path and value of the XML element node, and reversely generate the XML fragment corresponding to the output MAP;
[0093] From the public Jar package, call the Java class of the transaction output interface that matches the transaction code of the target transaction and instantiate it to generate an output Java object;
[0094] Using JAXB technology, the XML fragment is converted into an output Java object that stores the transaction execution results.
[0095] The transaction calling device provided in the embodiment of the present invention can execute the transaction calling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0096] Embodiment 3
[0097] Figure 3 It is a structural diagram of a computer device in Embodiment 3 of the present invention. Figure 3 A block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 3 The device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0098] like Figure 3 As shown, device 12 is in the form of a general purpose computing device. Components of device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and bus 18 that connects various system components (including system memory 28 and processing unit 16).
[0099] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0100] Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including volatile and non-volatile media, removable and non-removable media.
[0101] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 3 not shown, usually called a "hard drive"). Although Figure 3 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0102] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0103] The device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the device 12, and / or may communicate with any device that enables the device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the device 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0104] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, for example, implementing a transaction calling method provided by an embodiment of the present invention, which is applied to a peripheral system, including:
[0105] In response to a call request for a target transaction, an input Java object is generated according to the target transaction interface definition;
[0106] Using a public transaction calling method, converting the input Java object into a corresponding input MAP, and inputting the distributed application interconnection platform, so as to call the target transaction in the core system through the distributed application interconnection platform;
[0107] Receive the output MAP returned by the distributed application interconnection platform and convert the output MAP into the corresponding output Java object.
[0108] Embodiment 4
[0109] The fourth embodiment of the present invention further discloses a computer storage medium, on which a computer program is stored. When the program is executed by a processor, a transaction calling method is implemented, which is applied to a peripheral system and includes:
[0110] In response to a call request for a target transaction, an input Java object is generated according to the target transaction interface definition;
[0111] Using a public transaction calling method, converting the input Java object into a corresponding input MAP, and inputting the distributed application interconnection platform, so as to call the target transaction in the core system through the distributed application interconnection platform;
[0112] Receive the output MAP returned by the distributed application interconnection platform and convert the output MAP into the corresponding output Java object.
[0113] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0114] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0115] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0116] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on an operator's computer, partially on an operator's computer, as a separate software package, partially on an operator's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the operator's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0117] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A transaction calling method, characterized in that: Applied to peripheral systems, including: In response to a call request for a target transaction, an input Java object is generated according to the target transaction interface definition; Using a public transaction calling method, converting the input Java object into a corresponding input MAP, and inputting the MAP into a distributed application interconnection platform, so as to call a target transaction in a core system through the distributed application interconnection platform; Receive the output MAP returned by the distributed application interconnection platform, and convert the output MAP into a corresponding output Java object; The method of using a public transaction to call the input Java object to convert it into a corresponding input MAP includes: The system number, the transaction initiation channel and the transaction code carried in the call request are configured as transaction public message header information, and the transaction public message header information is stored in the input MAP in the form of a key-value pair; Using JAXB technology, the input Java object is converted into a corresponding extensible markup language XML fragment, the XML fragment is traversed, the access path and value of each XML element node are obtained, and stored in the input MAP in the form of key-value pairs.
2. The method according to claim 1, characterized in that Before generating an input Java object according to the target transaction interface definition in response to a call request for the target transaction, the method further includes: Read the Web Service Description Language (WSDL) file containing transaction interface information; By using JAXB technology, the input and output interfaces of all transactions contained in the WSDL file are parsed into corresponding Java classes, and a public Jar package is generated according to the specified package name for the parsed Java classes.
3. The method according to claim 1, characterized in that Before generating an input Java object according to the target transaction interface definition in response to a call request for the target transaction, the method further includes: Creating a transaction configuration table in a database for storing configuration information of each transaction; The transaction configuration information includes: a transaction code, a transaction calling method, and a Java class name corresponding to a transaction input and output interface.
4. The method according to claim 3, characterized in that: Before generating the input Java object according to the target transaction interface definition, it also includes: When a call request for a target transaction is detected, the transaction configuration table is queried according to the transaction code carried in the call request to obtain the transaction call method; If the value of the transaction calling method is the first value, the target transaction is called by using the Web Service method; If the value of the transaction calling mode is the second value, a public transaction calling method is used to implement data format conversion between the Java object and the MAP, and the target transaction is called through the distributed application interconnection platform.
5. The method according to claim 2, characterized in that: In response to a call request for a target transaction, an input Java object is generated according to the target transaction interface definition, including: In response to a call request for a target transaction, extracting a transaction code and transaction input parameters of the target transaction from the call request; The Java class of the transaction input interface matching the transaction code in the public Jar package is called, and an input Java object storing transaction input parameters is instantiated and generated.
6. The method according to claim 1, characterized in that Converting the output MAP into a corresponding output Java object includes: Traversing each key in the output MAP, obtaining the access path and value of the XML element node, and reversely generating an XML fragment corresponding to the output MAP; From the public Jar package, call the Java class of the transaction output interface that matches the transaction code of the target transaction and instantiate it to generate an output Java object; Using JAXB technology, the XML fragment is converted into an output Java object storing the transaction execution result.
7. A transaction calling device, characterized in that: Applied to peripheral systems, including: A transaction call request module, for responding to a call request for a target transaction and generating an input Java object according to a target transaction interface definition; An input conversion module, used to convert the input Java object into a corresponding input MAP by using a public transaction calling method, and input the MAP into a distributed application interconnection platform, so as to call a target transaction in a core system through the distributed application interconnection platform; An output conversion module, used to receive the output MAP returned by the distributed application interconnection platform, and convert the output MAP into a corresponding output Java object; The input conversion module is specifically used for: The system number, the transaction initiation channel and the transaction code carried in the call request are configured as transaction public message header information, and the transaction public message header information is stored in the input MAP in the form of a key-value pair; Using JAXB technology, the input Java object is converted into a corresponding extensible markup language XML fragment, the XML fragment is traversed, the access path and value of each XML element node are obtained, and stored in the input MAP in the form of key-value pairs.
8. A computer device, characterized in that: The device is equipped with a peripheral system, including: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the transaction calling method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the transaction calling method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Data message processing method and device
CN112134900A
Method for optimizing transaction remote procedure call, medium and electronic equipment
CN112256455A