CN118331690A - Transaction consistent capability promotion method, apparatus, device, medium and program product - Google Patents

Transaction consistent capability promotion method, apparatus, device, medium and program product Download PDF

Info

Publication number
CN118331690A
CN118331690A CN202410446217.9A CN202410446217A CN118331690A CN 118331690 A CN118331690 A CN 118331690A CN 202410446217 A CN202410446217 A CN 202410446217A CN 118331690 A CN118331690 A CN 118331690A
Authority
CN
China
Prior art keywords
transaction
environment
request instruction
module
main
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410446217.9A
Other languages
Chinese (zh)
Inventor
何佳存
滕达
程冲
魏成燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Publication of CN118331690A publication Critical patent/CN118331690A/en
Pending legal-status Critical Current

Links

Abstract

The disclosure provides a transaction consistency capability improving method, which can be applied to the technical field of big data and the technical field of financial science and technology. The transaction consistency capability improving method comprises the following steps: configuring a distributed transaction platform, wherein the distributed transaction platform comprises a transaction receiving module and a transaction coordination module; responding to a request instruction initiated by a transaction participant to a transaction receiving module in the environment, and receiving the request instruction and analyzing the request instruction by the transaction receiving module to obtain the environment information of the main transaction corresponding to the transaction participant; based on the environment information of the main transaction, a transaction receiving module in the environment forwards a request instruction to a corresponding transaction coordination module in the environment information of the main transaction; and responding to the corresponding transaction coordination module under the environment information of the main transaction to receive the request instruction, generating a main transaction record according to the request instruction, and coordinating the consistency of the transaction. The present disclosure also provides a transaction consistency capability promotion apparatus, device, medium, and program product.

Description

