Hotspot storage area identification method, apparatus, storage device and readable storage medium
By combining a mapping table cache pool and a hotspot recommendation linked list, hotspot storage areas of UFS devices are identified, solving the problem of high computing power consumption in existing technologies and improving identification efficiency and performance.
Patent Information
- Application Number
- CN202611325574.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-17
AI Technical Summary
Existing UFS devices consume significant computing power when identifying hot storage areas because each read/write operation requires a global traversal of all LBA intervals and an update of the access count counter.
The method employs a mapping table cache pool and a hotspot recommendation linked list. By retrieving the target mapping table from the mapping table cache pool, calculating the target storage area number to which it belongs, and placing it at the head node of the hotspot recommendation linked list, the popularity status is updated. If it meets the preset conditions, it is determined as a hotspot storage area.
It reduces computing power consumption when identifying hot storage areas, improves random read performance, reduces statistical overhead, and is suitable for small-capacity UFS devices.
Smart Images

Figure CN123114371A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and in particular to a method, apparatus, storage device, and readable storage medium for identifying hotspot storage areas. Background Technology
[0002] The UFS (Universal Flash Storage) protocol defines HPB (Host Performance Booster), which is divided into host-controlled mode and device-controlled mode. In device-controlled mode, the UFS device autonomously identifies hot storage areas (i.e., HPB hotspots) and recommends them to the host. HPB hotspots are LBA regions in the UFS device that are identified as frequently accessed data. The host caches the L2P mapping table corresponding to the hot LBA region in its own memory. When a read request is made, the host directly looks up the table and issues a read command, saving the device table lookup overhead and greatly improving random read performance.
[0003] Existing hotspot storage area identification schemes typically maintain separate access count counters for all LBA intervals across the entire disk. Each read / write operation increments the corresponding count, and hotspot LBA intervals are periodically recommended based on these counts. However, existing schemes require a global traversal of all LBA intervals and modification of the corresponding LBA interval counters for each read / write operation, resulting in significant computational consumption for UFS devices when identifying hotspot LBA intervals. Summary of the Invention
[0004] In view of this, the purpose of this application is to overcome the shortcomings of the prior art and provide a method for identifying hotspot storage areas. The method is applied to a storage device, which includes a mapping table cache pool and a hotspot recommendation list. The method includes: Obtain the target mapping table swapped out from the mapping table cache pool, and calculate the target storage region number to which the target mapping table belongs; Place the target storage region number at the head node of the hot recommendation list, and update the popularity status of the target storage region number. If the popularity status meets the preset popularity recommendation conditions, then the storage area corresponding to the target storage area number is determined to be a hot storage area.
[0005] In one embodiment, the mapping table cache pool caches a preset number of mapping tables that meet preset activity conditions. The step of obtaining the target mapping table swapped out from the mapping table cache pool and calculating the target storage region number to which the target mapping table belongs includes: When caching a new mapping table into the mapping table cache pool, the mapping table to be swapped out is determined from the mapping table cache pool based on a preset swap-out policy; The swapped-out mapping table is swapped out of the mapping table cache pool, and the swapped-out mapping table is determined as the target mapping table; Based on preset calculation rules, the target mapping table is calculated to determine the target storage area number to which the target mapping table belongs.
[0006] In one embodiment, the step of placing the target storage region number at the head node of the hotspot recommendation list and updating the popularity status of the target storage region number includes: Based on the target storage region number, query the hotspot recommendation list to determine whether the target storage region number has already been stored in the hotspot recommendation list; If so, the node corresponding to the target storage area number is moved and changed to the head node of the hotspot recommendation list, and the popularity status of the target storage area number is updated based on the preset popularity update rules. If not, a target node is created for the target storage area number, and the target node is used as the head node of the hot recommendation list. The popularity status of the target storage area number is updated based on the preset popularity update rules.
[0007] In one embodiment, the hotspot recommendation list stores a preset number of storage region numbers, and the hash values corresponding to all the storage region numbers are stored in a hash table. The step of querying the hotspot recommendation list based on the target storage region number to determine whether the target storage region number has already been stored in the hotspot recommendation list includes: Calculate the target hash value of the target storage region number, and query the hash table based on the target hash value; If the target hash value exists in the hash table, then it is determined that the target storage area number has been stored in the hotspot recommendation chain list; If the target hash value does not exist in the hash table, it is determined that the target storage area number is not stored in the hotspot recommendation chain.
[0008] In one embodiment, after the step of creating a target node for the target storage region number and using the target node as the head node of the hotspot recommendation list, the method includes: If it is determined that the hot topic recommendation list has reached its maximum node capacity, then based on a preset elimination strategy, an elimination node is determined in the hot topic recommendation list and removed from the hot topic recommendation list.
[0009] In one embodiment, the popularity status is the total number of swaps in the target mapping table, and the step of determining the storage area corresponding to the target storage area number as a hot storage area if the popularity status meets the preset popularity recommendation conditions includes: The total number of swaps is compared with a preset threshold number. If the total number of swaps reaches the preset threshold, then the storage area corresponding to the target storage area number is determined to be a hot storage area.
[0010] In one embodiment, the method further includes: When an update mapping table that has been subjected to write and update operations is detected, the reference storage area number to which the update mapping table belongs is calculated. If the reference storage area number is already stored in the hotspot recommendation list, then the popularity status corresponding to the reference storage area number is cleared to zero.
[0011] This application also provides a hotspot storage area identification device, the hotspot storage area identification device comprising: The acquisition module is used to acquire the target mapping table swapped out from the mapping table cache pool and calculate the target storage area number to which the target mapping table belongs; The update module is used to place the target storage region number in the head node of the hot recommendation chain and update the popularity status of the target storage region number. The determination module is used to determine the storage area corresponding to the target storage area number as a hot storage area if the heat status meets the preset heat recommendation conditions.
[0012] This application also provides a storage device, which includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the above-described hotspot storage area identification method.
[0013] This application also provides a computer-readable storage medium storing a computer program that executes the above-described hotspot storage area identification method when run on a processor.
[0014] The embodiments of this application have the following beneficial effects: This application applies to a storage device, which includes a mapping table cache pool and a hotspot recommendation list. The method includes: obtaining a target mapping table swapped out from the mapping table cache pool and calculating the target storage region number to which the target mapping table belongs; placing the target storage region number at the head node of the hotspot recommendation list and updating the popularity status of the target storage region number; if the popularity status meets preset popularity recommendation conditions, then determining the storage region corresponding to the target storage region number as a hotspot storage region. This application relies solely on swapping out from the mapping table cache pool and the hotspot recommendation list to identify hotspot storage regions, avoiding the need to maintain separate access count counters for all storage regions on the entire disk. Each read and write operation increments the corresponding count, reducing the computational power consumption during hotspot storage region identification. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and therefore should not be considered as a limitation on the scope of protection of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating the first embodiment of the hotspot storage area identification method provided in this application; Figure 2 A flowchart illustrating a second embodiment of the hotspot storage area identification method provided in this application; Figure 3 A flowchart illustrating the third embodiment of the hotspot storage area identification method provided in this application; Figure 4 A flowchart illustrating the fourth embodiment of the hotspot storage area identification method provided in this application; Figure 5 A flowchart illustrating the fifth embodiment of the hotspot storage area identification method provided in this application; Figure 6 A schematic diagram of the hotspot storage area identification device provided in this application. Detailed Implementation
[0017] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0018] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0019] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0020] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0021] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0022] It is understood that the method of this application is applied to a hotspot storage area identification system, which is installed in storage devices such as SSDs (Solid-State Drives) or UFS (Universal Flash Storage) that are commonly used in consumer smart terminals. For ease of explanation, the following embodiments use a hotspot storage area identification system as an example for detailed description.
[0023] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0024] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a first embodiment of the hotspot storage area identification method provided in this application. The method is applied to a storage device, which includes a mapping table cache pool and a hotspot recommendation list. The method includes: Step S101: Obtain the target mapping table swapped out from the mapping table cache pool, and calculate the target storage area number to which the target mapping table belongs.
[0025] In this embodiment, the hotspot storage region identification system obtains the target mapping table swapped out from the mapping table cache pool and calculates the target storage region number to which the target mapping table belongs. The mapping table cache pool is a Tbl Node List cache pool (fixed size 1056KB) set up by the Mapping module in the hotspot storage region identification system, storing active L1T mapping tables. The L1T mapping tables are the first-level mapping tables in the L2P mapping tables of the storage region. The L2P mapping tables include the first-level mapping table L1T, the second-level mapping table L2T, and the third-level mapping table L3T. In a UFS storage device, each storage region corresponds to a storage region number.
[0026] It is understandable that the mapping table cache pool stores a certain number of first-level mapping tables. These first-level mapping tables are mapping tables of relatively active storage areas in the UFS storage device, that is, storage areas where data is frequently read are relatively active storage areas.
[0027] Step S102: Place the target storage region number in the head node of the hotspot recommendation list, and update the popularity status of the target storage region number.
[0028] In this embodiment, after obtaining the target storage region number, the hotspot storage region identification system places the node corresponding to the target storage region number at the head of the hotspot recommendation list, and updates the popularity status of the target storage region number. It should be noted that the hotspot recommendation list is a fixed-size list; each node only stores the storage region number and popularity status. The maximum number of nodes in the hotspot recommendation list is configurable (default 32 nodes, total memory only 256 bytes). The hotspot recommendation list is only used to store the storage region numbers corresponding to the mapping tables swapped out from the mapping table cache pool. If the number of storage region numbers stored in the hotspot recommendation list exceeds the maximum number of nodes, some nodes will be automatically evicted.
[0029] In one embodiment, the hotspot recommendation linked list can be a bidirectional recommendation linked list built based on a very small memory area; or it can be a fixed-length circular linked list, where new nodes cover the oldest low-popularity nodes in the ring, and the head node is determined by a circular pointer.
[0030] Step S103: If the heat status meets the preset heat recommendation conditions, then the storage area corresponding to the target storage area number is determined to be a hot storage area.
[0031] In this embodiment, the hot storage area identification system only determines whether the popularity status of the target storage area number placed at the head node of the hot recommendation list meets the preset popularity recommendation conditions. If it does, the storage area corresponding to the target storage area number is determined to be a hot storage area. It should be noted that the storage area is an LBA interval, but this interval is not arbitrarily drawn. Instead, it is a fixed-size logical block strictly defined by the UFS protocol (especially the HPB specification). For example, in the UFS HPB standard, the typical LBA interval size is 16MB. The address space of a 512GB UFS device is divided into 32768 LBA intervals (512GB ÷ 16MB = 32768), and each LBA interval has a unique number.
[0032] In one embodiment, after determining that the storage area corresponding to the target storage area number is a hot storage area, the hot storage area identification system sends the target storage area number to the host, so that the host can retrieve the L2P mapping table corresponding to the hot storage area for caching. In one embodiment, the host and the storage device are communicatively connected. The hot storage area identification system encapsulates the target storage area number into a UPIU instruction and asynchronously reports it to the host. After receiving it, the host retrieves the entire L2P mapping table of the hot storage area and caches it in the host's own memory through the HPB READ BUFFER command. In this way, when the host receives a read request for the hot storage area in memory, it can directly query the L2P mapping table to issue a read command, saving the storage device table lookup overhead and significantly improving random read performance.
[0033] The hot storage region identification system in this embodiment obtains the target mapping table swapped out from the mapping table cache pool and calculates the target storage region number to which the target mapping table belongs; it places the target storage region number at the head node of the hotspot recommendation chain and updates the popularity status of the target storage region number; if the popularity status meets the preset popularity recommendation conditions, the storage region corresponding to the target storage region number is determined to be a hot storage region. This application only relies on swapping out the mapping table cache pool and the hotspot recommendation chain to realize hot storage region identification, avoiding the need to maintain a separate access count counter for all storage regions on the entire disk, and accumulating the corresponding count with each read and write, thus reducing the computing power consumption when performing hot storage region identification.
[0034] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the hotspot storage area identification method provided in this application. The difference between the second embodiment and the first embodiment is that the mapping table cache pool caches a preset number of mapping tables that meet preset activity conditions. The step of obtaining the target mapping table swapped out from the mapping table cache pool and calculating the target storage area number to which the target mapping table belongs includes: Step S201: When caching a new mapping table into the mapping table cache pool, determine the mapping table to be swapped out from the mapping table cache pool based on a preset swap-out policy.
[0035] In this embodiment, when the hot storage area identification system caches a new mapping table into the mapping table cache pool, since the number of mapping tables that the mapping table cache pool can cache is fixed, the hot storage area identification system determines the mapping table to be swapped out from the mapping table cache pool based on a preset swap-out strategy.
[0036] In one embodiment, the preset replacement policy is the LRU policy. Specifically, the LRU policy means that when the cache space is full, the mapping table that has not been accessed for the longest time is replaced to make room for a new mapping table. That is, the hot storage area identification system analyzes the access logs of each mapping table in the mapping table cache pool, determines the access frequency of each mapping table, and determines the mapping table with the lowest access frequency to be replaced.
[0037] Step S202: The swapped-out mapping table is swapped out of the mapping table cache pool, and the swapped-out mapping table is determined as the target mapping table.
[0038] Step S203: Based on preset calculation rules, calculate the target mapping table to determine the target storage area number to which the target mapping table belongs.
[0039] In this embodiment, the hotspot storage area identification system removes the swapped-out mapping table from the mapping table cache pool and identifies it as the target mapping table. Based on preset calculation rules, the system calculates the target storage area number to which the target mapping table belongs. In one embodiment, the target mapping table is an L1T level-one mapping table, and each L1T can be uniquely converted to its assigned storage area number.
[0040] It should be noted that if a mapping table is repeatedly loaded into the cache and then evicted by a new table in the mapping table cache pool, it means that the data in the storage area corresponding to that mapping table is continuously read at a high frequency and has extremely high popularity. It is the optimal HPB hot spot recommendation object. If a mapping table rarely triggers an evicting event, it means that the data in the storage area corresponding to that mapping table is read very infrequently and has low hot spot value.
[0041] The hotspot storage area identification system in this embodiment, when caching a new mapping table into the mapping table cache pool, determines the mapping table to be swapped out from the cache pool based on a preset swapping strategy, swaps the swapped-out mapping table out of the cache pool, and identifies the swapped-out mapping table as the target mapping table. Based on preset calculation rules, it calculates the target storage area number to which the target mapping table belongs based on the target storage area number. This system abandons the traditional full-scale storage area access counting and instead uses the mapping table swapping out event as the sole observation signal for determining the hotness of the storage area. It only occupies hundreds of bytes of SRAM, does not preempt mapping table cache resources, and can be adapted to small-capacity UFS devices such as mobile phones and wearable devices, significantly reducing statistical overhead and helping to reduce the computational power consumption during hotspot storage area identification.
[0042] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating a third embodiment of the hotspot storage area identification method provided in this application. The difference between the third embodiment and the first to second embodiments is that the step of placing the target storage area number at the head node of the hotspot recommendation list and updating the popularity status of the target storage area number includes: Step S301: Query the hotspot recommendation list based on the target storage area number to determine whether the target storage area number has already been stored in the hotspot recommendation list.
[0043] In this embodiment, the hotspot storage area identification system queries the hotspot recommendation list based on the target storage area number to determine whether the target storage area number is already stored in the hotspot recommendation list. Optionally, the hotspot storage area identification system compares the target storage area number sequentially with each storage area number in the hotspot recommendation list to determine whether the target storage area number is already stored in the hotspot recommendation list; optionally, the hotspot recommendation list is equipped with a hash table, and the hotspot storage area identification system can quickly search whether the target storage area number already exists in the hotspot recommendation list based on the hash table.
[0044] In one embodiment, the hotspot recommendation list stores a preset number of storage region numbers, and the hash values corresponding to all the storage region numbers are stored in a hash table. The step of querying the hotspot recommendation list based on the target storage region number to determine whether the target storage region number has already been stored in the hotspot recommendation list includes: Step S3011: Calculate the target hash value of the target storage area number, and query the hash table based on the target hash value.
[0045] Step S3012: If the target hash value exists in the hash table, then it is determined that the target storage area number has been stored in the hotspot recommendation chain.
[0046] Step S3013: If the target hash value does not exist in the hash table, then it is determined that the target storage area number is not stored in the hotspot recommendation chain.
[0047] In this embodiment, the hotspot storage area identification system calculates the target hash value of the target storage area number, queries the hash table based on the target hash value, and determines that the target storage area number is already stored in the hotspot recommendation list if the target hash value exists in the hash table; otherwise, it determines that the target storage area number is not stored in the hotspot recommendation list. It should be noted that the hash table allows for rapid traversal of the hotspot recommendation list, avoiding full list loop searches and reducing the time spent determining whether the target storage area number is already stored in the hotspot recommendation list.
[0048] Step S302: If yes, then move the node corresponding to the target storage area number to the head node of the hotspot recommendation list, and update the heat status of the target storage area number based on the preset heat update rules.
[0049] In this embodiment, if the hotspot storage area identification system determines that the target storage area number has been stored in the hotspot recommendation list, it will move the node corresponding to the target storage area number to the head node of the hotspot recommendation list, and other nodes will move one position to the right in turn. At the same time, the hotspot storage area identification system updates the popularity status of the target storage area number based on the preset popularity update rules.
[0050] Understandably, the default popularity update rule is: when a node with a storage region number is placed at the head of the hot recommendation list, the popularity status of the storage region number will be updated; where the popularity status is the total number of swaps in the target mapping table, the larger the total number of swaps, the higher the popularity, and each update of the popularity status is to increment the total number of swaps by 1.
[0051] Step S303: If not, create a target node for the target storage area number, and use the target node as the head node of the hotspot recommendation list, and update the popularity status of the target storage area number based on the preset popularity update rules.
[0052] In this embodiment, if the hotspot storage area identification system determines that the target storage area number is not stored in the hotspot recommendation list, it creates a target node for the target storage area number and uses the target node as the head node of the hotspot recommendation list, while other nodes move one position to the right in turn; at the same time, the hotspot storage area identification system updates the popularity status of the target storage area number based on a preset popularity update rule.
[0053] Understandably, for a newly added target storage region number, updating the hot status of the target storage region number is to set the total number of swaps out to 1.
[0054] In one embodiment, after the step of creating a target node for the target storage region number and using the target node as the head node of the hotspot recommendation list, the method includes: Step S3031: If it is determined that the hot recommendation list has reached the maximum node capacity, then based on the preset elimination strategy, the eliminated node is determined in the hot recommendation list and removed from the hot recommendation list.
[0055] In this embodiment, after the hotspot storage area identification system adds a head node to the hotspot recommendation list, if it determines that the hotspot recommendation list has reached its maximum node capacity, it determines and removes the node to be eliminated from the hotspot recommendation list based on a preset elimination strategy. The preset elimination strategy involves identifying the oldest node with the lowest hotspot status in the hotspot recommendation list as the node to be eliminated.
[0056] The hotspot storage area identification system in this embodiment uses a hotspot recommendation list with limited capacity and the total number of swaps in the mapping table to achieve hotspot statistics. The hotspot recommendation list stores only a small number of high-frequency storage areas, and hotspot storage areas are filtered out from the high-frequency storage areas, achieving memory usage within the KB level, which helps to reduce the computing power consumption when identifying hotspot storage areas.
[0057] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating a fourth embodiment of the hot storage area identification method provided in this application. The difference between the fourth embodiment and the first to third embodiments is that the heat status is the total number of swaps in the target mapping table, and the step of determining the storage area corresponding to the target storage area number as a hot storage area if the heat status meets the preset heat recommendation conditions includes: Step S401: Compare the total number of swaps with a preset threshold number.
[0058] Step S402: If the total number of swaps reaches the preset number threshold, then the storage area corresponding to the target storage area number is determined to be a hot storage area.
[0059] In this embodiment, the hot storage area identification system compares the total number of swaps recorded in the head node of the hot recommendation list with a preset threshold. If the total number of swaps reaches the preset threshold, the storage area corresponding to the target storage area number is determined to be a hot storage area.
[0060] The hotspot storage area identification system in this embodiment only needs to compare the total number of swaps recorded in the head node of the hotspot recommendation list with a preset threshold number to determine the hotspot storage area, thus avoiding a global traversal of the hotspot recommendation list and improving the efficiency of hotspot storage area identification.
[0061] Please refer to Figure 5 , Figure 5 This is a flowchart illustrating the fifth embodiment of the hotspot storage area identification method provided in this application. The difference between the fifth embodiment and the first to fourth embodiments is that the method further includes: Step S501: When an update mapping table to which write and update operations have been performed is detected, the reference storage area number to which the update mapping table belongs is calculated.
[0062] Step S502: If the reference storage area number is already stored in the hotspot recommendation chain, then the popularity status corresponding to the reference storage area number is cleared to zero.
[0063] In this embodiment, the hotspot storage area identification system monitors whether the data in the storage area of each mapping table in the mapping table cache pool is being written to or updated. When it detects an updated mapping table that has undergone write and update operations, it calculates the reference storage area number to which the updated mapping table belongs. If the reference storage area number is already stored in the hotspot recommendation list, the popularity status corresponding to the reference storage area number in the hotspot recommendation list is cleared to zero. After clearing, the node with the reference storage area number in the hotspot recommendation list loses its recommendation eligibility and is automatically removed from the hotspot recommendation list.
[0064] The hotspot storage area identification system in this embodiment suffers from several drawbacks. Traditional solutions require updating the mapping table of frequently written storage areas, leading to significant overhead and interference from numerous invalid mapping tables. This application addresses this by directly clearing the "hotspot" status of the corresponding mapping table when a storage area is written to, automatically filtering out frequently written storage areas unsuitable for HPB caching. This solves the problem of read / write indiscriminate caching in traditional solutions and improves the accuracy of hotspot storage area identification.
[0065] refer to Figure 6 , Figure 6 This is a schematic diagram of the hotspot storage area identification device provided in this application. The hotspot storage area identification device includes: The acquisition module 10 is used to acquire the target mapping table swapped out from the mapping table cache pool and calculate the target storage area number to which the target mapping table belongs. The update module 20 is used to place the target storage area number in the head node of the hot recommendation list and update the popularity status of the target storage area number. The determination module 30 is used to determine the storage area corresponding to the target storage area number as a hot storage area if the heat status meets the preset heat recommendation conditions.
[0066] It is understood that the hotspot storage area identification device in this embodiment corresponds to the hotspot storage area identification method in the above embodiment. The options in the above embodiment are also applicable to this embodiment, so they will not be described again here.
[0067] This application also provides a storage device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to cause the storage device to perform the above-described hotspot storage area identification method.
[0068] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0069] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0070] This application also provides a computer storage medium for storing the computer program used in the aforementioned storage device. The computer storage medium can be a readable storage medium, a non-volatile storage medium, or a volatile storage medium. For example, the computer storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0071] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0072] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0073] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a storage device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0074] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A hot spot storage area identification method characterized by comprising: The method is applied to a storage device, which includes a mapping table cache pool and a hotspot recommendation linked list. The method includes: Obtain the target mapping table swapped out from the mapping table cache pool, and calculate the target storage region number to which the target mapping table belongs; Place the target storage region number at the head node of the hot recommendation list, and update the popularity status of the target storage region number. If the popularity status meets the preset popularity recommendation conditions, then the storage area corresponding to the target storage area number is determined to be a hot storage area.
2. The hot spot storage area identifying method according to claim 1, characterized by, The mapping table cache pool caches a preset number of mapping tables that meet preset activity conditions. The step of obtaining the target mapping table swapped out from the mapping table cache pool and calculating the target storage region number to which the target mapping table belongs includes: When caching a new mapping table into the mapping table cache pool, the mapping table to be swapped out is determined from the mapping table cache pool based on a preset swap-out policy; The swapped-out mapping table is swapped out of the mapping table cache pool, and the swapped-out mapping table is determined as the target mapping table; Based on preset calculation rules, the target mapping table is calculated to determine the target storage area number to which the target mapping table belongs.
3. The hot spot storage area identifying method according to claim 1, characterized by, The step of placing the target storage region number at the head node of the hot recommendation list and updating the popularity status of the target storage region number includes: Based on the target storage region number, query the hotspot recommendation list to determine whether the target storage region number has already been stored in the hotspot recommendation list; If so, the node corresponding to the target storage area number is moved and changed to the head node of the hotspot recommendation list, and the popularity status of the target storage area number is updated based on the preset popularity update rules. If not, a target node is created for the target storage area number, and the target node is used as the head node of the hot recommendation list. The popularity status of the target storage area number is updated based on the preset popularity update rules.
4. The hot spot storage area identifying method according to claim 3, characterized by, The hotspot recommendation list stores a preset number of storage region IDs, and the hash values corresponding to all the storage region IDs are stored in a hash table. The step of querying the hotspot recommendation list based on the target storage region ID to determine whether the target storage region ID has been stored in the hotspot recommendation list includes: Calculate the target hash value of the target storage region number, and query the hash table based on the target hash value; If the target hash value exists in the hash table, then it is determined that the target storage area number has been stored in the hotspot recommendation chain list; If the target hash value does not exist in the hash table, it is determined that the target storage area number is not stored in the hotspot recommendation chain.
5. The hot spot storage area identifying method according to claim 3, characterized by, After the step of creating a target node for the target storage region number and using the target node as the head node of the hotspot recommendation linked list, the following steps are included: If it is determined that the hot topic recommendation list has reached its maximum node capacity, then based on a preset elimination strategy, an elimination node is determined in the hot topic recommendation list and removed from the hot topic recommendation list.
6. The hot spot storage area identifying method according to Claim 1, characterized by, The heat status is the total number of swaps in the target mapping table. The step of determining the storage area corresponding to the target storage area number as a hot storage area if the heat status meets the preset heat recommendation conditions includes: The total number of swaps is compared with a preset threshold number. If the total number of swaps reaches the preset threshold, then the storage area corresponding to the target storage area number is determined to be a hot storage area.
7. The hot spot storage area identifying method according to Claim 1, characterized by, The method further includes: When an update mapping table that has been subjected to write and update operations is detected, the reference storage area number to which the update mapping table belongs is calculated. If the reference storage area number is already stored in the hotspot recommendation list, then the popularity status corresponding to the reference storage area number is cleared to zero.
8. A hotspot storage area identification device, characterized in that, The hotspot storage area identification device includes: The acquisition module is used to acquire the target mapping table swapped out from the mapping table cache pool and calculate the target storage area number to which the target mapping table belongs; The update module is used to place the target storage region number in the head node of the hot recommendation chain and update the popularity status of the target storage region number. The determination module is used to determine the storage area corresponding to the target storage area number as a hot storage area if the heat status meets the preset heat recommendation conditions.
9. A storage device, characterized in that, The storage device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the hotspot storage area identification method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a processor, executes the hotspot storage area identification method according to any one of claims 1-7.
