A cloud storage acceleration method and system based on edge computing

By deploying a cloud storage acceleration method based on edge computing on the user side, building a file access trajectory ring and extracting historical access files, the problem of high data access latency in traditional cloud storage systems is solved, and efficient cache hit rate and acceleration speed are achieved.

CN119621686BActive Publication Date: 2025-04-25SHENZHEN BEILIANDE IND CO LTD

Patent Information

Application Number
CN202510160409.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-04-25
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

Traditional cloud storage systems need to interact frequently with remote data centers during data access, resulting in high data access latency, especially when network bandwidth is limited or network congested, the user experience is affected.

Method used

By deploying a cloud storage acceleration method based on edge computing on the user side, a file access trajectory ring is built, a preset time window is expanded bidirectionally along a breakpoint, a historical access file is extracted and the association cluster is divided based on the time difference threshold, cyclic displacement and position alignment is aligned, prefetched files are determined and a ring cache queue is set in the edge server.

Benefits of technology

It improves the cache hit rate of edge servers, reduces the frequency of users accessing cloud storage servers, reduces data access latency, solves the problem of reduced cache hit rate of associated files, and improves the speed of cloud storage acceleration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621686B_ABST
    Figure CN119621686B_ABST
Patent Text Reader

Abstract

A cloud storage acceleration method and system based on edge computing, which relates to the field of electronic digital data processing. In the method, a file access trajectory ring is constructed; historical access files are extracted as a first associated file set; the access time difference of each historical access file is calculated; a number of associated clusters and a second associated file set are determined according to the access time difference; a circular displacement is performed in the second associated file set to obtain a displacement associated cluster; a third associated file set is extracted; a pre-fetched file is determined; a circular cache queue is set, and a pre-fetch position is determined according to position information; when the space of the circular cache queue is less than a preset value, the pre-fetched file corresponding to the pre-fetched position in the preset interval of the circular cache queue is retained to obtain a final pre-fetched file; when it is detected that a user accesses a target file, the final pre-fetched file is loaded from a cloud storage server to an edge server. The present application is used to solve the problem of reduced cache hit rate of associated files and improve the speed of cloud storage acceleration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of electronic digital data processing, and in particular, to a cloud storage acceleration method and system based on edge computing. Background Art

[0002] With the rapid development of the Internet and mobile Internet, cloud storage services are widely used in the field of personal and corporate data storage. However, in the process of data access, traditional cloud storage systems need to frequently interact with remote data centers, resulting in high data access latency, especially in the case of limited network bandwidth or network congestion, which seriously affects the user experience. In addition, the centralized cloud storage architecture will also cause the data center to be overloaded, affecting the overall performance and scalability of the system.

[0003] In related technologies, a cache server can be deployed between the user end and the cloud storage server to cache frequently accessed data locally, thereby reducing the number of interactions with the remote data center. This solution uses cache replacement algorithms such as LRU (least recently used) to manage cache data. When the cache space is insufficient, data with low access frequency is deleted first.

[0004] However, when a user accesses a file, other files associated with the file may also be accessed within a short period of time. However, since the cache replacement algorithm fails to predict this access pattern, the cache hit rate is reduced, thereby reducing the acceleration speed. Summary of the invention

[0005] The present application provides a cloud storage acceleration method and system based on edge computing, which are used to solve the problem of reduced cache hit rate of associated files and improve the speed of cloud storage acceleration.

[0006] In a first aspect, the present application provides a cloud storage acceleration method based on edge computing, which constructs a file access track ring based on the target file information currently accessed by the user, and the breakpoint in the file access track ring is the target file;

[0007] Bidirectionally extending a preset time window along the breakpoint on the file access trajectory loop;

[0008] Extracting historical access files within a preset time window as a first associated file set;

[0009] In the first associated file set, calculating the access time difference of each historically accessed file;

[0010] Classify the historical access files whose access time difference is less than the first preset threshold into the same association cluster, obtain a plurality of association clusters, and use the plurality of association clusters as the second association file set;

[0011] Circularly shifting each associated cluster in the second associated file set to obtain a shifted associated cluster;

[0012] Extracting files in the displacement association cluster that are located at the same position as the target file as a third association file set;

[0013] Determine the files in the third associated file set whose number of occurrences in the associated cluster is greater than a second preset threshold as pre-fetched files;

[0014] Setting a circular cache queue in the edge server, and determining a prefetch position of the prefetch file in the circular cache queue according to position information of the prefetch file in the associated cluster;

[0015] When the space of the ring buffer queue is less than a preset value, the pre-fetched file corresponding to the preset interval of the ring buffer queue is retained to obtain a final pre-fetched file;

[0016] When it is detected that a user accesses a target file, the final pre-fetched file is loaded from the cloud storage server to the edge server.

[0017] By adopting the above technical solution, the user's historical file access sequence is constructed into a ring structure and breakpoints are set. Combined with the expansion method of the bidirectional time window, the access correlation before and after the target file can be considered at the same time. The method of dividing the associated clusters based on the time difference threshold is used to classify files with similar access times into the same cluster, which retains the temporal characteristics of file access. The associated clusters are cyclically shifted and aligned so that files with similar access patterns in different associated clusters can be matched accordingly. By extracting files with the same position and screening based on the number of occurrences, pre-fetched files with stable access correlation with the target file are obtained. A circular cache queue is used to store pre-fetched files, and the pre-fetch position is determined according to the position information in the associated cluster. When space is limited, files in the preset interval are preferentially retained. This pre-fetching strategy not only considers the temporal correlation of file access, but also takes into account the efficient use of storage space, thereby improving the cache hit rate of the edge server, reducing the frequency of user access to the cloud storage server, reducing data access delay, solving the problem of reduced cache hit rate of associated files, and improving the speed of cloud storage acceleration.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, building a file access track ring based on information of a target file currently accessed by a user specifically includes:

[0019] Obtain the file identifier, access timestamp and file type information of the target file information currently accessed by the user;

[0020] Construct the user's historical access sequence according to the order of access timestamps;

[0021] Connect the user's historical access sequence head to tail to form a circular sequence;

[0022] The position of the target file is located in the circular sequence, and the position is set as a breakpoint of the file access track ring to obtain the file access track ring.

