Data processing method, computer readable storage medium, and electronic device

By finely managing the data objects to be eliminated in the cache pool extension, the problem of cold data replacing hot data in the cache pool extension is solved, the database execution efficiency and the efficiency of cache pool extension are improved, and performance improvements under specific loads are achieved.

WO2025153891A1PCT designated stage expired Publication Date: 2025-07-24CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD

Patent Information

Application Number
PCT/IB2024/063268
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-19
Filing Date
2024-12-30
Publication Date
2025-07-24

AI Technical Summary

Technical Problem

In the prior art, the cache pool extension directly caches the data pages eliminated in the cache pool into the cache pool extension, causing cold data to replace hot data, resulting in a decrease in database execution efficiency, and data in the cache pool extension under complex load conditions is frequently replaced, making efficient caching impossible.

Method used

By obtaining the data objects to be eliminated from the first storage medium, using a preset data granularity storage format, and filtering the data objects to be eliminated based on the preset strategy, selecting the target data objects, and determining their indexing method in the second storage medium, fine management is realized, avoiding cold data to replace hot data, and improving the efficiency of cache pool expansion.

Benefits of technology

It realizes refined management of cache pool expansion, improves the efficiency of cache pool expansion, improves the execution efficiency of databases, and ensures performance indicators of specific tasks and cache speed up under load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2024063268_24072025_PF_FP_ABST
    Figure IB2024063268_24072025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of computers. Disclosed are a data processing method, a computer readable storage medium, and an electronic device. The method comprises: acquiring, from a first storage medium, data objects to be evicted, wherein the data objects to be evicted use a data storage format of a preset data granularity; on the basis of a preset customization policy, selecting a target data object from among the data objects to be evicted, and determining an indexing method of the target data object in a second storage medium; and caching the target data object to the second storage medium according to the indexing method in the second storage medium, wherein the preset customization policy comprises: a filtering condition, the filtering condition being used for performing data filtering on the data objects to be evicted, and the second storage medium is an extended storage area of the first storage medium. The present invention solves the technical problems in the related art that database execution efficiency is low and cache efficiency is low due to directly caching evicted data pages in a buffer pool into a buffer pool extension.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] TECHNICAL FIELD The present disclosure relates to the field of computer technology, and more specifically, to a data processing method, a computer-readable storage medium, and an electronic device. Background: In a database, a buffer pool (BP) is used to cache data pages read from disk in memory, thereby reducing disk input / output (I / O) operations and improving database execution efficiency. However, due to limited memory resources, not all data pages can be cached. Therefore, when the data volume is much larger than the buffer pool size, I / O operation performance will still be reduced. To address this issue, a buffer pool extension (BPE) has been proposed. This extends the memory-based buffer pool using small-capacity, high-speed storage media to increase cache capacity while also balancing performance and storage costs by combining it with low-speed storage media. Currently, buffer pool extension directly caches discarded data pages in the buffer pool into the buffer pool extension. If the discarded data is infrequently used cold data, a large amount of cold data will be cached in the buffer extension pool, replacing hot data in the buffer extension pool and reducing database execution efficiency. Especially under complex load conditions, data cached in the cache pool extension is frequently replaced, preventing efficient caching. Currently, no effective solution has been proposed to address the aforementioned issues. SUMMARY OF THE INVENTION Embodiments of the present disclosure provide a data processing method, a computer-readable storage medium, and an electronic device to at least address the technical problem in related art of directly caching eliminated data pages from the cache pool into the cache pool extension, resulting in low database execution efficiency and low caching efficiency. According to one aspect of the embodiments of the present disclosure, a data processing method is provided, comprising: obtaining data objects to be eliminated from a first storage medium, wherein the data objects to be eliminated utilize a data storage format with a preset data granularity; selecting a target data object from the data objects to be eliminated based on a preset customized policy, and determining an indexing method for the target data object in a second storage medium; and caching the target data object in the second storage medium based on the indexing method in the second storage medium. The preset customized policy includes a filtering condition for filtering data objects to be eliminated, and the second storage medium is an extended storage area of ​​the first storage medium. According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program runs, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned data processing methods.According to another aspect of the present disclosure, an electronic device is provided, including: a memory storing an executable program; and a processor configured to execute the program, wherein when the program executes, any one of the aforementioned data processing methods is performed. According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when executed by the processor, the computer program implements any one of the aforementioned data processing methods. In the embodiments of the present disclosure, data objects to be eliminated are retrieved from a first storage medium, and then filtered based on filter conditions customized by a preset customization policy. A target data object is selected from the data objects to be eliminated, and an indexing method for the target data object in a second storage medium is determined. Finally, the target data object is cached in the second storage medium based on the indexing method in the second storage medium. This achieves the goal of caching different data objects to be eliminated in the first storage medium in different ways. By introducing different cache customization schemes and cache size customization schemes, refined management of the cache pool extension is achieved, enabling efficient caching and caching speed-up for specific workloads. This improves the utilization efficiency of the cache pool extension and database execution efficiency, thereby resolving the technical problem in related technologies of directly caching eliminated data pages from the cache pool into the cache pool extension, resulting in low database execution efficiency and low caching efficiency. It should be noted that the general description above and the detailed description below are merely examples and explanations of the present disclosure and do not constitute limitations of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings described herein are intended to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are intended to explain the present disclosure and do not constitute undue limitations thereon. In the accompanying drawings: FIG[ is a schematic diagram of a cache with an expanded cache pool; FIG2 is a hardware block diagram of a computer terminal (or mobile device) for implementing a data processing method according to Example 1 of the present disclosure; FIG3 is a flow chart of a data processing method according to Example 1 of the present disclosure; FIG4 is a schematic diagram of a cache with an expanded cache pool according to Example 1 of the present disclosure; FIG5 is a flow chart of another data processing method according to Example 1 of the present disclosure; FIG6 is a flow chart of a data page query according to Example 1 of the present disclosure; FIG7 is a flow chart of yet another data processing method according to Example 1 of the present disclosure; FIG8 is a schematic diagram of the structure of a data processing device according to Example 2 of the present disclosure; and FIG9 is a block diagram of the structure of a computer terminal according to an embodiment of the present disclosure.DETAILED DESCRIPTION To help those skilled in the art better understand the present disclosure, the following will provide a clear and complete description of the technical solutions in the embodiments of the present disclosure, in conjunction with the accompanying drawings. It should be noted that the described embodiments represent only a portion of the embodiments of the present disclosure, and are not exhaustive. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without inventive effort should fall within the scope of protection of the present disclosure. It should be noted that the terms "first," "second," and so on, in the specification and claims of the present disclosure, and in the accompanying drawings, are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that such terms are interchangeable where appropriate, such that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to the steps or units expressly listed, but may include other steps or units not expressly listed or inherent to such process, method, product, or apparatus. First, some terms or terms that appear in the description of the embodiments of this disclosure are explained as follows: Buffer pool (BP): A memory area used to store and manage objects, reducing the frequency of object creation and destruction, thereby improving system performance and responsiveness. A buffer pool typically pre-creates a certain number of objects and provides these objects to applications when needed. When objects are no longer needed, they are not destroyed but instead placed back into the buffer pool for subsequent use. This reduces the frequency of object creation and destruction in the system, saving resources and improving performance. Buffer pool extension (BPE): This is an extension of the buffer pool that allows the buffer pool size to be dynamically expanded to meet system requirements when the buffer pool is insufficient. When the buffer pool is insufficient, the buffer pool extension automatically creates new objects and adds them to the buffer pool to meet system requirements. This allows for more flexible management of system resources and improves system performance and availability. Cold data: Data that is infrequently accessed and used, typically historical data or long-term unchanging data, such as sales records from past years or old customer information. This data usually does not require fast access and processing, so it can be stored on lower-performance storage devices such as disks or tapes.Hot data refers to frequently accessed and used data, typically active data such as recent transaction records and latest order information. This data typically requires fast access and processing, and is therefore typically stored on high-performance storage devices such as memory or solid-state drives. A shared buffer hash (SharedBufHash) is a data structure used to manage caches. It stores data in a buffer pool and maps data to specific buffer blocks using a hashing algorithm. This allows for fast lookup and access of data in the buffer, improving data read speed and access efficiency. Buffer descriptors are metadata associated with buffer blocks, used to describe and manage the data in the buffer. Buffer descriptors contain information such as data metadata, storage location, and access permissions, helping the system better manage and utilize cache resources. Buffer blocks are the smallest storage unit in the buffer pool, used to store data fragments. Each buffer block has a fixed size, typically measured in bytes. When data is stored in the cache, it is split into multiple cache blocks and then stored in different cache blocks. This allows for better utilization of cache resources and improved data access efficiency. Cache Pool Extension Hash (BPE Hash): This method uses a hash table to increase cache pool capacity and performance. By mapping the key-value pairs of cached objects into a hash table, this method enables fast object lookup and storage. When the original cache pool capacity is insufficient, the hash table can be expanded to increase cache pool capacity, thereby improving cache pool performance and efficiency. Cache Pool Extension Descriptors (BPE Descriptors): This method uses a descriptor list to increase cache pool capacity and performance. By storing cached object descriptors in a list and indexing them, this method enables fast object lookup and storage. When the original cache pool capacity is insufficient, this method can be expanded to increase cache pool capacity, thereby improving cache pool performance and efficiency. Freelist: This method is used to store a list of free data pages. A data page is the basic unit of data storage in a database. When data is deleted or moved, the occupied data page becomes free. These free data pages are added to a freelist so that they can be retrieved and reused when new data pages are needed. This reduces database fragmentation and improves data storage efficiency.Figure 1 is a schematic diagram of a cache pool extension. The caching process of a traditional cache pool extension is shown in Figure 1. The cache pool includes a shared cache hash, cache descriptors, and cache blocks, while the cache pool extension includes a cache pool extension hash and cache pool extension descriptor. The cache pool stores data pages on slow media, while the cache pool extension utilizes high-speed media to store more data pages. Traditional methods cache retired data pages directly into the cache pool extension. If the retired data is infrequently used, a large amount of cold data will be cached in the cache extension pool, replacing hot data in the cache extension pool, resulting in reduced database execution efficiency. Furthermore, traditional methods only set the total size of the cache pool, making it impossible to fine-tune the management of the cache pool extension. Consequently, they cannot guarantee the performance indicators of specific tasks, such as those for data services that require constant high performance while being immune to heavy loads. As can be seen, under complex load conditions, traditional cache pool extensions frequently replace cached data in the cache pool extension, preventing efficient caching. Furthermore, in multi-tenant scenarios, high-speed caching for specific tenants is impossible, meaning refined caching is not possible. Related technologies that directly cache retired data pages from the cache pool into the cache pool extension suffer from the following drawbacks: Defect 1: Cold data may replace hot data in the cache extension pool, resulting in reduced database execution efficiency. Furthermore, under complex load conditions, data cached in the cache pool extension is frequently replaced, preventing efficient caching. Defect 2: Setting only the total size of the cache pool prevents refined management of the cache pool extension, thus failing to guarantee performance indicators for specific tasks. Prior to the present disclosure, no effective solutions to these drawbacks have been proposed. Example 1: According to an embodiment of the present disclosure, a data processing method is provided. It should be noted that the steps shown in the flowcharts of the accompanying figures can be executed in a computer system, such as a set of computer-executable instructions. Furthermore, although the flowcharts illustrate a logical sequence, in some cases, the steps shown or described may be executed in a different order. The method embodiment provided in the first embodiment of the present disclosure can be executed in a mobile terminal, a computer terminal or a similar computing device. FIG2 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method according to the second embodiment of the present disclosure.As shown in FIG2 , a computer terminal 20 (or mobile device) may include one or more processors 202 (illustrated as 202a, 202b, ..., 202n in the figure) (processor 202 may include, but is not limited to, a processing device such as a microprocessor (MCU) or a programmable logic device (FPGA), a memory 204 for storing data, and a transmission device 206 for communication functions. In addition, the computer terminal 20 may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS), a network interface, a power supply, and / or a camera. Those skilled in the art will appreciate that the structure shown in FIG2 is merely illustrative and does not limit the structure of the electronic device. For example, the computer terminal 20 may include more or fewer components than shown in FIG2 , or have a configuration different from that shown in FIG2 . It should be noted that the one or more processors 202 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." This data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuit can be a single, independent processing module, or fully or partially integrated into any of the other components of the computer terminal 20 (or mobile device). As described in the embodiments of the present disclosure, the data processing circuit acts as a processor control (e.g., selecting a path for a variable resistor terminal connected to an interface). Memory 204 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data processing method in the embodiments of the present disclosure. Processor 202 executes the software programs and modules stored in memory 204 to perform various functional applications and data processing, thereby implementing the aforementioned data processing method. Memory 204 can include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 204 can further include memory remotely located from processor 202, and such remote memory can be connected to computer terminal 20 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. Transmission device 206 is used to receive or transmit data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communication provider of the computer terminal 20 .In one example, the transmission device 206 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In another example, the transmission device 206 can be a radio frequency (RF) module for wireless communication with the Internet. The display can be, for example, a touchscreen liquid crystal display (LCD), which enables a user to interact with the user interface of the computer terminal 20 (or mobile device). In the above operating environment, the present disclosure provides a data processing method as shown in Figure 3. Figure 3 is a flow chart of a data processing method according to Example 1 of the present disclosure. As shown in FIG3 , the method may include the following steps: Step S31: Retrieving data objects to be eliminated from a first storage medium, wherein the data objects to be eliminated are stored in a data format with a preset data granularity; Step S32: Selecting a target data object from the data objects to be eliminated based on a preset customized policy, and determining an indexing method for the target data object in a second storage medium; Step S33: Cache the target data object in the second storage medium based on the indexing method in the second storage medium; wherein the preset customized policy includes a filtering condition for filtering data objects to be eliminated, and the second storage medium is an extended storage area of ​​the first storage medium. The first storage medium may be a buffer pool (BP) for caching data objects, such as data pages, read from a disk in memory. oThe second storage medium is an extended storage area of ​​the first storage medium and can be a buffer pool extension (BPE), used to cache data objects eliminated from the buffer pool. It is understood that due to the limited capacity of the buffer pool, when the amount of data to be cached far exceeds the buffer pool size, it is necessary to eliminate some of the data from the buffer pool and cache it in the buffer pool extension. The data objects to be eliminated can be data objects to be eliminated from the buffer pool, such as data pages to be eliminated. In the disclosed embodiments, the data objects to be eliminated adopt a data storage format with a preset data granularity, which can be understood as storing the data objects to be eliminated at the preset granularity. For example, the preset granularity can be 4KB, 8KB, 16KB, 32KB, etc., and can be determined based on the actual database system and storage engine, and is not limited here. By customizing the cache size for data objects to be eliminated using the preset granularity, database performance and storage efficiency can be improved. Considering that directly caching data objects to be eliminated from the buffer pool in the buffer pool extension may cause cold data to replace hot data, resulting in low database execution efficiency and low cache efficiency. Therefore, the disclosed embodiments, based on a preset customization policy, perform targeted customized caching of data objects to be eliminated in the cache pool. Different caching methods are customized according to the characteristics of different data objects, thereby caching them in the cache pool extension using different caching methods. This allows for refined management of the cache pool extension, thereby improving the efficiency of the cache pool extension and achieving efficient caching. The preset customization policy includes a filtering condition. Optionally, the preset customization policy can include multiple filtering conditions, i.e., multiple rules, which can be understood as a policy that customizes different caching methods for different data objects. By way of example, different caching methods can be customized for users, databases, data tables, and data ranges, although this is not a limitation. The disclosed embodiments filter data objects to be eliminated using multiple filtering conditions customized by the preset customization policy. This selects a target data object from the data objects to be eliminated based on the different filtering conditions and determines the indexing method for the target data object in the cache extension pool. In the disclosed embodiment, data objects to be eliminated are obtained from a first storage medium and stored according to a preset data granularity. The data objects to be eliminated are then filtered based on filter conditions customized according to a preset customization policy. A target data object is selected from the data objects to be eliminated, and an indexing method for the target data object in a second storage medium is determined. Based on the determined indexing method, different target data objects are cached in the second storage medium according to the corresponding indexing method, thereby achieving customized caching methods for different data objects to be eliminated in a cache pool.As can be seen, the disclosed embodiments introduce a customized cache pool extension filtering strategy to customize different caching methods for different data objects to be eliminated in the cache pool, achieving refined management of the cache pool extension. This avoids performance jitter caused by directly caching data in the cache pool extension under cold loads, thereby improving the efficiency of the cache pool extension and achieving efficient caching. Furthermore, different data objects to be eliminated are stored at a preset data granularity, allowing for customized cache sizes for each data object to be eliminated, effectively customizing performance and accelerating cache execution for specific workloads. Furthermore, by customizing different caching methods for different data objects to be eliminated and caching them in the cache pool extension, the efficiency of the cache pool extension can be improved, further enhancing database execution efficiency. FIG4 is a schematic diagram of a cache of a buffer pool extension according to Example 1 of the present disclosure. As shown in FIG4 , the buffer pool includes a shared buffer hash (SharedBufHash), buffer descriptors (Buffer Descriptors), and buffer blocks (Buffer Blocks), and the buffer pool extension includes a buffer pool extension hash (BPE Hash) and buffer pool extension descriptors (BPE Descriptors). oThe cache pool stores data pages on low-speed media, while the cache pool extension can utilize high-speed media to store more data pages. As can be seen, the present disclosure filters out data pages from the cache pool based on a customized caching policy, caching only qualified data pages into the cache pool extension, thereby achieving customized database performance and improving user efficiency. The data processing methods provided in the embodiments of the present disclosure can be applied, but are not limited to, to data caching scenarios in e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services, for example, data caching scenarios in e-commerce services, education services, and medical services, without limitation herein. According to the disclosed embodiments, data objects to be eliminated are retrieved from a first storage medium. The data objects are then filtered based on filter conditions customized by a preset customization policy. A target data object is selected from the data objects to be eliminated, and an indexing method for the target data object in a second storage medium is determined. Finally, the target data object is cached in the second storage medium based on the indexing method in the second storage medium. This achieves the goal of caching different data objects to be eliminated in the first storage medium in different ways. By introducing different cache customization schemes and cache size customization schemes, the cache pool extension can be managed in a refined manner, achieving efficient caching and accelerating cache performance for specific loads. This improves the utilization efficiency of the cache pool extension and database execution efficiency, thereby resolving the technical problem in related technologies of directly caching eliminated data pages from the cache pool into the cache pool extension, resulting in low database execution efficiency and low caching efficiency. In an optional embodiment, the data objects to be eliminated are cached data of a preset database system, the first storage medium is a cache pool for the cached data, and the second storage medium is a cache pool extension for the cached data. In the embodiments of the present disclosure, the data objects to be eliminated may be cached data of a preset database system, i.e., data of the preset database system. The first storage medium is a cache pool for caching data, i.e., a cache pool for caching data of the preset database system. The second storage medium is a cache pool extension for caching data of the preset database system, i.e., an extended storage area of ​​the first storage medium. It is understood that the first storage medium and the second storage medium can cache data of the database system or data of other data systems, and this is not a limitation herein.In an optional embodiment, in step S32, a target data object is selected from the data objects to be eliminated based on a preset customized policy. The method includes the following steps: Step S321: Obtaining status information of the data object to be eliminated, wherein the status information is used to determine whether the data object to be eliminated is cold data, whether the data object to be eliminated has been stored in the second storage medium, and whether the data object to be eliminated has undergone data updates in the first storage medium; Step S322: Using the preset customized policy and the status information, the data objects to be eliminated are filtered to obtain the target data object. In the disclosed embodiment, when selecting the target data object from the data objects to be eliminated based on the preset customized policy, the target data object can be obtained by obtaining the status information of the data object to be eliminated and then filtering the data objects to be eliminated using the preset customized policy and the obtained status information. The status information can be used to determine whether the data object to be eliminated is cold data, that is, whether the data object to be eliminated has not been referenced or has not been used for a long time. It is understood that if a data page appears to be still in use, then the data page is hot data. The status information can also be used to determine whether the data object to be eliminated has been stored in the second storage medium, that is, whether the data object to be eliminated has been cached in the cache pool extension. Furthermore, the status information can be used to determine whether the data object to be eliminated has undergone data updates in the first storage medium, that is, whether the data object to be eliminated has undergone data updates in the cache pool. It can be understood that if a data page in the in-memory cache pool has been modified, it indicates that the data page has undergone data updates in the cache pool, and therefore the data page is invalid. Correspondingly, if the data page in the in-memory cache pool has not been modified, it indicates that the data page has not undergone data updates in the cache pool, and therefore the data page is valid. Based on the preset customized policy and the obtained status information, the data objects to be eliminated can be filtered, thereby filtering out data objects that do not meet the filtering conditions specified in the preset customized policy. This can be understood as skipping the data objects that do not meet the filtering conditions specified in the preset customized policy and traversing the next data object, thereby filtering out the target data object from the data objects to be eliminated.In an optional embodiment, the state information includes: a first state, wherein the first state is used to determine that the data object to be eliminated is hot data and has been stored in the second storage medium; a second state, wherein the second state is used to determine that the data object to be eliminated is cold data, has been stored in the second storage medium, and has not undergone data updates on the data object to be eliminated in the first storage medium; a third state, wherein the third state is used to determine that the data object to be eliminated is cold data, has not been stored in the second storage medium, and satisfies any target storage extension rule in a preset rule list; or the third state is used to determine that the data object to be eliminated is cold data, has been stored in the second storage medium, has undergone data updates on the first storage medium, and satisfies any target storage extension rule in the preset rule list. In the disclosed embodiment, the state information of the data object may include the first state, the second state, and the third state. A data object in the first state indicates that the data object is still in use and has been cached in the cache pool extension. This means that the data object is hot data and has been stored in the second storage medium. It should be understood that whether the data object is invalid or valid is not considered when the data object is in the first state. A data object in the second state indicates that the data object is unused, cached in the cache pool extension, and still valid. This means that the data object is cold data, has been stored in the second storage medium, and has not been updated in the first storage medium. A data object in the third state indicates that the data object is unused, not cached in the cache pool extension, and satisfies the policy list. This means that the data object is cold data, has not been stored in the second storage medium, and satisfies any target storage extension rule in the preset rule list. Alternatively, a data object in the third state indicates that the data object is unused, has been cached in the cache pool extension but has become invalid, and satisfies the policy list. This means that the data object is cold data, has been stored in the second storage medium, has undergone data updates in the first storage medium, and satisfies any target storage extension rule in the preset rule list. The preset rule list is a list of multiple storage extension rules customized by a preset customized policy, denoted as bpe_rule_list, and the target storage extension rules are cache rules customized for different data objects. Exemplarily, the bpe rule list can be defined as:

[0002] (1) Multiple rules in the bpe rule list can be sorted from small to large according to their range size;

[0003] (2) Do not allow any two rules to have overlapping ranges, only support range inclusion;

[0004] (3) The total cache space corresponding to each rule (calculated based on the maximum scope of the rule; when a rule is included in a rule with a larger scope, the larger scope is used for calculation) cannot exceed the maximum cache expansion limit;

[0005] (4) It is required that rules cannot conflict with each other. At the same time, when a rule contains another rule, the rule with a smaller scope cannot be empty, and the corresponding cache space cannot exceed the cache space corresponding to the rule with a larger scope. In an optional embodiment, the preset rule list includes: multiple storage extension rules, and the multiple storage extension rules each include: multiple custom fields, wherein the field content of the multiple custom fields is determined based on the object query attribute of the data object to be eliminated. In the embodiment of the present disclosure, the preset rule list includes multiple storage extension rules, each storage extension rule is recorded as bpe rule, and each storage extension rule includes multiple custom fields. The field content of the multiple custom fields can be determined based on the object query attribute of the data object to be eliminated. For example, the node information package can be determined based on the key of each data page. It can be understood that the key of the data page is used to query the keyword of this page. In an optional embodiment, the multiple custom fields include at least some of the following fields: user information custom field; database custom field; data table custom field; data block custom field; maximum storage capacity custom field; current storage capacity custom field; linked list structure header identifier custom field. Exemplarily, the bpe rule in the embodiment of the present disclosure may include at least some of the following fields:

[0006] (1) User information customization field, namely owner / / field, is used to record customized user information. All data pages created by this user can be cached. If it is empty, it means there is no restriction on the user;

[0007] (2) Database custom fields, namely the "database" field, are used to represent all data belonging to this database. If it is empty, it means that there is no restriction on the database and all databases can be cached;

[0008] (3) Data table custom fields, namely relation / / fields, are used to cache data of the specified table. If it is empty, it means no restriction on the table;

[0009] (4) Data block customization field, namely blocklist. / / Field, used to cache the specified data block. If it is empty, it means no restriction;

[0010] (5) Maximum storage capacity customization field, namely size / / field, is used to specify the maximum cache space of this rule. If it is empty, it means no limit;

[0011] (6) Current storage capacity custom field, namely current_size / / field, used to record the current cache size;

[0012] (7) The header of the linked list structure identifies a custom field, namely the dlist head field, which is used to record the rule cache. Step S3221 uses a preset customized strategy to filter out target data objects from among the data objects to be eliminated that do not satisfy at least one of the first, second, and third states. In this embodiment of the present disclosure, when filtering data objects to be eliminated using the preset customized strategy and state information, if the data object to be eliminated does not satisfy the first, second, or third states, the filtering is performed on the data object to be eliminated, thereby skipping the data object to be eliminated and traversing the next data object to be eliminated to obtain the target data object. It should be understood that if the data object to be eliminated satisfies any of the first, second, and third states, it is retained. In an optional embodiment, in step S32, based on a preset customized policy, an indexing method for the target data object in the second storage medium is determined, including the following method steps: Step S323: In response to the target data object being in a first state, obtaining a first linked list position corresponding to the target data object in a preset linked list structure set in the second storage medium, wherein the first linked list position is an initial linked list position corresponding to the identifier of the target data object in the preset linked list structure; Step S324: Based on the preset customized policy, adjusting the first linked list position to a second linked list position, wherein the second linked list position is a target linked list position corresponding to the identifier of the target data object in the preset linked list structure, and the second linked list position is located at the head of the preset linked list structure. The preset linked list structure may be a BPE Least Recently Used (LRU) linked list, which is used to determine which data pages should be retained in the cache and which data pages should be removed based on recent usage. In an embodiment of the present disclosure, if a target data object is determined to be in a first state, i.e., the target data object is still in use and cached in the buffer pool extension, a first linked list position corresponding to the target data object is retrieved from the BPE LRU linked list configured in the buffer pool extension. The first linked list position is the initial linked list position corresponding to the identifier of the target data object in the preset linked list structure, which can be understood as the BPE LRU linked list position corresponding to the data page. Exemplarily, the identifier of the target data object can be determined based on a preset data granularity. For example, if the preset data granularity is 8KB, the identifier can be a number representing each 8KB, but this is not a limitation. After determining the first linked list position, the first linked list position is adjusted to a second linked list position based on the preset customization policy of the present disclosure. The second linked list position is located at the head of the preset linked list structure, i.e., the BPE LRU head position.In other words, if a data page is still in use and cached in the BPE, it is considered hot data and should not be evicted from the BP. Since the BPE primarily stores data pages that have been evicted from the BP, the data page can be cached solely in the BP and does not need to be redundantly cached in the BPE. Therefore, the data page must be moved to the head of the BPE LRU. Since the head of the BPE LRU is evicted first and the tail is evicted last, a data page located at the head of the BPE LRU will be evicted first in the BPE, reducing redundant cache space in the BPE. In an optional embodiment, in step S32, based on a preset customization policy, determining an indexing method of the target data object in the second storage medium includes the following method steps: Step S325, in response to the target data object being in the second state, obtaining a third linked list position corresponding to the target data object in a preset linked list structure set in the second storage medium, wherein the third linked list position is an initial linked list position corresponding to the identifier of the target data object in the preset linked list structure; Step S326, based on the preset customization policy, adjusting the third linked list position to a fourth linked list position, wherein the fourth linked list position is a target linked list position corresponding to the identifier of the target data object in the preset linked list structure, and the fourth linked list position is located at the end of the linked list of the preset linked list structure. In an embodiment of the present disclosure, if the target data object is determined to be in the second state (i.e., unused, cached, and still valid in the buffer pool extension), the third linked list position corresponding to the target data object is retrieved from the BPE LRU linked list set in the buffer pool extension. The third linked list position is the initial linked list position corresponding to the identifier of the target data object in the preset linked list structure, which can be understood as the BPE LRU linked list position corresponding to the data page. After determining the third linked list position, based on the preset customization policy of the present disclosure, the third linked list position is adjusted to the fourth linked list position. The fourth linked list position is located at the end of the preset linked list structure, i.e., the BPE LRU tail position. In other words, if the data page is cold data, already cached in the BPE and still valid, it indicates that the data page meets the long-term caching criteria of the BPE. Therefore, the data page is cached in the BPE and its position is moved to the end of the BPE LRU. Since the tail of the BPE LRU is eliminated last, the data page at the tail of the BPE LRU will be eliminated last in the BPE, thereby ensuring that the data page will not be easily replaced.In an optional embodiment, in step S32, based on a preset customized policy, determining an indexing method of the target data object in the second storage medium includes the following method steps: Step S327, in response to the target data object being in the third state, allocating a fifth linked list position for the target data object in a preset linked list structure corresponding to the target storage extension rule set in the second storage medium, wherein the fifth linked list position is located at the head of the linked list of the preset linked list structure; Step S328, based on the preset customized policy, adjusting the fifth linked list position to a sixth linked list position, wherein the sixth linked list position is located at the tail of the linked list of the preset linked list structure. In the disclosed embodiment, if the determined target data object is in the third state (i.e., unused, not cached in the buffer pool extension, and meeting the policy list, or unused, cached in the buffer pool extension but invalid, and meeting the policy list), a BPE slot is allocated for the data page starting from the head of the BPE LRU. BPE slots can be numbered 8KB each. This can be understood as allocating a BPE slot from the linked list pointed to by the head of the doubly linked list (dlist head) of the rule that meets the conditions, i.e., the fifth linked list position. This fifth linked list position is the head of the BPE LRU. It can be understood that BPE slots are allocated starting from the head of the BPE LRU. Regardless of whether a data page is stored in this position, the newly cached data page will be replaced and then moved to the end of the BPE LRU. For example, when allocating a BPE slot, it is determined whether the cache size of the current data page exceeds the maximum cache size. If it does not exceed the total cache size, a slot can be allocated from the freelist. If the freelist is empty, it is determined whether there is a rule containing the current data page. The slot can be allocated from the head of the linked list pointed to by the parent rule's dlist_head. If the slot exceeds the total cache size, the slot can be allocated from the head of the linked list pointed to by the current rule's dlist_head. After determining the fifth linked list position, the sixth linked list position is adjusted based on the preset customized policy disclosed herein. The sixth linked list position is located at the end of the preset linked list structure, i.e., the tail position of the BPE LRU. In other words, if the data page is cold data and not cached in the BPE but satisfies the policy list, or if the data page is cold data and already cached but invalidated in the BPE but satisfies the policy list, a BPE slot is allocated for the data page in the BPE LRU and the data page is moved to the tail of the BPE LRU.For example, the data page key and BPE slot index information can be written into the BPE hash (bpe hash), and the data page location can then be moved to the end of the BPE LRU. Figure 5 is a flowchart of another data processing method according to Embodiment 1 of the present disclosure. As shown in Figure 5, when caching a data page from the BP into the BPE, the method first traverses the cache pool and retrieves the next cache from the cache pool, i.e., the data page that is about to be eliminated from the cache pool. A determination is then made as to whether the cached data is hot data. If hot data indicates that the data page is still in use, the method then determines whether the data page is already cached in the BPE. If it is already cached in the BPE, the corresponding BPE LRU linked list position for the data page is moved to the head of the linked list. Otherwise, if it is not cached in the BPE, the method skips the data page and traverses to the next data page. If the cache is determined to be cold data, the method then determines whether the data page is already cached in the BPE and is still valid. If so, the corresponding BPE LRU linked list position for the data page is moved to the end of the linked list. If the condition is not satisfied and the data is already cached and valid in the BPE, the policy list is traversed to check whether it meets the condition. Specifically, the bpe rule list is traversed to determine whether one of the rules is satisfied. If the rule is satisfied, a BPE slot is allocated from the linked list pointed to by the dlist head of the satisfying rule based on the cache size of the data page. The data page key and BPE slot are then written to the BPE hash, and the position of the data page is moved to the end of the BPE LRU. If the rule is not satisfied, the data page is skipped and the next data page is traversed. In an optional embodiment, the preset linked list structure includes a hash bidirectional linked list structure, wherein the hash bidirectional linked list structure includes multiple linked list nodes, each of which includes a hash key field and a hash value field. The hash key field is an identification field of the target data object, and the hash value field is an index field of the target data object. In the disclosed embodiment, the preset linked list structure can be a hash bidirectional linked list structure, denoted as bpe_hash. The hash bidirectional linked list structure includes: multiple linked list nodes, each linked list node is recorded as dlist_node, and each linked list node includes a hash key field and a hash value field.The hash key field is the identification field of the target data object, denoted as bpe tag / / hash key, and the hash value field is the index field of the target data object, denoted as bpe_id / / hash value. In addition, in the embodiment of the present disclosure, the data structure also includes a BPE descriptor, denoted as bpe descriptor. The bpe descriptor may include at least some of the following fields:

[0013] (1), bpe_tag; / / , used to query the key of the same data page as the BPE key;

[0014] (2), bpe_id; / / , used to indicate the index of BPE extension cache;

[0015] (3), free_next; / / , used to build the BPE free list;

[0016] (4), dlist_node / / , that is, a bidirectional linked list, used to construct an LRU control structure in combination with bpe hash to control the use of BPE;

[0017] (5), is_invalid / / , used to mark BPE invalid. In addition, it also includes bpe writer / / , that is, a BPE auxiliary process, used to cache the data pages eliminated in the memory data page cache pool into the BPE. In an optional embodiment, the data processing method further includes the following method steps: Step S329, in response to the data object to be eliminated being stored in the second storage medium and the data object to be eliminated having undergone data update in the first storage medium, the mark state of the data object to be eliminated in the second storage medium is set to invalid. In the embodiment of the present disclosure, if the data page to be eliminated has been stored in the BPE and the data page to be eliminated has been modified in the BP, that is, the data page to be eliminated has undergone data update, then the mark state of the data page to be eliminated in the BPE is set to invalid, which can be understood as invalidating the BPE data page. Exemplarily, when a data page in the BP in the memory is modified, the corresponding BPE is searched according to the key of the data page and marked as invalid. Accordingly, if the data page to be eliminated is already stored in the BPE and has not been modified in the BP, the status of the data page to be eliminated remains valid. In an optional embodiment, the data processing method further includes the following method steps: Step S330: In response to the first storage medium storing the data object to be queried, reading the data object to be queried from the first storage medium; Step S331: In response to the second storage medium storing the data object to be queried, reading the data object to be queried from the second storage medium; Step S332: In response to the first storage medium and the second storage medium not storing the data object to be queried, reading the data object to be queried from a third storage medium; wherein the data read and write rate of the third storage medium is lower than the data read and write rate of the second storage medium. Exemplarily, the first storage medium may be a cache pool, the second storage medium may be a cache pool extension, and the third storage medium may be a data file storage area. The read and write rate of the cache pool is greater than the read and write rate of the cache pool extension, and the read and write rate of the cache pool extension is greater than the read and write rate of the data file storage area. Therefore, when querying data pages, the priority of the buffer pool is higher than the priority of the buffer pool extension, and the priority of the buffer pool extension is higher than the priority of the data file storage area. In other words, only data pages that cannot be found in the BP are searched in the BPE, and only data pages that cannot be found in both the BP and the BPE are searched in the data file storage area.In this embodiment of the present disclosure, when reading data and querying a data page, if the queried data object is stored in the cache pool, the queried data object is read from the cache pool. If the queried data object is stored in the cache pool extension, the queried data object is read from the cache pool extension. If the queried data object is stored in the data file storage area, the queried data object is read from the data file storage area. Figure 6 is a flowchart of a data page query according to Embodiment 1 of the present disclosure. As shown in Figure 6, when reading data, the process first determines whether the data page is in the cache pool. If so, the data page is read from the cache pool. If not, the process then determines whether the data page is in the cache pool extension. If so, the data page is read from the BPE. If not, the data page is read from the data file storage area. For example, if the data page is not in the cache pool, the bpe hash is first queried. If the bpe hash contains the data page and the data page is a valid value, the data page is read from the BPE for acceleration. If the bpe_hash does not contain the data page, the data page is read from the data file. FIG7 is a flowchart of another data processing method according to Example 1 of the present disclosure. As shown in FIG7 , the cache pool includes a shared cache hash, a cache descriptor, and a cache block, while the cache pool extension includes a cache pool extension hash and a cache pool extension descriptor. The cache pool stores data pages on low-speed media, while the cache pool extension utilizes high-speed media to store more data pages. As can be seen, the present disclosure filters out data pages from the cache pool based on user-customized, database-customized, data table-customized, and data range-customized cache policies, caching only eligible data pages into the cache pool extension. This achieves customized database performance and improves user database efficiency. User customization can be understood as extending the cache for tables created by a particular user, excluding tables of other users, to achieve acceleration for that specific user. Database customization involves extending the cache for a database to accelerate data in a specific database. Table customization involves extending the cache for a table to accelerate the database for that specific table. Customization based on data ranges, namely, expanding the cache for a data range, can achieve range-specific acceleration for data in a specific table. This can address specific acceleration requirements for a specific range of hot data. For example, after sorting a specific table by a column and storing the data, this method can be used to achieve specific acceleration when accessing only a certain segment of data. It is understood that the various customization strategies in the above examples can be used in combination, and this is not a limitation here. It is easy to understand that the data processing method provided by this disclosure has the following beneficial effects:Beneficial effect (1): By introducing a customized cache pool extension filtering strategy, the cache pool extension is managed in a refined manner, avoiding the problem of performance jitter caused by directly caching data pages to the cache pool extension under cold load. Beneficial effect (2): By customizing the cache size of the cache pool extension data, the cache pool extension is managed in a refined manner, which can ensure the performance indicators of specific tasks, achieve cache speed-up for specific loads, achieve database performance customization, and improve the efficiency of database use. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, data for storage, data for display, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portals for users to choose to authorize or refuse. Furthermore, it should be noted that, for simplicity of description, the aforementioned method embodiments are described as a series of combined actions. However, those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, as certain steps may be performed in a different order or simultaneously, according to the present disclosure. Furthermore, those skilled in the art should also be aware that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily required for the present disclosure. Through the above description of the implementation methods, those skilled in the art will clearly understand that the methods according to the aforementioned embodiments can be implemented using software and a required general-purpose hardware platform, or alternatively, hardware. Based on this understanding, the technical solution of the present disclosure, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (e.g., ROM / RAM, a magnetic disk, or an optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present disclosure. Example 2 According to an embodiment of the present disclosure, an embodiment of an apparatus for implementing the aforementioned data processing method is also provided.FIG8 is a schematic structural diagram of a data processing device according to Embodiment 2 of the present disclosure. As shown in FIG8 , the device includes: an acquisition module 801 configured to acquire data objects to be eliminated from a first storage medium, wherein a data storage format with a preset data granularity is adopted; a processing module 802 configured to select a target data object from the data objects to be eliminated based on a preset customized policy, and determine an indexing method for the target data object in a second storage medium; and a cache module 803 configured to cache the target data object to a second storage medium based on the indexing method in the second storage medium, wherein the preset customized policy includes a filtering condition, wherein the filtering condition is used to filter data of the data objects to be eliminated, and the second storage medium is an extended storage area of ​​the first storage medium. Optionally, the processing module 802 is further configured to: obtain status information of the data object to be eliminated, wherein the status information is used to determine whether the data object to be eliminated is cold data, whether the data object to be eliminated has been stored in the second storage medium, and whether the data object to be eliminated has undergone data updates in the first storage medium; and use a preset customized strategy and the status information to filter the data objects to be eliminated to obtain the target data object. Optionally, the status information includes: a first status, wherein the first status is used to determine that the data object to be eliminated is hot data and has been stored in the second storage medium; a second status, wherein the second status is used to determine that the data object to be eliminated is cold data, has been stored in the second storage medium, and has not undergone data updates on the data object to be eliminated in the first storage medium; a third status, wherein the third status is used to determine that the data object to be eliminated is cold data, has not been stored in the second storage medium, and satisfies any target storage extension rule in a preset rule list; or the third status is used to determine that the data object to be eliminated is cold data, has been stored in the second storage medium, has undergone data updates on the first storage medium, and satisfies any target storage extension rule in the preset rule list. Optionally, the preset rule list includes: multiple storage extension rules, each of the multiple storage extension rules includes: multiple custom fields, wherein the field contents of the multiple custom fields are determined based on an object query attribute of the data object to be eliminated. Optionally, the multiple custom fields include at least some of the following fields: user information custom field; database custom field; data table custom field; data block custom field; maximum storage capacity custom field; current storage capacity custom field; linked list structure header identifier custom field.Optionally, the processing module 802 is further configured to: use a preset customized policy to filter out the target data object from the data objects to be eliminated that do not satisfy at least one of the first state, the second state, and the third state. Optionally, the processing module 802 is further configured to: in response to the target data object being in the first state, obtain a first linked list position corresponding to the target data object in a preset linked list structure provided in the second storage medium, wherein the first linked list position is an initial linked list position corresponding to the identifier of the target data object in the preset linked list structure; and based on the preset customized policy, adjust the first linked list position to a second linked list position, wherein the second linked list position is a target linked list position corresponding to the identifier of the target data object in the preset linked list structure, and the second linked list position is located at the head of a linked list in the preset linked list structure. Optionally, the processing module 802 is further configured to: in response to the target data object being in the second state, obtain a third linked list position corresponding to the target data object in a preset linked list structure set in the second storage medium, wherein the third linked list position is an initial linked list position corresponding to the identifier of the target data object in the preset linked list structure; and based on a preset customization policy, adjust the third linked list position to a fourth linked list position, wherein the fourth linked list position is a target linked list position corresponding to the identifier of the target data object in the preset linked list structure, and the fourth linked list position is located at the end of the preset linked list structure. Optionally, the processing module 802 is further configured to: in response to the target data object being in the third state, allocate a fifth linked list position for the target data object in a preset linked list structure corresponding to a target storage extension rule set in the second storage medium, wherein the fifth linked list position is located at the head of the preset linked list structure; and based on the preset customization policy, adjust the fifth linked list position to a sixth linked list position, wherein the sixth linked list position is located at the end of the preset linked list structure. Optionally, the preset linked list structure includes a hash bidirectional linked list structure, wherein the hash bidirectional linked list structure includes: a plurality of linked list nodes, each of the plurality of linked list nodes including: a hash key field and a hash value field, the hash key field being an identification field of the target data object, and the hash value field being an index field of the target data object. Optionally, the apparatus further includes: a marking module configured to set a marking status of the to-be-eliminated data object in the second storage medium to an invalid state in response to the to-be-eliminated data object having been stored in the second storage medium and having undergone a data update in the first storage medium.Optionally, the apparatus further includes: a query module configured to, in response to the first storage medium storing the data object to be queried, read the data object to be queried from the first storage medium; in response to the second storage medium storing the data object to be queried, read the data object to be queried from the second storage medium; and in response to the first storage medium and the second storage medium not storing the data object to be queried, read the data object to be queried from a third storage medium; wherein the data read and write rate of the third storage medium is lower than the data read and write rate of the second storage medium. Optionally, the data object to be eliminated is cache data of a preset database system, the first storage medium is a cache pool of the cache data, and the second storage medium is a cache pool extension of the cache data. According to the disclosed embodiments, data objects to be eliminated are obtained from a first storage medium. The data objects to be eliminated are then filtered based on filter conditions customized according to a preset customization policy. A target data object is selected from the data objects to be eliminated, and an indexing method of the target data object in a second storage medium is determined. Finally, the target data object is cached in the second storage medium based on the indexing method in the second storage medium. This achieves the goal of caching different data objects to be eliminated in the first storage medium in different ways. By introducing different cache customization schemes and cache size customization schemes, refined management of the cache pool extension is possible, achieving efficient caching and accelerating cache performance for specific loads. This improves the utilization efficiency of the cache pool extension and improves database execution efficiency. This addresses the technical problem in related technologies of directly caching eliminated data pages from the cache pool into the cache pool extension, resulting in low database execution efficiency and low caching efficiency. It should be noted that the acquisition module 801, processing module 802, and cache module 803 described above correspond to steps S31 to S33 in Example 1. The examples and application scenarios implemented by these three modules and the corresponding steps are the same, but are not limited to the content disclosed in Example 1. It should be noted that the above modules or units may be hardware components or software components stored in a memory (e.g., memory 204) and processed by one or more processors (e.g., processors 202a, 202b, ..., 202n). The above modules may also be part of an apparatus and run in the computer terminal 20 provided in Example 1. It should be noted that the preferred implementation schemes involved in the above embodiments of the present disclosure are the same as the schemes, application scenarios, and implementation processes provided in Example 1, but are not limited to the schemes provided in Example 1. Example 3 The embodiments of the present disclosure may provide a computer terminal, which may be any computer terminal device in a computer terminal group.Optionally, in this embodiment, the computer terminal may be replaced with a terminal device such as a mobile terminal. Optionally, in this embodiment, the computer terminal may be located in at least one of multiple network devices in a computer network. In this embodiment, the computer terminal may execute program code for the following steps in the data processing method: obtaining data objects to be eliminated from a first storage medium, wherein the data objects to be eliminated use a data storage format with a preset data granularity; selecting a target data object from the data objects to be eliminated based on a preset customization policy, and determining an indexing method for the target data object in a second storage medium; and caching the target data object in the second storage medium based on the indexing method in the second storage medium. The preset customization policy includes a filtering condition for filtering data objects to be eliminated. The second storage medium is an extended storage area of ​​the first storage medium. Optionally, Figure 9 is a block diagram of the structure of a computer terminal according to an embodiment of the present disclosure. As shown in FIG9 , the computer terminal 9 may include one or more processors 902 (only one is shown), a memory 904, a storage controller, and a peripheral interface. The peripheral interface is connected to a radio frequency module, an audio module, and a display. The memory may be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and apparatus in the embodiments of the present disclosure. The processor executes the stored software programs and modules to perform various functional applications and data processing, thereby implementing the aforementioned data processing method. The memory may include high-speed random access memory (RAM) and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, which may be connected to the computer terminal 9 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The processor may call information and applications stored in the memory through a transmission device to perform the following steps: obtaining a to-be-eliminated data object from a first storage medium, wherein the to-be-eliminated data object adopts a data storage format with a preset data granularity; selecting a target data object from the to-be-eliminated data objects based on a preset customized policy, and determining an indexing method for the target data object in a second storage medium; and caching the target data object in the second storage medium based on the indexing method in the second storage medium; wherein the preset customized policy includes a filtering condition, wherein the filtering condition is used to filter data of the to-be-eliminated data object, and the second storage medium is an extended storage area of ​​the first storage medium.Optionally, the processor may further execute program code of the following steps: obtaining status information of a data object to be eliminated, wherein the status information is used to determine whether the data object to be eliminated is cold data, whether the data object to be eliminated has been stored in the second storage medium, and whether data updates have occurred on the data object to be eliminated in the first storage medium; and filtering the data objects to be eliminated using a preset customized strategy and the status information to obtain a target data object. Optionally, the status information includes: a first status, wherein the first status is used to determine that the data object to be eliminated is hot data and has been stored in the second storage medium; a second status, wherein the second status is used to determine that the data object to be eliminated is cold data, has been stored in the second storage medium, and has not undergone data updates on the data object to be eliminated in the first storage medium; a third status, wherein the third status is used to determine that the data object to be eliminated is cold data, has not been stored in the second storage medium, and satisfies any target storage extension rule in a preset rule list; or the third status is used to determine that the data object to be eliminated is cold data, has been stored in the second storage medium, has undergone data updates on the first storage medium, and satisfies any target storage extension rule in the preset rule list. Optionally, the preset rule list includes: multiple storage extension rules, each of the multiple storage extension rules includes: multiple custom fields, wherein the field contents of the multiple custom fields are determined based on an object query attribute of the data object to be eliminated. Optionally, the multiple customized fields include at least some of the following fields: a user information customized field; a database customized field; a data table customized field; a data block customized field; a maximum storage capacity customized field; a current storage capacity customized field; and a linked list structure header identifier customized field. Optionally, the processor may further execute program code for the following steps: using a preset customized policy, filtering out a target data object from data objects to be eliminated that do not meet at least one of the first, second, and third states. Optionally, the processor may further execute program code for the following steps: in response to the target data object being in the first state, obtaining a first linked list position corresponding to the target data object in a preset linked list structure provided in the second storage medium, wherein the first linked list position is an initial linked list position corresponding to the identifier of the target data object in the preset linked list structure; and adjusting the first linked list position to a second linked list position based on the preset customized policy, wherein the second linked list position is a target linked list position corresponding to the identifier of the target data object in the preset linked list structure, and the second linked list position is located at the head of the linked list in the preset linked list structure.Optionally, the processor may further execute program code for the following steps: in response to the target data object being in the second state, obtaining a third linked list position corresponding to the target data object in a preset linked list structure set in the second storage medium, wherein the third linked list position is an initial linked list position corresponding to the identifier of the target data object in the preset linked list structure; and based on a preset customization policy, adjusting the third linked list position to a fourth linked list position, wherein the fourth linked list position is a target linked list position corresponding to the identifier of the target data object in the preset linked list structure, and the fourth linked list position is located at the end of the preset linked list structure. Optionally, the processor may further execute program code for the following steps: in response to the target data object being in the third state, allocating a fifth linked list position to the target data object in a preset linked list structure corresponding to a target storage extension rule set in the second storage medium, wherein the fifth linked list position is located at the head of the preset linked list structure; and based on the preset customization policy, adjusting the fifth linked list position to a sixth linked list position, wherein the sixth linked list position is located at the end of the preset linked list structure. Optionally, the preset linked list structure includes a hash bidirectional linked list structure, wherein the hash bidirectional linked list structure includes: a plurality of linked list nodes, each of the plurality of linked list nodes including: a hash key field and a hash value field, wherein the hash key field is an identification field of the target data object, and the hash value field is an index field of the target data object. Optionally, the processor may further execute program code for the following steps: in response to the data object to be eliminated being stored in the second storage medium and having undergone data updates in the first storage medium, setting a flag status of the data object to be eliminated in the second storage medium to an invalid state. Optionally, the processor may further execute program code for the following steps: in response to the first storage medium storing the data object to be queried, reading the data object to be queried from the first storage medium; in response to the second storage medium storing the data object to be queried, reading the data object to be queried from the second storage medium; and in response to the first storage medium and the second storage medium not storing the data object to be queried, reading the data object to be queried from a third storage medium; wherein the data read and write rate of the third storage medium is lower than the data read and write rate of the second storage medium. Optionally, the data object to be eliminated is cache data of a preset database system, the first storage medium is a cache pool of the cache data, and the second storage medium is a cache pool extension of the cache data.According to the disclosed embodiments, data objects to be eliminated are obtained from a first storage medium, and then, based on multiple filter conditions customized according to a preset customization policy, data on the data objects to be eliminated is filtered. A target data object is selected from the data objects to be eliminated, and an indexing method for the target data object in the second storage medium is determined. This achieves the goal of caching different data objects to be eliminated in the first storage medium in different ways. By introducing multiple cache customization schemes and cache size customization schemes, refined management of the cache pool extension is achieved, efficient caching is achieved, and cache speed-up for specific loads is achieved. This improves the utilization efficiency of the cache pool extension and the execution efficiency of the database, thereby resolving the technical problem in related arts of directly caching eliminated data pages from the cache pool into the cache pool extension, resulting in low database execution efficiency and low cache efficiency. Those skilled in the art will appreciate that the structure shown in FIG9 is merely illustrative, and that the computer terminal 9 may also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, or a mobile internet device (MID), PAD, or other terminal device. FIG9 does not limit the structure of the aforementioned electronic devices. For example, the computer terminal 9 may include more or fewer components (such as a network interface, a display device, etc.) than those shown in FIG9 , or may have a configuration different from that shown in FIG9 . Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware associated with the terminal device through a program. The program can be stored in a computer-readable storage medium, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Example 4 The present disclosure also provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the data processing method provided in Example 1. Optionally, in this embodiment, the computer-readable storage medium can be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining data objects to be eliminated from a first storage medium, wherein the data objects to be eliminated are stored in a data format with a preset data granularity; selecting a target data object from the data objects to be eliminated based on a preset customized policy, and determining an indexing method for the target data object in a second storage medium; and caching the target data object in the second storage medium based on the indexing method in the second storage medium; wherein the preset customized policy includes a filtering condition for filtering data objects to be eliminated, and the second storage medium is an extended storage area of ​​the first storage medium. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining status information of the data objects to be eliminated, wherein the status information is used to determine whether the data objects to be eliminated are cold data, whether the data objects to be eliminated have been stored in the second storage medium, and whether data updates have occurred on the data objects to be eliminated in the first storage medium; and filtering the data objects to be eliminated using the preset customized policy and the status information to obtain the target data object. Optionally, the status information includes: a first status, wherein the first status is used to determine that the data object to be eliminated is hot data and has been stored in the second storage medium; a second status, wherein the second status is used to determine that the data object to be eliminated is cold data, has been stored in the second storage medium, and has not undergone data updates on the data object to be eliminated in the first storage medium; a third status, wherein the third status is used to determine that the data object to be eliminated is cold data, has not been stored in the second storage medium, and satisfies any target storage extension rule in a preset rule list; or the third status is used to determine that the data object to be eliminated is cold data, has been stored in the second storage medium, has undergone data updates on the first storage medium, and satisfies any target storage extension rule in the preset rule list. Optionally, the preset rule list includes: multiple storage extension rules, each of the multiple storage extension rules includes: multiple custom fields, wherein the field contents of the multiple custom fields are determined based on an object query attribute of the data object to be eliminated. Optionally, the multiple custom fields include at least some of the following fields: user information custom field; database custom field; data table custom field; data block custom field; maximum storage capacity custom field; current storage capacity custom field; linked list structure header identifier custom field.Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: using a preset customized policy, filtering out a target data object from data objects to be eliminated that do not satisfy at least one of the first, second, and third states. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: in response to the target data object being in the first state, obtaining a first linked list position corresponding to the target data object in a preset linked list structure provided in the second storage medium, wherein the first linked list position is an initial linked list position corresponding to an identifier of the target data object in the preset linked list structure; and based on the preset customized policy, adjusting the first linked list position to a second linked list position, wherein the second linked list position is a target linked list position corresponding to the identifier of the target data object in the preset linked list structure, and the second linked list position is located at the head of a linked list in the preset linked list structure. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: responsive to the target data object being in the second state, obtaining a third linked list position corresponding to the target data object in a preset linked list structure set in the second storage medium, wherein the third linked list position is an initial linked list position corresponding to the identifier of the target data object in the preset linked list structure; and adjusting the third linked list position to a fourth linked list position based on a preset customization policy, wherein the fourth linked list position is a target linked list position corresponding to the identifier of the target data object in the preset linked list structure, and the fourth linked list position is located at the end of the preset linked list structure. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: responsive to the target data object being in the third state, allocating a fifth linked list position to the target data object in a preset linked list structure corresponding to a target storage extension rule set in the second storage medium, wherein the fifth linked list position is located at the head of the preset linked list structure; and adjusting the fifth linked list position to a sixth linked list position based on the preset customization policy, wherein the sixth linked list position is located at the end of the preset linked list structure. Optionally, the preset linked list structure includes a hash bidirectional linked list structure, wherein the hash bidirectional linked list structure includes: a plurality of linked list nodes, each of the plurality of linked list nodes including: a hash key field and a hash value field, the hash key field being an identification field of the target data object, and the hash value field being an index field of the target data object. Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: in response to a data object to be eliminated having been stored in a second storage medium and having undergone a data update on the data object to be eliminated in a first storage medium, setting a flag status of the data object to be eliminated in the second storage medium to an invalid state.Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: in response to a first storage medium storing a data object to be queried, reading the data object to be queried from the first storage medium; in response to a second storage medium storing the data object to be queried, reading the data object to be queried from the second storage medium; and in response to neither the first storage medium nor the second storage medium storing the data object to be queried, reading the data object to be queried from a third storage medium; wherein the data read and write rate of the third storage medium is lower than the data read and write rate of the second storage medium. Optionally, the data object to be eliminated is cached data of a preset database system, the first storage medium is a cache pool of the cached data, and the second storage medium is a cache pool extension of the cached data. The embodiments of the present disclosure also provide a computer program product comprising a computer program. When executed by a processor, the computer program implements the data processing method provided in the embodiments of the present disclosure. The serial numbers of the embodiments of the present disclosure are for descriptive purposes only and do not represent the superiority or inferiority of an embodiment. In the above embodiments of the present disclosure, the descriptions of each embodiment are repeated. For portions not detailed in a particular embodiment, reference can be made to the relevant descriptions of other embodiments. In the several embodiments provided in this disclosure, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, other divisions may be employed. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be through interfaces, or indirect couplings or communication connections between units or modules, and may be electrical or other forms. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of these units may be selected to achieve the objectives of the present embodiments based on actual needs. Furthermore, the functional units in the various embodiments of this disclosure may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional units. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.Based on this understanding, the technical solution of this disclosure, or the portion that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for causing a computer device (such as a personal computer, server, or network device) to execute all or part of the steps of the methods described in various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), removable hard drives, magnetic disks, or optical disks. The above description is merely a preferred embodiment of this disclosure. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this disclosure, and such improvements and modifications should also be considered within the scope of protection of this disclosure.

Claims

Claims 1. A data processing method, comprising: Obtain the data objects to be eliminated from the first storage medium, where the data objects to be eliminated adopt a data storage format with a preset data granularity; based on a preset customized policy, select target data objects from the data objects to be eliminated, and determine the indexing method of the target data objects in the second storage medium; cache the target data objects to the second storage medium according to the indexing method in the second storage medium; where the preset customized policy includes: a filtering condition, the filtering condition is used to filter the data objects to be eliminated, and the second storage medium is an extended storage area of the first storage medium.

2. The data processing method according to claim 1, wherein, Based on the preset customized policy, selecting the target data objects from the data objects to be eliminated includes: obtaining the status information of the data objects to be eliminated, where the status information is used to determine whether the data objects to be eliminated are cold data, whether the data objects to be eliminated have been stored in the second storage medium, and whether the data objects to be eliminated have undergone data updates in the first storage medium; using the preset customized policy and the status information to filter the data objects to be eliminated to obtain the target data objects.

3. The data processing method according to claim 2, wherein The status information includes: a first status, where the first status is used to determine that the data objects to be eliminated are hot data and the data objects to be eliminated have been stored in the second storage medium; a second status, where the second status is used to determine that the data objects to be eliminated are cold data, the data objects to be eliminated have been stored in the second storage medium, and the data objects to be eliminated have not undergone data updates in the first storage medium; a third status, where the third status is used to determine that the data objects to be eliminated are cold data, the data objects to be eliminated have not been stored in the second storage medium and the data objects to be eliminated meet any target storage expansion rules in the preset rule list; or, the third status is used to determine that the data objects to be eliminated are cold data, the data objects to be eliminated have been stored in the second storage medium and have undergone data updates in the first storage medium, and the data objects to be eliminated meet any target storage 24 Expansion rules.

4. The data processing method according to claim 3, wherein, The preset rule list includes: a plurality of storage expansion rules, and the plurality of storage expansion rules each include: a plurality of customized fields, where the field contents of the plurality of customized fields are determined based on the object query attributes of the data objects to be eliminated.

5. The data processing method according to claim 4, wherein, The plurality of customized fields include at least some of the following fields: user information customized field; Database customized field; Data table customized field; Data block customized field; Maximum storage capacity customized field; Current storage capacity customized field; Linked list structure head identifier customized field.

6. The data processing method according to claim 3, wherein, Filtering the data objects to be eliminated by using the preset customization strategy and the state information to obtain the target data objects includes: screening out the target data objects from the data objects that do not meet at least one of the first state, the second state, and the third state among the data objects to be eliminated by using the preset customization strategy.

7. The data processing method according to claim 3, wherein Determining the indexing method of the target data objects in the second storage medium based on the preset customization strategy includes: in response to the target data objects being in the first state, obtaining the corresponding first linked list position of the target data objects in a preset linked list structure set in the second storage medium, where the first linked list position is the initial linked list position corresponding to the identifier of the target data objects in the preset linked list structure; based on the preset customization strategy, adjusting the first linked list position to a second linked list position, where the second linked list position is the target linked list position corresponding to the identifier of the target data objects in the preset linked list structure, and the second linked list position is located at the head of the linked list of the preset linked list structure.

8. The data processing method according to claim 3, wherein Determining the indexing method of the target data objects in the second storage medium based on the preset customization strategy includes: in response to the target data objects being in the second state, in the preset linked list structure set in the second storage medium, obtaining the corresponding third linked list position of the target data objects, where the third linked list position is the initial linked list position corresponding to the identifier of the target data objects in the preset linked list structure; based on the preset customization strategy, adjusting the third linked list position to a fourth linked list position, where the fourth linked list position is the target linked list position corresponding to the identifier of the target data objects in the preset linked list structure, and the fourth linked list position is located at the tail of the linked list of the preset linked list structure.

9. The data processing method according to claim 3, wherein Determining the indexing method of the target data objects in the second storage medium based on the preset customization strategy includes: in response to the target data objects being in the third state, in the preset linked list structure corresponding to the target storage expansion rule set in the second storage medium, allocating a fifth linked list position for the target data objects, where the fifth linked list position is located at the head of the linked list of the preset linked list structure; based on the preset customization strategy, adjusting the fifth linked list position to a sixth linked list position, where the sixth linked list position is located at the tail of the linked list of the preset linked list structure.

10. The data processing method according to any one of claims 7 to 9, wherein, The preset linked list structure includes: a hash doubly linked list structure, where the hash doubly linked list structure includes: a plurality of linked list nodes, and the plurality of linked list nodes all include: a hash key field and a hash value field, the hash key field is the identifier field of the target data objects, and the hash value field is the index field of the target data objects.

11. The data processing method according to claim 3, wherein The data processing method further includes: in response to the to-be-eliminated data object being stored in the second storage medium and the to-be-eliminated data object having undergone data updates in the first storage medium, setting the marked state of the to-be-eliminated data object in the second storage medium to an invalid state.

12. The data processing method according to claim 2, wherein The data processing method further includes: in response to using the first storage medium to store the to-be-query data object, reading the to-be-query data object from the first storage medium; in response to using the second storage medium to store the to-be-query data object, reading the to-be-query data object from the second storage medium; in response to neither the first storage medium nor the second storage medium storing the to-be-query data object, reading the to-be-query data object from a third storage medium; wherein, the data read / write rate of the third storage medium is lower than the data read / write rate of the second storage medium.

13. The data processing method according to claim 1, wherein, The to-be-eliminated data object is preset data in a cache of a database system, the first storage medium is a cache pool of the cache data, and the second storage medium is an extension of the cache pool of the cache data.

14. A computer-readable storage medium, the computer-readable storage medium including a stored executable program, wherein, When the executable program runs, controlling the device where the computer-readable storage medium is located to execute the data processing method according to any one of claims 1 to 13.

15. An electronic device, comprising: A memory storing an executable program; A processor for running the program, wherein when the program runs, it executes the data processing method according to any one of claims 1 to 13.

16. A computer program product including a computer program which, when executed by a processor, implements the data processing method according to any one of claims 1 to 13. 27

Citation Information

Patent Citations

  • Method and device for eliminating cache data

    CN113076067A

  • Data storage method and device and electronic equipment

    CN115048053A

  • Key value storage system and method based on cache gradient cold and hot data layering mechanism

    CN116186085A

Cited By

  • Data processing method, product, electronic equipment and computer readable storage medium

    CN120950009A