Online Transaction Method, Device, Program Product, Readable Medium, and Electronic Device

By setting up online transactions at the same place as penetration transactions in the distributed banking system, avoiding database operations and using penetration identifiers in transaction process management to quickly obtain service component information, the problem of online transactions taking time is solved and transaction efficiency is improved.

CN114092256BActive Publication Date: 2025-07-11CHINA CONSTRUCTION BANK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111422822.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2025-07-11
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

In distributed banking systems, online transactions take too long due to frequent database operations, which affects transaction efficiency.

Method used

Set up online positive transactions at the same home as penetration transactions to avoid database operations in the integration layer, and store penetration identifiers in the transaction process management to quickly obtain service component information, reducing failures in positive transactions.

Benefits of technology

It reduces the average time-consuming of online transactions and improves the transaction speed and efficiency of distributed banking systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114092256B_ABST
    Figure CN114092256B_ABST
Patent Text Reader

Abstract

This application relates to the field of data processing technologies, and in particular, to an online transaction method, device, program product, readable medium, and electronic device. The online transaction method is applied to a distributed transaction system, which includes a user layer, an integration layer, and a microservice layer; and the online transaction method includes: the integration layer obtains a first transaction request from a client in the user layer; when the integration layer determines that the transaction requested by the first transaction request is a first type of transaction, it sends an instruction to execute the transaction requested by the first transaction request to the microservice layer, where the first type of transaction includes an online positive transaction (i.e., an online positive transaction belonging to a penetration transaction) in which the accounts related to the first transaction request are in the same place of ownership; the microservice layer executes the instruction to complete the transaction requested by the first transaction request. In this way, it is avoided that the integration layer performs database operations required only for non-penetration transactions based on online positive transactions belonging to penetration transactions, resulting in the problem of transaction time consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing, and in particular, to an online transaction method, apparatus, program product, readable medium, and electronic device. Background Art

[0002] The distributed banking system is divided into multiple levels. For example, as Figure 1 shown, the distributed banking system 1000 may include a user layer 100, an integration layer 200, and a microservice layer 300. Among them, the user layer 100 includes clients such as online banking, mobile banking, and telephone banking; the microservice layer 300 includes service components for executing various services (such as transfer transactions). In the distributed banking system 1000, the service components are data-isolated from each other and cannot access each other. Data transmission needs to be carried out through the integration layer 200. For example, a service component stores the service data obtained from executing a service in the database of the integration layer 200, and other service components obtain the service data by accessing the database of the integration layer 200.

[0003] During the process of storing and invoking service data, the integration layer 200 needs to access the database, and database operations need to be performed when accessing the database. The database operations include receiving queries, insertions, updates, etc. requests, invoking internal execution instructions such as additions and updates, and receiving parameter query requests, etc.; the database operations are very time-consuming. Among them, the transactions that need to perform database operations in the integration layer 200 belong to non-penetrating transactions.

[0004] For example, many online transactions require multiple service components to cooperate, that is, multiple service components execute corresponding services to jointly complete an online transaction, and each service component needs to complete its own service based on the service data of other service components. Therefore, each service component needs to store the corresponding service data in the database of the integration layer 200 so that other service components can obtain the required service data from the database, that is, the service data sharing among the service components is to ensure the consistency of the service data of each service component. Thus, in the distributed banking system 1000, the integration layer 200 usually sets all online transactions as non-penetrating transactions, so that the execution of online transactions requires database operations in the integration layer 200.

[0005] Because database operations are very time-consuming, therefore, it is necessary to optimize online transactions for the problem of time-consuming database operations in online transactions. Summary of the Invention

[0006] Some embodiments of the present application provide an online transaction method, program product, readable medium, and electronic device. The following introduces the present application from multiple aspects, and the implementation manners and beneficial effects of the following multiple aspects can be referred to each other.

[0007] In a first aspect, an embodiment of the present application provides an online transaction method, a program product, a readable medium, and an electronic device. The online transaction method is applied to a distributed transaction system, and the distributed transaction system includes a user layer, an integration layer, and a microservice layer. The online transaction method includes: the integration layer obtains a first transaction request from a client in the user layer; when the integration layer determines that the transaction requested by the first transaction request is a first type of transaction (i.e., a penetration transaction), the integration layer sends an instruction to execute the transaction requested by the first transaction request to the microservice layer, where the first type of transaction includes an online positive transaction in which accounts related to the first transaction request are in the same home location; the service components in the microservice layer execute the instruction to complete the transaction requested by the first transaction request. The integration layer first determines that the transaction requested by the first transaction request does not need to access the database, and then sends the instruction to execute the transaction to the microservice layer, avoiding the integration layer accessing the database for transactions that do not need to access the database, resulting in the problem of transaction time consumption.

[0008] By reducing the database operations occurring during the online positive transaction, the average time consumption of the online transaction is reduced, thereby improving the transaction speed of the distributed banking system.

[0009] In an implementation of the above first aspect, the method further includes: the integration layer obtains a second transaction request from the client, where the transaction requested by the second transaction request is an online reversal transaction of the online positive transaction requested by the first transaction request; in response to the second transaction request, the integration layer searches for the transaction record of the online positive transaction in the transaction process management (i.e., the record of accessing the service component), and determines the service component in the microservice layer corresponding to the online positive transaction according to the searched transaction record, where the transaction process management includes at least one transaction record of the first type of transaction and at least one transaction record of the second type of transaction, and where the completion of the second type of transaction (i.e., non-penetration transaction) requires accessing the database; the integration layer forwards the online reversal transaction request to the confirmed service component target address; the service component executes the online reversal transaction requested by the second transaction request. By obtaining the service component target address corresponding to the online positive transaction in the transaction process management, the online reversal transaction corresponding to the online positive transaction that does not need to access the database also does not need to access the database.

