A file storage method, system, electronic device, storage medium and product

By predicting file request probabilities and storing files according to policies, the problem of smooth access when storage devices are handling large-scale streaming media files is solved, improving file access speed and storage device service capabilities. It is suitable for large-scale clusters, cloud data centers, or edge storage devices.

CN116185968BActive Publication Date: 2026-06-26BEIJING QIYI CENTURY SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING QIYI CENTURY SCI & TECH CO LTD
Filing Date
2023-02-09
Publication Date
2026-06-26

Smart Images

  • Figure CN116185968B_ABST
    Figure CN116185968B_ABST
Patent Text Reader

Abstract

The application provides a file storage method, system, electronic equipment, storage medium and product, and relates to the technical field of data storage.The method is as follows: obtaining file request conditions in a current time period and file recommendation information in a next time period; determining a plurality of to-be-requested files in the next time period and respective file request probabilities according to the file request conditions and the file recommendation information; determining respective file storage strategies of the plurality of to-be-requested files according to the respective file request probabilities of the plurality of to-be-requested files; and storing the plurality of to-be-requested files according to the respective file storage strategies of the plurality of to-be-requested files before the next time period comes. The application stores files in more suitable storage devices through the above method, realizes reading files from storage devices with high access speed as much as possible, makes file access smoother, guarantees the file access experience of users, and improves the service capability of storage devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage technology, and in particular to a file storage method, system, electronic device, storage medium, and product. Background Technology

[0002] With the development of the internet, the amount of file resources requiring storage is becoming increasingly abundant. Especially with the growing proportion of streaming media (such as short videos) on the internet, the size of individual streaming media files (such as high-definition video files) is also increasing. To ensure smooth access for internet users to these ever-growing resource files, the throughput capacity of various storage devices (such as hard disk drives, solid-state drives, and memory) needs to be continuously improved, and the requirements for the response speed and service capabilities of edge caching devices closest to users are also constantly increasing. In addition, while improving the service capabilities of various storage devices, it is also necessary to ensure that storage resource costs are kept under control.

[0003] Therefore, it is necessary to develop a file storage method, system, electronic device, storage medium, and product that can improve the overall service capabilities of various storage devices and ensure smooth file access for users while retaining existing storage architecture and capacity. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention provide a file storage method, system, electronic device, storage medium and product to overcome or at least partially solve the above problems.

[0005] A first aspect of the present invention provides a file storage method, comprising:

[0006] Get the file request status within the current time period, and the file recommendation information for the next time period;

[0007] Based on the file request information and the file recommendation information, determine multiple files to be requested in the next time period, as well as the file request probability of each of the multiple files to be requested;

[0008] Based on the file request probability of each of the multiple files to be requested, determine the file storage strategy for each of the multiple files to be requested;

[0009] Before the next time period arrives, the multiple requested files are stored according to their respective file storage strategies.

[0010] Optionally, based on the file request probability of each of the plurality of files to be requested, a file storage strategy for each of the plurality of files to be requested is determined, including:

[0011] Obtain storage device information, which includes information on the types of available storage devices and storage status information for each storage device. The storage status information includes at least: the storage capacity of the storage device, the stored file information, the remaining storage space size, and the file read speed.

[0012] Based on the file request probabilities of each of the multiple files to be requested and the storage device information, the storage device matching each of the multiple files to be requested is determined; the storage devices are arranged in descending order of file read speed, such that, among any two storage devices, the probability of the file request of the file to be requested matched by the storage device with the higher file read speed is higher than the probability of the file request of the file to be requested matched by the storage device with the lower file read speed.

[0013] Optionally, based on the file request information and the file recommendation information, determine multiple files to be requested in the next time period, and the file request probability of each of the multiple files to be requested, including:

[0014] Based on the file request information and the file recommendation information, multiple files to be requested in the next time period are determined; the file request information indicates the number of times a file has been requested in the current time period, and the file recommendation information indicates the file information to be pushed in the next time period.

[0015] Determine the semantic relationship between multiple files to be requested in the next time period and multiple files already requested in the current time period;

[0016] Based on the semantic relationships, the file request probability of each of the multiple files to be requested is determined.

[0017] Optionally, the plurality of requested files are stored according to their respective file storage strategies, including:

[0018] Before the next time period arrives, the multiple requested files are stored according to their respective file storage strategies.

[0019] Optionally, if the plurality of requested files are all local files stored on any of the plurality of storage devices, the plurality of requested files are stored according to their respective file storage strategies, including:

[0020] According to the respective file storage strategies of the multiple requested files, control the multiple storage devices to perform local file migration according to the following steps:

[0021] Control the plurality of storage devices to migrate files whose file request probability is between a first threshold and a second threshold to the first storage device, wherein the first storage device is the storage device with the slowest file reading speed among the plurality of storage devices, and the first threshold is higher than the second threshold;

[0022] Control the multiple storage devices to delete files that have a file request probability lower than the second threshold.

[0023] Based on the remaining storage space of each storage device other than the first storage device, at least a portion of the requested files in the first storage device are migrated to the respective other storage devices.

[0024] Optionally, each of the other storage devices includes at least a second storage device and a third storage device, wherein the file read speed of the third storage device is higher than that of the second storage device; based on the remaining storage space of each of the storage devices other than the first storage device, at least a portion of the requested files in the first storage device are migrated to each of the other storage devices, including:

[0025] Based on the remaining storage space of the third storage device, the first storage device is controlled to migrate the multiple request files with the highest request probability among the various request files stored therein to the third storage device;

[0026] After completing the file migration to the third storage device, based on the remaining storage space of the second storage device, the first storage device is controlled to migrate the multiple request files with the highest request probability from the remaining request files stored therein to the second storage device.

[0027] Optionally, if there are non-local files in the plurality of requested files that are not stored on any of the plurality of storage devices, a file storage strategy for each of the plurality of requested files is determined based on the file request probability of each of the plurality of requested files, including:

