WO2016192456A1 - 网络盘本地挂载处理方法、装置及系统 - Google Patents

网络盘本地挂载处理方法、装置及系统 Download PDF

Info

Publication number
WO2016192456A1
WO2016192456A1 PCT/CN2016/078169 CN2016078169W WO2016192456A1 WO 2016192456 A1 WO2016192456 A1 WO 2016192456A1 CN 2016078169 W CN2016078169 W CN 2016078169W WO 2016192456 A1 WO2016192456 A1 WO 2016192456A1
Authority
WO
WIPO (PCT)
Prior art keywords
disk
terminal
cache
network
network disk
Prior art date
Application number
PCT/CN2016/078169
Other languages
English (en)
French (fr)
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 WO2016192456A1 publication Critical patent/WO2016192456A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • the present invention relates to the field of communications, and in particular to a network disk local mount processing method, apparatus, and system.
  • A Network disk based on cloud storage, common in the products of various Internet companies, the product provides a certain network space, the user connects through a proprietary client, such network disk is usually stored based on file mode, in this case
  • synchronization between the client and the server is often required. User manual synchronization;
  • a network disk based on the Ethernet Small Computer System Interface (ISCSI) protocol the network disk can directly read and write operations based on the disk sector on the client through a proprietary protocol, but In the related art, the transmission real-time requirement is high and the data traffic is large.
  • ISCSI Ethernet Small Computer System Interface
  • Such a network disk is generally only applicable to a local area network, and is basically in an unavailable state in an Internet environment;
  • the invention provides a network disk local mounting processing method, device and system, so as to at least solve the problem that the user operation of the network disk in the related art is complicated and the experience is poor.
  • a network disk processing method including:
  • the terminal acquires information about the network disk allocated by the server, and creates a virtual disk according to the information of the network disk;
  • the terminal intercepts operations of the virtual disk by the terminal
  • the terminal allocates a cache space on an unused local disk, and the operation of the terminal to the virtual disk is redirected to an operation on the cache space.
  • the obtaining, by the terminal, the information of the network disk allocated by the server includes:
  • the terminal sends the query information to the server, where the query information is used to query whether the terminal allocates the network disk on the server;
  • the server sends the information of the network disk to the terminal.
  • processing the cache space according to the operation includes:
  • the cache space is processed according to the cache mapping relationship table corresponding to the operation, where the terminal saves the cache mapping relationship table, where the cache mapping relationship table includes: a read cache mapping relationship table and a write cache mapping relationship table.
  • the processing the cache space according to the operation includes:
  • the cache space if the cache space does not have data corresponding to the read operation, the data is read from the network disk, the data is written into the cache space, and the update is performed. Read the cache relationship mapping table.
  • the processing the cache space according to the operation includes:
  • the method includes:
  • the terminal scans the write cache mapping relationship table, and uploads data corresponding to the write operation to the network disk.
  • the upload request is re-initiated to continue uploading the data.
  • a network disk local mount processing device which is located in the terminal, and includes:
  • Creating a module configured to obtain information about a network disk allocated by the server, and create a virtual disk according to the information of the network disk;
  • An intercepting module configured to intercept an operation of the terminal on the virtual disk
  • a processing module configured to allocate a cache space on an unused local disk, the operation of the terminal being redirected to the operation of the cache space.
  • a network disk local mount processing system including: a terminal and a server;
  • the terminal acquires information about the network disk allocated by the server, and creates a virtual disk according to the information of the network disk;
  • the terminal intercepts operations of the virtual disk by the terminal
  • the terminal allocates a cache space on an unused local disk, and the operation of the terminal to the virtual disk is redirected to an operation on the cache space.
  • the terminal acquires the information of the network disk allocated by the server, creates a virtual disk according to the information of the network disk, and the terminal intercepts the operation of the virtual disk by the terminal, and the terminal allocates a cache space on the unused local disk.
  • the operation of the virtual disk on the terminal is redirected to the operation of the cache space, which solves the problem of complicated operation and poor experience of the user of the network disk, optimizes the operation mode of the user, and reduces network traffic.
  • FIG. 1 is a flowchart of a local disk local mount processing method according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of a network disk local mount processing apparatus according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of networking of a network disk system according to a preferred implementation of the present invention.
  • FIG. 4 is a schematic flow chart of a client internal structure according to a preferred implementation of the present invention.
  • FIG. 5 is a schematic diagram showing the relationship between modules of a client according to a preferred implementation of the present invention.
  • FIG. 6 is a schematic diagram of a disk drive startup initialization process according to a preferred implementation of the present invention.
  • FIG. 7 is a schematic diagram of a read request processing flow according to a preferred implementation of the present invention.
  • FIG. 8 is a schematic diagram of a write request processing flow according to a preferred implementation of the present invention.
  • FIG. 9 is a flow chart showing the process of uploading a write cache in accordance with a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a network disk local mounting processing method according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps. :
  • Step S102 The terminal acquires information about the network disk allocated by the server, and creates a virtual disk according to the information of the network disk.
  • Step S104 the terminal intercepts the operation of the virtual disk by the terminal
  • Step S106 the terminal allocates a cache space on an unused local disk, and the operation of the terminal on the virtual disk is heavy. Oriented to operate on this cache space.
  • the terminal acquires the information of the network disk allocated by the server, creates a virtual disk according to the information of the network disk, and the terminal application intercepts the operation of the virtual disk by the terminal, and redirects the read and write operations of the virtual disk to be local.
  • the cache space is read and written to temporarily store the data required for the operation of the virtual disk corresponding to the network disk on the unused local disk.
  • the data corresponding to the operation in the cache space may be deleted.
  • the terminal sends query information to the server, where the query information is used to query whether the terminal allocates the network disk on the server; if the network disk is allocated on the server, the server sends the The terminal sends the information of the network disk.
  • the cache space may be processed according to the cache mapping relationship table corresponding to the operation, where the terminal saves the cache mapping relationship table, where the cache mapping relationship table includes a read cache mapping relationship table and a write cache mapping relationship table. and many more.
  • the operation is a read operation
  • the data is read from the network disk, and the data is written into the cache space and the read operation cache relationship mapping table is updated.
  • the operation is a write operation
  • data corresponding to the write operation is written into the cache space, and the read cache mapping relationship table and the write cache mapping relationship table are updated.
  • the terminal application simultaneously scans the write cache mapping relationship table, and uploads data corresponding to the write operation to the network disk.
  • the upload request is re-initiated to continue uploading the data.
  • the operation includes at least one of the following: a read operation, a write operation.
  • a network disk local-mounting processing device is also provided, which is used to implement the foregoing embodiments and preferred embodiments, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 2 is a structural block diagram of a network disk local mount processing apparatus according to an embodiment of the present invention, which is located in a terminal, as shown in FIG. 2, the device includes
  • the creating module 22 is configured to obtain information about the network disk allocated by the server, and create a virtual disk according to the information of the network disk;
  • the intercepting module 24 is configured to intercept the operation of the virtual disk by the terminal;
  • Processing module 26 configured to allocate a cache space on an unused local disk, the terminal's operation on the virtual disk Redirect to the operation of this cache space.
  • the device obtains the information of the network disk allocated by the server, creates a virtual disk according to the information of the network disk, and the terminal application intercepts the operation of the virtual disk by the terminal, and redirects the read and write operations of the virtual disk to be local.
  • the cache space is read and written to temporarily store the data required for the operation of the virtual disk corresponding to the network disk on the unused local disk. In the operation of the network disk, the data corresponding to the operation in the cache space may be deleted.
  • a network disk local mount processing system including: a terminal and a server;
  • the terminal acquires information about the network disk allocated by the server, and creates a virtual disk according to the information of the network disk;
  • the terminal intercepts the operation of the virtual disk by the terminal
  • the terminal allocates cache space on an unused local disk, and the terminal redirects the operation of the virtual disk to the operation of the cache space.
  • the preferred embodiment of the present invention proposes a new network disk usage mode, which uses a disk filter driver to redirect network disk data processing requests by establishing a disk sector read and write cache on the client side, thereby reducing network message interaction, and at the same time,
  • the client does not need to allocate files for caching.
  • the disk filter driver automatically searches for unused local disk sectors for caching. This optimizes the user operation mode, reduces message traffic, and greatly expands the usage of the network disk.
  • the preferred embodiment is an innovation for the use of the network disk; the user mounts the network disk through the virtual disk, and the operation of the disk is completely consistent with the operation of the local disk, and the user does not feel the difference from the local use.
  • the operation request for the disk is intercepted in the operating system, converted into operation on the network disk, and in order to smoothly use in the low bandwidth network, the patent invents a cache mechanism to reduce the real-time performance of the network by reading the cache and writing the cache. Dependence.
  • the preferred embodiment provides a method and system for locally buffering a network disk, including:
  • the server provides an interface that allows the client to create a network disk, read and write network disks, and delete network disks.
  • the client queries the service at startup to allocate a network disk to the user. If it has been allocated, it returns the corresponding network disk information, such as the UUID of the network disk, the size of the network disk, etc., if the user logs in for the first time, then The server creates a corresponding network image for the user to wait for the user's subsequent operations.
  • the virtual disk is created by the internal driver.
  • the operating system a new hard disk is added, and the disk can be partitioned, the partition is deleted, the read and write, and the like are the same as the local disk. operating.
  • the client driver intercepts the operating system's operations on the disk, such as reading, writing, querying, creating volumes, etc., and redirects the operation to the server's disk image.
  • the communication between the client and the server can use the Transmission Control Protocol (TCP) to ensure the correctness of the data.
  • TCP Transmission Control Protocol
  • Other communication protocols can also be used, and the operation can be guaranteed by transmission encryption and the like. The security of the data.
  • the cache space is allocated on the local disk.
  • the cache space does not affect the local data. Moreover, it is directly allocated on the disk, and the local disk space is completely undetectable from the user's point of view.
  • the cache space includes read cache and write cache, and in order to ensure data consistency, write operations need to be synchronized to the server in real time.
  • the client also saves the corresponding cache relationship mapping table, including the read cache mapping relationship table and the write cache mapping relationship table;
  • the client driver intercepts the read operation, it first determines whether it is in the read cache mapping table. If it already exists, it directly reads back from the local disk cache. If it does not exist, it reads from the network disk, and reads and writes. Local disk and update the read cache mapping table;
  • the client driver scans the write cache mapping table through a separate thread, and uploads the local disk data to the network disk according to the table.
  • the disk space used locally is to obtain the unallocated disk space in the operating system.
  • the most extreme case of this space is the same size as the network disk, and usually only a small part of the space is used.
  • the local disk will still save the relevant data change information, and the user can continue to upload the last modified part after rebooting.
  • the uploaded and downloaded data can be compressed, the network traffic is reduced, and the uploading and downloading speed is increased under the condition of low bandwidth.
  • the local cache method and system of the network disk of the preferred embodiment can reduce data transmission between the server and the client, and does not need to open a special cache space on the client, reduce user interaction, by using the system of the present invention and The method is to better increase the user experience and improve user satisfaction.
  • FIG. 3 is a schematic diagram of networking of a network disk system according to a preferred implementation of the present invention.
  • the server and the client are at both ends of the network, and the two are connected through a network, as long as the two can be connected through the Internet. You can use this system.
  • the network disk is an image file on the server side, and it is displayed as a disk in the operating system after being mounted to the client. The usage method is exactly the same as the local disk.
  • FIG. 4 is a schematic diagram of a process of internal structure of a client according to a preferred implementation of the present invention.
  • the operating system sends a user operation to an kernel layer through an IRP (I/O request package) message, and the present invention implements a disk filter.
  • IRP I/O request package
  • the present invention implements a disk filter.
  • Drive so when there is operation for the disk, it will be processed by the disk filter driver of the present invention first, and the driver will judge whether the operation is performed for the network disk, if not, it is transparently transmitted to the lower layer driver, if it is a read operation and local If there is no cached data, a network driver is used to establish a request with the server to obtain data information of the corresponding sector.
  • FIG. 5 is a schematic diagram showing the relationship between modules of a client according to a preferred implementation of the present invention, as shown in FIG.
  • the disk filtering system processes the read cache mapping table and the local cache information.
  • the server will query the server through the network driver, and then update to the local cache and update the read cache map.
  • Relational table; for write operations, the read cache mapping relationship table and the write cache mapping relationship table are updated synchronously while updating the local cache. For the network upload operation, the update is updated to the server according to the write cache mapping table.
  • FIG. 6 is a schematic diagram of a disk drive startup initialization process according to a preferred implementation of the present invention, including:
  • Step 601 the machine is powered on, and the disk filter driver of the patent is loaded while the operating system is started;
  • Step 602 After the disk filter driver is started, the server first queries whether the network disk needs to be mounted, and if so, creates a virtual disk in the local machine according to the returned disk information, and maps the virtual disk to the corresponding network. Disk, if not, proceed to the next step;
  • step 603 the disk filter driver needs to check whether there is a previous data to be transmitted in the cache space of the local device. This can be completed by whether there is a write cache relationship mapping table. If yes, a data upload operation process is required.
  • step 604 the local disk space is checked, and part of the local cache usage space is reserved. If the local network disk is inconsistent with the last time the machine is mounted, the previous write cache data must be successfully uploaded before the operation can be overwritten. ;
  • FIG. 7 is a schematic diagram of a read request processing flow according to a preferred implementation of the present invention, including:
  • Step 701 When the application layer sends a disk read request to the kernel, it is first intercepted by the disk filter driver of the present invention. At this time, it is first determined whether the virtual disk created for the driver is a network disk to perform a read operation;
  • Step 702 If the network disk is not read, transparently transmitting to the lower layer driver;
  • Step 703 If it is a network disk, first determine whether there is data in the local from the read cache relationship mapping table, and if it exists, read back from the local;
  • Step 704 If the read sector data is not saved locally, the request message is sent to the server through the network driver, and the server returns the data and saves it to the local cache and updates the read cache mapping relationship table.
  • FIG. 8 is a schematic diagram of a write request processing flow according to a preferred implementation of the present invention, including:
  • Step 801 When the application layer sends a disk write request to the kernel, it is first intercepted by the disk filter driver of the present invention. At this time, it is first determined whether the virtual disk created for the driver, that is, the network disk, is used for writing;
  • Step 802 If the network disk is not written, transparently transmitting to the lower layer driver;
  • Step 803 If it is a network disk, first write the local cache, and then modify the write cache relationship mapping table to trigger an upload cache event;
  • FIG. 9 is a schematic flowchart of an upload write cache process according to a preferred implementation of the present invention, including:
  • Step 901 After the system loads the disk filter driver, the disk filter driver creates a thread scan local cache cache write relationship table
  • Step 902 Wait for an event to be triggered if there is no data in the write cache mapping relationship table
  • Step 903 If there is data in the write cache mapping relation table, traverse from the beginning of the write cache mapping relation table, obtain data from the local cache through the mapping relationship, and then send the data to the server through the interface driven by the network;
  • Step 904 If the server returns successfully, continue scanning, start uploading the next piece of data, and return to fail to re-upload;
  • the invention is implemented by using a disk filter driver and a TDI driver in software, and can also be implemented by other levels of driving within WINDOWS, such as an NDIS driver or other schemes;
  • the interface between the client and the server implements many technical solutions, such as the TCP protocol, the UDP protocol, the HTTP protocol, etc.
  • the message can be encrypted.
  • compression algorithms can also be used for compression, etc., which are all included in the scope of this patent.
  • the terminal acquires the information of the network disk allocated by the server, creates a virtual disk according to the information of the network disk, and the terminal intercepts the operation of the virtual disk by the terminal, where the terminal is in an unused local area.
  • the cache space is allocated on the disk, and the operation of the virtual disk is redirected to the operation of the cache space, which solves the problem of complicated operation and poor experience of the user of the network disk, optimizes the operation mode of the user, and reduces network traffic. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供了一种网络盘本地挂载处理方法、装置及系统,其中,终端获取服务器分配的网络盘信息,根据该网络盘的信息创建虚拟磁盘,同时在本地磁盘未使用的扇区中分配缓存空间,截取终端对该虚拟磁盘的操作,重定向到缓存空间进行操作,解决了网络盘的用户操作复杂和体验差的问题,优化了用户的操作方式,减小了网络流量。

