Data pre-reading method and device, storage medium and electronic equipment

By building a cache invalidation address table and optimizing the pre-reading strategy, the inefficiency of traditional pre-fetching technology in complex I/O scenarios is solved, and more efficient data loading and cache management are achieved, which is suitable for cloud computing and edge computing environments.

CN120687421APending Publication Date: 2025-09-23JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510779051.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Traditional prefetching technology has a complex and inefficient process for pre-reading data in complex I/O scenarios. Especially when faced with different types of files and user access patterns, the prefetching efficiency may be greatly reduced, leading to cache pollution and increased back-end storage burden, and unable to meet the requirements of efficient and accurate data loading.

Method used

By obtaining cache invalidation information of the file system in response to multiple read requests, a cache invalidation address table is established. This table is used to pre-read data in response to target read requests, dynamically adjust the pre-read window size and cache capacity, and optimize the pre-read strategy to reduce cache invalidations.

Benefits of technology

Significantly reduce data access latency, improve file system reading efficiency and user experience, optimize cache resource utilization, and adapt to complex and changing data access scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687421A_ABST
    Figure CN120687421A_ABST
Patent Text Reader

Abstract

The invention discloses a data pre-reading method and device, a storage medium and electronic equipment, and relates to the technical field of file system data pre-fetching, and the method comprises the steps: obtaining response information corresponding to each read request after a file system responds to a plurality of read requests; under the condition that the response information indicates that cache failure exists in a first address responding to the read request, failure information corresponding to the first address is recorded, and the failure information at least comprises address data of the first address and offset information of a file stored on the first address; establishing a cache failure address table of the file system according to the failure information; and performing data pre-reading response on a target read request based on the cache failure address table, the target read request being a request executed after a plurality of read requests, and solving the problems of complex flow and low efficiency of data pre-reading in a complex I / O scene in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of file system pre-fetching data, and specifically, to a data pre-reading method, device, storage medium, and electronic device. Background Art

[0002] Traditional prefetching techniques typically employ a fixed-number prefetching strategy for data streams. However, this approach has significant limitations, particularly when dealing with different file types and user access patterns, where prefetching efficiency can be significantly reduced. Furthermore, with the rapid development of cloud computing and edge computing in recent years, file system prefetching technology is facing new challenges and opportunities. In cloud data center environments, data is more widely distributed and access requirements are more diverse. Traditional prefetching strategies struggle to meet the requirements for efficient and accurate data loading. Edge computing, on the other hand, emphasizes real-time and localized data processing, requiring more intelligent and sophisticated prefetching techniques to quickly respond to users' immediate needs. Furthermore, related technologies have shown that when file systems experience high volumes of random access, cold starts, or sudden changes in access patterns, the efficiency of prefetching mechanisms can be significantly reduced, potentially leading to cache contamination, where large amounts of data that will not actually be accessed immediately are stored in the cache. This phenomenon not only wastes valuable cache resources but can also increase the burden on backend storage due to excessive and ineffective prefetching operations, ultimately reducing overall system performance.

[0003] In related technologies, there is currently no effective solution to the problem of complex and inefficient data pre-reading processes in complex I / O scenarios. Summary of the Invention

[0004] The embodiments of the present application provide a data pre-reading method, device, storage medium, and electronic device to at least solve the problem of complex process and low efficiency of pre-reading data in complex I / O scenarios in the related art.

[0005] According to one embodiment of the present application, a data pre-reading method is provided, comprising: obtaining response information corresponding to each read request after a file system responds to multiple read requests; when the response information indicates that a cache invalidation exists at a first address responding to the read request, recording invalidation information corresponding to the first address, wherein the invalidation information comprises at least: address data of the first address and offset information of a file stored at the first address; establishing a cache invalidation address table of the file system according to the invalidation information; and performing a data pre-reading response to a target read request based on the cache invalidation address table, wherein the target read request is a request executed after the multiple read requests.

[0006] In an exemplary embodiment, a pre-read data response is performed to a target read request based on the cache invalidation address table, including: obtaining a second address for responding to the target read request; matching the second address with the first address in the cache invalidation address table; determining a pre-read start address based on the matching result; marking the target file corresponding to the pre-read start address as data to be responded to; and pre-reading the data to be responded to into the cache space to respond to the target read request.

[0007] In an exemplary embodiment, before matching the second address with the first address in the cache invalidation address table, the above method also includes: determining the window size of the data sending window to be responded to based on the characteristics of the file system and the data access pattern of the target object to which the target read request is sent; and based on the characteristics and the data access pattern.

[0008] In an exemplary embodiment, after matching the second address with the first address in the cache invalidation address table, the above method further includes: if the matching result indicates a successful match, increasing the window size of the window for sending data to be responded to; if the matching result indicates a failed match, reducing the window size of the window for sending data to be responded to.

[0009] In an exemplary embodiment, after pre-reading data in response to a target read request based on the cache invalidation address table, the above method further includes: determining the real-time storage capacity of the cache area in the file system; when the real-time storage capacity is greater than or equal to the pre-configured storage capacity, adjusting the capacity according to the cache invalidation address table; when the real-time storage capacity is less than the pre-configured storage capacity, generating a system log indicating that the file system cache is normal.

[0010] In an exemplary embodiment, capacity adjustment is performed based on a cache invalidation address table, including: determining an entry storage address corresponding to the least recently used data in the file system; matching the entry storage address with different first addresses in the cache invalidation address table; if the match is successful, deleting the cache data content associated with the entry storage address; if the match is unsuccessful, not deleting the cache data content associated with the entry storage address.