[0023] By adopting the above technical solution, a user's historical access sequence is constructed based on file identification, access timestamp and file type information, and the sequence is connected from beginning to end to form a ring structure. This construction method makes the file access sequence have continuity and periodicity characteristics. By locating the target file position in the ring sequence and setting it as a breakpoint, an access track ring centered on the target file is established. This structure enables the system to start from the target file and bidirectionally explore files that have access associations with it. The ring structure eliminates the limitations of the traditional linear sequence at the beginning and end positions, so that the association between files near the beginning and end of the sequence can also be effectively captured. This way of constructing the file access track ring completely retains the user's file access pattern and provides a more accurate access relationship expression for the subsequent identification and pre-fetching of associated files.

[0024] In combination with some embodiments of the first aspect, in some embodiments, performing cyclic shift on each associated cluster in the second associated file set to obtain a shifted associated cluster specifically includes:

[0025] Counting the number of files in each associated cluster in the second associated file set;

[0026] The associated cluster with the largest number of files is taken as the benchmark cluster;

[0027] Calculate the difference in the number of files between other associated clusters except the benchmark cluster and the benchmark cluster;

[0028] According to the difference in the number of files, other associated clusters are filled cyclically until the number of files in all other associated clusters is the same as that in the benchmark cluster;

[0029] Based on the position of the target file in the benchmark cluster, the file sequences in other associated clusters are circularly shifted to align the files in the corresponding positions of the target file in each associated cluster.

[0030] By adopting the above technical solution, the number of files in the associated clusters is counted and the largest cluster is selected as the benchmark. The number of files in all associated clusters is made consistent by combining the circular filling method, thus avoiding the matching deviation caused by the imbalance of the number of files between the associated clusters. Based on the position of the target file in the benchmark cluster, other associated clusters are circularly displaced to align the files in each cluster with the corresponding position of the target file. This displacement alignment operation enables the files with similar access timing characteristics in different associated clusters to be accurately matched. Through this file alignment method, the system can identify files with similar access patterns as the target file in different time periods, improve the accuracy of pre-fetch file selection, and reduce the waste of resources caused by invalid pre-fetching.

[0031] In combination with some embodiments of the first aspect, in some embodiments, after the final pre-fetched file is loaded from the cloud storage server to the edge server when it is detected that the user accesses the target file, the method further includes:

[0032] Count the historical access time points of the pre-fetched files;

[0033] Calculate the time intervals between adjacent access time points based on the historical access time point set to obtain the access interval sequence of the pre-fetched file;

[0034] Calculate the activity coefficient of the prefetch file based on the access interval sequence;

[0035] When the activity coefficient is less than a third preset threshold, removing the corresponding pre-fetch file from the ring cache queue;

[0036] The remaining storage space after removing the prefetch files is added to the free space queue.

[0037] By adopting the above technical solution, the historical access time points of the pre-fetched files are counted and the access interval sequence is calculated. Combined with the calculation method of the activity coefficient, the actual use value of the pre-fetched files can be quantitatively evaluated. When the activity coefficient is lower than the threshold, the corresponding file is promptly removed from the cache queue and the storage space is reclaimed to the available queue. This dynamic adjustment mechanism based on activity solves the problem of low-value files occupying cache space for a long time. The system realizes dynamic optimization of cache space by continuously monitoring the access status of pre-fetched files and clearing them in time, improving the utilization efficiency of edge server storage resources, and ensuring that high-value files always occupy priority cache positions, thereby maintaining a high cache hit rate.

[0038] In conjunction with some embodiments of the first aspect, in some embodiments, calculating the activity coefficient of the prefetched file according to the access interval sequence specifically includes:

[0039] Obtaining the time interval for accessing the pre-fetched file a preset number of times, and calculating the mean and standard deviation of the time interval;

[0040] Calculate volatility based on mean and standard deviation;

[0041] The ratio of volatility to time interval is taken as the activity coefficient.

[0042] By adopting the above technical solution, the time interval of the preset number of accesses is obtained and its mean and standard deviation are calculated, which can accurately reflect the concentration trend and dispersion of the file access pattern. The volatility calculated based on the mean and standard deviation can quantify the variation of the file access time interval and reflect the stability of the file access pattern. Since the activity coefficient contains information on both time and fluctuation, the system can more accurately determine whether the file should continue to occupy the cache space.

[0043] In combination with some embodiments of the first aspect, in some embodiments, before removing the corresponding pre-fetch file from the ring cache queue when the activity coefficient is less than the third preset threshold, the method further includes:

[0044] Record the access position information of the pre-fetched file, and obtain a set of files having the same access position as the pre-fetched file;

[0045] Calculate the access frequency of each file in the file collection;

[0046] Determine file priority based on access frequency. File priority includes high priority, medium priority and low priority.

[0047] Mark high-priority files as retained.

[0048] By adopting the above technical solution, recording the access location information of the pre-fetched files and obtaining the file set with the same access location, the system can identify the file group with similar position characteristics in the access sequence. The calculation and analysis of the access frequency of each file in the file set reflects the probability distribution of different files being accessed at the same location. The three-level priority system divided according to the access frequency realizes the quantitative classification of the importance of files. The mechanism of marking high-priority files as retained files ensures that the frequently accessed key files can be continuously retained in the cache. This file classification method based on location information and access frequency enables the system to retain the most valuable files with limited cache resources, thereby improving the cache hit rate and resource utilization efficiency.

[0049] In conjunction with some embodiments of the first aspect, in some embodiments, determining the file priority according to the access frequency specifically includes:

[0050] A first priority threshold, a second priority threshold, and a third priority threshold are set based on the access frequency, wherein the first priority threshold is greater than the second priority threshold, and the second priority threshold is greater than the third priority threshold;

[0051] Files with access frequency higher than the first priority threshold are classified as high priority, files with access frequency higher than the second priority threshold but not higher than the first priority threshold are classified as medium priority, and files with access frequency higher than the third priority threshold but not higher than the second priority threshold are classified as low priority.

[0052] By adopting the above technical solution, setting three levels of priority thresholds, and maintaining the progressive relationship that the first priority threshold is greater than the second priority threshold, and the second priority threshold is greater than the third priority threshold, a fine-grained file classification standard is established. According to the comparative relationship between the file access frequency and different thresholds, the files are accurately divided into three priorities: high, medium, and low, so that the system can more reasonably distinguish the importance of files.

[0053] In a second aspect, an embodiment of the present application provides a cloud storage acceleration system based on edge computing, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the system to execute the method described in the first aspect and any possible implementation method of the first aspect.

[0054] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a system, causes the system to execute the method described in the first aspect and any possible implementation of the first aspect.

[0055] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a system, the system executes the method described in any possible implementation manner in the first aspect.

