Transaction mechanism processing method and device, equipment and storage medium

By classifying and decomposing the transaction mechanism of the resource object's business configuration, and using the concurrency capabilities of the incremental transaction mechanism, the problem of low business configuration efficiency in the existing technology is solved, and more efficient business configuration processing is achieved.

CN119415222APending Publication Date: 2025-02-11FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411453195.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the prior art, when multiple business configurations are performed on resource objects, the business configuration efficiency is low, resulting in the transaction mechanism corresponding to each business configuration can only be executed serially.

Method used

By obtaining the types of transaction mechanisms corresponding to the N service configurations of the resource object, it is decomposed into L incremental transaction mechanisms and M full transaction mechanisms, opening L incremental transaction mechanisms and storing them in memory in the form of accumulation, for M Full-scale transaction mechanism, enable the current full-scale transaction mechanism until it is committed or rolled back, and enable the next full-scale transaction mechanism.

Benefits of technology

By classifying the transaction mechanism and supporting concurrent modification of the incremental transaction mechanism, the efficiency of business configuration is greatly improved and the problem of low business configuration efficiency is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415222A_ABST
    Figure CN119415222A_ABST
Patent Text Reader

Abstract

The invention discloses a transaction mechanism processing method and device, equipment and a storage medium, and the method comprises the steps: obtaining the types of transaction mechanisms corresponding to N business configurations of a resource object, obtaining L incremental transaction mechanisms and M full transaction mechanisms, and enabling the sum of L and M to be equal to N; starting L incremental transaction mechanisms, and storing service configurations corresponding to the L incremental transaction mechanisms into a memory in an accumulation form; and starting the current full-amount transaction mechanism for M full-amount transaction mechanisms, and starting the next full-amount transaction mechanism until the current full-amount transaction mechanism is submitted or rolled back. According to the method and the device, the incremental transaction machine supports multiple transaction mechanisms to modify the same resource object concurrently, so that the service configuration efficiency is greatly improved, and the technical problem that the service configuration efficiency is low when multiple service configurations are performed on the same resource object due to the fact that the transaction mechanisms corresponding to the service configurations can only be executed serially in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of business configuration data processing, and in particular to a transaction mechanism processing method, device, equipment and storage medium. Background Art

[0002] At present, when performing one or more business configurations on resource objects of multiple nodes, a transaction mechanism corresponding to each business configuration is added, so that the business configurations of all resource objects succeed or roll back together, thereby ensuring the consistency of data between all resource objects.

[0003] In the related art, before a certain business configuration is performed on a resource object of a certain node, the transaction mechanism corresponding to this business configuration will add the identifier of this resource object to the lock area, and back up the resource object data for rollback in memory. Before the transaction mechanism corresponding to this business configuration is committed or rolled back, other transaction mechanisms are not allowed to make parallel modifications, resulting in that when multiple business configurations are performed on the resource object of a node, the transaction mechanism corresponding to each business configuration can only be executed serially, which greatly limits the efficiency of business configuration of resource objects. Summary of the invention

[0004] The present invention provides a transaction mechanism processing method, device, equipment and storage medium, which can solve the technical problem of low business configuration efficiency when multiple business configurations are performed on resource objects in the prior art.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention provides a transaction mechanism processing method, the method comprising:

[0007] Obtain the types of transaction mechanisms corresponding to N business configurations of a resource object, and obtain L incremental transaction mechanisms and M full transaction mechanisms, where the sum of L plus M equals N;

[0008] Enable L incremental transaction mechanisms, and store the business configurations corresponding to the L incremental transaction mechanisms in memory in an accumulated form;

[0009] For M full transaction mechanisms, the current full transaction mechanism is started until the current full transaction mechanism is committed or rolled back, and then the next full transaction mechanism is started.

[0010] In a second aspect, an embodiment of the present invention provides a transaction mechanism processing device, the device comprising:

[0011] An information acquisition module is configured to acquire types of transaction mechanisms corresponding to N business configurations of a resource object, and obtain L incremental transaction mechanisms and M full transaction mechanisms, where the sum of L plus M equals N;

[0012] The incremental transaction mechanism processing module is configured to enable L incremental transaction mechanisms and store the business configurations corresponding to the L incremental transaction mechanisms in a cumulative form in the memory;