[0028] The file storage strategy for the non-local file is determined based on the relationship between the file request probability of the non-local file and the first threshold and / or the second threshold.

[0029] Also includes:

[0030] Download and store the non-local file according to the file storage strategy for the non-local file.

[0031] Optionally, retrieve file request information within the current time period, including:

[0032] Data on file requests from multiple terminals within the current time period is obtained, and the file request situation within the current time period is obtained by statistical analysis.

[0033] The second aspect of this embodiment provides a file storage system, which includes a request data platform, a file intelligent distribution module, and a storage terminal;

[0034] The data request platform is used to obtain the file request status sent by the storage terminal within the current time period, and to obtain the file recommendation information for the next time period sent by the third-party file recommendation system; and to send the file request status and the file recommendation information to the file intelligent distribution module.

[0035] The intelligent file distribution module is used to determine multiple files to be requested in the next time period and the file request probability of each of the multiple files to be requested based on the file request status and the file recommendation information; and to determine the file storage strategy of each of the multiple files to be requested based on the file request probability of each of the multiple files to be requested; and to send the file storage strategy to the storage terminal.

[0036] The storage terminal is used to store the multiple requested files according to their respective file storage strategies before the next time period arrives.

[0037] The third aspect of this embodiment provides a file storage device, including:

[0038] The acquisition module is used to acquire file request information within the current time period and file recommendation information for the next time period.

[0039] The probability determination module is used to determine, based on the file request status and the file recommendation information, multiple files to be requested in the next time period, and the file request probability of each of the multiple files to be requested.

[0040] The storage strategy determination module is used to determine the file storage strategy for each of the multiple files to be requested based on the file request probability of each file.

[0041] The storage module is used to store the multiple requested files according to their respective file storage strategies before the next time period arrives.

[0042] Optionally, the storage policy determination module includes:

[0043] The first storage strategy determination submodule is used to obtain storage device information, which includes information on the types of available storage devices and storage status information for each storage device. The storage status information includes at least: the storage capacity of the storage device, the stored file information, the remaining storage space size, and the file read speed.

[0044] The second storage strategy determination submodule is used to determine the storage device that matches each of the plurality of files to be requested based on the file request probability of each of the plurality of files to be requested and the storage device information; and to arrange the storage devices in descending order of file read speed, such that, among any two storage devices, the probability of the file request of the file to be requested matched by the storage device with the higher file read speed is higher than the probability of the file request of the file to be requested matched by the storage device with the lower file read speed.

[0045] Optionally, the probability determination module includes:

[0046] The first probability determination submodule is used to determine multiple files to be requested in the next time period based on the file request status and the file recommendation information; the file request status indicates the number of times a file is requested in the current time period, and the file recommendation information indicates the file information to be pushed in the next time period.

[0047] The second probability determination submodule is used to determine the semantic relationship between multiple files to be requested in the next time period and multiple files already requested in the current time period;

[0048] The third probability determination submodule is used to determine the file request probability of each of the plurality of files to be requested based on the semantic relationship.

[0049] Optionally, the storage module includes:

[0050] The first storage submodule is used to store the multiple requested files according to their respective file storage strategies before the next time period arrives.

[0051] Optionally, if the plurality of requested files are all local files stored on any of the plurality of storage devices, the storage module further includes:

[0052] A migration submodule is used to control the multiple storage devices to perform local file migration according to the respective file storage strategies of the multiple requested files, following the steps outlined below. The migration submodule includes:

[0053] The first migration unit is used to control the plurality of storage devices to migrate files to be requested that have a file request probability between a first threshold and a second threshold to the first storage device. The first storage device is the storage device with the slowest file reading speed among the plurality of storage devices, and the first threshold is higher than the second threshold.

[0054] The second migration unit is used to control the plurality of storage devices to delete the requested files whose file request probability is lower than the second threshold.

[0055] The third migration unit is used to migrate at least a portion of the requested files in the first storage device to the respective other storage devices according to the remaining storage space size of each storage device other than the first storage device.

[0056] Optionally, the other storage devices include at least a second storage device and a third storage device, wherein the file read speed of the third storage device is higher than that of the second storage device; the third migration unit includes:

[0057] The first migration subunit is used to control the first storage device to migrate the multiple request files with the highest request probability among the various request files stored in the third storage device to the third storage device according to the remaining storage space of the third storage device;

[0058] The second migration subunit is used to control the first storage device to migrate the multiple request files with the highest request probability from the remaining request files stored in the second storage device to the second storage device, based on the remaining storage space of the second storage device.

[0059] Optionally, if there are non-local files in the plurality of request files that are not stored in any of the plurality of storage devices, the storage policy determination module includes:

[0060] The third storage strategy submodule is used to determine the file storage strategy for the non-local file based on the relationship between the file request probability of the non-local file and the first threshold and / or the second threshold.

[0061] Also includes:

[0062] The download submodule is used to download and store the non-local file according to the file storage strategy of the non-local file.

[0063] Optionally, the acquisition module includes:

[0064] The statistics submodule is used to obtain file request data from multiple terminals within the current time period, and then statistically analyze the file request data within the current time period.

[0065] A fourth aspect of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps in the file storage method described in the first aspect of the present invention.

[0066] A fifth aspect of the present invention also provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the file storage method described in the first aspect of the present invention.

[0067] A sixth aspect of the present invention also provides a computer program product that, when executed on an electronic device, causes a processor to perform the steps in the file storage method described in the first aspect of the present invention.

[0068] This invention provides a file storage method, system, electronic device, storage medium, and product. The method involves: acquiring file request information within the current time period and file recommendation information for the next time period; determining multiple files to be requested in the next time period and their respective file request probabilities based on the file request information and file recommendation information; determining a file storage strategy for each file to be requested based on the file request probabilities; and storing the multiple files to be requested according to the file storage strategy before the next time period arrives. This invention calculates the probability of a file being requested in the next time period and sets different storage strategies, thereby storing files in more suitable storage devices. This ensures that files are read from storage devices with faster access speeds as much as possible in the next time period, making file access smoother, guaranteeing the user's file access experience, and improving the service capabilities of the storage devices. Furthermore, this invention improves file access speed by storing files in suitable storage devices based on file request probabilities without changing the original storage architecture and capacity. This allows the method to be widely applied in large-scale clusters, cloud data centers, or edge storage devices, without being limited by the original architecture. Attached Figure Description