[0010] In an implementation of the above first aspect, the method further includes: when the integration layer determines that the transaction requested by the first transaction request is a first type of transaction, the integration layer generates a first type identifier of the online positive transaction requested by the first transaction request, where the first type identifier is used to identify that the transaction type of the online positive transaction is a first type of transaction.

[0011] In an implementation of the above first aspect, in response to a second transaction request, the integration layer searches for transaction records of an ongoing online transaction from the transaction process management, including: when the integration layer obtains the first type identifier of the online positive transaction corresponding to the online reversal transaction, the integration layer searches for the transaction records of the online positive transaction from the transaction records of at least one first type of transaction in the transaction process management.

[0012] In an implementation of the above first aspect, the above second type of transaction includes an online positive transaction where the relevant accounts of the first transaction request are in different home localities.

[0013] In an implementation of the above first aspect, when the integration layer determines that the transaction requested by the first transaction request is a first type of transaction, the integration layer determines whether there is a completed record of the first type of transaction in the microservice layer (i.e., the service components in the microservice layer), and executes the transaction requested by the first transaction request when there is no completed record of the first type of transaction.

[0014] In an implementation of the above first aspect, when the integration layer determines that there is a completed record of the first type of transaction in the microservice layer, the integration layer obtains the completed record from the microservice layer and returns the completed record to the client.

[0015] In an implementation of the above first aspect, when the service component fails to execute the first transaction request, the service component sends a supplementary record water request containing transaction failure information to the integration layer. In response to the supplementary record water request, the integration layer accesses the database of the integration layer to supplement the record of the water, and sends an instruction to execute a sub-transaction to a new service component different from the service component, where the sub-transaction is used for the new service component to continue to execute the first transaction request based on the transaction failure information; the new service component responds to the instruction to execute the sub-transaction, executes the sub-transaction, and obtains the transaction result of the sub-transaction; the new service component returns the transaction result of the sub-transaction to the integration layer; the integration layer sends the transaction failure information and the transaction result of the sub-transaction to the client that initiated the first transaction request.

[0016] In a second aspect, an embodiment of the present application provides a distributed transaction device, which is applied to a distributed transaction system. The distributed transaction system includes a user layer, an integration layer, and a microservice layer; and the device includes: an acquisition module, a determination module, and an execution module; the acquisition module is used for the integration layer to obtain a first transaction request from a client in the user layer; the determination module is used for the integration layer to send an instruction to execute the transaction requested by the first transaction request to the microservice layer when determining that the transaction requested by the first transaction request is a first type of transaction, where the first type of transaction includes an online positive transaction where the accounts related to the first transaction request are in the same home locality; the execution module is used for the service components in the microservice layer to execute the instruction to complete the transaction requested by the first transaction request.

[0017] In a third aspect, an embodiment of the present application provides a computer program product, which includes instructions for implementing the above online transaction method.

[0018] In a fourth aspect, an embodiment of the present application provides a readable medium, on which instructions are stored, and when the instructions are executed on an electronic device, the electronic device is caused to execute the online transaction method as described above.

[0019] In a fifth aspect, an embodiment of the present application provides an electronic device, which includes: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the processors of the electronic device, for executing the online transaction method as described above. Description of the Drawings

[0020] Figure 1 FIG. is an application scenario diagram of an online transaction method according to some embodiments of the present application;

[0021] Figure 2A FIG. is a flowchart of an online positive transaction method according to some embodiments of the present application;

[0022] Figure 2B FIG. is a flowchart of another online positive transaction method according to some embodiments of the present application;

[0023] Figure 3 FIG. is a flowchart of an online reversal transaction method according to some embodiments of the present application;

[0024] Figure 4 FIG. is a flowchart of a method for processing data consistency in the integration layer 200 and the transfer service 310 in an online positive transaction according to some embodiments of the present application;

[0025] Figure 5 FIG. is a schematic diagram of an online positive transaction device according to some embodiments of the present application;

[0026] Figure 6 FIG. is a block diagram of an electronic device according to some embodiments of the present application. Detailed Embodiments

[0027] Exemplary embodiments of the present application include, but are not limited to, an online transaction method, a program product, a readable medium, and an electronic device. In the technical solution of the present application, the acquisition, storage, use, processing, etc. of data all comply with the relevant provisions of national laws and regulations.

[0028] To better understand the content of this solution, the following explains relevant terms.

[0029] Online transaction: A transaction directly provided by the system to the outside. This type of transaction has transactionality - it can be rolled back; real-time - the transaction has a lifecycle and a timeout mechanism, etc. For example, the withdrawal process is an online transaction. Online transactions include online positive transactions and online reversal transactions, etc.

[0030] Batch transaction: The parameters related to the transaction and the system status have been locked. What the system needs to perform is a certain type of operation. This type of operation processes a large amount of data using the same rules, has fixed steps, and each service component does not need to complete its own business based on the business data of other service components, so there is no need for the integration layer to perform database operations. Such as the reconciliation transaction.

[0031] Positive transaction: A positive transaction represents a positive transaction logic and is a type of transaction developed to achieve a certain business effect. For example, the transfer transaction is a positive transaction.

[0032] Reversal transaction: A reversal transaction is a type of transaction with a reverse logic to the positive transaction and is a reverse transaction logic developed to eliminate the business effect of the positive transaction. For example, if the transfer transaction fails but the transferor has already been debited, then a reversal transaction of this transfer transaction needs to be carried out to eliminate the business effect of the transferor's debit.

[0033] External reversal transaction: A reversal transaction initiated from the outside by the caller (such as the user layer).