[0056] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0057] 1. The present application provides a cloud storage acceleration method based on edge computing, which constructs the user's historical file access sequence into a ring structure and sets breakpoints. Combined with the expansion method of the bidirectional time window, it can simultaneously consider the access correlation before and after the target file. Based on the time difference threshold, the method of dividing the associated clusters is used to classify files with similar access times into the same cluster, and the temporal characteristics of file access are retained. The associated clusters are cyclically shifted and aligned, so that files with similar access patterns in different associated clusters can be matched accordingly. By extracting files with the same position and screening based on the number of occurrences, pre-fetched files with stable access associations with the target file are obtained. A circular cache queue is used to store pre-fetched files, and the pre-fetch position is determined according to the position information in the associated cluster. When space is limited, files in a preset interval are preferentially retained. This pre-fetching strategy not only considers the temporal correlation of file access, but also takes into account the efficient use of storage space, thereby improving the cache hit rate of the edge server, reducing the frequency of user access to the cloud storage server, reducing data access delay, solving the problem of reduced cache hit rate of associated files, and improving the speed of cloud storage acceleration.

[0058] 2. The present application provides a cloud storage acceleration method based on edge computing, which counts the historical access time points of pre-fetched files and calculates the access interval sequence. Combined with the calculation method of the activity coefficient, it can quantitatively evaluate the actual use value of the pre-fetched files. When the activity coefficient is lower than the threshold, the corresponding file is promptly removed from the cache queue and the storage space is recovered to the available queue. This dynamic adjustment mechanism based on activity solves the problem of low-value files occupying cache space for a long time. The system realizes dynamic optimization of cache space by continuously monitoring the access status of pre-fetched files and clearing them in time, thereby improving the utilization efficiency of edge server storage resources and ensuring that high-value files always occupy priority cache positions, thereby maintaining a high cache hit rate.

[0059] 3. The present application provides a cloud storage acceleration method based on edge computing, which records the access location information of pre-fetched files and obtains a set of files with the same access location. The system can identify file groups with similar location characteristics in the access sequence. The calculation and analysis of the access frequency of each file in the file collection reflects the probability distribution of different files being accessed at the same location. The three-level priority system divided according to the access frequency realizes the quantitative classification of file importance. The mechanism of marking high-priority files as retained files ensures that frequently accessed critical files can continue to remain in the cache. This file classification method based on location information and access frequency enables the system to retain the most valuable files with limited cache resources, thereby improving cache hit rate and resource utilization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1It is a flow chart of a cloud storage acceleration method based on edge computing in an embodiment of the present application.

[0061] Figure 2 It is a flow chart of a method for dynamically adjusting pre-fetched files based on activity in an embodiment of the present application.

[0062] Figure 3 It is a schematic diagram of the physical device structure of a cloud storage acceleration system based on edge computing provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.

[0064] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0065] The following uses an embodiment and combines Figure 1 , a cloud storage acceleration method based on edge computing in an embodiment of the present application is described:

[0066] See also Figure 1 , which is a flow chart of a cloud storage acceleration method based on edge computing in an embodiment of the present application.

[0067] S101, constructing a file access track ring based on information of a target file currently accessed by a user;

[0068] The system builds a file access track ring based on the target file information currently accessed by the user. The breakpoint in the file access track ring is the target file, which specifically includes: obtaining the file identifier, access timestamp and file type information of the target file information currently accessed by the user;

[0069] Construct the user's historical access sequence according to the order of access timestamps;

[0070] Connect the user's historical access sequence head to tail to form a circular sequence;

[0071] The position of the target file is located in the circular sequence, and the position is set as a breakpoint of the file access track ring to obtain the file access track ring.

[0072] The system constructs a file access track ring based on the target file information currently accessed by the user, and the breakpoint in the file access track ring is the target file. Specifically, the system first obtains the file identifier, access timestamp and file type information of the target file currently accessed by the user. The file identifier can be a file name, file path, or other information that uniquely identifies the file. The access timestamp records the specific time point when the user accesses the file. The file type information indicates the format of the file, such as text file, image file, video file, etc. In addition to this basic information, the system can also obtain other metadata of the file, such as file size, creation time, modification time, etc., to enrich the information dimension of the file access track.

[0073] After obtaining the target file information, the system constructs the user's historical access sequence in the order of access timestamps. The historical access sequence reflects the time sequence of user access to files, which can reflect the user's file usage habits and patterns. In order to form a closed-loop file access trajectory, the system connects the user's historical access sequence end to end to form a circular sequence. In this way, when analyzing file relevance, the periodicity and continuity in the time dimension can be taken into account. Finally, the system locates the position of the target file in the circular sequence and sets the position as the breakpoint of the file access trajectory loop, thereby obtaining a complete file access trajectory loop.

[0074] When constructing a file access trace ring, the system can use a variety of specific technologies. For example, a linked list or array can be used to store the user's historical access sequence, and then the beginning and the end can be connected by adjusting the pointer or subscript. In addition, the system can also use a hash table to quickly locate the position of the target file in the ring sequence to improve the efficiency of breakpoint setting. At the same time, the system can set a time window and only consider historical access records within a certain time range to reduce the complexity of data processing.

[0075] In the process of constructing the file access trace ring, there may be problems with historical access records being too sparse or concentrated, resulting in insufficient representation of the trace ring. To solve this problem, the system can introduce data smoothing or sampling technology. Specifically, for files with low access frequency, the system can increase their number of appearances in the trace ring by interpolation; for files with high access frequency, the system can reduce their number of appearances by downsampling. Through these technical processing, a more balanced and complete file access trace ring can be obtained, providing a more reliable basis for subsequent associated file extraction.

[0076] S102, bidirectionally extending a preset time window along the breakpoint on the file access track ring;

[0077] After building the file access trace loop, the system bidirectionally expands the preset time window along the breakpoints on the trace loop. The preset time window means that the target file's access time is taken as the center and a certain time span is extended in both the forward and backward directions. The size of the time window can be set according to the actual application scenario and system resource conditions. By bidirectionally expanding the time window, historical access files related to the target file can be found before and after the target file, providing a candidate range for subsequent associated file extraction.

[0078] There are many ways to set a preset time window. A simple way is to directly specify a fixed time interval, such as extending it by 5 minutes before and after. Another more flexible way is to dynamically adjust the size of the time window according to the frequency and interval of file access. For example, for files with high access frequency, the time window can be set smaller; for files with low access frequency, the time window can be set larger. This can take into account both the timeliness and coverage of the associated files.