[0069] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0070] Figure 1 This is a flowchart of the steps of a file storage method provided in an embodiment of the present invention;

[0071] Figure 2 This is a schematic diagram of a file storage strategy provided by an embodiment of the present invention;

[0072] Figure 3 This is a schematic diagram of a file distribution refresh process provided in an embodiment of the present invention;

[0073] Figure 4 This is a schematic diagram of the structure of a file storage system provided in an embodiment of the present invention;

[0074] Figure 5 This is a schematic diagram of the structure of a file storage device provided in an embodiment of the present invention;

[0075] Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0076] Exemplary embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0077] This invention provides a file storage method, referring to... Figure 1 , Figure 1 A flowchart illustrating the steps of a file storage method provided in an embodiment of the present invention is shown below. Figure 1 As shown, the method includes:

[0078] Step S101: Obtain the file request status within the current time period and the file recommendation information for the next time period;

[0079] Specifically, the file request information indicates the number of times a file is requested within the current time period. It may also include the number of times the file is requested on various types of storage devices within the current time period, including at least memory, solid-state drives, and hard disk drives.

[0080] Based on fundamental computer principles, we know that file read speeds in RAM are more than 20 times faster than on SSDs and more than 1000 times faster than on HDDs. Therefore, storing files in RAM provides the fastest read speed and smoothest file access. However, in practical applications, due to cost considerations, RAM capacity is much smaller than SSD capacity, which in turn is much smaller than HDD capacity. Therefore, RAM capacity is limited, and it's not feasible to store all files in RAM solely for the sake of access speed. Furthermore, the file throughput or service capacity of each storage device depends on its local hit rate. When accessing a file, the system first checks if the file exists in RAM. If not, it checks the SSD, then the HDD, and so on, proceeding the search step-by-step.

[0081] The hit rate of a storage device represents the ratio of the number of times a target file is found in that storage device to the number of searches performed on that storage device. Each time a file is searched and determined not to be in the storage device, the hit rate decreases accordingly. Furthermore, the duration of the current time period can be set according to specific application requirements. For example, it can be set to 1 minute or 5 minutes, and configured as a fixed period to periodically retrieve data.

[0082] The file recommendation information is sent by a third-party platform or system. This information mainly includes file information to be pushed to the device or user in the next cycle. This file information includes the file name, type, size, and identifier. Specifically, the third-party system can be a video push system, and the file recommendation information can be a list representing the video files that the video push system will push to the device in the next time period. This next time period can be set according to the actual application; for example, it can be set to 1 minute or 5 minutes, and can be the same as the current time period. In one embodiment, it can be set to a fixed period, with the current time period being the current cycle and the next time period being the next cycle, thereby periodically obtaining file request information and file recommendation information.

[0083] Step S102: Based on the file request status and the file recommendation information, determine the multiple files to be requested in the next time period, and the file request probability of each of the multiple files to be requested;

[0084] Specifically, based on file request information, files that were frequently read within a certain historical period can be identified. Based on file recommendation information, files that are likely to be needed in the next time period can be identified. After obtaining the file request information and file recommendation information, by analyzing and calculating the above data, multiple files to be requested in the next time period, as well as the file request probability of each file, can be determined. The file request probability represents the probability that each file will be requested in the next time period, that is, the probability that a user will read the file in the next time period. If the request probability of a file is high, it means that the file is very likely to be read in the next time period.

[0085] In this embodiment, one or more algorithms from machine learning, word vectorization, and deep learning can be used to analyze and calculate file request information and file recommendation information as input data to obtain the output result, namely, the probability of file requests in the next time period. Specifically, taking a probability prediction neural network model as an example, a labeled sample dataset is obtained, and the request probability prediction neural network model is trained to obtain a trained neural network model. Then, the file request information and file recommendation information are used as input data and input into the trained neural network model to obtain the output result of the file request probability for each file. For example, the output result can be represented as: {file1: 0.55, file2: 0.7, ..., fileN: 0.33}. In this embodiment, the file request information within a certain time period and the file recommendation information for that time period are used as a training sample, and the number of file requests in the next time period adjacent to that time period is used to label the sample to obtain a training sample dataset for training the neural network model. It is important to note that the duration of each training sample in the training dataset must be consistent, and the acquired training sample data must be device data from the same geographical area to ensure the stability of the training results and the reliability of the neural network model.

[0086] Step S103: Determine the file storage strategy for each of the multiple files to be requested based on their respective file request probabilities.

[0087] After obtaining the request probabilities of multiple files, a suitable storage device can be matched to each file based on its request probability, thereby determining the file storage strategy. The file storage strategy represents the matching storage device for the file, as well as the storage methods such as migration, download, and deletion of the file.

[0088] For example, storage strategy 1 is "move file A from storage device A to storage device B for storage", storage strategy 2 is "download file B directly to storage device A", and storage strategy 3 is "delete file C from storage device B".

[0089] Reference Figure 2 , Figure 2 A schematic diagram of a file storage strategy is shown, such as... Figure 2 As shown, storage devices are specifically divided into memory, solid-state drives (SSDs), and hard disk drives (HDDs). Files with a high probability of being requested are stored in memory and SSDs, while files with a low probability of being requested are stored in HDDs. When accessing files, the target file is searched in memory first, thus ensuring file reading speed and the hit rate of the storage device.

[0090] Since different storage devices have different file read speeds, the access speed of files will vary depending on the storage device. Therefore, this embodiment generates a storage strategy based on the file request probability. This allows the file to be allocated to a suitable storage device according to the request probability. For example, files with a high request probability are matched with storage devices with fast file read speeds, and files with a low request probability are matched with storage devices with slow file read speeds. This ensures that most files with a high probability of access are stored in storage devices with fast read speeds, thereby improving file read speed.