[0034] Non-penetrating transaction: It is necessary to store transaction information (such as transaction numbers, business data) through the integration layer. For example, after the integration layer receives a transaction request from the user layer, it stores the identification information of the transaction, such as the transaction number, etc., and then initiates a business request access to each service component in the microservice layer; each service component sends the business data obtained from executing the business to the integration layer; the integration layer stores the business data and calls the stored business data through database operations. The database operations include as described above: receiving query, insert, update, etc. requests, calling internal execution instructions such as new addition, update, etc., and receiving parameter query requests, etc.

[0035] Penetrating transaction: It does not store transaction information through database operations in the integration layer, but directly initiates a business request access to the service components in the microservice layer, that is, a transaction completed by the service components alone. The business data obtained by the service components from executing the business does not need to be sent to the microservice layer to ensure the consistency of business data between service components, that is, the penetrating transaction does not require database operations. For example, the above-mentioned batch transactions all belong to penetrating transactions. Online transactions include penetrating transactions and non-penetrating transactions. When the accounts involved in the online transaction belong to the same place of belonging, because a service component can complete the business of this online transaction alone, there is no need to perform database operations in the integration layer to store the business data of this service component in order for other service components to obtain the business data.

[0036] In-transaction consistency: In a distributed environment, in-transaction consistency means that data can remain consistent among multiple replicas. When a system performs an update operation in a data-consistent state, it should ensure that the system's data remains in a consistent state. In a distributed system, if all service components can read the latest value of a data item after the update operation of the data item is successfully executed, then such a system is considered to have strong consistency.

[0037] For example, after service component A in the microservice layer 300 finishes a transaction and obtains business data a and sends it to the integration layer 200, other service components can all access the database of the integration layer to obtain the business data a. In this way, the bank distributed system 1000 has in-transaction consistency.

[0038] Eventual consistency: Eventual consistency emphasizes that all data replicas in the system will eventually reach a consistent state after a period of synchronization. This is a concept that emerges relative to real-time strong consistency.

[0039] As described above, in the prior art, in online transactions, the integration layer 200 sets all transactions as non-penetrating transactions. As a result, during the execution of each online transaction by the integration layer 200, database operations are required, which takes a long time and affects the efficiency of the distributed bank system 1000 in processing online transactions. In view of this, the present application provides an online transaction method. Considering that for online positive transactions where related accounts belong to the same home location, only one service component is required to complete the transaction, there is no need to upload the business data obtained by executing the service component to the integration layer 200 to share the business data with other service components. Therefore, in the online transaction method of the present application, when the integration layer 200 receives an online transaction request, it determines whether the accounts involved in the received online positive transaction belong to the same home location, and sets the online positive transactions belonging to the same home location as penetrating transactions that do not require accessing the database. In this way, during the process of processing such transactions, the integration layer 200 is prevented from performing database operations, thereby improving the efficiency of online transactions.

[0040] Exemplarily, the above online transaction is a transfer between account A and account B that both belong to the bank in Province M. Only the service component of the bank in Province M is required to complete the transfer transaction, and the service component of the bank in Province M does not need to cooperate with the service components of banks in other provinces.

[0041] The technical solution of the present application will be described in detail below with reference to the accompanying drawings.

[0042] Figure 1 It is an application scenario diagram of an online transaction method according to some embodiments of the present application. As Figure 1As shown in the figure, in the distributed banking system 1000, the user layer 100 includes client A 110, client B 120, and client C 130. In some embodiments, the user layer 100 may be clients such as online banking, mobile banking, and telephone banking. The integration layer 200 includes a call center 210, a database 220, and a transaction process management 230. The microservice layer 300 includes service components such as a transfer service 310, a loan service 320, and an investment service 330. Among them, the transaction process management 230 contains records of all transactions in the integration layer 200 accessing each service component. As Figure 1 shown, the user layer 100 initiates a transaction to the integration layer 200, and the integration layer 200 establishes access between the call center 210 and each service component in the microservice layer 300.

[0043] As described above, when the integration layer 200 regards the transaction initiated by the user layer as a non-penetrating transaction, that is, when the business data of the transaction is stored in the database 220, the integration layer 200 needs to perform database operations. For example, in some embodiments, if the business data of the transaction is stored in the water table of the database 220, the above database operations include accessing the water table, internally calling the water table, accessing the parameter library table, and other related database operations. The database operation of accessing the parameter library table includes receiving a parameter query request to obtain transaction-related parameters. For example, if the transaction-related parameter is a date, the integration layer 200 associates the date with the business data and stores it in the water table, and based on the requests of the user layer 100 and each service component, sends the data with the date associated with the business data to the user layer 100 and each service component, so that the user layer 100 and each service component can obtain the time when the business data is completed. The above database operations account for a large proportion of the time consumed by the online transaction in the integration layer 200.

[0044] Specifically, in some embodiments, the above online transaction takes time T in the integration layer 200 整合 The calculation formula is as follows:

[0045] T 整合 = T 内呼 *N + T 接入 + a (1)

[0046] Among them, T 内呼 is the time consumed for database operations such as adding and updating the internally called water table for accessing a service component once. Among them, the transactions (i.e., services) executed by multiple service groups form an online transaction and jointly complete a complete business; T 接入 is the time consumed for database operations such as querying, inserting, and updating the access water table. N is the number of service components accessed, and a is the time consumed for database operations such as querying the parameter library table.

[0047] Combined with the above formula (1), it can be seen that the total time consumed by the online transaction is T总 can be obtained through the following formula (2):

[0048]

[0049] where T 微服务 is the time consumed by the microservice layer 300, and N is the number of service components accessed.

[0050] The time consumed T 总 of the above-mentioned one-time online transaction in the integration layer 200 basically depends on the time consumed in database operations, that is, T 整合 . In some embodiments, online transactions all adopt non-penetrating transactions (the second type of transactions). Setting the online transactions belonging to penetrating transactions as non-penetrating transactions results in the time consumption of online transactions.