Transaction consistent capability promotion method, apparatus, device, medium and program product
Technical Field
The present disclosure relates to the field of big data technology and the field of financial technology, and more particularly, to a transaction consistency capability promotion method, apparatus, device, medium, and program product.
Background
In a distributed scenario, a distributed transaction has a plurality of transaction participants, and in order to solve the problem of distributed transaction consistency in the scenario, a distributed transaction platform generally coordinates the submission or rollback of all the transaction participants uniformly, so as to ensure the consistency of all the transaction participants.
Under the disaster recovery drilling scene, drilling application is in disaster recovery environment, other transaction participants are still in production environment, and for the distributed transactions in the two fields of cross-production and disaster recovery, as fewer transaction participants participate in drilling at the early stage of drilling, the distributed transaction service of the production environment can be subscribed by the drilling transaction participants, and the consistency guarantee of the transactions in the cross-field is provided by the distributed transaction platform of the production environment. As more and more transaction participants participate in the exercise, the transaction consistency capability during the disaster recovery exercise is still supported by the transaction platform of the production environment, and the purpose of the transaction platform exercise cannot be achieved. How to bear the transaction consistency supporting capability during the exercise by the disaster recovery environment distributed transaction platform and solve the cross-domain transaction consistency during the exercise transition is the problem facing the solution at present.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a transaction consistency capability promotion method, apparatus, device, medium, and program product capable of solving cross-domain transaction consistency problems.
According to a first aspect of the present disclosure, there is provided a transaction consistency capability promotion method, including: configuring a distributed transaction platform, wherein the distributed transaction platform comprises a transaction receiving module and a transaction coordination module; responding to a request instruction initiated by a transaction participant to a transaction receiving module in the environment, and receiving the request instruction and analyzing the request instruction by the transaction receiving module to obtain the environment information of the main transaction corresponding to the transaction participant; based on the environment information of the main transaction, a transaction receiving module in the environment forwards a request instruction to a corresponding transaction coordination module in the environment information of the main transaction; and responding to the corresponding transaction coordination module under the environment information of the main transaction to receive the request instruction, generating a main transaction record according to the request instruction, and coordinating the consistency of the transaction.
According to an embodiment of the present disclosure, the environmental information includes disaster recovery environments and production environments; based on the environmental information of the main transaction, the transaction receiving module in the present environment forwards the request instruction to the corresponding transaction coordination module in the environmental information of the main transaction, which comprises: responding to the environment information of the main transaction as a disaster recovery environment, and forwarding a request instruction to a corresponding transaction coordination module in the disaster recovery environment by a transaction receiving module in the environment; and responding to the environment information of the main transaction to which the environment information belongs to produce the environment, and forwarding the request instruction to a corresponding transaction coordination module in the produce environment by a transaction receiving module in the environment.
According to an embodiment of the present disclosure, in response to a corresponding transaction coordination module receiving a request instruction under environment information to which a master transaction belongs, generating a master transaction record according to the request instruction, coordinating consistency of the current transaction includes: responding to a request instruction received by a corresponding transaction coordination module under the environment information of the main transaction, and generating a main transaction ID, a transaction participant list and a transaction state according to the request instruction; monitoring a main transaction ID, a transaction participant list and a transaction state in real time; and coordinating the submission or rollback of the transaction according to the monitoring result.
According to an embodiment of the present disclosure, the method further comprises: respectively acquiring a first value of a request instruction initiated by a transaction participant in a disaster recovery environment and a second value of the request instruction initiated by the transaction participant in a production environment; and in response to the difference between the first value and the second value being greater than a preset threshold, the transaction coordination module in the disaster recovery environment is responsible for coordinating the consistency of the transaction.
According to an embodiment of the present disclosure, configuring a distributed transaction platform includes: the distributed transaction platform is split into a transaction receiving module and a transaction coordination module, wherein the transaction receiving module is only used for receiving and forwarding a request instruction initiated by a transaction participant, and the transaction coordination module is used for executing coordination work of the transaction according to the request instruction.
According to an embodiment of the present disclosure, the method further comprises: a load balancing strategy is configured, wherein the load balancing strategy is used for adjusting load balancing among transaction coordination modules under different environment information; in response to load imbalance between transaction coordination modules, resources are adjusted in time to maintain load balancing between the transaction coordination modules.
A second aspect of the present disclosure provides a transaction consistent capability promotion device, including: the configuration module is used for configuring a distributed transaction platform, wherein the distributed transaction platform comprises a transaction receiving module and a transaction coordination module; the receiving module is used for responding to the request instruction initiated by the transaction participant to the transaction receiving module in the environment, and the transaction receiving module receives the request instruction and analyzes the request instruction to obtain the environment information of the main transaction corresponding to the transaction participant; the forwarding module is used for forwarding the request instruction to the corresponding transaction coordination module under the environment information of the main transaction based on the environment information of the main transaction; and the coordination module is used for responding to the corresponding transaction coordination module under the environment information of the main transaction to receive the request instruction, generating a main transaction record according to the request instruction, and coordinating the consistency of the transaction.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the transaction consistent performance enhancing method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described transaction consistent performance enhancing method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the transaction consistent performance boost described above.
According to the transaction consistency capability improving method, device, equipment, medium and program product, the distributed transaction platform is split into the transaction receiving module and the transaction coordination module, the transaction receiving module is only used for receiving and forwarding the request instruction initiated by the transaction participant, the transaction coordination module is used for executing the coordination work of the transaction, the transaction participant only needs to send the request instruction to the transaction receiving module in the environment, the transaction receiving module in the environment is used for forwarding the request instruction to the transaction coordination module in the appointed environment, and the transaction participant only needs to access the distributed transaction platform in the environment, so that the risk of cross-domain access is reduced, in addition, all the transaction request instructions are routed to the transaction coordination module in the environment where the main transaction is located according to the principle of centralized coordination of the main transaction, and the transaction coordination module is uniformly responsible for coordinating the transaction consistency of the transaction, so that the problem of cross-domain transaction consistency during transition is effectively solved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a transaction consistent performance capability promotion method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a transaction consistent performance enhancement method in accordance with an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flowchart of forwarding a request instruction according to context information to which a master transaction belongs in a transaction consistency capability promotion method according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram of generating a master transaction record from a request instruction in a transaction consistency capability promotion method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flowchart for implementing unified coordination of transaction consistency by a disaster recovery environment in a transaction consistency capability promotion method according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a schematic diagram of a disaster recovery environment interacting with a production environment in a transaction consistency capability promotion method according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a schematic diagram of a master transaction coordinating transaction coherency in a disaster backup environment in a transaction coherency capability promotion method according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a schematic diagram of a master transaction coordinating transaction coherency in a production environment in a transaction coherency capability promotion method according to an embodiment of the present disclosure;
FIG. 9 schematically illustrates a block diagram of a transaction consistent performance enhancing apparatus in accordance with an embodiment of the present disclosure;
fig. 10 schematically illustrates a block diagram of an electronic device adapted for a transaction consistent performance enhancement method in accordance with an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a convention should be interpreted in accordance with the meaning of one of skill in the art having generally understood the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
It should be noted that, the method and the device for improving the transaction consistency capability of the present disclosure may be used for improving the transaction consistency capability in the financial field, and may also be used for improving the transaction consistency capability in any field other than the financial field, and the application field of the method and the device for improving the transaction consistency capability of the present disclosure is not limited.
In the technical scheme of the invention, the related user information (including but not limited to user personal information, user image information, user equipment information, such as position information and the like) and data (including but not limited to data for analysis, stored data, displayed data and the like) are information and data authorized by a user or fully authorized by all parties, and the related data are collected, stored, used, processed, transmitted, provided, disclosed, applied and the like, all comply with related laws and regulations and standards, necessary security measures are adopted, no prejudice to the public order is provided, and corresponding operation entries are provided for the user to select authorization or rejection.
In the scenario of using personal information to make an automated decision, the method, the device and the system provided by the embodiment of the invention provide corresponding operation inlets for users, so that the users can choose to agree or reject the automated decision result; if the user selects refusal, the expert decision flow is entered. The expression "automated decision" here refers to an activity of automatically analyzing, assessing the behavioral habits, hobbies or economic, health, credit status of an individual, etc. by means of a computer program, and making a decision. The expression "expert decision" here refers to an activity of making a decision by a person who is specializing in a certain field of work, has specialized experience, knowledge and skills and reaches a certain level of expertise.
The embodiment of the disclosure provides a transaction consistency capability improving method, which comprises the following steps: configuring a distributed transaction platform, wherein the distributed transaction platform comprises a transaction receiving module and a transaction coordination module; responding to a request instruction initiated by a transaction participant to a transaction receiving module in the environment, and receiving the request instruction and analyzing the request instruction by the transaction receiving module to obtain the environment information of the main transaction corresponding to the transaction participant; based on the environment information of the main transaction, a transaction receiving module in the environment forwards a request instruction to a corresponding transaction coordination module in the environment information of the main transaction; and responding to the corresponding transaction coordination module under the environment information of the main transaction to receive the request instruction, generating a main transaction record according to the request instruction, and coordinating the consistency of the transaction.
According to the transaction consistency capability improving method, the distributed transaction platform is split into the transaction receiving module and the transaction coordination module, the transaction receiving module is only used for receiving and forwarding the request instruction initiated by the transaction participant, the transaction coordination module is used for executing the coordination work of the transaction, the transaction participant only needs to send the request instruction to the transaction receiving module in the environment, and the transaction receiving module in the environment forwards the request instruction to the transaction coordination module in the appointed environment.
Keyword introduction:
Production environment (Production Environment): a production environment refers to an environment for formal operation and provision of services, typically a core environment for business operations in a company or organization. In a production environment, various applications, services, and systems are in a steady state of operation and provide services to end users. Stability, reliability and performance of the production environment are often very important, as any failure may lead to a disruption or loss of service.
Disaster recovery environment (Disaster Recovery Environment): the disaster recovery environment is a backup environment provided for coping with a disaster event (such as a natural disaster, a hardware failure, a human error, etc.) occurring in the production environment. In a disaster recovery environment, hardware, software, and data backups are typically deployed that are the same or similar to the production environment in order to quickly restore business when the production environment is not available. The main aim of the disaster recovery environment is to reduce the service interruption time to the greatest extent and ensure that the service can be restored to the normal running state as soon as possible after the disaster occurs.
Under the disaster recovery drilling scene, drilling application is in disaster recovery environment, other transaction participants are still in production environment, and for the distributed transactions in the two fields of cross-production and disaster recovery, as fewer transaction participants participate in drilling at the early stage of drilling, the distributed transaction service of the production environment can be subscribed by the drilling transaction participants, and the consistency guarantee of the transactions in the cross-field is provided by the distributed transaction platform of the production environment. As more and more transaction participants participate in the exercise, the transaction consistency capability during the disaster recovery exercise is still supported by the transaction platform of the production environment, and the purpose of the transaction platform exercise cannot be achieved. Based on this, the present disclosure provides a transaction consistency capability promotion method, apparatus, device, medium, and program product capable of solving cross-domain transaction consistency problems.
Fig. 1 schematically illustrates an application scenario diagram of a transaction consistent performance capability promotion method according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the transaction consistency capability promotion method provided by the embodiments of the present disclosure may be generally executed by the server 105. Accordingly, the transaction consistency capability promotion device provided by the embodiments of the present disclosure may be generally disposed in the server 105. The transaction consistency capability promotion method provided by the embodiments of the present disclosure may also be performed by a server or server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the transaction consistency improving apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The system high availability capability promotion method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 8 based on the scenario described in fig. 1.
FIG. 2 schematically illustrates a flow chart of a transaction consistent performance enhancing method in accordance with an embodiment of the present disclosure.
As shown in fig. 2, the transaction consistency capability promotion method of the embodiment includes operations S210 to S240, and the transaction consistency capability promotion method may be executed by a server.
In operation S210, a distributed transaction platform is configured, wherein the distributed transaction platform includes a transaction receiving module and a transaction reconciliation module.
In a distributed scenario, a distributed transaction generally has a plurality of transaction participants, and in order to solve the problem of consistency of the distributed transaction in the scenario, a distributed transaction platform generally coordinates submission or rollback of all the transaction participants uniformly, so as to ensure the consistency of all the transaction participants.
In this embodiment, the distributed transaction platform is split into the transaction receiving module and the transaction coordination module, where the transaction receiving module is only used to receive and forward the request instruction initiated by the transaction participant, the transaction coordination module performs coordination work of the transaction, the transaction participant only needs to send the request instruction to the transaction receiving module in the present environment, and the transaction receiving module in the present environment forwards the request instruction to the transaction coordination module in the specified environment.
In operation S220, in response to the transaction participant initiating a request instruction to the transaction receiving module in the present environment, the transaction receiving module receives the request instruction and parses the request instruction to obtain the environment information of the main transaction corresponding to the transaction participant.
In this embodiment, when a transaction participant initiates a request instruction to a transaction receiving module in the present environment, the transaction receiving module receives the request instruction and determines the environment information to which the main transaction belongs.
In operation S230, based on the environmental information to which the master transaction belongs, the transaction receiving module in the present environment forwards the request instruction to the corresponding transaction coordination module in the environmental information to which the master transaction belongs.
In this embodiment, according to the environmental information to which the master transaction belongs, the transaction receiving module in the present environment forwards the request instruction to the corresponding transaction coordination module in the environmental information to which the master transaction belongs.
In operation S240, in response to the corresponding transaction coordination module receiving the request instruction under the environment information to which the main transaction belongs, a main transaction record is generated according to the request instruction, and the consistency of the present transaction is coordinated.
In this embodiment, after receiving the request instruction, the corresponding transaction coordination module generates a master transaction record according to the request instruction, and coordinates the consistency of the transaction.
According to the transaction consistency capability improving method, the distributed transaction platform is split into the transaction receiving module and the transaction coordination module, the transaction receiving module is only used for receiving and forwarding the request instruction initiated by the transaction participant, the transaction coordination module is used for executing the coordination work of the transaction, the transaction participant only needs to send the request instruction to the transaction receiving module in the environment, and the transaction receiving module in the environment forwards the request instruction to the transaction coordination module in the appointed environment.
Fig. 3 schematically illustrates a flowchart of forwarding a request instruction according to context information to which a master transaction belongs in a transaction consistency capability promotion method according to an embodiment of the present disclosure.
As shown in fig. 3, the transaction consistency capability promotion method of this embodiment includes operations S310 to S320.
In this embodiment, the environment information includes disaster recovery environment and production environment.
In operation S310, in response to the environment information of the primary transaction being the disaster recovery environment, the transaction receiving module in the present environment forwards the request instruction to the corresponding transaction coordination module in the disaster recovery environment.
In operation S320, in response to the environment information of the master transaction, the transaction receiving module in the present environment forwards the request instruction to the corresponding transaction coordination module in the production environment.
In this embodiment, if the environment to which the main transaction belongs is a disaster-backup environment, when a transaction participant initiates a request instruction, the exercise transaction participant in the disaster-backup environment sends the request instruction to a transaction receiving module in the disaster-backup environment, after receiving the request instruction, the transaction receiving module in the local environment (disaster-backup environment) forwards the request instruction to a transaction coordination module in the disaster-backup environment, and meanwhile, other transaction participants in the production environment send the request instruction to a transaction receiving module in the production environment, and after receiving the request instruction, the transaction receiving module in the local environment (production environment) forwards the request instruction to a transaction coordination module in the disaster-backup environment, that is, because the main transaction is in the disaster-backup environment, the transaction receiving module in the disaster-backup environment and the transaction receiving module in the production environment both send the request instruction to the transaction coordination module in the disaster-backup environment, and the transaction coordination module in the disaster-backup environment are responsible for the transaction consistency of the present transaction.
In this embodiment, if the environment to which the main transaction belongs is a production environment, when the transaction participant initiates a request instruction, the exercise transaction participant in the disaster recovery environment sends the request instruction to the transaction receiving module in the disaster recovery environment, after receiving the request instruction, the transaction receiving module in the disaster recovery environment forwards the request instruction to the transaction coordination module in the production environment, meanwhile, other transaction participants in the production environment send the request instruction to the transaction receiving module in the production environment, and after receiving the request instruction, the transaction receiving module in the production environment forwards the request instruction to the transaction coordination module in the production environment, that is, because the main transaction is in the production environment, the transaction receiving module in the disaster recovery environment and the transaction receiving module in the production environment both send the request instruction to the transaction coordination module in the production environment, and the transaction coordination module in the production environment is responsible for the transaction consistency of the present time.
According to the embodiment of the disclosure, all transaction request instructions are routed to the transaction coordination module in the environment of the main transaction place according to the principle of centralized coordination of the main transaction, and the transaction coordination module is uniformly responsible for coordinating the transaction consistency of the transaction, so that the problem of cross-domain transaction consistency during transition is effectively solved.
FIG. 4 schematically illustrates a flow diagram for generating a master transaction record from a request instruction in a transaction consistency capability promotion method according to an embodiment of the present disclosure.
As shown in fig. 4, the transaction consistency capability promotion method of this embodiment includes operations S410 to S430.
In operation S410, in response to the corresponding transaction coordination module receiving the request instruction under the environment information to which the master transaction belongs, the master transaction ID, the transaction participant list, and the transaction state are generated according to the request instruction.
In operation S420, the master transaction ID, the transaction participant list, and the transaction status are monitored in real time.
In operation S430, the commit or rollback of the present transaction is coordinated according to the monitoring result.
In this embodiment, after a corresponding transaction coordination module receives a request instruction under environment information to which a main transaction belongs, a main transaction ID, a transaction participant list and a transaction state are generated according to the request instruction, then the main transaction ID, the transaction participant list and the transaction state are monitored in real time, and the current transaction is coordinated to be submitted or rolled back according to a monitoring result.
For example, for a trans-bank transfer transaction, which involves transferring an amount of money from one bank account to another, the transfer involves two banking systems, each of which is a transaction participant, and when the request is forwarded to the transaction coordination module, the transaction coordination module creates a master transaction record containing the unique ID of the transfer transaction, the two banking systems as transaction participant, the status of the transaction, etc.
The master transaction record is recorded in the transaction coordination module for subsequent tracking and monitoring. The transaction coordination module sends transfer requests to the two banking systems, information of the master transaction records is transmitted to the two banking systems, each banking system executes transfer operation, operation results are returned to the transaction coordination module, the transaction coordination module decides whether to submit or roll back the distributed transaction according to the received results, if the two banking systems successfully execute the transfer operation, the transaction coordination module submits the transaction, otherwise, rolls back the transaction.
According to embodiments of the present disclosure, the master transaction record created by the transaction coordination module plays an important role in tracking and managing the execution of the entire transfer transaction and ensuring the consistency and reliability of the transaction.
FIG. 5 schematically illustrates a flowchart for implementing unified coordination of transaction consistency by a disaster recovery environment in a transaction consistency capability promotion method according to an embodiment of the present disclosure.
As shown in fig. 5, the transaction consistency capability promotion method of this embodiment includes operations S510 to S520.
In operation S510, a first value of a request instruction initiated by a transaction participant in the disaster recovery environment and a second value of the request instruction initiated by the transaction participant in the production environment are obtained, respectively.
In operation S520, in response to the difference between the first value and the second value being greater than the preset threshold, the transaction coordination module in the disaster recovery environment is responsible for coordinating the consistency of the transaction.
In this embodiment, the number of transaction participants (exercise transaction participants) in the disaster-backup environment and the number of transaction participants (other transaction participants) in the production environment are counted respectively, where the number corresponds to the number of times of request instructions initiated by the transaction participants, and when the number of transaction participants involved in the exercise, that is, the exercise participants, is increased, the transaction coordination module in the disaster-backup environment provides the transaction consistency supporting capability during the exercise, so as to achieve the purpose of the disaster-backup exercise.
FIG. 6 schematically illustrates a schematic diagram of a disaster recovery environment interacting with a production environment in a transaction consistency capability promotion method according to an embodiment of the present disclosure.
As shown in fig. 6, the principle of interaction between the disaster recovery environment and the production environment in the transaction consistency capability promotion method of this embodiment is as follows:
The distributed transaction platform in the disaster recovery environment can register and subscribe the service of the disaster recovery environment, and can subscribe the service of the production environment, and the distributed transaction platform in the production environment can register and subscribe the service of the disaster recovery environment besides the service of the production environment, so that the distributed transaction platforms in the disaster recovery environment and the production environment can visit each other, and the transaction participants only need to register and subscribe the service in the environment.
In this embodiment, the distributed transaction platform may be split into a transaction receiving module and a transaction coordination module, where the transaction receiving module is only used to receive and forward a request instruction initiated by a transaction participant, and the transaction coordination module is used to execute coordination work of a transaction according to the request instruction.
Fig. 7 schematically illustrates a schematic diagram of a master transaction coordinating transaction consistency in a disaster backup environment in a transaction consistency capability promotion method according to an embodiment of the present disclosure.
As shown in fig. 7, the master transaction in this embodiment is an exercise transaction participant.
In this embodiment, the environment to which the main transaction belongs is a disaster-backup environment, when a transaction participant initiates a request instruction, the exercise transaction participant in the disaster-backup environment sends the request instruction to a transaction receiving module in the disaster-backup environment, after receiving the request instruction, the transaction receiving module in the local environment (disaster-backup environment) forwards the request instruction to a transaction coordination module in the disaster-backup environment, meanwhile, other transaction participants in the production environment send the request instruction to a transaction receiving module in the production environment, and after receiving the request instruction, the transaction receiving module in the local environment (production environment) forwards the request instruction to a transaction coordination module in the disaster-backup environment, that is, because the main transaction is in the disaster-backup environment, the transaction receiving module in the disaster-backup environment and the transaction receiving module in the production environment both send the request instruction to the transaction coordination module in the disaster-backup environment, and the transaction coordination module in the disaster-backup environment are responsible for the transaction consistency of the transaction.
FIG. 8 schematically illustrates a schematic diagram of a master transaction coordinating transaction coherency in a production environment in a transaction coherency capability promotion method according to an embodiment of the present disclosure.
As shown in fig. 8, the master transaction is the other transaction participant in this embodiment.
In this embodiment, the environment to which the main transaction belongs is a production environment, when the transaction participant initiates a request instruction, the exercise transaction participant in the disaster recovery environment sends the request instruction to the transaction receiving module in the disaster recovery environment, the transaction receiving module in the disaster recovery environment (disaster recovery environment) receives the request instruction and forwards the request instruction to the transaction coordination module in the production environment, meanwhile, other transaction participants in the production environment send the request instruction to the transaction receiving module in the production environment, and the transaction receiving module in the production environment (production environment) forwards the request instruction to the transaction coordination module in the production environment after receiving the request instruction, that is, because the main transaction is in the production environment, the transaction receiving module in the disaster recovery environment and the transaction receiving module in the production environment both send the request instruction to the transaction coordination module in the production environment, and the transaction coordination module in the production environment is responsible for the transaction consistency of the present time.
The transaction consistency capability improving method of the embodiment of the disclosure further comprises the following steps:
and configuring a load balancing strategy, wherein the load balancing strategy is used for adjusting load balancing among the transaction coordination modules under different environment information.
In response to load imbalance between transaction coordination modules, resources are adjusted in time to maintain load balancing between the transaction coordination modules.
According to the embodiment of the disclosure, when the system operation is unstable due to the occurrence of load unbalance between the transaction coordination modules, the load balancing strategy can timely adjust resources to maintain the load balancing between the transaction coordination modules, so that the stable operation of the system is maintained.
Fig. 9 schematically illustrates a block diagram of a transaction consistent performance enhancing apparatus in accordance with an embodiment of the present disclosure.
As shown in fig. 9, the system defensive capacity improving apparatus 900 of this embodiment includes a configured block 910, a receiving module 920, a forwarding module 930, and a coordinating module 940.
The configuration module 910 is configured to configure a distributed transaction platform, where the distributed transaction platform includes a transaction receiving module and a transaction reconciliation module. In an embodiment, the configuration module 910 may be configured to perform the operation S210 described above, which is not described herein.
The receiving module 920 is configured to respond to a request instruction initiated by a transaction participant to a transaction receiving module in the present environment, where the transaction receiving module receives the request instruction and parses the request instruction to obtain environment information corresponding to a main transaction of the transaction participant. In an embodiment, the receiving module 920 may be configured to perform the operation S220 described above, which is not described herein.
The forwarding module 930 is configured to forward, based on the environmental information to which the master transaction belongs, the request instruction to a corresponding transaction coordination module under the environmental information to which the master transaction belongs by using the transaction receiving module under the present environment. In an embodiment, the forwarding module 930 may be configured to perform the operation S230 described above, which is not described herein.
The coordination module 940 is configured to, in response to receiving a request instruction by a transaction coordination module corresponding to the environment information to which the master transaction belongs, generate a master transaction record according to the request instruction, and coordinate the consistency of the current transaction. In an embodiment, the coordination module 940 may be configured to perform the operation S240 described above, which is not described herein.
According to the transaction consistency capability lifting device, the distributed transaction platform is split into the transaction receiving module and the transaction coordination module, the transaction receiving module is only used for receiving and forwarding the request instruction initiated by the transaction participant, the transaction coordination module is used for executing the coordination work of the transaction, the transaction participant only needs to send the request instruction to the transaction receiving module in the environment, and the transaction receiving module in the environment forwards the request instruction to the transaction coordination module in the appointed environment.
Any of the plurality of modules in the configuration block 910, the receiving module 920, the forwarding module 930, and the coordination module 940 may be combined into one module to be implemented, or any of the plurality of modules may be split into a plurality of modules according to embodiments of the present disclosure. Or at least some of the functionality of one or more of the modules may be combined with, and implemented in, at least some of the functionality of other modules. At least one of the configuration block 910, the receiving module 920, the forwarding module 930, and the coordination module 940 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable way of integrating or packaging the circuitry, or in any one of, or in any suitable combination of, software, hardware, and firmware. Or at least one of the configuration block 910, the receiving module 920, the forwarding module 930, and the coordination module 940 may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
Fig. 10 schematically illustrates a block diagram of an electronic device adapted for a transaction consistent performance enhancement method in accordance with an embodiment of the present disclosure.
As shown in fig. 10, the electronic device 110 according to the embodiment of the present disclosure includes a processor 111 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 112 or a program loaded from a storage section 118 into a Random Access Memory (RAM) 113. Processor 111 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 111 may also include on-board memory for caching purposes. Processor 111 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 113, various programs and data required for the operation of the electronic device 110 are stored. The processor 111, the ROM 112, and the RAM 113 are connected to each other through a bus 114. The processor 111 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 112 and/or the RAM 113. Note that the program may be stored in one or more memories other than the ROM 112 and the RAM 113. The processor 111 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
According to embodiments of the present disclosure, the electronic device 110 may also include an input/output (I/O) interface 115, the input/output (I/O) interface 115 also being connected to the bus 114. The electronic device 110 may also include one or more of the following components connected to the I/O interface 115: an input section 116 including a keyboard, a mouse, and the like; an output portion 117 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 118 including a hard disk or the like; and a communication section 119 including a network interface card such as a LAN card, a modem, and the like. The communication section 119 performs communication processing via a network such as the internet. The drive 120 is also connected to the I/O interface 115 as needed. A removable medium 121 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 120 so that a computer program read out therefrom is installed as needed into the storage section 118.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 112 and/or RAM 113 described above and/or one or more memories other than ROM 112 and RAM 113.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to perform the methods provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 111. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication part 119, and/or from the removable medium 121. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 119, and/or installed from the removable medium 121. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 111. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. These examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (10)