[0079] When bidirectionally extending the time window, the boundary of the time window may exceed the range of the file access track ring. To solve this problem, the system can adopt a cyclic expansion method. Specifically, when the right boundary of the time window exceeds the end of the track ring, it can continue to expand from the starting position of the track ring; when the left boundary of the time window exceeds the starting position of the track ring, it can continue to expand from the end position of the track ring. Through cyclic expansion, it can be ensured that the time window is always within the range of the file access track ring, and it also reflects the periodic characteristics of file access.

[0080] S103, extracting historical access files within a preset time window as a first associated file set;

[0081] After obtaining the preset time window, the system extracts the historical access files in the window as the first associated file set. The first associated file set includes a group of files that are adjacent to the target file in time. These files may have a certain association relationship with the target file, such as belonging to the same task or being functionally dependent on each other.

[0082] The specific implementation of extracting the first associated file set can use the position information on the file access track ring. The system can perform sequence slicing on the track ring according to the boundary position of the preset time window and extract the files falling within the boundary. In order to improve the extraction efficiency, the system can pre-sort and index the files on the track ring according to the access time, so that the corresponding files can be quickly located and extracted in a given time window.

[0083] When extracting the first associated file set, there may be a problem of too many or too few files in the set. Too many files will increase the subsequent computing overhead, and too few files may affect the coverage of the associated files. In order to solve this problem, the system can appropriately filter and expand the first associated file set. For example, you can set an upper and lower limit on the number of files. When the number of files in the set exceeds the upper limit, they are eliminated from the nearest to the farthest time distance from the target file; when the number of files in the set is lower than the lower limit, the range of the time window can be expanded until the number of files in the set meets the requirement. Through these processes, a first associated file set with a moderate size and a high degree of association with the target file can be obtained.

[0084] S104, calculating the access time difference of each historically accessed file in the first associated file set;

[0085] After obtaining the first associated file set, the system calculates the access time difference between each historically accessed file in the set and the target file. The access time difference represents the time interval between the access time points of two files, and can be used to measure the temporal correlation between files. The smaller the access time difference, the stronger the temporal correlation between the two files, and the greater the possibility that they are accessed in the same task or session.

[0086] The specific method for calculating the access time difference can be implemented based on the timestamp information in the file access track ring. For each historically accessed file in the first associated file set, the system first extracts its access timestamp, and then calculates the difference with the access timestamp of the target file to obtain the corresponding access time difference. In order to facilitate subsequent processing, the system can convert the access time difference into a specific time unit, such as seconds, minutes or hours.

[0087] In actual applications, the time distribution of file access may be uneven, and the access frequency in some time periods may be significantly higher than that in other time periods. In order to eliminate the impact of this unbalanced time distribution, the system can normalize the access time difference. Specifically, the mean and standard deviation of the access time differences of all files in the first associated file set can be calculated, and then the access time difference of each file can be z-score standardized, that is, the mean value is subtracted and then divided by the standard deviation. After normalization, the numerical distribution of the access time difference will be more stable, which is helpful for subsequent threshold comparison and cluster analysis.

[0088] S105, dividing the historical access files whose access time difference is less than a first preset threshold into the same association cluster, obtaining a plurality of association clusters, and using the plurality of association clusters as a second association file set;

[0089] After obtaining the access time difference of each file in the first associated file set, the system clusters the files according to the preset time difference threshold to obtain several associated clusters, and uses these associated clusters as the second associated file set. Specifically, the system divides the historical access files whose access time difference is less than the first preset threshold into the same associated cluster. The first preset threshold represents the critical value of the temporal correlation between files. When the access time difference is less than the threshold, it can be considered that the two files are highly correlated in time and may belong to the same task or session. Through the clustering operation, the system can organize files with high temporal correlation to form several associated clusters. These associated clusters constitute the second associated file set, and the temporal correlation of files in each associated cluster is stronger than that of files in different clusters.

[0090] The specific implementation of file clustering can adopt a variety of classic clustering algorithms, such as k-means, DBSCAN, hierarchical clustering, etc. Taking the k-means algorithm as an example, the system can first randomly select k files as the initial cluster centers, and then calculate the access time difference between each file and each cluster center, and divide the file into the cluster where the cluster center with the smallest time difference is located. Then, the system recalculates the average access time of the files in each cluster as the new cluster center, and repeats the above division process until the clustering results converge.

[0091] When performing file clustering, the access time difference of some files may be near the critical value, resulting in uncertainty in their cluster affiliation. In order to solve this ambiguity, the system can introduce the idea of ​​soft clustering. Unlike hard clustering, soft clustering allows a file to belong to multiple clusters at the same time with different memberships. Specifically, the system can use a membership vector to represent the degree of association between the file and each cluster, and the membership value is between 0 and 1. The higher the membership, the stronger the association between the file and the cluster. When dividing files, the system no longer divides the file uniquely into a certain cluster, but divides the file's access information into multiple clusters in proportion according to the size of the membership. The use of soft clustering technology can better handle the fuzzy situation where the access time difference is near the critical value, and improve the rationality and accuracy of clustering.

[0092] S106, performing cyclic shift on each associated cluster in the second associated file set to obtain a shifted associated cluster;

[0093] The system performs cyclic shifting on each associated cluster in the second associated file set to obtain a shifted associated cluster, specifically including: counting the number of files in each associated cluster in the second associated file set;

[0094] The associated cluster with the largest number of files is taken as the benchmark cluster;

[0095] Calculate the difference in the number of files between other associated clusters except the benchmark cluster and the benchmark cluster;

[0096] According to the difference in the number of files, other associated clusters are filled cyclically until the number of files in all other associated clusters is the same as that in the benchmark cluster;

[0097] Based on the position of the target file in the benchmark cluster, the file sequences in other associated clusters are circularly shifted to align the files in the corresponding positions of the target file in each associated cluster.

[0098] After obtaining the second associated file set, the system performs a circular shift on the file sequences in each associated cluster so that the files between different clusters are aligned in position, and a shifted associated cluster is obtained. The specific operation steps are as follows: First, the system counts the number of files in each associated cluster in the second associated file set, finds the associated cluster with the largest number of files, and uses it as the benchmark cluster. Then, the system calculates the difference in the number of files between other associated clusters and the benchmark cluster, that is, the number of files missing from each cluster compared with the benchmark cluster. Next, the system performs a circular filling on other associated clusters according to the difference in the number of files. For each non-benchmark cluster, the system starts from the starting position of the cluster and copies the original files in sequence until the number of filled files reaches the same as the benchmark cluster. Through circular filling, the system can fill the number of files in all associated clusters to be equal to that of the benchmark cluster. Finally, the system uses the position of the target file in the benchmark cluster as a reference, and performs a circular shift on the file sequences in other associated clusters so that the files in each cluster corresponding to the target file are aligned together. After the circular shift, the file sequences between different associated clusters are aligned in position, forming a shifted associated cluster.