[0051] Next, in combination with Figure 1 the scenario shown below, the technical solution of the embodiment of the present application will be introduced. Specifically, Figure 2A shows a flowchart of an online positive transaction method, and the process includes the following steps.

[0052] S102: The integration layer 200 receives an online positive transaction request from the client A110.

[0053] S104: When the integration layer 200 determines that the relevant accounts of the online positive transaction request belong to the same place of origin, it forwards the online positive transaction request to the transfer service 310. As described above, the online transaction in which the relevant accounts belong to the same place of origin belongs to a penetrating transaction, and no cooperation of other service components is required, so there is no need to perform the above-mentioned database operations. The record of the online positive transaction accessing the service component is stored in Figure 1 the transaction process management 230 shown below.

[0054] S106: The transfer service 310 executes the request of the online positive transaction, obtains the transaction result of the online positive transaction, and sends the transaction result to the integration layer 200.

[0055] S108: The integration layer 200 forwards the transaction result to the client A110.

[0056] Through the method provided by the above embodiment, the integration layer 200 is avoided from performing database operations during the process of processing online positive transactions of the same place of origin, that is, the time of T 整合 shown in the above formula (2) is saved, and the efficiency of online transactions is improved.

[0057] In the above embodiments, when the online positive transaction is set as a penetration transaction, since the integration layer 200 does not store the transaction result of the online positive transaction, and the transaction result contains the component identifier of the service component that executes the online positive transaction, that is, the service component target address. Thus, when the integration layer 200 processes the online reversal transaction corresponding to the online positive transaction of the penetration transaction, it cannot query the component identifier of the service component that executes the online positive transaction in the database 220, and cannot send an online reversal transaction request to the service component, resulting in the failure of the online reversal transaction.

[0058] To solve the above problem of the failure of the online reversal transaction, during the online reversal transaction, the present application obtains, through the integration layer 200, the component identifier corresponding to the online positive transaction based on the transaction number of the online positive transaction corresponding to the online reversal transaction in Figure 1 the transaction process management 230 as shown. Then, based on the component identifier, the integration layer 200 sends an online reversal transaction request to the service component corresponding to the component identifier. In this way, the problem that the integration layer 200 cannot query the component identifier of the service component that executes the online positive transaction in the database 220 and causes the failure of sending the online reversal transaction request is solved, and the online reversal transaction corresponding to the online positive transaction of the penetration transaction also does not need to access the database 220.

[0059] In some cases, there is a large amount of transaction information in the transaction process management 230 of the integration layer 200, which will result in low efficiency in searching for the component identifier. Among them, the transaction process management 230 includes the transaction records of all transactions, that is, the correspondence between the transaction identifier (such as the transaction number) of the transaction and the component identifier of the service component that executes the transaction.

[0060] To improve the efficiency of obtaining the component identifier corresponding to the online positive transaction of the penetration transaction (that is, the above-mentioned first type of transaction), an embodiment of the present application also provides an online transaction method. When the integration layer 200 detects that the online transaction is an online positive transaction in the same home location, it sets a penetration identifier (that is, the above-mentioned first type of identifier) for the online transaction, and stores the correspondence between the online positive transaction and the penetration identifier in the database 220. When the integration layer 200 performs the online reversal transaction corresponding to the online positive transaction, by determining whether the online positive transaction has a penetration identifier, it excludes the online positive transactions of non-penetration transactions, avoiding the above step of searching for the component identifier in the transaction process management 230 for non-penetration online positive transactions, that is, the online transactions of non-penetration transactions directly obtain the component identifier from the database 220, thereby improving the efficiency of querying the component identifier.

[0061] Specifically, Figure 2B shows a flowchart of another online transaction method. Below, taking Figure 1 the distributed banking system 1000 shown as an example, for Figure 2BDescribe in detail the steps of the online transaction method shown.

[0062] S201: Client A110 initiates an online transaction request. This transaction is one of an online positive transaction or an online reversal transaction.

[0063] S202: The integration layer 200 determines whether the online transaction is a positive transaction. That is, it determines whether the online transaction is an online positive transaction.

[0064] If the online transaction is an online positive transaction, go to step S203 to query the completed record of the online positive transaction. The completed record includes information such as the transaction result of the online positive transaction. The online transactions described in the following step S203 and steps S205 to S209 are all online positive transactions and will not be elaborated further below.

[0065] If the online transaction is not an online positive transaction, that is, the online transaction is an online reversal transaction, go to step 204 to perform the logical steps of the online reversal transaction.

[0066] In some cases, the online transaction has been carried out, and the client A110 initiates an online transaction request only to query the completed record. Therefore, in step S203, the integration layer 200 first queries whether the completed record of the online transaction is included in the transfer service 310. If the completed record is found, it directly returns the completed record to the client A110. If not found, then in step S207, it determines whether the online transaction can perform a penetration transaction.

[0067] S203: The integration layer 200 queries the completed record of the online transaction in the transfer service 310. Among them, the unique identification number of the online transaction is included in the online transaction request in the above 201, which is used to find the corresponding completed record of the online transaction in the transfer service 310. The query request can be a request from the call center 210 in the integration layer 200 to the transfer service 310 component to query the completed record of the online transaction.

[0068] S204: The integration layer 200 performs a reversal transaction. The integration layer 200 performs the logical processing steps of the reversal transaction for this online transaction. The logical processing steps of the reversal transaction will be described in detail below and will not be elaborated here.

[0069] S205: The transfer service 310 determines whether a completed record is found. Specifically, in response to the request from the call center 210 to the transfer center to query the completed record of the online transaction, the transfer service 310 queries the completed record of the online transaction.