[0011] In an exemplary embodiment, after pre-reading data in response to the target read request based on the cache invalidation address table, the above method also includes: counting the number of successful hits of different first addresses in the cache invalidation address table; when the number of hits is greater than a preset threshold, directly updating the pre-read cache list with the third address corresponding to the number of hits, wherein the pre-read cache list is used to determine the loading order of the target read request response data; checking the number of entries in the updated pre-read cache list; when the number of entries is greater than the preset number of security entries, performing item overlap processing on the updated pre-read cache list; when the number of entries is less than or equal to the preset number of security entries, performing item merging processing on the updated pre-read cache list; when the number of hits is less than or equal to the preset threshold, using the pre-read cache list to call data in the file system; counting the call time to complete all data calls; and configuring the allowed call time period of the file system according to the call time.

[0012] According to another embodiment of the present application, a data pre-reading device is provided, including: an acquisition module for acquiring response information corresponding to each read request after the file system responds to multiple read requests; a recording module for recording invalidation information corresponding to the first address in a case where the response information indicates that there is a cache invalidation at the first address responding to the read request, wherein the invalidation information includes at least: address data of the first address and offset information of the file stored at the first address; an establishment module for establishing a cache invalidation address table of the file system according to the invalidation information; and a pre-reading module for performing a data pre-reading response to a target read request based on the cache invalidation address table, wherein the target read request is a request executed after multiple read requests.

[0013] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0014] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0015] According to another embodiment of the present application, a computer program product is provided, including a computer program, which implements the steps of any of the above method embodiments when executed by a processor.

[0016] This application collects feedback information when a file responds to multiple read requests, focusing on those that cause cache invalidation. Each time a cache invalidation occurs, relevant information about the corresponding first address is recorded. For each first address that causes a cache invalidation, invalidation information is recorded, including at least the address data (i.e., the specific address in the file) and the offset information of the file stored at that address. The offset information represents the specific location of the file on the storage medium and facilitates the precise execution of subsequent pre-read operations. Based on the collected invalidation information, a cache invalidation address table is constructed. This table not only records all addresses that cause cache invalidations but also, through analysis of the offset information, reveals the underlying file access patterns, providing a data basis for subsequent pre-read strategies. The cache invalidation address table is used to pre-read responses to subsequent target read requests. The target read request is typically the next expected access request for the file after the previous batch of read requests has been executed. By analyzing historical cache invalidation information, it is possible to predict and pre-load the potentially required data into the cache, thereby reducing or avoiding cache invalidations when the target read request arrives, significantly reducing data access latency. The above technical solution solves the problem of complex and inefficient pre-reading of data in complex I / O scenarios in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 This is a hardware structure block diagram of a server device for a data pre-reading method according to an embodiment of the present application;

[0019] Figure 2 is a flowchart of a data pre-reading method according to an embodiment of the present application;

[0020] Figure 3 2 is a schematic diagram of an architecture for prefetching data for a file system based on historical cache miss addresses according to an embodiment of the present application;

[0021] Figure 4 is a structural block diagram of a data pre-reading device according to an embodiment of the present application;

[0022] Figure 5 It is a block diagram of the computer system structure of the electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making any creative work are within the scope of protection of this application.

[0024] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0025] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0026] As an optional implementation method, the method embodiment provided in the embodiment of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure diagram of a server device for a data pre-reading method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a microcontroller unit MCU (Microcontroller Unit, referred to as MCU) or a programmable logic device FPGA (Field-Programmable Gate Array, referred to as FPGA) and a memory 104 for storing data. The server device may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data pre-reading method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to a server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0028] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0029] In this embodiment, a data pre-reading method is provided. Figure 2 is a flow chart of a method for pre-reading data according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0030] Step S202, obtaining response information corresponding to each read request after the file system responds to multiple read requests;

[0031] It should be noted that in the file system, a read request is the basic operation for a user to obtain a specific file or data block. Whenever a user issues a read request to the system, the file system will try to provide data directly from the cache. If the requested data is in the cache, it will be returned directly. This process is called a cache hit. On the contrary, if the requested data is not in the cache, the file system must read the data from the back-end storage device (such as a hard disk, SSD, etc.). This process is called cache invalidation. The core of the above step S202 is to continuously monitor the results of the file system's response to multiple read requests, focus on capturing each cache invalidation event, and obtain detailed response information of the event, including but not limited to the timestamp of the request, the file name of the request, the location of the requested data, etc. The information obtained is used to analyze the cause of the cache invalidation and construct a subsequent pre-reading strategy.

[0032] Step S204: if the response information indicates that a cache failure occurs at the first address responding to the read request, record failure information corresponding to the first address, wherein the failure information includes at least: address data of the first address and offset information of the file stored at the first address;

[0033] In other words, once a cache miss is detected (i.e., the first address targeted by a read request is not found in the cache), detailed information about the miss is recorded. This information should at least include the address data (i.e., the specific address identifier in the file system) and the offset information of the file stored at that address (the byte offset relative to the beginning of the file). These two pieces of information together constitute the "missing information" of the cache miss event.

[0034] Step S206, establishing a cache invalidation address table of the file system according to the invalidation information;

[0035] Based on the invalidation information collected in S204, a cache invalidation address table is constructed. This table records the first addresses of all cache invalidations and their associated offset information. Other metadata, such as the frequency of invalidations and the time of the most recent invalidation, can also be added to the table through information association. Furthermore, the cache invalidation address table is regularly updated and maintained, allowing the subsequent file system to use the cache invalidation address table during operation to identify which data blocks most frequently cause cache invalidations and, therefore, infer which data is likely to be accessed again in future read requests.

[0036] Step S208 : Pre-reading data in response to a target read request based on the cache invalidation address table, wherein the target read request is a request executed after multiple read requests.

