WO2016127656A1 - Data caching method and device for net disk client - Google Patents

Data caching method and device for net disk client Download PDF

Info

Publication number
WO2016127656A1
WO2016127656A1 PCT/CN2015/091136 CN2015091136W WO2016127656A1 WO 2016127656 A1 WO2016127656 A1 WO 2016127656A1 CN 2015091136 W CN2015091136 W CN 2015091136W WO 2016127656 A1 WO2016127656 A1 WO 2016127656A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual disk
file
user
cache
cached
Prior art date
Application number
PCT/CN2015/091136
Other languages
French (fr)
Chinese (zh)
Inventor
罗圣美
王志勇
段翰聪
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016127656A1 publication Critical patent/WO2016127656A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • This document relates to, but is not limited to, the field of communication technologies, and in particular, to a data cache method and apparatus for a network disk client.
  • cloud storage has become more and more popular as an emerging storage strategy, and has also received the attention of major Internet companies.
  • the cloud storage system connects and integrates distributed and different storage resources, and provides users with unified storage services through technologies such as network transmission, distributed computing, and cluster services.
  • cloud storage has high security, low cost and high scalability, which has become the future development trend of the storage field.
  • Storage service providers are shifting from providing a single storage product to providing storage services.
  • a network disk is a form of service provision for related cloud storage.
  • the most popular network disk systems on the market are: Dropbox, Jinshan Express, Baidu Cloud Disk, etc.
  • the network disk client is an indispensable part of the network disk system.
  • the cache policy of the network disk client directly affects the user experience of using the network disk.
  • the cache of the network disk client is mainly divided into two types: no cache and full cache.
  • no-cache scheme all operations of the user on the network disk are implemented by a browser or a client accessing a specific webpage.
  • the advantages of this method are simple implementation, unified access interface, and network disk access across platforms and devices without modifying the client itself.
  • the resource consumption of the client is small, but because there is no local cache of network resources, access to network resources. When you need to manually download from the cloud, the user experience is not high.
  • the full cache is generally implemented by using a virtual disk. That is, a virtual disk is used as the access point of the network disk, so that the user accesses the network storage device (the network disk) and the access mode to the local storage device (local disk) are unified. The user can access the network disk just like a local disk.
  • Jinshan Express, DropBox and other network disks are all network disk clients implemented by virtual disk.
  • this implementation relies on the local file system and cannot implement file metadata management that is transparent to the user. Because the file metadata cannot be managed autonomously, the network disk client currently implemented by the virtual disk is fully cached, that is, the network resources are all cached locally, and the storage capacity is closely related to the local storage resource, so The large limit the size of the content stored by the user on the cloud disk.
  • the embodiment of the invention provides a data caching method and device for a network disk client, which is used to solve the technical problem of avoiding the use of a limited buffer space in the related art to most effectively provide a cache service for a user.
  • an embodiment of the present invention provides a data caching method for a network disk client, including:
  • Portaging, in the cloud data, a portion of the cloud data that is used by the preset time period to be higher than the preset threshold is cached in the virtual disk in the form of an image file, and the file metadata of the cloud data is presented to the user through the virtual disk, where
  • the file metadata is data describing the cloud data; if the file accessed by the user is cached in the virtual disk, the file is accessed through the virtual disk; if the file accessed by the user is not cached in the virtual disk, according to The file metadata of the cloud data is downloaded from the cloud.
  • the method further includes deleting, in the case that the remaining cache space of the virtual disk is less than a preset cache threshold, the file that is accessed by the preset time period is deleted from the virtual disk, and the remaining cache is deleted.
  • the space is greater than or equal to the preset cache threshold.
  • accessing the file by using the virtual disk includes: if the file accessed by the user is cached in the virtual disk, the virtual disk drive will be The access request for the file is redirected to the image file.
  • the method further includes reconfiguring the virtual disk according to a virtual disk configuration instruction of the user.
  • the reconfiguring the virtual disk according to the virtual disk configuration instruction of the user includes: providing a virtual disk configuration interface to the user, and receiving, by the configuration interface, the user to reset the drive letter name and the cache space of the virtual disk.
  • An instruction of size and cache threshold includes: unloading the virtual magnetic Disk, and reconfigure the virtual disk according to parameters in the virtual disk configuration interface; remount the reconfigured virtual disk.
  • the embodiment of the present invention further provides a data cache device of a network disk client, comprising: a cache unit, configured to cache a portion of the cloud data in which the preset time period is used in a frequency higher than a preset threshold as an image file. And displaying, by the virtual disk, all file metadata of the cloud data to the user by using the virtual disk, wherein the file metadata is data describing the cloud data; and the access unit is configured to: if the file accessed by the user Cached in the virtual disk, accessing the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, downloading the file from the cloud according to file metadata of the cloud data.
  • the device further includes: a deleting unit, configured to delete, from the virtual disk, a file that is accessed at least by a preset time period, if a remaining cache space of the virtual disk is less than a preset cache threshold. Until the remaining cache space is greater than or equal to the preset cache threshold.
  • a deleting unit configured to delete, from the virtual disk, a file that is accessed at least by a preset time period, if a remaining cache space of the virtual disk is less than a preset cache threshold. Until the remaining cache space is greater than or equal to the preset cache threshold.
  • the access unit is configured to redirect the access request of the file to the image file by the virtual disk driver if the file accessed by the user is cached in the virtual disk.
  • the device further includes a configuration unit configured to reconfigure the virtual disk according to a virtual disk configuration instruction of the user.
  • the configuration unit is configured to: provide a virtual disk configuration interface to the user, and receive, by using the configuration interface, an instruction for the user to reset the drive letter name, the cache space size, and the cache threshold of the virtual disk; Describe the virtual disk and reconfigure the virtual disk according to parameters in the virtual disk configuration interface; remount the reconfigured virtual disk.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
  • the data caching method and device of the network disk client caches a portion of the cloud data whose preset time period frequency is higher than a preset threshold in an image file in a virtual disk, and uses the virtual disk to The user presents all the file metadata of the cloud data, and complete description of the real file data through the file metadata. Even if some file data itself is not cached locally, the user can know the name, directory, size and other information of all the files. Just like all the text The pieces are all local and the user experience is good.
  • the file When the user accesses the file, if the file accessed by the user is cached in the virtual disk, the file is accessed through the virtual disk; if the file accessed by the user is not cached in the virtual disk, the file according to the cloud data Metadata, downloading the file from the cloud, because the local cache is the most commonly used data in the preset time period, thereby making full use of the limited local cache resources, providing users with a high-quality cache service, greatly improving the user experience.
  • FIG. 1 is a flowchart of a data caching method of a network disk client according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an implementation principle of a virtual disk based cache in an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a principle for implementing file filter driver cache elimination in an embodiment of the present invention.
  • FIG. 4 is a flowchart of a data caching method of a network disk client in a file uploading operation according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a data caching method of a web client when a file download operation is performed in an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a data cache device of a network disk client according to an embodiment of the present invention.
  • an embodiment of the present invention provides a data caching method for a network disk client, including:
  • the part of the cloud data that is used in the preset time period is higher than the preset threshold, and is cached on the virtual disk in the form of an image file, and the virtual disk is used to present the cloud data stored in the virtual disk to the user.
  • All file metadata wherein the file metadata is data describing the cloud data;
  • the data caching method of the network disk client caches a portion of the cloud data in a preset time period with a frequency higher than a preset threshold in an image file in a virtual disk, and provides the user to the virtual disk through the virtual disk.
  • the file When the user accesses the file, if the file accessed by the user is cached in the virtual disk, the file is accessed through the virtual disk; if the file accessed by the user is not cached in the virtual disk, the file according to the cloud data Metadata, downloading the file from the cloud, because the virtual disk stores the most commonly used data within a preset time period, thereby fully utilizing the limited local cache resources, providing users with a high-quality cache service, greatly improving the user experience.
  • the implementation principle of the virtual disk based cache can be as shown in FIG. 2 .
  • the virtual disk drive can virtualize a disk (that is, a virtual disk) by means of a driver in the system, and the virtual disk driver manages the data of the virtual disk.
  • this virtual disk is exactly the same as other disks, and the user can see all the data stored in the network disk.
  • the virtual disk uses the image file as the actual storage of the cache space. If the file accessed by the user is cached in the virtual disk, an access request for the file may be redirected to the image file by the virtual disk drive.
  • the image file only stores a cache of part of the actual data that matches its own size, and the virtual disk drive presents the complete file metadata to the user. If the file accessed by the user is not cached in the virtual disk, the file may be downloaded from the cloud according to the file metadata of the cloud data for access.
  • the size of the image file cached locally is adapted to the cache space of the virtual disk, and the cached image file is part of the cloud data.
  • the cached data can be selected from the most commonly used data of the user preset time period, that is, when the preset time period of the file is used higher than the preset frequency, the file is preferentially cached into the local virtual disk.
  • the user can see the files of all the files through the virtual disk. Name, directory, size and other information, and access to the corresponding file through virtual disk or cloud download.
  • the data cached in the virtual disk is the most commonly used data in the preset time period of the user, the data cached in the virtual disk can be dynamically adjusted and eliminated as the user continuously reads and writes the file.
  • the least used data for the preset time period is cached into the most commonly used data for the new preset time period.
  • the remaining cache space of the virtual disk is less than the preset cache threshold
  • the file that is accessed at least in the preset time period is deleted from the virtual disk until the remaining cache space is greater than or equal to the preset cache threshold.
  • an LRU (Least Recently Used) algorithm is executed on all the files in the virtual disk, thereby filtering out the minimum file for the preset time period.
  • this filtering operation can be implemented by setting a file system filter driver.
  • the file filtering driver is located above the file system driver of windows. All user read and write requests on the virtual disk will be captured by the I/O Manager running in the kernel state of the Windows system and generate an I/O request package (IRP, I/O requset package), Windows I/O Management.
  • IRP I/O request package
  • the I/O manager After checking that the attached device object (ie file filter driver) exists, the I/O manager first sends the IRP to the file filter driver, and the file filter driver receives the IRP sent by the I/O manager and passes it through the client's network.
  • the communication layer sends the data to the cloud storage device, and checks whether the virtual disk space is greater than the preset storage threshold.
  • the LRU algorithm is executed to eliminate the cache file that is unused for the preset time period until the local remaining cache is greater than or equal to the pre- Set the storage threshold.
  • the IRP request processed by the file filter driver is sent to the file system driver for file system level logical write operation, and the file system driver sends the I/O request to the destination device.
  • the destination device is The virtual disk driver performs the actual write operation.
  • the data caching method of the network disk client may further receive the virtual disk configuration instruction of the user at any time, and reconfigure the virtual disk according to the configuration instruction, thereby implementing customization of the cache space.
  • the configuration operation of the virtual disk can be triggered by clicking an interface button or calling a menu.
  • the system can respond as follows:
  • the user can adjust the parameters such as the cache buffer threshold of the virtual disk at any time as needed, thereby further improving the user experience.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
  • the virtual disk can be cached as follows:
  • S202 Send a file content check code to the cloud server to confirm whether the same file exists, and if not, upload the new file content to the cloud server;
  • S204 Verify that the cache space has reached the threshold. If yes, execute the LRU algorithm to eliminate the unused file cache data for the preset time period until the remaining cache space is greater than the threshold.
  • the virtual disk can be cached as follows:
  • the user accesses a file in the virtual disk, and if the file has a cache locally, the line is straight. Access.
  • the file is not cached locally, and the client requests the file data from the cloud.
  • the cloud sends the file content to the client.
  • the file filtering driver is used as a file system monitoring means to monitor file changes in the cache space constructed by the virtual disk driver, thereby ensuring effective use of the limited buffer space.
  • an embodiment of the present invention further provides a data cache device of a network disk client, including:
  • the cache unit 41 is configured to cache a portion of the cloud data whose preset time period usage frequency is higher than a preset threshold in a form of an image file on the virtual disk, and present all file elements of the cloud data to the user through the virtual disk.
  • the access unit 42 is configured to: if the file accessed by the user is cached in the virtual disk, access the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, according to the cloud data File metadata, download the file from the cloud.
  • the cache unit 41 can cache the portion of the cloud data whose preset time period is used above the preset threshold in the form of an image file on the virtual disk, and pass the virtual
  • the disk presents all the file metadata of the cloud data to the user, and complete description of the real file data through the file metadata. Even if some file data itself is not in the virtual disk, the user can know the name, directory, size, etc. of all the files. Information, as if all files are local, the user experience is good.
  • the access unit 42 can access the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, the access unit 42
  • the file can be downloaded from the cloud according to the file metadata of the cloud data, due to the virtual disk
  • the most common data is stored in the preset time period, so that the local limited cache resources are fully utilized, and the user is provided with a high-quality cache service, which greatly improves the user experience.
  • the device may further include a deleting unit, configured to delete, from the virtual disk, the file that is accessed at least in the preset time period, if the remaining cache space of the virtual disk is less than a preset cache threshold.
  • the remaining cache space is greater than or equal to the preset cache threshold.
  • the access unit 42 is configured to redirect the access request for the file to the image file by the virtual disk driver if the file accessed by the user is cached in the virtual disk.
  • the apparatus further includes a configuration unit configured to reconfigure the virtual disk according to a virtual disk configuration instruction of the user.
  • the configuration unit is configured to: provide a virtual disk configuration interface to the user, and receive, by the configuration interface, an instruction for the user to reset the drive letter name, the cache space size, and the cache threshold of the virtual disk; and uninstall the virtual Disk, and reconfigure the virtual disk according to parameters in the virtual disk configuration interface; remount the reconfigured virtual disk.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the above technical solution realizes that even if the file data itself is not in the virtual disk, the user can know the names, directories, sizes and the like of all the files, as if all the files are local and the user experience is good; in addition, the above technical solutions make full use of the local limited
  • the cache resources provide users with a high-quality cache service, which greatly enhances the user experience.