[0070] If the transfer service 310 finds a completed record of the online transaction, then the online transaction is a completed online positive transaction of the transfer service 310, and then it enters step 206 for the logical processing step of penetrating the positive transaction of the online transaction.

[0071] If the transfer service 310 does not find a completed record of the online transaction, then the online transaction is an unaccepted online positive transaction of the transfer service 310, and then it enters step S207 to determine whether the online positive transaction can be penetrated.

[0072] S206: The integration layer 200 performs a penetrating positive transaction. The integration layer 200 performs the logical processing step of penetrating the positive transaction on the above online transaction, and the logical processing step of the penetrating positive transaction is as follows.

[0073] S2061: The integration layer 200 forwards the online positive transaction request to the transfer service 310. After receiving the request, the transfer service 310 executes the business of the online positive transaction and obtains the transaction result of the online positive transaction including the transaction result of the online positive transaction.

[0074] S2062: The transfer service 310 sends the transaction result of the online positive transaction to the integration layer 200. After receiving the transaction result of the online positive transaction, the integration layer 200 enters step S2063.

[0075] S2063: The integration layer 200 returns the transaction result of the online positive transaction to the client A110.

[0076] If step S206 is input from step S205, it directly enters step S2062, that is, when the transfer service 310 finds a completed record of the online transaction in the above step S203, it directly returns the completed record to the integration layer 200.

[0077] If step S206 is input from step S208, it directly enters step S2061.

[0078] S207: The integration layer 200 determines whether the relevant accounts of the online transaction belong to the same home location.

[0079] If the relevant accounts of the online transaction belong to the same home location, it means that the online transaction is an online positive transaction that can be penetrated, and it enters step S208 to set a penetration flag for the online transaction. For example, the online positive transaction request is a transfer transaction from account A to account B, where account A and account B belong to the same province, and a penetration flag is set for the online transaction.

[0080] If the relevant accounts of the online transaction do not belong to the same home location, then it enters step S209 for the logical processing step of non-penetrating positive transaction, and the logical processing step of the non-penetrating positive transaction requires database operations in the integration layer 200.

[0081] S208: The integration layer 200 sets the penetration identifier for the online transaction. After the integration layer 200 sets the penetration identifier for the online transaction, it proceeds to step S206, and the integration layer 200 performs the logical processing steps of the penetration positive transaction based on the penetration identifier of the online transaction.

[0082] The integration layer 200 identifies the online positive transactions of related accounts belonging to the same place of origin through the penetration identifier. In this way, the online positive transactions of the same place of origin are subjected to the logical processing steps S2061 to S2063 of the above-mentioned penetration positive transaction, avoiding database operations in the integration layer 200, saving the time consumed by the online positive transactions of the same place of origin in the integration layer 200, and thus improving the average speed of the online transaction.

[0083] In some embodiments of the present application, the integration layer 200 first identifies the above-mentioned penetration identifier and then sends the online positive transaction request in step S2061.

[0084] S209: The integration layer 200 performs non-penetration positive transactions. The integration layer 200 performs the logical processing steps of non-penetration positive transactions on the online positive transactions of different places of origin. The logical processing steps of the non-penetration positive transaction are as described in the above formulas (1) and (2), which will cause the transaction to consume a large amount of time in the integration layer 200.

[0085] In the above embodiment, the integration layer 200 records the online positive transactions for penetration transactions by setting the penetration identifier. This penetration identifier is used to find the transaction records of the online positive transaction when performing the online reversal transaction corresponding to the online positive transaction, that is, to access the information of the service component.

[0086] It can be understood that in some embodiments, the online reversal transaction needs to first obtain the completed record of the corresponding online positive transaction in the integration layer 200 to obtain the service component information for executing the online reversal transaction. However, in the above embodiment, there is no completed record of the online positive transaction with the penetration identifier in the database 220 of the integration layer 200, that is, the service component information corresponding to the online positive transaction with the penetration identifier cannot be queried in the database 220, resulting in the failure of the online reversal transaction.

[0087] For the above reasons, in some embodiments of the present application, by searching the transaction records of the transaction process management 230 in the integration layer 200 for the online positive transaction corresponding to the online reversal transaction, the component identifier of the service component accessed by the online positive transaction is obtained. In this way, when performing the online reversal transaction, the integration layer 200 can send the online reversal transaction request to the component corresponding to the component identifier, avoiding the failure of the integration layer 200 to send the online reversal transaction request. In addition, the online reversal transaction is a penetration transaction and does not require database operations, reducing the average time consumed by the entire online transaction, thereby improving the performance of the system.

[0088] Specifically, Figure 3 is a flowchart of an online reversal transaction method. The steps of the online reversal transaction method shown below Figure 3 will be described in detail.

[0089] S301: The client A110 sends an online reversal transaction request to the integration layer 200. For example, in Figure 2B the online transaction in step S204 is an online reversal transaction.

[0090] S302: The integration layer 200 determines whether the transaction information of the corresponding online positive transaction of the online reversal transaction is found in the database 220. The integration layer 200 queries the transaction information in the database 220 to determine whether the online positive transaction has a penetration transaction. As described above, the transaction information includes information such as the transaction number and the business data obtained by each service component executing the online positive transaction. It includes the component identifiers of each service component.

[0091] If the transaction information is found, the online positive transaction is a non-penetration transaction, and the online reversal transaction is also a non-penetration transaction, and it enters step S303 for the logical processing steps of the non-penetration reversal transaction.

[0092] If the transaction information is not found, the online reversal transaction and the online positive transaction are penetration transactions, and it enters step S304 to determine whether the corresponding online positive transaction has a penetration identifier.

[0093] S303: The integration layer 200 performs a reversal transaction. The logical processing steps for performing the reversal transaction are as follows.

