File access cold and hot degree calculation method and system based on large model and medium

Through the file access hot and cold calculation method based on a large language model, the problem that the cache elimination algorithm in the existing technology cannot distinguish the intrinsic attributes of files is solved, precise cache management and personalized services are achieved, the cache hit rate and user experience are improved, and privacy and security are guaranteed.

CN120670335AActive Publication Date: 2025-09-19SICHUAN LEWEI TECH CO LTD

Patent Information

Application Number
CN202511171571.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-09-19
Estimated Expiration
2045-08-21

AI Technical Summary

Technical Problem

In the existing technology, cache eviction algorithms such as LRU and LFU cannot effectively distinguish the intrinsic attributes of files, resulting in important files being mistakenly eliminated, affecting cache effectiveness and user experience.

Method used

A file access hotness calculation method based on a large language model is adopted to generate file hotness scores through multi-dimensional feature extraction, semantic reasoning and adaptive learning, thereby optimizing cache management decisions.

Benefits of technology

It achieves accurate prediction of future file access probabilities, improves cache hit rates, ensures smooth access to critical data, and provides personalized adaptability and explainability to ensure user privacy and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670335A_ABST
    Figure CN120670335A_ABST
Patent Text Reader

Abstract

The invention discloses a file access cold and hot degree calculation method and system based on a large model and a medium, and belongs to the technical field of data storage. The method comprises the following steps: a system initialization and monitoring configuration stage: initializing a cold and hot degree calculation algorithm, and loading a pre-deployed large language model; a multi-dimensional feature extraction stage: extracting a multi-dimensional feature vector of the target file in real time; in the dynamic prompt generation stage, the multi-dimensional feature vectors are dynamically arranged into structured natural language prompts, and the structured natural language prompts are input into a large language model; in the popularity generation and cache management stage, a popularity score of each file is generated, and the cache space is managed according to the popularity score; and in the adaptive learning and optimization stage, an implicit user feedback loop is established, and when feedback signals with preset numerical values are accumulated, increment fine tuning is carried out on the large language model according to the collected feedback data. According to the method, the cache hit rate is remarkably improved, and the access fluency of the key data of the user is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage technology, and in particular to a method, system and medium for calculating the hotness and coldness of file access based on a large model. Background Art

[0002] With the widespread adoption of cloud computing, it's become common for users to interact with cloud storage through PC clients (such as those supporting the POSIX protocol). To accelerate file access and conserve network bandwidth, these clients commonly employ local hard drive caching. However, local cache space is limited. When the cache is full, cache eviction must be initiated to remove some files to make room for new data.

[0003] Existing technologies, such as the Least Recently Used (LRU) and Least Frequently Used (LFU) algorithms, base their decisions solely on the timestamp and frequency of file access. These algorithms treat all files equally and fail to discern their inherent properties. For example, if an important file named "Project Architecture Design - Final Draft.pptx" hasn't been accessed for several days, the LRU algorithm might prioritize its eviction, while retaining a frequently written but less valuable log file called "debug.log." This "mechanical" decision-making severely impacts cache effectiveness and can even cause user work to be interrupted at critical moments due to cache misses.

[0004] While some research has attempted to improve evaluation by introducing more features and machine learning models (such as decision trees and simple neural networks), these models typically require large amounts of labeled data for supervised training and have limited ability to understand the rich semantic information contained in unstructured text data such as file names and paths. They struggle to truly understand the importance of words like "draft," "final," and "backup," nor can they reason that files in the " / src / core / " directory are more worthy of preservation than files in the " / temp / logs / " directory. Summary of the Invention