[0037] Optionally, the previously constructed cache invalidation address table is used to optimize the processing of subsequent read requests, namely target read requests. A target read request generally refers to the next or next few read requests that the file system expects to receive after a series of read requests. Based on the constructed cache invalidation address table, it is possible to predict which data blocks may suffer cache invalidation again in future read requests, so these data blocks are pre-fetched into the cache in advance to ensure that when the target read request arrives, the data can be read directly from the cache, avoiding cache access delays. The introduction of the pre-read response mechanism enables the file system to respond more intelligently to various access patterns, especially those that are periodic or predictable, thereby significantly improving the overall reading efficiency of the system and user experience.

[0038] The above method collects feedback information when a file responds to multiple read requests, focusing on those that result in cache invalidations. Each time a cache invalidation occurs, information about the corresponding first address is recorded. For each first address that results in a cache invalidation, invalidation information is recorded, including at least the address data (i.e., the specific address in the file) and the offset information of the file stored at that address. The offset information represents the specific location of the file on the storage medium and facilitates the precise execution of subsequent pre-read operations. Based on the collected invalidation information, a cache invalidation address table is constructed. This table not only records all addresses that result in cache invalidations but also, through analysis of the offset information, reveals potential file access patterns, providing a data basis for subsequent pre-read strategies. The cache invalidation address table is used to pre-read responses to subsequent target read requests. The target read request is typically the next expected access request to the file after the previous batch of read requests has been executed. By analyzing historical cache invalidation information, it is possible to predict and pre-load potentially required data into the cache, thereby reducing or avoiding cache invalidations when the target read request arrives, significantly reducing data access latency. Consequently, the above technical solution addresses the complex and inefficient pre-reading of data in complex I / O scenarios in related technologies.

[0039] In an exemplary embodiment, a pre-read data response is performed to a target read request based on the cache invalidation address table, including: obtaining a second address for responding to the target read request; matching the second address with the first address in the cache invalidation address table; determining a pre-read start address based on the matching result; marking the target file corresponding to the pre-read start address as data to be responded to; and pre-reading the data to be responded to into the cache space to respond to the target read request.

[0040] It's understood that in the context of a file system, the "second address" refers to the address pointed to by an incoming or soon-to-be-processed target read request after a series of read requests. When the file system receives a target read request, it parses it and determines the specific location in the file where the requested data is located, i.e., the second address. This allows for rapid location of the requested data entity.

[0041] Next, a match analysis is performed based on the second address of the target read request and the first address in the previously established cache invalidation address table. The "first address" here refers to all addresses that have experienced cache invalidation. These addresses and their related information (such as the offset information of the storage file) have been recorded in the cache invalidation address table. By comparing the correlation between the second address and the first address, such as whether there are identical or adjacent addresses, an attempt is made to find the potential connection between the two, so as to determine whether the access to the target file is likely to encounter the problem of cache invalidation again.

[0042] Based on the results of the above matching analysis, the optimal starting point for pre-reading is determined. If the second address completely matches a first address in the cache invalidation address table, or there is a certain degree of proximity, the pre-read starting address will be set to that first address or an address after it. This is done to pre-load data that may be subject to cache invalidation, ensuring that the next wave of read requests can directly obtain data from the cache, avoiding further delays. The selection of the pre-read starting address is dynamic, depending on the historical cache invalidation pattern and the characteristics of the current read request, so as to achieve more accurate pre-read positioning through the determination of the pre-read starting address.

[0043] After determining the pre-read start address, the target file corresponding to that address is marked as "pending response data." This means that this data is considered a potential hotspot for future read requests and should be prioritized for loading into the cache for a quick response. This marking effectively organizes and prioritizes data blocks that have historically been prone to cache failures, ensuring they are ready before actual read requests arrive, significantly improving file read efficiency and response speed.

[0044] Finally, the target file marked as "pending response data" is used to pre-read the response. The key operation here is to proactively load the pending response data into the cache area in advance, even if there is no direct read request pointing to this data.

[0045] It's important to note that the predictive nature of this read-ahead mechanism allows data to be prepared before the user actually needs it, significantly reducing data access latency and the probability of cache failure. Ultimately, this enables effective preprocessing of target read requests, significantly enhancing file performance and user experience.

[0046] In an exemplary embodiment, before matching the second address with the first address in the cache invalidation address table, the above method also includes: determining the window size of the data sending window to be responded to based on the characteristics of the file system and the data access pattern of the target object to which the target read request is sent; and based on the characteristics and the data access pattern.

[0047] Simply put, in the early stages of developing a read-ahead optimization strategy, one must first understand the architecture and characteristics of the file system. This includes, but is not limited to, cache capacity, read / write performance, and file distribution and organization. Furthermore, the target objects—that is, the data access patterns of the users or applications that will or have already accessed the files—must be analyzed. Access patterns may include file access frequency, the size of the accessed regions, the continuity of access (e.g., sequential access or random access), and any potential periodic or regular characteristics. With the file system characteristics and target object access pattern information, the optimal size of the read-ahead data sending window can be determined based on these characteristics. The size of the read-ahead window directly determines the amount and scope of data pre-read when processing target read requests. A reasonable window size ensures that cache misses are reduced while avoiding excessive cache space usage and cache pollution, whereby the cache stores a large amount of data that will not be accessed in the short term, thereby reducing cache hit rates and overall efficiency.

[0048] Optionally, specific adjustment logic may include:

[0049] For sequential access patterns: If the target object's access pattern is observed to be sequential, the read-ahead window can be set relatively large, as the pre-read data is likely to be accessed in subsequent read requests. This reduces cache invalidation events for subsequent read requests, improves read speed, and avoids unnecessary resource consumption caused by frequent pre-read operations.

[0050] For random or discontinuous access patterns: If the target object tends to randomly access different parts of the file, the read-ahead window should be smaller. Because in this pattern, consecutive data blocks read ahead may not be accessed immediately, and an excessively large window may waste cache resources. By limiting the read-ahead range, likely needed data can be read ahead more precisely while ensuring efficient cache utilization.

