A cross-container data access layer transaction management system

Through the cross-container data access layer transaction management system, using the container instance connection platform and the data access layer compatibility platform, cross-container instance dependency injection and data consistency are achieved, and the problem of financial system expansion and container instance interconnection is solved. Improved system flexibility and adaptability.

CN118467111BActive Publication Date: 2024-09-20江西裕民银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410925498.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-20
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

In the existing technology, financial systems are limited by the technical framework and data access layer solutions of specific manufacturers, making it difficult to expand or integrate new functions and technologies. Moreover, the instance management mechanisms and communication protocols of different container frameworks lead to differences between container instances. It is difficult to achieve interconnection.

Method used

Provides a cross-container data access layer transaction management system that implements cross-container instance dependency injection capabilities through the container instance connection platform. The data access layer compatibility platform ensures compatibility and includes an instance proxy module, a dependency injection module, and a pre-injection management module. , data source proxy module, transaction manager module and transaction object module, using object proxy technology and standardized interfaces to achieve cross-container data access and transaction management.

Benefits of technology

It improves the flexibility, scalability and robustness of the system, reduces the difficulty of system integration and migration, ensures data consistency and adaptability in cross-container environments, and solves the problem of the system being difficult to expand or integrate new functions and technologies. problem, realizing the interconnection between container instances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118467111B
    Figure CN118467111B
Patent Text Reader

Abstract

The invention relates to the field of computers, and specifically discloses a cross-container data access layer transaction management system, comprising: a container instance docking platform, which is used to realize the dependency injection capability across container instances; a data access layer compatible platform, which ensures the compatibility of the data access layer and allows different suites across containers to be nested and used; the container instance docking platform comprises: an instance proxy module, which intercepts an execution method through an object proxy technology; the invention can support dependency injection across different container instances through the container instance docking platform, which improves the flexibility and scalability of the system; the instance proxy module uses the object proxy technology to dynamically manage the container instance at runtime, and can automatically adjust when encountering permission problems, thereby enhancing the robustness of the system; the data access layer compatible platform ensures that the data access layers of different suites in a cross-container environment can be nested and used, which reduces the difficulty of system integration and migration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computers, and in particular to a cross-container data access layer transaction management system. Background Art

[0002] With the development of computer technology, there is a lot of room for improvement and expansion in the ecology, capabilities, and usability of application containers. Currently, most financial systems are provided with architecture technology by manufacturers, which is relatively closed and not conducive to the exploration and application of new technologies, bringing great maintenance costs.

[0003] In some cases, the system may be limited to the technical framework or data access layer solution of a specific vendor, which may make it difficult to expand the system or integrate new functions and technologies; different container frameworks may use different instance management mechanisms and communication protocols, making it difficult to achieve interconnection between container instances. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a cross-container data access layer transaction management system to solve the problems in the prior art that the system is difficult to expand or integrate new functions and technologies.

[0005] A cross-container data access layer transaction management system includes: a container instance docking platform for realizing dependency injection capability across container instances; a data access layer compatibility platform for ensuring the compatibility of the data access layer and allowing different suites across containers to be nested and used; the container instance docking platform includes: an instance proxy module for intercepting execution methods through object proxy technology, calling corresponding container instance management at runtime, and modifying access permissions through a security manager when encountering insufficient access permissions; a dependency injection module for supporting declarative and programmatic injection and completing instance injection during the container instance management life cycle; a pre-injection management module for solving the problem that a later-started container cannot obtain an instance of a first-started container, and through pre-injection instance management, the pre-injected instance is added to the container instance management life cycle before the later-started container is instantiated.

[0006] Preferably, the data access layer compatible platform includes:

[0007] The data source proxy module encapsulates the original data source through object proxy technology and supports multi-database operations according to sharding rules;

[0008] The transaction manager module manages cross-container local transaction objects, including obtaining transaction objects, transaction committing, and transaction rollback;

[0009] The transaction object module provides specific capabilities for cross-container transactions, including obtaining connections, transaction committing, and transaction rollback.

[0010] Preferably, the container instance docking platform includes an application service module, which serves as an intermediate service layer and is used to provide data interaction, coordination and management services between the application service and the container instance. The application service module performs the following steps:

[0011] Create and manage A container;

[0012] Container A communicates with container B through the bridge platform;

[0013] When container A starts, a container instance is created and injected into container B through the instance bridging step;

[0014] Monitor the instantiation process of container B, including generating dynamic proxies and dependent instances;

[0015] After the instantiation of container B is completed, the step of pre-injecting container A instance into container B is performed, and when container B is started later, the pre-injected instance is queried and instance generation and injection of dependent instances are completed.

[0016] Preferably, the container instance docking platform and the data access layer compatibility platform achieve cross-container interaction and data access layer compatibility through standardized interfaces.