[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and to provide a method, system and medium for calculating the hotness and coldness of file access based on a large model.

[0006] The object of the present invention is achieved through the following technical solutions: In a first aspect, the present invention provides: a method for calculating the file access hotness based on a large model, comprising the following steps: During the system initialization and monitoring configuration phase, the hot / cold calculation algorithm is initialized, the pre-deployed large language model is loaded, various operating parameters are read from the configuration file, and file operation events in the local cache directory are monitored. In the multi-dimensional feature extraction stage, the multi-dimensional feature vector of the target file is extracted in real time; In the dynamic prompt generation stage, the multi-dimensional feature vectors are dynamically arranged into structured natural language prompts and input into the large language model; During the popularity generation and cache management phase, a large language model is used to perform semantic reasoning on structured natural language prompts, generate a popularity score for each file, and manage cache space based on the popularity score. During the adaptive learning and optimization phase, an implicit user feedback loop is established. When a preset feedback signal is accumulated, the large language model is incrementally fine-tuned based on the collected feedback data.

[0007] Preferably, the large language model is a lightweight model that has been distilled and compressed; the operating parameters include the warning threshold of cache space occupancy, the time interval of periodic evaluation, the path of the LLM model file and the backup elimination algorithm; the file operation events include file opening, reading, writing, closing, renaming and deleting.

[0008] Preferably, the multidimensional feature vector includes at least recency feature, frequency feature, semantic feature and context feature; and the multidimensional feature extraction stage further includes the following steps: When a file access event is monitored, the last access time and last modification timestamp of the accessed file are updated in real time to obtain the recency feature; Maintain a counter structure for each cache file in memory to record the number of accesses in different time windows to obtain frequency characteristics; The target file's file name is segmented and matched with a predefined keyword library. The complete directory path where the target file is located is then analyzed, the path depth is calculated, and keywords in the path are identified to obtain semantic features. According to the extension of the target file, the basic importance score of the file type is queried from the configurable mapping table; then the parent directory of the target file is traversed upward to find whether there is a project identification file. If so, the target file is marked as a project file, and finally the context feature is obtained.

[0009] Preferably, the dynamic prompt generation stage further includes the following steps: When the cache space usage exceeds the preset warning threshold or the periodic evaluation timer is triggered, the hotness and coldness evaluation process of some or all cached files is started; When the number of cached files is greater than the preset number of files, a candidate file set is preliminarily screened according to the preset conditions, and only the candidate file set is evaluated for hotness and coldness; Traverse each candidate file, fill the multi-dimensional feature vector of each candidate file into the preset natural voice prompt template, and generate a structured natural language prompt; The structured natural language prompts of multiple candidate documents are then batched and combined into a batch and submitted to the large language model at one time.

[0010] Preferably, the heat generation and cache management stage further includes the following steps: The large language model performs independent semantic understanding and logical reasoning on each batch of prompts; The large language model outputs structured data, including a unique identifier for each candidate document, a calculated popularity score, and optional reasoning text; Update the popularity score of each candidate file to the global file metadata mapping table maintained by the system. If the large language model fails to return a valid popularity score for a file, activate the backup strategy to assign a score to the file and update it to the global file metadata mapping table; When cache space needs to be released, the popularity scores of all or some files are retrieved from the global file metadata mapping table, and a list of files to be eliminated is generated based on the popularity scores. Then, cache elimination is performed, and the files with the lowest heat scores are eliminated from the list of files to be eliminated in sequence until enough cache space is released. At the same time, detailed information about each elimination operation is recorded, including the file name of the deleted file, the final heat score, the reasoning given by the large language model, and the operation timestamp.

[0011] Preferably, the adaptive learning and optimization stage further includes the following steps: If a discarded file is re-downloaded from the cloud by the user within the preset time, a feedback signal is generated and the error elimination event is recorded.

[0012] Preferably, a user rule intervention mechanism is also included: receiving mandatory retention rules and / or score correction rules configured by the user, and executing them after the large language model is scored.

[0013] Preferably, the mandatory retention rule is to never eliminate all files in a specified directory, and the score correction rule is to set an upper limit on the popularity score of files in a preset format.

[0014] A second aspect of the present invention provides: a file access hotness calculation system based on a large model, for implementing any of the above-mentioned file access hotness calculation methods based on a large model, comprising: The system initialization and monitoring configuration module is used to initialize the hot and cold calculation algorithm, load the pre-deployed large language model, read various operating parameters from the configuration file, and monitor file operation events in the local cache directory; Multi-dimensional feature extraction module, used to extract multi-dimensional feature vectors of target files in real time; Dynamically generate prompts module, which is used to dynamically organize multi-dimensional feature vectors into structured natural language prompts and input them into the large language model; The popularity generation and cache management module is used to use a large language model to perform semantic reasoning on structured natural language prompts, generate a popularity score for each file, and manage cache space based on the popularity score; The adaptive learning and optimization module is used to establish an implicit user feedback loop. When the feedback signal reaches a preset value, the large language model is incrementally fine-tuned based on the collected feedback data.

[0015] The third aspect of the present invention provides: a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, any of the above-mentioned large-model-based file access hotness calculation methods is implemented.

[0016] The beneficial effects of the present invention are: 1) By leveraging the large language model's ability to understand deep information such as file semantics, path context, and project relevance, this invention achieves accurate predictions of future file access probabilities, enabling optimal cache retention and elimination decisions. This significantly improves cache hit rates, ensures smooth access to key user data, and offers excellent interpretability and adaptability to individual user habits.