[0051] Consider the file system's cache capacity and performance: The file system's cache capacity and read / write performance are also key factors in determining the read-ahead window size. If cache capacity is limited, the window size should be appropriately reduced to avoid cache over-allocation. If cache read / write performance is high, the window size can be larger to fully utilize the advantages of high-performance cache and further improve response speed.

[0052] In summary, the above approach dynamically adjusts the size of the pre-read data sending window by comprehensively considering the characteristics of the file system and the data access patterns of the target objects. This ensures that pre-read operations neither overconsume cache resources nor underestimate potential access needs. This reduces cache invalidation events while maintaining efficient cache usage and optimizing overall system performance. This is particularly suitable for complex and changing data access scenarios such as big data analysis, online video streaming, and cloud storage services.

[0053] In an exemplary embodiment, after matching the second address with the first address in the cache invalidation address table, the above method further includes: if the matching result indicates a successful match, increasing the window size of the window for sending data to be responded to; if the matching result indicates a failed match, reducing the window size of the window for sending data to be responded to.

[0054] In other words, when the second address of a target read request matches one or more first addresses in the cache invalidation address table, this generally indicates that the predicted file access pattern matches the actual situation, and the pre-read data can effectively reduce cache invalidations and improve file access efficiency. Therefore, upon detecting a successful match, the window size of the data to be responded to will be increased. This means that future pre-reads will cover a wider range of data, pre-reading more data and further expanding the advantages of pre-reading, in order to continue reducing cache invalidations in subsequent read requests, thereby improving overall performance and response speed.

[0055] Conversely, if the second address of the target read request fails to match the first address in the cache invalidation address table, this indicates that the pre-read strategy may not fully capture the access pattern of the target file, and the pre-read data may not be accessed immediately, resulting in a waste of cache resources. In this case, reducing the window size of the window for sending data to be responded to and limiting the amount of pre-read data can avoid excessive cache space occupation and unnecessary pre-read overhead. The strategy of reducing the window size helps to find a more balanced point between pre-reading and cache management, prevent cache pollution, and ensure efficient cache utilization.

[0056] In summary, the window size adjustment strategy described above allows for real-time adjustment of the scope of pre-read data based on the match between historical cache failure events and current read requests to adapt to changing file access patterns and user needs. This significantly improves the efficiency and accuracy of the pre-read mechanism, avoids the need for a static pre-read strategy, and ensures dynamic optimization of the cache and efficient allocation of resources even when processing large numbers of read requests and changing access patterns. This improves file access efficiency, optimizes cache usage, and reduces overall latency. For example, in scenarios such as cloud computing, big data processing, and high-performance computing, this adaptive pre-read mechanism can significantly improve system performance and meet high-concurrency, low-latency data access requirements.

[0057] In an exemplary embodiment, after pre-reading data in response to a target read request based on the cache invalidation address table, the above method further includes: determining the real-time storage capacity of the cache area in the file system; when the real-time storage capacity is greater than or equal to the pre-configured storage capacity, adjusting the capacity according to the cache invalidation address table; when the real-time storage capacity is less than the pre-configured storage capacity, generating a system log indicating that the file system cache is normal.

[0058] Optionally, during the pre-read response process, potentially accessed data is continuously loaded into the cache area to reduce future cache invalidation events. However, the cache area's storage capacity is limited, and overfilling the cache can affect its operating efficiency and response speed. Therefore, the cache area's storage capacity must be monitored in real time to ensure it remains within a reasonable range, storing sufficient pre-read data to improve efficiency while avoiding performance degradation due to overfilling. When the cache area's real-time storage capacity reaches or exceeds the pre-configured storage capacity, it indicates that the cache may be nearing saturation. At this point, capacity adjustments are made based on information in the cache invalidation address table, effectively initiating cache data aging. This process typically involves evaluating cache entries, prioritizing the elimination of data that has historically been inactive or no longer needed, freeing up space for new pre-read data and ensuring maximum cache utilization. Aging is a key component of dynamic cache management, helping to maintain the freshness and relevance of cached data and prevent cache contamination.

[0059] Conversely, if the cache area's real-time storage capacity is detected to be lower than the pre-configured storage capacity, this indicates that the cache still has free space and can accommodate more data. In this case, aging is not immediately initiated. Instead, a system log is generated to indicate the normal status of the file system cache as part of maintenance and management. This log helps operations personnel monitor the cache's health, understand its utilization and remaining space, and provide a basis for subsequent capacity planning and optimization.

[0060] In summary, through the above method, by real-time monitoring of the cache storage capacity and comparing the cache filling status with the pre-configured storage capacity, data aging processing is intelligently performed or normal status logs are generated, ensuring efficient use of the cache and dynamic optimization of the pre-reading mechanism. In this way, the response speed and processing capacity of the file system are improved in complex and changeable file access scenarios, providing users with a smoother and faster data access experience.

[0061] In an exemplary embodiment, capacity adjustment is performed based on a cache invalidation address table, including: determining an entry storage address corresponding to the least recently used data in the file system; matching the entry storage address with different first addresses in the cache invalidation address table; if the match is successful, deleting the cache data content associated with the entry storage address; if the match is unsuccessful, not deleting the cache data content associated with the entry storage address.

[0062] Optionally, a Least Recently Used (LRU) algorithm is often used in file systems as part of a cache eviction strategy. When the cache reaches its preconfigured storage capacity limit, it determines which data entries should be removed to make room. The LRU algorithm identifies the data entries with the lowest recent access frequency. In this embodiment, the storage addresses of these least recently used data entries are first determined. This means that the data blocks in the cache that have not been accessed for a long time are identified, and these are prepared for further matching analysis and possible deletion. Once the storage addresses of the LRU data entries are determined, these addresses are then matched against historical records in the cache invalidation address table. The cache invalidation address table records all address information that has caused cache invalidation due to data not being found in the cache. By comparing these addresses, it is determined whether these long-inaccessed data entries have ever been the key points in a cache invalidation event. If a match is successful, this means that this data has historically caused cache invalidation and may have a certain access value. If a match fails, it indicates that this data is unlikely to be accessed again in the near future and is a relatively inactive part of the cache.