[0094] S3031: The integration layer 200 sends an online reversal transaction request. After receiving the online reversal transaction request, the transfer service 310 executes the online reversal transaction to obtain the transaction result of the online reversal transaction.

[0095] S3032: The transfer service 310 sends the transaction result of the online reversal transaction to the integration layer 200. The transfer service 310 sends the transaction result of the online reversal transaction to the integration layer 200.

[0096] S3033: The integration layer 200 returns the transaction result of the online reversal transaction. The integration layer 200 returns the transaction result of the online reversal transaction to the client A110.

[0097] S304: The integration layer 200 determines whether the corresponding online positive transaction has a penetration flag. Specifically, the integration layer 200 queries the database 220 to check if there is a corresponding penetration flag based on the transaction number of the corresponding online positive transaction in the online reversal request. If the corresponding online positive transaction has a corresponding penetration flag, it proceeds to step S305, and obtains the component identifier corresponding to the corresponding online positive transaction from the exchange area of the transaction process management 230 of the integration layer 200. This component identifier is used to obtain the component identifier of the service component in the microservice layer 300 involved in the positive transaction corresponding to this transaction. For example, the component identifier of the transfer service 310.

[0098] S305: The integration layer 200 obtains the component identifier of the corresponding online positive transaction from the transaction process management 230. Based on this component identifier, it proceeds to step S3031. Specifically, in step S3031, the integration layer 200 sends an online reversal transaction request to the transfer service 310 based on this component identifier.

[0099] Through the online transaction method provided by the application embodiment, when performing the online reversal transaction corresponding to this online positive transaction, by querying the penetration flag of the penetration-type online positive transaction in the integration layer 200, and then querying the component identifier of the service component corresponding to this online positive transaction, the integration layer 200 sends an online reversal transaction request to the service component based on the component identifier of this business component. In this way, the problem that the service component information cannot be obtained when the online positive transaction is set as a penetration-type transaction is solved.

[0100] In the above embodiment, since there is no completed record of the penetration-type online transaction in the integration layer 200, the integration layer 200 cannot obtain the status of whether the online transaction in the microservice layer 300 is successful, resulting in the problem that the completed records in the integration layer 200 and the service components in the microservice layer 300 are inconsistent in some cases. For example, this online positive transaction is a transfer transaction from account A to account B, including two steps: deducting money from account A and depositing money into account B. If in the microservice layer 300, the transfer service 310, the deducting step is successful while the depositing step fails, then the transfer service 310 cannot complete this online positive transaction alone.

[0101] Based on the above problems, in some embodiments of the present application, when the service component in the microservice layer 300 fails to execute the business of the online positive transaction belonging to the penetration transaction, the service component sends a supplementary record water request to the integration layer 200, triggering the integration layer 200 to set this online positive transaction as a non-penetration transaction, and sending a sub-transaction request to other service components to complete the complete business of this online positive transaction. Figure 4 It is a flowchart of a method for processing data consistency between the integration layer 200 and the transfer service 310 in an online positive transaction. The following will Figure 4 describe the steps shown in detail.

[0102] S401: When the transfer service 310 fails in performing an online positive transaction with a penetration identifier, a supplementary accounting transaction request containing transaction failure information is triggered. For example, this online positive transaction is a transfer transaction from the above-mentioned account A to account B. Account A needs to transfer 200 yuan to account B, but due to insufficient balance in account A, only 100 yuan is transferred from account A to account B. The transaction failure information is the business data of the transfer service 310, such as the transaction result of the transfer from account A to account B, e.g., 100 yuan is transferred from account A to account B, and transaction-related information such as the balance of account A and the balance of account B.

[0103] S402: The transfer service 310 sends a supplementary accounting transaction request to the integration layer 200.

[0104] S403: The integration layer 200 performs database operations to supplement the transaction record and generates a sub-transaction for completing the online positive transaction. The sub-transaction is a transaction based on the above transaction failure information to continue executing the online positive transaction request. For example, the integration layer 200 generates a transaction record based on the transfer transaction information and stores it in the transaction record table of the database 220. The integration layer 200 queries the associated credit card account A1 of account A. Based on the transfer of 100 yuan from account A to account B, the integration layer 200 sends a sub-transaction request for account A1 to pay 100 yuan to account B to the loan service 320. In this way, the integration layer 200 performs database operations on this online positive transaction to store the transaction record information and initiates a sub-transaction, converting this online positive transaction from a penetration transaction to a non-penetration transaction. This avoids the situation where in the case of a transaction failure of an online positive transaction belonging to a penetration transaction, the client A110 cannot query the transaction failure information in the integration layer 200; nor can the integration layer 200 continue to initiate a sub-transaction request based on the transaction failure information to complete the entire business of the online positive transaction, resulting in the final failure of the online positive transaction.

[0105] S404: The integration layer 200 sends an instruction to the loan service 320 to execute the sub-transaction.

[0106] S405: The loan service 320 executes the sub-transaction and obtains the transaction result containing the sub-transaction. That is, the loan service 320 responds to the instruction to execute the sub-transaction and executes the above sub-transaction. For example, the loan service 320 performs the operation of transferring 100 yuan from account A1 to account B. The transaction result of the sub-transaction is the business data of the loan service 320.

[0107] S406: The loan service 320 sends the transaction result of the sub-transaction to the integration layer 200.

[0108] S407: The integration layer 200 sends the transaction result of the sub-transaction and the transaction failure information to the client A110.

[0109] Through the above embodiments, when the online positive transaction of the service component for the penetration transaction fails, by sending a request for making up the transaction record to the integration layer 200, the integration layer 200 is triggered to generate a sub-transaction for continuing to execute the complete business of the online positive transaction. In this way, the integration layer 200 needs to perform database operations to store the transaction results and transaction failure data of the sub-transactions related to the online positive transaction, converting the online positive transaction from a penetration transaction into a non-penetration transaction, and achieving the consistency of business data (transaction results and transaction failure data of sub-transactions) among service components, as described above Figure 4 in the consistency of business data regarding this online positive transaction between the transfer service 310 and the loan service 320 as described above.