[0017] 2) This invention elevates file popularity assessment from a single dimension based on "access history" to a comprehensive dimension based on "semantic understanding." The large language model, like a human expert, deeply analyzes the semantic connotations of file names and directory structures (such as "core," "temporary," and "backup") and performs logical reasoning based on context. This enables it to predict future file access probabilities with far greater accuracy than traditional LRU / LFU algorithms, effectively preventing the erroneous elimination of important files, significantly improving cache hit rates and optimizing user access speed and experience for critical data.

[0018] 3) By establishing an implicit user feedback loop (e.g., monitoring files that are discarded and then immediately re-downloaded), this invention enables continuous fine-tuning of the local model, gradually tailoring its decision-making logic to the specific user's workflow and file usage habits. This means the system will become increasingly adaptable to diverse roles, such as software developers, designers, and copywriters, ultimately enabling highly personalized intelligent caching services tailored to each individual.

[0019] 4) This invention utilizes "chain-of-thought" technology, allowing the model to simultaneously output the rationale for its decision when assigning a score. This makes every elimination action transparent, traceable, and auditable, significantly enhancing the system's credibility and maintainability. More importantly, because the model and all data processing processes are executed entirely locally on the user's PC, no file metadata or user behavior information needs to be uploaded to the cloud, fundamentally eliminating the risk of data leakage and fully protecting user privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 Detailed method flow chart of the present invention. DETAILED DESCRIPTION

[0021] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0022] See Figure 1 The first aspect of the present invention provides: a method for calculating the file access hotness based on a large model, comprising the following steps: During the system initialization and monitoring configuration phase, the hot / cold calculation algorithm is initialized, the pre-deployed large language model is loaded, various operating parameters are read from the configuration file, and file operation events in the local cache directory are monitored. In the multi-dimensional feature extraction stage, the multi-dimensional feature vector of the target file is extracted in real time; In the dynamic prompt generation stage, the multi-dimensional feature vectors are dynamically arranged into structured natural language prompts and input into the large language model; During the popularity generation and cache management phase, a large language model is used to perform semantic reasoning on structured natural language prompts, generate a popularity score for each file, and manage cache space based on the popularity score. During the adaptive learning and optimization phase, an implicit user feedback loop is established. When a preset feedback signal is accumulated, the large language model is incrementally fine-tuned based on the collected feedback data.

[0023] In this embodiment, the present invention is applied to intelligent cache management on PC clients. This approach monitors and extracts multi-dimensional, deep-level features of cached files, including but not limited to access history, file metadata, and semantic information and contextual associations parsed from file names and paths. Its core innovation lies in dynamically organizing these complex features into structured natural language prompts and submitting them to a large language model deployed locally on the PC for inference. LLM leverages its powerful semantic understanding and logical association capabilities to conduct an in-depth assessment of the file's comprehensive value and future access probability, outputting a precise, quantitative "heat score."

[0024] The disclosed solution, through a series of refined steps, elevates file popularity calculation from a simple numerical statistical task to a comprehensive reasoning task performed by a large language model. The algorithm's core process includes: initializing the system and configuring monitoring; defining and deeply extracting multidimensional feature vectors of files; dynamically generating natural language analysis prompts for the LLM; invoking the local LLM for inference and parsing its output; executing cache eviction decisions based on the popularity scores generated by the LLM; and implementing continuous learning and optimization of the algorithm through a feedback mechanism.