[0063] If an entry's storage address successfully matches the first address in the cache invalidation address table, the cache data associated with that entry's storage address will be deleted. Although this data was once the focus of cache invalidation events, given the cache's current storage capacity and the need for system performance optimization, if data has not been accessed for a long time, even if it was once important, it may need to be sacrificed to make room for new pre-read data or more active data. This deletion process helps avoid cache contamination, where the cache stores a large amount of data that will not be accessed in the short term, thereby reducing the effective utilization of the cache and overall performance.

[0064] When an entry's storage address doesn't match the historical records in the cache invalidation address table, meaning that the historical access patterns for this data don't tend to cause cache invalidation, the cached data associated with the entry's storage address will not be deleted. This means that even though this data is marked as least recently used by the LRU algorithm, because it demonstrates potential access value or regularity in historical access patterns, it can be retained in the cache for possible future access needs. This avoids unnecessary data loss and increases the likelihood of future file access.

[0065] Through the above steps, the file system in this embodiment can perform intelligent capacity adjustment based on the cache invalidation address table. It not only takes into account the rational use of cache space, but also realizes fine management of cache data through in-depth analysis of historical access patterns. When the match is successful, it can judge the storage value of the data and delete those data entries that are no longer active in a timely manner; when the match is unsuccessful, it can retain data with potential access value, avoiding unnecessary waste of resources. This dynamic adjustment mechanism based on historical data and access pattern analysis significantly improves the efficiency of the pre-read mechanism and the intelligence level of cache management. Especially in the scenario of processing large-scale data sets and complex access patterns, it can effectively optimize the performance and response speed of the file system.

[0066] In an exemplary embodiment, after pre-reading data in response to the target read request based on the cache invalidation address table, the above method also includes: counting the number of successful hits of different first addresses in the cache invalidation address table; when the number of hits is greater than a preset threshold, directly updating the pre-read cache list with the third address corresponding to the number of hits, wherein the pre-read cache list is used to determine the loading order of the target read request response data; checking the number of entries in the updated pre-read cache list; when the number of entries is greater than the preset number of security entries, performing item overlap processing on the updated pre-read cache list; when the number of entries is less than or equal to the preset number of security entries, performing item merging processing on the updated pre-read cache list; when the number of hits is less than or equal to the preset threshold, using the pre-read cache list to call data in the file system; counting the call time to complete all data calls; and configuring the allowed call time period of the file system according to the call time.

[0067] Optionally, after performing a pre-read response based on a historical cache invalidation address, the file system will count the number of hits of different first addresses in the cache invalidation address table, that is, record the performance of each cache invalidation address in past pre-read operations, which helps the system identify which addresses are frequently accessed hotspots. For those first addresses whose hit counts are significantly higher than the set threshold, these addresses are identified as high-frequency access points, and their corresponding third addresses are directly added to the pre-read cache list. The third address here actually refers to the specific location of these high-frequency access points in the file, and they are preferentially added to the pre-read cache list, which means that the system will give priority to loading this data in subsequent pre-read operations to ensure the cache hit rate and reduce cache invalidation events.

[0068] After updating the pre-read cache list, the total number of entries in the list needs to be verified. If the number of entries exceeds the preset number of security entries, this may mean that the pre-read cache list is too large, which not only takes up too many cache resources, but may also cause a decrease in pre-reading efficiency. In order to solve this problem, entry overlap processing will be performed, that is, those adjacent or overlapping addresses in the file will be merged to reduce redundant entries in the list and ensure the efficient execution of the pre-read operation. On the contrary, if the number of entries in the pre-read cache list is less than or equal to the preset number of security entries, this indicates that the size of the list is within a reasonable range. In this case, entry merging processing will be performed, that is, merging those addresses that can be logically associated, such as continuous address ranges, to further optimize the pre-read cache list and improve the continuity and integrity of the pre-read data, thereby improving the pre-reading efficiency without increasing the burden of the list size.

[0069] When the number of hits for a certain address does not reach the preset threshold, the current pre-read cache list will be used by default for data calls. This means that data with relatively low access frequency will be processed based on the pre-read strategy of the existing list. During this process, the call time required to complete all data calls is counted to evaluate the overall efficiency of the pre-read operation. Finally, based on the counted call time, the allowed call time period of the file system is configured. The purpose of this configuration is to manage the system's pre-read operations and avoid large-scale pre-reading during high-load periods or critical periods of the system, so as not to affect system performance. By limiting the time period for pre-read operations, you can make full use of the off-peak period for data pre-reading without affecting normal operation, thereby improving overall file access efficiency.

[0070] In this embodiment, the file system implements refined management of the pre-read mechanism by counting the number of cache invalidation address hits, dynamically updating and optimizing the pre-read cache list, and configuring the allowed call time period. This mechanism ensures that the system's pre-read operations are both efficient and reasonable, not only reducing cache invalidation events and improving cache utilization, but also optimizing the size and content of the pre-read cache list and the timing of pre-read operations, thereby maintaining high system performance and high responsiveness under complex and changing file access patterns. This pre-read optimization based on data access statistics and adaptive strategies is of great significance for improving the efficiency of file systems in fields such as big data processing and high-performance computing.

[0071] The execution entity of the above steps may be a server, a terminal, etc., but is not limited thereto.

[0072] In order to facilitate understanding of the implementation methods of the present application, relevant scenarios are now explained, but this does not limit the present application.

