A method and device for file pre-reading based on a network shared directory

CN118152682BActive Publication Date: 2026-09-08CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311731396.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2026-09-08
Estimated Expiration
2043-12-15

AI Technical Summary

Technical Problem

但是这种方式主要依赖于人为操作来进行文件命名以及预读规则的设定,因此同样存在较大的预读局限性,并且还可能出现因人为误操作而导致无法预读的现象

Benefits of technology

[0042] In the method for file pre-reading based on network shared directories of this invention, features are integrated by combining the filenames of shared files and their positional relationships, and continuous online learning is performed on user access behavior to predict the files that need to be pre-read. This effectively reduces the perceived delay caused by network transmission latency during network sharing and greatly improves the accuracy of file pre-reading in complex network shared directory scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118152682B_ABST
    Figure CN118152682B_ABST
Patent Text Reader

Abstract

The application relates to a file pre-reading method and device based on a network sharing directory and electronic equipment, and belongs to the technical field of network sharing. The method comprises the following steps: S1. A link prediction model is constructed, and the link prediction model comprises two embedding layers and a prediction output layer which are sequentially matched; S2. The two embedding layers of the link prediction model are parameter-optimized through expected reading information and actual reading information in a current state; S3. Embedding representation vectors corresponding to each shared file and carrying network structure information are respectively extracted through the optimized embedding layers; and S4. The embedding representation vectors are input into the prediction output layer, and pre-reading information in the current state is predicted through the prediction output layer. The embedding representation vectors integrated with file names and position relationships are extracted, and the access behavior of a user is learned online, so that files needing pre-reading are predicted, and the accuracy of cross-file pre-reading in network sharing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network sharing technology, and particularly relates to a method, apparatus, and electronic device for pre-reading files based on a network shared directory. Background Technology

[0002] Network sharing refers to the act of other computers using the resources of another computer through a network. In other words, it means enabling some resources on one computer to be remotely accessed by another computer, and the access process is transparent.

[0003] File prefetching refers to reading more file content than expected at once and caching it, so that the next read request can directly retrieve the corresponding content from the cache.

[0004] In summary, given the inherent network transmission latency in existing network sharing systems, file pre-reading is crucial for remote access. Specifically, by pre-reading other files that will be opened next when opening a shared file, users can avoid experiencing pauses due to network latency, thus ensuring smooth remote access via network sharing.

[0005] Currently, known cross-file prefetching methods can be broadly classified into two categories:

[0006] One approach involves pre-reading adjacent files based on their logical position within a shared file. However, in actual file reading operations, files are not necessarily read sequentially according to their position. This often results in discrepancies between the pre-read files and the files intended for reading, impacting file reading efficiency.

[0007] Another method is to pre-read files based on the pre-read rules corresponding to the file naming format. However, this method mainly relies on manual operation to name files and set pre-read rules, so it also has significant limitations in pre-reading and may fail to pre-read due to human error.

[0008] As can be seen from the above, existing cross-file pre-reading methods cannot accurately meet the file pre-reading buffer requirements under actual network sharing. Therefore, it is essential to provide a highly accurate and widely adaptable method for file pre-reading based on network shared directories. Summary of the Invention

[0009] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method, apparatus, and electronic device for file pre-reading based on a network shared directory. Specifically, it integrates features by combining the filenames of shared files and their positional relationships, and continuously learns from users' access behavior online to predict the files that need to be pre-read, thereby improving the accuracy of cross-file pre-reading in network sharing.

[0010] Firstly, to achieve the above objectives, the present invention provides the following technical solution:

[0011] A method for file pre-reading based on a network shared directory includes:

[0012] S1. Construct a link prediction model, wherein the link prediction model includes two embedding layers and a prediction output layer that work together in sequence;

[0013] S2. Optimize the parameters of the two embedding layers of the link prediction model using the expected reading information and the actual reading information in the current state;

[0014] S3. Extract the embedded representation vector with network structure information corresponding to each shared file through the optimized embedding layer;

[0015] S4. Input the embedded representation vector into the prediction output layer, and predict the pre-read information in the current state through the prediction output layer, and obtain at least one pre-read file through the pre-read information.

[0016] Furthermore, in step S2:

[0017] Preset FTRL online learning algorithm;

[0018] The expected reading information and actual reading information in the current state are used as inputs to the FTRL online learning algorithm, and the parameters of the two embedding layers of the link prediction model are optimized by the FTRL online learning algorithm.

[0019] Further, in step S3: the first embedding layer extracts feature representation vectors from the naming information of the shared file through the text embedding module.

[0020] Furthermore, the feature representation vector includes the filename of each shared file and its corresponding file type suffix.

[0021] Further, in step S3: the feature representation vector is used as the input of the second embedding layer, and the second embedding layer extracts the embedding representation vector with network structure information from the location information of the shared file through the graph representation learning module.

[0022] Furthermore, obtaining the location information of the shared file includes:

[0023] Obtain the network shared directory and construct a directory tree structure diagram between the shared files based on the network shared directory;

[0024] The location information of each shared file is determined based on the directory tree structure diagram.

[0025] Further, in step S4, the prediction rules of the prediction output layer include:

[0026] Obtain the currently read file based on the actual reading information in the current state;

[0027] The prediction matrix is ​​obtained by multiplying the embedding representation vector of the currently read file with the embedding representation vector matrix of the remaining shared files;

[0028] The prediction matrix is ​​normalized to obtain the pre-read probability for each shared file other than the currently read file.

[0029] Furthermore, the pre-read information is a pre-read list obtained by sorting the pre-read probabilities in descending order.

[0030] Secondly, to achieve the above objectives, the present invention also provides the following technical solution:

[0031] An apparatus for file pre-reading based on a network shared directory, comprising:

[0032] A model building unit; used to build a link prediction model, wherein the link prediction model includes two embedding layers and a prediction output layer that work together in sequence;

[0033] The information acquisition unit is used to acquire the expected reading information, the actual reading information, and the pre-reading information predicted by the link prediction model in the current state.

[0034] The model optimization unit is used to optimize the parameters of the two embedding layers of the link prediction model based on the expected reading information and the actual reading information in the current state.

[0035] As a general inventive concept, the present invention also provides:

[0036] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for file pre-reading based on a network shared directory as described above.

[0037] An electronic device includes a processor, a communication interface, a memory, and a communication bus;

[0038] The processor, communication interface, and memory communicate with each other via a communication bus.

[0039] The memory is used to store computer programs;

[0040] The processor is used to execute a computer program stored in the memory, and when the computer program is executed, it implements the file pre-reading method based on a network shared directory as described above.

[0041] The beneficial effects of this invention are as follows:

[0042] In the method for file pre-reading based on network shared directories of this invention, features are integrated by combining the filenames of shared files and their positional relationships, and continuous online learning is performed on user access behavior to predict the files that need to be pre-read. This effectively reduces the perceived delay caused by network transmission latency during network sharing and greatly improves the accuracy of file pre-reading in complex network shared directory scenarios.

[0043] In addition, the present invention uses online learning to continuously optimize the pre-read prediction. On the one hand, it eliminates the need to manually set prediction rules, thus avoiding the possibility of human error. On the other hand, it can also avoid spending a lot of time on prediction training while ensuring the accuracy of pre-read, thereby effectively improving the efficiency of shared file prediction and pre-read. Attached Figure Description

[0044] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. It is obvious that the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings.

[0045] Figure 1 A flowchart of the method for file pre-reading based on a network shared directory provided by the present invention;

[0046] Figure 2 This is a diagram of the directory tree structure constructed based on a network shared directory in this invention;

[0047] Figure 3 This is a schematic diagram of the embedding representation vector extracted by the embedding layer of the link prediction model in this invention;

[0048] Figure 4 This is a schematic diagram illustrating the optimization of the embedding layer of the link prediction model in this invention;

[0049] Figure 5 This is a schematic diagram illustrating the principle of extracting the embedding representation vector through the optimized embedding layer in this invention.

[0050] Figure 6 This is a schematic diagram illustrating the prediction principle of the link prediction model's output layer in this invention.

[0051] Figure 7 This is a structural diagram of the device for file pre-reading based on a network shared directory provided by the present invention. Detailed Implementation

[0052] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0053] Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts disclosed in this invention.

[0054] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of methods and systems consistent with some aspects of the invention as detailed in the appended claims.