[0013] The full transaction mechanism processing module is configured to start the current full transaction mechanism for M full transaction mechanisms until the current full transaction mechanism is committed or rolled back, and then start the next full transaction mechanism.

[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: a memory, a processor; the processor is used to read and execute a computer program stored in the memory to implement the steps of the aforementioned transaction mechanism processing method.

[0015] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions, when executed, implement the steps of the aforementioned transaction mechanism processing method.

[0016] The beneficial effects brought by the technical solution provided by the embodiment of the present invention include:

[0017] Obtain the types of transaction mechanisms corresponding to N business configurations of a resource object, and obtain L incremental transaction mechanisms and M full transaction mechanisms, wherein the sum of L plus M equals N; enable L incremental transaction mechanisms, and store the business configurations corresponding to the L incremental transaction mechanisms in the memory in an accumulated form; for the M full transaction mechanisms, enable the current full transaction mechanism, and enable the next full transaction mechanism after the current full transaction mechanism is committed or rolled back. Through the present invention, since the transaction mechanisms corresponding to each business configuration are classified, and the incremental transaction machine supports multiple transaction mechanisms to concurrently modify the same resource object, the efficiency of business configuration is greatly improved, and the technical problem that the transaction mechanisms corresponding to the business configurations in the related technology can only be executed serially, resulting in low business configuration efficiency when multiple business configurations are performed on the same resource object, is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A flowchart of an embodiment of a transaction mechanism processing method of the present invention;

[0020] Figure 2It is a schematic diagram of the overall logic flow of the transaction mechanism processing method of the present invention;

[0021] Figure 3 A schematic diagram of the operation logic of the transaction management module of the present invention;

[0022] Figure 4 This is a schematic diagram of the incremental transaction mechanism processing flow of the present invention;

[0023] Figure 5 This is a schematic diagram of the processing flow of the full transaction mechanism of the present invention;

[0024] Figure 6 A schematic diagram of functional modules of an embodiment of a transaction mechanism processing device of the present invention;

[0025] Figure 7 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] 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.

[0027] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0028] In a first aspect, an embodiment of the present invention provides a transaction mechanism processing method.

[0029] In one embodiment, referring to Figure 1 , Figure 1 FIG. 1 is a flow chart of an embodiment of a transaction mechanism processing method of the present invention. Figure 1 As shown, the transaction mechanism processing method includes:

[0030] Step S10, obtaining the types of transaction mechanisms corresponding to N business configurations of a resource object, and obtaining L incremental transaction mechanisms and M full transaction mechanisms, where the sum of L plus M equals N;

[0031] In this embodiment, refer to Figure 2 , Figure 2 This is a schematic diagram of the overall logic flow of the transaction mechanism processing method of the present invention. Figure 2As shown in the figure, during the business operation, the outer transaction is started by calling the transaction management module, and then the type of transaction mechanism corresponding to each business configuration of a resource object is obtained. Since each business configuration corresponds to one transaction mechanism, when N business configurations are performed on a resource object, there are N transaction mechanisms. The transaction mechanism includes a full transaction mechanism and an incremental transaction mechanism. Obtaining the types of N transaction mechanisms means obtaining L incremental transaction mechanisms and M full transaction mechanisms. The sum of L plus M equals N.

[0032] In some specific embodiments, step S10 includes:

[0033] Get the modification types of N business configurations of a resource object;

[0034] Determine that the types of transaction mechanisms corresponding to the L business configurations whose modification types are the first preset modification types are incremental transaction mechanisms, and obtain L incremental transaction mechanisms;

[0035] Determine that the types of transaction mechanisms corresponding to the M business configurations whose modification types are the second preset modification types are full transaction mechanisms, and obtain M full transaction mechanisms.

[0036] In this embodiment, when performing business configuration on a resource object, the business configuration of each resource object is decomposed into a small-grained incremental transaction mechanism or a full transaction mechanism for execution according to the modification type of the business configuration of the resource object, and the decomposition result of the business configuration of each resource object is obtained, so that it can be known whether the transaction mechanism corresponding to the business configuration of each resource object is an incremental transaction mechanism or a full transaction mechanism. Among them, the small-grained incremental transaction mechanism or the full transaction mechanism is a small transaction.