[0017] Preferably, the cross-container local transaction management process includes the following steps:

[0018] When container A starts, it communicates with container B through the data access layer, interacts with the data source agent and synchronizes the database connection;

[0019] Inside container A, the transaction manager module is activated to manage the transaction objects in container A;

[0020] After container A completes its data operations, it updates the context through the transaction object and propagates the updated context to container B;

[0021] After receiving the updated context, container B synchronizes its database connection and updates its context internally.

[0022] Container B propagates the updated context to container A again through the data access layer to ensure data consistency between the two parties;

[0023] When all transaction operations are completed, container A closes its transaction object, indicating that the entire cross-container local transaction management process is completed;

[0024] The degree of data consistency assurance in the cross-container local transaction management process can be expressed by the following mathematical formula:

[0025] ;

[0026] in, Indicates the degree of data consistency assurance. Indicates the number of updates that were successfully synchronized. Indicates the total number of updates;

[0027] The number of successfully synchronized updates indicates the number of updates that are successfully synchronized to all related containers during the cross-container local transaction management process, and the total number of updates indicates the total number of updates generated during the cross-container local transaction management process.

[0028] Preferably, the instance proxy module further includes:

[0029] An access permission checking unit, used to check access permissions when intercepting execution methods;

[0030] The security manager unit is used to modify access permissions when access permissions are insufficient.

[0031] Preferably, the data source proxy module further includes:

[0032] A data source encapsulation unit, used to encapsulate the original data source;

[0033] The sharding rule support unit is used to support multi-database operations according to sharding rules.

[0034] Preferably, the transaction manager module further comprises:

[0035] A transaction object acquisition unit, used to acquire a cross-container local transaction object;

[0036] Transaction commit unit, used to manage the commit operations of cross-container local transactions;

[0037] The transaction rollback unit is used to manage the rollback operation of cross-container local transactions.

[0038] Preferably, the transaction object module further includes:

[0039] A connection acquisition unit is used to obtain a cross-container database connection;

[0040] A transaction commit unit, used to execute the commit operation of cross-container transactions;

[0041] The transaction rollback unit is used to perform the rollback operation of cross-container transactions.

[0042] Preferably, the container instance docking platform and the data access layer compatibility platform achieve cross-container interaction and data access layer compatibility through standardized interfaces.

[0043] Compared with the prior art, the present invention has the following beneficial effects: through the container instance docking platform, it is possible to support dependency injection across different container instances, which improves the flexibility and scalability of the system; the instance proxy module utilizes the object proxy technology to dynamically manage the container instance at runtime, and can automatically adjust when encountering permission problems, thereby enhancing the robustness of the system; the data access layer compatibility platform ensures that the data access layers of different suites in a cross-container environment can be nested and used, which reduces the difficulty of system integration and migration; the guarantee of compatibility enables the system to adapt more easily to different databases and storage solutions, improves the versatility and adaptability of the system, thereby solving the problem that the system is difficult to expand or integrate new functions and technologies, and at the same time solves the problem that it is difficult to achieve interconnection between container instances. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic diagram of the system of the present invention;

[0045] Figure 2 It is a schematic diagram of a container example docking platform of the present invention;

[0046] Figure 3 A schematic diagram of an application service module of the present invention;

[0047] Figure 4 A schematic diagram of a data access layer compatible platform of the present invention;

[0048] Figure 5 It is a schematic diagram of the cross-container local transaction management process of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] like Figure 1 As shown:

[0051] Embodiment 1: The present invention provides a cross-container data access layer transaction management system, including:

[0052] The container instance docking platform is used to implement dependency injection capabilities across container instances. The data access layer compatibility platform ensures the compatibility of the data access layer and allows the nested use of different suites across containers.

[0053] The container instance docking platform includes:

[0054] The instance proxy module intercepts the execution method through object proxy technology and calls the corresponding container instance management at runtime. When insufficient access rights are encountered, the access rights are modified through the security manager;

[0055] Dependency injection module, which supports declarative and programmatic injection and completes instance injection during the container instance management lifecycle;

[0056] The pre-injection management module is used to solve the problem that the later-started container cannot obtain the instance of the first-started container. Through pre-injection instance management, the pre-injected instance is added to the life cycle of container instance management before the later-started container is instantiated;

[0057] Among them, by establishing a container instance docking platform, dependency injection across container instances is achieved, ensuring that instances and data access can be effectively managed in complex container environments. The instance proxy module and dependency injection module dynamically adjust permissions and execution methods. The pre-injection management module solves the problem that the later-started container cannot obtain the first-started container instance. The data access layer compatibility platform ensures that different suites can be seamlessly integrated in a cross-container environment. The entire solution improves the flexibility, scalability and stability of the system, making the management of the cross-container data access layer more efficient and reliable. At the same time, the modular design makes the system easy to expand and maintain, providing a solid foundation for future system upgrades.