Abstract

A data caching method and device for a net disk client, which relate to the technical field of communications, so as to solve the problem in the related art that it fails to most effectively provide a caching service to a user by using a limited cache space. The method comprises: caching a part of cloud data, the use frequency of which is higher a preset threshold in a preset time period, into a virtual magnetic disk in a form of a mirror file, and presenting all file metadata of the cloud data to a user by means of the virtual magnetic disk, the file metadata being data for describing the cloud data; if a file accessed by the user is cached in the virtual magnetic disk, accessing the file by means of the virtual magnetic disk; and if the file accessed by the user is not cached in the virtual magnetic disk, downloading the file from the cloud according to the file metadata of the cloud data.

Description

一种网盘客户端的数据缓存方法及装置Data cache method and device for network disk client 技术领域Technical field
本文涉及但不限于通讯技术领域,特别是涉及一种网盘客户端的数据缓存方法及装置。This document relates to, but is not limited to, the field of communication technologies, and in particular, to a data cache method and apparatus for a network disk client.
背景技术Background technique
随着云计算的发展,云存储作为一种新兴的存储策略越来越流行,也受到了各大互联网公司的重视。云存储系统将分散的、不同的存储资源进行连接整合,通过网络传输、分布式计算、集群服务等技术为用户提供统一的存储服务。与传统存储相比,云存储安全性高、成本低、可扩展性强,成为存储领域未来发展的趋势。存储服务提供商正在从提供单一的存储产品向提供存储服务转变。网盘正是相关云存储的一种服务提供形式。目前市面上比较流行的网盘系统有:Dropbox、金山快盘、百度云盘等。With the development of cloud computing, cloud storage has become more and more popular as an emerging storage strategy, and has also received the attention of major Internet companies. The cloud storage system connects and integrates distributed and different storage resources, and provides users with unified storage services through technologies such as network transmission, distributed computing, and cluster services. Compared with traditional storage, cloud storage has high security, low cost and high scalability, which has become the future development trend of the storage field. Storage service providers are shifting from providing a single storage product to providing storage services. A network disk is a form of service provision for related cloud storage. At present, the most popular network disk systems on the market are: Dropbox, Jinshan Express, Baidu Cloud Disk, etc.
网盘客户端作为与用户直接交互的窗口,是网盘系统不可或缺的部分。而网盘客户端的缓存策略直接影响了用户使用网盘的体验。就目前来看,网盘客户端的缓存主要分为无缓存和全缓存两种。其中,无缓存方案中,用户对网盘的所有操作都通过浏览器或客户端访问特定的网页来实现。这种方式的优点是实现简单,访问接口统一,可以跨平台、跨设备进行网盘访问而无需修改客户端本身,同时对用户端资源消耗小,但由于无网络资源的本地缓存,访问网络资源时需要手动从云端下载,用户体验不高。全缓存,一般采用虚拟磁盘方式实现,即,使用一个虚拟磁盘作为网盘的访问入口,使得用户对网络存储设备(网盘)的访问方式和对本地存储设备(本地磁盘)的访问方式统一起来,用户可以像访问本地磁盘一样访问网盘。金山快盘、DropBox等网盘均是采用虚拟磁盘方式实现的网盘客户端。但是这种实现方式依赖于本地文件系统,无法实现对用户透明的文件元数据管理。由于无法自主管理文件元数据,目前采用虚拟磁盘实现的网盘客户端都是全缓存的,即网络资源全部汇在本地缓存,存储容量与本地存储资源紧密相关,因此极 大的限制了用户在云盘存储内容的大小。As a window that interacts directly with users, the network disk client is an indispensable part of the network disk system. The cache policy of the network disk client directly affects the user experience of using the network disk. At present, the cache of the network disk client is mainly divided into two types: no cache and full cache. Among them, in the no-cache scheme, all operations of the user on the network disk are implemented by a browser or a client accessing a specific webpage. The advantages of this method are simple implementation, unified access interface, and network disk access across platforms and devices without modifying the client itself. At the same time, the resource consumption of the client is small, but because there is no local cache of network resources, access to network resources. When you need to manually download from the cloud, the user experience is not high. The full cache is generally implemented by using a virtual disk. That is, a virtual disk is used as the access point of the network disk, so that the user accesses the network storage device (the network disk) and the access mode to the local storage device (local disk) are unified. The user can access the network disk just like a local disk. Jinshan Express, DropBox and other network disks are all network disk clients implemented by virtual disk. However, this implementation relies on the local file system and cannot implement file metadata management that is transparent to the user. Because the file metadata cannot be managed autonomously, the network disk client currently implemented by the virtual disk is fully cached, that is, the network resources are all cached locally, and the storage capacity is closely related to the local storage resource, so The large limit the size of the content stored by the user on the cloud disk.
针对如何使网盘客户端能够利用有限的缓存空间最有效地为用户提供缓存服务的问题,相关技术中尚无有效的解决方案。There is no effective solution in the related art for how to enable the network disk client to utilize the limited cache space to provide the cache service to the user most effectively.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种网盘客户端的数据缓存方法及装置,用以解决如何避免相关技术中不能利用有限的缓存空间最有效地为用户提供缓存服务的技术问题。The embodiment of the invention provides a data caching method and device for a network disk client, which is used to solve the technical problem of avoiding the use of a limited buffer space in the related art to most effectively provide a cache service for a user.
一方面,本发明实施例提供一种网盘客户端的数据缓存方法,包括:In one aspect, an embodiment of the present invention provides a data caching method for a network disk client, including:
将云端数据中预设时间段使用频率高于预设阈值的部分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现所述云端数据的全部文件元数据,其中,所述文件元数据为描述所述云端数据的数据;如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,根据所述云端数据的文件元数据,从云端下载所述文件。Portaging, in the cloud data, a portion of the cloud data that is used by the preset time period to be higher than the preset threshold is cached in the virtual disk in the form of an image file, and the file metadata of the cloud data is presented to the user through the virtual disk, where The file metadata is data describing the cloud data; if the file accessed by the user is cached in the virtual disk, the file is accessed through the virtual disk; if the file accessed by the user is not cached in the virtual disk, according to The file metadata of the cloud data is downloaded from the cloud.
可选的,所述方法还包括:在所述虚拟磁盘的剩余缓存空间小于预设缓存阈值的情况下,将预设时间段最少访问的文件从所述虚拟磁盘中删除,直至所述剩余缓存空间大于或等于所述预设缓存阈值为止。Optionally, the method further includes deleting, in the case that the remaining cache space of the virtual disk is less than a preset cache threshold, the file that is accessed by the preset time period is deleted from the virtual disk, and the remaining cache is deleted. The space is greater than or equal to the preset cache threshold.
可选的,所述如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件包括:如果用户访问的文件缓存在所述虚拟磁盘中,通过虚拟磁盘驱动将对所述文件的访问请求重定向到所述镜像文件中。Optionally, if the file accessed by the user is cached in the virtual disk, accessing the file by using the virtual disk includes: if the file accessed by the user is cached in the virtual disk, the virtual disk drive will be The access request for the file is redirected to the image file.
可选的,所述方法还包括根据用户的虚拟磁盘配置指令,重新配置所述虚拟磁盘。Optionally, the method further includes reconfiguring the virtual disk according to a virtual disk configuration instruction of the user.
可选的,所述根据用户的虚拟磁盘配置指令,重新配置所述虚拟磁盘包括:向用户提供虚拟磁盘配置界面,通过所述配置界面接收用户重新设置所述虚拟磁盘的盘符名、缓存空间大小及缓存阈值的指令;卸载所述虚拟磁 盘,并按照所述虚拟磁盘配置界面中的参数重新配置所述虚拟磁盘;将重新配置的所述虚拟磁盘重新挂载。Optionally, the reconfiguring the virtual disk according to the virtual disk configuration instruction of the user includes: providing a virtual disk configuration interface to the user, and receiving, by the configuration interface, the user to reset the drive letter name and the cache space of the virtual disk. An instruction of size and cache threshold; unloading the virtual magnetic Disk, and reconfigure the virtual disk according to parameters in the virtual disk configuration interface; remount the reconfigured virtual disk.
另一方面,本发明实施例还提供一种网盘客户端的数据缓存装置,包括:缓存单元,设置为将云端数据中预设时间段使用频率高于预设阈值的部分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现所述云端数据的全部文件元数据,其中,所述文件元数据为描述所述云端数据的数据;访问单元,设置为:如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,根据所述云端数据的文件元数据,从云端下载所述文件。On the other hand, the embodiment of the present invention further provides a data cache device of a network disk client, comprising: a cache unit, configured to cache a portion of the cloud data in which the preset time period is used in a frequency higher than a preset threshold as an image file. And displaying, by the virtual disk, all file metadata of the cloud data to the user by using the virtual disk, wherein the file metadata is data describing the cloud data; and the access unit is configured to: if the file accessed by the user Cached in the virtual disk, accessing the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, downloading the file from the cloud according to file metadata of the cloud data.
可选的,所述装置还包括:删除单元,设置为在所述虚拟磁盘的剩余缓存空间小于预设缓存阈值的情况下,将预设时间段最少访问的文件从所述虚拟磁盘中删除,直至所述剩余缓存空间大于或等于所述预设缓存阈值为止。Optionally, the device further includes: a deleting unit, configured to delete, from the virtual disk, a file that is accessed at least by a preset time period, if a remaining cache space of the virtual disk is less than a preset cache threshold. Until the remaining cache space is greater than or equal to the preset cache threshold.
可选的,访问单元,是设置为如果用户访问的文件缓存在所述虚拟磁盘中,通过虚拟磁盘驱动将对所述文件的访问请求重定向到所述镜像文件中。Optionally, the access unit is configured to redirect the access request of the file to the image file by the virtual disk driver if the file accessed by the user is cached in the virtual disk.
可选的,所述装置还包括配置单元,设置为根据用户的虚拟磁盘配置指令,重新配置所述虚拟磁盘。Optionally, the device further includes a configuration unit configured to reconfigure the virtual disk according to a virtual disk configuration instruction of the user.
可选的,所述配置单元,是设置为:向用户提供虚拟磁盘配置界面,通过所述配置界面接收用户重新设置所述虚拟磁盘的盘符名、缓存空间大小及缓存阈值的指令;卸载所述虚拟磁盘,并按照所述虚拟磁盘配置界面中的参数重新配置所述虚拟磁盘;将重新配置的所述虚拟磁盘重新挂载。Optionally, the configuration unit is configured to: provide a virtual disk configuration interface to the user, and receive, by using the configuration interface, an instruction for the user to reset the drive letter name, the cache space size, and the cache threshold of the virtual disk; Describe the virtual disk and reconfigure the virtual disk according to parameters in the virtual disk configuration interface; remount the reconfigured virtual disk.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
本发明实施例提供的网盘客户端的数据缓存方法及装置,将云端数据中预设时间段使用频率高于预设阈值的部分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现所述云端数据的全部文件元数据,通过文件元数据对真实的文件数据的完整描述,即使一些文件数据本身没有在本地缓存,用户也可以获知全部文件的名称、目录、大小等信息,犹如所有文 件都在本地一般,用户体验良好。当用户访问文件时,如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,根据所述云端数据的文件元数据,从云端下载所述文件,由于本地缓存的是预设时间段最常用数据,从而充分利用本地有限的缓存资源,为用户提供了优质的缓存服务,大大提升了用户体验。The data caching method and device of the network disk client provided by the embodiment of the present invention caches a portion of the cloud data whose preset time period frequency is higher than a preset threshold in an image file in a virtual disk, and uses the virtual disk to The user presents all the file metadata of the cloud data, and complete description of the real file data through the file metadata. Even if some file data itself is not cached locally, the user can know the name, directory, size and other information of all the files. Just like all the text The pieces are all local and the user experience is good. When the user accesses the file, if the file accessed by the user is cached in the virtual disk, the file is accessed through the virtual disk; if the file accessed by the user is not cached in the virtual disk, the file according to the cloud data Metadata, downloading the file from the cloud, because the local cache is the most commonly used data in the preset time period, thereby making full use of the limited local cache resources, providing users with a high-quality cache service, greatly improving the user experience.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1是本发明实施例提供一种网盘客户端的数据缓存方法的一种流程图;FIG. 1 is a flowchart of a data caching method of a network disk client according to an embodiment of the present invention;
图2是本发明实施例中基于虚拟磁盘的缓存的实现原理的一种示意图;2 is a schematic diagram of an implementation principle of a virtual disk based cache in an embodiment of the present invention;
图3是本发明实施例中文件过滤驱动缓存淘汰实现原理的一种示意图;3 is a schematic diagram of a principle for implementing file filter driver cache elimination in an embodiment of the present invention;
图4是本发明实施例中进行文件上传操作时网盘客户端的数据缓存方法的一种流程图;4 is a flowchart of a data caching method of a network disk client in a file uploading operation according to an embodiment of the present invention;
图5是本发明实施例中进行文件下载操作时网盘客户端的数据缓存方法的一种流程图;FIG. 5 is a flowchart of a data caching method of a web client when a file download operation is performed in an embodiment of the present invention; FIG.
图6是本发明实施例提供一种网盘客户端的数据缓存装置的一种结构示意图。FIG. 6 is a schematic structural diagram of a data cache device of a network disk client according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
以下结合附图对本发明实施例进行详细说明。The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
如图1所示,本发明实施例提供一种网盘客户端的数据缓存方法,包括:As shown in FIG. 1 , an embodiment of the present invention provides a data caching method for a network disk client, including:
S11,将云端数据中预设时间段内使用频率高于预设阈值的部分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现存储在虚拟磁盘中的所述云端数据的全部文件元数据,其中,所述文件元数据为描述所述云端数据的数据; S11. The part of the cloud data that is used in the preset time period is higher than the preset threshold, and is cached on the virtual disk in the form of an image file, and the virtual disk is used to present the cloud data stored in the virtual disk to the user. All file metadata, wherein the file metadata is data describing the cloud data;
S12,如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,根据所述云端数据的文件元数据,从云端下载所述文件。S12, if the file accessed by the user is cached in the virtual disk, accessing the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, according to file metadata of the cloud data, The file is downloaded in the cloud.
本发明实施例提供的网盘客户端的数据缓存方法,将云端数据中预设时间段内使用频率高于预设阈值的部分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现所述云端数据的全部文件元数据,通过文件元数据对真实的文件数据的完整描述,即使一些文件数据本身没有在虚拟磁盘,用户也可以获知全部文件的名称、目录、大小等信息,犹如所有文件都在本地一般,用户体验良好。当用户访问文件时,如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,根据所述云端数据的文件元数据,从云端下载所述文件,由于虚拟磁盘存储的是预设时间段内最常用数据,从而充分利用本地有限的缓存资源,为用户提供了优质的缓存服务,大大提升了用户体验。The data caching method of the network disk client provided by the embodiment of the present invention caches a portion of the cloud data in a preset time period with a frequency higher than a preset threshold in an image file in a virtual disk, and provides the user to the virtual disk through the virtual disk. Presenting all the file metadata of the cloud data, and completely describing the real file data through the file metadata. Even if some file data itself is not in the virtual disk, the user can know the name, directory, size and other information of all the files, as if All files are local and the user experience is good. When the user accesses the file, if the file accessed by the user is cached in the virtual disk, the file is accessed through the virtual disk; if the file accessed by the user is not cached in the virtual disk, the file according to the cloud data Metadata, downloading the file from the cloud, because the virtual disk stores the most commonly used data within a preset time period, thereby fully utilizing the limited local cache resources, providing users with a high-quality cache service, greatly improving the user experience.
可选的,基于虚拟磁盘的缓存的实现原理可如图2所示。虚拟磁盘驱动可以在系统中通过驱动的方式虚拟出一个磁盘(即虚拟磁盘(virtual disk)),由虚拟磁盘驱动程序对该虚拟磁盘的数据进行管理。对上层而言,这个虚拟出的磁盘和其他磁盘完全一样,用户可以看见所有在网盘中存储的数据资料,而对下层而言,虚拟磁盘使用镜像文件作为缓存空间的实际存储。如果用户访问的文件缓存在所述虚拟磁盘中,可以通过虚拟磁盘驱动将对所述文件的访问请求重定向到所述镜像文件中。其中,镜像文件只存储了与自身大小相匹配的部分实际数据的缓存,而通过虚拟磁盘驱动向用户呈现完整的文件元数据。如果用户访问的文件没有缓存在所述虚拟磁盘中,则可以根据所述云端数据的文件元数据,从云端下载所述文件以便实现访问。Optionally, the implementation principle of the virtual disk based cache can be as shown in FIG. 2 . The virtual disk drive can virtualize a disk (that is, a virtual disk) by means of a driver in the system, and the virtual disk driver manages the data of the virtual disk. For the upper layer, this virtual disk is exactly the same as other disks, and the user can see all the data stored in the network disk. For the lower layer, the virtual disk uses the image file as the actual storage of the cache space. If the file accessed by the user is cached in the virtual disk, an access request for the file may be redirected to the image file by the virtual disk drive. Among them, the image file only stores a cache of part of the actual data that matches its own size, and the virtual disk drive presents the complete file metadata to the user. If the file accessed by the user is not cached in the virtual disk, the file may be downloaded from the cloud according to the file metadata of the cloud data for access.
可选的,在步骤S11中,缓存在本地的镜像文件的大小与虚拟磁盘的缓存空间相适应,缓存的镜像文件是云端数据的一部分。为了方便用户的使用,缓存的数据可选用户预设时间段最常用的数据,也就是当文件的预设时间段使用频率高于预设频率时,优先将该文件缓存到本地虚拟磁盘中。在步骤S12中,借助于文件元数据,用户可以通过虚拟磁盘看到所有文件的文件 名、目录、大小等信息,并通过虚拟磁盘或者云端下载访问到相应的文件。Optionally, in step S11, the size of the image file cached locally is adapted to the cache space of the virtual disk, and the cached image file is part of the cloud data. In order to facilitate the use of the user, the cached data can be selected from the most commonly used data of the user preset time period, that is, when the preset time period of the file is used higher than the preset frequency, the file is preferentially cached into the local virtual disk. In step S12, by means of the file metadata, the user can see the files of all the files through the virtual disk. Name, directory, size and other information, and access to the corresponding file through virtual disk or cloud download.
可以理解的,既然虚拟磁盘中缓存的数据是用户预设时间段最常用的数据,那么随着用户对文件不断进行读写操作,虚拟磁盘中缓存的数据也可以进行相应的动态调整,淘汰掉预设时间段最少用的数据,缓存进新的预设时间段最常用数据。It can be understood that since the data cached in the virtual disk is the most commonly used data in the preset time period of the user, the data cached in the virtual disk can be dynamically adjusted and eliminated as the user continuously reads and writes the file. The least used data for the preset time period is cached into the most commonly used data for the new preset time period.
为了使虚拟磁盘能保持一定的缓存能力,可选的,可以为虚拟磁盘设置相应的预设缓存阈值,定时查看虚拟磁盘的剩余缓存空间,或者在用户进行读写操作前查看虚拟磁盘的剩余缓存空间,在虚拟磁盘的剩余缓存空间小于预设缓存阈值的情况下,将预设时间段最少访问的文件从所述虚拟磁盘中删除,直至所述剩余缓存空间大于或等于预设缓存阈值为止。可选的,可以在每次访问文件时,记录下相应的访问时间,对虚拟磁盘中的所有文件执行LRU(Least Recently Used,最近最少用)算法,从而筛选出预设时间段最少用文件。To enable the virtual disk to maintain a certain cache capacity, you can set the default cache threshold for the virtual disk, periodically check the remaining cache space of the virtual disk, or view the remaining cache of the virtual disk before the user performs read and write operations. In the case that the remaining cache space of the virtual disk is less than the preset cache threshold, the file that is accessed at least in the preset time period is deleted from the virtual disk until the remaining cache space is greater than or equal to the preset cache threshold. Optionally, each time the file is accessed, the corresponding access time is recorded, and an LRU (Least Recently Used) algorithm is executed on all the files in the virtual disk, thereby filtering out the minimum file for the preset time period.
可选的,这种筛选操作可以通过设置一层文件过滤驱动(file system filter driver)来实现。如图3所示,在本实施例中,文件过滤驱动位于windows的文件系统驱动(file system driver)之上。用户在虚拟磁盘上的所有的读写请求都将被Windows系统内核态中运行的I/O管理器捕获并生成一个I/O请求包(IRP,I/O requset package),Windows I/O管理器检查到附加设备对象(即文件过滤驱动)存在后,I/O管理器先把IRP发送给文件过滤驱动,文件过滤驱动收到I/O管理器发送来的IRP后将其通过客户端的网络通信层发送到云端存储设备,并检查虚拟磁盘空间大小是否大于预设存储阀值,如果空间不足,执行LRU算法,淘汰预设时间段最久未使用的缓存文件,直到本地剩余缓存大于或等于预设存储阀值。经过文件过滤驱动程序处理后的IRP请求再下发给文件系统驱动进行文件系统级别的逻辑写入操作,文件系统驱动再将I/O请求发送到目的设备(在本实施例中,目的设备为虚拟磁盘驱动(virtual disk driver))进行实际的写入操作。Optionally, this filtering operation can be implemented by setting a file system filter driver. As shown in FIG. 3, in this embodiment, the file filtering driver is located above the file system driver of windows. All user read and write requests on the virtual disk will be captured by the I/O Manager running in the kernel state of the Windows system and generate an I/O request package (IRP, I/O requset package), Windows I/O Management. After checking that the attached device object (ie file filter driver) exists, the I/O manager first sends the IRP to the file filter driver, and the file filter driver receives the IRP sent by the I/O manager and passes it through the client's network. The communication layer sends the data to the cloud storage device, and checks whether the virtual disk space is greater than the preset storage threshold. If the space is insufficient, the LRU algorithm is executed to eliminate the cache file that is unused for the preset time period until the local remaining cache is greater than or equal to the pre- Set the storage threshold. The IRP request processed by the file filter driver is sent to the file system driver for file system level logical write operation, and the file system driver sends the I/O request to the destination device. In this embodiment, the destination device is The virtual disk driver performs the actual write operation.
可选的,本发明实施例提供的网盘客户端的数据缓存方法,还可以随时接收用户的虚拟磁盘配置指令,并根据该配置指令,重新配置所述虚拟磁盘,从而实现缓存空间的可定制。 Optionally, the data caching method of the network disk client provided by the embodiment of the present invention may further receive the virtual disk configuration instruction of the user at any time, and reconfigure the virtual disk according to the configuration instruction, thereby implementing customization of the cache space.
例如,在本发明的一个实施例中,当用户需要更改虚拟磁盘的参数时,可以通过点击界面按钮或调用菜单等操作触发对虚拟磁盘的配置操作。接收到用户的配置操作指令后,系统可以进行如下响应:For example, in one embodiment of the present invention, when the user needs to change the parameters of the virtual disk, the configuration operation of the virtual disk can be triggered by clicking an interface button or calling a menu. After receiving the user's configuration operation command, the system can respond as follows:
向用户提供虚拟磁盘配置界面,通过所述配置界面接收用户重新设置所述虚拟磁盘的盘符名、缓存空间大小及缓存阈值的指令;Providing a virtual disk configuration interface to the user, and receiving, by the configuration interface, an instruction for the user to reset the drive letter name, the cache space size, and the cache threshold of the virtual disk;
卸载虚拟磁盘,并按照所述虚拟磁盘配置界面中的参数重新配置虚拟磁盘;Unmount the virtual disk and reconfigure the virtual disk according to the parameters in the virtual disk configuration interface.
将重新配置的虚拟磁盘重新挂载。Remount the reconfigured virtual disk.
这样,用户就可以根据需要随时对虚拟磁盘的缓存空间缓存阈值等参数进行调整,进一步提升了用户体验。In this way, the user can adjust the parameters such as the cache buffer threshold of the virtual disk at any time as needed, thereby further improving the user experience.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
下面对本发明实施例提供的网盘客户端的数据缓存方法进行详细说明。The data caching method of the network disk client provided by the embodiment of the present invention is described in detail below.
如图4所示,当用户在虚拟磁盘中添加/修改文件触发上传操作时,虚拟磁盘可以进行如下缓存:As shown in Figure 4, when a user adds/modifies a file in a virtual disk to trigger an upload operation, the virtual disk can be cached as follows:
S201,捕获到添加/修改文件操作;S201, capturing an add/modify file operation;
S202,发送文件内容校验码到云端服务器,确认有没有相同文件存在,不存在则上传新文件内容到云端服务器;S202: Send a file content check code to the cloud server to confirm whether the same file exists, and if not, upload the new file content to the cloud server;
S203,更新文件访问记录表,将该文件唯一标识放入表尾,代表该文件预设时间段被访问过;S203. Update a file access record table, and put the unique identifier of the file into the end of the table, and the preset time period of the file is accessed;
S204,验证缓存空间是否已达到阀值,如果达到,执行LRU算法,淘汰预设时间段最久未使用的文件缓存数据,直到剩余缓存空间大于阀值。S204: Verify that the cache space has reached the threshold. If yes, execute the LRU algorithm to eliminate the unused file cache data for the preset time period until the remaining cache space is greater than the threshold.
S205,将该文件写入虚拟磁盘,完成上传操作。S205. Write the file to the virtual disk to complete the upload operation.
如图5所示,当用户访问云端文件触发下载操作时,虚拟磁盘可以进行如下缓存:As shown in Figure 5, when a user accesses a cloud file to trigger a download operation, the virtual disk can be cached as follows:
S301,用户访问虚拟磁盘中的文件,如果该文件在本地有缓存,则直 接访问。S301. The user accesses a file in the virtual disk, and if the file has a cache locally, the line is straight. Access.
S302,该文件在本地无缓存,客户端向云端请求该文件数据。云端向客户端发送该文件内容。S302, the file is not cached locally, and the client requests the file data from the cloud. The cloud sends the file content to the client.
S303,更新文件访问记录表,将该文件唯一标识放入表尾,代表该文件预设时间段被访问过。S303. Update the file access record table, and put the unique identifier of the file into the end of the table, and the preset time period of the file is accessed.
S304,验证缓存空间是否已达到阀值,如果达到,执行LRU算法,淘汰预设时间段最久未使用的文件缓存数据,直到缓存空间大于阀值。S304. Verify that the cache space has reached the threshold. If yes, execute the LRU algorithm to eliminate the file cache data that has not been used for the preset time period until the cache space is greater than the threshold.
S305,将该文件写入虚拟磁盘,完成下载操作。S305. Write the file to the virtual disk to complete the download operation.
本实施例以文件过滤驱动作为文件系统监控手段,监控虚拟磁盘驱动构建出的缓存空间中的文件变化,保证有限的缓存空间得到有效利用。In this embodiment, the file filtering driver is used as a file system monitoring means to monitor file changes in the cache space constructed by the virtual disk driver, thereby ensuring effective use of the limited buffer space.
相应的,如图6所示,本发明的实施例还提供一种网盘客户端的数据缓存装置,包括:Correspondingly, as shown in FIG. 6, an embodiment of the present invention further provides a data cache device of a network disk client, including:
缓存单元41,设置为将云端数据中预设时间段使用频率高于预设阈值的部分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现所述云端数据的全部文件元数据,其中,所述文件元数据为描述所述云端数据的数据;The cache unit 41 is configured to cache a portion of the cloud data whose preset time period usage frequency is higher than a preset threshold in a form of an image file on the virtual disk, and present all file elements of the cloud data to the user through the virtual disk. Data, wherein the file metadata is data describing the cloud data;
访问单元42,设置为:如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,根据所述云端数据的文件元数据,从云端下载所述文件。The access unit 42 is configured to: if the file accessed by the user is cached in the virtual disk, access the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, according to the cloud data File metadata, download the file from the cloud.
本发明实施例提供的网盘客户端的数据缓存装置,缓存单元41能够将云端数据中预设时间段使用频率高于预设阈值的部分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现所述云端数据的全部文件元数据,通过文件元数据对真实的文件数据的完整描述,即使一些文件数据本身没有在虚拟磁盘,用户也可以获知全部文件的名称、目录、大小等信息,犹如所有文件都在本地一般,用户体验良好。当用户访问文件时,如果用户访问的文件缓存在所述虚拟磁盘中,访问单元42能够通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,访问单元42能够根据所述云端数据的文件元数据,从云端下载所述文件,由于虚拟磁盘 存储的是预设时间段最常用数据,从而充分利用本地有限的缓存资源,为用户提供了优质的缓存服务,大大提升了用户体验。In the data cache device of the network disk client provided by the embodiment of the present invention, the cache unit 41 can cache the portion of the cloud data whose preset time period is used above the preset threshold in the form of an image file on the virtual disk, and pass the virtual The disk presents all the file metadata of the cloud data to the user, and complete description of the real file data through the file metadata. Even if some file data itself is not in the virtual disk, the user can know the name, directory, size, etc. of all the files. Information, as if all files are local, the user experience is good. When the user accesses the file, if the file accessed by the user is cached in the virtual disk, the access unit 42 can access the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, the access unit 42 The file can be downloaded from the cloud according to the file metadata of the cloud data, due to the virtual disk The most common data is stored in the preset time period, so that the local limited cache resources are fully utilized, and the user is provided with a high-quality cache service, which greatly improves the user experience.
可选的,该装置还可包括删除单元,设置为在所述虚拟磁盘的剩余缓存空间小于预设缓存阈值的情况下,将预设时间段最少访问的文件从所述虚拟磁盘中删除,直至所述剩余缓存空间大于或等于所述预设缓存阈值为止。Optionally, the device may further include a deleting unit, configured to delete, from the virtual disk, the file that is accessed at least in the preset time period, if the remaining cache space of the virtual disk is less than a preset cache threshold. The remaining cache space is greater than or equal to the preset cache threshold.
可选的,访问单元42,是设置为如果用户访问的文件缓存在所述虚拟磁盘中,通过虚拟磁盘驱动将对所述文件的访问请求重定向到所述镜像文件中。Optionally, the access unit 42 is configured to redirect the access request for the file to the image file by the virtual disk driver if the file accessed by the user is cached in the virtual disk.
可选的,该装置还包括配置单元,设置为根据用户的虚拟磁盘配置指令,重新配置所述虚拟磁盘。Optionally, the apparatus further includes a configuration unit configured to reconfigure the virtual disk according to a virtual disk configuration instruction of the user.
可选的,配置单元,是设置为:向用户提供虚拟磁盘配置界面,通过所述配置界面接收用户重新设置所述虚拟磁盘的盘符名、缓存空间大小及缓存阈值的指令;卸载所述虚拟磁盘,并按照所述虚拟磁盘配置界面中的参数重新配置所述虚拟磁盘;将重新配置的所述虚拟磁盘重新挂载。Optionally, the configuration unit is configured to: provide a virtual disk configuration interface to the user, and receive, by the configuration interface, an instruction for the user to reset the drive letter name, the cache space size, and the cache threshold of the virtual disk; and uninstall the virtual Disk, and reconfigure the virtual disk according to parameters in the virtual disk configuration interface; remount the reconfigured virtual disk.
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。 The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
工业实用性Industrial applicability
上述技术方案实现了即使文件数据本身没有在虚拟磁盘,用户也可以获知全部文件的名称、目录、大小等信息,犹如所有文件都在本地一般,用户体验良好;此外,上述技术方案充分利用本地有限的缓存资源,为用户提供了优质的缓存服务,大大提升了用户体验。 The above technical solution realizes that even if the file data itself is not in the virtual disk, the user can know the names, directories, sizes and the like of all the files, as if all the files are local and the user experience is good; in addition, the above technical solutions make full use of the local limited The cache resources provide users with a high-quality cache service, which greatly enhances the user experience.

