Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are used in an open-ended fashion, i.e., to mean including, but not limited to. Reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the embodiments is for illustrative purposes to illustrate the implementation of the present application, and the sequence of steps is not limited and can be adjusted as needed.
Fig. 1 is a schematic diagram of an account multi-stage linkage system across old and new systems in an embodiment of the present invention, as shown in fig. 1, the system includes:
the system comprises a plurality of linkage nodes, a plurality of communication nodes and a plurality of communication nodes, wherein each linkage node corresponds to a new system or an old system;
a linkage node for:
receiving a transaction success message of a current account sent by a corresponding system, wherein the system is a new system or an old system;
inquiring the linkage parameter table, judging whether the current account meets the triggering condition, if so, reading the linkage parameter table of the corresponding system, and obtaining a linked account;
generating an atomic transaction corresponding to the current account and an atomic transaction corresponding to the linked account;
sending the atomic transaction corresponding to the current account to a corresponding system;
sending the atomic transaction corresponding to the linked account to a linkage node corresponding to a system corresponding to the linked account;
after receiving a transaction success message of the atomic transaction corresponding to the current account returned by the corresponding system, sending the transaction success message of the atomic transaction corresponding to the current account to a linkage node corresponding to the system corresponding to the linked account; the linkage node corresponding to the system corresponding to the linked account returns a linkage result according to the transaction result of the atomic transaction corresponding to the linked account and the transaction success message of the atomic transaction corresponding to the current account;
and receiving a linkage result returned by the linkage node corresponding to the system corresponding to the linked account.
In the embodiment of the invention, the multi-level linkage does not need to synchronize accounts across systems, and the performance of the original account operation of the original system is not influenced.
In specific implementation, the multi-level linkage of the account refers to that in some large-scale enterprises, there are multi-level mechanisms for enterprise management and corresponding multi-level accounts, and in order to implement account balance management, a multi-level linkage mechanism of account balance, such as 4-level linkage, is used in a bank. A < -B < -C < -D. For example, when the balance of account D exceeds a certain upper limit, the balance is transferred to account C according to a certain rule, and account C and account B use the same mechanism. This may allow a transaction to implicitly trigger an account linking operation that is not readily apparent to the user.
Table 1 is an example of the linkage parameter table.
TABLE 1
In specific implementation, each linkage node corresponds to a new system or an old system, and the new systems or the old systems do not communicate with each other but pass through the linkage nodes. And the new system or the old system normally carries out transaction, and when the transaction is successful and every time the transaction is carried out, a transaction success message is sent to the corresponding linkage node.
In one embodiment, the transaction success message is sent through a message queue. The message queue is one-way asynchronous operation, and avoids the host calling operation of a new system or an old system. In high performance operation of the host, no performance bottleneck is created for the existing transaction. When the message queue is unblocked, the connection speed is very fast.
In addition, in the new and old systems of the bank, the multi-level linkage accounts are in a small proportion, so the main logic of modifying the new and old systems can cause the performance of other transactions to be reduced. Therefore, the embodiment of the invention provides an account multi-stage linkage system which spans new and old systems, is independent from the existing new and old systems, has centralized multi-stage linkage account processing logic and can improve the processing efficiency.
Multiple linkage nodes may form a P2P sub-network for a small number of complex internal interactive uses. Each linkage node may be served by an internal interaction module attached to the new or old system. Therefore, the hardware complexity of the original system is not increased, and the peer-to-peer network interaction speed of the P2P sub-network is fastest. Although seemingly complex, in practice, if there are N systems, only N-1 connections per node need to be managed.
It should be noted that each new system or old system only operates the linkage of the account of the system and the next account, and since the transfer operation of the two accounts requires the consistency of things, the transfer operation must be completed at the same initiating terminal, but the linkage operation of the next account is moved to the system to which the next account belongs. This has the advantage that each account and its associated parameters do not have to be replicated and synchronized across the system, but rather are stored locally. The method provides convenience for the division of the account and the linkage parameters thereof according to the system by regions.
In one embodiment, the linkage node is specifically configured to:
sending the received atomic transaction corresponding to the linked account to a corresponding system;
after receiving a transaction success message of the atomic transaction corresponding to the linked account returned by the corresponding system, reading a linkage parameter table of the corresponding system, and judging whether the linked account meets a trigger condition;
if the linked account meets the triggering condition, waiting for a transaction success message of the atomic transaction corresponding to the current account;
when a transaction success message of the atomic transaction corresponding to the current account is received, reading a linkage parameter table of a corresponding system to obtain a linked account of the corresponding system;
when the transaction success message of the atomic transaction corresponding to the current account is received and is timed out, determining that the linkage result is a linkage failure message, and sending the linkage failure message to a linkage node corresponding to a system corresponding to the current account;
and if the linked account does not meet the triggering condition, determining that the linkage result is a linkage success message, and sending the linkage success message to a linkage node corresponding to the system corresponding to the current account.
In the above embodiment, when the transaction success message of the atomic transaction corresponding to the current account is received, the linkage parameter table of the corresponding system is read, and the linked account of the corresponding system is obtained, so that the multi-level linkage of the accounts can be continued according to the method, and the linkage result is sent to the previous linkage node regardless of the success or failure of the linkage, and therefore, the linkage result is collected to the first linkage node.
In one embodiment, the linkage node is further configured to:
after a transaction success message of the atomic transaction corresponding to the current account returned by the corresponding system is received, recording a linkage operation log;
and recording a linkage operation log after receiving the linkage result.
In the above embodiment, the first linkage node records the linkage operation log for subsequent review and verification.
In one embodiment, the linkage node is further configured to:
when the atomic transaction corresponding to the current account and the atomic transaction corresponding to the linked account are multiple, the atomic transaction corresponding to the current account is sent to the corresponding system according to the transaction sequence, and the atomic transaction corresponding to the linked account is sent to the linkage node corresponding to the system corresponding to the linked account.
A specific embodiment is given below to illustrate a specific application of the system proposed by the embodiment of the present invention.
Fig. 2 is a schematic diagram of a specific application of an account multi-stage linkage system across new and old systems in an embodiment of the present invention, where the account multi-stage linkage system across new and old systems includes 4 linkage nodes 1, which are respectively a linkage node 1, a linkage node 2, a linkage node 3, and a linkage node 4, and respectively correspond to systems of 4 banks, which are respectively an old system 1, a new system 2, a new system 3, and a new system 4.
The linkage node 1 receives a transaction success message of the account 1 sent by the old system 1, inquires the linkage parameter table 1, judges that the account 1 meets a trigger condition, reads the linkage parameter table 1 corresponding to the system 1, and obtains a linked account 2; generating an atomic transaction corresponding to the account 1 and an atomic transaction corresponding to the linked account 2; sending the atomic transaction corresponding to the account 1 to the old system 1; sending the atomic transaction corresponding to the linked account 2 to the linked node 2 corresponding to the new system 2 corresponding to the linked account 2; after receiving a transaction success message of the atomic transaction corresponding to the account 1 returned by the old system 1, sending the transaction success message of the atomic transaction corresponding to the account 1 to the linkage node 2; the linkage result 1 is received.
The linkage node 2 sends the received atomic transaction corresponding to the linked account 2 to the new system 2; after receiving a transaction success message of the atomic transaction corresponding to the linked account returned by the new system 2, reading the linkage parameter table 2 of the new system 2, and judging whether the linked account 2 meets the triggering condition;
if the linked account 2 meets the trigger condition, waiting for a transaction success message of the atomic transaction corresponding to the account 1;
when a transaction success message of the atomic transaction corresponding to the account 1 is received, reading the linkage parameter table 2 of the new system 2, obtaining a linked account 3 of the new system 2, and then continuing to perform linkage aiming at the linked account 2 and the linked account 3 to obtain a linkage result 2;
when the transaction success message of the atomic transaction corresponding to the account 1 is received and is timed out, determining that the linkage result 1 is a linkage failure message, and sending the linkage failure message to the linkage node 1 corresponding to the old system 1 corresponding to the account 1;
and if the linked account 2 does not meet the triggering condition, determining that the linkage result 1 is a linkage success message, and sending the linkage success message to the linkage node 1 corresponding to the old system 1 corresponding to the account 1.
And the linkage node 1 records the linkage operation log according to the linkage result 1 and the transaction success message of the atomic transaction corresponding to the account 1.
In summary, in the system provided in the embodiment of the present invention, each linkage node corresponds to a new system or an old system; a linkage node for: receiving a transaction success message of a current account sent by a corresponding system, wherein the system is a new system or an old system; inquiring the linkage parameter table, judging whether the current account meets the triggering condition, if so, reading the linkage parameter table of the corresponding system, and obtaining a linked account; generating an atomic transaction corresponding to the current account and an atomic transaction corresponding to the linked account; sending the atomic transaction corresponding to the current account to a corresponding system; sending the atomic transaction corresponding to the linked account to a linkage node corresponding to a system corresponding to the linked account; after receiving a transaction success message of the atomic transaction corresponding to the current account returned by the corresponding system, sending the transaction success message of the atomic transaction corresponding to the current account to a linkage node corresponding to the system corresponding to the linked account; and the linkage node corresponding to the system corresponding to the linked account returns a linkage result according to the transaction result of the atomic transaction corresponding to the linked account and the transaction success message of the atomic transaction corresponding to the current account. In the process, the multi-level linkage does not need to synchronize the accounts across the system, and the performance of the original account operation of the original system is not influenced. In addition, the transfer-out operation of the account and the transfer-in operation of the other account can easily realize the object consistency due to single-point control, and if a certain linkage link fails, the successful linkage operation is complete. The connectivity of the P2P network formed by multiple linkage nodes is not complex in nature and has good performance. Finally, a complete multi-stage linkage operation state is provided, and subsequent lookup and debugging are facilitated.
The embodiment of the invention also provides an account multi-stage linkage method crossing the new system and the old system, the principle of which is similar to that of the account multi-stage linkage system crossing the new system and the old system, and the details are not repeated here.
Fig. 3 is a flowchart of an account multi-level linkage method across old and new systems in the embodiment of the present invention, as shown in fig. 3, including:
step 301, receiving a transaction success message of a current account sent by a corresponding system, wherein the system is a new system or an old system;
step 302, inquiring a linkage parameter table, judging whether the current account meets a trigger condition, if so, reading a linkage parameter table of a corresponding system, and obtaining a linked account;
303, generating an atomic transaction corresponding to the current account and an atomic transaction corresponding to the linked account;
step 304, sending the atomic transaction corresponding to the current account to a corresponding system;
step 305, sending the atomic transaction corresponding to the linked account to a linkage node corresponding to a system corresponding to the linked account;
step 306, after receiving a transaction success message of the atomic transaction corresponding to the current account returned by the corresponding system, sending the transaction success message of the atomic transaction corresponding to the current account to a linkage node corresponding to the system corresponding to the linked account; the linkage node corresponding to the system corresponding to the linked account returns a linkage result according to the transaction result of the atomic transaction corresponding to the linked account and the transaction success message of the atomic transaction corresponding to the current account;
and 307, receiving a linkage result returned by the linkage node corresponding to the system corresponding to the linked account.
Fig. 4 is another flowchart of an account multi-level linkage method across old and new systems according to an embodiment of the present invention, in an embodiment, the method further includes:
step 401, sending the received atomic transaction corresponding to the linked account to a corresponding system;
step 402, after receiving a transaction success message of the atomic transaction corresponding to the linked account returned by the corresponding system, reading a linkage parameter table of the corresponding system, and judging whether the linked account meets a trigger condition;
step 4021, if the linked account meets the trigger condition, waiting for a transaction success message of the atomic transaction corresponding to the current account;
step 40211, when receiving a transaction success message of the atomic transaction corresponding to the current account, reading the linkage parameter table of the corresponding system to obtain the linked account of the corresponding system;
step 40212, when the time of receiving the transaction success message of the atomic transaction corresponding to the current account is out, determining that the linkage result is the linkage failure message, and sending the linkage failure message to the linkage node corresponding to the system corresponding to the current account;
step 4022, if the linked account does not meet the triggering condition, determining that the linkage result is a linkage success message, and sending the linkage success message to the linkage node corresponding to the system corresponding to the current account.
In one embodiment, the sending the atomic transaction corresponding to the current account to the corresponding system, and the sending the atomic transaction corresponding to the linked account to the linkage node corresponding to the system corresponding to the linked account includes:
when the atomic transaction corresponding to the current account and the atomic transaction corresponding to the linked account are multiple, the atomic transaction corresponding to the current account is sent to the corresponding system according to the transaction sequence, and the atomic transaction corresponding to the linked account is sent to the linkage node corresponding to the system corresponding to the linked account.
In an embodiment, the method further comprises:
after a transaction success message of the atomic transaction corresponding to the current account returned by the corresponding system is received, recording a linkage operation log;
and recording a linkage operation log after receiving the linkage result.
In summary, in the method provided in the embodiment of the present invention, a transaction success message of a current account sent by a corresponding system is received, where the system is a new system or an old system; inquiring the linkage parameter table, judging whether the current account meets the triggering condition, if so, reading the linkage parameter table of the corresponding system, and obtaining a linked account; generating an atomic transaction corresponding to the current account and an atomic transaction corresponding to the linked account; sending the atomic transaction corresponding to the current account to a corresponding system; sending the atomic transaction corresponding to the linked account to a linkage node corresponding to a system corresponding to the linked account; after receiving a transaction success message of the atomic transaction corresponding to the current account returned by the corresponding system, sending the transaction success message of the atomic transaction corresponding to the current account to a linkage node corresponding to the system corresponding to the linked account; and the linkage node corresponding to the system corresponding to the linked account returns a linkage result according to the transaction result of the atomic transaction corresponding to the linked account and the transaction success message of the atomic transaction corresponding to the current account. In the process, the multi-level linkage does not need to synchronize the accounts across the system, and the performance of the original account operation of the original system is not influenced. In addition, the transfer-out operation of the account and the transfer-in operation of the other account can easily realize the object consistency due to single-point control, and if a certain linkage link fails, the successful linkage operation is complete. The connectivity of the P2P network formed by multiple linkage nodes is not complex in nature and has good performance. Finally, a complete multi-stage linkage operation state is provided, and subsequent lookup and debugging are facilitated.
An embodiment of the present invention further provides a computer device, and fig. 5 is a schematic diagram of the computer device in the embodiment of the present invention, where the computer device is capable of implementing all steps in the account multi-level linkage method across new and old systems in the embodiment, and the computer device specifically includes the following contents:
a processor (processor)501, a memory (memory)502, a communication Interface (Communications Interface)503, and a communication bus 504;
the processor 501, the memory 502 and the communication interface 503 complete mutual communication through the communication bus 504; the communication interface 503 is used for implementing information transmission between related devices such as server-side devices, detection devices, and user-side devices;
the processor 501 is configured to call the computer program in the memory 502, and when the processor executes the computer program, the processor implements all the steps in the multi-level linkage method for accounts crossing new and old systems in the above embodiments.
The embodiment of the present invention further provides a computer-readable storage medium, which can implement all the steps of the account multi-level linkage method across the old and new systems in the above embodiment, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps of the account multi-level linkage method across the old and new systems in the above embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.