[0099] When implementing the circular shift of associated clusters, the system can use modular operations to simplify the calculation process. For example, for a cluster of length n, if it needs to be circularly shifted right by k positions, the original subscript i of each file in the cluster can be replaced with (i+k) mod n, that is, when the sum of the subscripts exceeds n, the count starts again from 0. Through modular operations, the shifted file subscripts can be quickly obtained without the need to perform actual element movement operations. Similarly, when performing circular filling, modular operations can also be used to determine the starting position and termination conditions of the filling.

[0100] When performing cyclic displacement of associated clusters, there may be a problem that the base cluster and other clusters have large differences in file types and attributes, resulting in a lack of semantic consistency in the file sequence after displacement. In order to solve this problem, the system can consider not only the number of files, but also the types and attribute distribution of files in the cluster when selecting the base cluster. Specifically, the system can count the file types and attributes in each associated cluster, calculate the frequency of occurrence of each type and attribute, and obtain the characteristic distribution vector of the cluster. Then, the system calculates the similarity between the characteristic distribution vector of each cluster and the characteristic distribution vector of the cluster where the target file is located, and selects the cluster with the highest similarity as the base cluster. In this way, it can ensure that the base cluster and the target file have a high consistency in file type and attributes, thereby improving the semantic coherence of the file sequence after displacement. At the same time, when performing cyclic filling, the system can also give priority to copying files with similar types and attributes to the target file, further strengthening the relevance of files in the displacement associated cluster.

[0101] S107, extracting files in the displacement association cluster that are located at the same position as the target file as a third associated file set;

[0102] After obtaining the displacement association clusters, the system extracts the files in each association cluster that are in the same position as the target file to form a third association file set. Since the files in different association clusters have been aligned in position after the cyclic displacement operation, the files in the same position also have a high semantic correlation. The third association file set can be regarded as a set of the nearest neighbor files of the target file in different association clusters. These files have a higher correlation with the target file and are more likely to be accessed in the same task or session.

[0103] The specific implementation of extracting the third associated file set can use simple subscript matching. The system first determines the subscript position of the target file in the base cluster, then finds the file with the same subscript position in each displacement associated cluster, extracts it, and adds it to the third associated file set. This process can be completed by traversing the displacement associated cluster once, and the time complexity is O(n), where n is the total number of files in the displacement associated cluster.

[0104] S108, determining the files in the third associated file set whose number of occurrences in the associated cluster is greater than a second preset threshold as pre-fetched files;

[0105] After obtaining the third associated file set, the system determines the pre-fetched file based on the number of times the file appears in the associated cluster. Specifically, for each file in the third associated file set, the system counts the number of times it appears in all associated clusters. If the number of appearances is greater than the second preset threshold, the file is determined as a pre-fetched file. The second preset threshold represents the minimum frequency requirement for a file to appear in an associated cluster. When a file appears repeatedly in multiple associated clusters, it means that it has a very high correlation with the target file and the probability of accessing the file is also very high. Therefore, it can be used as a pre-fetched file and loaded into the edge server in advance.

[0106] The specific implementation of calculating the number of file occurrences can use data structures such as hash tables or dictionaries. The system first traverses all files in the third associated file set, removes duplicates from each file, and obtains a set of different files. Then, the system traverses the third associated file set again, counts each file in the hash table, and counts the number of times it appears. Finally, the system traverses each file in the hash table, extracts files whose number of occurrences is greater than the second preset threshold, and forms a pre-fetched file set.

[0107] When determining the pre-fetched files, the system can dynamically adjust the size of the second preset threshold according to the actual application scenario and resource constraints. When the edge server has sufficient storage and bandwidth resources, the threshold can be appropriately lowered to expand the range of pre-fetched files; conversely, when resources are tight, the threshold can be increased to reduce the number of pre-fetched files. In addition, the system can also prioritize the pre-fetched files by comprehensively considering factors such as file size, type, and access frequency, and give priority to pre-fetching smaller, more important, and more frequently accessed files, thereby maximizing the benefits of pre-fetching under limited resources.

[0108] S109, setting a circular cache queue in the edge server, and determining a prefetch position of the prefetch file in the circular cache queue according to the position information of the prefetch file in the associated cluster;

[0109] After determining the pre-fetched files, the system sets up a circular cache queue in the edge server to store the pre-fetched files. The circular cache queue is a cyclic cache structure. When the space at the end of the queue is full, it will automatically return to the head of the queue for overwriting. Compared with ordinary linear queues, circular queues can realize the recycling of cache space and avoid frequent data movement and memory allocation. At the same time, the system also determines the pre-fetch position in the circular cache queue based on the location information of the pre-fetched file in the associated cluster. The pre-fetch position reflects the relative order of the file in the associated cluster and can be used to guide the storage layout and access optimization of the file in the cache queue.

[0110] The specific way to implement a circular cache queue can be based on an array or a linked list. Taking an array as an example, the system can pre-allocate an array of a fixed size as cache space, and use two pointers, head and tail, to point to the head and tail of the queue respectively. When a new prefetched file needs to be inserted, the system stores the file at the location pointed to by the tail pointer and moves the tail pointer backward by one position; if the tail pointer has reached the end of the array, it is reset to the starting position of the array. When a file in the cache queue needs to be accessed, the system can calculate its actual storage position in the array based on the prefetch position of the file, and then directly read the file content at that position.

[0111] When determining the prefetch position of a prefetch file in the cache queue, the system can refer to the position information of the file in the associated cluster. For example, if a prefetch file is at an earlier position in multiple associated clusters, it means that it has a higher time correlation with the target file, so it can be placed at an earlier position in the cache queue; conversely, if a prefetch file is at a later position in the associated cluster, it can be placed at a later position in the cache queue. Through this reasonable arrangement of prefetch positions, the system can make files with a high correlation with the target file be accessed earlier in the cache queue, thereby improving the cache hit rate and access efficiency.

[0112] S110, when the space of the circular cache queue is less than a preset value, retain the pre-fetched file corresponding to the preset interval of the circular cache queue, and obtain the final pre-fetched file;

[0113] Before storing the prefetched files in the circular cache queue, the system also needs to check and adjust the space of the cache queue. When the remaining space of the cache queue is less than a preset threshold, the system needs to filter the prefetched files in the queue, retaining only those files whose prefetched positions are within a preset interval, and remove other files from the queue to make room for storage space for new prefetched files. This preset interval is usually a continuous range centered on the prefetched position of the target file, representing a batch of prefetched files with the highest correlation with the target file. Through this selective retention mechanism, the system can prioritize caching of prefetched files with the highest correlation with the target file when cache space is insufficient, thereby improving cache accuracy and hit rate.