[0025] In some embodiments, the large language model is a lightweight model that has been distilled and compressed; the operating parameters include a warning threshold for cache space occupancy, a time interval for periodic evaluation, a path for the LLM model file, and a backup elimination algorithm; and the file operation events include file opening, reading, writing, closing, renaming, and deleting.

[0026] In this embodiment, the system initialization and monitoring configuration phase includes the following: The hot / cold calculation algorithm is initialized and runs as a background service when the PC client program is launched or the user logs in. Model loading: The system loads a pre-deployed, lightweight, or distilled large language model from a specified path on the local hard drive into the computer's memory (or graphics card memory), preparing to receive inference requests.

[0027] Configuration parameter loading: Read various operating parameters from the configuration file, including the cache space occupancy warning threshold (such as 90%), the periodic evaluation interval (such as every hour), the LLM model file path, and the backup elimination algorithm (such as LRU).

[0028] File system I / O monitoring: By hooking or subscribing to event notifications from clients that support the POSIX protocol, we can monitor file operations on the local cache directory. Monitored events include file open, read, write, close, rename, and delete.

[0029] In some embodiments, the multidimensional feature vector includes at least recency features, frequency features, semantic features, and context features; and the multidimensional feature extraction stage further includes the following steps: When a file access event is monitored, the last access time and last modification timestamp of the accessed file are updated in real time to obtain the recency feature; Maintain a counter structure for each cache file in memory to record the number of accesses in different time windows to obtain frequency characteristics; The target file's file name is segmented and matched with a predefined keyword library. The complete directory path where the target file is located is then analyzed, the path depth is calculated, and keywords in the path are identified to obtain semantic features. According to the extension of the target file, the basic importance score of the file type is queried from the configurable mapping table; then the parent directory of the target file is traversed upward to find whether there is a project identification file. If so, the target file is marked as a project file, and finally the context feature is obtained.

[0030] In this embodiment, the multi-dimensional feature extraction stage includes the following: defining a comprehensive feature vector for each file, which contains at least four categories: recency, frequency, semantic, and contextual features.

[0031] Recency feature extraction: When a file access event is monitored, the last access timestamp and last modification timestamp of the file are updated in real time.

[0032] Frequency feature extraction and maintenance: The algorithm maintains a counter structure in memory for each cache file to record the number of visits within different time windows, such as the number of visits in the past hour, the number of visits in the past 24 hours, and the total number of visits in the lifetime.

[0033] Semantic feature extraction (file name analysis): File names are segmented and matched against a predefined keyword library. The keyword library contains positive words (such as "final", "master", "release", "core"), negative words (such as "temp", "log", "bak", "draft"), and neutral words, and each is assigned different weights.

[0034] Semantic feature extraction (path analysis): Analyze the complete directory path where the file resides. This step includes calculating the path depth and identifying keywords in the path (such as "src", "include", "core", "docs", "archive", and "download").

[0035] Contextual feature extraction (file type): Based on the file extension (e.g., .docx, .pptx, .py, .go, .dll, .log), the basic importance score of the file type is queried from a configurable mapping table.

[0036] Contextual feature extraction (project relevance analysis): The algorithm traverses the file's parent directory upwards to check for project identification files (such as .git directories, .idea directories, pom.xml, and package.json). If present, the file is marked as a "project file" and the project name is recorded, which is a key positive feature.

[0037] In some embodiments, the dynamic prompt generation stage further includes the following steps: When the cache space usage exceeds the preset warning threshold or the periodic evaluation timer is triggered, the hotness and coldness evaluation process of some or all cached files is started; When the number of cached files is greater than the preset number of files, a candidate file set is preliminarily screened according to the preset conditions, and only the candidate file set is evaluated for hotness and coldness; Traverse each candidate file, fill the multi-dimensional feature vector of each candidate file into the preset natural voice prompt template, and generate a structured natural language prompt; The structured natural language prompts of multiple candidate documents are then batched and combined into a batch and submitted to the large language model at one time.

[0038] In this embodiment, the dynamic generation prompt stage includes the following contents: evaluation process triggering: when the cache space usage exceeds the set warning threshold, or when the timer of periodic evaluation is triggered, the hotness evaluation process of some or all cache files is officially started.