[0058] Specifically, the data access layer is compatible with the following platforms:

[0059] The data source proxy module encapsulates the original data source through object proxy technology and supports multi-database operations according to sharding rules;

[0060] The transaction manager module manages cross-container local transaction objects, including obtaining transaction objects, transaction committing, and transaction rollback;

[0061] The transaction object module provides specific capabilities for cross-container transactions, including obtaining connections, transaction committing, and transaction rollback.

[0062] Specifically, Figure 2 and Figure 3 As shown: The container instance docking platform includes an application service module. The application service module serves as an intermediate service layer and is used to provide data interaction, coordination, and management services between the application service and the container instance. The application service module performs the following steps:

[0063] Create and manage A container;

[0064] Container A communicates with container B through the bridge platform;

[0065] When container A starts, a container instance is created and injected into container B through the instance bridging step;

[0066] Monitor the instantiation process of container B, including generating dynamic proxies and dependent instances;

[0067] After the instantiation of container B is completed, the step of pre-injecting container A instance into container B is performed, and when container B is started later, the pre-injected instance is queried and instance generation and injection of dependent instances are completed.

[0068] Specifically, the container instance docking platform and the data access layer compatibility platform achieve cross-container interaction and data access layer compatibility through standardized interfaces.

[0069] From the above, we can see that efficient data access and management across containers are achieved through the data access layer compatible platform and the container instance docking platform. The data access layer compatible platform includes a data source proxy module, a transaction manager module, and a transaction object module, which supports multi-database operations and cross-container transaction management. The container instance docking platform provides data interaction, coordination, and management services through the application service module to achieve communication and instance injection between containers. The two platforms achieve cross-container interaction and data access layer compatibility through standardized interfaces, ensuring that the system can run stably and efficiently in different container environments.

[0070] Embodiment 2: This embodiment is basically the same as the previous embodiment, except that Figure 4 and Figure 5 As shown: The cross-container local transaction management process includes the following steps:

[0071] When container A starts, it communicates with container B through the data access layer, interacts with the data source agent and synchronizes the database connection;

[0072] Inside container A, the transaction manager module is activated to manage the transaction objects in container A;

[0073] After container A completes its data operations, it updates the context through the transaction object and propagates the updated context to container B;

[0074] After receiving the updated context, container B synchronizes its database connection and updates its context internally.

[0075] Container B propagates the updated context to container A again through the data access layer to ensure data consistency between the two parties;

[0076] When all transaction operations are completed, container A closes its transaction object, indicating that the entire cross-container local transaction management process is completed;

[0077] The degree of data consistency assurance in the cross-container local transaction management process can be expressed by the following mathematical formula:

[0078] ;

[0079] in, Indicates the degree of data consistency assurance. Indicates the number of updates that were successfully synchronized. Indicates the total number of updates;

[0080] The number of successfully synchronized updates indicates the number of updates that are successfully synchronized to all related containers during the cross-container local transaction management process, and the total number of updates indicates the total number of updates generated during the cross-container local transaction management process.

[0081] Specifically, the instance proxy module further includes:

[0082] An access permission checking unit, used to check access permissions when intercepting execution methods;

[0083] The security manager unit is used to modify access permissions when access permissions are insufficient.

[0084] Specifically, the data source proxy module further includes:

[0085] A data source encapsulation unit, used to encapsulate the original data source;

[0086] The sharding rule support unit is used to support multi-database operations according to sharding rules.

[0087] Specifically, the transaction manager module further includes:

[0088] A transaction object acquisition unit, used to acquire a cross-container local transaction object;

[0089] Transaction commit unit, used to manage the commit operations of cross-container local transactions;

[0090] The transaction rollback unit is used to manage the rollback operation of cross-container local transactions.

[0091] Specifically, the transaction object module further includes:

[0092] A connection acquisition unit is used to obtain a cross-container database connection;

[0093] A transaction commit unit, used to execute the commit operation of cross-container transactions;

[0094] The transaction rollback unit is used to perform the rollback operation of cross-container transactions.

[0095] Specifically, the container instance docking platform and the data access layer compatibility platform achieve cross-container interaction and data access layer compatibility through standardized interfaces.

[0096] As can be seen from the above, cross-container local transaction management realizes communication and data synchronization between containers A and B through the data access layer. Container A activates the transaction manager, manages internal transaction objects, updates the context after completing data operations and propagates it to container B. Container B synchronizes database connections, updates the context and transmits it back to container A to ensure data consistency; all data updates are synchronized through standardized interfaces to ensure smooth cross-container interaction. In addition, instance agents, data source agents, transaction managers and transaction object modules each perform their duties, and ensure the robust execution of cross-container operations through permission checks, data source encapsulation, sharding support and transaction management.