[0073] In related technologies, file system cache mechanisms achieve prefetching by recording recently accessed data to predict future access patterns. However, traditional cache mechanisms rely primarily on recently accessed data to predict data that may be accessed in the future. This approach has low prediction accuracy in situations such as cold starts and complex file access patterns. Furthermore, with the development of emerging technologies such as cloud computing and edge computing, file system prefetching data technology faces new opportunities and challenges. How to apply historical cache miss address lists to optimize prefetching in these emerging scenarios has become a technical difficulty that needs to be addressed.

[0074] In order to solve the above problems, as an optional implementation method, the optional embodiment of the present application proposes a file system prefetching data method based on historical cache miss addresses, using historical cache miss information to guide subsequent cache prefetching and aging, improving the cache hit rate of the file system, reducing IO latency, and improving read access performance. Specifically, each read request in the file system will first read the cache. When the cache fails, the data stored in the backend will be read, and the address of the cache failure during the file reading process will be recorded in the historical cache miss address list; compare the current cache miss address with the historical address in the list. If there is a match, prefetch the subsequent address data in the order of the list; during the cache failure aging process, if the cache address is not in the cache miss address list, perform aging processing.

[0075] It's important to note that the historical cache miss address list records addresses where file read cache failures occurred, reflecting the historical trajectory of file access. By analyzing this historical data, we can better understand file access patterns and regularities, thereby guiding prefetching. Prefetching methods based on the historical cache miss address list can predict likely accessed data based on historical user access records and file access patterns, enabling more accurate prefetching.

[0076] As an optional implementation method, the detailed process of the file system prefetching data based on the historical cache miss address is as follows:

[0077] Step 1: The file system records the cache invalidation address of each read request and adds the read address (file offset) and cache address to the historical cache miss address list. Each entry in the historical cache miss address list includes the file read address and the cache invalidation address;

[0078] It can be understood that the file system records the address of cache failure (including file offset and cache address) in each read request, and builds a list of historical cache missing addresses; it merges overlapping or continuous address ranges in the list, and stores them with file offset (offset) as the key and cache address length as the attribute to form structured access pattern data.

[0079] Step 2: The difference between the read request cache invalidation address and the current address (current file offset) is matched with the historical cache missing address list. If a match is found, subsequent pre-read requests are issued according to the historical cache missing address list, and the number of successes is accumulated;

[0080] It is understandable that when a read request encounters a cache failure, the difference between the current file offset and the historical cache failure address is calculated and matched against the history list. If the match is successful, subsequent pre-read requests are issued according to the history list order, and the pre-fetch sliding window size is increased (upper limit is the total cache capacity). If the match fails, the sliding window is reduced (lower limit is half of the initial value). If the cumulative number of hits for the successfully matched address exceeds the threshold (N times), it is added to the pre-read cache list, triggering active pre-fetching.

[0081] Step 3: The matching method of the historical cache miss address list is as follows: a) Calculate the difference between the cache read failure offset address and the current file offset position; b) Search the historical cache miss address list to see if there is such an address segment;

[0082] Step 4: Add to the historical cache missing address list. For overlapping and continuous address ranges, the historical cache missing address list is merged.

[0083] Step 5: List the historical cache missing addresses, using the file offset address as the key and the cache length as the key attribute;

[0084] Step 6: When the file system cache is aged, select the cache entry that needs to be aged in the LRU and match it with the historical cache invalidation address list. If there is no match, it is aged; otherwise, it is not aged and jumps to the next cache entry in the LRU.

[0085] Optionally, a cache aging optimization strategy based on the history list is used. In the LRU (least recently used) elimination mechanism, cache entries that do not hit the history cache miss address list are eliminated first; if the cache entry exists in the history list or the pre-read cache list, the aging process is skipped to retain the frequently accessed data.

[0086] Step 7. The prefetch sliding window size of the historical invalid address list is initialized to a. If the match is successful in step 2 above, the sliding window increases by 1, but cannot exceed the cache size. The number of prefetched data is sent according to the prefetch interaction window size. If the match fails in step 2, the sliding window decreases by 1, and the minimum is the initial value a / 2.

[0087] Optionally, adaptive pre-fetch sliding window control is used. The initial sliding window size is a fixed value, and the window range is dynamically adjusted according to the matching results: the window increases when the match is successful (the maximum does not exceed the cache capacity), and the window decreases when the match fails (the minimum is a / 2); the pre-fetch data amount is issued according to the window size to adapt to different load scenarios such as sequential reading and random reading.

[0088] Step 8: If the missing address in the historical cache missing address list has more than N hits, then add the missing address to the pre-read cache list;

[0089] Step 9: After each IO process is completed, a pre-read request is sent according to the pre-read cache address list; if there is no cache hit until the LRU ages, the address is removed from the pre-read cache address list.

[0090] Optionally, the maintenance and invalidation processing of the pre-read cache list include: adding the data to the cache after the asynchronous pre-read request is completed; if the pre-fetched data is not accessed and hit before LRU aging, it is removed from the pre-read list to avoid invalid data occupying space: list generation phase: capturing the cache miss address and recording it in the historical cache miss address list; address matching phase: comparing the current cache miss address with the historical address in the historical cache miss address list, if there is a match, pre-fetching the data of the subsequent address; cache elimination phase: based on the read address time, aging the data of the corresponding cache address in the oldest cache invalidation record list.

[0091] As an optional implementation, the actual application scenarios of the above-mentioned file system prefetching data based on historical cache miss addresses include:

[0092] Initialize the historical cache miss address list: Create a historical cache miss address list on the file system client to record the addresses of cache misses.

[0093] Monitor file system read operations: When a file system read operation occurs, monitor whether a cache miss occurs. If a cache miss occurs, record the current file offset in the historical cache miss address list.

[0094] To achieve address matching: compare the current cache miss address with the historical addresses in the historical cache miss address list. If there is a match, prefetch the data of the subsequent addresses according to the order in the list.