[0039] Candidate file screening: To optimize performance, especially when the number of cached files is huge, the algorithm can first use simple strategies such as LRU to preliminarily screen out the set of candidate files that are "most likely to be eliminated" (for example, the 20% of files that have not been accessed for the longest time) and only perform LLM evaluation on this set.

[0040] Structured natural language prompt generation: This involves traversing each candidate file and applying all features extracted and quantified during the multi-dimensional feature extraction phase to a pre-defined, structured natural language prompt template. For example, "Evaluate file popularity. File: {File name: 'renderer.cpp', Path context: 'Project core code directory', File type: 'C++ source code', Access history: 'Recently active'}. Please output a popularity score between 0.0 and 1.0 and a reason." Inference request batching (Batching): To improve GPU or CPU processing efficiency, analysis prompts from multiple files are combined into a batch and submitted to the large language model at one time.

[0041] In some embodiments, the heat generation and cache management stage further includes the following steps: The large language model performs independent semantic understanding and logical reasoning on each batch of prompts; The large language model outputs structured data, including a unique identifier for each candidate document, a calculated popularity score, and optional reasoning text; Update the popularity score of each candidate file to the global file metadata mapping table maintained by the system. If the large language model fails to return a valid popularity score for a file, activate the backup strategy to assign a score to the file and update it to the global file metadata mapping table; When cache space needs to be released, the popularity scores of all or some files are retrieved from the global file metadata mapping table, and a list of files to be eliminated is generated based on the popularity scores. Then, cache elimination is performed, and the files with the lowest heat scores are eliminated from the list of files to be eliminated in sequence until enough cache space is released. At the same time, detailed information about each elimination operation is recorded, including the file name of the deleted file, the final heat score, the reasoning given by the large language model, and the operation timestamp.

[0042] In this embodiment, the heat generation and cache management phase includes the following: Calling the local LLM for reasoning: Using the internal API to call the loaded local LLM, the batched prompts are used as input. The LLM performs independent semantic understanding and logical reasoning on each prompt.

[0043] LLM response parsing: Receives LLM output. The output is in structured data format (e.g., JSON) and contains a unique identifier for each file, the calculated popularity score, and optional textual justification for the reasoning. Parse this output to extract the required information.

[0044] Hotness score storage and update: The hotness score of each file obtained from LLM is updated to a global file metadata mapping table (Cache Map) maintained by the system.

[0045] Inference Failure Tolerance: If the LLM fails to return a valid score for a file for any reason (e.g., model error, timeout), the algorithm will initiate a fallback strategy. For example, it may assign a low default score to the file or use the file's LRU / LFU ranking as a temporary score to ensure the robustness of the elimination process.

[0046] Generate elimination sequence: When space needs to be freed up, the algorithm retrieves the heat scores of all (or candidate files) from the metadata mapping table and generates a list of files to be eliminated from low to high scores.

[0047] Perform cache eviction: The algorithm follows the generated eviction sequence, starting from the top of the list, and issues file deletion instructions to the POSIX client in sequence until enough cache space is freed.

[0048] Operation logging: Detailed information about each elimination operation, including the name of the deleted file, its final popularity score, the reasoning given by the LLM (if any), and the operation timestamp, will be recorded in the log file for subsequent auditing and analysis.

[0049] In some embodiments, the adaptive learning and optimization stage further includes the following steps: If a discarded file is re-downloaded from the cloud by the user within the preset time, a feedback signal is generated and the error elimination event is recorded.

[0050] In this embodiment, the adaptive learning and optimization phase includes the following: Establishing an implicit user feedback loop: The algorithm continuously monitors user behavior. For example, if a recently eliminated file is quickly re-downloaded from the cloud, this constitutes a strong negative feedback signal. The system records such "false elimination" events.

[0051] Incremental model fine-tuning: After accumulating enough feedback signals (such as "erroneous elimination" cases), the system can use this data in the background to incrementally fine-tune the local LLM, making its decision logic more in line with the work habits of specific users.

[0052] In some embodiments, a user rule intervention mechanism is further included: receiving mandatory retention rules and / or score correction rules configured by the user, and executing them after the large language model is scored.