[0091] Step S104: Before the next time period arrives, store the multiple files to be requested according to their respective file storage strategies.

[0092] After receiving the corresponding file storage policy, each storage device can store files according to that policy. Specifically, it can perform operations such as file migration, downloading, and deletion.

[0093] In this embodiment, by predicting the probability of file requests in the next time period, the storage strategy for each file is determined. This allows each storage device to store the file according to the corresponding storage strategy before the next time period arrives, thus achieving a refresh of the file distribution across the entire storage system before the next time period, achieving a file caching effect. The next time period can be set to a duration of 1 minute, 5 minutes, etc., depending on the actual application. When the time period is set according to a fixed period, it can be represented as follows: in the Nth period, the probability of file requests in the N+1th period is calculated. Before the N+1th period arrives, the storage device completes file storage according to the corresponding file storage strategy. Then, in the N+1th period, the probability of file requests in the N+2th period is calculated, and before the N+2th period arrives, the storage device completes file storage according to the corresponding file storage strategy. Therefore, by executing the above steps once in each time period, the file distribution in the storage devices is refreshed, enabling continuous updates to the file distribution and allowing the file distribution across various storage devices to be flexibly updated according to actual conditions.

[0094] Reference Figure 3 , Figure 3 This illustrates a flowchart of a file distribution refresh process, such as... Figure 3 As shown, the heterogeneous set of storage and caching devices includes various storage devices (such as device A, device B, and device C). First, this set of devices reports file requests and hit data to the big data collection system. The big data collection system integrates the collected information, performs statistics, and then sends the statistically analyzed information to the intelligent file distribution system, thereby completing step S101 (obtaining file request information within the current time period) in the above embodiment. Figure 3 As shown, the video recommendation system, acting as a third-party system, sends the recommended video set for the next period to the file intelligent distribution system, thereby completing step S101 (obtaining file recommendation information for the next time period) in the above embodiment. Then, the file intelligent distribution system predicts file distribution based on the received information and generates a file list. This file list includes the file distribution for the next period, i.e., the file storage strategy (corresponding to steps S102 and S103 in the above embodiment). Finally, the file intelligent distribution system distributes the obtained file list (file distribution for the next period) to the set of storage and caching devices, specifically to devices A, B, and C, enabling each device to perform operations such as downloading, migrating, and deleting files based on the file distribution, thus completing the file distribution (corresponding to step S104 in the above embodiment). Figure 3The file distribution refresh process shown (i.e. the file storage method proposed in this embodiment) refreshes the file distribution of this set of storage devices or system. Based on the collected information, the probability of file requests in the next time period is analyzed and calculated. Thus, a file list (file storage strategy) is generated according to the request probability of each file, and the files are stored in appropriate storage devices to make file access smoother and ensure the user's file access experience.

[0095] In addition, for different storage devices (such as...) Figure 3 The various types of heterogeneous storage and caching devices shown can each establish a network connection channel between the storage device and the intelligent file distribution system. Specifically, this network connection can be established using either an HTTP short connection or a TCP long connection. When executing step S101, the file request status of each storage device within the current time period can be obtained through the pre-established network connection channel. Correspondingly, when executing step S104 in the above embodiment (corresponding to...)... Figure 3 When the intelligent file distribution system distributes the obtained file list to the set of storage and caching devices, it can send file storage policies to the corresponding storage devices through the network connection channel, enabling the storage devices to complete file storage according to the file storage policies. Thus, by utilizing a pre-established network connection channel to transmit the required information, data transmission speed is accelerated, further improving file storage efficiency.

[0096] Currently, for typical server operating systems (such as Linux), network file transfers often rely on traditional algorithms like Least Recently Used (LRU) or Least Frequently Used (LFU) for local storage refresh and replacement. These algorithms cache and store files by moving those accessed more frequently from slower storage devices (such as hard disk drives) to faster storage devices (SSDs or RAM). For example, by retrieving historical access data, if video A is determined to have been viewed 10 times (higher access frequency than other files), it's decided to store video A in faster RAM. Conversely, if video B is viewed only once (lower access frequency than other files), it's cached on a slower SSD. However, this file storage method only matches storage devices based on the historical access frequency of files, tending to store files that have already been accessed in memory, without considering which files users are more likely to read. As a result, the files that are actually needed are stored on SSDs and HDDs with higher read speeds, making file access slower for users and affecting the user experience.

[0097] This invention analyzes and calculates the file request probability of multiple files to be requested in the next time period based on the file request status of the current time period and the file recommendation information for the next time period. Different storage strategies can then be set according to the request probability of each file, allowing the multiple files to be requested to be stored in appropriate storage devices. For example, files with high request probabilities can be stored in storage devices with fast file read speeds, while files with low request probabilities can be stored in storage devices with slow file read speeds. This ensures that files are read from the fastest storage devices whenever possible, making file access smoother and guaranteeing a better user experience. Furthermore, this invention improves file access speed by storing files in corresponding storage devices based on their file request probabilities in the next time period without changing the original storage architecture and capacity. This makes the method widely applicable to large-scale clusters, cloud data centers, or edge storage devices, without being limited by the original storage architecture.

[0098] In one embodiment, step S103, determining the file storage strategy for each of the plurality of requested files based on their respective file request probabilities, includes:

[0099] Step S103-1: Obtain storage device information. The storage device information includes information on the types of available storage devices and storage status information for each storage device. The storage status information includes at least: the storage capacity of the storage device, the stored file information, the remaining storage space size, and the file read speed.

[0100] In practical applications, when generating file storage strategies, it is necessary to obtain storage device information. This storage device information includes the types of available storage devices, i.e., the types of storage devices the terminal has, such as memory, solid-state drives, and hard disk drives, as well as the storage status information of each storage device. Specifically, the storage request information includes the storage capacity of the storage device, the information of the stored files, the remaining storage space, and the file read speed.