Claims (11)

  1. 一种网盘客户端的数据缓存方法,包括:A data cache method for a network disk client, comprising:
    将云端数据中预设时间段使用频率高于预设阈值的部分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现所述云端数据的全部文件元数据,其中,所述文件元数据为描述所述云端数据的数据;Portaging, in the cloud data, a portion of the cloud data that is used by the preset time period to be higher than the preset threshold is cached in the virtual disk in the form of an image file, and the file metadata of the cloud data is presented to the user through the virtual disk, where The file metadata is data describing the cloud data;
    如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,根据所述云端数据的文件元数据,从云端下载所述文件。If the file accessed by the user is cached in the virtual disk, accessing the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, downloading from the cloud according to file metadata of the cloud data The file.
  2. 根据权利要求1所述的方法,所述方法还包括:The method of claim 1 further comprising:
    在所述虚拟磁盘的剩余缓存空间小于预设缓存阈值的情况下,将预设时间段最少访问的文件从所述虚拟磁盘中删除,直至所述剩余缓存空间大于或等于所述预设缓存阈值为止。If the remaining cache space of the virtual disk is less than the preset cache threshold, deleting the file with the least time of the preset time period from the virtual disk, until the remaining cache space is greater than or equal to the preset cache threshold. until.
  3. 根据权利要求1所述的方法,其中,所述如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件包括:The method of claim 1, wherein if the file accessed by the user is cached in the virtual disk, accessing the file through the virtual disk comprises:
    如果用户访问的文件缓存在所述虚拟磁盘中,通过虚拟磁盘驱动将对所述文件的访问请求重定向到所述镜像文件中。If the file accessed by the user is cached in the virtual disk, an access request for the file is redirected to the image file by the virtual disk drive.
  4. 根据权利要求1至3中任一项所述的方法,还包括根据用户的虚拟磁盘配置指令,重新配置所述虚拟磁盘。The method of any one of claims 1 to 3, further comprising reconfiguring the virtual disk based on a virtual disk configuration instruction of the user.
  5. 根据权利要求4所述的方法,其中,所述根据用户的虚拟磁盘配置指令,重新配置所述虚拟磁盘包括:The method of claim 4, wherein the reconfiguring the virtual disk according to a virtual disk configuration instruction of the user comprises:
    向用户提供虚拟磁盘配置界面,通过所述配置界面接收用户重新设置所述虚拟磁盘的盘符名、缓存空间大小及缓存阈值的指令;Providing a virtual disk configuration interface to the user, and receiving, by the configuration interface, an instruction for the user to reset the drive letter name, the cache space size, and the cache threshold of the virtual disk;
    卸载所述虚拟磁盘,并按照所述虚拟磁盘配置界面中的参数重新配置所述虚拟磁盘;Unloading the virtual disk and reconfiguring the virtual disk according to parameters in the virtual disk configuration interface;
    将重新配置的所述虚拟磁盘重新挂载。Remount the reconfigured virtual disk.
  6. 一种网盘客户端的数据缓存装置,包括:A data cache device for a network disk client, comprising:
    缓存单元,设置为将云端数据中预设时间段使用频率高于预设阈值的部 分以镜像文件的形式缓存在虚拟磁盘,并通过所述虚拟磁盘向用户呈现所述云端数据的全部文件元数据,其中,所述文件元数据为描述所述云端数据的数据;a cache unit, configured to use a portion of the cloud data in which the preset time period is used above a preset threshold Storing the virtual disk in the form of an image file, and presenting, by the virtual disk, all the file metadata of the cloud data to the user, where the file metadata is data describing the cloud data;
    访问单元,设置为:如果用户访问的文件缓存在所述虚拟磁盘中,通过所述虚拟磁盘访问所述文件;如果用户访问的文件没有缓存在所述虚拟磁盘中,根据所述云端数据的文件元数据,从云端下载所述文件。An access unit, configured to: if the file accessed by the user is cached in the virtual disk, access the file through the virtual disk; if the file accessed by the user is not cached in the virtual disk, the file according to the cloud data Metadata, download the file from the cloud.
  7. 根据权利要求6所述的装置,还包括:The apparatus of claim 6 further comprising:
    删除单元,设置为在所述虚拟磁盘的剩余缓存空间小于预设缓存阈值的情况下,将预设时间段最少访问的文件从所述虚拟磁盘中删除,直至所述剩余缓存空间大于或等于所述预设缓存阈值为止。Deleting a unit, configured to delete, from the virtual disk, a file that is accessed at least by a preset time period, if the remaining cache space of the virtual disk is less than a preset cache threshold, until the remaining cache space is greater than or equal to The preset cache threshold is described.
  8. 根据权利要求6所述的装置,其中,所述访问单元,是设置为如果用户访问的文件缓存在所述虚拟磁盘中,通过虚拟磁盘驱动将对所述文件的访问请求重定向到所述镜像文件中。The apparatus according to claim 6, wherein said access unit is configured to redirect an access request for said file to said image through a virtual disk drive if a file accessed by a user is cached in said virtual disk In the file.
  9. 根据权利要求6至8中任一项所述的装置,还包括配置单元,设置为根据用户的虚拟磁盘配置指令,重新配置所述虚拟磁盘。The apparatus according to any one of claims 6 to 8, further comprising a configuration unit configured to reconfigure the virtual disk according to a virtual disk configuration instruction of the user.
  10. 根据权利要求9所述的装置,其中,所述配置单元,是设置为:The apparatus according to claim 9, wherein said configuration unit is configured to:
    向用户提供虚拟磁盘配置界面,通过所述配置界面接收用户重新设置所述虚拟磁盘的盘符名、缓存空间大小及缓存阈值的指令;卸载所述虚拟磁盘,并按照所述虚拟磁盘配置界面中的参数重新配置所述虚拟磁盘;将重新配置的所述虚拟磁盘重新挂载。Providing a virtual disk configuration interface to the user, and receiving, by the configuration interface, an instruction for the user to reset the drive letter name, the cache space size, and the cache threshold of the virtual disk; uninstalling the virtual disk, and following the virtual disk configuration interface The parameter reconfigures the virtual disk; remounts the reconfigured virtual disk.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1~5中任一项所述的方法。 A computer storage medium having stored therein computer executable instructions for performing the method of any one of claims 1 to 5.