[0053] In this embodiment, user-defined rules are allowed: the system provides a user interface or configuration file that allows users to define high-priority rules, such as "never eliminate all files in a specified directory" or "limit the heat score of all .log files to 0.2." These rules are executed after LLM scoring and serve as the basis for rejecting or adjusting the final decision.

[0054] The present invention also includes the following steps: Periodic global re-evaluation stage: Even if the cache pressure is not large, a comprehensive heat re-evaluation should be performed on all files in the cache according to the set period to prevent the file heat information from being outdated due to long-term non-elimination operations.

[0055] This invention creatively reframes file popularity assessment from a statistical problem based on historical access records to a semantic reasoning problem based on multidimensional features. For the first time in the cache management field, semantic information and contextual associations (such as project ownership) embedded in unstructured text such as file names and directory paths are used as core features and serve as key inputs for large language models in decision-making.

[0056] In some embodiments, the mandatory retention rule is to never eliminate all files in a specified directory, and the score correction rule is to set an upper limit on the popularity score of files in a preset format.

[0057] A second aspect of the present invention provides: a file access hotness calculation system based on a large model, for implementing any of the above-mentioned file access hotness calculation methods based on a large model, comprising: The system initialization and monitoring configuration module is used to initialize the hot and cold calculation algorithm, load the pre-deployed large language model, read various operating parameters from the configuration file, and monitor file operation events in the local cache directory; Multi-dimensional feature extraction module, used to extract multi-dimensional feature vectors of target files in real time; Dynamically generate prompts module, which is used to dynamically organize multi-dimensional feature vectors into structured natural language prompts and input them into the large language model; The popularity generation and cache management module is used to use a large language model to perform semantic reasoning on structured natural language prompts, generate a popularity score for each file, and manage cache space based on the popularity score; The adaptive learning and optimization module is used to establish an implicit user feedback loop. When the feedback signal reaches a preset value, the large language model is incrementally fine-tuned based on the collected feedback data.

[0058] The third aspect of the present invention provides: a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, any of the above-mentioned large-model-based file access hotness calculation methods is implemented.

[0059] The foregoing description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Rather, the present invention can be used in various other combinations, modifications, and environments and can be modified within the scope of the concept described herein through the above teachings or techniques or knowledge in the relevant field. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be protected by the appended claims.

Claims

1. A method for calculating file access hotness and coldness based on a large model, characterized by: The following steps are involved: During the system initialization and monitoring configuration phase, the hot / cold calculation algorithm is initialized, the pre-deployed large language model is loaded, various operating parameters are read from the configuration file, and file operation events in the local cache directory are monitored. In the multi-dimensional feature extraction stage, the multi-dimensional feature vector of the target file is extracted in real time; In the dynamic prompt generation stage, the multi-dimensional feature vectors are dynamically arranged into structured natural language prompts and input into the large language model; During the popularity generation and cache management phase, a large language model is used to perform semantic reasoning on structured natural language prompts, generate a popularity score for each file, and manage cache space based on the popularity score. During the adaptive learning and optimization phase, an implicit user feedback loop is established. When a preset feedback signal is accumulated, the large language model is incrementally fine-tuned based on the collected feedback data.

2. The method for calculating file access hotness and coldness based on a large model according to claim 1, characterized in that: The large language model is a lightweight model that has been distilled and compressed; the operating parameters include the warning threshold of cache space occupancy, the time interval of periodic evaluation, the path of the LLM model file and the backup elimination algorithm; the file operation events include file opening, reading, writing, closing, renaming and deleting.

3. The method for calculating file access hotness and coldness based on a large model according to claim 1, characterized in that: The multi-dimensional feature vector includes at least recency feature, frequency feature, semantic feature and context feature; The multi-dimensional feature extraction stage further includes the following steps: When a file access event is monitored, the last access time and last modification timestamp of the accessed file are updated in real time to obtain the recency feature; Maintain a counter structure for each cache file in memory to record the number of accesses in different time windows to obtain frequency characteristics; The target file's file name is segmented and matched with a predefined keyword library. The complete directory path where the target file is located is then analyzed, the path depth is calculated, and keywords in the path are identified to obtain semantic features. According to the extension of the target file, the basic importance score of the file type is queried from the configurable mapping table; then the parent directory of the target file is traversed upward to find whether there is a project identification file. If so, the target file is marked as a project file, and finally the context feature is obtained.