Description

网络盘本地挂载处理方法、装置及系统 技术领域
本发明涉及通信领域,具体而言,涉及一种网络盘本地挂载处理方法、装置及系统。
背景技术
随着云计算及互联网应用的快速发展,云桌面,网络盘等等应用越来越多,目前网络盘的使用主要有几下几种方式:
一:基于云存储方式的网络盘,常见于各互联网公司的产品,该产品提供一定的网络空间,用户通过专有的客户端进行连接,此类网络盘通常基于文件方式存储,在这种情况下存在以下弊端:对文件的读写修改等操作需要同步下载或者上传整个文件,因此对于大文件往往需要很长的时间进行下载上传操作,另外,客户端和服务端之间的同步也往往需要用户手工同步;
二:基于以太网小型计算机系统接口(Internet Small Computer System Interface,简称为ISCSI)协议的网络盘,该网络盘通过专有协议可以直接在客户端上基于磁盘扇区进行读写操作,但是,在相关技术中,传输实时性要求高、数据流量大,这类网络盘通常只适用于局域网,在互联网环境中基本处于不可用状态;
针对相关技术中,网络盘的用户操作复杂和体验差的问题,目前尚未提出有效的解决方案。
发明内容
本发明提供了一种网络盘本地挂载处理方法、装置及系统,以至少解决相关技术中网络盘的用户操作复杂和体验差的问题。
根据本发明的一个实施例,提供了一种网络盘处理方法,包括:
终端获取服务器分配的网络盘的信息,根据所述网络盘的信息创建虚拟磁盘;
所述终端截取所述终端对所述虚拟磁盘的操作;
所述终端在未使用的本地磁盘上分配缓存空间,所述终端对虚拟磁盘的所述操作重定向为对所述缓存空间的操作。
在本发明的实施例中,所述终端获取服务器分配的网络盘的信息之前包括:
所述终端向所述服务器发送查询信息,所述查询信息用于查询所述终端在所述服务器上是否有分配所述网络盘;
在所述服务器上有分配所述网络盘的情况下,所述服务器向所述终端发送所述网络盘的信息。
在本发明的实施例中,根据所述操作对缓存空间进行处理包括:
根据所述操作对应的缓存映射关系表对缓存空间进行处理,其中,所述终端保存所述缓存映射关系表,所述缓存映射关系表包括:读缓存映射关系表和写缓存映射关系表。
在本发明的实施例中,在所述操作为读操作的情况下,所述根据所述操作对缓存空间进行处理包括:
查询所述读缓存关系映射表是否有所述读操作对应的数据,在所述缓存空间有所述读操作对应的数据的情况下,从所述缓存空间中读取所述数据。
在本发明的实施例中,在所述缓存空间没有所述读操作对应的数据的情况下,从所述网络盘读取所述数据,将所述数据写入所述缓存空间及更新所述读缓存关系映射表。
在本发明的实施例中,在所述操作为写操作的情况下,所述根据所述操作对缓存空间进行处理包括:
将所述写操作对应的数据写入所述缓存空间,并更新所述读缓存映射关系表和所述写缓存映射关系表。
在本发明的实施例中,所述将所述写操作对应的数据写入所述缓存空间之后包括:
所述终端扫描所述写缓存映射关系表,将所述写操作对应的数据上传到所述网络盘。
在本发明的实施例中,在通过所述缓存空间向所述网络盘上传所述数据中断的情况下,重新发起上传请求继续上传所述数据。
根据本发明的另一个实施例,还提供了一种网络盘本地挂载处理装置,位于终端中,包括:
创建模块,设置为获取服务器分配的网络盘的信息,根据所述网络盘的信息创建虚拟磁盘;
截取模块,设置为截取所述终端对所述虚拟磁盘的操作;
处理模块,设置为在未使用的本地磁盘上分配缓存空间,所述终端对虚拟磁盘的所述操作重定向为对所述缓存空间的操作。
根据本发明的另一个实施例,还提供了一种网络盘本地挂载处理系统,包括:终端和服务器;
所述终端获取所述服务器分配的网络盘的信息,根据所述网络盘的信息创建虚拟磁盘;
所述终端截取所述终端对所述虚拟磁盘的操作;
所述终端在未使用的本地磁盘上分配缓存空间,所述终端对虚拟磁盘的所述操作重定向为对所述缓存空间的操作。
通过本发明,终端获取服务器分配的网络盘的信息,根据该网络盘的信息创建虚拟磁盘,该终端截取该终端对该虚拟磁盘的操作,该终端在未使用的本地磁盘上分配缓存空间,该终端对虚拟磁盘的该操作重定向为对该缓存空间的操作,解决了网络盘的用户操作复杂和体验差的问题,优化了用户的操作方式,减小了网络流量。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的一种网络盘本地挂载处理方法的流程图;
图2是根据本发明实施例的一种网络盘本地挂载处理装置的结构框图;
图3是根据本发明优选实施的网络盘系统组网示意图;
图4是根据本发明优选实施的客户端内部结构流程示意图;
图5是根据本发明优选实施的客户端各模块之间的关系示意图;
图6是根据本发明优选实施的磁盘驱动启动初始化流程示意图;
图7是根据本发明优选实施的读请求处理流程示意图;
图8是根据本发明优选实施的写请求处理流程示意图;
图9是根据本发明优选实施的上传写缓存处理流程示意图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
在本实施例中提供了一种网络盘本地挂载处理方法,图1是根据本发明实施例的一种网络盘本地挂载处理方法的流程图,如图1所示,该流程包括如下步骤:
步骤S102,终端获取服务器分配的网络盘的信息,根据该网络盘的信息创建虚拟磁盘;
步骤S104,该终端截取该终端对该虚拟磁盘的操作;
步骤S106,该终端在未使用的本地磁盘上分配缓存空间,该终端对虚拟磁盘的该操作重 定向为对该缓存空间的操作。
通过上述步骤,终端获取服务器分配的网络盘的信息,根据该网络盘的信息创建虚拟磁盘,终端应用截取该终端对该虚拟磁盘的操作,将对该虚拟磁盘的读写操作重定向为对本地缓存空间进行读写操作,从而将网络盘对应的虚拟磁盘的操作需要的数据暂时存储在未使用的本地磁盘上,在对网络盘的操作中,可以去缓存空间中对该操作对应的数据进行处理,解决了网络盘的用户操作复杂和体验差的问题,优化了用户的操作方式,减小了网络流量。
在本实施例中,该终端向该服务器发送查询信息,该查询信息用于查询该终端在该服务器上是否有分配该网络盘;在该服务器上有分配该网络盘的情况下,该服务器向该终端发送该网络盘的信息。
在本实施例中,可以根据该操作对应的缓存映射关系表对缓存空间进行处理,其中,该终端保存该缓存映射关系表,该缓存映射关系表包括读缓存映射关系表、写缓存映射关系表等等。
在本实施例中,在该操作为读操作的情况下,查询读缓存关系映射表是否有该读操作对应的数据,在该缓存空间有该读操作对应的数据的情况下,从该缓存空间中读取该数据;
在该缓存空间没有该读操作对应的数据的情况下,从该网络盘读取该数据,并将该数据写入该缓存空间及更新读操作缓存关系映射表。
在本实施例中,在该操作为写操作的情况下,将该写操作对应的数据写入该缓存空间,并更新读缓存映射关系表和写缓存映射关系表。
另外,终端应用同时扫描该写缓存映射关系表,将该写操作对应的数据上传到该网络盘。
其中,在通过该缓存空间向该网络盘上传该数据中断的情况下,重新发起上传请求继续上传该数据。
在上述实施例中,该操作包括以下至少之一:读操作,写操作。
在本实施例中还提供了一种网络盘本地挂载处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图2是根据本发明实施例的一种网络盘本地挂载处理装置的结构框图,位于终端中,如图2所示,该装置包括
创建模块22,设置为获取服务器分配的网络盘的信息,根据该网络盘的信息创建虚拟磁盘;
截取模块24,设置为截取该终端对该虚拟磁盘的操作;
处理模块26,设置为在未使用的本地磁盘上分配缓存空间,该终端对虚拟磁盘的该操作 重定向为对该缓存空间的操作。
通过上述装置,终端获取服务器分配的网络盘的信息,根据该网络盘的信息创建虚拟磁盘,终端应用截取该终端对该虚拟磁盘的操作,将对该虚拟磁盘的读写操作重定向为对本地缓存空间进行读写操作,从而将网络盘对应的虚拟磁盘的操作需要的数据暂时存储在未使用的本地磁盘上,在对网络盘的操作中,可以去缓存空间中对该操作对应的数据进行处理,解决了网络盘的用户操作复杂和体验差的问题,优化了用户的操作方式,减小了网络流量。
在本发明的另外一个实施例中,还提供了一种网络盘本地挂载处理系统,包括:终端和服务器;
该终端获取该服务器分配的网络盘的信息,根据该网络盘的信息创建虚拟磁盘;
该终端截取该终端对该虚拟磁盘的操作;
该终端在未使用的本地磁盘上分配缓存空间,该终端对虚拟磁盘的该操作重定向为对该缓存空间的操作。
下面结合优选实施例和实施方式对本发明进行详细说明。
本发明的优选实施例提出一种新的网络盘使用方式,通过在客户端建立磁盘扇区读写缓存,使用磁盘过滤驱动重定向网络盘数据处理请求,从而减少了网络消息交互,同时,在客户端不需要分配文件进行缓存,磁盘过滤驱动会自动寻找未使用的本地磁盘扇区进行缓存,因此优化了用户操作方式,减少了消息流量,大大扩展了网络盘的使用场景。
本优选实施例是一种针对网络盘使用的创新;用户在计算机通过虚拟磁盘的方式挂载网络盘,对该盘的操作和本地磁盘的操作完全一致,用户感觉不出和本地使用的区别,在操作系统内部截获对该盘的操作请求,转换成对网络盘的操作,同时为了在低带宽网络中流畅使用,本专利发明了一种缓存机制通过读缓存和写缓存来减少对网络实时性的依赖。
为了实现上述方案,本优选实施例提出了一种网络盘本地缓存的方法和系统,包括:
服务端提供接口可以让客户端创建网络盘、读写网络盘、删除网络盘的操作。
客户端在启动时向服务查询是否为该用户分配网络盘,如果已经分配,则返回相应的网络盘信息,比如网络盘的UUID,网络盘大小等等信息,如果该用户为首次登陆,则在服务端为该用户创建对应网络镜像等待用户的后续操作。
客户端获取到网络盘信息后,通过内部驱动创建虚拟磁盘,在操作系统中会就体现出新增了一个硬盘,可以对该盘进行创建分区,删除分区、读写等等和本地磁盘相同的操作。
客户端驱动截获操作系统对该磁盘的操作,比如读写、查询、创建卷等等,并把操作重定向到服务器的磁盘镜像中。
客户端和服务端之间的通讯可以采用传输控制协议(Transmission Control Protocol,简称为TCP)保证数据正确性,也可以采用其他的通讯协议,并且可以通过传输加密等等操作保 证数据的安全。
在客户端连接网盘的时候会在本地磁盘上分配缓存空间,缓存空间并不会影响本地的数据,而且,直接在磁盘上分配,在用户角度完全察觉不到本地磁盘空间的变化。
缓存空间包括读缓存和写缓存,同时为了保证数据的一致性,写操作需要准实时同步到服务端。
客户端同时还保存相应的缓存关系映射表,包括读缓存映射关系表,写缓存映射关系表;
客户端驱动在截获读操作时,首先判断是否在读缓存映射系表中,如果已经存在,直接从本地磁盘缓存中读取返回,如果不存在,则从网络盘中读取,读取后写入本地磁盘,并更新读缓存映射关系表;
客户端驱动在截获写操作时,直接将数据写入本地磁盘,同时更新写缓存映射关系表和读缓存映射关系表;
同时客户端驱动通过单独的线程扫描写缓存映射关系表,根据该表将本地磁盘数据不停的上传到网络盘中。
本地使用的磁盘空间是获取操作系统中未分配使用的磁盘空间,该空间最极端的情况为和网络盘大小一致,通常只会使用到很小的一部分空间。
如果没有本次写缓存数据上传时用户就选择关机或者异常断电之后,本地磁盘仍然会保存相关的数据变化信息,用户在重新开机后仍然可以继续上传上次修改的部分。
同时,在客户端上传下载过程中可以对上传下载的数据进行压缩处理,减少网络流量,在低带宽情况下增加上传下载的速度。
本优选实施例的网络盘的本地缓存方法和系统可以减少服务端和客户端之间的数据传输,同时不需要在客户端开辟专门的缓存空间,减少用户的交互,通过使用本发明的系统和方法,更好的增加了用户的体验,提升了用户的满意度。
图3是根据本发明优选实施的网络盘系统组网示意图,如图3所示,服务端和客户端处于网络的两端,二者之间通过网络相连,只要二者之间能够通过互联网连接,就可以使用本系统,同时,也可以发现网络盘在服务端就是一个镜像文件,而挂载到客户端之后则表现为操作系统中的一个磁盘,使用方法和本地盘完全一致。
图4是根据本发明优选实施的客户端内部结构流程示意图,如图4所示,操作系统将用户的操作通过IRP(I/O request package)消息发送到内核层,本发明实现了一个磁盘过滤驱动,这样当有针对磁盘的操作时,首先会被本发明的磁盘过滤驱动处理,本驱动会判断是否针对网络盘进行的操作,如果不是,则透传给下层驱动,如果是读操作且本地没有缓存数据则会通过网络驱动来与服务端建立请求,获取对应扇区的数据信息。
图5是根据本发明优选实施的客户端各模块之间的关系示意图,如图5所示,对于读操 作,磁盘过滤系统会处理读缓存映射关系表和本地缓存信息,另外,对于不在本地缓存的数据,则会通过网络驱动向服务端查询,返回后会更新到本地缓存中,并更新读缓存映射关系表;对于写操作,则会在更新本地缓存的同时同步更新读缓存映射关系表和写缓存映射关系表。对于网络上传操作,则根据写缓存映射关系表同步更新到服务端去。
图6是根据本发明优选实施的磁盘驱动启动初始化流程示意图,包括:
步骤601,机器开机,在操作系统启动的同时加载本专利的磁盘过滤驱动;
步骤602,磁盘过滤驱动启动后,首先会像服务端查询本机器是否有网络盘需要挂载,如果有,则根据返回的磁盘信息在本机创建虚拟磁盘,同时将虚拟磁盘映射到对应的网络盘,如果没有则进行下一步处理;
步骤603,磁盘过滤驱动需要检查本机的缓存空间中是否存在上次的待传数据,这个可以通过是否存在写缓存关系映射表来完成,如果存在,则需要进行数据上传操作流程;
步骤604,检查本地磁盘空间,预留部分本地缓存使用空间,同时如果本地挂载网络盘和上次机器启动挂载网络盘不一致,必须保证之前的写缓存数据全部上传成功后才能进行覆盖等操作;
图7是根据本发明优选实施的读请求处理流程示意图,包括:
步骤701:在应用层下发磁盘读请求到内核的时候,首先会被本发明的磁盘过滤驱动截获,这时首先判断是否是针对本驱动创建的虚拟磁盘,也就是网络盘来进行读操作;
步骤702:如果不是读网络盘,则透传给下层驱动;
步骤703:如果为网络盘,首先从读缓存关系映射表中判断本地是否已有数据,如果存在则从本地读取返回;
步骤704:如果读取的扇区数据本地没有保存,则通过网络驱动发送请求消息到服务器端,服务端返回数据后保存至本地缓存并更新读缓存映射关系表。
图8是根据本发明优选实施的写请求处理流程示意图,包括:
步骤801:在应用层下发磁盘写请求到内核的时候,首先会被本发明的磁盘过滤驱动截获,这时首先判断是否是针对本驱动创建的虚拟磁盘,也就是网络盘来进行写操作;
步骤802:如果不是写网络盘,则透传给下层驱动;
步骤803:如果为网络盘,首先从写入本地缓存,然后修改写缓存关系映射表,触发上传缓存事件;
图9是根据本发明优选实施的上传写缓存处理流程示意图,包括:
步骤901:在系统将磁盘过滤驱动加载后,磁盘过滤驱动则会创建线程扫描本地缓存中写缓存映射关系表;
步骤902:如果写缓存映射关系表中没有数据,则等待事件触发;
步骤903:如果写缓存映射关系表中存在数据,则从写缓存映射关系表的起始开始遍历,通过映射关系从本地缓存中获取数据,然后通过网络驱动的接口发送给服务端;
步骤904:如果服务端返回成功则继续扫描,开始上传下一块数据,返回失败则重新上传;
本发明在软件上是使用的磁盘过滤驱动和TDI驱动来实现的,也可以通过WINDOWS内部的其他层次驱动比如NDIS驱动或者其他方案来实现;
需要说明的是,这里客户端和服务端之间的接口实现的技术方案比较多,比如通过TCP协议、UDP协议、HTTP协议等等,另外,为了保证数据的安全同时可以针对消息进行加密操作,为了进一步节省网络数据流量也可以采用压缩算法进行压缩等等,这些都属于本专利要求的包含范围。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
基于本发明实施例提供的上述技术方案,终端获取服务器分配的网络盘的信息,根据该网络盘的信息创建虚拟磁盘,该终端截取该终端对该虚拟磁盘的操作,该终端在未使用的本地磁盘上分配缓存空间,该终端对虚拟磁盘的该操作重定向为对该缓存空间的操作,解决了网络盘的用户操作复杂和体验差的问题,优化了用户的操作方式,减小了网络流量。