PCT/CN2015/091136 2015-02-10 2015-09-29 Data caching method and device for net disk client WO2016127656A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510070970.3 2015-02-10
CN201510070970.3A CN105988721A (en) 2015-02-10 2015-02-10 Data caching method and apparatus for network disk client

Publications (1)

Publication Number Publication Date
WO2016127656A1 true WO2016127656A1 (en) 2016-08-18

Family

ID=56615228

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/091136 WO2016127656A1 (en) 2015-02-10 2015-09-29 Data caching method and device for net disk client

Country Status (2)

Country Link
CN (1) CN105988721A (en)
WO (1) WO2016127656A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470008A (en) * 2022-11-14 2022-12-13 杭州拓数派科技发展有限公司 Metadata access method and device and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117082A (en) * 2017-06-23 2019-01-01 杭州美界科技有限公司 A kind of beauty recommender system based on caching
CN109379405A (en) * 2018-09-14 2019-02-22 深圳市京华科讯科技有限公司 Virtual disk construction method, virtual disk system and Dropbox
CN110933120A (en) * 2018-09-19 2020-03-27 阿里巴巴集团控股有限公司 Computing method, device and system based on hybrid cloud
CN110221988B (en) * 2019-05-05 2021-04-30 福建天泉教育科技有限公司 Cache optimization method and system for third-party data
CN110784540B (en) * 2019-10-31 2022-03-04 四川巧夺天工信息安全智能设备有限公司 Method for reducing and accelerating flow of digital media distribution platform based on multi-terminal decision
CN115023693A (en) * 2020-05-29 2022-09-06 深圳市欢太科技有限公司 Mirror image updating method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333079A (en) * 2011-02-25 2012-01-25 北京兴宇中科科技开发股份有限公司 Method for clearing disk space
US20120144098A1 (en) * 2009-04-30 2012-06-07 Velobit, Inc. Multiple locality-based caching in a data storage system
CN102694828A (en) * 2011-03-23 2012-09-26 中兴通讯股份有限公司 Method and apparatus for data access in distributed caching system
CN103116618A (en) * 2013-01-28 2013-05-22 南开大学 Telefile system mirror image method and system based on lasting caching of client-side
CN104320448A (en) * 2014-10-17 2015-01-28 张维加 Method and device for accelerating caching and prefetching of computing device based on big data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120179874A1 (en) * 2011-01-07 2012-07-12 International Business Machines Corporation Scalable cloud storage architecture
CN103064637A (en) * 2012-12-24 2013-04-24 珠海金山办公软件有限公司 Network disk cache synchronizing method and system
CN104298473A (en) * 2014-10-12 2015-01-21 张维加 Method and device for achieving computing virtualization by nesting virtual disk to virtual machine

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120144098A1 (en) * 2009-04-30 2012-06-07 Velobit, Inc. Multiple locality-based caching in a data storage system
CN102333079A (en) * 2011-02-25 2012-01-25 北京兴宇中科科技开发股份有限公司 Method for clearing disk space
CN102694828A (en) * 2011-03-23 2012-09-26 中兴通讯股份有限公司 Method and apparatus for data access in distributed caching system
CN103116618A (en) * 2013-01-28 2013-05-22 南开大学 Telefile system mirror image method and system based on lasting caching of client-side
CN104320448A (en) * 2014-10-17 2015-01-28 张维加 Method and device for accelerating caching and prefetching of computing device based on big data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470008A (en) * 2022-11-14 2022-12-13 杭州拓数派科技发展有限公司 Metadata access method and device and storage medium
CN115470008B (en) * 2022-11-14 2023-03-10 杭州拓数派科技发展有限公司 Metadata access method and device and storage medium