[0114] In specific implementation, the system can calculate the size of the remaining space in the queue before adding a pre-fetched file to the cache queue each time. If the remaining space is less than the preset threshold, the cache file screening process is triggered. The system first determines the pre-fetch position of the target file in the cache queue, and then calculates the starting and ending positions of the interval based on the size of the preset interval. Next, the system traverses all the files in the cache queue, and for each file, determines whether its pre-fetch position is within the preset interval; if so, the file is retained in the queue and moved to the end of the queue for subsequent sequential access; if not, the file is removed from the queue to release the storage space it occupies. After this round of screening, only files whose pre-fetch positions are within the preset interval are left in the cache queue. These files have the highest correlation with the target file and are most likely to be used in subsequent accesses.

[0115] S111. When it is detected that a user accesses a target file, the final pre-fetched file is loaded from the cloud storage server to the edge server.

[0116] After completing the selection of pre-fetched files and the construction of the cache queue, the system enters the actual file pre-fetching and loading stage. When the system detects that the user is accessing the target file, it immediately triggers the loading process of the pre-fetched file. Specifically, the system pulls the pre-fetched files in the circular cache queue from the cloud storage server and stores them in the local cache of the edge server. Since the pre-fetched files have been sorted and filtered in the cache queue according to their relevance to the target file, the system can load them in the order of the files in the queue, giving priority to those files with the highest relevance and the most likely to be accessed. This pre-fetching and loading method can significantly improve the response speed of file access and reduce the user's waiting time.

[0117] In the above embodiment, the user's historical file access sequence is constructed into a ring structure and breakpoints are set. Combined with the expansion method of the bidirectional time window, the access correlation before and after the target file can be considered at the same time. The method of dividing the associated clusters based on the time difference threshold is to classify the files with similar access time into the same cluster, and the temporal characteristics of file access are retained. The associated clusters are cyclically shifted and aligned, so that files with similar access patterns in different associated clusters can be matched accordingly. By extracting files with the same position and screening based on the number of occurrences, pre-fetched files with stable access correlation with the target file are obtained. A ring cache queue is used to store pre-fetched files, and the pre-fetch position is determined according to the position information in the associated cluster. When the space is limited, the files in the preset interval are preferentially retained. This pre-fetching strategy not only considers the temporal correlation of file access, but also takes into account the efficient use of storage space, thereby improving the cache hit rate of the edge server, reducing the frequency of user access to the cloud storage server, reducing data access delay, solving the problem of reduced cache hit rate of associated files, and improving the speed of cloud storage acceleration.

[0118] In order to further improve the efficiency and resource utilization of the above pre-fetching strategy, the embodiment of the present application also provides a method for dynamically adjusting pre-fetched files based on activity. The method analyzes the historical access patterns of pre-fetched files, calculates the activity coefficient of the files, and promptly cleans up pre-fetched files with low activity, thereby optimizing the storage space usage of the edge server. Figure 2 , a method for dynamically adjusting pre-fetched files based on activity in an embodiment of the present application is described:

[0119] See also Figure 2 , which is a flow chart of a method for dynamically adjusting pre-fetched files based on activity in an embodiment of the present application.

[0120] S201, counting a set of historical access time points of pre-fetched files;

[0121] The system counts the historical access time points of the pre-fetched files, that is, it records the specific times when the file was accessed in the past period of time. The historical access time point set can reflect the access pattern and frequency of the pre-fetched files, and is an important basis for the subsequent calculation of file activity. The system can use a variety of methods to obtain and store historical access time points, such as automatically recording timestamps each time a user accesses a pre-fetched file, or periodically scanning the file's metadata information to extract the access time. The time granularity in the historical access time point set can be set according to actual needs, which can be a time point accurate to the second level, or a coarser-grained time period at the hour or day level.

[0122] When storing historical access time points, the system can use data structures such as arrays, linked lists, and hash tables to organize and manage time point data. For example, a fixed-length array can be used to store access time points in the recent period of time, and when the array is full, it will be looped to cover the earliest time point; or a dynamically growing linked list can be used to store all historical access time points, and when the linked list is too long, it can be appropriately truncated or archived. In order to facilitate subsequent searches and statistics, the system can also sort or index historical access time points so that time point data can be accessed and processed more efficiently.

[0123] S202, calculating the time intervals between adjacent access time points according to the historical access time point set, and obtaining an access interval sequence of the pre-fetched file;

[0124] After obtaining the set of historical access time points of the pre-fetched files, the system needs to further calculate the time intervals between adjacent access time points to obtain the access interval sequence of the pre-fetched files. The access interval represents the time span between two consecutive accesses to the same file by the user, which directly reflects the access frequency and regularity of the file. The smaller the access interval, the more frequently the file is accessed; conversely, the larger the access interval, the more sparsely the file is accessed. By calculating the access interval sequence, the system can grasp the access characteristics of the pre-fetched files on different time scales, providing an important basis for subsequent activity calculations.

[0125] The specific implementation of calculating the access interval sequence can be based on the timestamp data in the set of historical access time points. The system first sorts the access time points to ensure that they are arranged in order from early to late. Then, the system traverses the sorted time point sequence, and for each time point, calculates the difference between it and the previous time point, that is, the corresponding access interval is obtained. This process can be implemented with a simple loop with a time complexity of O(n), where n is the number of historical access time points. When calculating the access interval, the system can also select different time units according to actual needs, such as seconds, minutes, hours, days, etc., so as to obtain access interval sequences of different granularities.

[0126] S203, calculating the activity coefficient of the pre-fetched file according to the access interval sequence;

[0127] The system calculates the activity coefficient of the prefetched file based on the access interval sequence, including:

[0128] Obtaining the time interval for accessing the pre-fetched file a preset number of times, and calculating the mean and standard deviation of the time interval;

[0129] Calculate volatility based on mean and standard deviation;

[0130] The ratio of volatility to time interval is taken as the activity coefficient.

[0131] After obtaining the access interval sequence of the pre-fetched file, the system needs to further calculate the activity coefficient of the file based on the access interval. The activity coefficient is a comprehensive indicator used to quantify the access popularity and timeliness of the file. It comprehensively considers the access frequency, access pattern and current access interval of the file, and can reflect the possibility and urgency of the file being accessed in the near future. The higher the activity coefficient, the more likely the file will be accessed again in the near future; conversely, the lower the activity coefficient, the file has not been accessed for a long time, and the less meaningful it is to cache. By calculating the activity coefficient, the system can dynamically evaluate the timeliness of the pre-fetched files and provide a basis for cache optimization.