1. A transaction consistent performance enhancement method, the method comprising:
configuring a distributed transaction platform, wherein the distributed transaction platform comprises a transaction receiving module and a transaction coordination module;
Responding to a request instruction initiated by a transaction participant to a transaction receiving module in the environment, wherein the transaction receiving module receives the request instruction and analyzes the request instruction to obtain the environment information of a main transaction corresponding to the transaction participant;
based on the environment information of the main transaction, a transaction receiving module in the environment forwards the request instruction to a corresponding transaction coordination module in the environment information of the main transaction;
And responding to the corresponding transaction coordination module under the environment information of the main transaction, receiving the request instruction, generating a main transaction record according to the request instruction, and coordinating the consistency of the transaction.
2. The transaction consistent capability promotion method of claim 1, wherein the environmental information includes disaster recovery environments and production environments;
The transaction receiving module in the present environment forwards the request instruction to a corresponding transaction coordination module in the environment information of the main transaction, based on the environment information of the main transaction, including:
responding to the environment information of the main transaction as a disaster recovery environment, and forwarding the request instruction to a corresponding transaction coordination module in the disaster recovery environment by a transaction receiving module in the environment;
and responding to the environment information of the main transaction to which the environment information belongs to produce the environment, and forwarding the request instruction to a corresponding transaction coordination module in the produce environment by a transaction receiving module in the environment.
3. The method for improving the consistency capability of a transaction according to claim 2, wherein the responding to the request command received by the corresponding transaction coordination module under the environment information to which the main transaction belongs, generating a main transaction record according to the request command, and coordinating the consistency of the present transaction comprises:
Responding to the request instruction received by a corresponding transaction coordination module under the environment information of the main transaction, and generating a main transaction ID, a transaction participant list and a transaction state according to the request instruction;
monitoring the master transaction ID, the transaction participant list and the transaction state in real time;
And coordinating the submission or rollback of the transaction according to the monitoring result.
4. The transaction consistent capability promotion method of claim 2, further comprising:
Respectively acquiring a first value of a request instruction initiated by a transaction participant in the disaster recovery environment and a second value of the request instruction initiated by the transaction participant in the production environment;
and in response to the difference between the first value and the second value being greater than a preset threshold, a transaction coordination module in the disaster recovery environment is responsible for coordinating the consistency of the transaction.
5. The transaction consistent capability promotion method of claim 1, wherein the configuration distributed transaction platform comprises:
The distributed transaction platform is split into a transaction receiving module and a transaction coordination module, wherein the transaction receiving module is only used for receiving and forwarding a request instruction initiated by the transaction participant, and the transaction coordination module is used for executing coordination work of the transaction according to the request instruction.
6. The transaction consistent capability promotion method of claim 1, further comprising:
Configuring a load balancing strategy, wherein the load balancing strategy is used for adjusting load balancing among the transaction coordination modules under different environment information;
and in response to the load unbalance among the transaction coordination modules, timely adjusting resources to maintain load balance among the transaction coordination modules.
7. A transaction consistent capability promotion device, the device comprising:
The configuration module is used for configuring a distributed transaction platform, wherein the distributed transaction platform comprises a transaction receiving module and a transaction coordination module;
The receiving module is used for responding to a request instruction initiated by a transaction participant to a transaction receiving module in the environment, and the transaction receiving module receives the request instruction and analyzes the request instruction to obtain the environment information of the main transaction corresponding to the transaction participant;
The forwarding module is used for forwarding the request instruction to a corresponding transaction coordination module under the environment information of the main transaction based on the environment information of the main transaction;
and the coordination module is used for responding to the corresponding transaction coordination module under the environment information of the main transaction to receive the request instruction, generating a main transaction record according to the request instruction and coordinating the consistency of the transaction.
8. An electronic device, comprising:
One or more processors;
Storage means for storing one or more computer programs,
Characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program/instruction is stored, characterized in that the computer program/instruction, when executed by a processor, implements the steps of the method according to any one of claims 1-6.
10. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.
CN202410446217.9A 2024-04-12 Transaction consistent capability promotion method, apparatus, device, medium and program product Pending CN118331690A (en)