[0055] To address the problems of poor file pre-read accuracy and low file access efficiency in existing remote access processes based on network sharing, this invention provides a method, apparatus, and electronic device for file pre-reading based on a network shared directory.

[0056] Method Implementation Examples

[0057] like Figure 1 As shown, the method for file pre-reading based on a network shared directory according to the present invention mainly includes the following steps:

[0058] S1. Construct a link prediction model, wherein the link prediction model includes two embedding layers and a prediction output layer that work together in sequence.

[0059] S2. Optimize the parameters of the two embedding layers of the link prediction model using the expected reading information and the actual reading information in the current state;

[0060] First, an online FTRL learning algorithm is pre-defined. In this method, data arrives sequentially in a streaming manner, and the predictor is updated each time a sample arrives. This online learning algorithm differs from traditional offline learning algorithms (which generate the best predictor by learning the entire training dataset at once). Specifically, it continuously optimizes the predictor through incremental learning, eliminating the need for pre-training the predictor and making it effectively suitable for online applications.

[0061] Then, the expected reading information and actual reading information in the current state are used as inputs to the FTRL online learning algorithm, and the parameters of the two embedding layers of the link prediction model are optimized by the FTRL online learning algorithm.

[0062] S3. Extract the embedded representation vector with network structure information corresponding to each shared file through the optimized embedding layer;

[0063] An embedding vector can be considered as a representation of an entity in a low-dimensional space. For example, in the field of NLP, a sentence can be transformed into a low-dimensional representation vector through an embedding model. Therefore, it can be understood that the sentence is "embedded" into a certain point in a low-dimensional space.

[0064] Specifically, the extraction of the embedded representation vector in this embodiment includes:

[0065] The first embedding layer extracts feature representation vectors from the naming information of the shared files through a text embedding module, and the feature representation vectors include the filename of each shared file and its corresponding file type suffix;

[0066] The feature representation vector is used as the input to the second embedding layer, and the second embedding layer extracts the embedding representation vector with network structure information from the location information of the shared file through the graph representation learning module;

[0067] The process of obtaining the location information of the shared file includes:

[0068] Obtain the network shared directory and construct a directory tree structure diagram between the shared files based on the network shared directory;

[0069] The location information of each shared file is determined based on the directory tree structure diagram.

[0070] S4. Input the embedded representation vector into the prediction output layer, and predict the prefetch information in the current state through the prediction output layer, and obtain at least one prefetch file through the prefetch information;

[0071] Specifically, the prediction rules of the prediction output layer include:

[0072] Obtain the currently read file based on the actual reading information in the current state;

[0073] The prediction matrix is ​​obtained by multiplying the embedding representation vector of the currently read file with the embedding representation vector matrix of the remaining shared files;

[0074] The prediction matrix is ​​normalized to obtain the pre-read probability for each shared file other than the currently read file. The pre-read information is a pre-read list obtained by sorting the pre-read probabilities in descending order of their values.

[0075] After predicting the corresponding pre-read file, the read system retrieves the content of the pre-read file through the corresponding pre-read mechanism, and caches the retrieved content through the readahead pre-read function. The cached file content is stored in the cache page cache so that the data can be read directly from the cache page cache during subsequent reading without the need for real-time data loading, thereby effectively reducing the latency caused by network transmission delay.

[0076] Based on the read-ahead prediction steps described above, this embodiment is further explained in detail as follows:

[0077] In the actual implementation of remote access via network sharing:

[0078] 1) During initial access, the user directly accesses one of the shared files 'a' via network sharing. In this current state, the directly accessed shared file 'a' is the currently read file 'a', and the corresponding information about this currently read file 'a' is the actual read information 'a' in the initial access state. Furthermore, in the initial access state, the expected read information is empty;

[0079] While the user is reading the currently reading file a, the link prediction model constructed in this invention predicts the next shared file to be read, and the prediction result is used to pre-read the corresponding shared file.

[0080] 2) The prediction process based on the initial access state is as follows:

[0081] First, the actual reading information 'a' is input into the FTRL online learning algorithm to initialize the parameters of the two embedding layers of the constructed link prediction model.

