Data pre-fetching method, device and equipment
By dynamically adjusting the data prefetch length, combining data access requests and life cycle, the problem of insufficient or excessive prefetching in traditional data prefetching methods is solved, and the data access efficiency of the processor is improved.
Patent Information
- Application Number
- CN202011641633.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2040-12-31
AI Technical Summary
Traditional data prefetching methods cannot effectively adjust the length of a single prefetched data, resulting in insufficient or excessive data prefetching, affecting the processor's data access efficiency.
By acquiring data access requests and data life cycles, dynamically adjusting the prefetch length of a single prefetch data to ensure that the prefetch data conforms to the replacement rules of the storage medium and avoiding prefetch waste and performance degradation.
It improves the processor's data access efficiency, avoids the problem of too much or too small prefetching, and ensures the effective utilization of storage media.
Smart Images

Figure CN114691024B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data pre-fetching method, device and equipment. Background Art
[0002] Generally, there are differences in the speed at which processors (such as CPUs, GPUs, etc.) access different types of storage media. Taking cache and main memory as examples, the speed at which a processor accesses data in a cache is usually much higher than the speed at which a processor accesses data in main memory. Therefore, before the processor accesses data, the data in the main memory can be pre-written to the cache. This data processing method can be called "prefetching", which enables the processor to access the corresponding data directly from the cache, thereby improving the data access efficiency of the processor. However, traditional prefetching methods often use fixed-length data, which cannot guarantee the effectiveness of data prefetching and affects the performance of data processing. Therefore, how to provide a more effective data prefetching method has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The present application provides a data pre-fetching method, apparatus, device, computer-readable storage medium and computer program product, which dynamically adjust the pre-fetch length of single pre-fetched data in an adaptive manner to avoid waste of pre-fetched data due to excessive single pre-fetching data, and reduce processor performance due to too little single pre-fetching data.
[0004] In a first aspect, a data prefetching method is provided. Before prefetching data, a first data access request can be obtained first, and a data prefetching strategy can be determined based on the first data access request and a data life cycle, so that a first data set stored in a second storage medium can be stored in the first storage medium according to the data prefetching strategy, wherein the first data set includes at least one data, the data prefetching strategy includes at least a prefetching length, and the data life cycle is used to indicate the storage duration of the data in the first storage medium, and the read and write access rate of the second storage medium is lower than that of the first storage medium.
[0005] Due to the data life cycle in the first storage medium, it can reflect the iteration status of the data in the first storage medium, that is, it can reflect how often the data in the first storage medium changes. In other words, the data life cycle can reflect the law of data changes in the first storage medium. The prefetch length calculated based on the data life cycle can match the law of data iteration in the first storage medium, so that data of a suitable length can be prefetched to the first storage medium in advance for the next data access request. In this way, by dynamically adjusting the prefetch length of a single prefetched data in an adaptive manner, it is possible to avoid as much as possible the waste of prefetched data and the occupation of the storage space of the first storage medium caused by too much single prefetched data, and it is also possible to avoid as much as possible the low data access performance caused by too small a single prefetched data.
[0006] In a possible implementation, when determining the data prefetch strategy, it can also be determined in combination with the first data access request, the data life cycle, and the attributes of the sequence stream to which the above-mentioned first data access request belongs, wherein the sequence stream includes multiple data access requests with continuous logical access addresses LBA, and the first data access request is any one of the multiple data access requests with continuous logical block addresses. In this way, different data prefetch strategies can be determined for data access requests of different sequence streams. For example, different single prefetch lengths of prefetched data can be determined for the next data access request of different sequence streams, so that the accuracy of the single prefetch length determined for the data access request can reach a higher level. Among them, the attributes of the sequence stream can specifically include the average data access length of multiple data access requests and the duration of the sequence stream. Among them, the average data access length can be obtained by summing the data lengths requested for access by multiple data access requests and then calculating the average value; the duration of the sequence stream refers to the sum of the durations of the multiple data access requests that have been executed.
[0007] In a possible implementation, when determining the data pre-fetching strategy, the starting storage position of the pre-fetched data in the second storage medium can be determined according to the first data access request, so that the data from the starting storage position and some data after it are all the data pre-fetched this time; at the same time, the pre-fetching length of the pre-fetched data can be calculated according to the data life cycle, so that the data of the preset length starting from the starting storage position can be used as the pre-fetched data and stored in the first storage medium. In this way, the data to be pre-fetched can be determined for the next data access request according to the first data access request and the data life cycle.
[0008] In a possible implementation, before storing the first data set stored in the second storage medium to the first storage medium according to the prefetch strategy, the upper limit of the prefetch length can also be obtained, that is, the total length of the prefetched data for the sequential stream does not exceed the upper limit of the prefetch length, so that when determining the prefetch length of the single prefetched data, the prefetched length of the sequential stream can be obtained, and the difference between the upper limit of the prefetch length and the prefetched length can be calculated, and then when the prefetch length of the single prefetched data determined based on the above method is greater than the difference, the prefetch length is updated to the difference, so that it can be avoided that the prefetch length is too large and the total length prefetched for the sequential stream is too long, so that the prefetch waste can be minimized. Further, when the prefetch length of the single prefetched data is not greater than the difference, it is determined to prefetch data from the second storage medium based on the prefetch length of the single prefetched data determined based on the above method.
[0009] In a possible implementation, when determining the upper limit of the prefetch length for a sequential stream, it can be specifically determined based on the length of the accessed data of the sequential stream and the prefetch length cardinality. For example, when the length of the accessed data of the sequential stream is less than the prefetch length cardinality, the upper limit of the prefetch length of the sequential stream is the prefetch length cardinality; when the length of the accessed data of the sequential stream is greater than the prefetch length cardinality but less than 2 times the prefetch length cardinality, the upper limit of the prefetch length of the sequential stream can be adjusted to 2 times the prefetch length cardinality; when the length of the accessed data of the sequential stream is greater than 2 times the prefetch length cardinality but less than 3 times the prefetch length cardinality, the upper limit of the prefetch length of the sequential stream can be adjusted to 3 times the prefetch length cardinality, and so on. Of course, the upper limit of the prefetch length of the sequential stream can also be determined in other ways, and the present application does not limit this.
[0010] In a possible implementation, when calculating the pre-fetch length cardinality, the pre-fetch length cardinality can be specifically calculated based on the access data lengths of multiple sequential flows in a historical time period, wherein the sum of the amount of data wasted by pre-fetching data is minimized when pre-fetching data to the first storage medium for multiple sequential flows in the historical time period based on the calculated pre-fetch length cardinality. In this way, the determination of the pre-fetch length cardinality can be achieved, so as to further determine the upper limit of the pre-fetch length of the sequential flows in the current time period.
[0011] In a possible implementation, when the attribute value of the sequential stream, such as the data access rate of the sequential stream, does not change, the prefetch length of each prefetch of data may be the same length, and when the attribute value of the sequential stream changes, the prefetch length of the single prefetch of data may be adjusted based on the changed attribute value. In this way, dynamic adjustment of prefetch data may be achieved.
[0012] In a possible implementation, the data life cycle can be calculated based on the second data set within a preset time period. Specifically, the average storage time of the second data set in the first storage medium within the preset time period can be calculated, and the average value can be used as the data life cycle, and the second data set includes at least one data. In this way, through data statistics and corresponding calculations, the storage time of the data in the first storage medium can be determined, that is, the data life cycle can be determined.
[0013] In a possible implementation, the data lifecycle can also be calculated in real time. Specifically, the capacity of the first storage medium and the data write bandwidth of the first storage medium can be obtained, so that the data lifecycle can be calculated based on the capacity of the first storage medium and the data write bandwidth of the first storage medium. For example, the ratio of the capacity of the first storage medium to the data write bandwidth of the first storage medium can be used as the data lifecycle.
[0014] In some possible implementations, the first storage medium is a cache and the second storage medium is a hard disk, or the first storage medium is a memory and the second storage medium is a hard disk. Of course, in other possible implementations, the first storage medium is a cache and the second storage medium may be a hard disk, etc. In this embodiment, the data read and write access rate of the first storage medium is higher than the data read and write access rate of the second storage medium, but the specific implementation of the first storage medium and the second storage medium is not limited.
[0015] In a second aspect, the present application provides a data pre-fetching device, wherein the power consumption management device includes various modules for executing the data pre-fetching method in the first aspect or any possible implementation manner of the first aspect.
[0016] In a third aspect, the present application provides a device comprising a processor and a memory; the memory is used to store computer instructions; the processor is used to execute the operating steps of the data prefetching method in the first aspect or any possible implementation of the first aspect according to the computer instructions.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer executes the operating steps of the method described in the first aspect or any possible implementation of the first aspect.
[0018] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the operating steps of the method described in the first aspect or any possible implementation of the first aspect.
[0019] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of a system architecture is provided for this application;
[0021] Figure 2 A schematic diagram of a data pre-fetching method flow provided in an embodiment of the present application;
[0022] Figure 3 A schematic diagram of the structure of a data pre-fetching device provided in the present application;
[0023] Figure 4 A schematic diagram of the hardware structure of a device provided in this application. DETAILED DESCRIPTION
[0024] The technical solution in the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0025] In actual applications, the data that the processor needs to access may be stored in a storage medium with higher read performance, or may be stored in a storage medium with lower read performance. Therefore, data pre-fetching can be used to pre-write data from the storage medium with lower read performance to the storage medium with higher read performance. In this way, when the processor needs to access data, it can access the required data from the storage medium with higher read performance, thereby speeding up the data access efficiency of the processor.
[0026] Take the example of prefetching data from main memory into cache. Figure 1 As shown, it is an exemplary system architecture diagram provided by an embodiment of the present application. The system includes an application 100, a processor 200, a cache 300, and a memory 400. Among them, data is stored in the cache 300 and the memory 400, and the rate at which the processor 200 accesses the data in the cache 300 is usually higher than the rate at which the processor 200 accesses the data in the memory 400. Accordingly, based on factors such as cost in actual applications, the amount of data that can be stored in the cache 300 is usually less than the amount of data that can be stored in the memory 400.
[0027] Among them, the application 100 may send a data read request to the processor 200 according to business needs, so as to request the processor 200 to feedback the corresponding data to the application 100. The processor 200 may first query whether the cache 300 stores the data requested by the application 100. If so, the processor 200 accesses the corresponding data in the cache 300 and feeds it back to the application 100; if not, the processor 200 may continue to query whether the memory 400 stores the data requested by the application 100, and feed back the data found in the memory 400 to the application 100. If the data is still not found in the memory 400, the processor 200 may continue to search from the hard disk, or return a search failure to the application 100.
[0028] In actual application, the amount of data requested by application 100 may be large. Therefore, processor 200 may split the read data request issued by application 100 into multiple data access requests (or referred to as read IO requests or sub-requests of data access requests), and process the multiple data access requests one by one, and access the data requested by each data access request in cache 300 or memory 400. The size of each data access request after splitting may be the same or different, and this embodiment does not limit the size of the read data request after splitting. Among them, the access addresses (for example, logical block addresses (LBA)) of the multiple data access requests obtained by splitting are continuous, and such multiple data access requests with continuous access addresses can be called sequential streams. For example, when application 100 needs to play a single video file of 1024M (megabytes) in size, assuming that the video data of the single video file has continuous logical block addresses when stored, application 100 can send 1024 data access requests to processor 200, and each data access request is used to request processor 200 to feedback 1M of video data, that is, the first data access request can be used to request continuous 1M video data starting from the starting logical address, and the second data access request is used to continue requesting continuous 1M video data starting from the previous ending logical address, and so on. At this time, the above-mentioned multiple data access requests can be called a sequential stream.
[0029] Since the rate at which the processor 200 accesses the cache 300 is higher than the rate at which the processor 200 accesses the memory 400, before the processor 200 accesses the data, the data that the processor 200 needs to access can be written from the memory 400 to the cache 300 in advance. In this way, the processor 200 can access the data it needs in the cache 300, thereby realizing the efficiency of the processor 200 accessing data.
[0030] In the process of prefetching data in the memory 400 to the cache 300, the prefetcher 201 can predict the data that the processor 200 needs to access when executing the next data access request according to the previous data access request executed by the processor 200, and recommend the predicted prefetched data to the cache 300, such as recommending the starting storage address of the prefetched data in the memory 400 and the data length and other information to the cache 300. In this way, the cache 300 can first check whether the data stored in itself includes the prefetched data recommended by the prefetcher 201. If it does, the cache 300 can end the prefetch operation; if it does not, the cache 300 can search for the data from the memory 400 and write the found data into the cache 300. In this way, when the processor 200 executes the next data access request, it can directly find the data it needs to access from the cache 300 without searching from the memory 400. Of course, in other embodiments, the prefetcher 201 can also access the data from the memory 400 and prefetch the accessed data into the cache 300.
[0031] In order to solve the problems of traditional technologies, an embodiment of the present application provides a data prefetching method to avoid as much as possible the occurrence of too much or too little prefetching each time data is prefetched. In specific implementation, the prefetcher 201 can calculate the prefetch length of the prefetched data for the next data access request based on the previous data access request and the data life cycle corresponding to the cache 300, so as to prefetch the corresponding data set in the memory 400 into the cache 300 based on the prefetch length. Due to the life cycle of the data in the cache 300, the iteration status of the data in the cache 300 can be reflected. The data life cycle can reflect how often the data in the cache 300 changes, that is, the data life cycle can reflect the law of data changes in the cache. The prefetch length of the single prefetched data calculated based on the data life cycle can conform to the data iteration law in the cache 300, so that prefetched data of appropriate length can be prefetched in advance for the sequential stream. In this way, by dynamically adjusting the prefetch length of a single prefetch data in an adaptive manner, it is possible to avoid as much as possible the single prefetch data being too large, which would cause waste of prefetch data and occupy cache space, and it is also possible to avoid as much as possible the single prefetch data being too small, which would reduce the performance of the processor 200.
[0032] Among them, the prefetcher 201 can be implemented by software. For example, the prefetcher 201 can be deployed in the cache 300 as a functional module, and is used to prefetch the data in the memory 400 to the cache 300 in time before the processor 200 accesses the data; of course, the prefetcher 201 can also be deployed independently of the cache 300, such as deployed in the physical device where the processor 200 is located. Optionally, the prefetcher 201 can run in user mode to limit the ability of the prefetcher 201 to access data, such as limiting the prefetcher 201 to access data stored in the cache 300.
[0033] Optionally, in order to improve the computing capability of the prefetcher 201, the function of the prefetcher 201 may be implemented using separate hardware. For example, the prefetcher 201 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0034] It is worth noting that Figure 1 The system architecture shown is only an example and is not intended to limit the system architecture applicable to the embodiments of the present application to Figure 1 For example, in other possible system architectures, a hard disk and other devices may also be included, and the prefetcher 201 may prefetch data from the hard disk into the memory 400 , or prefetch data from the hard disk into the cache 300 .
[0035] Below, see Figure 2 As shown, it is a flow chart of a data pre-fetching method in an embodiment of the present application, and the method can be applied to include Figure 1 The system architecture shown in FIG. 1 may be applied to other applicable system architectures, which are not limited in this embodiment. Figure 1 Take the system architecture shown as an example. Figure 2 As shown, the data pre-fetching method can be specifically Figure 1 The prefetcher 201 or the device where the prefetcher 201 is located is executed, and the specific method includes:
[0036] S201: Obtain a first data access request.
[0037] In actual applications, the sequential flow usually includes multiple data access requests, which can be executed sequentially by the processor 200. When executing each data access request, the processor 200 can send the data access request being executed to the prefetcher 201 (for the convenience of description, the data access request is referred to as the first data access request below), so that the prefetcher 201 can predict the data that the processor 200 needs to access when executing the next data access request of the sequential flow based on the first data access request currently being executed by the processor 200, and send the second storage medium (such as the first storage medium) to the prefetcher 201. Figure 1 The data stored in the memory 400 in the storage medium is pre-fetched to a first storage medium (such as a storage medium with a higher read / write access rate) Figure 1 In this way, when the processor 200 executes the next data access request, it can directly access the required data from the second storage medium, so that the speed at which the processor 200 accesses data can reach a higher level.
[0038] In actual application, the first storage medium may be a cache, and the second storage medium may be a memory with a lower access rate (such as a synchronous dynamic random access memory, a dynamic random access memory, etc.), or may be a hard disk with an even lower access rate. Alternatively, the first storage medium may be a memory, and the second storage medium may be a hard disk with a lower access rate, etc. In this embodiment, the rate at which the processor 200 accesses the first storage medium is higher than the rate at which the processor 200 accesses the second storage medium, and this embodiment does not limit the specific combination of the first storage medium and the second storage medium in actual application.
[0039] S202: Determine a data pre-fetching strategy according to the first data access request and the data life cycle, wherein the data pre-fetching strategy includes a pre-fetching length, and the data life cycle is used to indicate the length of time the data is stored in the first storage medium.
[0040] Among them, the prefetch length of the prefetched data in the determined data prefetch strategy can be determined based on the life cycle of the data in the first storage medium. Usually, although the first storage medium has a high data reading and writing performance, its storage space is usually small. Therefore, the data in the first storage medium is usually difficult to store in the first storage medium for a long time. When the length of time it stays in the first storage medium reaches a preset time, it may be eliminated. At this time, the first storage medium no longer stores the data. Correspondingly, the storage length of the data in the first storage medium is the data life cycle, which can reflect the change of the data in the first storage medium, and the change of the data is related to the prefetched data written in the first storage medium. Therefore, the prefetcher 201 can calculate the prefetch length of a single prefetched data based on the data life cycle.
[0041] As an example of determining the prefetch length, there may be a mapping relationship between the data life cycle corresponding to the first storage medium and the prefetch length of the single prefetch data, and the mapping relationship may be established by counting the data life cycle of the prefetch data of the first storage medium in a historical time period and the optimal prefetch length corresponding to the prefetch data in the historical time period, wherein, based on the optimal prefetch length, sequential stream prefetch data in the historical time period is prefetched, so that the prefetch data in the historical time period does not have prefetch waste and prefetch shortage, or the amount of data with prefetch waste and prefetch shortage is minimized. In this way, after obtaining the life cycle of the data in the current second storage medium, the prefetcher 201 can find out the prefetch length of the single prefetch data corresponding to the data life cycle according to the mapping relationship.
[0042] The data life cycle of the data in the first storage medium may be determined by means of data statistics or calculations.
[0043] Specifically, when determining the data life cycle through data statistics, the pre-fetcher 201 can count the life cycle of the second data set in the first storage medium within a preset time period, and calculate the average value of the life cycle of at least one data in the second data set within the preset time period, so that the calculated average value can be used as the data life cycle corresponding to the current first storage medium. Optionally, the data life cycle corresponding to the current first storage medium can be obtained by performing function fitting on the data life cycle within the preset time period, and this embodiment does not limit this. Among them, the preset time period can be, for example, a period of time in the past, such as the 1 hour closest to the current moment.
[0044] In one implementation, Figure 1 The system architecture shown may also include a monitoring module 202 and an intermediate parameter calculation module 203. The monitoring module 202 may be used to monitor the data stored in the first storage medium, so that the data life cycle in the historical time period counted by the pre-fetcher 201 may be provided by the monitoring module 202. Figure 1The system architecture shown also includes an intermediate parameter calculation module 203, and the above-mentioned calculation process performed by the pre-fetcher 201 for the data life cycle in the historical time period can be completed by the intermediate parameter calculation module 203. Specifically, the monitoring module 202 can provide the data life cycle in multiple historical time periods obtained by monitoring to the intermediate parameter calculation module 203, and the intermediate parameter calculation module 203 calculates the average value of the data life cycle in the multiple historical time periods. In this way, the pre-fetcher 201 can obtain the life cycle of the data in the first storage medium from the intermediate parameter calculation module 203 (that is, the average value calculated by the intermediate parameter calculation module 203). In this way, the calculation pressure of the pre-fetcher 201 can be alleviated, and the calculation performance requirements for the pre-fetcher 201 can be reduced.
[0045] When the data life cycle is determined by data calculation, the prefetcher 201 can obtain the capacity of the first storage medium and the data writing bandwidth of the first storage medium at the current moment, so as to calculate the data life cycle corresponding to the first storage medium according to the capacity of the first storage medium and the data writing bandwidth, such as taking the ratio between the capacity of the first storage medium and the data writing bandwidth as the data life cycle corresponding to the first storage medium. Of course, the specific implementation method of obtaining the data life cycle is not limited to the above example, and this embodiment does not limit this.
[0046] In actual application, there may be differences between the data access requests included in the same sequence flow, such as differences in the amount of data requested by different data access requests in the same sequence flow, etc. Therefore, when the prefetcher 201 determines the length of a single prefetch of data for the sequence flow, it can also be determined in combination with the data life cycle and the properties of the sequence flow.
[0047] In a possible implementation, the attributes of a sequence flow may be an average data access length (S) of multiple data access requests included in the sequence flow and a duration (t) of the sequence flow, so that the prefetcher 201 may obtain S and t, and calculate a prefetch length (P) of a single prefetch of data for the sequence flow by the following formula (1). The average data access length (S) may be obtained by summing up the data lengths requested for access by multiple data access requests and then calculating the average value; the duration (t) of the sequence flow refers to the sum of the durations of the multiple data access requests that have been executed.
[0048]
[0049] Optionally, the prefetch length (P) of a single prefetch data may be calculated by other modules / devices (such as Figure 1For example, the monitoring module 202 can monitor the duration of the sequential flow and the length of data accessed by the processor 200 when executing each data access request of the sequential flow, and provide the multiple data lengths obtained by monitoring to the intermediate parameter calculation module 203, so that the intermediate parameter calculation module 203 can calculate the average data access length (S) of the multiple data access requests. At the same time, the monitoring module 202 provides the duration of the sequential flow obtained by monitoring (t) to the prefetch length calculation module 204; then, the prefetch length calculation module 204 can calculate the prefetch length (P) of the single prefetch data according to S calculated by the intermediate parameter calculation module 203 and t provided by the monitoring module 202 through formula (1). In this way, the prefetcher 201 can directly obtain the prefetch length (P) of the single prefetch data from the prefetch length calculation module 204.
[0050] exist Figure 1 In the illustrated system architecture, the monitoring module 202, the intermediate parameter calculation module 203, and the prefetch length calculation module 204 are independent of the prefetcher 201. In actual application, these modules (or part of the modules) can also be integrated into the prefetcher 201, so that the monitoring and calculation functions performed by the monitoring module 202, the intermediate parameter calculation module 203, and the prefetch length calculation module 204 can also be implemented by the prefetcher 201, such as the prefetcher 201 completing the above-mentioned process of calculating the P value.
[0051] It is worth noting that the above process of calculating the P value is only used as an implementation example. In other possible implementations, the prefetcher 201 can also use other methods to calculate the prefetch length of a single prefetch of data based on the properties of the sequential stream and the data life cycle. This embodiment does not limit this.
[0052] S203: storing the data set stored in the second storage medium to the first storage medium according to the pre-fetch strategy, wherein the read and write access rate of the second storage medium is lower than that of the first storage medium.
[0053] When determining the pre-fetched data set, the pre-fetcher 201 can parse out the logical starting address, data length and other information of the accessed data in the second storage medium according to the first data access request sent by the processor 200. In this way, the pre-fetcher 201 can determine the logical ending address of the accessed data in the second storage medium according to the parsed logical address and data length (of course, if the part of the data has been pre-fetched by the pre-fetcher to the first storage medium, the processor 200 can directly access the part of the data from the first storage medium). Since the multiple data access requests included in the sequential stream are usually for accessing data at consecutive logical addresses in the second storage medium, the prefetcher 201 can locate the starting storage position of the prefetched data for the next data access request (hereinafter referred to as the second data access request) of the sequential stream. The starting storage position can be, for example, the above-mentioned logical end address, so that after determining the prefetch length of the prefetched data, the prefetcher 201 can write the data set (i.e., the prefetched data) of the prefetch length after the logical end address in the second storage medium into the first storage medium, or recommend the data set to the first storage medium so that the first storage medium can actively pull the data set from the second storage medium. Exemplarily, the data prefetch strategy determined by the prefetcher 201 can also be used to indicate the data set.
[0054] Furthermore, since the process of the prefetcher 201 determining the prefetched data set and writing the data set from the second storage medium to the first storage medium requires a certain amount of time, and during this process, the processor 200 may have completed the first data access request and started to execute the second data access request, before the processor 200 accesses the data in the first storage medium based on the second data access request, the prefetcher 201 may not have prefetched the data into the first storage medium in time (that is, a prefetch false hit occurs), so the processor 200 may need to access the data from the second storage medium. At this time, for the data accessed by the processor 200 from the second storage medium, prefetching it to the first storage medium will result in prefetching waste of this part of the data. Based on this, in some possible implementations, the prefetcher 201 can adjust the starting storage position of the prefetched data set in the second storage medium when determining the prefetched data. For example, the prefetcher 201 can determine that the logical end address of the data accessed by the processor 200 in the second storage medium is 0x6000000 according to the first data access request. If the prefetcher 201 starts prefetching data from 0x6000001, it may cause the data of multiple logical addresses such as 0x6000001 to not be written into the first storage medium in time, so that this part of the data may not be accessed by the processor 200 during the entire data life cycle (the processor 200 has already accessed this part of the data from the second storage medium), so that this part of the data wastes the storage resources of the first storage medium, and a prefetch false hit occurs. Therefore, the prefetcher 201 can start prefetching the data set from 0x6001000 (or other logical addresses) and write the data set to the first storage medium. At this time, the processor 200 can access the data from 0x6000001 to 0x6000111 from the second storage medium, and can access the data from 0x6001000 and thereafter from the first storage medium. In this way, it can be avoided that the data from 0x6000001 to 0x6000111 is not accessed by the processor 200 because it is not written to the first storage medium in time, thereby causing waste of pre-fetched data and occupying the storage space of the first storage medium.
[0055] Exemplarily, the prefetcher 201 may adjust the starting storage position of the prefetched data according to the data access time of the first data access request. For example, the prefetcher 201 may also parse the data access time and other information from the first data access request, so as to determine the adjusted starting storage position of the prefetched data according to the data access time and the current moment. For example, the larger the time interval between the current moment and the data access time, the larger the interval between the starting storage positions before and after the adjustment. Of course, the starting storage position of the adjusted prefetched data may also be determined based on other methods, which is not limited in this embodiment.
[0056] In this embodiment, not only can the prefetch length of a single prefetched data be determined for the sequence flow through the above process, but the total prefetch length of the prefetched data can also be further determined for the sequence flow, that is, the sum of the prefetch lengths of multiple single prefetched data. Exemplarily, the data prefetch strategy determined based on the first data access request and the data life cycle can also include an upper limit on the prefetch length of the sequence flow. In this way, it is possible to avoid prefetching waste caused by excessive total amount of prefetched data for the sequence flow or insufficient total amount of prefetched data.
[0057] To this end, this embodiment may further include the following steps:
[0058] S204: Obtain the upper limit of the pre-fetch length of the sequential stream.
[0059] In a possible implementation, the prefetcher 201 may obtain the prefetch length base L base And is the accessed data length A of the sequence flow. The accessed data length A of the sequence flow refers to the sum of the lengths of data requested to be accessed by the multiple data access requests that have been executed in the sequence flow. base And A, the upper limit L of the pre-fetch length corresponding to the sequence stream can be calculated, that is, the maximum amount of data pre-fetched for the sequence stream can be calculated. For example, L can be calculated by the following formula (2) and formula (3):
[0060]
[0061] L= L base *N (3)
[0062] Among them, N is through A and L base The ratio of A and L is rounded up. base When the ratio is in the interval [0,1], the upper limit of the pre-fetch length of the sequential stream is L base ; When the ratio of A to Lbase is in the interval (1, 2], the upper limit of the prefetch length of the sequential stream is 2L base ; When A and L base When the ratio is in the interval (2, 3], the upper limit of the pre-fetch length of the sequential stream is 3L base , and so on. In other implementations, the prefetcher 201 may also be Figure 1 The intermediate parameter calculation module 203 calculates L, etc.
[0063] As an example, L base The value of can be calculated based on the access data length of the sequential flow in the historical time period.
[0064] Specifically, the monitoring module 202 can be divided into multiple historical time windows according to a preset time granularity (such as a duration of 10 seconds, etc.). Assuming that the current time is 10:00:50, the monitoring module can be divided into historical time windows of 10:00:40 to 10:00:50, historical time windows of 10:00:30 to 10:00:40, historical time windows of 10:00:20 to 10:00:30, historical time windows of 10:00:10 to 10:00:20, and historical time windows of 10:00:00 to 10:00:10, etc., according to the time granularity of 10 seconds, and respectively obtain the data lengths finally accessed by multiple sequential flows in each historical time window. Then, the intermediate parameter calculation module 203 can calculate the pre-fetch length base L by the following formula (4) and formula (5): base .
[0065]
[0066] L base =argmin Waste(x) (5)
[0067] Among them, Li refers to the length of the i-th sequence flow counted in the historical time window, n refers to the number of sequence flows contained in the historical time window, and x is the length base L to be calculated. base , Waste(x) is the waste value of pre-fetched data. Based on formula (4) and formula (5), L is calculated base , it can be made based on the L base When pre-fetching data from the second storage medium for a sequential stream within a historical time window, the total amount of data wasted by pre-fetching data can be minimized.
[0068] The intermediate parameter calculation module 203 can calculate an L for each historical time window. base , and according to the calculated multiple L base , determine the final L base For example, the intermediate parameter calculation module 203 can calculate L base is greater than the first preset value and the L base The corresponding Waste(x) is less than the second preset value L base As the final L base , or it can be a combination of multiple L base The average value of L base , or by voting, multiple L base The largest number of L base As the final L base wait.
[0069] In other examples, the length of data accessed by the sequential flow in each historical time window can also be counted, and the length of data accessed with the largest number of occurrences is taken as L base Or, L base The value of L can be an empirical value, which is pre-set by a technician in the pre-fetcher 201. base The value of is not limited.
[0070] Accordingly, the upper limit of the pre-fetch length of the sequence flow can be obtained by calculation through the above process, or can be an empirical value and set in advance by a technician. In this embodiment, there is no limitation on how to determine the upper limit of the pre-fetch length of the sequence flow.
[0071] S205: Check and adjust the prefetch length of the single prefetch data based on the acquired prefetch length upper limit of the sequential stream.
[0072] In this embodiment, by using the above L base After A calculates the upper limit L of the pre-fetched length of the pre-fetched data for the sequential stream, the L can also be used to verify and adjust the pre-fetched length P of the single pre-fetched data. Specifically, after determining the pre-fetched length P of the data set, the pre-fetcher 201 can calculate the upper limit L of the pre-fetched length of the sequential stream and the length L of the pre-fetched data. history , and compares whether the calculated prefetch length P of the single prefetched data is greater than the difference. If not, the corresponding data set can be prefetched from the second storage medium to the first storage medium based on the calculated P value. If greater, it indicates that after prefetching data using the calculated P value, the length of the total prefetched data of the sequential stream will exceed the prefetch length upper limit L. At this time, the prefetcher 201 can reduce the prefetch length P value when prefetching data this time, specifically, the currently calculated prefetch length P can be adjusted to the sum of the prefetch length upper limit L of the sequential stream and the prefetched data length L. history The difference between P and L history The following formula (6) is satisfied between .
[0073] L history +P≤L (6)
[0074] By checking and adjusting the P value as described above, it is possible to avoid prefetching waste due to an excessive amount of data prefetched for the sequential stream.
[0075] In this embodiment, after calculating the prefetch length P of the single prefetch data, each subsequent time, data can be prefetched for the sequential stream based on the prefetch length P. Of course, in some implementations, the prefetch length P value of the single prefetch data can also be recalculated each time, or the prefetch length P of the last single prefetch data can be adjusted accordingly, and the adjusted prefetch length P is used as the prefetch length of the current prefetch data.
[0076] For example, in actual application, the properties of the sequence stream may change continuously, such as the duration (t) of the sequence stream gradually increases, the average data access length (S) of multiple data access requests executed by the processor 200 fluctuates, etc. Therefore, when the prefetch length P of a single prefetch of data is calculated for the sequence stream based on the properties of the sequence stream, the prefetcher 201 can recalculate a new prefetch length P value according to the changed properties, and use the newly calculated prefetch length P value to prefetch the corresponding data. Alternatively, the prefetcher 201 can adjust the prefetch length P value used in the last prefetch of data, and use the adjusted prefetch length P value as the prefetch length of the prefetched data this time, such as increasing or decreasing the prefetch length P value used in the last prefetch of data according to the change ratio of the S / t value.
[0077] In this embodiment, based on the data life cycle, it can reflect how often the data in the first storage medium changes, that is, the data life cycle can reflect the law of data changes in the first storage medium, so that the pre-fetch length calculated according to the data life cycle can be consistent with the data replacement law in the first storage medium, and data of a suitable length can be pre-fetched to the first storage medium in advance for the next data access request. In this way, by dynamically adjusting the pre-fetch length of a single pre-fetched data in an adaptive manner, it is possible to avoid as much as possible the waste of pre-fetched data caused by too much single pre-fetching data and occupying the storage space of the first storage medium, and it is also possible to avoid as much as possible the low data access performance caused by too little single pre-fetching data.
[0078] It should be noted that, for the above method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions.
[0079] Other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be familiar with the fact that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.
[0080] Combined with the above Figure 1 to Figure 2, describes in detail the data pre-fetching method provided by the present application, and will be combined with Figure 3 to Figure 4 , describing the data pre-fetching apparatus and device provided by the present application.
[0081] Figure 3 A schematic diagram of a data pre-fetching device structure provided in the present application, the device 30 may include:
[0082] An acquisition module 301 is used to acquire a first data access request;
[0083] A determination module 302, configured to determine a data pre-fetching strategy according to the first data access request and a data life cycle, wherein the data pre-fetching strategy includes a pre-fetching length, and the data life cycle is used to indicate a duration for which data is stored in a first storage medium;
[0084] The storage module 303 is used to store a first data set stored in a second storage medium to a first storage medium according to the pre-fetch strategy, wherein the read and write access rate of the second storage medium is lower than that of the first storage medium, and the first data set includes at least one data.
[0085] It should be understood that the device 30 of the embodiment of the present application can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. It can also be implemented by software. Figure 2 When the data pre-fetching method is shown, the device 30 and its various modules may also be software modules.
[0086] In a possible implementation, the determination module 302 is specifically used to determine the data prefetching strategy according to the first data access request, the data life cycle, and the properties of the sequence stream to which the first data access request belongs, wherein the sequence stream includes multiple logical block address LBA continuous data access requests, and the first data access request is any one of the multiple LBA continuous data access requests. The properties of the sequence stream include the average data access length of the multiple data access requests and the duration of the sequence stream.
[0087] In a possible implementation manner, the determining module 302 is specifically configured to:
[0088] Determining, according to the first data access request, a starting storage location of the data set in the second storage medium;
[0089] According to the data life cycle, a pre-fetch length of the data set is calculated, and the data set includes data of the pre-fetch length starting from the starting storage position in the second storage medium.
[0090] In a possible implementation manner, the acquisition module 301 is further configured to acquire an upper limit of a pre-fetch length and acquire a pre-fetched length of the sequential stream before storing the first data set stored in the second storage medium to the first storage medium according to the pre-fetch strategy;
[0091] The device 30 further comprises:
[0092] The updating module 304 is configured to update the prefetch length to the difference between the prefetch length upper limit and the prefetched length when the prefetch length is greater than the difference between the prefetch length upper limit and the prefetched length.
[0093] In a possible implementation manner, the device 30 further includes:
[0094] The calculation module 305 is used to calculate the upper limit of the pre-fetch length of the sequential stream according to the accessed data length of the sequential stream and the pre-fetch length cardinality.
[0095] In a possible implementation, the calculation module 305 is further used to calculate the pre-fetch length base based on the access data length of multiple sequential streams within the historical time period; wherein, when pre-fetching data to the first storage medium for multiple sequential streams within the historical time period based on the pre-fetch length base, the total amount of data wasted in pre-fetching data is minimized.
[0096] In a possible implementation manner, the device 30 further includes an adjustment module 306, which is configured to adjust the pre-fetch length using the changed attribute value when the attribute value of the sequential stream changes.
[0097] In a possible implementation, the data life cycle is determined according to an average storage time of a second data set in the first storage medium within a preset time period, and the second data set includes at least one data.
[0098] In a possible implementation manner, the acquisition module 301 is further configured to acquire the capacity of the first storage medium and the data writing bandwidth of the first storage medium;
[0099] The device 30 further includes a calculation module 305 for calculating the data life cycle according to the capacity of the first storage medium and the data writing bandwidth.
[0100] In a possible implementation, the first storage medium is a cache, and the second storage medium is a memory;
[0101] Alternatively, the first storage medium is a memory, and the second storage medium is a hard disk.
[0102] The device 30 according to the embodiment of the present application may correspond to executing the method described in the embodiment of the present application, and the above and other operations and / or functions of each unit in the device 30 are respectively to implement Figure 2 For the sake of brevity, the corresponding processes of each method in are not repeated here.
[0103] Figure 4 A schematic diagram of a device 40 provided for the present application, as shown in the figure, the device 40 includes a processor 401, a storage medium 402, a communication interface 403 and a memory unit 404. Among them, the processor 401, the storage medium 402, the communication interface 403, and the memory unit 404 communicate through a bus 405, and communication can also be achieved through other means. The storage medium 402 is used to store instructions, and the processor 401 is used to execute the instructions stored in the storage medium 402. The storage medium 402 stores program code, and the processor 401 can call the program code stored in the storage medium 402 to perform the following operations:
[0104] Obtaining a first data access request;
[0105] Determining a data pre-fetching strategy according to the first data access request and the data life cycle, wherein the data pre-fetching strategy includes a pre-fetching length, and the data life cycle is used to indicate the length of time the data is stored in the first storage medium;
[0106] According to the pre-fetch strategy, a first data set stored in a second storage medium is stored in the first storage medium, the read and write access rate of the second storage medium is lower than that of the first storage medium, and the first data set includes at least one data.
[0107] It should be understood that in the embodiment of the present application, the processor 401 may be a CPU, and the processor 401 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete device components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0108] The storage medium 402 may include a read-only memory and a random access memory, and provide instructions and data to the processor 401. The storage medium 402 may also include a non-volatile random access memory. For example, the storage medium 402 may also store information about the device type.
[0109] The storage medium 402 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0110] The communication interface 403 is used to communicate with other devices connected to the device 40. For example, the device 40 can obtain a first data access request through the communication interface 403. In addition to the data bus, the bus 405 can also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus 405 in the figure.
[0111] It should be understood that the device 40 according to the embodiment of the present application may correspond to the apparatus 30 in the embodiment of the present application, and may correspond to the device 30 executing the method according to the embodiment of the present application. Figure 2 The corresponding subjects in the method shown, and the above and other operations and / or functions of each module in the device 40 are respectively implemented Figure 2 For the sake of brevity, the corresponding processes of each method in are not repeated here.
[0112] In addition, the present application also provides a device, which may include the above Figure 4 The device 40 shown can realize Figure 2 For the sake of brevity, the corresponding processes of each method in are not repeated here.
[0113] In addition, the present application also provides a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0114] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances. This is just a way of distinguishing objects with the same attributes when describing the embodiments of this application.
[0115] It should also be noted that the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application. In addition, in the device drawings provided in the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0116] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for pre-fetching data, characterized in that: The method comprises: Obtaining a first data access request; Determining a data pre-fetching strategy according to the first data access request and the data life cycle, wherein the data pre-fetching strategy includes a pre-fetching length, and the data life cycle is used to indicate the length of time the data is stored in the first storage medium; According to the pre-fetch strategy, a first data set stored in a second storage medium is stored in the first storage medium, the read and write access rate of the second storage medium is lower than that of the first storage medium, and the first data set includes at least one data.
2. The method according to claim 1, characterized in that The determining of the data pre-fetching strategy according to the first data access request and the data life cycle includes: The data prefetch strategy is determined based on the first data access request, the data life cycle, and the properties of the sequential stream to which the first data access request belongs, the sequential stream includes multiple logical block address LBA continuous data access requests, the first data access request is any one of the multiple LBA continuous data access requests, and the properties of the sequential stream include the average data access length of the multiple data access requests and the duration of the sequential stream.
3. The method according to claim 2, characterized in that The determining of the data pre-fetching strategy according to the first data access request and the data life cycle includes: Determining, according to the first data access request, a starting storage location of the data set in the second storage medium; According to the data life cycle, a pre-fetch length of the data set is calculated, and the data set includes data of the pre-fetch length starting from the starting storage position in the second storage medium.
4. The method according to claim 1, characterized in that: Before storing the first data set stored in the second storage medium to the first storage medium according to the pre-fetch strategy, the method further includes: Get the upper limit of prefetch length; Get the prefetched length of the sequential stream; When the pre-fetch length is greater than the difference between the pre-fetch length upper limit and the pre-fetched length, the pre-fetch length is updated to the difference.
5. The method according to claim 4, characterized in that The method further comprises: An upper limit of the pre-fetch length of the sequential stream is calculated according to the accessed data length of the sequential stream and the pre-fetch length base.
6. The method according to claim 5, characterized in that The method further comprises: Calculating the pre-fetch length cardinality based on access data lengths of multiple sequential streams within a historical time period; When prefetching data to the first storage medium for multiple sequential streams within the historical time period based on the prefetch length cardinality, the total amount of data wasted in prefetching data is minimized.
7. The method according to claim 2, characterized in that: The method further comprises: When the attribute value of the sequential stream changes, the pre-fetch length is adjusted using the changed attribute value.
8. The method according to claim 1, characterized in that The data life cycle is determined according to an average storage time of a second data set in the first storage medium within a preset time period, and the second data set includes at least one data.
9. The method according to claim 1, characterized in that: The method further comprises: Acquire the capacity of the first storage medium and the data writing bandwidth of the first storage medium; The data life cycle is calculated according to the capacity of the first storage medium and the data writing bandwidth.
10. The method according to any one of claims 1 to 9, characterized in that: The first storage medium is a cache, and the second storage medium is a memory; Alternatively, the first storage medium is a memory, and the second storage medium is a hard disk.
11. A data pre-fetching device, characterized in that: The device comprises: An acquisition module, used for acquiring a first data access request; a determination module, configured to determine a data pre-fetching strategy according to the first data access request and a data life cycle, wherein the data pre-fetching strategy includes a pre-fetching length, and the data life cycle is used to indicate a duration for which the data is stored in the first storage medium; The storage module is used to store a first data set stored in a second storage medium to a first storage medium according to the pre-fetch strategy, wherein the read and write access rate of the second storage medium is lower than that of the first storage medium, and the first data set includes at least one data.
12. The device according to claim 11, characterized in that The determination module is specifically used to determine the data prefetch strategy based on the first data access request, the data life cycle and the attributes of the sequential stream to which the first data access request belongs, the sequential stream includes multiple continuous data access requests with logical block addresses LBA, the first data access request is any one of the multiple continuous data access requests with logical block addresses LBA, and the attributes of the sequential stream include the average data access length of the multiple data access requests and the duration of the sequential stream.
13. The device according to claim 12, characterized in that The determination module is specifically used for: Determining, according to the first data access request, a starting storage location of the data set in the second storage medium; According to the data life cycle, a pre-fetch length of the data set is calculated, and the data set includes data of the pre-fetch length starting from the starting storage position in the second storage medium.
14. The device according to claim 11, characterized in that The acquisition module is further used to acquire the upper limit of the pre-fetch length and the pre-fetched length of the sequential stream before storing the first data set stored in the second storage medium to the first storage medium according to the pre-fetch strategy; The device further includes: an updating module, configured to update the prefetch length to the difference between the prefetch length upper limit and the prefetched length when the prefetch length is greater than the difference between the prefetch length upper limit and the prefetched length.
15. The device according to claim 14, characterized in that The device also includes: The calculation module is used to calculate the upper limit of the pre-fetch length of the sequential stream according to the accessed data length of the sequential stream and the pre-fetch length base.
16. The device according to claim 15, characterized in that The calculation module is also used to calculate the pre-fetch length base based on the access data length of multiple sequential streams in the historical time period; wherein, when pre-fetching data to the first storage medium for multiple sequential streams in the historical time period based on the pre-fetch length base, the total amount of data wasted in pre-fetching data is minimized.
17. The device according to claim 12, characterized in that The device further comprises an adjusting module, which is used to adjust the pre-fetch length by using the changed attribute value when the attribute value of the sequential stream changes.
18. The device according to claim 11, characterized in that The data life cycle is determined according to an average storage time of a second data set in the first storage medium within a preset time period, and the second data set includes at least one data.
19. The device according to claim 11, characterized in that The acquisition module is further used to acquire the capacity of the first storage medium and the data writing bandwidth of the first storage medium; The device also includes a calculation module, which is used to calculate the data life cycle according to the capacity of the first storage medium and the data writing bandwidth.
20. The device according to any one of claims 11 to 19, characterized in that The first storage medium is a cache, and the second storage medium is a memory; Alternatively, the first storage medium is a memory, and the second storage medium is a hard disk.
21. A device for data pre-fetching, characterized in that: including a processor and a memory; The memory is used to store computer instructions; The processor is used to execute the operation steps of the method according to any one of claims 1 to 10 according to the computer instructions.
22. A computer-readable storage medium, characterized in that: The method comprises instructions for implementing the operation steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Data prefetching method and apparatus, and storage device
CN110226158A
Cache updating method and device, server and storage medium
CN110837513A