[0037] Specifically, in this embodiment, the first preset modification type is cumulative modification, and the second preset modification type is attribute modification. If a service configuration of a resource object is an attribute modification, such as name, switch, etc., then the service configuration adopts a full transaction mechanism; if a service configuration of a resource object is an cumulative modification, such as bandwidth, capacity, etc., then the service configuration adopts an incremental transaction mechanism. For example: in a business operation, it is necessary to modify the hierarchical attributes of the port and accumulate bandwidth data. The resource object provides two interfaces: modifying the port hierarchy and modifying the port bandwidth. In the port hierarchy modification interface, the full transaction mechanism is enabled to modify the port hierarchy data; in the port bandwidth modification interface, the incremental transaction mechanism is enabled to perform cumulative modifications to the port bandwidth data.

[0038] Step S20, starting L incremental transaction mechanisms, and storing the business configurations corresponding to the L incremental transaction mechanisms in the memory in an accumulated form;

[0039] In this embodiment, after determining the type of transaction mechanism corresponding to each business configuration, when performing business configuration on a resource object, if the transaction mechanism corresponding to L of the N business configurations is an incremental transaction mechanism, then the L incremental transaction mechanisms are enabled, and the business configurations corresponding to the L incremental transaction mechanisms are stored in the memory in an accumulated form, and there is no need to add the identifier of the resource object to the lock area. Therefore, before the current incremental transaction mechanism is committed or rolled back, other transaction mechanisms can also perform business configuration on the resource object, that is, multiple transaction mechanisms are supported to concurrently modify the same resource object, greatly improving the efficiency of business configuration. It is easy to think that performing business configuration on a resource object is to modify the resource object.

[0040] Step S30, for the M full transaction mechanisms, start the current full transaction mechanism until the current full transaction mechanism is committed or rolled back, and then start the next full transaction mechanism.

[0041] In this embodiment, refer to Figure 5 , Figure 5 This is a schematic diagram of the full transaction mechanism processing flow of the present invention. Figure 5 As shown, after determining the type of transaction mechanism corresponding to each business configuration, when performing business configuration on resource objects, if the transaction mechanism corresponding to M business configurations among N business configurations is a full transaction mechanism, then after the current full transaction mechanism is turned on, as shown in S60, before performing business configuration on resource objects, the business configuration data for rollback will be backed up in memory, the memory resource data will be modified, and the identifier of the resource object will be added to the lock area. Since the identifier of the resource object is added to the lock area when the current full transaction mechanism is operated, other transaction mechanisms are not allowed to perform business configuration on the resource object before the current full transaction mechanism ends, that is, until the current full transaction mechanism is committed or rolled back, the next full transaction mechanism is turned on.

[0042] In this embodiment, the types of transaction mechanisms corresponding to N business configurations of a resource object are obtained, and L incremental transaction mechanisms and M full transaction mechanisms are obtained, where the sum of L plus M equals N; the L incremental transaction mechanisms are enabled, and the business configurations corresponding to the L incremental transaction mechanisms are stored in the memory in a cumulative form; for the M full transaction mechanisms, the current full transaction mechanism is enabled, and the next full transaction mechanism is enabled after the current full transaction mechanism is committed or rolled back. Through this embodiment, since the transaction mechanisms corresponding to each business configuration are classified, and the incremental transaction machine supports multiple transaction mechanisms to concurrently modify the same resource object, the efficiency of business configuration is greatly improved, and the technical problem that the transaction mechanisms corresponding to the business configurations in the related technologies can only be executed serially, resulting in low business configuration efficiency when multiple business configurations are performed on the same resource object, is solved.

[0043] Optionally, in one embodiment, referring to Figure 4 , Figure 4 FIG. 1 is a schematic diagram of the incremental transaction mechanism processing flow of the present invention. Figure 4 As shown, after step S20, the following steps are included:

[0044] Step S40: When any incremental transaction mechanism is rolled back, the business configuration corresponding to the incremental transaction mechanism in the memory is deleted.

