A method, system, device, medium, and product for optimizing the performance of cloud applications accessing shared storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-26
- Publication Date
- 2026-08-14
AI Technical Summary
[0007]本申请的目的是提供一种云应用访问共享存储性能优化方法、系统、设备、介质及产品,以解决现有技术中云应用通过网络磁盘挂载共享存储目录时存在的性能瓶颈问题
本申请建立与远端共享存储服务器的连接,并将远端共享存储服务器的目标目录挂载为本地虚拟挂载点;接收应用程序对本地虚拟挂载点中目标文件的访问请求;若所述访问请求为读取请求,检测所述目标文件是否存在于本地缓存中;若所述目标文件存在于本地缓存中,执行读取操作;若所述目标文件不存在于本地缓存中,获取目标文件的特征参数,并将特征参数输入预设的时序预测模型,得到缓存决策结果;根据所述缓存决策结果,执行读取操作;后续对该目标文件的任何读取操作均直接从本地缓存响应,无需重复网络传输;如果不需要直接读取,直接写入;通过预设的时序预测模型精准缓存需要缓存的目标文件,从而大幅降低读取延迟。若访问请求为写入请求,检测目标文件是否存在于本地缓存中;若目标文件存在于本地缓存中,将写入数据写入本地缓存,并向应用程序返回写入成功响应,随后通过后台异步任务将本地缓存中的变更数据上传至远端共享存储服务器;若目标文件不存在于本地缓存中,将写入数据同步上传至远端共享存储服务器;当应用程序保存目标文件时,数据立即写入本地缓存并即时返回成功,应用程序无需等待网络上传完成;随后在后台,通过后台异步任务将变更数据可靠上传至远端共享存储服务器,确保数据最终一致性。本申请通过本地缓存加速读取+后台异步任务写回解耦I/O+时序预测模型的预判的协同机制,彻底避免了传统网络文件系统因频繁网络交互导致的响应延迟与操作卡顿,减少了频繁网络I/O、降低了延迟响应及严重的I/O阻塞,显著提升应用的实时性与用户体验,尤其适用于大文件处理、高并发访问及网络波动等典型云场景。
Smart Images