Claims (10)

  1. 一种网络盘本地挂载处理方法,包括:
    终端获取服务器分配的网络盘的信息,根据所述网络盘的信息创建虚拟磁盘;
    所述终端截取所述终端对所述虚拟磁盘的操作;
    所述终端在未使用的本地磁盘上分配缓存空间,所述终端对虚拟磁盘的所述操作重定向为对所述缓存空间的操作。
  2. 根据权利要求1所述的方法,其中,所述终端获取服务器分配的网络盘的信息之前包括:
    所述终端向所述服务器发送查询信息,所述查询信息用于查询所述终端在所述服务器上是否有分配所述网络盘;
    在所述服务器上有分配所述网络盘的情况下,所述服务器向所述终端发送所述网络盘的信息。
  3. 根据权利要求1所述的方法,其中,根据所述操作对缓存空间进行处理包括:
    根据所述操作对应的缓存映射关系表对缓存空间进行处理,其中,所述终端保存所述缓存映射关系表,所述缓存映射关系表包括:读缓存映射关系表和写缓存映射关系表。
  4. 根据权利要求3所述的方法,其中,在所述操作为读操作的情况下,所述根据所述操作对缓存空间进行处理包括:
    查询所述读缓存关系映射表是否有所述读操作对应的数据,在所述缓存空间有所述读操作对应的数据的情况下,从所述缓存空间中读取所述数据。
  5. 根据权利要求4所述的方法,其中,所述方法包括:
    在所述缓存空间没有所述读操作对应的数据的情况下,从所述网络盘读取所述数据,将所述数据写入所述缓存空间及更新所述读缓存关系映射表。
  6. 根据权利要求3所述的方法,其中,在所述操作为写操作的情况下,所述根据所述操作对缓存空间进行处理包括:
    将所述写操作对应的数据写入所述缓存空间,并更新所述读缓存映射关系表和所述写缓存映射关系表。
  7. 根据权利要求6所述的方法,其中,所述将所述写操作对应的数据写入所述缓存空间之后包括:
    所述终端扫描所述写缓存映射关系表,将所述写操作对应的数据上传到所述网络盘。
  8. 根据权利要求7所述的方法,其中,所述方法包括:
    在通过所述缓存空间向所述网络盘上传所述数据中断的情况下,重新发起上传请求 继续上传所述数据。
  9. 一种网络盘本地挂载处理装置,位于终端中,包括:
    创建模块,设置为获取服务器分配的网络盘的信息,根据所述网络盘的信息创建虚拟磁盘;
    截取模块,设置为截取所述终端对所述虚拟磁盘的操作;
    处理模块,设置为在未使用的本地磁盘上分配缓存空间,所述终端对虚拟磁盘的所述操作重定向为对所述缓存空间的操作。
  10. 一种网络盘本地挂载处理系统,包括:终端和服务器;
    所述终端获取所述服务器分配的网络盘的信息,根据所述网络盘的信息创建虚拟磁盘;
    所述终端截取所述终端对所述虚拟磁盘的操作;
    所述终端在未使用的本地磁盘上分配缓存空间,所述终端对虚拟磁盘的所述操作重定向为对所述缓存空间的操作。