[0082] Next, the first embedding layer after initialization learns the pre-reading rules implied by the naming rules of each shared file. Specifically, a text embedding module is set up, and the first embedding layer extracts the filename and its corresponding file type suffix from the naming information of the shared files through the text embedding module, and integrates them to form a feature representation vector. Assuming that the naming information of the target shared file a (i.e., the currently read file a) is filename1.suffix, then filename1 represents the filename of the target shared file a, .suffix represents the file type suffix of the target shared file a, and the low-dimensional feature representation vector obtained based on this integration is F1.s;

[0083] Then, the aforementioned feature representation vector is input into the initialized second embedding layer, and the second embedding layer integrates the pre-read rules based on naming rules and the pre-read rules based on file location relationships. Specifically, this involves: obtaining the overall network shared directory and constructing a system based on the network shared directory, such as... Figure 2 The diagram shows a directory tree structure of shared files (specifically, each file and folder is abstracted as a node, and corresponding connections are made between nodes, where folders are not used for feature extraction). A graph representation learning module is set up to learn the positional information / relationships between shared files from the directory tree structure diagram, and extracts an embedding representation vector with network structure information corresponding to each shared file based on this positional information / relationship. For example, for the target shared file 'a' mentioned above, its extracted embedding representation vector is as follows: Figure 3 As shown;

[0084] Finally, the extracted embedding representation vectors are input into the prediction output layer, according to the following... Figure 6 The principle shown is to divide all the embedding representation vectors into a basic embedding representation vector a corresponding to the currently read file a, and a set of advanced embedding representation vectors p corresponding to the other shared files. Then, the basic embedding representation vector a and the set of advanced embedding representation vectors p are multiplied by matrix to obtain the prediction matrix. The prediction matrix is ​​then normalized to obtain the pre-read probability corresponding to each of the other shared files besides the currently read file a. The pre-read list (information) is obtained by sorting the pre-read probabilities in descending order of their values.

[0085] 3) Based on the above pre-reading list (information), further pre-reading of stationery and a second actual reading:

[0086] 3i) Assumption 1

[0087] Select the shared file b with the highest pre-read probability as the pre-read file b in the current initial state, and perform the pre-read operation in the initial access state. When the current reading file a is completed, the pre-read file b will have just completed its pre-read.

[0088] After completing the initial reading process described above, the user continues reading the next shared file. At this point, it is determined whether the shared file actually read by the user is the same as the predicted pre-read file b.

[0089] If they are the same, all the extracted embedding representation vectors are divided into a basic embedding representation vector b corresponding to the current (actual) reading file b, and an advanced embedding representation vector set p-1 corresponding to the other shared files (this set does not contain embedding representation vector a). Then, the pre-read file is predicted again by the prediction output layer (in the same way as the prediction in 2 above).

[0090] If they are different, obtain the current reading file c in the current (second reading) state, and obtain the actual reading information c and the expected reading information b through the current reading file c and the aforementioned pre-read file b respectively; preset the FTRL online learning algorithm, and use the actual reading information c and the expected reading information b as the input of the FTRL online learning algorithm, thereby realizing the following... Figure 4 The parameter optimization performed on the two embedding layers of the link prediction model is shown.

[0091] In the current (second reading) state, refer to Figure 5 As shown, based on the two embedding layers of the optimized link prediction model, the embedding representation vectors with network structure information corresponding to each shared file are re-extracted (the specific extraction method is the same as described in 2 above). Then, based on the updated embedding representation vectors, the pre-read file in the current (second reading) state is re-predicted (the prediction method is the same as in 2 above).

[0092] Repeat step 3 above to enable the link prediction model to continuously learn and optimize online, thereby gradually improving the accuracy of the predicted file.

[0093] 3ii) Assumption 2

[0094] According to the pre-read list (information), the first shared file b1 (with the highest pre-read probability) is selected as the first pre-read file b1 in the current initial state to perform the pre-read operation in the initial access state; and when the currently read file a has not yet finished reading, the pre-read file b1 has already finished pre-reading, so the second shared file b2 (with the second highest pre-read probability) is selected as the second pre-read file b2 in the current initial state.

[0095] After completing the initial reading (completing the reading of the current file a), the user continues to read the next shared file. At this point, it is determined whether the shared file actually read by the user is the same as the predicted pre-read files b1 and b2:

[0096] If the file is the same as the pre-read file b1, all the extracted embedding representation vectors are divided into a basic embedding representation vector b1 corresponding to the current (actual) read file b1, and an advanced embedding representation vector set p-1 corresponding to the remaining shared files (this set does not contain embedding representation vector a). Then, the pre-read list is predicted again by the prediction output layer (in the same way as in 2 above). If the pre-read list obtained by this re-prediction is matched again with the pre-read shared file b2 according to the pre-read list, then the pre-read is skipped.

[0097] If the file is the same as the pre-read file b2, then the current reading file b2 in the current (second reading) state is obtained. The actual reading information b2 and the expected reading information b1 are obtained from the current reading file b2 and the aforementioned pre-read file b1, respectively. An FTRL online learning algorithm is preset, and the actual reading information b2 and the expected reading information b1 are used as inputs to the FTRL online learning algorithm to optimize the parameters of the two embedding layers of the link prediction model. In the current (second reading) state, based on the optimized two embedding layers of the link prediction model, the embedding representation vectors with network structure information corresponding to each shared file are re-extracted (the specific extraction method is the same as described in section 2 above). Then, based on the updated embedding representation vectors, the pre-read list in the current (second reading) state is re-predicted (the prediction method is the same as in section 2 above). For the pre-read list obtained during this process, if the pre-read shared file b1 is matched again according to the pre-read list, then that pre-read is skipped.

[0098] If all are different, the current reading file c in the current (second reading) state is obtained. The actual reading information c and the expected reading information b1 and b2 are obtained respectively through the current reading file c and the aforementioned pre-read files b1 and b2. An FTRL online learning algorithm is preset, and the actual reading information c and the expected reading information b1 and b2 are used as inputs to the FTRL online learning algorithm to optimize the parameters of the two embedding layers of the link prediction model. In the current (second reading) state, based on the optimized two embedding layers of the link prediction model, the embedding representation vectors with network structure information corresponding to each shared file are re-extracted (the specific extraction method is the same as described in section 2 above). Then, based on the updated embedding representation vectors, the pre-read list in the current (second reading) state is re-predicted (the prediction method is the same as in section 2 above). For the pre-read list obtained during this process, if the pre-read shared file b1 or b2 is matched again according to the pre-read list, the pre-read is skipped.

[0099] Furthermore, in this embodiment, multiple pre-read files can be selected in this manner to complete sequential pre-reading and perform subsequent corresponding model optimization.

[0100] Repeat step 3 above to enable the link prediction model to continuously learn and optimize online, thereby gradually improving the accuracy of the predicted file.

[0101] In summary:

[0102] This embodiment uses the embedding representation of filenames and file graph structures, so that the link prediction model can simultaneously consider the potential pre-read rules in the filenames and the logical positional relationships between files when performing feature extraction and pre-read prediction.

[0103] This embodiment uses the FTRL online learning algorithm to optimize the link prediction model, thereby fully learning the user operations in the actual network sharing remote access process, so as to make prediction optimization based on the user's reading behavior habits, and flexibly apply it to different sharing scenarios and different access users;

[0104] This embodiment uses link prediction to predict the file to be read, without the need to set a specific output dimension, and can be effectively applied to update operations such as file creation and file deletion that may occur in network shared directories;

[0105] This embodiment is used in a network sharing scenario, which can effectively reduce the perceived delay caused by network transmission latency during remote access and improve access efficiency.

[0106] Device Examples

[0107] like Figure 7 As shown, the device for file pre-reading based on a network shared directory according to the present invention mainly includes the following structure:

[0108] A model building unit; used to build a link prediction model, wherein the link prediction model includes two embedding layers and a prediction output layer that work together in sequence;

[0109] The information acquisition unit is used to acquire the expected reading information, the actual reading information, and the pre-reading information predicted by the link prediction model in the current state.

[0110] The model optimization unit is used to optimize the parameters of the two embedding layers of the link prediction model based on the expected reading information and the actual reading information in the current state.

[0111] Specifically, the device provided in this embodiment optimizes the link prediction model and predicts the pre-read files according to the method provided in Embodiment 1 above.