[0101] Step S103-2: Based on the file request probability of each of the multiple files to be requested and the storage device information, determine the storage device that matches each of the multiple files to be requested; arrange the storage devices in descending order of file read speed, such that, among any two storage devices, the probability of the file request of the file to be requested matched by the storage device with the higher file read speed is higher than the probability of the file request of the file to be requested matched by the storage device with the lower file read speed.

[0102] In this embodiment, after determining the file request probability of each file in the next time period, each file to be requested can be matched to the corresponding storage device according to the file request probability of each file to be requested and the storage device information, thereby determining the storage strategy. The predicted access file content in the next time period is notified to the corresponding storage device in advance, so that the storage device can store the file according to the storage strategy, update the file distribution in the storage device, and improve the hit rate of the corresponding storage device.

[0103] The file storage strategy is designed to prioritize storage devices by their file read speeds, from highest to lowest. For example, memory has a higher file read speed than solid-state drives (SSDs), and SSDs have a higher file read speed than hard disk drives (HDDs). Specifically, the file storage strategy prioritizes storage devices by their file read speeds, such as memory having a higher file read speed than solid-state drives (SSDs), and SSDs having a higher file read speed than hard disk drives (HDDs). The probability of a file being requested in memory is higher than that in SSDs, and vice versa.

[0104] In one embodiment, files with the highest request probability can be stored in memory, files with a medium request probability can be stored on a solid-state drive (SSD), and files with the lowest request probability can be stored on a hard disk drive (HDD). Therefore, when reading files from storage devices, the target file is first searched for in memory. Storing the file with the highest request probability in memory ensures a high memory hit rate, improving memory service capacity and file throughput. Similarly, this ensures a high hit rate for SSDs and HDDs, improving both file read speed and overall service capacity. The file throughput or service capacity of each storage device depends on its local hit rate.

[0105] In one embodiment, step S102 determines, based on the file request status and the file recommendation information, a plurality of files to be requested in the next time period, and the file request probability of each of the plurality of files to be requested, including:

[0106] Step S102-1: Based on the file request status and the file recommendation information, determine multiple files to be requested in the next time period; the file request status indicates the number of times a file is requested in the current time period, and the file recommendation information indicates file information to be pushed in the next time period.

[0107] Step S102-2: Determine the semantic relationship between the multiple files to be requested in the next time period and the multiple files already requested in the current time period.

[0108] Step S102-3: Determine the file request probability of each of the multiple files to be requested based on the semantic relationship.

[0109] In this embodiment, one or more algorithms, such as machine learning, word vectors, and deep learning, can be used to analyze and calculate file request information and file recommendation information as input data. Specifically, multiple files that may be requested in the next time period can be identified first, and then the semantic relationships between the files can be obtained. This can include the semantic relationships between the multiple files to be requested, as well as the semantic relationships between the multiple files to be requested and the multiple files already requested in the current time period. Based on these semantic relationships, the file request probability of each of these multiple files to be requested can be analyzed and calculated. The semantic relationships between files represent the logical associations between files and are predetermined based on the file content. Especially for streaming media files, there are obvious semantic relationships between files. For example, after accessing certain videos, another type of video will be recommended to the user, or for drama series videos, the next episode will be pushed. For example, among the multiple files already requested in the current time period, file A "Video Episode 10" is included. It is determined that there is a "preceding episode relationship" between file B "Video Episode 11" and file A. By analyzing this semantic relationship, it is considered that the file request probability of file B is higher. This embodiment uses the semantic relationships between files, file request information, and file recommendation information as input data. It then utilizes one or more algorithms, including machine learning, word vectors, and deep learning, to calculate the file request probability of each file to be requested. This embodiment does not limit the algorithms used. By acquiring the semantic relationships between multiple files to be requested and multiple files already requested in the current time period, analyzing the correlation between files, and combining this with intelligent prediction, this embodiment calculates the files needed by the system in the next time period, making the determined file request probabilities more accurate.

[0110] In one embodiment, when all the requested files are local files stored on any of the multiple storage devices, step S104 involves storing the multiple requested files according to their respective file storage strategies, including:

[0111] According to the respective file storage strategies of the multiple requested files, control the multiple storage devices to perform local file migration according to the following steps:

[0112] Step S104-1: Control the plurality of storage devices to migrate the requested files whose file request probability is between a first threshold and a second threshold to the first storage device. The first storage device is the storage device with the slowest file reading speed among the plurality of storage devices, and the first threshold is higher than the second threshold.

[0113] Step S104-2: Control the multiple storage devices to delete the requested files whose file request probability is lower than the second threshold;

[0114] Step S104-3: Based on the remaining storage space size of each of the other storage devices besides the first storage device, at least a portion of the requested files in the first storage device are migrated to the other storage devices.

[0115] In this embodiment, when the requested file is already stored in one of the storage devices (i.e., when the requested file is a local file already stored in the system), after determining the storage strategy, it needs to be migrated, retained in the original storage device, or deleted according to the storage strategy. Specifically, files with a request probability between a first threshold and a second threshold can be migrated to the first storage device. In other words, files with a request probability too low, falling within a certain range, are migrated from other storage devices to the storage device with the slowest file read speed. On the one hand, this ensures that the request probability of files in other storage devices is higher, improving the hit rate of the storage devices. On the other hand, removing files with low request probabilities from other devices saves storage space on those devices. The first and second thresholds can be manually set thresholds and are not limited here. For example, files with a request probability in the range of 10%-20% can be moved from memory and solid-state drives to hard disk drives. In this embodiment, files with a request probability below the second threshold in each storage device are deleted. Thus, files with a low request probability are directly deleted from the storage devices, further saving storage space.

[0116] Based on the remaining storage space of each of the other storage devices besides the first storage device, at least a portion of the requested files in the first storage device are migrated to the respective other storage devices. By migrating the requested files already stored in the first storage device to other storage devices based on the remaining storage space of the storage devices, the purpose of migrating files with a high probability of being requested from storage devices with slow read speeds to those with fast read speeds is achieved.