PCT/CN2016/078169 2015-06-04 2016-03-31 网络盘本地挂载处理方法、装置及系统 WO2016192456A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510304862.8 2015-06-04
CN201510304862.8A CN106302601A (zh) 2015-06-04 2015-06-04 网络盘本地挂载处理方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2016192456A1 true WO2016192456A1 (zh) 2016-12-08

Family

ID=57440113

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078169 WO2016192456A1 (zh) 2015-06-04 2016-03-31 网络盘本地挂载处理方法、装置及系统

Country Status (2)

Country Link
CN (1) CN106302601A (zh)
WO (1) WO2016192456A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111722805A (zh) * 2020-06-19 2020-09-29 艾索信息股份有限公司 一种高效获取磁盘读写io数据信息的系统及其方法
CN113190181A (zh) * 2021-05-28 2021-07-30 北京鼎普科技股份有限公司 一种虚拟磁盘挂载方法及系统
CN114237082A (zh) * 2021-11-03 2022-03-25 深圳市优必选科技股份有限公司 设备管理系统、机器人及计算机可读存储介质
CN115002105A (zh) * 2022-04-20 2022-09-02 上海赛连信息科技有限公司 一种基于磁盘速率和网络速率的均衡分配方法和装置

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850825B (zh) * 2017-02-23 2020-08-07 中南大学 一种移动透明计算环境下客户端块级缓存优化方法
CN110196683B (zh) * 2018-09-05 2021-09-07 腾讯科技(深圳)有限公司 一种操作控制的方法、装置、终端设备和介质
CN109379405A (zh) * 2018-09-14 2019-02-22 深圳市京华科讯科技有限公司 虚拟磁盘构建方法、虚拟磁盘系统及网盘
CN109871252B (zh) * 2019-01-28 2022-04-01 国云科技股份有限公司 一种云教室通用盘实现方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060112140A1 (en) * 2004-11-19 2006-05-25 Mcbride Gregory E Autonomic data caching and copying on a storage area network aware file system using copy services
CN101398823A (zh) * 2007-09-26 2009-04-01 新奥特硅谷视频技术有限责任公司 利用虚拟文件系统技术实现远程存储的方法及系统
CN101398744A (zh) * 2007-09-26 2009-04-01 新奥特硅谷视频技术有限责任公司 利用虚拟文件系统技术实现网络数据处理的方法及系统
CN102014158A (zh) * 2010-11-29 2011-04-13 北京兴宇中科科技开发股份有限公司 一种云存储服务客户端高效细粒度数据缓存系统与方法
CN102035881A (zh) * 2010-11-19 2011-04-27 清华大学 一种云端存储系统的数据缓存方法
CN102957717A (zh) * 2011-08-23 2013-03-06 崔春明 一种云备份服务的本地缓存设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060112140A1 (en) * 2004-11-19 2006-05-25 Mcbride Gregory E Autonomic data caching and copying on a storage area network aware file system using copy services
CN101398823A (zh) * 2007-09-26 2009-04-01 新奥特硅谷视频技术有限责任公司 利用虚拟文件系统技术实现远程存储的方法及系统
CN101398744A (zh) * 2007-09-26 2009-04-01 新奥特硅谷视频技术有限责任公司 利用虚拟文件系统技术实现网络数据处理的方法及系统
CN102035881A (zh) * 2010-11-19 2011-04-27 清华大学 一种云端存储系统的数据缓存方法
CN102014158A (zh) * 2010-11-29 2011-04-13 北京兴宇中科科技开发股份有限公司 一种云存储服务客户端高效细粒度数据缓存系统与方法
CN102957717A (zh) * 2011-08-23 2013-03-06 崔春明 一种云备份服务的本地缓存设备

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111722805A (zh) * 2020-06-19 2020-09-29 艾索信息股份有限公司 一种高效获取磁盘读写io数据信息的系统及其方法
CN111722805B (zh) * 2020-06-19 2023-04-14 艾索信息股份有限公司 一种高效获取磁盘读写io数据信息的系统及其方法
CN113190181A (zh) * 2021-05-28 2021-07-30 北京鼎普科技股份有限公司 一种虚拟磁盘挂载方法及系统
CN114237082A (zh) * 2021-11-03 2022-03-25 深圳市优必选科技股份有限公司 设备管理系统、机器人及计算机可读存储介质
CN115002105A (zh) * 2022-04-20 2022-09-02 上海赛连信息科技有限公司 一种基于磁盘速率和网络速率的均衡分配方法和装置

