File storage method and device, equipment and medium
By intelligently analyzing the access frequency and attributes of files in the object storage system, dynamically determine the storage type of files and store them in the appropriate cache medium, the performance improvement and cost control problems of object storage in high concurrent read and write scenarios are solved, and efficient storage resource utilization and user experience improvement are achieved.
Patent Information
- Application Number
- CN202411782834.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to effectively improve the performance of object storage in high concurrent read and write scenarios while controlling costs, and the storage resource utilization rate is low.
By intelligently analyzing the historical access frequency of the target file in the mechanical hard disk of the object storage system, determining whether the file is a high-frequency access file, and determining the type of storage to be stored based on the file attribute information and preset cache policy. If a file is accessed at a high frequency, it is stored in a memory cache or a solid-state drive cache to relieve mechanical hard disk pressure and make full use of high-performance storage media.
It effectively improves the performance of object storage systems in high concurrent read and write scenarios, improves the utilization rate of storage resources, reduces the high costs caused by simply increasing the storage level, and ensures a good experience for users during high concurrent access.
Smart Images

Figure CN119620952A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a file storage method, device, equipment and medium. Background Art
[0002] In the object storage system, storage types are diverse, including standard storage, low-frequency storage, and archive storage, each with unique advantages and applicable scenarios. Standard storage, relying on the high-speed read and write and low-latency characteristics of solid-state drives (SSDs), has become the first choice for fast data access scenarios; low-frequency storage, relying on the cost-effectiveness and large-capacity storage advantages of mechanical hard disks (HDDs), is suitable for environments with low access frequency but large storage capacity requirements; archive storage uses tapes as storage media, and although the access speed is slow, the cost is extremely low and the stability is strong, making it an ideal choice for long-term archiving and backup.
[0003] However, although these traditional storage types can meet the needs of most users, they are still insufficient in certain scenarios. For example, for users who store a large amount of low-frequency data and occasionally encounter high-concurrency reading and writing of the same file, the physical structure limitations of the HDD make it difficult to support a large number of concurrent requests, resulting in frequent problems such as request queuing and timeouts, which seriously affect the user experience. Although simply improving the storage level can solve the urgent problem, the increase in cost and the decrease in user satisfaction have become realistic problems that are difficult to avoid. Therefore, there is an urgent need to provide a method that can effectively improve the performance of object storage in high-concurrency read and write scenarios and improve the utilization of storage resources while controlling costs. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a file storage method, device, equipment and medium to solve the existing problem of being unable to effectively improve the performance of object storage in high-concurrency read and write scenarios and improve storage resource utilization while controlling costs.
[0005] In order to solve the above technical problems, the present application provides a file storage method, which adopts the following technical solutions:
[0006] Obtain access frequency information of a target file in a historical time period, where the target file is stored in a mechanical hard disk of an object storage system, and the current storage type of the target file is a low-frequency storage type; determine whether the target file is a high-frequency access file based on the access frequency information and a preset access threshold; if the target file is a high-frequency access file, obtain file attribute information of the target file, and determine the to-be-stored type of the target file based on a preset cache strategy and file attribute information; if the to-be-stored type of the target file is a memory storage type, store the target file in the memory cache of the object storage system; if the to-be-stored type of the target file is a standard storage type, store the target file in the solid-state hard disk cache of the object storage system.
[0007] Further, the step of determining whether the target file is a high-frequency access file according to the access frequency information and the preset access threshold value specifically includes:
[0008] If the number of accesses indicated by the access frequency information reaches a preset access threshold, the target file is determined to be a high-frequency access file; if the number of accesses does not reach the access threshold, the target file is determined not to be a high-frequency access file.
[0009] Furthermore, the step of determining the type of the target file to be stored specifically includes:
[0010] If the file size indicated by the file attribute information is smaller than a preset threshold, determining that the storage type of the target file is a memory storage type;
[0011] If the file size indicated by the file attribute information is greater than or equal to a preset threshold, it is determined that the storage type of the target file is a standard storage type.
[0012] Furthermore, after the step of storing the target file in the solid state disk cache of the object storage system if the storage type of the target file is a standard storage type, the method further includes:
[0013] The usage of memory cache and SSD cache is monitored in real time; when the usage of memory cache and / or SSD cache reaches a preset storage threshold, the corresponding cache files in the memory cache and / or SSD cache are eliminated according to the preset cache elimination strategy.
[0014] Furthermore, according to a preset cache elimination strategy, the step of removing corresponding cache files in the memory cache and / or the solid-state drive cache specifically includes:
[0015] According to the preset cache elimination strategy, the cache files to be eliminated are determined from the memory cache and / or the solid-state drive cache, and a list of files to be eliminated is generated; the file attribute information of each file to be eliminated in the list of files to be eliminated is obtained; according to the file attribute information, the elimination priority of each file to be eliminated is determined, and a file elimination priority list is generated; according to the file elimination priority list, the corresponding cache files are deleted from the memory cache and / or the solid-state drive cache.
[0016] Furthermore, before the step of obtaining the access frequency information of the target file in the historical time period, the method further includes:
[0017] Receive an access request for a target file, the access request including a file identifier of the target file; determine whether the target file exists in a memory cache of the object storage system based on the file identifier; if so, read the target file from the memory cache and return the target file to the initiator of the access request; if the target file does not exist in the memory cache, determine whether the target file exists in a solid-state drive cache of the object storage system; if so, read the target file from the solid-state drive cache of the object storage system and return the target file to the initiator of the access request; if the target file does not exist in the memory cache and the solid-state drive cache, read the target file from the mechanical hard disk of the object storage system and return the target file to the initiator of the access request.
[0018] In order to solve the above technical problems, the embodiment of the present application further provides a file storage device, which adopts the following technical solution:
[0019] The first acquisition module is used to acquire access frequency information of a target file in a historical time period, where the target file is stored in a mechanical hard disk of an object storage system, and the current storage type of the target file is a low-frequency storage type;
[0020] A judgment module, used to judge whether the target file is a high-frequency access file according to the access frequency information and a preset access threshold;
[0021] A second acquisition module is used to acquire file attribute information of the target file if the target file is a high-frequency access file, and determine the type of the target file to be stored based on a preset cache strategy and the file attribute information;
[0022] A first storage module, configured to store the target file in a memory cache of the object storage system if the storage type of the target file is a memory storage type;
[0023] The second storage module is used to store the target file in the solid state disk cache of the object storage system if the storage type of the target file is a standard storage type.
[0024] Furthermore, the judgment module includes:
[0025] A first determination submodule, configured to determine that the target file is a high-frequency access file if the number of accesses indicated by the access frequency information reaches a preset access threshold;
[0026] The second determination submodule is used to determine that the target file is not a high-frequency access file if the number of accesses does not reach the access threshold.
[0027] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the above-mentioned file storage method are implemented.
[0028] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable at least one processor to perform the steps of the above file storage method.
[0029] Compared with the prior art, the embodiment of the present application has the following beneficial effects: by intelligently analyzing the historical access frequency of the target file in the mechanical hard disk of the object storage system, the access mode of the target file is accurately identified. When the target file is detected as a high-frequency access file, its type to be stored is further intelligently determined based on the file attribute information and the preset cache strategy. If the type to be stored of the target file is determined to be a memory storage type, the target file is stored in the memory cache of the object storage system to alleviate the pressure of the mechanical hard disk under high-concurrency reading and writing; if the type to be stored of the target file is determined to be a standard storage type, the target file is stored in the solid-state drive cache to make full use of the high-speed reading and writing capabilities of the SSD. This technical solution not only effectively improves the performance of the object storage system in high-concurrency reading and writing scenarios, but also significantly improves the utilization rate of storage resources and reduces the high cost caused by simply improving the storage level. At the same time, it can ensure a good experience for users during high-concurrency access and enhance the flexibility and applicability of the object storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0032] Figure 2 It is a flowchart of a file storage method provided by this application;
[0033] Figure 3 It is a structural schematic diagram of a file storage device provided by the present application;
[0034] Figure 4 It is a structural schematic diagram of a computer device provided by this application. DETAILED DESCRIPTION
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0036] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0038] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0039] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0040] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to a laptop computer 1011, a tablet computer 1012 or a mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0041] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .
[0042] It should be noted that the file storage method provided in the embodiment of the present application is generally executed by a server, and accordingly, the file storage device is generally set in the server.
[0043] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0044] Continue to refer Figure 2 , shows a flow chart of an embodiment of a file storage method according to the present application. The file storage method comprises the following steps:
[0045] Step S201, obtaining access frequency information of a target file in a historical time period, the target file is stored in a mechanical hard disk of an object storage system, and the current storage type of the target file is a low-frequency storage type.
[0046] In this embodiment, the electronic device (eg, Figure 1 The server shown in the figure) can obtain the access frequency information through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0047] Among them, the target file refers to the specific data file that the user requests to access. In the object storage system, the target file is the smallest data unit for storage, retrieval and management, and has a unique file identifier for identifying and distinguishing different data contents.
[0048] The historical time period refers to a pre-set time period used to count and analyze file access situations. The data within this time period is used to generate access frequency information to help understand the access pattern of the target file and optimize the storage strategy.
[0049] The access frequency information refers to the statistical data on the number of times the target file is accessed within a specific historical period of time, which reflects the activity level of the target file and is an important basis for evaluating whether the storage type of the target file needs to be adjusted.
[0050] Among them, the object storage system is a data storage architecture that uses objects (rather than blocks or files) as the basic unit of data storage, provides efficient data storage, management and access services, and supports distributed storage and parallel processing of large-scale data.
[0051] Among them, the mechanical hard disk (HDD) is a hard disk drive based on magnetic storage technology. It reads and writes data on a rotating disk through a mechanical arm and a read-write head. Although the read and write speed is relatively slow, the cost is low and it is suitable for storing large amounts of infrequently accessed data.
[0052] Among them, storage type refers to the division of data storage into different types in the object storage system, such as standard storage, low-frequency storage, archive storage, etc., based on factors such as storage media, performance, and cost, to meet the needs of different application scenarios.
[0053] Among them, the low-frequency storage type is a storage type that is suitable for data with low access frequency but large storage requirements. It usually uses cost-effective storage media (such as HDD) to reduce storage costs.
[0054] Step S202: judging whether the target file is a high-frequency access file according to the access frequency information and a preset access threshold.
[0055] The access threshold refers to a preset value, which is used to determine whether the target file is a frequently accessed file. When the access frequency of the target file exceeds this threshold, it can be considered to be a frequently accessed file.
[0056] Among them, high-frequency access files refer to files whose access frequency exceeds a preset access threshold within a certain historical period. Such files usually require faster storage media to improve access performance.
[0057] Step S203: if the target file is a frequently accessed file, the file attribute information of the target file is obtained, and the type of the target file to be stored is determined based on the preset cache strategy and the file attribute information.
[0058] Among them, file attribute information refers to various attribute information about the target file, such as file size, creation time, modification time, permissions, etc. This information is used to assist in determining the storage type and cache strategy of the target file.
[0059] Among them, the cache strategy is a rule and method for managing cached data. It can determine whether the target file should be cached, the cache location (memory or solid-state drive) and the duration of the cache based on the access frequency, size and other attribute information of the target file.
[0060] The type to be stored refers to the type of storage of the target file determined based on the access frequency, size and other attribute information of the target file and a preset cache strategy, such as a memory storage type or a standard storage type.
[0061] Step S204: if the storage type of the target file is a memory storage type, the target file is stored in the memory cache of the object storage system.
[0062] Among them, the memory storage type is a storage method that stores data in memory. Since memory has the characteristics of high-speed reading and writing and low latency, the memory storage type is suitable for storing data that needs to be accessed quickly. However, memory storage capacity is limited and the cost is high, so it is usually used to store high-frequency access files or critical data.
[0063] Memory cache refers to a system that uses memory as a cache medium to store and manage data. Memory cache has the advantages of high-speed read and write and low latency, which can significantly improve the access speed and performance of the storage system. However, due to the limited capacity and high cost of memory, the use of memory cache needs to be managed reasonably.
[0064] Step S205: If the storage type of the target file is a standard storage type, the target file is stored in the solid state disk cache of the object storage system.
[0065] Among them, the standard storage type is a storage method that stores data on a solid-state drive. Solid-state drives have the characteristics of high-speed reading and writing and low latency, and are suitable for storing data that needs to be accessed quickly and frequently. The standard storage type strikes a balance between performance and cost and is the preferred storage type for many application scenarios.
[0066] Among them, SSD cache refers to a system that uses SSD as a cache medium to store and manage data. SSD cache has the advantages of high-speed reading and writing and low latency, which can further improve the performance of the storage system. Compared with memory cache, SSD cache has larger storage capacity and lower cost.
[0067] The embodiment of the present application can realize accurate identification of the target file access pattern by intelligently analyzing the historical access frequency of the target file in the mechanical hard disk of the object storage system. When the target file is detected as a high-frequency access file, its type to be stored is further intelligently determined based on the file attribute information and the preset cache strategy. If the type to be stored of the target file is determined to be a memory storage type, the target file is stored in the memory cache of the object storage system to alleviate the pressure of the mechanical hard disk under high-concurrency reading and writing; if the type to be stored of the target file is determined to be a standard storage type, the target file is stored in the solid-state drive cache to make full use of the high-speed reading and writing capabilities of the SSD. This technical solution not only effectively improves the performance of the object storage system in high-concurrency reading and writing scenarios, but also significantly improves the utilization rate of storage resources and reduces the high cost caused by simply improving the storage level. At the same time, it can ensure a good experience for users during high-concurrency access and enhance the flexibility and applicability of the object storage system.
[0068] In some optional implementations of this embodiment, step 202, judging whether the target file is a high-frequency access file according to the access frequency information and a preset access threshold, specifically includes the following steps:
[0069] If the number of accesses indicated by the access frequency information reaches a preset access threshold, the target file is determined to be a high-frequency access file; if the number of accesses does not reach the access threshold, the target file is determined not to be a high-frequency access file.
[0070] In one example, in the financial field, high-frequency trading has become an important part of the market, which requires real-time or near real-time access to market data. This embodiment describes the technical solution of this embodiment in detail in conjunction with actual cases of financial transaction data. In a financial transaction system, the access frequency of transaction data (such as stock prices, transaction volume, etc.) is a key indicator to measure its importance. First, the access frequency information of the target transaction data (such as the real-time price data of a certain stock) in a specific historical time period (such as the past week) can be collected. The preset access threshold is set to 100 accesses per minute. If the number of accesses to the target transaction data in the historical time period reaches or exceeds 100 times per minute, the target transaction data is determined to be a high-frequency access file. For example, the real-time price data of a hot stock is accessed up to 200 times per minute due to high market attention, so it is determined to be a high-frequency access file. It will then be considered to be stored in a higher-performance storage medium (such as a memory cache or a solid-state drive cache) to meet the needs of high-frequency access. On the contrary, if the number of accesses to a certain transaction data (such as the monthly transaction volume data of a certain unpopular stock) in the historical period does not reach 100 times per minute, then the target transaction data is determined not to be a high-frequency access file. Such data is usually stored in more cost-effective storage media (such as mechanical hard disks).
[0071] The embodiments of the present application can achieve intelligent judgment of the access frequency of the target file by accurately setting the access threshold. When the number of accesses indicated by the access frequency information reaches the preset access threshold, the target file can be quickly and accurately determined to be a high-frequency access file, thereby triggering the corresponding processing mechanism, such as storing it to a higher-performance storage medium to ensure the data security and access speed of the high-frequency access file. On the contrary, if the number of accesses does not reach the preset access threshold, the target file is determined not to be a high-frequency access file, avoiding unnecessary waste of resources. This intelligent judgment method based on access frequency makes it possible to flexibly adjust the storage and processing strategies according to the access requirements of different files, optimize the allocation of storage resources, and improve the overall performance and efficiency of the object storage system.
[0072] In some optional implementations of this embodiment, step S204, determining the type of the target file to be stored, specifically includes the following steps:
[0073] If the file size indicated by the file attribute information is smaller than a preset threshold, determining that the storage type of the target file is a memory storage type;
[0074] If the file size indicated by the file attribute information is greater than or equal to a preset threshold, it is determined that the storage type of the target file is a standard storage type.
[0075] In one example, in the field of high-frequency financial trading, the real-time and accuracy of trading data are crucial. High-frequency trading systems need to quickly process and analyze large amounts of market data to capture rapidly changing trading opportunities. This embodiment, combined with actual cases of high-frequency financial trading data, describes in detail the technical solution "If the file size indicated by the file attribute information is less than a preset threshold, it is determined that the target file is stored in memory."
[0076] In the financial high-frequency trading system, trading data (such as stock prices, trading volume, market depth, etc.) is stored in the form of files and needs to be frequently accessed for real-time analysis and decision-making. The system first obtains the attribute information of the target trading file, especially the file size. If the file size of the target trading file is less than the preset threshold, the system determines that its storage type is the memory storage type. For example, the file size of the real-time price data of a certain stock is 500KB, which is less than the preset threshold. The system determines it as a high-frequency small file and immediately stores it in the memory cache of the object storage system. The memory cache has the characteristics of high-speed access and low latency, which can ensure the real-time access requirements of the high-frequency trading system for such data. On the contrary, if the file size of the target trading file is greater than or equal to the preset threshold, the system determines that it is not suitable for direct storage in the memory cache, but considers storing it in a higher-capacity storage medium (such as a solid-state drive) to avoid excessive occupation of memory resources.
[0077] The embodiment of the present application can realize accurate determination of the storage type of the target file by intelligently identifying the file size in the file attribute information. When the file size is less than the preset threshold, it can be automatically determined as a memory storage type and quickly stored in the memory cache of the object storage system. This intelligent determination method based on file size enables the system to make full use of the high-speed access characteristics of the memory cache and improve the access speed of small files and the system response efficiency. At the same time, the technical solution also avoids storing large files directly in the memory cache, thereby preventing excessive occupation and waste of memory resources. By reasonably setting the file size threshold, the system can flexibly adjust the storage strategy and optimize the allocation of storage resources according to the storage requirements of different files.
[0078] In one example, in the financial field, the storage and access efficiency of big data files (such as market analysis reports, historical transaction data, etc.) is crucial to the decision-making and operation of financial institutions. This embodiment, combined with the actual case of financial big data files, explains in detail the technical solution "If the file size indicated by the file attribute information is greater than or equal to the preset threshold, the target file is determined to be stored as a standard storage type."
[0079] In the financial big data processing system, the system first obtains the attribute information of the target file, especially the file size. If the file size of the target file is greater than or equal to the preset threshold, the system determines that its storage type is a standard storage type. For example, the file size of a market analysis report of a financial institution is 150MB, which is greater than the preset threshold. The system determines it as a big data file and decides to store it in the solid-state drive cache of the object storage system. Compared with traditional mechanical hard drives, solid-state drive cache has higher read and write speeds and better data persistence, which can meet the storage performance and data security requirements of big data files.
[0080] The embodiment of the present application can achieve accurate classification of the storage type of the target file by intelligently analyzing the file size in the file attribute information. When the file size is greater than or equal to the preset threshold, the system can automatically determine that it is a standard storage type and efficiently store it in the solid-state drive cache of the object storage system. This intelligent storage strategy based on file size makes full use of the high read and write speed and large data capacity of the solid-state drive cache, significantly improving the storage and access efficiency of large data files.
[0081] In some optional implementations of this embodiment, in step S205, if the storage type of the target file is a standard storage type, after storing the target file in the solid state drive cache of the object storage system, the following steps are specifically included:
[0082] The usage of memory cache and SSD cache is monitored in real time; when the usage of memory cache and / or SSD cache reaches a preset storage threshold, the corresponding cache files in the memory cache and / or SSD cache are eliminated according to the preset cache elimination strategy.
[0083] The cache eviction policy refers to the rules used to determine which cache files should be eliminated when the cache usage reaches a preset threshold. The cache eviction policy aims to ensure the performance and efficiency of the cache system while avoiding cache overflow and performance degradation. Common cache eviction policies include LRU (least recently used) and LFU (least frequently used).
[0084] The cache file refers to the file data stored in the cache. The cache file can be any type of data file, including but not limited to documents, pictures, videos, etc. The existence of the cache file is to improve the access speed and performance of the storage system while reducing the access pressure on the data source.
[0085] In one example, in the field of high-frequency financial trading, the real-time and accuracy of trading data have a decisive impact on trading results. In order to improve the response speed and data processing capabilities of the trading system, this embodiment combines the actual case of the high-frequency financial trading system to explain in detail the technical solution of "real-time monitoring of the usage of the memory cache and the solid-state drive cache; when the usage of the memory cache and / or the solid-state drive cache reaches the preset storage threshold, the corresponding cache files in the memory cache and / or the solid-state drive cache are eliminated according to the preset cache elimination strategy."
[0086] In the financial high-frequency trading system, trading data is stored in the form of cache files in the memory cache and the solid-state drive cache to speed up data access. In order to ensure the stability and efficiency of the system, the system monitors the usage of the memory cache and the solid-state drive cache in real time. Assume that the storage threshold is set to 80% of the memory cache usage and 90% of the solid-state drive cache usage respectively. When the usage of the memory cache or the solid-state drive cache reaches the preset storage threshold, the system will automatically remove the corresponding cache file according to the preset cache elimination strategy. The cache elimination strategy includes the least recently used algorithm (Least Recently Used, LRU), the least frequently used algorithm (Least Frequently Used, LFU), etc. In the financial high-frequency trading system, considering the timeliness of trading data, the LRU algorithm is usually adopted, that is, the least recently used cache file is eliminated first. For example, in a certain high-frequency trading process, due to frequent market data updates, the memory cache usage quickly climbed to the preset storage threshold of 80%. At this time, the system automatically eliminated some older market data cache files according to the LRU algorithm, freeing up memory space and ensuring the timely storage and access of new data.
[0087] The embodiment of the present application can achieve refined management of cache resources by real-time monitoring of the usage of memory cache and solid-state drive cache. When the cache usage reaches the preset storage threshold, the system can intelligently trigger the cache elimination strategy and automatically remove the corresponding cache files, thereby effectively avoiding the risk of cache overflow and data loss. This cache management mechanism based on real-time monitoring and intelligent elimination can ensure the efficient utilization and dynamic balance of cache resources. By reasonably setting the storage threshold and selecting a suitable cache elimination strategy, the system can flexibly adjust the use of cache resources according to the needs of different application scenarios, improve data access speed and system responsiveness. At the same time, the technical solution can also reduce storage costs and improve resource utilization. By intelligently removing cache files that are no longer needed, the system can free up more storage space and provide sufficient cache resources for new data.
[0088] In some optional implementations of this embodiment, the step of “eliminating corresponding cache files in the memory cache and / or the solid-state drive cache according to a preset cache elimination strategy” specifically includes the following steps:
[0089] According to the preset cache elimination strategy, the cache files to be eliminated are determined from the memory cache and / or the solid-state drive cache, and a list of files to be eliminated is generated; the file attribute information of each file to be eliminated in the list of files to be eliminated is obtained; according to the file attribute information, the elimination priority of each file to be eliminated is determined, and a file elimination priority list is generated; according to the file elimination priority list, the corresponding cache files are deleted from the memory cache and / or the solid-state drive cache.
[0090] The file attribute information may include the file size and the last access time.
[0091] In one example, the cache files to be eliminated can be determined from the memory cache and / or SSD cache according to a preset cache elimination strategy (e.g., the LRU least recently used strategy), and a list of files to be eliminated can be generated. For example, when the cache space reaches a preset threshold, the elimination strategy is triggered. Next, the file attribute information of each file to be eliminated in the list of files to be eliminated is obtained, and these attribute information may include but are not limited to the file size and the last access time. For example, the metadata of each file is obtained through a file system API call. Then, based on the file attribute information, the elimination priority of each file to be eliminated is determined, and a file elimination priority list is generated. In this embodiment, files with large files and the earliest last access time can be eliminated first, because such files occupy a large space and have a low frequency of recent use. Finally, according to the file elimination priority list, the corresponding cache files are deleted from the memory cache and / or SSD cache to release storage space.
[0092] The embodiment of the present application can ensure that when the cache space is tight, the files to be eliminated can be screened out in a targeted manner through a preset cache elimination strategy to avoid blind deletion that leads to loss of important data or degradation of access performance. At the same time, by obtaining the attribute information of the files to be eliminated, such as file size and access time, data support is provided for accurately evaluating the elimination priority of the files. On this basis, the generated file elimination priority list can guide the system to preferentially eliminate those files that occupy a large space and have a low frequency of recent use, thereby maximizing the release of storage space while ensuring the effectiveness of the cache. In addition, the technical solution of this embodiment can be flexibly applied to memory cache and solid-state hard disk cache, adapt to the characteristics of different storage media, realize the intelligence and efficiency of cache management, and effectively improve the overall performance and user experience of the storage system.
[0093] In some optional implementations of this embodiment, before obtaining the access frequency information of the target file in the historical time period in step S202, the following steps are specifically included:
[0094] Receive an access request for a target file, the access request including a file identifier of the target file; determine whether the target file exists in a memory cache of the object storage system based on the file identifier; if so, read the target file from the memory cache and return the target file to the initiator of the access request; if the target file does not exist in the memory cache, determine whether the target file exists in a solid-state drive cache of the object storage system; if so, read the target file from the solid-state drive cache of the object storage system and return the target file to the initiator of the access request; if the target file does not exist in the memory cache and the solid-state drive cache, read the target file from the mechanical hard disk of the object storage system and return the target file to the initiator of the access request.
[0095] An access request is a request sent by a user or system to an object storage system to access or operate a target file. An access request usually includes the file identifier of the target file, the access type (such as read, write, etc.), and other related information.
[0096] The file identifier is an identifier used to uniquely identify the target file. The file identifier can be a file name, file path, file ID, etc. In an object storage system, the file identifier is used to locate the target file and process the corresponding access request.
[0097] In one example, in a financial transaction system, fast and accurate access to transaction data files is crucial to transaction decision-making and risk control. In order to improve the file access speed, this embodiment combines the actual case of the financial transaction system to explain in detail the technical solution of "receiving an access request for a target file, determining the existence of the file in the memory cache, solid state drive cache or mechanical hard disk according to the file identifier, and reading the file from the corresponding location accordingly".
[0098] In financial trading systems, trading data files are stored and managed with specific file identifiers. When a trader or trading system needs to access a trading data file (target file), an access request containing the file identifier is sent to the object storage system. The object storage system first receives the access request and determines whether the target file exists in the memory cache based on the file identifier. As the fastest data access layer, the memory cache can respond to the access request quickly. If the target file does not exist in the memory cache, the system continues to determine whether the file exists in the solid-state drive cache. Although the solid-state drive cache is slightly slower than the memory cache, it has a larger capacity and can store more trading data files. If the target file does not exist in either the memory cache or the solid-state drive cache, the system will read the file from the mechanical hard disk of the object storage system. As a data persistence storage layer, the mechanical hard disk has a relatively slow access speed, but it can ensure the long-term preservation and reliability of data.
[0099] The embodiment of the present application can achieve efficient access to the target file by constructing a multi-layer storage architecture including a memory cache, a solid-state drive cache, and a mechanical hard disk. When receiving an access request for a target file, the system first quickly searches in the memory cache according to the file identifier, and directly returns the file if it hits, significantly improving the access speed. If the memory cache misses, the system continues to search in the solid-state drive cache, using the high-speed read and write performance of the solid-state drive to further shorten the access time. If the first two layers of cache miss, the system eventually reads the file from the mechanical hard disk. Although the speed is relatively slow, it ensures the reliability and integrity of the data. This multi-layer caching strategy effectively reduces the access frequency of the mechanical hard disk, extends the life of the hard disk, and at the same time improves the response speed of file access and the overall system performance.
[0100] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target files and access frequency information, the directory information and result data of the above-mentioned file system can also be stored in a blockchain node.
[0101] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0102] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0103] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0104] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a file storage device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0105] like Figure 3 As shown, the file storage device 400 of this embodiment includes: a first acquisition module 401, a judgment module 402, a second acquisition module 403, a first storage module 404 and a second storage module 405. Among them:
[0106] The first acquisition module 401 is used to acquire access frequency information of a target file in a historical time period, where the target file is stored in a mechanical hard disk of an object storage system, and the current storage type of the target file is a low-frequency storage type;
[0107] The judgment module 402 is used to judge whether the target file is a high-frequency access file according to the access frequency information and the preset access threshold;
[0108] The second acquisition module 403 is used to acquire file attribute information of the target file if the target file is a frequently accessed file, and determine the type of the target file to be stored based on a preset cache strategy and the file attribute information;
[0109] A first storage module 404 is configured to store the target file in a memory cache of the object storage system if the storage type of the target file is a memory storage type;
[0110] The second storage module 405 is configured to store the target file in a solid state disk cache of the object storage system if the storage type of the target file is a standard storage type.
[0111] The embodiment of the present application can realize accurate identification of the target file access pattern by intelligently analyzing the historical access frequency of the target file in the mechanical hard disk of the object storage system. When the target file is detected as a high-frequency access file, its type to be stored is further intelligently determined based on the file attribute information and the preset cache strategy. If the type to be stored of the target file is determined to be a memory storage type, the target file is stored in the memory cache of the object storage system to alleviate the pressure of the mechanical hard disk under high-concurrency reading and writing; if the type to be stored of the target file is determined to be a standard storage type, the target file is stored in the solid-state drive cache to make full use of the high-speed reading and writing capabilities of the SSD. This technical solution not only effectively improves the performance of the object storage system in high-concurrency reading and writing scenarios, but also significantly improves the utilization rate of storage resources and reduces the high cost caused by simply improving the storage level. At the same time, it can ensure a good experience for users during high-concurrency access and enhance the flexibility and applicability of the object storage system.
[0112] In one embodiment, the determination module 402 includes:
[0113] A first determination submodule, configured to determine that the target file is a high-frequency access file if the number of accesses indicated by the access frequency information reaches a preset access threshold;
[0114] The second determination submodule is used to determine that the target file is not a high-frequency access file if the number of accesses does not reach the access threshold.
[0115] The embodiments of the present application can achieve intelligent judgment of the access frequency of the target file by accurately setting the access threshold. When the number of accesses indicated by the access frequency information reaches the preset access threshold, the target file can be quickly and accurately determined to be a high-frequency access file, thereby triggering the corresponding processing mechanism, such as storing it to a higher-performance storage medium to ensure the data security and access speed of the high-frequency access file. On the contrary, if the number of accesses does not reach the preset access threshold, the target file is determined not to be a high-frequency access file, avoiding unnecessary waste of resources. This intelligent judgment method based on access frequency makes it possible to flexibly adjust the storage and processing strategies according to the access requirements of different files, optimize the allocation of storage resources, and improve the overall performance and efficiency of the object storage system.
[0116] In one embodiment, the second acquisition module 403 includes:
[0117] A third determination submodule, configured to determine that the storage type of the target file is a memory storage type if the file size indicated by the file attribute information is smaller than a preset threshold;
[0118] A fourth determination submodule, configured to determine that the to-be-stored type of the target file is a standard storage type if the file size indicated by the file attribute information is greater than or equal to a preset threshold;
[0119] The embodiment of the present application can realize accurate determination of the storage type of the target file by intelligently identifying the file size in the file attribute information. When the file size is less than a preset threshold, it can be automatically determined as a memory storage type. This intelligent determination method based on file size enables the system to make full use of the high-speed access characteristics of the memory cache, improve the access speed of small files and the system response efficiency. By intelligently analyzing the file size in the file attribute information, accurate classification of the storage type of the target file is realized. When the file size is greater than or equal to the preset threshold, the system can automatically determine it as a standard storage type.
[0120] In one embodiment, the file storage device further includes:
[0121] A monitoring module is used to monitor the usage of memory cache and solid-state drive cache in real time;
[0122] The culling module is used to cull the corresponding cache files in the memory cache and / or the solid-state drive cache according to a preset cache culling strategy when the usage of the memory cache and / or the solid-state drive cache reaches a preset storage threshold.
[0123] The embodiment of the present application can achieve refined management of cache resources by real-time monitoring of the usage of memory cache and solid-state drive cache. When the cache usage reaches the preset storage threshold, the system can intelligently trigger the cache elimination strategy and automatically remove the corresponding cache files, thereby effectively avoiding the risk of cache overflow and data loss. This cache management mechanism based on real-time monitoring and intelligent elimination can ensure the efficient utilization and dynamic balance of cache resources. By reasonably setting the storage threshold and selecting a suitable cache elimination strategy, the system can flexibly adjust the use of cache resources according to the needs of different application scenarios, improve data access speed and system responsiveness. At the same time, the technical solution can also reduce storage costs and improve resource utilization. By intelligently removing cache files that are no longer needed, the system can free up more storage space and provide sufficient cache resources for new data.
[0124] In one embodiment, the rejection module includes:
[0125] A file determination submodule is used to determine cache files to be eliminated from the memory cache and / or the solid-state drive cache according to a preset cache elimination strategy, and generate a list of files to be eliminated;
[0126] The acquisition submodule is used to obtain the file attribute information of each file to be removed from the list of files to be removed;
[0127] The priority determination submodule is used to determine the elimination priority of each file to be eliminated according to the file attribute information and generate a file elimination priority list;
[0128] The deletion submodule is used to delete corresponding cache files from the memory cache and / or the solid-state drive cache according to the file elimination priority list.
[0129] The embodiment of the present application can ensure that when the cache space is tight, the files to be eliminated can be screened out in a targeted manner through a preset cache elimination strategy to avoid blind deletion that leads to loss of important data or degradation of access performance. At the same time, by obtaining the attribute information of the files to be eliminated, such as file size and access time, data support is provided for accurately evaluating the elimination priority of the files. On this basis, the generated file elimination priority list can guide the system to preferentially eliminate those files that occupy a large space and have a low frequency of recent use, thereby maximizing the release of storage space while ensuring the effectiveness of the cache. In addition, the technical solution of this embodiment can be flexibly applied to memory cache and solid-state hard disk cache, adapt to the characteristics of different storage media, realize the intelligence and efficiency of cache management, and effectively improve the overall performance and user experience of the storage system.
[0130] In one embodiment, the file storage device further includes:
[0131] A monitoring module, used for receiving an access request to a target file, the access request including a file identifier of the target file;
[0132] A first reading module is used to determine whether the target file exists in the memory cache of the object storage system according to the file identifier, and if so, read the target file from the memory cache and return the target file to the initiator of the access request;
[0133] The second reading module is used to determine whether the target file exists in the solid state disk cache of the object storage system if the target file does not exist in the memory cache, and if so, read the target file from the solid state disk cache of the object storage system and return the target file to the initiator of the access request;
[0134] The third reading module is used to read the target file from the mechanical hard disk of the object storage system if the target file does not exist in the memory cache and the solid state drive cache, and return the target file to the initiator of the access request.
[0135] The embodiment of the present application can achieve efficient access to the target file by constructing a multi-layer storage architecture including a memory cache, a solid-state drive cache, and a mechanical hard disk. When receiving an access request for a target file, the system first quickly searches in the memory cache according to the file identifier, and directly returns the file if it hits, significantly improving the access speed. If the memory cache misses, the system continues to search in the solid-state drive cache, using the high-speed read and write performance of the solid-state drive to further shorten the access time. If the first two layers of cache miss, the system eventually reads the file from the mechanical hard disk. Although the speed is relatively slow, it ensures the reliability and integrity of the data. This multi-layer caching strategy effectively reduces the access frequency of the mechanical hard disk, extends the life of the hard disk, and at the same time improves the response speed of file access and the overall system performance.
[0136] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0137] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 6 having a memory 61, a processor 62, and a network interface 63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.
[0138] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.
[0139] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the file storage method, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.
[0140] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run computer-readable instructions stored in the memory 61 or process data, such as computer-readable instructions for running a file storage method.
[0141] The network interface 63 may include a wireless network interface or a wired network interface, and the network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.
[0142] The embodiment of the present application can realize accurate identification of the target file access pattern by intelligently analyzing the historical access frequency of the target file in the mechanical hard disk of the object storage system. When the target file is detected as a high-frequency access file, its type to be stored is further intelligently determined based on the file attribute information and the preset cache strategy. If the type to be stored of the target file is determined to be a memory storage type, the target file is stored in the memory cache of the object storage system to alleviate the pressure of the mechanical hard disk under high-concurrency reading and writing; if the type to be stored of the target file is determined to be a standard storage type, the target file is stored in the solid-state drive cache to make full use of the high-speed reading and writing capabilities of the SSD. This technical solution not only effectively improves the performance of the object storage system in high-concurrency reading and writing scenarios, but also significantly improves the utilization rate of storage resources and reduces the high cost caused by simply improving the storage level. At the same time, it can ensure a good experience for users during high-concurrency access and enhance the flexibility and applicability of the object storage system.
[0143] The present application also provides another implementation, namely, providing a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the file storage method as described above.
[0144] The embodiment of the present application can realize accurate identification of the target file access pattern by intelligently analyzing the historical access frequency of the target file in the mechanical hard disk of the object storage system. When the target file is detected as a high-frequency access file, its type to be stored is further intelligently determined based on the file attribute information and the preset cache strategy. If the type to be stored of the target file is determined to be a memory storage type, the target file is stored in the memory cache of the object storage system to alleviate the pressure of the mechanical hard disk under high-concurrency reading and writing; if the type to be stored of the target file is determined to be a standard storage type, the target file is stored in the solid-state drive cache to make full use of the high-speed reading and writing capabilities of the SSD. This technical solution not only effectively improves the performance of the object storage system in high-concurrency reading and writing scenarios, but also significantly improves the utilization rate of storage resources and reduces the high cost caused by simply improving the storage level. At the same time, it can ensure a good experience for users during high-concurrency access and enhance the flexibility and applicability of the object storage system.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0146] The non-Company software tools or components appearing in the embodiments of this application are merely examples and do not represent actual use.
[0147] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A file storage method, characterized in that: The steps include: Obtaining access frequency information of a target file in a historical time period, wherein the target file is stored in a mechanical hard disk of an object storage system, and the current storage type of the target file is a low-frequency storage type; According to the access frequency information and a preset access threshold, determining whether the target file is a high-frequency access file; If the target file is the frequently accessed file, obtaining file attribute information of the target file, and determining the type of the target file to be stored based on a preset cache strategy and the file attribute information; If the to-be-stored type of the target file is a memory storage type, storing the target file in the memory cache of the object storage system; If the to-be-stored type of the target file is a standard storage type, the target file is stored in the solid-state hard disk cache of the object storage system.
2. The method according to claim 1, characterized in that The step of judging whether the target file is a high-frequency access file according to the access frequency information and the preset access threshold value specifically includes: If the number of accesses indicated by the access frequency information reaches a preset access threshold, the target file is determined to be a high-frequency access file; If the number of accesses does not reach the access threshold, it is determined that the target file is not the high-frequency access file.
3. The method according to claim 1, characterized in that The step of determining the type of the target file to be stored specifically includes: If the file size indicated by the file attribute information is smaller than a preset threshold, determining that the to-be-stored type of the target file is a memory storage type; If the file size indicated by the file attribute information is greater than or equal to the preset threshold, it is determined that the to-be-stored type of the target file is a standard storage type.
4. The method according to claim 1, characterized in that: After the step of storing the target file in the solid state disk cache of the object storage system if the to-be-stored type of the target file is a standard storage type, the method further includes: Performing real-time monitoring on the usage of the memory cache and the solid state drive cache; When the usage of the memory cache and / or the solid-state drive cache reaches a preset storage threshold, the corresponding cache files in the memory cache and / or the solid-state drive cache are removed according to a preset cache elimination strategy.
5. The method according to claim 4, characterized in that The step of removing the corresponding cache files in the memory cache and / or the solid state drive cache according to the preset cache elimination strategy specifically includes: According to a preset cache elimination strategy, cache files to be eliminated are determined from the memory cache and / or the solid-state drive cache, and a list of files to be eliminated is generated; Obtaining file attribute information of each file to be removed from the list of files to be removed; Determine the elimination priority of each file to be eliminated according to the file attribute information, and generate a file elimination priority list; According to the file elimination priority list, the corresponding cache file is deleted from the memory cache and / or the solid state drive cache.
6. The method according to claim 1, characterized in that Before the step of obtaining the access frequency information of the target file in the historical time period, the method further includes: Receiving an access request for a target file, wherein the access request includes a file identifier of the target file; According to the file identifier, determining whether the target file exists in the memory cache of the object storage system, and if so, reading the target file from the memory cache, and returning the target file to the initiator of the access request; If the target file does not exist in the memory cache, determining whether the target file exists in the solid-state disk cache of the object storage system; if so, reading the target file from the solid-state disk cache of the object storage system, and returning the target file to the initiator of the access request; If the target file does not exist in the memory cache and the solid state drive cache, the target file is read from the mechanical hard disk of the object storage system, and the target file is returned to the initiator of the access request.
7. A file storage device, characterized in that: include: A first acquisition module is used to acquire access frequency information of a target file in a historical time period, wherein the target file is stored in a mechanical hard disk of an object storage system, and the current storage type of the target file is a low-frequency storage type; A judgment module, used to judge whether the target file is a high-frequency access file according to the access frequency information and a preset access threshold; A second acquisition module is used to acquire file attribute information of the target file if the target file is the frequently accessed file, and determine the type of the target file to be stored based on a preset cache strategy and the file attribute information; A first storage module, configured to store the target file in a memory cache of the object storage system if the storage type of the target file is a memory storage type; The second storage module is used to store the target file in the solid state disk cache of the object storage system if the storage type of the target file is a standard storage type.
8. The device according to claim 7, characterized in that The judging module comprises: A first determination submodule, configured to determine that the target file is a high-frequency access file if the number of accesses indicated by the access frequency information reaches a preset access threshold; The second determination submodule is configured to determine that the target file is not the high-frequency access file if the number of accesses does not reach the access threshold.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the file storage method according to any one of claims 1 to 6 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the file storage method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Classified storage method and device based on data content identification
CN120353412A
Data storage method and device, equipment, medium and program product
CN120386493A
Data caching method, system and device and storage medium
CN120583063A