[0112] In addition, based on the same inventive concept, the following embodiment is also provided in this invention: an electronic device, including a processor, a communication interface, a memory, and a communication bus;

[0113] The processor, communication interface, and memory communicate with each other via a communication bus.

[0114] The memory is used to store computer programs;

[0115] The processor is used to execute a computer program stored in the memory, and when the computer program is executed, it implements the method of file pre-reading based on a network shared directory according to the present invention.

[0116] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned terminal and other devices. The memory can include Random Access Memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory can also be at least one storage system located remotely from the aforementioned processor.

[0117] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0118] Furthermore, to achieve the above objectives, embodiments of the present invention also propose a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of file pre-reading based on a network shared directory of the present invention.

[0119] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable vehicles (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0120] The embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), 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 system that specifies functions in one or more boxes.

[0121] 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 an instruction set implemented in a process. Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0122] 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.

[0123] 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. "And / or" indicates that either one or both can be chosen. 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 the element.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.

Claims

1. A method for file pre-reading based on a network shared directory, characterized in that, include: S1. Construct a link prediction model, wherein the link prediction model includes two embedding layers and a prediction output layer that work together in sequence; S2. Optimize the parameters of the two embedding layers of the link prediction model using the expected reading information and the actual reading information in the current state; S3. Extract the embedded representation vector with network structure information corresponding to each shared file through the optimized embedding layer; S4. Input the embedded representation vector into the prediction output layer, and predict the pre-read information in the current state through the prediction output layer, and obtain at least one pre-read file through the pre-read information.

2. The method for file pre-reading based on a network shared directory according to claim 1, characterized in that, In step S2: Preset FTRL online learning algorithm; The expected reading information and actual reading information in the current state are used as inputs to the FTRL online learning algorithm, and the parameters of the two embedding layers of the link prediction model are optimized by the FTRL online learning algorithm.

3. The method for file pre-reading based on a network shared directory according to claim 2, characterized in that, In step S3: The first embedding layer extracts feature representation vectors from the naming information of the shared files through a text embedding module.

4. The method for file pre-reading based on a network shared directory according to claim 3, characterized in that: The feature representation vector includes the filename of each shared file and its corresponding file type suffix.

5. The method for file pre-reading based on a network shared directory according to claim 4, characterized in that, In step S3: The feature representation vector is used as the input to the second embedding layer, and the second embedding layer extracts the embedding representation vector with network structure information from the location information of the shared file through the graph representation learning module.

6. The method for file pre-reading based on a network shared directory according to claim 5, characterized in that, Obtaining the location information of the shared file includes: Obtain the network shared directory and construct a directory tree structure diagram between the shared files based on the network shared directory; The location information of each shared file is determined based on the directory tree structure diagram.

7. The method for file pre-reading based on a network shared directory according to claim 5, characterized in that, In step S4, the prediction rules of the prediction output layer include: Obtain the currently read file based on the actual reading information in the current state; The prediction matrix is ​​obtained by multiplying the embedding representation vector of the currently read file with the embedding representation vector matrix of the remaining shared files; The prediction matrix is ​​normalized to obtain the pre-read probability for each shared file other than the currently read file.

8. The method for file pre-reading based on a network shared directory according to claim 7, characterized in that, The pre-read information is a pre-read list obtained by sorting the pre-read probabilities in descending order.

9. A device for pre-reading files based on a network shared directory, characterized in that, include: A model building unit; used to build a link prediction model, wherein the link prediction model includes two embedding layers and a prediction output layer that work together in sequence; The information acquisition unit is used to acquire the expected reading information, the actual reading information, and the pre-reading information predicted by the link prediction model in the current state. The model optimization unit is used to optimize the parameters of the two embedding layers of the link prediction model based on the expected reading information and the actual reading information in the current state.

10. An electronic device, characterized in that: Includes processor, communication interface, memory, and communication bus; The processor, communication interface, and memory communicate with each other via a communication bus. The memory is used to store computer programs; The processor is used to execute a computer program stored in the memory, and when the computer program is executed, it implements the method for file pre-reading based on a network shared directory as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Optimization method and device for interleaving read and pre-read based on distributed file system

    CN113626381A

  • Operation method, system and equipment of file system and storage medium

    CN114756509A