[0095] Cache eviction: When the cache reaches a certain capacity, cache eviction is performed. Based on the read address time, the data of the corresponding cache address in the oldest cache invalidation record list is aged out.

[0096] Adjust the prefetch policy: Adjust the prefetch policy based on the characteristics of the file system and user access patterns to achieve more flexible and intelligent prefetching.

[0097] As an optional implementation, Figure 3 1 is a schematic diagram of an architecture for prefetching data for a file system based on historical cache miss addresses according to an embodiment of the present application; the architecture performs the following steps during operation:

[0098] Step 1: The user initiates a data read request, which is sent to the operating system virtual file layer through the file read interface.

[0099] Step 2: The read request first goes to the read buffer to check whether the data required by the request is available.

[0100] Step 3: If the cache does not contain the data or some of the data is missing, a read data request is issued.

[0101] Step 4: The invalidated cache address and the current file offset are written into the cache invalidation address list. Step 5: The cache invalidation address that has been hit multiple times is written into the pre-read address list.

[0102] Step 6: The pre-reader sends a back-end storage data pre-read request based on the hit status of the cache invalidation address and the pre-read address list.

[0103] In summary, by analyzing the continuity of historical cache miss addresses (such as merging overlapping address segments), we can accurately predict future access patterns and significantly improve prefetch accuracy. We optimize the prefetch amount in real time based on the prefetch effect, balance memory usage and performance improvement, avoid cache pollution caused by excessive prefetching, and filter inefficient prefetch requests by accumulating the number of successes and hit thresholds, reducing invalid I / O operations. Then, through the dynamic recording and matching mechanism of historical cache miss addresses, the coordination of historical access pattern analysis and dynamic resource allocation, combined with adaptive prefetch windows and intelligent cache management, we achieve efficient file system prefetch optimization. This provides a flexible and stable solution for complex I / O scenarios.

[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this 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. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the method described in each embodiment of the present application.

[0105] This embodiment also provides a data pre-reading device. This system is used to implement the above-mentioned embodiments and preferred implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0106] Figure 4 is a structural block diagram of a data pre-reading device according to an embodiment of the present application, such as Figure 4 As shown, the system includes:

[0107] An acquisition module 42 is configured to acquire response information corresponding to each read request after the file system responds to multiple read requests;

[0108] a recording module 44 configured to record, when the response information indicates that a cache failure occurs at a first address responding to the read request, failure information corresponding to the first address, wherein the failure information includes at least: address data of the first address and offset information of a file stored at the first address;

[0109] An establishing module 46, configured to establish a cache invalidation address table of the file system according to the invalidation information;

[0110] The pre-read module 48 is configured to perform a pre-read data response to a target read request based on the cache invalidation address table, wherein the target read request is a request executed after multiple read requests.

[0111] The above system collects feedback information when a file responds to multiple read requests, focusing on those that result in cache invalidations. Each time a cache invalidation occurs, information about the corresponding first address is recorded. For each first address that results in a cache invalidation, invalidation information is recorded, including at least the address data (i.e., the specific address in the file) and the offset information of the file stored at that address. The offset information represents the specific location of the file on the storage medium and facilitates the precise execution of subsequent pre-read operations. Based on the collected invalidation information, a cache invalidation address table is constructed. This table not only records all addresses that result in cache invalidations but also, through analysis of the offset information, reveals underlying file access patterns, providing data support for subsequent pre-read strategies. The cache invalidation address table is used to pre-read responses to subsequent target read requests. A target read request is typically the next expected access request to a file after the previous batch of read requests has been executed. By analyzing historical cache invalidation information, it is possible to predict and pre-load potentially required data into the cache, thereby reducing or avoiding cache invalidations when the target read request arrives, significantly reducing data access latency. Consequently, the above technical solution addresses the complex and inefficient pre-reading of data in complex I / O scenarios in related technologies.

[0112] In an exemplary embodiment, the above-mentioned pre-read module is also used to obtain a second address to respond to a target read request; match the second address with the first address in the cache invalidation address table; determine the pre-read start address based on the matching result; mark the target file corresponding to the pre-read start address as data to be responded to; pre-read the data to be responded to into the cache space to respond to the target read request.

[0113] In an exemplary embodiment, the above-mentioned pre-reading module also includes: a determination unit, which is used to determine the window size of the data sending window to be responded to based on the characteristics of the file system and the data access pattern of the target object of the target read request before matching the second address with the first address in the cache invalidation address table; based on the characteristics and data access pattern.

[0114] In an exemplary embodiment, the above-mentioned pre-reading module also includes: a window unit, which is used to increase the window size of the window for sending data to be responded to after matching the second address with the first address in the cache invalidation address table, if the matching result indicates a successful match; and reduce the window size of the window for sending data to be responded to if the matching result indicates a failed match.

[0115] In an exemplary embodiment, the above-mentioned device also includes: a capacity module, which is used to determine the real-time storage capacity of the cache area in the file system after pre-reading the data in response to the target read request based on the cache invalidation address table; when the real-time storage capacity is greater than or equal to the pre-configured storage capacity, adjust the capacity according to the cache invalidation address table; when the real-time storage capacity is less than the pre-configured storage capacity, generate a system log indicating that the file system cache is normal.

[0116] In an exemplary embodiment, the above-mentioned capacity module is also used to determine the entry storage address corresponding to the least recently used data in the file system; match the entry storage address with different first addresses in the cache invalidation address table; if the match is successful, delete the cache data content associated with the entry storage address; if the match is unsuccessful, do not delete the cache data content associated with the entry storage address.