Also Published As

Publication number Publication date
CN106302601A (zh) 2017-01-04

Similar Documents

Publication Publication Date Title
WO2016192456A1 (zh) 网络盘本地挂载处理方法、装置及系统
US11593319B2 (en) Virtualized data storage system architecture
US20190065061A1 (en) Apparatus and method for providing storage for providing cloud services
US9986033B2 (en) Facilitating access to remote cloud services
US8504670B2 (en) Virtualized data storage applications and optimizations
US20210029095A1 (en) In-flight data encryption/decryption for a distributed storage platform
US10154112B1 (en) Cloud-to-cloud data migration via cache
US9355103B2 (en) System and method for bandwidth optimization in a network storage environment
US20200356277A1 (en) De-duplication of client-side data cache for virtual disks
US7587471B2 (en) System and method for virtualizing network storages into a single file system view
US20060230148A1 (en) TCP forwarding of client requests of high-level file and storage access protocols in a network file server system
US10783121B2 (en) Techniques for optimizing data flows in hybrid cloud storage systems
US20170048318A1 (en) System and method for managing heterogeneous data for cloud computing applications
JP2010009573A (ja) Nas及びcas統合体でデータをバックアップする為の方法と装置
WO2016127656A1 (zh) 一种网盘客户端的数据缓存方法及装置
JP2008518324A (ja) コンピュータネットワークにおいて共有イメージに対する読み取り要請をキャッシュする方法およびシステム
AU2019367853C1 (en) Providing files of variable sizes based on device and network conditions
JP4175379B2 (ja) ファイル共有方法およびファイル共有システム
WO2016101662A1 (zh) 一种数据处理方法及相关服务器
WO2024022409A1 (zh) 访问处理方法及计算机设备
US20120131199A1 (en) Systems and Methods for Layered Resource Management
US20080270480A1 (en) Method and system of deleting files from a remote server
US20190121899A1 (en) Apparatus and method for managing integrated storage
KR20220053207A (ko) 멀티-다운로드 기반의 고성능 인터넷 파일 시스템
US20140359062A1 (en) Data transferring apparatus, data transferring system and non-transitory computer readable medium

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: 16802379

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: 16802379

Country of ref document: EP

Kind code of ref document: A1