Also Published As

Publication number Publication date
CN105988721A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
WO2016127656A1 (en) Data caching method and device for net disk client
US10853339B2 (en) Peer to peer ownership negotiation
US9740436B2 (en) Elastic file system management in storage cloud environments
US10579404B2 (en) Provisioning virtual desktops with stub virtual disks
US9021556B2 (en) System and method for virtual device communication filtering
US9727578B2 (en) Coordinated access to a file system's shared storage using dynamic creation of file access layout
US9600492B2 (en) Data processing performance enhancement in a distributed file system
US9639459B2 (en) I/O latency and IOPs performance in thin provisioned volumes
US20130232215A1 (en) Virtualized data storage system architecture using prefetching agent
US8799335B2 (en) Supporting coordinated access to a file system's shared storage using automatic alignment of a parallel file access protocol and metadata management
US20150370845A1 (en) Storage device data migration
WO2015196196A1 (en) System, apparatus and method for managing redundancy elimination in packet storage during observation of data movement
KR20130026908A (en) Local apparatus based on cloud and method for reading and storing file
US20120296871A1 (en) File managing apparatus for processing an online storage service
US11029932B2 (en) Hydration of applications
US20210173815A1 (en) Automatically dispositioning of copies of data
US9959281B2 (en) Concurrent file and object protocol access using space-efficient cloning
US11768740B2 (en) Restoring operation of data storage systems at disaster recovery sites
CN103942120B (en) A kind of reading/writing method and system based on Intel Virtualization Technology
US10423785B2 (en) Data scanning within distributed computing components
US10891226B1 (en) Virtual address space dump in a computer system
US11287982B2 (en) Associating data management policies to portions of data using connection information
US10884621B2 (en) Block volume mount synchronization to prevent data corruption
US20190121899A1 (en) Apparatus and method for managing integrated storage
US20160048582A1 (en) Dynamic alternate keys for use in file systems utilizing a keyed index

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15881806

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15881806

Country of ref document: EP

Kind code of ref document: A1