[0117] In an exemplary embodiment, the above-mentioned device also includes: a processing module, which is used to count the number of successful hits of different first addresses in the cache invalidation address table after pre-reading the data in response to the target read request based on the cache invalidation address table; when the number of hits is greater than a preset number threshold, directly update the pre-read cache list with the third address corresponding to the number of hits, wherein the pre-read cache list is used to determine the loading order of the target read request response data; check the number of table entries in the updated pre-read cache list; when the number of table entries is greater than the preset number of security table entries, perform table item overlap processing on the updated pre-read cache list; when the number of table entries is less than or equal to the preset number of security table entries, perform table item merging processing on the updated pre-read cache list; when the number of hits is less than or equal to the preset number threshold, use the pre-read cache list to call the data in the file system; count the call time to complete all data calls; and configure the allowed call time period of the file system according to the call time.

[0118] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same target processor; or the above modules are located in different target processors in any combination.

[0119] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.

[0120] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0121] An embodiment of the present application further provides an electronic device, comprising a target memory and a target processor, wherein the target memory stores a computer program, and the target processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

[0122] Optionally, Figure 5 : is a block diagram of the computer system structure of the electronic device according to the embodiment of the present application. Figure 5 As shown, the computer system 800 includes a CPU 801 (Central Processing Unit, CPU for short), which can perform various appropriate actions and processes according to the program stored in the ROM 802 (Read-Only Memory, ROM for short) or the program loaded from the storage part 808 into the RAM 803 (Random Access Memory, RAM for short). Various programs and data required for system operation are also stored in the RAM 803. The CPU 801, ROM 802 and RAM 803 are connected to each other via a bus 804. An I / O interface 805 (Input / Output interface, i.e., an I / O interface) is also connected to the bus 804.

[0123] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a local area network card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed so that a computer program read therefrom can be installed into the storage section 808 as needed.

[0124] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the central processing unit (CPU801), and the input / output device is connected to the central processing unit (CPU801).

[0125] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0126] An embodiment of the present application further provides another computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above method embodiments are implemented.

[0127] An embodiment of the present application also provides a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any of the above method embodiments.

[0128] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0129] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0130] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, they can be implemented by executing the steps shown or described in a different order than herein, or by making them into separate integrated circuit modules, or by making multiple modules or steps into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.

[0131] The above is a detailed introduction to the data pre-reading method, device, storage medium, and electronic device provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A data pre-reading method, characterized in that: include: Get the response information corresponding to each read request after the file system responds to multiple read requests; If the response information indicates that a cache failure occurs at the first address responding to the read request, recording failure information corresponding to the first address, wherein the failure information includes at least: address data of the first address and offset information of a file stored at the first address; Establishing a cache invalidation address table of the file system according to the invalidation information; A data pre-read response is performed to a target read request based on the cache invalidation address table, wherein the target read request is a request executed after multiple read requests.

2. The data pre-reading method according to claim 1, characterized in that: Performing a data pre-read response to a target read request based on the cache invalidation address table includes: Acquire a second address in response to the target read request; Matching the second address with the first address in the cache invalidation address table; Determine the pre-read start address according to the matching result; Marking the target file corresponding to the pre-read start address as data to be responded to; Pre-read the data to be responded to into the cache space to respond to the target read request.

3. The data pre-reading method according to claim 2, characterized in that: Before matching the second address with the first address in the cache invalidation address table, the method further includes: According to the characteristics of the file system and the data access mode of the target object to which the target read request is issued; The window size of the waiting response data sending window is determined based on the characteristics and the data access mode.

4. The data pre-reading method according to claim 2, characterized in that: After matching the second address with the first address in the cache invalidation address table, the method further includes: When the matching result indicates a successful match, increasing the window size of the waiting response data sending window; When the matching result indicates a matching failure, the window size of the waiting-for-response data sending window is reduced.

5. The data pre-reading method according to claim 1, characterized in that: After performing a pre-read data response to a target read request based on the cache invalidation address table, the method further includes: Determining the real-time storage capacity of a cache area in the file system; When the real-time storage capacity is greater than or equal to the pre-configured storage capacity, adjusting the capacity according to the cache invalidation address table; In a case where the real-time storage capacity is less than the pre-configured storage capacity, a system log indicating that the file system cache is normal is generated.

6. The data pre-reading method according to claim 5, characterized in that: Capacity adjustment is performed according to the cache invalidation address table, including: Determining a storage address of an entry corresponding to least recently used data in the file system; matching the entry storage address with different first addresses in the cache invalidation address table; If the match is successful, the cache data content associated with the entry storage address is deleted; In the case where the match is unsuccessful, the cache data content associated with the entry storage address is not deleted.

7. The data pre-reading method according to claim 1, characterized in that: After performing a pre-read data response to a target read request based on the cache invalidation address table, the method further includes: Counting the number of successful hits of different first addresses in the cache invalidation address table; When the number of hits is greater than a preset number threshold, directly updating a pre-read cache list with a third address corresponding to the number of hits, wherein the pre-read cache list is used to determine a loading order of the target read request response data; Verify the number of entries in the updated pre-read cache list; When the number of entries is greater than the preset number of security entries, performing entry overlap processing on the updated pre-read cache list; When the number of entries is less than or equal to the preset number of security entries, performing entry merging processing on the updated pre-read cache list; When the hit count is less than or equal to a preset count threshold, calling the data in the file system using the pre-read cache list; Statistics on the call time to complete all data calls; The allowed calling time period of the file system is configured according to the calling time.

8. A data pre-reading device, characterized in that: include: An acquisition module is used to obtain response information corresponding to each read request after the file system responds to multiple read requests; a recording module, configured to record, when the response information indicates that a cache failure occurs at a first address responding to the read request, failure information corresponding to the first address, wherein the failure information includes at least: address data of the first address and offset information of a file stored at the first address; An establishing module, configured to establish a cache invalidation address table of a file system according to the invalidation information; A pre-read module is used to pre-read data in response to a target read request based on the cache invalidation address table, wherein the target read request is a request executed after multiple read requests.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data pre-reading method as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the data pre-reading method according to any one of claims 1 to 7 are implemented.