Figure CN122261494B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing and data storage, and in particular to a method, system, device, medium and product for optimizing the performance of cloud application access to shared storage. Background Technology
[0002] In current integrated simulation design platforms and cloud application environments, user data is typically stored centrally on remote shared storage servers to achieve unified data management and collaborative access across multiple nodes. When applications deployed on cloud computing servers need to access this data, they must mount the remote shared directory as a local disk via a network file system.
[0003] Specifically, in a Windows cloud server environment, the SMB (Samba) service is typically enabled on a remote shared storage server, and the target directory is shared; Windows nodes mount it as a local disk using network drive mapping for application use. In a Linux cloud server environment, protocols such as Network File System (NFS) are commonly used, with client tools mounting the shared directory to a local file system path.
[0004] While the above method achieves cross-platform shared access, its underlying mechanism has significant performance flaws: all file read and write operations are executed in real-time through the standard file interface to the remote shared storage server, and the system does not cache file content locally. This means that each time a file is opened, the remote data must be read completely, and each save operation must wait for the data to be synchronously written to the remote server before returning. This strong synchronous mechanism of "read-as-you-go, write-as-you-transfer" leads to frequent network round trips and input / output (I / O) interface blockage. In cloud environments with high concurrency, large files, or high network latency, this strong synchronous, uncached access mode can easily cause application lag, response delays, or even operation timeouts, severely impacting the user experience and system throughput efficiency in high-performance computing scenarios such as simulation design.
[0005] In existing technologies, such as Figure 1As shown, directories on remote shared storage servers (such as storage systems supporting NFS, SMB, etc.) are typically mounted directly to the local file system of the cloud server where the application resides, forming a network disk. The application accesses files in this mount point through a standard file interface, and all read and write operations are executed in real-time through the remote shared storage server. This approach has significant performance drawbacks: every time a file in the mounted directory is opened or read, the system must fetch data from the remote shared storage server in real-time over the network, without caching the file content in local memory or on the local disk; similarly, write operations must also be synchronously transmitted to the remote shared storage server before returning. In cloud environments with high network latency or dense concurrent access, this can easily lead to application lag, response delays, or even service timeouts, severely restricting the overall performance and user experience of cloud applications.
[0006] Therefore, there is an urgent need for a solution that can address the performance bottleneck issues existing in cloud applications when mounting shared storage directories via network disks, in order to reduce frequent network I / O, lower latency response, and prevent severe I / O blocking. Summary of the Invention
[0007] The purpose of this application is to provide a method, system, device, medium, and product for optimizing the performance of cloud applications accessing shared storage, so as to solve the performance bottleneck problem existing in the prior art when cloud applications mount shared storage directories through network disks.
[0008] To achieve the above objectives, this application provides the following solution.
[0009] In a first aspect, this application provides a method for optimizing the performance of cloud application access to shared storage, applied to a cloud server, wherein a cache file system program runs on the cloud server, and includes the following steps.
[0010] Establish a connection with the remote shared storage server and mount the target directory of the remote shared storage server as a local virtual mount point.
[0011] Receive the application's access request for the target file in the local virtual mount point.
[0012] If the access request is a read request, check whether the target file exists in the local cache.
[0013] If the target file exists in the local cache, perform a read operation.
[0014] If the target file does not exist in the local cache, the feature parameters of the target file are obtained, and the feature parameters are input into a preset time series prediction model to obtain the cache decision result.
[0015] Based on the cache decision result, perform a read operation.
[0016] If the access request is a write request, check whether the target file exists in the local cache.
[0017] If the target file exists in the local cache, the data is written to the local cache, and a write success response is returned to the application. Then, the changed data in the local cache is uploaded to the remote shared storage server via a background asynchronous task.
[0018] If the target file does not exist in the local cache, the written data will be synchronously uploaded to the remote shared storage server.
[0019] Secondly, this application provides a cloud application access shared storage performance optimization system, which includes the following modules.
[0020] The mounting module is used to establish a connection with a remote shared storage server and mount the target directory of the remote shared storage server as a local virtual mount point.
[0021] The receiving module is used to receive access requests from applications for target files in the local virtual mount point.
[0022] The read processing module is used to detect whether the target file exists in the local cache if the access request is a read request; if the target file exists in the local cache, perform a read operation; if the target file does not exist in the local cache, obtain the feature parameters of the target file, input the feature parameters into a preset time series prediction model to obtain a cache decision result; and perform a read operation according to the cache decision result.
[0023] The write processing module is used to detect whether the target file exists in the local cache if the access request is a write request; if the target file exists in the local cache, the write data is written to the local cache and a write success response is returned to the application, and then the changed data in the local cache is uploaded to the remote shared storage server through a background asynchronous task; if the target file does not exist in the local cache, the write data is synchronously uploaded to the remote shared storage server.
[0024] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for optimizing the performance of cloud application access to shared storage.
[0025] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for optimizing the performance of cloud application access to shared storage.
[0026] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for optimizing the performance of cloud application access to shared storage.
[0027] According to the specific embodiments provided in this application, this application has the following technical effects: This application establishes a connection with a remote shared storage server and mounts the target directory of the remote shared storage server as a local virtual mount point; it receives access requests from applications for target files in the local virtual mount point; if the access request is a read request, it checks whether the target file exists in the local cache; if the target file exists in the local cache, it performs a read operation; if the target file does not exist in the local cache, it obtains the characteristic parameters of the target file and inputs the characteristic parameters into a preset time-series prediction model to obtain a cache decision result; based on the cache decision result, it performs a read operation; any subsequent read operation on the target file is directly responded to from the local cache without repeated network transmission; if direct reading is not required, it is directly written; the preset time-series prediction model accurately caches the target files that need to be cached, thereby significantly reducing read latency. If the access request is a write request, the system checks if the target file exists in the local cache. If the target file exists in the local cache, the write data is written to the local cache, and a write success response is returned to the application. Subsequently, the changed data in the local cache is uploaded to the remote shared storage server via a background asynchronous task. If the target file does not exist in the local cache, the write data is synchronously uploaded to the remote shared storage server. When the application saves the target file, the data is immediately written to the local cache and a success response is returned instantly, without the application needing to wait for the network upload to complete. Subsequently, in the background, the changed data is reliably uploaded to the remote shared storage server via a background asynchronous task, ensuring eventual data consistency. This application, through a collaborative mechanism of accelerated reading via local cache, decoupling I / O via background asynchronous task write-back, and prediction via a timing prediction model, completely avoids the response latency and operational stuttering caused by frequent network interactions in traditional network file systems. It reduces frequent network I / O, lowers latency response, and reduces severe I / O blocking, significantly improving the real-time performance and user experience of the application. It is particularly suitable for typical cloud scenarios such as large file processing, high-concurrency access, and network fluctuations. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a flowchart of the existing technology workflow.
[0030] Figure 2 This is a flowchart illustrating a method for optimizing the performance of cloud application access to shared storage, provided as an embodiment of this application.
[0031] Figure 3 This is a schematic diagram of the GRU neural network structure.
[0032] Figure 4 This is a schematic diagram of the architecture of a cloud application access shared storage performance optimization method provided in an embodiment of this application. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] To make the objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0035] like Figure 2 As shown in the figure, this application embodiment provides a method for optimizing the performance of cloud application access to shared storage, which is applied to a cloud server. The cloud server runs a cache file system program and includes the following steps.
[0036] S1: Establish a connection with the remote shared storage server and mount the target directory of the remote shared storage server as a local virtual mount point.
[0037] S2: Receive the application's access request for the target file in the local virtual mount point.
[0038] S3: If the access request is a read request, check if the target file exists in the local cache. If yes, execute S4; otherwise, execute S5.
[0039] S4: Perform a read operation.
[0040] S5: Obtain the feature parameters of the target file and input the feature parameters into a preset time series prediction model to obtain the caching decision result.
[0041] S6: Based on the cache decision result, perform a read operation.
[0042] S7: If the access request is a write request, check if the target file exists in the local cache. If yes, execute S8; otherwise, execute S9.
[0043] S8: Write the data to the local cache and return a write success response to the application. Then, upload the changed data in the local cache to the remote shared storage server via a background asynchronous task.
[0044] S9: Synchronously upload the written data to the remote shared storage server.
[0045] This application constructs a high-performance caching layer locally on a cloud server and combines a time-series prediction model to dynamically determine the caching necessity of target files, thereby achieving intelligent preloading and asynchronous persistent write-back. This effectively reduces access latency and blocking issues caused by frequent network I / O, while avoiding the occupation of resources by invalid caching through accurate caching decisions. As a result, it significantly improves the response speed of cloud applications and the overall stability of the cache file system program in complex application scenarios.
[0046] Specifically, when an application on a cloud server accesses a network disk directory mounted on a remote shared storage server, upon first opening the target file, characteristic parameters such as file size, file type, application name, available local storage resources, network latency, bandwidth fluctuations, and server load status are extracted and input into a preset time-series prediction model. This model combines the aforementioned characteristic parameters with real-time collected network latency, bandwidth fluctuations, and server load status to make a comprehensive judgment and output a caching decision result regarding whether to cache the target file. If caching is deemed necessary, the target file is fully loaded onto local high-speed storage media (such as memory or a local SSD) and a cache copy is created. Subsequent read requests for the target file are directly responded to by the local cache, avoiding repeated cross-network transmissions and significantly improving read efficiency.
[0047] In addition, the actual effects of each file access and the model decision results are continuously recorded to form a feedback data loop, which is used to periodically fine-tune the time series prediction model so that it can adapt to changes in business load and access patterns, and achieve long-term optimization of the performance of the cache file system program.
[0048] During file writing, the application's save operation no longer blocks and waits for confirmation from the remote storage. Instead, it immediately writes the modified content to the local cache and returns success instantly, achieving "zero-latency write". Subsequently, through background asynchronous tasks, based on preset triggering strategies (such as timed triggering, data accumulation thresholds, or event-driven), local changes are uploaded to the remote shared storage server in batches and reliably, ensuring eventual data consistency and completely decoupling application I / O and network performance bottlenecks.
[0049] This application integrates into existing cloud infrastructure in a lightweight and transparent manner without requiring modification to application code. It is compatible with mainstream shared storage protocols and can be widely used in containerized environments, virtual machine clusters, and serverless architectures, significantly improving the shared storage access performance of cloud applications in high-concurrency, low-latency scenarios.
[0050] In practical applications, before opening the application on the cloud server, the file on the remote shared storage server is uploaded to the local disk of the cloud server where the application is located. After the file is modified, it is uploaded to the remote shared storage server, and finally the cloud application is closed.
[0051] In one exemplary embodiment, S6 specifically includes the following steps.
[0052] If the caching decision result indicates that caching is required, the complete content of the target file is retrieved from the remote shared storage server to the local cache, and the read data is returned to the application from the local cache; if the caching decision result indicates that caching is not required, the complete content of the target file is retrieved from the remote shared storage server, and the read data is returned to the application without being stored in the local cache.
[0053] In an exemplary embodiment, the preset time-series prediction model is constructed based on a gated recurrent unit (GRU) neural network. The core of the time-series prediction model used in this application is an algorithmic system capable of learning from historical access patterns and making intelligent judgments. This time-series prediction model can be understood as a "caching decision assistant" with memory and analytical capabilities. In this embodiment, this application uses a gated recurrent unit (GRU) neural network as the core architecture of the time-series prediction model, such as... Figure 3 As shown.
[0054] S5 includes the following steps.
[0055] The update gate of the gated recurrent unit neural network controls the proportion of information from the previous hidden state to the current state; the reset gate of the same network determines the proportion of information to be forgotten from the previous hidden state; based on the outputs of the update and reset gates, candidate hidden states and the final hidden state are calculated; the final hidden state is input into a fully connected layer and mapped to a cache recommendation index through an activation function; the cache recommendation index is compared with a preset threshold; if the index is greater than or equal to the threshold, a cache decision result requiring caching is generated; otherwise, a cache decision result requiring no caching is generated.
[0056] In practical applications, GRU is an improved recurrent neural network architecture specifically designed for processing time-series data. Compared to traditional Long Short-Term Memory (LSTM) networks, GRU is simpler in structure, more computationally efficient, and maintains good temporal modeling capabilities. This application uses GRU as the core prediction model for cache decision-making, and its mathematical principles are as follows.
[0057] ① Update Gate: The update gate controls how much information from the hidden state in the previous time step is passed to the current time step. Its calculation formula is as follows.
[0058] z t = σ(W z ·[h t-1 , x t ]) Among them, z t To update the gate output, σ is the sigmoid activation function, and W... z To update the gate weight matrix, h t-1 The hidden state of the previous moment, x t t represents the current input, t represents the current time, and t-1 represents the previous time.
[0059] ② Reset Gate: The reset gate determines how much information from the previous hidden state needs to be forgotten. Its calculation formula is as follows.
[0060] r t = σ(W r · [h t-1 , x t ]) Where, r t To reset the gate output, W r This is the weight matrix for resetting the gate.
[0061] ③ Candidate Hidden State: The candidate hidden state is the temporary memory content at the current moment, which combines the historical information after the gate filter is reset and the current input.
[0062] = tanh(W · [r t h t-1 , x t ]) in, Let be the candidate hidden state, and tanh be the hyperbolic tangent activation function. This represents element-wise multiplication (Hadamard product), where W is the weight matrix of the candidate hidden states.
[0063] ④ Hidden State: The hidden state is the output of GRU, and the fusion ratio of historical information and candidate states is controlled by the update gate.
[0064] h t = (1 - z t ) h t-1 + z t This formula shows that when z t When z approaches 0, the current hidden state primarily retains historical information; when z approaches 0... t When the value is close to 1, the current candidate state is more likely to be adopted.
[0065] In practical applications, the cache decision-making algorithm flow (i.e., the comprehensive judgment process) based on GRU is as follows.
[0066] ① Input Feature Extraction: When an application accesses a file, the cached file system program extracts the following features as input to the GRU: x t : File size, file type, application name, local storage resource availability, network latency, bandwidth fluctuation, and server load status.
[0067] ② Timing state update: GRU based on x t and h t-1 Calculate z sequentially t r t , and h t .
[0068] ③ Cache decision output: The output h of GRU t The input to the fully connected layer is mapped to a cache recommendation index p∈[0,1] via the Sigmoid function.
[0069] p=σ(W o ·h t + b o ) Among them, W o b is the output layer weight matrix; o For bias.
[0070] ④ Threshold Decision: Set a threshold θ (which can be dynamically adjusted based on the load status of the cache file system program). When p ≥ θ, it is determined that the file needs to be cached; otherwise, it is not cached. The cache file system program continuously records the actual effect of each decision and periodically uses feedback data to fine-tune the model parameters to achieve adaptive optimization.
[0071] In an exemplary embodiment, the feature parameters include at least one of the following: file size, file type, application name, local storage resource availability, network latency, bandwidth fluctuation, and server load status; the preset threshold is dynamically adjusted according to the cache file system program load status.
[0072] In an exemplary embodiment, uploading changed data from the local cache to the remote shared storage server via a background asynchronous task includes: starting the background asynchronous task according to a preset triggering strategy; the triggering strategy includes at least one of timed triggering, triggering when the accumulated data volume in the local cache reaches a threshold, and triggering by a file closing event.
[0073] In an exemplary embodiment, after S5, the method further includes: recording the actual effect of each file access and the caching decision result of the time-series prediction model to form feedback data; periodically using the feedback data to fine-tune the parameters of the time-series prediction model to adapt to changes in business load and access patterns.
[0074] In one exemplary embodiment, the storage medium for the local cache is memory or a local disk; when establishing a connection with a remote shared storage server, the local disk path specified by the user is received as the cache storage location; if not specified, memory is used as the storage medium by default.
[0075] like Figure 4 As shown, the implementation principle of this application is as follows.
[0076] When starting this cached file system program, the IP address of the remote shared storage server and the target directory path must be passed in. Optionally, a local disk path can be specified as the cache storage location; if no local path is specified, memory is used as the cache medium by default. During the program initialization phase, it connects to the remote shared storage server based on the passed parameters, synchronously obtains the file list of the target directory, and virtually mounts it locally as a network disk mount point for seamless access by upper-layer applications.
[0077] When an application on the cloud server opens a target file in the local virtual mount point, the cache file system program first checks whether the downloaded file content, i.e., the target file, exists in the local cache (memory or local disk).
[0078] If the content exists, the local cached content is returned directly, achieving millisecond-level read response.
[0079] If it does not exist, extract the characteristic parameters such as file size, type, application name and local storage resource balance, and input them into the preset time series prediction model, i.e., the prediction model.
[0080] The prediction model combines the aforementioned feature parameters with real-time data on network latency, bandwidth fluctuations, and server load to make a comprehensive judgment, outputting a caching decision result regarding whether to cache the target file. If the caching decision result is positive, the complete file content is retrieved from the remote shared storage server and cached locally for future use by the application; subsequent read operations will hit the cache, avoiding repeated network transmissions. If the caching decision result is negative, the complete file content is retrieved from the remote shared storage server and used by the application, without being written to the cache.
[0081] When an application modifies and saves a cached file, the data is first written to the local cache (memory or local SSD), and a write success response is immediately returned to the application, achieving low-latency "local real-time writing". At the same time, the cache file system program starts a background asynchronous task in the background, and according to the preset triggering strategy (such as timed synchronization, accumulated data reaching a threshold, or file closing event), the modified content is uploaded to the remote shared storage server in an orderly and reliable manner, thereby ensuring eventual data consistency.
[0082] If the file is not cached, the write operation will be directly and synchronously uploaded to the remote shared storage directory, and the persistence will be completed by the remote cloud server.
[0083] Figure 4 In this context, "sftpserver" is a file transfer service that runs on a remote shared storage server. It is used when the cached file system program reads the remote shared storage directory or uploads files to the remote shared storage. "Dataset" is used to store characteristic parameters and prediction results such as file size, type, application name, and remaining local storage resources recorded when the application is closed.
[0084] Through the above mechanism, this application effectively solves the high latency and I / O lag problems caused by "remote downloading for each read and synchronous uploading for each save" in traditional network file systems, and significantly improves the response speed, throughput and user experience of cloud applications when accessing shared storage.
[0085] This application is completely transparent to upper-layer applications, requires no modification to business code, is compatible with mainstream shared storage protocols, and can be widely deployed in cloud-native architectures such as containers, virtual machines, and serverless, possessing good scalability and engineering implementation value.
[0086] In practical applications, when an application on a cloud server opens a file in the network disk for the first time, it will determine whether the content needs to be downloaded based on a preset time-series prediction model. If so, the content will be saved to memory / local disk, and subsequent openings will not require downloading via the network.
[0087] The cache file system program records the actual effect of each access and the model decision results to form feedback data, which is used to periodically fine-tune the time series prediction model to adapt it to changing business loads and access patterns, thereby achieving long-term performance improvement.
[0088] When an application on a cloud server saves a file to a network disk, it saves it directly to memory / local disk and then asynchronously uploads it to remote shared storage.
[0089] Users can customize the display content of files in the cloud drive list according to their actual needs, enabling on-demand filtering and display of the file list.
[0090] This application provides a cloud application access shared storage performance optimization system, which includes the following modules.
[0091] The mounting module is used to establish a connection with a remote shared storage server and mount the target directory of the remote shared storage server as a local virtual mount point.
[0092] The receiving module is used to receive access requests from applications for target files in the local virtual mount point.
[0093] The read processing module is used to detect whether the target file exists in the local cache if the access request is a read request; if the target file exists in the local cache, perform a read operation; if the target file does not exist in the local cache, obtain the feature parameters of the target file, input the feature parameters into a preset time series prediction model to obtain a cache decision result; and perform a read operation according to the cache decision result.
[0094] The write processing module is used to detect whether the target file exists in the local cache if the access request is a write request; if the target file exists in the local cache, the write data is written to the local cache and a write success response is returned to the application, and then the changed data in the local cache is uploaded to the remote shared storage server through a background asynchronous task; if the target file does not exist in the local cache, the write data is synchronously uploaded to the remote shared storage server.
[0095] This application has the following advantages.
[0096] Read performance optimization: When an application on the cloud server opens a file in the network disk for the first time, a preset time-series prediction model determines whether caching is necessary. If so, the target file is downloaded from a remote shared storage server over the network and cached in local memory or a high-speed local disk. Subsequent read operations on the target file respond directly from the local cache, eliminating the need for repeated network transmission. If direct reading is not required, the file is written directly. This intelligent judgment and precise caching of target files significantly reduces read latency.
[0097] Write-in seamless: When the application saves the target file, the data is immediately written to the local cache and a success message is returned instantly, without the application having to wait for the network upload to complete; the cache file system program then reliably uploads the changed data to the remote shared storage server asynchronously in the background, ensuring eventual data consistency.
[0098] Eliminate lag: Through a collaborative mechanism of accelerated reading via local caching, decoupled I / O via asynchronous background task write-back, and prediction by a timing prediction model, the response latency and operation lag caused by frequent network interactions in traditional network file systems are completely avoided. This significantly improves the real-time performance of applications and user experience, and is especially suitable for typical cloud scenarios such as large file processing, high-concurrency access, and network fluctuations.
[0099] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments. The computer device may be a cloud server or a terminal. The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, memory, and I / O are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device stores data to be processed. The I / O interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with an external terminal via a network connection. When the computer program is executed by the processor, it implements the above-described methods.
[0100] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0101] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0102] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0103] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by hardware related to computer program instructions. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0104] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0105] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0106] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for optimizing the performance of cloud applications accessing shared storage, characterized in that, Applied to cloud servers, where a cached file system program runs, including: Establish a connection with the remote shared storage server and mount the target directory of the remote shared storage server as a local virtual mount point; Receive an application's access request for a target file in the local virtual mount point; If the access request is a read request, check if the target file exists in the local cache; If the target file exists in the local cache, perform a read operation; If the target file does not exist in the local cache, the feature parameters of the target file are obtained, and the feature parameters are input into a preset time-series prediction model to obtain the cache decision result; the preset time-series prediction model is constructed based on a gated recurrent unit neural network. The feature parameters are input into a preset time-series prediction model to obtain caching decision results, including: The update gate of the gated recurrent unit neural network is used to control the proportion of information from the hidden state in the previous time step to the current time step. The proportion of information that needs to be forgotten in the previous hidden state is determined by using the reset gate of the gated recurrent unit neural network. Based on the outputs of the update gate and the reset gate, calculate the candidate hidden state and the final hidden state; The final hidden state is input into a fully connected layer and mapped to a cached recommendation index through an activation function. The cache recommendation index is compared with a preset threshold. If the cache recommendation index is greater than or equal to the preset threshold, a cache decision result that requires caching is generated; otherwise, a cache decision result that does not require caching is generated. Based on the cache decision result, perform the read operation; If the access request is a write request, check if the target file exists in the local cache; If the target file exists in the local cache, the write data is written to the local cache and a write success response is returned to the application. Then, the changed data in the local cache is uploaded to the remote shared storage server through a background asynchronous task. If the target file does not exist in the local cache, the written data will be synchronously uploaded to the remote shared storage server.
2. The cloud application access shared storage performance optimization method according to claim 1, characterized in that, Based on the cache decision result, a read operation is performed, specifically including: If the caching decision result indicates that caching is required, the complete content of the target file is retrieved from the remote shared storage server to the local cache, and the read data is returned to the application from the local cache. If the caching decision result is that caching is not required, the complete content of the target file is retrieved from the remote shared storage server, and the read data is returned to the application without being stored in the local cache.
3. The method for optimizing cloud application access to shared storage performance according to claim 2, characterized in that, The characteristic parameters include at least one of the following: file size, file type, application name, local storage resource availability, network latency, bandwidth fluctuation, and server load status. The preset threshold is dynamically adjusted based on the load status of the cache file system program. The storage medium for the local cache is memory or a local disk; When establishing a connection with a remote shared storage server, the system accepts the local disk path specified by the user as the cache storage location; if not specified, memory is used as the storage medium by default.
4. The method for optimizing cloud application access to shared storage performance according to claim 1, characterized in that, Upload changed data from the local cache to the remote shared storage server via an asynchronous background task, including: The background asynchronous task is started according to a preset triggering strategy; the triggering strategy includes at least one of the following: timed triggering, triggering when the accumulated data in the local cache reaches a threshold, and triggering when a file is closed.
5. The method for optimizing cloud application access to shared storage performance according to claim 1, characterized in that, After inputting the feature parameters into a preset time-series prediction model to obtain the caching decision result, the process further includes: Record the actual effect of each file access and the caching decision results of the time-series prediction model to form feedback data; The parameters of the time-series prediction model are periodically fine-tuned using the feedback data to adapt to changes in business load and access patterns.
6. A cloud application access shared storage performance optimization system, characterized in that, Applied to a cloud server, wherein a cache file system program runs on the cloud server, the cloud application access shared storage performance optimization system executes the cloud application access shared storage performance optimization method according to any one of claims 1-5, and the cloud application access shared storage performance optimization system includes: The mounting module is used to establish a connection with the remote shared storage server and mount the target directory of the remote shared storage server as a local virtual mount point. The receiving module is used to receive access requests from applications for target files in the local virtual mount point; The read processing module is used to: if the access request is a read request, detect whether the target file exists in the local cache; if the target file exists in the local cache, perform a read operation; if the target file does not exist in the local cache, obtain the feature parameters of the target file, input the feature parameters into a preset time-series prediction model to obtain a cache decision result; and perform a read operation based on the cache decision result. The write processing module is used to detect whether the target file exists in the local cache if the access request is a write request; if the target file exists in the local cache, the write data is written to the local cache and a write success response is returned to the application, and then the changed data in the local cache is uploaded to the remote shared storage server through a background asynchronous task; if the target file does not exist in the local cache, the write data is synchronously uploaded to the remote shared storage server.
7. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the computer program to implement the cloud application access shared storage performance optimization method according to any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the cloud application access shared storage performance optimization method as described in any one of claims 1-5.
9. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the cloud application access shared storage performance optimization method as described in any one of claims 1-5.
Citation Information
Patent Citations
Cloud storage service client high-efficiency fine-granularity data caching system and method
CN102014158A
Prediction driving-based storage and calculation separation key value storage delay optimization method
CN121455408A