[0132] Specifically, the system first obtains the time intervals of the most recent accesses to the pre-fetched file (the number can be set to a preset number, such as the most recent 5 accesses), and calculates the mean and standard deviation of these intervals. The mean reflects the average level of the file access interval, and the standard deviation reflects the degree of fluctuation of the access interval. Then, the system calculates the volatility of the access interval based on the mean and standard deviation, that is, the ratio of the standard deviation to the mean. The larger the volatility, the more irregular the file access interval changes; conversely, the smaller the volatility, the relatively stable the file access interval. Finally, the system uses the ratio of volatility to the current access interval as the file activity coefficient. The calculation formula for the activity coefficient can be expressed as: activity coefficient = volatility / current access interval. This formula combines the volatility of the access interval and the current interval size, and can better reflect the activity of the file.

[0133] S204, when the activity coefficient is less than a third preset threshold, removing the corresponding pre-fetch file from the ring cache queue;

[0134] Based on the activity coefficient of the pre-fetched file, the system can determine the retention value of the file in the cache queue. When the activity coefficient of a file is lower than a preset threshold (i.e., the third preset threshold), it means that the file has not been accessed for a long time, and it is not meaningful to continue caching it in the queue. Therefore, the system can consider removing it from the cache queue to free up storage space. By cleaning up inactive pre-fetched files in a timely manner, the system can optimize the storage efficiency of the cache queue and avoid unnecessary waste of space. At the same time, this also provides caching opportunities for new files that are more likely to be accessed, thereby improving the overall hit rate of the cache.

[0135] When implementing cache file cleaning, the system can adopt multiple strategies. A simple strategy is to periodically scan all files in the cache queue, calculate their activity coefficients, and directly delete files whose activity coefficients are lower than the threshold. This strategy is simple to implement, but may cause a large number of holes in the cache queue, affecting the continuity of storage. Another more efficient strategy is to use lazy deletion. Specifically, the system calculates the activity coefficient of the cache file in real time each time the cache file is accessed. If the activity coefficient is lower than the threshold, the file is logically deleted from the cache queue, but its storage space is not immediately released. These logically deleted files form a hole queue. When the length of the hole queue exceeds a certain proportion, the system triggers another physical deletion operation to actually delete all files in the hole queue from the storage, and compress the cache queue to ensure its storage continuity. Through lazy deletion, the system can reduce the frequency of cache file deletion and avoid a large number of storage space fragmentation problems.

[0136] S205: Add the remaining storage space after removing the pre-fetched files to the available space queue.

[0137] When the system removes inactive pre-fetched files from the cache queue based on the activity coefficient, the corresponding storage space is released. In order to effectively utilize the released space, the system can put them into an available space queue for management. The available space queue records all free locations in the cache queue that can be used to store new files, which provides space guarantee for subsequent cache file writing. At the same time, by centrally managing available space, the system can allocate storage resources more flexibly and efficiently, reducing space fragmentation problems.

[0138] When implementing the free space queue, the system can use a variety of data structures, such as arrays, linked lists, stacks, etc. Taking the linked list as an example, the system can create a node for each free position to record the starting address and length of the position. When new storage space is released, the system inserts a new node at the head of the linked list; when storage space needs to be allocated for a new file, the system takes a node from the head of the linked list and allocates its corresponding storage space to the file. In this way, the system can maintain a dynamically updated free space queue to ensure efficient use of storage space. In addition, the system can also merge and split the free space queue, merge adjacent free positions into a larger continuous space, or split a large free position into multiple small spaces, so as to meet the storage requirements of files of different sizes.

[0139] In the above embodiment, the historical access time points of the pre-fetched files are counted and the access interval sequence is calculated. Combined with the calculation method of the activity coefficient, the actual use value of the pre-fetched files can be quantitatively evaluated. When the activity coefficient is lower than the threshold, the corresponding file is promptly removed from the cache queue and the storage space is recovered to the available queue. This dynamic adjustment mechanism based on activity solves the problem of low-value files occupying cache space for a long time. The system realizes dynamic optimization of cache space by continuously monitoring the access status of pre-fetched files and clearing them in time, improves the utilization efficiency of edge server storage resources, and ensures that high-value files always occupy priority cache positions, thereby maintaining a high cache hit rate.

[0140] Further, in another embodiment, before removing the corresponding pre-fetch file from the ring buffer queue when the activity coefficient is less than the third preset threshold, the method further includes:

[0141] Record the access position information of the pre-fetched file, and obtain a set of files having the same access position as the pre-fetched file;

[0142] Calculate the access frequency of each file in the file collection;

[0143] Determine the file priority based on the access frequency. The file priority includes high priority, medium priority and low priority. Specifically, it includes:

[0144] A first priority threshold, a second priority threshold, and a third priority threshold are set based on the access frequency, wherein the first priority threshold is greater than the second priority threshold, and the second priority threshold is greater than the third priority threshold;

[0145] Classify files with access frequency higher than the first priority threshold as high priority, files with access frequency higher than the second priority threshold but not higher than the first priority threshold as medium priority, and files with access frequency higher than the third priority threshold but not higher than the second priority threshold as low priority;

[0146] Mark high-priority files as retained.

[0147] In this embodiment, before removing pre-fetched files with low activity coefficients from the circular cache queue, the system also introduces a file priority division mechanism based on access location and access frequency to identify and retain key files that have low activity coefficients but high access frequencies.

[0148] Specifically, the system first records the location information of each prefetched file in the access sequence, and then finds all files with the same access location as the current prefetched file based on the location information to form a file set. This file set represents files that appear at the same location in different access sequences, and they usually have similar semantic attributes and access rules.

[0149] Next, the system calculates the access frequency of each file in the file collection. The access frequency reflects the number and density of the file in the historical access sequence, and is a key indicator for measuring the importance and popularity of the file. The system can update the access frequency of each file in real time by maintaining an access counter or access timestamp list.

[0150] After obtaining the access frequency of the file, the system further divides the file into three levels: high priority, medium priority and low priority according to the preset thresholds. Specifically, the system pre-sets three priority thresholds: the first priority threshold, the second priority threshold and the third priority threshold, and the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold. Files with access frequencies higher than the first priority threshold are classified into the high priority group, files with access frequencies between the first and second thresholds are classified into the medium priority group, and files with access frequencies between the second and third thresholds are classified into the low priority group. By setting multiple levels of priority thresholds, the system can more finely characterize the importance of files and achieve more fine-grained file classification.