[0097] The standard parts used in the present invention can all be purchased from the market, and the special-shaped parts can be customized according to the description and the drawings. The specific connection methods of each part adopt conventional means such as mature bolts, rivets, welding, etc. in the prior art. The machinery, parts and equipment all adopt conventional models in the prior art, and the circuit connection adopts the conventional connection method in the prior art, which will not be described in detail here. The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.

[0098] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.

[0099] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0100] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0101] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0102] In the drawings of the embodiments disclosed in the present invention, only the structures related to the embodiments disclosed in the present invention are involved, and other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of the present invention can be combined with each other.

[0103] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A cross-container data access layer transaction management system, characterized in that: include: Container instance docking platform, used to implement dependency injection capabilities across container instances; The data access layer is compatible with the platform, ensuring compatibility of the data access layer and allowing nested use of different suites across containers; The container instance docking platform includes: The instance proxy module intercepts the execution method through object proxy technology and calls the corresponding container instance management at runtime. When insufficient access rights are encountered, the security manager modifies the access rights; Dependency injection module, which supports declarative and programmatic injection and completes instance injection during the container instance management lifecycle; The pre-injection management module is used to solve the problem that the later-started container cannot obtain the instance of the first-started container. Through pre-injection instance management, the pre-injected instance is added to the container instance management lifecycle before the later-started container is instantiated; Data access layer compatible platforms include: The data source proxy module encapsulates the original data source through object proxy technology and supports multi-database operations according to sharding rules; The transaction manager module manages cross-container local transaction objects, including obtaining transaction objects, transaction committing, and transaction rollback; The transaction object module provides cross-container transaction capabilities, including connection acquisition, transaction commit, and transaction rollback. The container instance docking platform includes an application service module. The application service module serves as an intermediate service layer, providing data interaction, coordination, and management services between application services and container instances. The application service module performs the following steps: Create and manage container A; Container A communicates with container B through the bridge platform; When container A starts, a container instance is created and injected into container B through the instance bridging step; Monitor the instantiation process of container B, including generating dynamic proxies and dependent instances; After the instantiation of container B is completed, the step of pre-injecting container A instance into container B is performed. When container B is started later, the pre-injected instance is queried and instance generation and injection of dependent instances are completed.

2. A cross-container data access layer transaction management system as claimed in claim 1, characterized in that: The container instance docking platform and data access layer compatibility platform achieve cross-container interaction and data access layer compatibility through standardized interfaces.

3. A cross-container data access layer transaction management system as described in claim 2, characterized in that: The cross-container local transaction management process includes the following steps: When container A starts, it communicates with container B through the data access layer, interacts with the data source agent, and synchronizes the database connection; Inside container A, the transaction manager module is activated to manage the transaction objects in container A; After container A completes its data operations, it updates the context through the transaction object and propagates the updated context to container B. After receiving the updated context, container B synchronizes its database connection and updates its context internally. Container B propagates the updated context back to container A through the data access layer to ensure data consistency between the two parties. When all transaction operations are completed, container A closes its transaction object, indicating the end of the entire cross-container local transaction management process; The degree of data consistency ensured during cross-container local transaction management can be expressed using the following mathematical formula: ; Where R represents the degree of data consistency, C represents the number of updates successfully synchronized, and T represents the total number of updates. The number of successfully synchronized updates indicates the number of updates successfully synchronized to all related containers during the cross-container local transaction management process. The total number of updates indicates the total number of updates generated during the cross-container local transaction management process.

4. A cross-container data access layer transaction management system as described in claim 3, characterized in that: The instance proxy module further includes: Access permission checking unit, used to check access permissions when intercepting execution methods; The security manager unit is used to modify access permissions when access permissions are insufficient.

5. A cross-container data access layer transaction management system as described in claim 4, characterized in that: The data source agent module further includes: A data source encapsulation unit, used to encapsulate the original data source; The sharding rule support unit is used to support multi-database operations based on sharding rules.

6. A cross-container data access layer transaction management system as described in claim 5, characterized in that: The transaction manager module further includes: A transaction object acquisition unit, used to acquire a cross-container local transaction object; Transaction commit unit, used to manage the commit operations of cross-container local transactions; The transaction rollback unit is used to manage the rollback operations of cross-container local transactions.

7. A cross-container data access layer transaction management system as claimed in claim 6, characterized in that: The transaction object module further includes: Connection acquisition unit, used to obtain cross-container database connections; Transaction commit unit, used to perform commit operations on cross-container transactions; The transaction rollback unit is used to perform the rollback operation of cross-container transactions.

8. A cross-container data access layer transaction management system as claimed in claim 3, characterized in that: The container instance docking platform and data access layer compatibility platform achieve cross-container interaction and data access layer compatibility through standardized interfaces.