[0110] Some embodiments of the present application provide an online positive transaction device. This online positive transaction device is applied to a distributed transaction system, and the distributed transaction system includes a user layer 100, an integration layer 200, and a microservice layer 300, as Figure 5 shown. The online positive transaction device 500 includes an acquisition module 510, a determination module 520, and an execution module 530. The acquisition module 510 is configured to obtain a first transaction request from the client of the user layer by the integration layer; the determination module 520 is configured to determine XXX, and when it is determined that the transaction requested by the first transaction request is a first type of transaction, send an instruction to execute the transaction requested by the first transaction request to the microservice layer 300, where the completion of the first type of transaction does not require accessing the database of the integration layer; the execution module 530 is configured to enable the service component of the microservice layer 300 to execute the instruction to complete the transaction requested by the first transaction request.

[0111] Exemplarily, the above acquisition module 510 and determination module 520 are provided in the above integration layer 200, and the execution module 530 is provided in the service component of the microservice layer 300.

[0112] Some embodiments of the present application provide a computer program product, and this computer program product includes instructions for implementing the above online transaction method.

[0113] Some embodiments of the present application provide a readable medium, and instructions are stored on this readable medium. When the instructions are executed on an electronic device, the electronic device is enabled to execute the online transaction method as described above.

[0114] Some embodiments of the present application provide an electronic device, and this electronic device includes: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the processors of the electronic device, for executing the online transaction method as described above.

[0115] Refer to Figure 6, shown is a block diagram of an online transaction device 60 according to an embodiment of the present application. The online transaction device 60 may be the above-mentioned actual online transaction method. In one embodiment, the online transaction device 60 may include one or more processors 601, a system control logic 602 connected to at least one of the processors 601, a system memory 603 connected to the system control logic 602, a non-volatile memory (NVM) 604 connected to the system control logic 602, and a network interface 606 connected to the system control logic 602.

[0116] In some embodiments, the processor 601 may include one or more single-core or multi-core processors. In some embodiments, the processor 601 may include any combination of a general-purpose processor and a dedicated processor (e.g., a graphics processor, an application processor, a baseband processor, etc.). In an embodiment where the online transaction device 60 employs an eNB (Evolved Node B, enhanced base station) or a RAN (Radio Access Network) controller, the processor 601 may be configured to execute various conforming embodiments, for example, one or more of the multiple embodiments as Figures 2A to 4 shown. For example, the processing 601 may be used to execute the above-mentioned online transaction method.

[0117] In some embodiments, the system control logic 602 may include any suitable interface controller to provide any suitable interface to at least one of the processors 601 and / or any suitable device or component communicating with the system control logic 602.

[0118] In some embodiments, the system control logic 602 may include one or more memory controllers to provide an interface connected to the system memory 603. The system memory 603 may be used to load and store data and / or instructions. In some embodiments, the system memory 603 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).

[0119] The NVM / memory 604 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the NVM / memory 604 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of a HDD (Hard Disk Drive), a CD (Compact Disc) drive, and a DVD (Digital Versatile Disc) drive.

[0120] The NVM / memory 604 may include a portion of the storage resources installed on the on-line transaction device 60, or it may be accessible by the device but not necessarily part of the device. For example, the NVM / storage 604 may be accessed via the network interface 606 over a network.

[0121] In particular, the system memory 603 and the NVM / memory 604 may respectively include: a temporary copy and a permanent copy of the instructions 605. The instructions 605 may include: instructions that, when executed by at least one of the processors 601, cause the on-line transaction device 60 to implement the method as Figures 2A to 4 shown in the method. In some embodiments, the instructions 605, hardware, firmware, and / or its software components may alternatively / additionally be located in the system control logic 602, the network interface 606, and / or the processor 601.

[0122] The network interface 606 may include a transceiver for providing a radio interface for the on-line transaction device 60, and thus communicating with any other suitable devices (such as front-end modules, antennas, etc.) via one or more networks. In some embodiments, the network interface 606 may be integrated with other components of the on-line transaction device 60. For example, the network interface 606 may be integrated with at least one of the processor 601, the system memory 603, the NVM / memory 604, and a firmware device (not shown) having instructions, and when at least one of the processors 601 executes the instructions, the on-line transaction device 60 implements the method shown in the above method embodiments.

[0123] The network interface 606 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 606 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.

[0124] The on-line transaction device 60 may further include: an input / output (I / O) device 607. The I / O device 607 may include a user interface that enables a user to interact with the on-line transaction device 60; the design of the peripheral component interface enables peripheral components to also interact with the on-line transaction device 60. In some embodiments, the on-line transaction device 60 further includes sensors for determining at least one of environmental conditions and location information related to the on-line transaction device 60.

[0125] In some embodiments, the user interface may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., a light-emitting diode flash), and a keyboard.

[0126] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.

[0127] In some embodiments, the sensors may include, but are not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit may also be part of or interact with the network interface 606 to communicate with components of a positioning network (e.g., Global Positioning System (GPS) satellites).

[0128] It can be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the on-line transaction device 60. In other embodiments of the present application, the on-line transaction device 60 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0129] Program code can be applied to the input instructions to perform the various functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of the present application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0130] The program code can be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system. When needed, the program code can also be implemented in assembly language or machine language. In fact, the mechanisms described herein are not limited to the scope of any particular programming language. In any case, the language can be a compiled language or an interpreted language.