4. The method for calculating file access hotness and coldness based on a large model according to claim 1, characterized in that: The dynamic generation prompt stage further includes the following steps: When the cache space usage exceeds the preset warning threshold or the periodic evaluation timer is triggered, the hotness and coldness evaluation process of some or all cached files is started; When the number of cached files is greater than the preset number of files, a candidate file set is preliminarily screened according to the preset conditions, and only the candidate file set is evaluated for hotness and coldness; Traverse each candidate file, fill the multi-dimensional feature vector of each candidate file into the preset natural voice prompt template, and generate a structured natural language prompt; The structured natural language prompts of multiple candidate documents are then batched and combined into a batch and submitted to the large language model at one time.

5. The method for calculating file access hotness and coldness based on a large model according to claim 4 is characterized in that: The heat generation and cache management stage further includes the following steps: The large language model performs independent semantic understanding and logical reasoning on each batch of prompts; The large language model outputs structured data, including a unique identifier for each candidate document, a calculated popularity score, and optional reasoning text; Update the popularity score of each candidate file to the global file metadata mapping table maintained by the system. If the large language model fails to return a valid popularity score for a file, activate the backup strategy to assign a score to the file and update it to the global file metadata mapping table; When cache space needs to be released, the popularity scores of all or some files are retrieved from the global file metadata mapping table, and a list of files to be eliminated is generated based on the popularity scores. Then, cache elimination is performed, and the files with the lowest heat scores are eliminated from the list of files to be eliminated in sequence until enough cache space is released. At the same time, detailed information about each elimination operation is recorded, including the file name of the deleted file, the final heat score, the reasoning given by the large language model, and the operation timestamp.

6. The method for calculating file access hotness and coldness based on a large model according to claim 5, characterized in that: The adaptive learning and optimization stage further includes the following steps: If a discarded file is re-downloaded from the cloud by the user within the preset time, a feedback signal is generated and the error elimination event is recorded.

7. The method for calculating file access hotness and coldness based on a large model according to any one of claims 1 to 6, characterized in that: It also includes a user rule intervention mechanism: it receives user-configured mandatory retention rules and / or score correction rules and executes them after the large language model is scored.

8. The method for calculating file access hotness and coldness based on a large model according to claim 7, characterized in that: The mandatory retention rule is to never eliminate all files in a specified directory, and the score correction rule is to set an upper limit on the popularity score of files in a preset format.

9. A file access hotness calculation system based on a large model, characterized by: The method for calculating the file access hotness and coldness based on a large model according to any one of claims 1 to 8 comprises: The system initialization and monitoring configuration module is used to initialize the hot and cold calculation algorithm, load the pre-deployed large language model, read various operating parameters from the configuration file, and monitor file operation events in the local cache directory; Multi-dimensional feature extraction module, used to extract multi-dimensional feature vectors of target files in real time; A dynamic prompt generation module is used to dynamically organize multi-dimensional feature vectors into structured natural language prompts and input them into the large language model; The popularity generation and cache management module is used to use a large language model to perform semantic reasoning on structured natural language prompts, generate a popularity score for each file, and manage cache space based on the popularity score; The adaptive learning and optimization module is used to establish an implicit user feedback loop. When the feedback signal reaches a preset value, the large language model is incrementally fine-tuned based on the collected feedback data.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are loaded and executed by the processor, the method for calculating the file access hotness and coldness based on a large model as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Data updating method and device, equipment, storage medium and program product

    CN118861071A

  • Method, system and device for improving retrieval performance of RAG knowledge base and medium

    CN118981511A

  • Large language model reasoning optimization method and system based on error strategy feedback

    CN119358663A

  • Text data processing method and device, computer equipment and medium

    CN119938906A

  • Systems and methods for dynamic large language model prompt generation

    US20240330579A1

Cited By

  • Public cloud storage and local storage hybrid storage method based on deep learning

    CN121301294A