[0151] Finally, the system marks the files in the high-priority group as retained files. Although these retained files may be temporarily inactive, they are likely to be frequently accessed again in the future due to their high access frequency in historical access. Keeping them in the cache queue can prevent important files from being removed prematurely and improve the long-term cache hit rate.

[0152] In the above embodiment, the access location information of the pre-fetched files is recorded and a set of files with the same access location is obtained, so that the system can identify a group of files with similar location characteristics in the access sequence. The calculation and analysis of the access frequency of each file in the file set reflects the probability distribution of different files being accessed at the same location. The three-level priority system divided according to the access frequency realizes the quantitative classification of the importance of files. The mechanism of marking high-priority files as retained files ensures that the frequently accessed key files can be continuously retained in the cache. This file classification method based on location information and access frequency enables the system to retain the most valuable files with limited cache resources, thereby improving the cache hit rate and resource utilization efficiency.

[0153] The following describes the system in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , which is a schematic diagram of the physical device structure of a cloud storage acceleration system based on edge computing provided in an embodiment of the present application.

[0154] It should be noted that Figure 3 The structure of the system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0155] like Figure 3 As shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. Input / output (I / O) interface 305 is also connected to bus 304.

[0156] The following components are connected to the I / O interface 305: an input section 306 including a camera, an infrared sensor, etc.; an output section 307 including a liquid crystal display (LCD) and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0157] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, various functions defined in the present invention are performed.

[0158] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.

[0159] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Among them, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0160] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the system described in the above embodiment; or may exist independently without being assembled into the system. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of a system, the system implements the method provided in the above embodiment.

[0161] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0162] As used in the above embodiments, the term "when..." may be interpreted as "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted as "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0163] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product 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 device. 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, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center 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 hard disk), etc.

[0164] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A cloud storage acceleration method based on edge computing, characterized in that: include: Building a file access track ring based on the target file information currently accessed by the user, wherein the breakpoint in the file access track ring is the target file; Bidirectionally extending a preset time window along the breakpoint on the file access trajectory ring; Extracting historical access files within the preset time window as a first associated file set; In the first associated file set, calculating the access time difference of each historically accessed file; The historically accessed files whose access time differences are less than a first preset threshold are divided into the same associated cluster to obtain a plurality of associated clusters, and the plurality of associated clusters are used as a second associated file set; Circularly shifting each of the association clusters in the second association file set to obtain a shifted association cluster; Extracting files in the displacement association cluster having the same position as the target file as a third association file set; Determine as a pre-fetch file a file in which each file in the third associated file set appears in the associated cluster for a number of times greater than a second preset threshold; Setting a circular cache queue in the edge server, and determining a prefetch position of the prefetch file in the circular cache queue according to the position information of the prefetch file in the associated cluster; When the space of the circular buffer queue is less than a preset value, retain the pre-fetched file corresponding to the pre-fetched position located in the preset interval of the circular buffer queue to obtain a final pre-fetched file; When it is detected that the user accesses the target file, the final pre-fetched file is loaded from the cloud storage server to the edge server.

2. The method according to claim 1, characterized in that The step of constructing a file access trace ring based on the target file information currently accessed by the user specifically includes: Obtain the file identifier, access timestamp and file type information of the target file information currently accessed by the user; Constructing a user historical access sequence according to the chronological order of the access timestamps; Connect the user's historical access sequence end to end to form a circular sequence; The position of the target file is located in the ring sequence, and the position is set as a breakpoint of the file access track ring to obtain a file access track ring.

3. The method according to claim 1, characterized in that The cyclically shifting each of the associated clusters in the second associated file set to obtain a shifted associated cluster specifically includes: Counting the number of files in each of the associated clusters in the second associated file set; Taking the associated cluster with the largest number of files as a benchmark cluster; Calculate the difference in the number of files between the benchmark cluster and the other associated clusters except the benchmark cluster; Circularly filling the other associated clusters according to the difference in the number of files until the number of files in all other associated clusters is the same as the number of files in the reference cluster; Based on the position of the target file in the reference cluster, the file sequences in other associated clusters are cyclically shifted to align the files in the corresponding positions of the target file in each associated cluster.

4. The method according to claim 1, characterized in that: After the final pre-fetched file is loaded from the cloud storage server to the edge server when it is detected that the user accesses the target file, the method further includes: Counting a set of historical access time points of the pre-fetched files; Calculate the time intervals between adjacent access time points according to the historical access time point set to obtain an access interval sequence of the pre-fetched file; Calculating an activity coefficient of the pre-fetched file according to the access interval sequence; When the activity coefficient is less than a third preset threshold, removing the corresponding pre-fetch file from the ring cache queue; The remaining storage space after removing the prefetch files is added to the free space queue.

5. The method according to claim 4, characterized in that The calculating the activity coefficient of the prefetched file according to the access interval sequence specifically includes: Obtaining a time interval for accessing the pre-fetched file a preset number of times, and calculating a mean and a standard deviation of the time interval; calculating volatility based on the mean and the standard deviation; The ratio of the volatility to the time interval is taken as the activity coefficient.

6. The method according to claim 4, characterized in that Before removing the corresponding pre-fetch file from the ring cache queue when the activity coefficient is less than a third preset threshold, the method further includes: Recording the access position information of the pre-fetched file, and acquiring a set of files having the same access position as the pre-fetched file; Calculating the access frequency of each file in the file set; Determine a file priority according to the access frequency, wherein the file priority includes a high priority, a medium priority, and a low priority; The high-priority file is marked as a reserved file.

7. The method according to claim 6, characterized in that Determining the file priority according to the access frequency specifically includes: Setting a first priority threshold, a second priority threshold, and a third priority threshold based on the access frequency, wherein the first priority threshold is greater than the second priority threshold, and the second priority threshold is greater than the third priority threshold; Files with access frequency higher than the first priority threshold are classified as high priority, files with access frequency higher than the second priority threshold but not higher than the first priority threshold are classified as medium priority, and files with access frequency higher than the third priority threshold but not higher than the second priority threshold are classified as low priority.

8. A cloud storage acceleration system based on edge computing, characterized in that: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Distributed file system-oriented file prefetching / caching method and apparatus

    CN106446079A

  • Clustering-based self-adaptive cache method in mobile-edge-computing (MEC) network

    CN108549719A

Cited By

  • Cloud storage acceleration method and system based on edge computing

    CN122340119A