[0045] In this embodiment, refer to Figure 3 , Figure 3 This is a schematic diagram of the operation logic of the transaction management module of the present invention. Figure 3 As shown, if the application layer interface call fails, it is determined that the business operation fails, and the transaction management module is called to roll back the outer transaction. The transaction management module obtains all transaction mechanisms according to the mapping relationship between the outer transaction and the transaction mechanism, and calls the rollback interface of all transaction mechanisms in turn.

[0046] If there are two transaction mechanisms corresponding to the business configuration of the original data A of a certain resource object, which are incremental transaction mechanisms, and the business configuration corresponding to the incremental transaction mechanism 1 is to increase m, and the business configuration corresponding to the incremental transaction mechanism 2 is to increase n, when the incremental transaction mechanism 1 and / or the incremental transaction mechanism 2 are rolled back, the business configuration corresponding to the incremental transaction mechanism 1 and / or the incremental transaction mechanism 2 in the memory can be deleted. Specifically, as shown in Table 1, Table 1 shows the data change process in the memory and the database when the incremental transaction mechanism 1 and the incremental transaction mechanism 2 are rolled back.

[0047] Table 1

[0048]

[0049]

[0050] Optionally, in one embodiment, after step S20, the following steps are included:

[0051] Step S50: When any incremental transaction mechanism is committed, the business configuration corresponding to the incremental transaction mechanism is stored in the database in a cumulative form.

[0052] In this embodiment, continue to refer to Figure 3 If the application layer interface is called successfully, the business operation is determined to be successful, and the transaction management module is called to commit the outer transaction. The transaction management module obtains all transaction mechanisms according to the mapping relationship between the outer transaction and the transaction mechanism, and calls the submission interface of all transaction mechanisms in turn.

[0053] If there are two transaction mechanisms corresponding to the business configuration of the original data A of a certain resource object, which are incremental transaction mechanisms, and the business configuration corresponding to the incremental transaction mechanism 1 is to increase m, and the business configuration corresponding to the incremental transaction mechanism 2 is to increase n, when the incremental transaction mechanism 1 and / or the incremental transaction mechanism 2 are submitted, the business configuration corresponding to the incremental transaction mechanism 1 and / or the incremental transaction mechanism 2 is stored in the database in a cumulative form. Specifically, as shown in Table 2, Table 2 shows the data change process in the memory and the database when the incremental transaction mechanism 1 and the incremental transaction mechanism 2 are submitted.

[0054] Table 2

[0055] Transaction Operations Memory database Resource object raw data A A Incremental transaction mechanism 1 execution A+m A Incremental transaction mechanism 2 execution A+m+n A Incremental transaction mechanism 2 commit A+m+n A+n Incremental transaction mechanism 1 commit A+m+n A+n+m

[0056] Furthermore, the data change process in the memory and database when incremental transaction mechanism 1 is rolled back and incremental transaction mechanism 2 is committed is shown in Table 3.

[0057] Table 3

[0058]

[0059]

[0060] Furthermore, the data change process in the memory and database when incremental transaction mechanism 1 is committed and incremental transaction mechanism 2 is rolled back is shown in Table 4.

[0061] Table 4

[0062] Transaction Operations Memory database Resource object raw data A A Incremental transaction mechanism 1 execution A+m A Incremental transaction mechanism 2 execution A+m+n A Incremental transaction mechanism 1 commit A+m+n A+m Incremental transaction mechanism 2 rollback A+m(A+m+nn) A+m

[0063] As can be seen from Tables 1 to 4, even if multiple incremental transaction mechanisms perform business configuration on the same resource object, the correctness of the resource data can still be guaranteed after the incremental transaction mechanism is committed or rolled back. For incremental transactions, the data of this incremental modification is recorded. Each time the memory or database is modified, the incremental modification is based on the latest data in the memory or database. Moreover, before the current incremental transaction mechanism is committed or rolled back, other incremental transaction mechanisms are allowed to modify this resource object in parallel, which ensures data consistency and improves the efficiency of business configuration of resource objects. It should be noted that consistency is relative to the outer large transaction, which ensures that all resource objects modified in the outer transaction succeed or fail together.

[0064] Optionally, in one embodiment, the current full transaction mechanism submission includes:

[0065] When the full transaction mechanism is submitted, the resource objects after the business configuration are persisted;

[0066] Delete the data in the memory copy and the identifier of the resource object in the lock area.

[0067] In this embodiment, if the application layer interface call is successful, the business operation is determined to be successful, and the transaction management module is called to commit the outer transaction. The transaction management module obtains all transaction mechanisms based on the mapping relationship between the outer transaction and the transaction mechanism, and calls the submission interface of all transaction mechanisms in sequence.

[0068] If there are two full transaction mechanisms in the transaction mechanism corresponding to the business configuration of the original data A of a resource object, and full transaction 1 sets the resource object to B, and full transaction 2 sets the resource object to C.

[0069] If the current full transaction mechanism is full transaction mechanism 1, after full transaction mechanism 1 is enabled, the resource object data used for rollback will be backed up before the business configuration of resource object original data A is committed or rolled back. At this time, the resource object data used for rollback is resource object original data A, then the resource object original data A will be backed up in memory and the identifier of the resource object will be added to the lock area, so full transaction mechanism 2 cannot perform business configuration on resource object original data A.

[0070] Continue to refer to Figure 5 When the full transaction mechanism 1 is committed, as shown in S70 and S90, the original data A of the resource object after the business configuration is persisted, and then the original data A of the resource object backed up in the memory and the identifier of the resource object in the lock area are deleted. Among them, data persistence is a general term for converting the data model in the memory to the storage model, and converting the storage model to the data model in the memory. The data model can be any data structure or object model, and the storage model can be a relational model, XML or binary stream, etc.

[0071] Specifically, if the current full transaction mechanism is full transaction mechanism 1, after full transaction mechanism 1 is committed, full transaction mechanism 2 is executed. After full transaction mechanism 1 is enabled, before full transaction mechanism 1 is executed, the original data A of the resource object will be backed up. When full transaction mechanism 1 is executed, the original data A in the memory will be modified to the business configuration data B, and the identifier of the resource object will be added to the lock area, and the data in the database will remain unchanged; when full transaction mechanism 1 is committed, the original data A of the resource object after the business configuration, that is, the business configuration data B, will be persisted, the data in the database will be updated to the business configuration data B, and then the original data A of the resource object backed up in the memory and the identifier of the resource object in the lock area will be deleted.

[0072] After the full transaction mechanism 1 is committed, the resource object data used for rollback is the business configuration data B. Therefore, after the full transaction mechanism 2 is started, the business configuration data B is backed up in the memory before the full transaction mechanism 1 is executed. When the full transaction mechanism 2 is executed, the business configuration data B in the memory is modified to the business configuration data C, and the data in the database remains unchanged. When the full transaction mechanism 2 is committed, the business configuration data C is persisted, the data in the database is updated to the business configuration data C, and then the original data B of the resource object backed up in the memory and the identifier of the resource object in the lock area are deleted.

[0073] The data change process in memory, database and lock area of ​​full transaction mechanism 1 and full transaction mechanism 2 from opening to committing is shown in Table 5.

[0074] Table 5

[0075] Transaction Operations Memory database Locked Area Resource object raw data A A null Full transaction mechanism 1 execution B A Identifier of the resource object Full transaction mechanism 1 commit B B null Full transaction mechanism 2 execution C B Identifier of the resource object Full transaction mechanism 2 commit C C null

[0076] Optionally, in one embodiment, the current full transaction mechanism is rolled back, including:

[0077] When the full transaction mechanism is rolled back, the resource objects after the business configuration are restored to the backup state;

[0078] Delete the data in the memory copy and the identifier of the resource object in the lock area.

[0079] In this embodiment, if the application layer interface call fails, it is determined that the business operation has failed, and the transaction management module is called to roll back the outer transaction. The transaction management module obtains all transaction mechanisms based on the mapping relationship between the outer transaction and the transaction mechanism, and calls the rollback interface of all transaction mechanisms in sequence.

[0080] If there are two full transaction mechanisms in the transaction mechanism corresponding to the business configuration of the original data A of a resource object, and full transaction 1 sets the resource object to B, and full transaction 2 sets the resource object to C.

[0081] If the current full transaction mechanism is full transaction mechanism 1, after full transaction mechanism 1 is enabled, before the original data A of resource object is configured for business, the original data A of resource object will be backed up in memory and the identifier of resource object will be added to the lock area. Therefore, full transaction mechanism 2 cannot perform business configuration on the original data A of resource object. Figure 5 , when the full transaction mechanism 1 is rolled back, as shown in S80 and S90, the resource object after the business configuration is restored to the backup state, and then the original data A of the resource object backed up in the memory and the identifier of the resource object in the locked area are deleted.

[0082] Specifically, if the current full transaction mechanism is full transaction mechanism 1, after full transaction mechanism 1 is rolled back, full transaction mechanism 2 is executed. After full transaction mechanism 1 is turned on, before full transaction mechanism 1 is executed, the original data A of the resource object will be backed up. When full transaction mechanism 1 is executed, the original data A in the memory is modified to the business configuration data B, and the identifier of the resource object is added to the lock area, and the data in the database remains unchanged; when full transaction mechanism 1 is rolled back, the resource object after business configuration is restored to the backup state, that is, the business configuration data B is restored to the original data A of the resource object, the data in the database remains unchanged, and then the original data A of the resource object backed up in the memory and the identifier of the resource object in the lock area are deleted.

[0083] After the full transaction mechanism 1 is rolled back, the resource object data used for rollback is still the original data A of the resource object. Therefore, after the full transaction mechanism 2 is started, the original data A of the resource object is backed up in the memory before the full transaction mechanism 1 is executed. When the full transaction mechanism 2 is executed, the original data A of the resource object in the memory is modified to the business configuration data C, and the data in the database remains unchanged. When the full transaction mechanism 2 is committed, the business configuration data C is persisted, the data in the database is updated to the business configuration data C, and then the original data A of the resource object backed up in the memory and the identifier of the resource object in the locked area are deleted.

[0084] The data change process in memory, database and lock area of ​​full transaction mechanism 1 from opening to rollback and full transaction mechanism 2 from opening to commit is shown in Table 6.

[0085] Table 6

[0086] Transaction Operations Memory database Locked Area Resource object raw data A A null Full transaction mechanism 1 execution B A Identifier of the resource object Full transaction mechanism 1 rollback A A null Full transaction mechanism 2 execution C A Identifier of the resource object Full transaction mechanism 2 commit C C null

[0087] In another embodiment, if the current full transaction mechanism is full transaction mechanism 2, after full transaction mechanism 2 is submitted, full transaction mechanism 1 is executed. After full transaction mechanism 2 is turned on, before full transaction mechanism 2 is executed, the original data A of the resource object will be backed up. When full transaction mechanism 2 is executed, the original data A in the memory is modified to the business configuration data C, and the identifier of the resource object is added to the lock area, and the data in the database is preserved unchanged; when full transaction mechanism 2 is submitted, the original data A of the resource object after the business configuration, that is, the business configuration data C, is persisted, the data in the database is updated to the business configuration data C, and then the original data A of the resource object backed up in the memory and the identifier of the resource object in the lock area are deleted.

[0088] After the full transaction mechanism 2 is committed, the resource object data used for rollback is the business configuration data C. Therefore, after the full transaction mechanism 1 is started, the business configuration data C is backed up in the memory before the full transaction mechanism 1 is executed. When the full transaction mechanism 1 is executed, the business configuration data C in the memory is modified to the business configuration data B, and the data in the database remains unchanged; when the full transaction mechanism 1 is rolled back, the resource object after the business configuration is restored to the backup state, that is, the business configuration data B is restored to the business configuration data C, the data in the database remains unchanged, and then the backed-up business configuration data C in the memory and the identifier of the resource object in the lock area are deleted.

[0089] The data change process in memory, database and lock area of ​​full transaction mechanism 2 from opening to commit and full transaction mechanism 1 from opening to rollback is shown in Table 7.

[0090] Table 7

[0091] Transaction Operations Memory database Locked Area Resource object raw data A A null Full transaction mechanism 2 execution C A Identifier of the resource object Full transaction mechanism 2 commit C C null Full transaction mechanism 1 execution B C Identifier of the resource object Full transaction mechanism 1 rollback C C null

[0092] In another embodiment, if the current full transaction mechanism is full transaction mechanism 2, after full transaction mechanism 2 is rolled back, full transaction mechanism 1 is executed. After full transaction mechanism 2 is turned on, before full transaction mechanism 1 is executed, the original data A of the resource object will be backed up. When full transaction mechanism 2 is executed, the original data A in the memory is modified to the business configuration data C, and the identifier of the resource object is added to the lock area, and the data in the database is preserved unchanged; when full transaction mechanism 2 is rolled back, the resource object after the business configuration is restored to the backup state, that is, the business configuration data C is restored to the original data A of the resource object, the data in the database is preserved unchanged, and then the original data A of the resource object backed up in the memory and the identifier of the resource object in the lock area are deleted.

[0093] After the full transaction mechanism 2 is rolled back, the resource object data used for rollback is still the original data A of the resource object. Therefore, after the full transaction mechanism 1 is started, the original data A of the resource object is backed up in the memory before the full transaction mechanism 1 is executed. When the full transaction mechanism 1 is executed, the business configuration data A in the memory is modified to the business configuration data B, and the data in the database remains unchanged. When the full transaction mechanism 1 is rolled back, the resource object after the business configuration is restored to the backup state, that is, the business configuration data B is restored to the original data A of the resource object, and the data in the database remains unchanged, and then the original data A of the resource object backed up in the memory and the identifier of the resource object in the lock area are deleted.

[0094] The data change process in the memory and lock area of ​​full transaction mechanism 1 and full transaction mechanism 2 from opening to rolling back is shown in Table 8.

[0095] Table 8

[0096] Transaction Operations Memory database Locked Area Resource object raw data A A null Full transaction mechanism 2 execution C A Identifier of the resource object Full transaction mechanism 2 rollback A A null Full transaction mechanism 1 execution B A Identifier of the resource object Full transaction mechanism 1 rollback A A null

[0097] In a second aspect, an embodiment of the present invention further provides a transaction mechanism processing device.

[0098] In one embodiment, referring to Figure 6 , Figure 6 FIG. 1 is a functional module diagram of an embodiment of a transaction mechanism processing device of the present invention. Figure 6 As shown, the transaction mechanism processing device includes:

[0099] The information acquisition module 10 is configured to acquire the types of transaction mechanisms corresponding to N business configurations of a resource object, and obtain L incremental transaction mechanisms and M full transaction mechanisms, where the sum of L plus M equals N;

[0100] The incremental transaction mechanism processing module 20 is configured to enable L incremental transaction mechanisms and store the business configurations corresponding to the L incremental transaction mechanisms in the memory in an accumulated form;

[0101] The full transaction mechanism processing module 30 is configured to start the current full transaction mechanism for M full transaction mechanisms, and start the next full transaction mechanism after the current full transaction mechanism is committed or rolled back.

[0102] Optionally, in one embodiment, the incremental transaction mechanism processing module 20 is further configured to:

[0103] When any incremental transaction mechanism is rolled back, the business configuration corresponding to this incremental transaction mechanism in memory is deleted.

[0104] Optionally, in one embodiment, the incremental transaction mechanism processing module 20 is further configured to:

[0105] When any incremental transaction mechanism is committed, the business configuration corresponding to this incremental transaction mechanism is stored in the database in a cumulative form.

[0106] Optionally, in one embodiment, the full transaction mechanism processing module 30 is further configured to:

[0107] When the full transaction mechanism is submitted, the resource objects after the business configuration are persisted;

[0108] Delete the data in the memory copy and the identifier of the resource object in the lock area.

[0109] Optionally, in one embodiment, the full transaction mechanism processing module 30 is further configured to:

[0110] When the full transaction mechanism is rolled back, the resource objects after the business configuration are restored to the backup state;

[0111] Delete the data in the memory copy and the identifier of the resource object in the lock area.

[0112] Optionally, in one embodiment, the information acquisition module 10 is configured to:

[0113] Get the modification types of N business configurations of a resource object;

[0114] Determine that the types of transaction mechanisms corresponding to the L business configurations whose modification types are the first preset modification types are incremental transaction mechanisms, and obtain L incremental transaction mechanisms;

[0115] Determine that the types of transaction mechanisms corresponding to the M business configurations whose modification types are the second preset modification types are full transaction mechanisms, and obtain M full transaction mechanisms.

[0116] Among them, the functional implementation of each module in the above-mentioned transaction mechanism processing device corresponds to each step in the above-mentioned transaction mechanism processing method embodiment, and its functions and implementation processes are no longer repeated here one by one.

[0117] In a third aspect, an embodiment of the present invention further provides an electronic device, whose structure is as follows: Figure 7 As shown, it includes: a memory and a processor, wherein the processor is used to read and execute the computer program stored in the memory to implement the aforementioned transaction mechanism processing method.

[0118] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions, when executed, implement the aforementioned transaction mechanism processing method.

[0119] Finally, it should be noted that: in some processes described in the embodiments of the present invention, multiple operations or steps appearing in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present invention or may be executed in parallel, and the sequence number of the operation is only used to distinguish between different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. 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 transaction mechanism processing method, characterized in that: The method comprises: Obtain the types of transaction mechanisms corresponding to N business configurations of a resource object, and obtain L incremental transaction mechanisms and M full transaction mechanisms, where the sum of L plus M equals N; Enable L incremental transaction mechanisms, and store the business configurations corresponding to the L incremental transaction mechanisms in memory in an accumulated form; For M full transaction mechanisms, the current full transaction mechanism is started until the current full transaction mechanism is committed or rolled back, and then the next full transaction mechanism is started.

2. The transaction mechanism processing method according to claim 1, characterized in that: After the L incremental transaction mechanisms are enabled and the business configurations corresponding to the L incremental transaction mechanisms are stored in the memory in an accumulated form, the method includes: When any incremental transaction mechanism is rolled back, the business configuration corresponding to this incremental transaction mechanism in memory is deleted.

3. The transaction mechanism processing method according to claim 1, characterized in that: After the L incremental transaction mechanisms are enabled and the business configurations corresponding to the L incremental transaction mechanisms are stored in the memory in an accumulated form, the method includes: When any incremental transaction mechanism is committed, the business configuration corresponding to this incremental transaction mechanism is stored in the database in a cumulative form.

4. The transaction mechanism processing method according to claim 1, characterized in that: The current full transaction mechanism submission includes: When the full transaction mechanism is submitted, the resource objects after the business configuration are persisted; Delete the data in the memory copy and the identifier of the resource object in the lock area.

5. The transaction mechanism processing method according to claim 1, characterized in that: The current full transaction mechanism rolls back, including: When the full transaction mechanism is rolled back, the resource objects after the business configuration are restored to the backup state; Delete the data in the memory copy and the identifier of the resource object in the lock area.

6. The transaction mechanism processing method according to claim 1, characterized in that: The step of obtaining the types of transaction mechanisms corresponding to N business configurations of a resource object and obtaining L incremental transaction mechanisms and M full transaction mechanisms includes: Get the modification types of N business configurations of a resource object; Determine that the types of transaction mechanisms corresponding to the L business configurations whose modification types are the first preset modification types are incremental transaction mechanisms, and obtain L incremental transaction mechanisms; Determine that the types of transaction mechanisms corresponding to the M business configurations whose modification types are the second preset modification types are full transaction mechanisms, and obtain M full transaction mechanisms.

7. A transaction mechanism processing device, characterized in that: The device comprises: An information acquisition module is configured to acquire types of transaction mechanisms corresponding to N business configurations of a resource object, and obtain L incremental transaction mechanisms and M full transaction mechanisms, where the sum of L plus M equals N; The incremental transaction mechanism processing module is configured to enable L incremental transaction mechanisms and store the business configurations corresponding to the L incremental transaction mechanisms in a cumulative form in the memory; The full transaction mechanism processing module is configured to start the current full transaction mechanism for M full transaction mechanisms until the current full transaction mechanism is committed or rolled back, and then start the next full transaction mechanism.

8. The transaction mechanism processing device according to claim 7, characterized in that: The incremental transaction mechanism processing module is further configured to: When any incremental transaction mechanism is committed, the business configuration corresponding to this incremental transaction mechanism is stored in the database in a cumulative form.

9. An electronic device, characterized in that: include: Memory and processor; The processor is used to read and execute the computer program stored in the memory to implement the steps of the transaction mechanism processing method as described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed, the steps of the transaction mechanism processing method as described in any one of claims 1 to 6 are implemented.