[0117] In one embodiment, the other storage devices include at least a second storage device and a third storage device, wherein the file read speed of the third storage device is higher than that of the second storage device; step S104-3, based on the remaining storage space of each storage device other than the first storage device, migrates at least a portion of the requested files in the first storage device to each of the other storage devices, including:

[0118] Step S104-3a: Based on the remaining storage space of the third storage device, control the first storage device to migrate the multiple request files with the highest request probability among the stored request files to the third storage device;

[0119] Step S104-3b: After completing the file migration of the third storage device, based on the remaining storage space of the second storage device, control the first storage device to migrate the multiple request files with the highest request probability from the remaining request files stored therein to the second storage device.

[0120] In this embodiment, since the file read speeds and storage capacities differ between storage devices, storage requires consideration of two factors. First, the capacity of each storage device must be considered; not all files can be stored on the device with the fastest read speed. Second, the file request probability of each file must be considered, storing files with high request probabilities on faster storage devices to ensure smooth user access. In this embodiment, a third storage device with a faster read speed is considered first. Files with the highest request probabilities from the first storage device are migrated to the third storage device. For example, if the third storage device can still store 10 files, the 10 files with the highest request probabilities from the first storage device are migrated there. Then, the remaining storage space of a second storage device with a relatively faster read speed is determined. Files with high request probabilities from the remaining unrequested files stored on the first storage device are migrated to the second storage device. For example, if the second storage device can still store 10 files, the 10 files with the highest request probabilities from the first storage device are migrated there. In practical applications, the third, second, and first storage devices can correspond to RAM, SSD, and HDD, respectively. This allows files with high request probability from the HDD to be migrated to RAM and SSD, thus ensuring the hit rate of RAM and SSD and improving overall service capabilities.

[0121] In one embodiment, a higher third request probability threshold can be set to migrate files with a higher request probability in the first storage device to memory and solid-state drives, thereby ensuring that high-probability files are concentrated in storage devices with fast read speeds and ensuring that users can access files smoothly.

[0122] In one embodiment, if there are non-local files in the plurality of requested files that are not stored in any of the plurality of storage devices, step S103, determining the file storage strategy for each of the plurality of requested files based on the file request probability of each of the plurality of requested files, includes:

[0123] Step S103-3: Determine the file storage strategy for the non-local file based on the relationship between the file request probability of the non-local file and the first threshold and / or the second threshold.

[0124] Also includes:

[0125] Step S103-4: Download and store the non-local file according to the file storage strategy for the non-local file.

[0126] In this embodiment, if a non-local file is among the requested files (i.e., a file not stored on any storage device), different file storage strategies are generated based on the file request probability of that non-local file. Specifically, if the file request probability of a non-local file is lower than a second threshold, the file is not stored. If the file request probability of a non-local file is lower than a first threshold but not lower than the second threshold, the file is matched to the first storage device, which has the slowest file read speed, for download and storage. If the file request probability of a non-local file is higher than a third request probability threshold, the file is matched to the storage device with the fastest file read speed, for download and storage. Thus, the system matches the non-local file to a suitable storage device based on its file request probability and its relationship to the first and / or second thresholds. If the file request probability is high, it is matched to a storage device with a fast file read speed, ensuring that the required file is stored on the fastest storage device possible, thus guaranteeing file read speed and improving storage device hit rate.

[0127] In one embodiment, step S101, obtaining file request information within the current time period, includes:

[0128] Step S101-1: Obtain file request data from multiple terminals within the current time period, and statistically analyze the file request data within the current time period.

[0129] The file request information indicates the number of times a file is requested within the current time period. Specifically, it may also include the number of times the file is requested on various storage devices within the current time period, including at least memory, solid-state drives (SSDs), and hard disk drives (HDDs). In this embodiment, the obtained file request information can be the file request information of a single terminal or a single user, or it can be the sum of file request information from multiple terminals. Specifically, by obtaining file request information data from multiple terminals, the file request information data includes the number of times each file on that terminal is requested within the current time period, and the number of times the file is requested on a storage device. For example, file A is requested 5 times in memory within the current time period. After obtaining the file request information data from multiple terminals, it is statistically analyzed to obtain the file request information, which includes the total number of times each file is requested, and the number of times it is requested on different storage devices. For example: {File A: {Memory hit: 1 time, SSD hit: 5 times, HDD hit: 10 times, Not on local machine: 10 times}}. "Not on this machine" indicates that the file is not a local file and is not stored on any storage device; it needs to be downloaded when requested. According to the file storage method of this embodiment, file request data from multiple terminals can be obtained. By acquiring data from multiple sources, the request status of files within the current time period can be analyzed more accurately. Therefore, by acquiring data from multiple terminals and using this data to calculate the file request probability, the obtained file request probability is more accurate. Based on this file request probability, a storage strategy is determined for the target terminal, enabling each storage device of the target terminal to store files according to the corresponding storage strategy.

[0130] In one embodiment, data from different device types is processed separately. Different device types refer to the varying storage capabilities of large-scale cluster servers, cloud data centers, or individual servers, preventing them from being stored according to a single standard. For example, file request information from the cluster servers is obtained, and the probability of requesting a file is determined based on this information and file recommendation information. A storage strategy is then determined based on this probability and the cluster servers' storage capacity, enabling each storage device in the cluster servers to store files according to this strategy. Since the storage capacity and file read capabilities of cluster servers and individual servers differ, they are analyzed together, and the criteria for determining the storage strategy also differ, resulting in variations in the settings of the first, second, and third request probability thresholds. For instance, the storage capacity of a cluster server is higher than that of a single server, so the third request probability threshold for the cluster server is slightly lower than that for a single server, allowing more requested files to be stored on the storage devices with the fastest file read speeds.