[0131] One or more aspects of at least one embodiment can be implemented by representative instructions stored on a computer-readable storage medium, the instructions representing various logics in a processor, the instructions causing the machine, when read by the machine, to fabricate the logics for performing the techniques described herein. These representations, referred to as "a little core", can be stored on a tangible computer-readable storage medium and provided to multiple customers or production facilities to be loaded into a manufacturing machine that actually fabricates the logic or processor.

[0132] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and technologies have not been shown in detail so as not to obscure the understanding of this specification.

[0133] Similarly, it should be understood that, for the sake of streamlining the present application and assisting in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected by the claims, the inventive aspects lie in less than all of the features of the single embodiments disclosed previously. Thus, the claims following the detailed description hereby expressly incorporate the detailed description, where each claim itself serves as a separate embodiment of the present application.

[0134] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.

[0135] In addition, those skilled in the art will be able to understand that, although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present application and forms different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.

Claims

1. An on-line transaction method, applied to a distributed transaction system, characterized in that, The distributed transaction system includes a user layer, an integration layer, and a microservice layer; and the method includes: The integration layer obtains a first transaction request from a client in the user layer; When the integration layer determines that the transaction requested by the first transaction request is a first type of transaction, the integration layer sends an instruction to execute the transaction requested by the first transaction request to the microservice layer, where the first type of transaction includes an online positive transaction in which the accounts related to the first transaction request are in the same place of origin; The service component in the microservice layer executes the instruction to complete the transaction requested by the first transaction request; The integration layer obtains a second transaction request from the client, where the transaction requested by the second transaction request is an online reversal transaction of the online positive transaction requested by the first transaction request; In response to the second transaction request, the integration layer searches for the transaction record of the online positive transaction from the transaction process management, and determines the service component in the microservice layer corresponding to the online positive transaction according to the searched transaction record, where the transaction process management includes at least one transaction record of the first type of transaction and at least one transaction record of the second type of transaction, and the completion of the second type of transaction requires accessing the database in the integration layer; The integration layer forwards the online reversal transaction request to the confirmed target address of the service component; The service component executes the online reversal transaction requested by the second transaction request.

2. The method according to claim 1, characterized in that The method further includes: When the integration layer determines that the transaction requested by the first transaction request is a first type of transaction, the integration layer generates a first type identifier of the online positive transaction requested by the first transaction request, where the first type identifier is used to identify that the transaction type of the online positive transaction is the first type of transaction.

3. The method according to claim 2, characterized in that, In response to the second transaction request, the integration layer searches for the transaction record of the online positive transaction from the transaction process management, including: When the integration layer obtains the first type identifier of the online positive transaction corresponding to the online reversal transaction, the integration layer searches for the transaction record of the online positive transaction from at least one transaction record of the first type of transaction in the transaction process management.

4. The method according to claim 1, wherein The second type of transaction includes an online positive transaction in which the accounts related to the first transaction request are in different places of origin.

5. The method according to claim 1, characterized in that, When the integration layer determines that the transaction requested by the first transaction request is a first type of transaction, the integration layer determines whether there is a completed record of the first type of transaction in the microservice layer, and executes the transaction requested by the first transaction request when there is no completed record of the first type of transaction.

6. The method according to claim 5, characterized in that, The method further includes: When the integration layer determines that there is a completed record of the first type of transaction in the microservice layer, the integration layer obtains the completed record from the microservice layer and returns the completed record to the client.

7. The method according to claim 1, wherein When the service component fails to execute the first transaction request, the service component sends a supplementary record water request containing transaction failure information to the integration layer, In response to the supplementary transaction record request, the integration layer accesses a database to record the supplementary transaction record, and sends an instruction to execute a sub-transaction to a new service component different from the service component, where, the sub-transaction is for the new service component to continue executing the first transaction request based on the transaction failure information; in response to the instruction to execute the sub-transaction, the new service component executes the sub-transaction and obtains the transaction result of the sub-transaction; the new service component returns the transaction result of the sub-transaction to the integration layer; the integration layer sends the transaction failure information and the transaction result of the sub-transaction to the client that initiated the first transaction request.

8. An on-line transaction device is applied to a distributed transaction system, and is characterized in that, The distributed transaction system includes a user layer, an integration layer, and a microservice layer; and the device includes: an acquisition module, where the acquisition module is for the integration layer to acquire a first transaction request from a client in the user layer; and the integration layer acquires a second transaction request from the client, where the transaction requested by the second transaction request is an online reversal transaction of the online positive transaction requested by the first transaction request; a determination module, where the determination module is for the integration layer to send an instruction to execute the transaction requested by the first transaction request to the microservice layer when determining that the transaction requested by the first transaction request is a first type of transaction, where the first type of transaction includes an online positive transaction in which an account related to the first transaction request is in the same place of jurisdiction; and in response to the second transaction request, the integration layer searches for a transaction record of the online positive transaction in the transaction process management, and determines the service component in the microservice layer corresponding to the online positive transaction according to the searched transaction record, where the transaction process management includes at least one transaction record of the first type of transaction and at least one transaction record of a second type of transaction, where the completion of the second type of transaction requires accessing a database in the integration layer; the integration layer forwards the online reversal transaction request to the confirmed target address of the service component; an execution module, where the execution module is for the service component in the microservice layer to execute the instruction to complete the transaction requested by the first transaction request; and the service component executes the online reversal transaction requested by the second transaction request.

9. A computer program product, characterized in that, The computer program product includes instructions for implementing the online transaction method according to any one of claims 1 to 7.

10. A readable medium, characterized in that, Instructions are stored on the readable medium, and when executed on an electronic device, the instructions cause the electronic device to execute the online transaction method according to any one of claims 1 to 7.

11. An electronic device, characterized in that, Including: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the processors of the electronic device, for executing the online transaction method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Design for supporting multi-chain architecture for banking

    CN109102259A