Publications (1)

Publication Number Publication Date
CN118331690A true CN118331690A (en) 2024-07-12

Family

ID=

Similar Documents

Publication Publication Date Title
KR102510195B1 (en) Transaction Processing Methods, Devices and Appliances, and Computer Storage Media
US10387536B2 (en) Computerized data-aware agent systems for retrieving data to serve a dialog between human user and computerized system
AU2018298059A1 (en) Data reconciliation based on computer analysis of data
CN112184411B (en) Account processing method and device
CN112559300A (en) Fault reason determining system, method and device
WO2023165271A1 (en) Knowledge graph construction and graph calculation
CN116166390A (en) Service processing method and device, electronic equipment and storage medium
CN115277855A (en) Request processing method and device, electronic equipment and storage medium
CN113205320A (en) Service processing method and device, electronic equipment and computer readable medium
CN116302561A (en) State control method, device, equipment and storage medium for application instance
CN114331446B (en) Method, device, equipment and medium for realizing out-of-chain service of block chain
CN118331690A (en) Transaction consistent capability promotion method, apparatus, device, medium and program product
CN115361339A (en) Flow control method and device, electronic equipment and storage medium
CN115080449A (en) Test method, device, equipment, medium and program product
CN114004701A (en) Method and device for generating transaction result, electronic equipment and storage medium
CN114006907A (en) Service degradation method and device for distributed server, electronic equipment and medium
CN116503005A (en) Method, device, system and storage medium for dynamically modifying flow
CN113971007B (en) Information processing method, device, electronic equipment and medium
CN115484149B (en) Network switching method, network switching device, electronic equipment and storage medium
KR102502364B1 (en) System and method for processing financial transactions
CN110430263B (en) Value added service processing system and method
US20220366425A1 (en) Service management system for processing a request
US20240223509A1 (en) System and method for ensuring continuity of proxy-based service
US20240144277A1 (en) Graph Computing for Electronic Communication Risk Detection
CN116362731A (en) Service processing method, device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication