Method, apparatus, device, storage medium and program product for data processing

By assigning globally unique, monotonically increasing version numbers to undo records and maintaining an ordered linked list, the performance bottleneck of the database system in high-concurrency scenarios is solved, and the system's concurrency processing capability and scalability are improved.

CN122220352APending Publication Date: 2026-06-16XIAN TONGXING HENGYAO INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN TONGXING HENGYAO INFORMATION TECHNOLOGY CO LTD
Filing Date
2026-03-13
Publication Date
2026-06-16

Smart Images

  • Figure CN122220352A_ABST
    Figure CN122220352A_ABST
Patent Text Reader

Abstract

According to an embodiment of the present disclosure, a method, device, equipment, storage medium and program product for data processing are provided. The method comprises: obtaining a first version number of a revocation record, the first version number indicating a creation time sequence of the revocation record, and the first version number being globally unique and monotonically increasing; obtaining an ordered linked list, the ordered linked list comprising at least one second version number, the at least one second version number being added to the ordered linked list in turn from the tail of the ordered linked list in an order from early to late based on a creation time of an associated consistent view; obtaining a second version number from an end of the ordered linked list, the second version number being associated with a first version number of a revocation record on which the consistent view depends; and in response to the first version number being less than the second version number, cleaning up the revocation record. Thus, the dependency judgment of constant time complexity is realized through version number comparison, and the data processing efficiency and system concurrency performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The exemplary embodiments disclosed herein generally relate to the field of computer technology, and more specifically, to methods, apparatuses, devices, storage media, and program products for data processing. Background Technology

[0002] In database systems, to support transaction isolation and consistent reads, multiple historical versions of data records need to be maintained. When a transaction performs a read operation, the system determines which version of the data record should be accessed based on the consistent view held by the transaction. Due to storage space limitations, the system needs to manage the reclamation of historical versions through a rollback record reclamation mechanism. During reclamation, it is necessary to determine whether the rollback record is still depended upon to ensure that historical versions still depended upon by a consistent view are not mistakenly reclamated. Summary of the Invention

[0003] In a first aspect of this disclosure, a method for data processing is provided. The method includes: obtaining a first version number of a revocation record, the first version number indicating the creation time of the revocation record, and the first version number being globally unique and monotonically increasing; obtaining an ordered linked list including at least one second version number, the at least one second version number being added sequentially from the tail of the ordered linked list in an early-to-late order based on the creation time of the associated consistent view; obtaining a second version number from the end of the ordered linked list, the second version number being associated with the first version number of the revocation record on which the consistent view depends; and cleaning up the revocation record in response to a first version number being less than a second version number.

[0004] In a second aspect of this disclosure, an apparatus for data processing is provided. The apparatus includes: a first acquisition module configured to acquire a first version number of a revocation record, the first version number indicating the creation time of the revocation record and being globally unique and monotonically increasing; a second acquisition module configured to acquire a second version number from the head of an ordered linked list, the second version number indicating the first version number of a revocation record on which a consistent view depends, the ordered linked list including at least one second version number, the at least one second version number being added sequentially from the tail of the ordered linked list based on the creation time of its respective associated consistent view, in ascending order of creation time; and a cleanup module configured to clean up revocation records in response to a first version number being less than a second version number.

[0005] In a third aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method of the first aspect of this disclosure when executed by the at least one processing unit.

[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program that can be executed by a processor to perform the method according to a first aspect of this disclosure.

[0007] In a fifth aspect of this disclosure, a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer-executable instructions that, when executed by a device, cause the device to perform the method according to a first aspect of this disclosure.

[0008] It should be understood that the content described in this section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0009] The above and other features, advantages, and aspects of various implementations of this disclosure will become more apparent in the following detailed description, taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure can be implemented is shown; Figure 2 It shows Figure 1 A block diagram of an example architecture for a database management system; Figure 3 A flowchart is shown for a process of determining whether a revocation record is reclaimed, according to some embodiments of the present disclosure; Figure 4 A flowchart of a process for data processing according to some embodiments of the present disclosure is shown; Figure 5 A block diagram of an apparatus for data processing according to some embodiments of the present disclosure is shown; and Figure 6 A block diagram of an electronic device capable of implementing one or more embodiments of the present disclosure is shown. Detailed Implementation

[0010] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0011] It should be noted that the acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0012] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0013] To facilitate discussion, we will first define some concepts and terms.

[0014] The rollback log (UNDO log) is a log used in database transaction processing to record the state of data before modification. It is mainly used for transaction rollback and reconstruction of historical versions in multi-version concurrency control.

[0015] Multi-Version Concurrency Control (MVCC) is a database concurrency control mechanism that maintains multiple versions of data to enable concurrent execution of read and write operations, thus avoiding read-write conflicts.

[0016] A consistent view (read-view or vision), also known as a "read view", is a data snapshot created at the start of a transaction. It records the state information of active transactions in the current system and includes the UNDO version information that active transactions depend on, which is used to determine which data versions the transaction should see.

[0017] A System Change Number (SCN) is a globally incrementing sequence number used in a database system to identify the time sequence of data changes. A unique System Change Number is assigned to each transaction when it is committed.

[0018] The view container is a data structure used to manage all active view objects, maintaining a linked list of views ordered chronologically.

[0019] The purge operation refers to the cleanup operation in a database used to reclaim unused undo records and historical version data, and is an important part of database space management.

[0020] A transaction number is a unique identifier assigned to each transaction by the database system; it is a monotonically increasing value.

[0021] The version number is a globally unique, monotonically increasing version identifier assigned to each undo record in the rollback log, used to determine the creation order and dependencies of the undo records.

[0022] Dependency versions refer to the undo record versions that a consistent view still needs to access. These versions cannot be cleaned up or reclaimed before the consistent view is closed.

[0023] As mentioned earlier, in a database system, to support transaction isolation and consistent reads, the system needs to maintain multiple historical versions of data records. When a transaction performs a read operation, the system determines which version of the data record should be accessed based on the consistent view held by the transaction. However, due to storage space limitations, the system cannot save all versions of data records, thus requiring certain rules to manage the reclamation of historical data versions.

[0024] Each read transaction creates a consistent view at the start. This view records the status information of currently active transactions, including: the SCN (Service Transaction Number) at the time of view creation, the list of active transactions, and the maximum committed transaction number. When performing a read operation, the database system retrieves the historical version of the record by undoing the record log chain, based on the consistent view held by the reading transaction. The system determines the visibility of the record by comparing the list of active transactions and the maximum committed transaction number in the consistent view held by the transaction.

[0025] In traditional solutions, the "maximum committed transaction number" is calculated by maintaining a linked list of transactions currently committing. The specific maintenance logic is as follows: a linked list records all transactions currently committing, ordered by their commit start time; the smallest committing transaction number is obtained by reading the head of the linked list, and this number is subtracted by 1 to get the "maximum committed transaction number"; each time a transaction begins committing, this transaction number is added to the end of the linked list; each time a transaction completes committing, the transaction is searched for in the linked list, and its transaction number is removed; to ensure correctness in a multi-threaded environment, a mutex lock is used to protect operations on this linked list.

[0026] The traditional approach described above has the following problems: First, each time a transaction is committed, the corresponding transaction number needs to be searched for and deleted from the linked list, which is an O(n) time complexity operation, becoming a performance bottleneck in high-concurrency scenarios. Second, all operations on the linked list require acquiring a mutex lock. In high-concurrency transaction commit scenarios, multiple threads will frequently compete for the same lock, leading to severe lock waiting and context switching overhead. Furthermore, the nodes of the linked list may not be contiguous in memory, and frequent linked list traversal and modification operations will result in low CPU cache hit rates. Finally, as the number of concurrent transactions increases, the length of the linked list will increase accordingly, causing the time complexity of search and deletion operations to increase linearly, significantly degrading system performance.

[0027] In view of this, embodiments of this disclosure provide a method for data processing. The method first obtains a first version number of a revocation record, which indicates the creation time of the revocation record and is globally unique and monotonically increasing. Then, it obtains an ordered linked list comprising at least one second version number, which are added sequentially from the tail of the ordered linked list based on the creation time of the associated consistent view, in ascending order. Next, it obtains a second version number from the end of the ordered linked list, which is associated with the first version number of the revocation record upon which the consistent view depends. Finally, in response to a first version number being less than a second version number, the revocation record is cleaned up.

[0028] Therefore, by assigning a globally unique, monotonically increasing version number to each revocation record and maintaining an ordered linked list of consistent views arranged in chronological order, the minimum dependent version number can be obtained by directly accessing the head of the linked list, and the dependency judgment can be completed by simple numerical comparison, reducing the time complexity from O(n) to O(1), eliminating the overhead of linked list search, reducing lock contention, and improving the system's concurrent processing capability and scalability.

[0029] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. In this example environment 100, a database management system 120 may be installed in an electronic device 110. The database management system 120 is used to process database-related requests, such as operations like reading, writing, updating, and deleting data. To support Multi-Version Concurrency Control (MVCC), the database management system 120 also needs to maintain multiple historical versions of data records and reconstruct historical versions by undoing records.

[0030] In some embodiments, the electronic device 110 may be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), etc.

[0031] It should be understood that the structure and function of the various elements in environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.

[0032] Figure 2 It shows Figure 1 A block diagram of an example architecture 200 for a database management system 120. (See diagram below.) Figure 2 As shown, architecture 200 includes components such as a version allocator 210, a view container 220, and a decision module 230. It should be understood that... Figure 2 The diagram only illustrates, by way of example, the components included in the database management system 120. In real-world scenarios, the database management system 120 may include even more components. For ease of description, the following will use... Figure 1 A detailed introduction to Architecture 200 is provided.

[0033] In the database management system 120, read transactions use a consistent view to ensure that the data they see is logically consistent at a given point in time, and the construction of this consistent view relies on undo records. For example, when performing operations such as insert, delete, or update, the database management system 120 saves the data version before the modification as an undo record. These saved undo records can not only be used for transaction rollback, but more importantly, they also provide a basis for concurrent read transactions to access historical data versions, thereby supporting multi-version concurrency control and enabling read transactions to obtain a consistent data snapshot unaffected by uncommitted write operations.

[0034] In some embodiments, the database management system 120 may persistently store the aforementioned undo records. For example, the database management system 120 may organize these records into a rollback log and save it to the storage area 240 of the electronic device 110.

[0035] Version assigner 210 is used to assign a version number to each revocation record. This version number has the following characteristics: global uniqueness, that is, each revocation record in the system has a unique version number; monotonically increasing, that is, the version number of a later-created revocation record is always greater than the version number of an earlier-created revocation record; and temporal consistency, that is, the relationship between the version numbers reflects the creation sequence of the revocation records.

[0036] View container 220 is used to maintain an ordered linked list of all active consistent views. For example, in response to the creation of a consistent view, database management system 120 can obtain the version number of the revocation record that the created consistent view depends on and add that version number to the ordered linked list from the tail. Similarly, in response to the cleanup of a created consistent view, database management system 120 can remove the version number of the revocation record that the cleaned-up consistent view depends on from the ordered linked list.

[0037] In some embodiments, while the version number of the revocation record on which the created consistent view depends is added to the ordered linked list from the tail of the list, the database management system 120 may set a write lock on the version number of the revocation record on which the created consistent view depends. In some embodiments, while removing the first version number of the revocation record on which the cleaned consistent view depends from the ordered data structure, the database management system 120 may set a write lock on the version number of the revocation record on which the cleaned consistent view depends.

[0038] The ordered linked list maintained by view container 220 has the following characteristics: the version numbers in the ordered linked list are sorted from the end to the tail according to the creation time of the corresponding consistent view from earliest to latest; when a consistent view is created, the version number of the revocation record it depends on is recorded and remains unchanged during the existence of the consistent view; due to the monotonically increasing characteristic of the revocation record version number, the version number of the revocation record depended on by the later-created consistent view is greater than or equal to the version number depended on by the earlier-created consistent view.

[0039] The judgment module 230 is used to determine whether a revoked record is depended upon based on comparisons between different version numbers. For example, the database management system 120 can obtain the version number of the revoked record that the consistent view depends on by accessing the ordered linked list maintained by the view container 220, and then compare it with the version number of the revoked record to be reclaimed to determine whether the revoked record can be safely reclaimed.

[0040] See Figure 3 , Figure 3 A flowchart of a process 300 for determining whether a revoked record has been reclaimed, according to some embodiments of the present disclosure, is shown. For example, process 300 may be implemented in a data management system 120 within an electronic device 110. For ease of description, the following will be combined with… Figure 1 The process 300 is described in detail.

[0041] In box 310, the database management system 120 obtains the version number of the record to be revoked.

[0042] In box 320, the database management system 120 accesses the end element of the ordered linked list to obtain the version number of the smallest revocation record. In some embodiments, the database management system 120 can set a write lock for this process while obtaining the version number of the smallest revocation record from the end of the ordered linked list. This enables a read-write separation locking mechanism, where dependency judgment operations only require read locks and can be executed concurrently, while write locks are only needed when a consistent view is created / destroyed, thereby significantly reducing lock contention and improving the system's concurrency capabilities.

[0043] In box 330, the database management system 120 compares the two obtained version numbers. If the version number of the revoked record to be revoked is less than the version number of the smallest revoked record, then the revoked record can be safely revoked (box 340). If the version number of the revoked record to be revoked is greater than or equal to the version number of the smallest revoked record, then the revoked record is still dependent and cannot be revoked (box 350).

[0044] Dependency checks on undo records are crucial for ensuring data consistency and system correctness. First, the correctness of multi-version concurrency control (MPC) must be guaranteed. Specifically, while any consistent view is still active, its dependent undo record versions must not be reclaimed; this is a fundamental requirement of MPC mechanisms. Second, data inconsistency must be prevented. Specifically, if a consistent view's dependent undo record version is incorrectly reclaimed, that consistent view will be unable to retrieve the correct historical version from the undo records in subsequent read operations, resulting in unreadable data and violating the ACID principles of transactions. Furthermore, the correctness of long-running transactions must be ensured. Specifically, for long-running read-only transactions, their consistent views may need to access previously created undo record versions; it is essential to ensure that these historical versions are not reclaimed before the long transaction ends.

[0045] Therefore, when reclaiming a revoked record, the database management system 120 can first determine the status of the consistent view associated with the revoked record. If the status of the consistent view associated with the revoked record indicates that the consistent view is inactive, the revoked record can be cleaned up. If the status of the consistent view associated with the revoked record indicates that the consistent view is active, the cleanup of the revoked record is paused until the status is updated to inactive.

[0046] As an example, if it's necessary to determine the maximum committed transaction number, this can be achieved by maintaining a linked list of pending transaction numbers. Specific operational rules could include: when a transaction initiates its commit process, its number is added to the end of the linked list; when a transaction completes its commit, its number is retrieved from the linked list and removed; all add / delete operations on this linked list must be protected by mutex locks to ensure that only one operation on the linked list can be executed at a time, avoiding concurrent conflicts.

[0047] In this example, when the transaction throughput (TPS) of the database management system 120 reaches 1000, the system needs to perform 1000 linked list insertion operations per second (corresponding to the start of transaction commit) and 1000 linked list search and deletion operations per second (corresponding to the completion of transaction commit), totaling 2000 linked list operations per second. The average time complexity of the above linked list operations is O(n / 2), and all operations are executed serially under the protection of mutex locks, thus becoming the performance bottleneck of the system.

[0048] The data processing solution provided in this application embodiment can reduce 2,000 mutex lock contention per second in a scenario with a TPS of 1,000, avoid a total of 2,000 linked list operations per second with an average time complexity of O(n / 2), and only need to access the head of the linked list once to complete the relevant judgment, significantly reducing lock waiting time and effectively improving the overall transaction processing capability and concurrency performance of the system.

[0049] Furthermore, by reducing the time complexity of UNDO dependency judgment from O(n) to O(1), the performance overhead caused by linked list traversal and search is eliminated. At the same time, the system concurrency is greatly improved, enabling read operations to be executed concurrently. Write locks are only required when the Vision is created and destroyed. Moreover, the write lock operations required for read-view creation and destruction in the original solution are also applicable in this solution, showing good compatibility.

[0050] In summary, according to the embodiments of this disclosure, by assigning a globally unique, monotonically increasing version number to each revocation record and maintaining an ordered linked list of consistent views arranged in chronological order, the minimum dependent version number can be obtained by directly accessing the head of the linked list, and dependency judgment can be completed through simple numerical comparison, reducing the time complexity from O(n) to O(1), eliminating the overhead of linked list search, reducing lock contention, and improving the system's concurrent processing capability and scalability.

[0051] Figure 4 A flowchart of a process 400 for data processing according to some embodiments of the present disclosure is shown. Process 400 may be implemented in environment 100, for example, process 400 may be implemented at electronic device 110. In the following discussion, reference will be made to… Figure 1 To describe process 400.

[0052] In box 410, electronic device 110 obtains the first version number of the revocation record. The first version number indicates the creation time of the revocation record and is globally unique and monotonically increasing.

[0053] In box 420, electronic device 110 obtains an ordered linked list, the ordered linked list including at least one second version number, the at least one second version number being added to the ordered linked list sequentially from the tail of the ordered linked list in an early to late order based on the creation time of the associated consistent view.

[0054] In box 430, electronic device 110 obtains a second version number from the end of the ordered linked list, the second version number being associated with the first version number of the revocation record upon which the consistent view depends.

[0055] In box 440, electronic device 110 responds to the first version number being less than the second version number by clearing the undo record.

[0056] In some embodiments, process 400 further includes: canceling the cleanup of undo records in response to a first version number being greater than or equal to a second version number.

[0057] In some embodiments, cleaning up revocation records includes: determining the state of a consistency view associated with the revocation record; and cleaning up the revocation record in response to a state indication that the consistency view associated with the revocation record is inactive.

[0058] In some embodiments, process 400 further includes: pausing the cleanup of revocation records until the status is updated to an inactive state in response to a status indication that the consistent view associated with the revocation record is active.

[0059] In some embodiments, process 400 further includes setting a read lock for the second version number while retrieving the second version number from the end of the ordered linked list.

[0060] In some embodiments, the ordered linked list is created by: in response to the creation of a consistent view, obtaining the first version number of the revocation record on which the created consistent view depends; adding the first version number of the revocation record on which the created consistent view depends to the ordered linked list from the tail of the ordered linked list; and in response to the cleanup of the created consistent view, removing the first version number of the revocation record on which the cleaned consistent view depends from the ordered data structure.

[0061] In some embodiments, process 400 further includes: setting a write lock on the first version number of the revocation record on which the created consistent view depends, while adding the first version number of the revocation record on which the consistent view depends to the ordered list from the tail of the ordered list; and setting a write lock on the first version number of the revocation record on which the cleaned consistent view depends, while removing the first version number of the revocation record on which the cleaned consistent view depends from the ordered data structure.

[0062] In some embodiments, process 400 further includes: in response to the creation of a revocation record, associating a corresponding first version number with the created revocation record.

[0063] Figure 5 A block diagram of an apparatus 500 for data processing according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in an electronic device 110.

[0064] The apparatus 500 includes: a first acquisition module 510 configured to acquire a first version number of a revocation record, the first version number indicating the creation time of the revocation record, and the first version number being globally unique and monotonically increasing; a second acquisition module 520 configured to acquire an ordered linked list, the ordered linked list including at least one second version number, the at least one second version number being added sequentially from the tail of the ordered linked list in an early-to-late order based on the creation time of the associated consistency view; a third acquisition module 530 configured to acquire a second version number from the end of the ordered linked list, the second version number being associated with the first version number of the revocation record on which the consistency view depends; and a cleanup module 540 configured to clean up the revocation record in response to the first version number being less than the second version number.

[0065] In some embodiments, the cleanup module 540 is further configured to cancel the cleanup undo record in response to a first version number being greater than or equal to a second version number.

[0066] In some embodiments, the cleanup module 540 is further configured to determine the status of the consistency view associated with the revocation record; and to clean up the revocation record in response to a status indication that the consistency view associated with the revocation record is inactive.

[0067] In some embodiments, the cleanup module 540 is further configured to suspend cleanup of the revocation record until the status is updated to inactive, in response to a status indication that the consistent view associated with the revocation record is active.

[0068] In some embodiments, the device 500 further includes a first locking module configured to set a read lock for the second version number during the process of obtaining the second version number from the end of the ordered linked list.

[0069] In some embodiments, the apparatus 500 further includes a linked list maintenance module configured to, in response to the creation of a consistent view, obtain a first version number of the revocation record on which the created consistent view depends; add the first version number of the revocation record on which the created consistent view depends to the ordered linked list from the tail of the ordered linked list; and, in response to the cleanup of the created consistent view, remove the first version number of the revocation record on which the cleaned consistent view depends from the ordered data structure.

[0070] In some embodiments, the apparatus 500 further includes a second locking module configured to set a write lock on the first version number of the revocation record on which the created consistent view depends during the addition of the first version number of the revocation record on which the consistent view depends to the revocation record from the tail of the ordered linked list to the ordered linked list; and to set a write lock on the first version number of the revocation record on which the cleaned consistent view depends during the removal of the first version number of the revocation record on which the cleaned consistent view depends from the ordered data structure.

[0071] In some embodiments, the apparatus 500 further includes a version allocation module configured to associate a corresponding first version number with the created revocation record in response to the creation of the revocation record.

[0072] The modules included in device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units in device 500 can be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.

[0073] Figure 6 A block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 6 The electronic device 600 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. The electronic device 600 can be used with the database server 130 mentioned above.

[0074] like Figure 6 As shown, electronic device 600 is in the form of a general-purpose electronic device. Components of electronic device 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. Processing unit 610 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 600.

[0075] Electronic device 600 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 620 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 630 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data and accessible within electronic device 600.

[0076] Electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 6 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 620 may include computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.

[0077] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 600 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 600 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or another network node.

[0078] Input device 650 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 660 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 600 can also communicate with one or more external devices (not shown) via communication unit 640 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 600, or with any device that enables electronic device 600 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interfaces (not shown).

[0079] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores one or more computer instructions, wherein the one or more computer instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transient computer-readable medium and includes computer-executable instructions that are executed by a processor to implement the methods described above.

[0080] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0081] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0082] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0083] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0084] Various implementations of this disclosure have been described above. The foregoing description is exemplary and not exhaustive, nor is it limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the implementations disclosed herein.

Claims

1. A method for data processing, comprising: Obtain the first version number of the revocation record, where the first version number indicates the creation time of the revocation record, and the first version number is globally unique and monotonically increasing; Obtain an ordered linked list, the ordered linked list including at least one second version number, the at least one second version number being added to the ordered linked list sequentially from the tail of the ordered linked list in order from earliest to latest based on the creation time of the associated consistent view; The second version number is obtained from the end of the ordered linked list, and the second version number is associated with the first version number of the revocation record on which the consistent view depends; as well as In response to the first version number being less than the second version number, the revocation record is cleared.

2. The method according to claim 1, further comprising: In response to the first version number being greater than or equal to the second version number, the cleanup of the revocation record is cancelled.

3. The method according to claim 1, wherein clearing the revocation record comprises: Determine the state of the consistency view associated with the revocation record; In response to the status indication that the consistency view associated with the revocation record is inactive, the revocation record is cleaned up.

4. The method according to claim 3, further comprising: In response to the status indication that the consistent view associated with the revocation record is in an active state, the cleanup of the revocation record is paused until the status is updated to the inactive state.

5. The method according to claim 1, further comprising: During the process of obtaining the second version number from the end of the ordered linked list, a read lock is set for the second version number.

6. The method according to claim 1, wherein the ordered linked list is created in the following manner: In response to the creation of a consistent view, obtain the first version number of the undo record on which the created consistent view depends; The first version number of the undo record on which the created consistent view depends is added to the ordered linked list from the tail of the ordered linked list; as well as In response to the cleanup of the created consistent view, the first version number of the revocation record on which the cleaned consistent view depends is removed from the ordered data structure.

7. The method of claim 6, further comprising: During the process of adding the first version number of the revocation record on which the created consistent view depends to the ordered linked list from the tail of the ordered linked list, a write lock is set for the first version number of the revocation record on which the created consistent view depends. as well as During the removal of the first version number of the revocation record on which the cleaned-up consistent view depends from the ordered data structure, a write lock is set for the first version number of the revocation record on which the cleaned-up consistent view depends.

8. The method according to claim 1, further comprising: In response to the creation of an undo record, associate the corresponding first version number with the created undo record.

9. An apparatus for data processing, comprising: The first acquisition module is configured to acquire the first version number of the revocation record, wherein the first version number indicates the creation time of the revocation record, and the first version number is globally unique and monotonically increasing; The second acquisition module is configured to acquire an ordered linked list, the ordered linked list including at least one second version number, the at least one second version number being added to the ordered linked list sequentially from the tail of the ordered linked list in order from earliest to latest based on the creation time of the associated consistent view; The third acquisition module is configured to acquire a second version number from the end of the ordered linked list, the second version number being associated with the first version number of the revocation record on which the consistent view depends; as well as The cleanup module is configured to clean up the revocation record in response to the first version number being less than the second version number.

10. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 8.

12. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 8.