[0131] In addition to processing data from different device types separately, it is also necessary to process data from different geographical regions separately. For example, file request data from devices in the Beijing area and file request data from devices in the Nanjing area are processed separately to determine the file request probability for each and generate corresponding storage strategies. This is because different geographical regions have different file request patterns. For instance, if an epidemic occurs in Beijing, the number of requests for files tagged with "epidemic" in the Beijing area will increase accordingly. Therefore, the file request probabilities determined based on file request patterns in different geographical regions will differ, leading to different final file storage strategies. This embodiment, by distinguishing between different device types and different geographical regions, can make the determined file request probabilities more accurate, thereby obtaining a more reasonable file storage strategy, improving file storage efficiency, and increasing file access speed.

[0132] This embodiment also provides a file storage system, see reference. Figure 4 , Figure 4 A schematic diagram of a file storage system is shown, such as... Figure 4 As shown, the system includes: a request data platform, a file intelligent distribution module, and a storage terminal;

[0133] The data request platform is used to obtain the file request status sent by the storage terminal within the current time period, and to obtain the file recommendation information for the next time period sent by the third-party file recommendation system; and to send the file request status and the file recommendation information to the file intelligent distribution module.

[0134] The intelligent file distribution module is used to determine multiple files to be requested in the next time period and the file request probability of each of the multiple files to be requested based on the file request status and the file recommendation information; and to determine the file storage strategy of each of the multiple files to be requested based on the file request probability of each of the multiple files to be requested; and to send the file storage strategy to the storage terminal.

[0135] The storage terminal is used to store the multiple requested files according to their respective file storage strategies before the next time period arrives.

[0136] In this embodiment, the data request platform can obtain file request information from different storage devices, such as large-scale cluster servers, cloud servers, or standalone servers. For different storage devices, separate network connection channels can be established between the storage device and the intelligent file distribution module. Specifically, these network connections can be established using either HTTP short connections or TCP long connections. After generating a storage policy, the intelligent file distribution module sends the storage policy to the storage device through this network connection channel, enabling the storage device to store files according to the policy, proactively refresh its own file distribution, and improve overall service capabilities.

[0137] This embodiment also provides a file storage device, see reference. Figure 5 , Figure 5 A schematic diagram of a file storage device is shown, such as... Figure 5 As shown, the device includes:

[0138] The acquisition module is used to acquire file request information within the current time period and file recommendation information for the next time period.

[0139] The probability determination module is used to determine, based on the file request status and the file recommendation information, multiple files to be requested in the next time period, and the file request probability of each of the multiple files to be requested.

[0140] The storage strategy determination module is used to determine the file storage strategy for each of the multiple files to be requested based on the file request probability of each file.

[0141] The storage module is used to store the multiple requested files according to their respective file storage strategies before the next time period arrives.

[0142] In one embodiment, the storage policy determination module includes:

[0143] The first storage strategy determination submodule is used to obtain storage device information, which includes information on the types of available storage devices and storage status information for each storage device. The storage status information includes at least: the storage capacity of the storage device, the stored file information, the remaining storage space size, and the file read speed.

[0144] The second storage strategy determination submodule is used to determine the storage device that matches each of the plurality of files to be requested based on the file request probability of each of the plurality of files to be requested and the storage device information; and to arrange the storage devices in descending order of file read speed, such that, among any two storage devices, the probability of the file request of the file to be requested matched by the storage device with the higher file read speed is higher than the probability of the file request of the file to be requested matched by the storage device with the lower file read speed.

[0145] In one embodiment, the probability determination module includes:

[0146] The first probability determination submodule is used to determine multiple files to be requested in the next time period based on the file request status and the file recommendation information; the file request status indicates the number of times a file is requested in the current time period, and the file recommendation information indicates the file information to be pushed in the next time period.

[0147] The second probability determination submodule is used to determine the semantic relationship between multiple files to be requested in the next time period and multiple files already requested in the current time period;

[0148] The third probability determination submodule is used to determine the file request probability of each of the plurality of files to be requested based on the semantic relationship.

[0149] In one embodiment, the storage module includes:

[0150] The first storage submodule is used to store the multiple requested files according to their respective file storage strategies before the next time period arrives.

[0151] Optionally, if the plurality of requested files are all local files stored on any of the plurality of storage devices, the storage module further includes:

[0152] A migration submodule is used to control the multiple storage devices to perform local file migration according to the respective file storage strategies of the multiple requested files, following the steps outlined below. The migration submodule includes:

[0153] The first migration unit is used to control the plurality of storage devices to migrate files to be requested that have a file request probability between a first threshold and a second threshold to the first storage device. The first storage device is the storage device with the slowest file reading speed among the plurality of storage devices, and the first threshold is higher than the second threshold.

[0154] The second migration unit is used to control the plurality of storage devices to delete the requested files whose file request probability is lower than the second threshold.

[0155] The third migration unit is used to migrate at least a portion of the requested files in the first storage device to the respective other storage devices according to the remaining storage space size of each storage device other than the first storage device.

[0156] In one embodiment, the other storage device includes at least a second storage device and a third storage device, wherein the file read speed of the third storage device is higher than that of the second storage device; the third migration unit includes:

[0157] The first migration subunit is used to control the first storage device to migrate the multiple request files with the highest request probability among the various request files stored in the third storage device to the third storage device according to the remaining storage space of the third storage device;

[0158] The second migration subunit is used to control the first storage device to migrate the multiple request files with the highest request probability from the remaining request files stored in the second storage device to the second storage device, based on the remaining storage space of the second storage device.

[0159] In one embodiment, if there are non-local files in the plurality of request files that are not stored in any of the plurality of storage devices, the storage policy determination module includes:

[0160] The third storage strategy submodule is used to determine the file storage strategy for the non-local file based on the relationship between the file request probability of the non-local file and the first threshold and / or the second threshold.

[0161] Also includes:

[0162] The download submodule is used to download and store the non-local file according to the file storage strategy of the non-local file.

[0163] In one embodiment, the acquisition module includes:

[0164] The statistics submodule is used to obtain file request data from multiple terminals within the current time period, and then statistically analyze the file request data within the current time period.

[0165] This invention also provides an electronic device, with reference to... Figure 6 , Figure 6 This is a schematic diagram of the electronic device proposed in an embodiment of the present invention. Figure 6 As shown, the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus for communication. The memory 110 stores a computer program, which can run on the processor 120 to implement the steps in the file storage method disclosed in the embodiments of the present invention.

[0166] This invention also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps in the file storage method disclosed in this invention.

[0167] This invention also provides a computer program product that, when run on an electronic device, causes a processor to execute the steps in the file storage method disclosed in this invention.

[0168] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0169] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, electronic devices, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0170] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0172] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0173] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0174] The foregoing has provided a detailed description of the file storage method, system, electronic device, storage medium, and product provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A file storage method, characterized in that, The method includes: Get the file request status within the current time period, and the file recommendation information for the next time period; Based on the file request information and the file recommendation information, multiple files to be requested in the next time period are determined; Determine the semantic relationships between multiple files to be requested within the next time period, and the semantic relationships between the multiple files to be requested and multiple files already requested in the current time period; the semantic relationships are the logical associations between files. Based on the semantic relationships, determine the file request probability of each of the plurality of files to be requested; Based on the file request probability of each of the multiple files to be requested and the storage device information, the file storage strategy of each of the multiple files to be requested is determined by matching the file to be requested with a higher file request probability to a storage device with a faster file reading speed. Before the next time period arrives, the multiple requested files are stored according to their respective file storage strategies.

2. The file storage method according to claim 1, characterized in that, Based on the file request probability of each of the multiple requested files and storage device information, the file storage strategy for each of the multiple requested files is determined by matching the requested file with a higher file request probability to a storage device with a faster file read speed, including: Obtain storage device information, which includes information on the types of available storage devices and storage status information for each storage device. The storage status information includes at least: the storage capacity of the storage device, the stored file information, the remaining storage space size, and the file read speed. Based on the file request probabilities of each of the multiple files to be requested and the storage device information, the storage device matching each of the multiple files to be requested is determined; the storage devices are arranged in descending order of file read speed, such that, among any two storage devices, the probability of the file request of the file to be requested matched by the storage device with the higher file read speed is higher than the probability of the file request of the file to be requested matched by the storage device with the lower file read speed.

3. The file storage method according to claim 1, characterized in that, Before determining the semantic relationships between multiple files to be requested within the next time period, and the semantic relationships between the multiple files to be requested and multiple files already requested in the current time period, the process includes: Based on the file request information and the file recommendation information, multiple files to be requested in the next time period are determined; the file request information indicates the number of times a file has been requested in the current time period, and the file recommendation information indicates the file information to be pushed in the next time period.

4. The file storage method according to claim 2, characterized in that, When all the requested files are local files stored on any of the multiple storage devices, the multiple requested files are stored according to their respective file storage strategies, including: According to the file storage policies of the various requested files, control the various storage devices to perform local file migration according to the following steps: Control the plurality of storage devices to migrate files whose file request probability is between a first threshold and a second threshold to the first storage device, wherein the first storage device is the storage device with the slowest file reading speed among the plurality of storage devices, and the first threshold is higher than the second threshold; Control the multiple storage devices to delete files that have a file request probability lower than the second threshold. Based on the remaining storage space of each of the other storage devices besides the first storage device, at least a portion of the requested files in the first storage device are migrated to the respective other storage devices.

5. The file storage method according to claim 4, characterized in that, The other storage devices include at least a second storage device and a third storage device, wherein the file read speed of the third storage device is higher than that of the second storage device; based on the remaining storage space of each of the storage devices other than the first storage device, at least a portion of the requested files in the first storage device are migrated to each of the other storage devices, including: Based on the remaining storage space of the third storage device, the first storage device is controlled to migrate the multiple files with the highest file request probability among the stored files to the third storage device. After completing the file migration to the third storage device, based on the remaining storage space of the second storage device, the first storage device is controlled to migrate the multiple files with the highest file request probability from the remaining stored files to the second storage device.

6. The file storage method according to claim 4, characterized in that, If, among the plurality of requested files, there are non-local files not stored on any of the plurality of storage devices, a file storage strategy for each of the plurality of requested files is determined based on the file request probability of each of the plurality of requested files, including: The file storage strategy for the non-local file is determined based on the relationship between the file request probability of the non-local file and the first threshold and / or the second threshold. Also includes: Download and store the non-local file according to the file storage strategy for the non-local file.

7. The file storage method according to any one of claims 1-6, characterized in that, Get the file request information within the current time period, including: Data on file requests from multiple terminals within the current time period is obtained, and the file request status within the current time period is statistically analyzed.

8. A file storage system, characterized in that, The file storage system includes a request data platform, a file intelligent distribution module, and a storage terminal; The request data request platform is used to obtain the file request status sent by the storage terminal within the current time period, and to obtain the file recommendation information for the next time period sent by the third-party file recommendation system; and to send the file request status and the file recommendation information to the file intelligent distribution module. The file intelligent distribution module is used to determine multiple files to be requested in the next time period based on the file request status and the file recommendation information; The semantic relationships between multiple files to be requested in the next time period are determined, as well as the semantic relationships between the multiple files to be requested and the multiple files already requested in the current time period; the semantic relationships are logical associations between files; based on the semantic relationships, the file request probability of each of the multiple files to be requested is determined; and based on the file request probability of each of the multiple files to be requested and storage device information, the file storage strategy of each of the multiple files to be requested is determined by matching the file to be requested with a higher file request probability to a storage device with a faster file read speed. Send the file storage strategy to the storage terminal; The storage terminal is used to store the multiple files to be requested according to their respective file storage strategies.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps in the file storage method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps in the file storage method as described in any one of claims 1 to 7.

11. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the processor to execute the steps of the file storage method as described in any one of claims 1 to 7.