WO2017092402A1 - Virtual network hard disk mounting method, lan server, user terminal and system - Google Patents

Virtual network hard disk mounting method, lan server, user terminal and system Download PDF

Info

Publication number
WO2017092402A1
WO2017092402A1 PCT/CN2016/095276 CN2016095276W WO2017092402A1 WO 2017092402 A1 WO2017092402 A1 WO 2017092402A1 CN 2016095276 W CN2016095276 W CN 2016095276W WO 2017092402 A1 WO2017092402 A1 WO 2017092402A1
Authority
WO
WIPO (PCT)
Prior art keywords
user terminal
local area
hard disk
area network
network server
Prior art date
Application number
PCT/CN2016/095276
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 WO2017092402A1 publication Critical patent/WO2017092402A1/en

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]
    • 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

  • the present invention relates to the field of data storage technologies, and in particular, to a virtual network hard disk mounting method, a local area network server, a user terminal, and a system.
  • the technical problem to be solved by the embodiments of the present invention is to provide a virtual network hard disk mounting method, a local area network server, a user terminal, and a system, to solve data inconsistency, user access conflict, and the user cannot control the file system format, partition information, and the like. problem.
  • an embodiment of the present invention provides a virtual network hard disk mounting method, which is applied to a local area network server, and the method includes:
  • the first virtual network hard disk is generated for the first user terminal mapping, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  • the step of determining whether to allow the first user terminal to be mounted according to the mount request includes:
  • the step of determining whether to allow the first user terminal to be mounted according to the mounting request further includes:
  • the first uninstall request is sent to the other user terminals, and when the other user terminals successfully uninstall according to the uninstall request, it is determined that the first user terminal is allowed to be mounted.
  • the method further includes:
  • the method further includes: after the first user terminal is allowed to be mapped, after the first user network is mapped to generate the first virtual network hard disk, the method further includes:
  • the data of the local area network server is synchronously updated to the first user terminal.
  • the step of synchronously updating the data of the local area network server to the user terminal comprises:
  • the embodiment of the present invention further provides a virtual network hard disk mounting method, which is applied to a user terminal, and the method includes:
  • a virtual network hard disk is generated locally according to the response, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  • An embodiment of the present invention further provides a local area network server, where the local area network server includes:
  • the first receiving module is configured to receive a mount request sent by the first user terminal in the local area network
  • the first determining module is configured to determine, according to the mounting request, whether to allow the first user terminal to be mounted;
  • the mounting module is configured to generate a first virtual network hard disk for the first user terminal mapping when the first user terminal is allowed to be mounted, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  • the first determining module includes:
  • the first determining unit is configured to query whether other user terminals other than the first user terminal are currently being mounted, and determine that the first user terminal is allowed to be mounted when no other user terminals are currently mounted.
  • the first determining module further includes:
  • a second determining unit configured to send a first uninstall request to the other user terminal when the other user terminal is currently mounted, and determine to allow the first when the other user terminal successfully uninstalls according to the uninstall request A user terminal is mounted.
  • the local area network server further includes:
  • a second receiving module configured to receive the first use after the first user terminal successfully mounts and completes a read/write operation a second uninstall request sent by the user terminal;
  • the uninstalling module is configured to enable the first user terminal to upload current modification data to the local area network server according to the second uninstall request, and determine to allow the first user terminal to uninstall.
  • the LAN server further includes:
  • a second determining module configured to determine whether data on the first virtual network hard disk is cached on the first user terminal
  • And updating the module configured to update the data of the local area network server to the first user terminal synchronously when the determination result is yes.
  • the update module comprises:
  • an update unit configured to determine whether the main boot record MBR data of the first virtual network hard disk is empty, and update the data of the local area network server to the user terminal when the MBR data is not empty.
  • An embodiment of the present invention further provides a user terminal, where the user terminal includes:
  • the sending module is configured to send a mount request to the local area network server, so that the local area network server determines, according to the mount request, whether the user terminal is mounted;
  • a receiving module configured to receive a mount request response that the local area network server allows to be mounted
  • the mounting module is configured to generate a virtual network hard disk according to the response in a local mapping, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  • the embodiment of the present invention further provides a mounting system for a virtual network hard disk, comprising the local area network server according to any of the above, and the user terminal as described above.
  • a computer storage medium is further provided, and the computer storage medium may store an execution instruction for executing the implementation of the virtual network hard disk mounting method in the foregoing embodiment.
  • the above technical solution of the present invention receives a mount request sent by a user terminal in a local area network; the local area network server determines whether the user terminal is allowed to be mounted according to the mount request, and generates a virtual network on the local mapping of the user terminal when the user terminal is allowed to be mounted.
  • a hard disk, and a virtual network disk can only be mounted on one user terminal at the same time, ensuring data consistency and preventing user access conflicts; and the virtual network disk is locally mapped and generated on the user terminal, that is, a complete hard disk is provided locally. So that users can directly manipulate the data.
  • FIG. 1 is a flow chart showing a virtual network hard disk mounting method applied to a local area network server according to an embodiment of the present invention
  • FIG. 2 is a flow chart showing a method for applying a virtual network hard disk mounting method to a user terminal according to an embodiment of the present invention
  • FIG. 3 is a block diagram showing the structure of a local area network server according to an embodiment of the present invention.
  • FIG. 4 is a block diagram showing the structure of a user terminal according to an embodiment of the present invention.
  • FIG. 5 is a block diagram showing a mounting system of a virtual network hard disk according to an embodiment of the present invention.
  • the embodiment of the present invention provides a virtual network hard disk mounting method, a local area network server, a user terminal, and a system, and receives a mount request sent by a user terminal in a local area network; the local area network server determines whether to allow according to the mount request.
  • the user terminal is mounted.
  • a virtual network hard disk is generated on the local mapping of the user terminal, and a virtual network hard disk can be mounted on only one user terminal at the same time, thereby ensuring data consistency and preventing user access. Collision; and the virtual network hard disk is locally mapped on the user terminal, that is, a complete hard disk is provided locally, so that the user can directly operate on the data.
  • FIG. 1 is a flow chart of a virtual network hard disk mounting method applied to a local area network server according to an embodiment of the present invention.
  • the embodiment of the present invention provides a virtual network hard disk mounting method, which is applied to a local area network server and a user terminal through a local area network server.
  • the mount request is received and judged whether the user terminal can be mounted, and the virtual network hard disk is locally mapped and generated on the user terminal after the mount is allowed.
  • the method includes:
  • Step 101 Receive a mount request sent by the first user terminal in the local area network.
  • the local area network server and the user terminal may adopt a private protocol including a control channel and a data channel, and the control channel is connected by a binary message transmission control protocol (Tcp), and the data channel is connected by a binary coded http message.
  • the LAN server receives the mount request sent by the user terminal through the control channel.
  • the first user terminal here represents the user terminal currently requested to be mounted.
  • Step 102 Determine, according to the mount request, whether the first user terminal is allowed to be mounted.
  • Step 103 When the first user terminal is allowed to be mounted, generate a first virtual network hard disk for the first user terminal mapping, wherein one virtual network hard disk can only be mounted on one user terminal at the same time.
  • the local area network server allows the user terminal to mount
  • the corresponding data file on the local area network server is mapped locally on the user terminal to generate a virtual network hard disk, so that the virtual network hard disk is formed by the hard disk locally in the user terminal, so that the user can be at the user terminal.
  • Directly perform local operations on the data in the virtual network hard disk that is, each time the user reads and writes data, it is completed locally.
  • the actual mount action is implemented by the bus driver.
  • the LAN server transmits data to the virtual network hard disk generated by mapping on the user terminal through the data channel. Include the actual data storage bit in the LAN server Set, the size of the allocated space, the registered terminal information, the current virtual network disk status and other information.
  • a plurality of virtual network hard disk files are stored on the local area network server, and each virtual network hard disk file can be attributed to multiple users, and each user can log in online at multiple different user terminals, but only allowed at the same time.
  • a user successfully mounts the corresponding virtual network hard disk file on a user terminal, and maps to generate a virtual network hard disk. That is, a virtual network hard disk can only be mounted on one user terminal at the same time, thereby performing data on the virtual network hard disk. Read and write operations. In this way, to ensure that user access does not conflict, and also ensure that the data after the user changes and updates the data of the virtual network hard disk is consistent.
  • step 102 the step of determining whether to allow the first user terminal to be mounted according to the mount request includes:
  • the local area network server determines whether the user terminal is allowed to perform the mount, that is, whether the other user terminal is currently mounted, the local area network server determines that the user terminal is allowed to be mounted after determining that no other user terminal is currently mounted.
  • step 102 the step of determining whether to allow the first user terminal to be mounted according to the mounting request may further include:
  • the first uninstall request is sent to other user terminals, and when the other user terminals successfully uninstall according to the uninstall request, it is determined that the first user terminal is allowed to be mounted.
  • the local area network server sends the MAC (Medium/Media Access Control) address of the already installed user terminal to all the currently online user terminals including the first user terminal, and simultaneously An unloading request is sent to the user terminal that has been mounted, indicating that the currently online user terminal has a user terminal being mounted, and when no user is mounted, the MAC address is empty.
  • the already mounted user terminal judges based on the working state of the current virtual network hard disk, wherein the working state of the virtual network hard disk includes idle, reading, and writing.
  • the local area network server When the virtual network hard disk of the already mounted user terminal is in an idle state, the local area network server receives the accepting offload response sent by the local area network server, and when the already mounted user terminal successfully uninstalls according to the uninstall request, the local area network server determines to allow the first The user terminal is mounted. When the virtual network hard disk of the already mounted user terminal is in the non-idle state, the local area network server receives the response rejecting the uninstallation, and the local area network server sends a response to the first user terminal that the mount request failed, so that the first user terminal gives up. Mount.
  • the method may further include:
  • the user issues a second uninstall request through the user terminal, and the local area network server receives the second uninstall request of the user terminal through the control channel.
  • the second offload request is an offload request issued by the user terminal to distinguish the first offload request issued by the local area network server in the foregoing embodiment.
  • the local area network server synchronizes the current modified data to the local area network server after receiving the second unloading request sent by the user terminal.
  • the method may further include:
  • the virtual network hard disk mounted on the user terminal includes several types, such as a network disk, a half-cache network disk, and a full-cache network disk.
  • a network disk a half-cache network disk or a full-cache network disk type
  • the user terminal There is data cache in the memory and local hard disk; when the virtual network disk belongs to the full cache network disk type, it can be used offline on the user terminal; and when the virtual network disk belongs to the network disk type, it is read and written every time on the user terminal. Need to consume network traffic.
  • the data of the local area network server is synchronously updated to the first user terminal.
  • the data of the local area network server needs to be synchronously updated to the user terminal when used on the user terminal to ensure data consistency.
  • the step of synchronously updating data of the local area network server to the user terminal includes:
  • MBR master boot record
  • the MBR data of the virtual network hard disk is judged.
  • the MBR data data is empty, that is, the data of the local area network server is not modified and updated, the local area network server does not need to be on the user terminal.
  • the data is updated, and when the MBR data is not empty, the data of the LAN server is updated to the user terminal to ensure the consistency of the data.
  • the virtual network hard disk mounting method of the embodiment of the present invention as shown in FIG. 2 is applied to the flow chart of the user terminal, and the embodiment of the present invention further provides a method corresponding to the virtual network hard disk mounting method applied to the local area network server.
  • a virtual network hard disk mounting method is applied to a user terminal, and the method includes:
  • Step 201 Send a mount request to the local area network server, so that the local area network server determines whether the user terminal is mounted according to the mount request.
  • the local area network server and the user terminal may adopt a private protocol including a control channel and a data channel, and the control channel is connected by a binary message transmission control protocol Tcp, and the data channel is connected by a binary coded http message, and the user terminal passes the control channel.
  • Step 202 Receive a mount request response that the local area network server allows to mount.
  • the user terminal receives the mount request response sent by the local area network server through the control channel.
  • Step 203 Generate a virtual network hard disk according to the local mapping in response, wherein one virtual network hard disk can only be mounted on one user terminal at the same time.
  • the user terminal receives a MAC address sent by the local area network server, and determines whether the MAC address is the MAC address of the local end of the user terminal. When the determination is yes, the user terminal performs mounting, and generates a virtual network hard disk locally, so that the user The data in the virtual network hard disk can be directly operated locally on the user terminal, that is, each time the user reads and writes data, it is completed locally. It should be noted that a plurality of virtual network hard disk files are stored on the local area network server, and each virtual network hard disk file can be attributed to multiple users, and each user can log in online at multiple different user terminals, but only allowed at the same time.
  • a user successfully mounts the corresponding virtual network hard disk file on a user terminal, and maps to generate a virtual network hard disk. That is, a virtual network hard disk can only be mounted on one user terminal at the same time, thereby performing data on the virtual network hard disk. Read and write operations. In this way, to ensure that user access does not conflict, and also ensure that the data after the user changes and updates the data of the virtual network hard disk is consistent.
  • FIG. 3 is a structural block diagram of a local area network server according to an embodiment of the present invention.
  • the embodiment of the present invention provides a corresponding local area network server, where the local area network server includes:
  • the first receiving module 31 is configured to receive a mount request sent by the first user terminal in the local area network
  • the first determining module 32 is configured to determine, according to the mounting request, whether to allow the first user terminal to be mounted, wherein a virtual network hard disk can only be mounted on one user terminal at a time;
  • the mounting module 33 is configured to generate a first virtual network hard disk for the first user terminal mapping when the first user terminal is allowed to be mounted.
  • the first determining module 32 includes:
  • the first determining unit is configured to query whether other user terminals other than the first user terminal are currently being mounted, and determine that the first user terminal is allowed to be mounted when the other user terminals are currently mounted.
  • the first determining module 32 may further include:
  • the second determining unit is configured to send the first uninstall request to the other user terminals when the other user terminals are currently mounted, and determine that the first user terminal is allowed to be mounted when the other user terminals successfully uninstall according to the uninstall request.
  • the local area network server may further include:
  • the second receiving module is configured to receive the second uninstall request sent by the first user terminal after the first user terminal successfully mounts and completes the read/write operation;
  • the uninstalling module is configured to enable the first user terminal to upload the current modified data to the local area network server according to the second uninstall request, and determine to allow the first user terminal to uninstall.
  • the local area network server may further include:
  • the second determining module is configured to determine whether the data on the first virtual network hard disk has a cache on the first user terminal;
  • the update module is configured to synchronously update the data of the local area network server to the first user terminal when the determination result is yes.
  • the updating module may include:
  • the updating unit is configured to determine whether the main boot record MBR data of the first virtual network hard disk is empty, and when the MBR data is not empty, update the data of the local area network server to the user terminal.
  • the LAN server can implement the foregoing processes of the LAN server in the embodiment of the method for mounting the virtual network hard disk applied to the local area network server. To avoid repetition, details are not described herein.
  • FIG. 4 is a structural block diagram of a user terminal according to an embodiment of the present invention.
  • the embodiment of the present invention provides a user terminal, where the user terminal includes:
  • the sending module 41 is configured to send a mount request to the local area network server, so that the local area network server determines, according to the mount request, whether the user terminal is mounted;
  • the receiving module 42 is configured to receive a mount request response that the local area network server allows to be mounted;
  • the mounting module 43 is configured to generate a virtual network hard disk according to the local mapping in response, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  • the user terminal can implement the various processes implemented by the user terminal in the foregoing method for mounting the virtual network hard disk of the user terminal. To avoid repetition, details are not described herein again.
  • the user terminal used by the user includes a proxy message processing program, and an associated virtual network hard disk drive is installed.
  • FIG. 5 is a schematic block diagram of a mounting system of a virtual network hard disk according to an embodiment of the present invention.
  • the embodiment of the present invention further provides a mounting system for a virtual network hard disk, comprising the local area network server according to any of the above, and the user terminal as described above.
  • the foregoing embodiment of the present invention receives a mount request sent by a user terminal in a local area network; the local area network server determines whether the user terminal is allowed to be mounted according to the mount request, and generates a virtual network in the local mapping of the user terminal when the user terminal is allowed to be mounted.
  • the hard disk, and the LAN server can only allow one user terminal to be mounted at the same time, ensuring the consistency of data and preventing user access conflicts; and the virtual network hard disk is locally mapped and generated on the user terminal, that is, a complete hard disk is provided locally, so that the user Data can be manipulated directly.
  • the foregoing technical solution provided by the embodiment of the present invention can be applied to receive a mount request sent by a user terminal in a local area network during a mounting process of the virtual network hard disk; and the local area network server determines whether the user terminal is allowed to be mounted according to the mount request.
  • a virtual network hard disk is generated on the local mapping of the user terminal, and a virtual network hard disk can be mounted on only one user terminal at the same time, ensuring data consistency and preventing user access conflicts; and the virtual network
  • the hard disk is locally mapped on the user terminal, that is, a complete hard disk is provided locally, so that the user can directly operate on the data.

Abstract

The invention provides a virtual network hard disk mounting method, a LAN server, a user terminal and a system. The method applies to a LAN server and comprises: receiving a mounting request sent from a first user terminal in a LAN; according to the mounting request, determining whether the first user terminal is allowed to perform mounting; when the first user terminal is allowed to perform mounting, mapping a first virtual network hard disk for the first user terminal, wherein a virtual network hard disk can be mounted at only one user terminal at the same time. As such, consistency of data is ensured, and conflicts of access are prevented; further, the virtual network hard disk is mapped locally for the user terminal; that is, a complete hard disk is provided locally, allowing direct operation on data by the user.

Description

虚拟网络硬盘挂载方法、局域网服务器、用户终端和系统Virtual network hard disk mounting method, LAN server, user terminal, and system 技术领域Technical field
本发明涉及数据存储技术领域,特别是指一种虚拟网络硬盘挂载方法、局域网服务器、用户终端和系统。The present invention relates to the field of data storage technologies, and in particular, to a virtual network hard disk mounting method, a local area network server, a user terminal, and a system.
背景技术Background technique
信息化时代的发展,使得人们对计算资源的需求不断增长,伴随而来的是虚拟化技术的同步发展,人们对于虚拟硬盘的应用需求的增长,其中尤以企业对虚拟硬盘的需求为最。在对虚拟硬盘的应用中,尤其企业中,保证数据的一致与同步、以及防止用户访问冲突是十分重要的,并且现有的虚拟硬盘是基于虚拟文件系统,开放给用户的都是某种文件夹视图,用户无法控制文件系统的格式,分区信息等。The development of the information age has made people's demand for computing resources grow. Accompanied by the simultaneous development of virtualization technology, people's demand for virtual hard disk applications has increased. Among them, enterprises have the most demand for virtual hard disks. In the application of virtual hard disk, especially in the enterprise, it is very important to ensure data consistency and synchronization, and prevent user access conflicts, and the existing virtual hard disk is based on the virtual file system, and all files are open to the user. Folder view, the user cannot control the format of the file system, partition information, and so on.
发明内容Summary of the invention
本发明实施例要解决的技术问题是提供一种虚拟网络硬盘挂载方法、局域网服务器、用户终端和系统,以解决数据产生不一致、用户访问冲突,用户无法控制文件系统的格式、分区信息等的问题。The technical problem to be solved by the embodiments of the present invention is to provide a virtual network hard disk mounting method, a local area network server, a user terminal, and a system, to solve data inconsistency, user access conflict, and the user cannot control the file system format, partition information, and the like. problem.
为解决上述技术问题,本发明的实施例提供一种虚拟网络硬盘挂载方法,应用于局域网服务器,所述方法包括:To solve the above technical problem, an embodiment of the present invention provides a virtual network hard disk mounting method, which is applied to a local area network server, and the method includes:
接收局域网内第一用户终端发送的挂载请求;Receiving a mount request sent by the first user terminal in the local area network;
根据所述挂载请求,判断是否允许所述第一用户终端挂载;Determining, according to the mount request, whether the first user terminal is allowed to be mounted;
在允许所述第一用户终端挂载时,为所述第一用户终端映射生成第一虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。When the first user terminal is allowed to be mounted, the first virtual network hard disk is generated for the first user terminal mapping, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
其中,所述根据所述挂载请求,判断是否允许所述第一用户终端挂载的步骤包括:The step of determining whether to allow the first user terminal to be mounted according to the mount request includes:
查询当前是否有第一用户终端以外的其他用户终端正在挂载,并在当前没有其他用户终端挂载时,确定允许所述第一用户终端挂载。It is queried whether other user terminals other than the first user terminal are currently being mounted, and when no other user terminals are currently mounted, it is determined that the first user terminal is allowed to be mounted.
其中,所述根据所述挂载请求,判断是否允许所述第一用户终端挂载的步骤还包括:The step of determining whether to allow the first user terminal to be mounted according to the mounting request further includes:
在当前有其他用户终端挂载时,向所述其他用户终端发送第一卸载请求,并在所述其他用户终端根据所述卸载请求成功卸载时,确定允许所述第一用户终端挂载。When the other user terminals are currently mounted, the first uninstall request is sent to the other user terminals, and when the other user terminals successfully uninstall according to the uninstall request, it is determined that the first user terminal is allowed to be mounted.
进一步的,当所述第一用户终端成功挂载并完成读写操作后,所述方法还包括:Further, after the first user terminal successfully mounts and completes the read and write operations, the method further includes:
接收所述第一用户终端发送的第二卸载请求; Receiving a second uninstall request sent by the first user terminal;
根据所述第二卸载请求,使所述第一用户终端上传当前修改数据至所述局域网服务器,确定允许所述第一用户终端卸载。And according to the second uninstall request, causing the first user terminal to upload current modification data to the local area network server, and determining to allow the first user terminal to uninstall.
其中,所述允许所述第一用户终端挂载时,为所述第一用户终端映射生成第一虚拟网络硬盘之后,所述方法还包括:The method further includes: after the first user terminal is allowed to be mapped, after the first user network is mapped to generate the first virtual network hard disk, the method further includes:
判断所述第一虚拟网络硬盘上的数据是否在已经所述第一用户终端上存在缓存;Determining whether data on the first virtual network hard disk exists on the first user terminal;
当判断结果为是,将所述局域网服务器的数据同步更新至所述第一用户终端。When the determination result is yes, the data of the local area network server is synchronously updated to the first user terminal.
优选的,所述将所述局域网服务器的数据同步更新至所述用户终端的步骤,包括:Preferably, the step of synchronously updating the data of the local area network server to the user terminal comprises:
判断所述第一虚拟网络硬盘的主引导记录MBR数据是否为空,当所述MBR数据不为空时,更新所述局域网服务器的数据至所述用户终端。Determining whether the main boot record MBR data of the first virtual network hard disk is empty, and updating the data of the local area network server to the user terminal when the MBR data is not empty.
本发明的实施例还提供一种虚拟网络硬盘挂载方法,应用于用户终端,所述方法包括:The embodiment of the present invention further provides a virtual network hard disk mounting method, which is applied to a user terminal, and the method includes:
向局域网服务器发送挂载请求,使所述局域网服务器根据所述挂载请求判断是否所述用户终端挂载;Sending a mount request to the local area network server, so that the local area network server determines, according to the mount request, whether the user terminal is mounted;
接收所述局域网服务器允许挂载的挂载请求应答;Receiving a mount request response that the local area network server allows to be mounted;
根据所述应答在本地映射生成虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。A virtual network hard disk is generated locally according to the response, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
本发明的实施例还提供一种局域网服务器,所述局域网服务器包括:An embodiment of the present invention further provides a local area network server, where the local area network server includes:
第一接收模块,设置为接收局域网内第一用户终端发送的挂载请求;The first receiving module is configured to receive a mount request sent by the first user terminal in the local area network;
第一判断模块,设置为根据所述挂载请求,判断是否允许所述第一用户终端挂载;The first determining module is configured to determine, according to the mounting request, whether to allow the first user terminal to be mounted;
挂载模块,设置为在允许所述第一用户终端挂载时,为所述第一用户终端映射生成第一虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。The mounting module is configured to generate a first virtual network hard disk for the first user terminal mapping when the first user terminal is allowed to be mounted, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
其中,所述第一判断模块包括:The first determining module includes:
第一确定单元,设置为查询当前是否有第一用户终端以外的其他用户终端正在挂载,并在当前没有其他用户终端挂载时,确定允许所述第一用户终端挂载。The first determining unit is configured to query whether other user terminals other than the first user terminal are currently being mounted, and determine that the first user terminal is allowed to be mounted when no other user terminals are currently mounted.
其中,所述第一判断模块还包括:The first determining module further includes:
第二确定单元,设置为在当前有其他用户终端挂载时,向所述其他用户终端发送第一卸载请求,并在所述其他用户终端根据所述卸载请求成功卸载时,确定允许所述第一用户终端挂载。a second determining unit, configured to send a first uninstall request to the other user terminal when the other user terminal is currently mounted, and determine to allow the first when the other user terminal successfully uninstalls according to the uninstall request A user terminal is mounted.
进一步的,所述局域网服务器还包括:Further, the local area network server further includes:
第二接收模块,设置为所述第一用户终端成功挂载并完成读写操作后,接收所述第一用 户终端发送的第二卸载请求;a second receiving module, configured to receive the first use after the first user terminal successfully mounts and completes a read/write operation a second uninstall request sent by the user terminal;
卸载模块,设置为根据所述第二卸载请求,使所述第一用户终端上传当前修改数据至所述局域网服务器,确定允许所述第一用户终端卸载。And the uninstalling module is configured to enable the first user terminal to upload current modification data to the local area network server according to the second uninstall request, and determine to allow the first user terminal to uninstall.
其中,所述局域网服务器还包括:The LAN server further includes:
第二判断模块,设置为判断所述第一虚拟网络硬盘上的数据是否在已经所述第一用户终端上存在缓存;a second determining module, configured to determine whether data on the first virtual network hard disk is cached on the first user terminal;
更新模块,设置为当判断结果为是,将所述局域网服务器的数据同步更新至所述第一用户终端。And updating the module, configured to update the data of the local area network server to the first user terminal synchronously when the determination result is yes.
优选的,所述更新模块包括:Preferably, the update module comprises:
更新单元,设置为判断所述第一虚拟网络硬盘的主引导记录MBR数据是否为空,当所述MBR数据不为空时,更新所述局域网服务器的数据至所述用户终端。And an update unit, configured to determine whether the main boot record MBR data of the first virtual network hard disk is empty, and update the data of the local area network server to the user terminal when the MBR data is not empty.
本发明的实施例还提供一种用户终端,所述用户终端包括:An embodiment of the present invention further provides a user terminal, where the user terminal includes:
发送模块,设置为向局域网服务器发送挂载请求,使所述局域网服务器根据所述挂载请求判断是否所述用户终端挂载;The sending module is configured to send a mount request to the local area network server, so that the local area network server determines, according to the mount request, whether the user terminal is mounted;
接收模块,设置为接收所述局域网服务器允许挂载的挂载请求应答;a receiving module, configured to receive a mount request response that the local area network server allows to be mounted;
挂载模块,设置为根据所述应答在本地映射生成虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。The mounting module is configured to generate a virtual network hard disk according to the response in a local mapping, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
本发明的实施例还提供一种虚拟网络硬盘的挂载系统,包括如上述任一项所述的局域网服务器和如上述所述的用户终端。The embodiment of the present invention further provides a mounting system for a virtual network hard disk, comprising the local area network server according to any of the above, and the user terminal as described above.
在本发明实施例中,还提供了一种计算机存储介质,该计算机存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的虚拟网络硬盘挂载方法的实现。In the embodiment of the present invention, a computer storage medium is further provided, and the computer storage medium may store an execution instruction for executing the implementation of the virtual network hard disk mounting method in the foregoing embodiment.
本发明的上述技术方案至少包括以下有益效果:The above technical solution of the present invention at least includes the following beneficial effects:
本发明的上述技术方案通过接收局域网内用户终端发送的挂载请求;局域网服务器根据挂载请求,判断是否允许用户终端挂载,在允许用户终端挂载时,在用户终端的本地映射生成虚拟网络硬盘,且一个虚拟网络硬盘同时只能在一个用户终端上挂载,保证了数据的一致,并防止用户访问冲突;并且该虚拟网络硬盘在用户终端本地映射生成,即在本地提供一个完整地硬盘,使用户可以直接对数据进行操作。The above technical solution of the present invention receives a mount request sent by a user terminal in a local area network; the local area network server determines whether the user terminal is allowed to be mounted according to the mount request, and generates a virtual network on the local mapping of the user terminal when the user terminal is allowed to be mounted. A hard disk, and a virtual network disk can only be mounted on one user terminal at the same time, ensuring data consistency and preventing user access conflicts; and the virtual network disk is locally mapped and generated on the user terminal, that is, a complete hard disk is provided locally. So that users can directly manipulate the data.
附图说明DRAWINGS
图1表示本发明实施例的虚拟网络硬盘挂载方法应用于局域网服务器的流程框图; 1 is a flow chart showing a virtual network hard disk mounting method applied to a local area network server according to an embodiment of the present invention;
图2表示本发明实施例的虚拟网络硬盘挂载方法应用于用户终端的流程框图;2 is a flow chart showing a method for applying a virtual network hard disk mounting method to a user terminal according to an embodiment of the present invention;
图3表示本发明实施例的局域网服务器的结构框图;3 is a block diagram showing the structure of a local area network server according to an embodiment of the present invention;
图4表示本发明实施例的用户终端的结构框图;4 is a block diagram showing the structure of a user terminal according to an embodiment of the present invention;
图5表示本发明实施例的虚拟网络硬盘的挂载系统的模块示意图。FIG. 5 is a block diagram showing a mounting system of a virtual network hard disk according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。The technical problems, the technical solutions, and the advantages of the present invention will be more clearly described in the following description.
本发明实施例针对现有的问题,提供一种虚拟网络硬盘挂载方法、局域网服务器、用户终端和系统,通过接收局域网内用户终端发送的挂载请求;局域网服务器根据挂载请求,判断是否允许用户终端挂载,在允许用户终端挂载时,在用户终端的本地映射生成虚拟网络硬盘,且一个虚拟网络硬盘同时只能在一个用户终端上挂载,保证了数据的一致,并防止用户访问冲突;并且该虚拟网络硬盘在用户终端本地映射生成,即在本地提供一个完整地硬盘,使用户可以直接对数据进行操作。The embodiment of the present invention provides a virtual network hard disk mounting method, a local area network server, a user terminal, and a system, and receives a mount request sent by a user terminal in a local area network; the local area network server determines whether to allow according to the mount request. The user terminal is mounted. When the user terminal is allowed to be mounted, a virtual network hard disk is generated on the local mapping of the user terminal, and a virtual network hard disk can be mounted on only one user terminal at the same time, thereby ensuring data consistency and preventing user access. Collision; and the virtual network hard disk is locally mapped on the user terminal, that is, a complete hard disk is provided locally, so that the user can directly operate on the data.
方法实施例Method embodiment
如图1所示为本发明实施例的虚拟网络硬盘挂载方法应用于局域网服务器的流程框图,本发明实施例提供一种虚拟网络硬盘挂载方法,应用于局域网服务器,通过局域网服务器对用户终端的挂载请求进行接收并判断用户终端是否可以进行挂载,在允许挂载后在用户终端本地映射生成虚拟网络硬盘,所述方法包括:FIG. 1 is a flow chart of a virtual network hard disk mounting method applied to a local area network server according to an embodiment of the present invention. The embodiment of the present invention provides a virtual network hard disk mounting method, which is applied to a local area network server and a user terminal through a local area network server. The mount request is received and judged whether the user terminal can be mounted, and the virtual network hard disk is locally mapped and generated on the user terminal after the mount is allowed. The method includes:
步骤101,接收局域网内第一用户终端发送的挂载请求。Step 101: Receive a mount request sent by the first user terminal in the local area network.
这里,在局域网内,局域网服务器与用户终端可以采用包括控制通道和数据通道的私有协议,该控制通道采用二进制消息传输控制协议(Transmission Control Protocol,Tcp)连接,数据通道采用二进制编码http消息连接,局域网服务器通过该控制通道接收用户终端发送的挂载请求。其中,这里的第一用户终端表示当前请求挂载的用户终端。Here, in the local area network, the local area network server and the user terminal may adopt a private protocol including a control channel and a data channel, and the control channel is connected by a binary message transmission control protocol (Tcp), and the data channel is connected by a binary coded http message. The LAN server receives the mount request sent by the user terminal through the control channel. The first user terminal here represents the user terminal currently requested to be mounted.
步骤102,根据挂载请求,判断是否允许第一用户终端挂载。Step 102: Determine, according to the mount request, whether the first user terminal is allowed to be mounted.
步骤103,在允许第一用户终端挂载时,为第一用户终端映射生成第一虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。Step 103: When the first user terminal is allowed to be mounted, generate a first virtual network hard disk for the first user terminal mapping, wherein one virtual network hard disk can only be mounted on one user terminal at the same time.
这里,当局域网服务器允许用户终端进行挂载,将局域网服务器上对应的数据文件在用户终端的本地映射生成虚拟网络硬盘,使虚拟网络硬盘在用户终端本地以硬盘形成呈现,这样用户可在用户终端上对虚拟网络硬盘中的数据直接进行本地操作,即用户每次数据读写都是在本地完成。当然,实际挂载动作通过总线驱动实现。局域网服务器通过数据通道将数据传输至用户终端上映射生成的虚拟网络硬盘中。在局域网服务器中包括有实际数据存储的位 置,分配空间的大小,登录的终端信息,当前虚拟网络盘状态等信息。需要说明的是,在局域网服务器上存储有多个虚拟网络硬盘文件,每一虚拟网络硬盘文件可归属于多个用户,而每一用户可在多个不同用户终端登录在线,但同时只能允许一个用户将对应的虚拟网络硬盘文件在一个用户终端上成功挂载,映射生成虚拟网络硬盘,即,一个虚拟网络硬盘同时只能在一个用户终端上挂载,进而对虚拟网络硬盘中的数据进行读写操作。这样,以保证用户访问不会发生冲突,同时也保证在用户对虚拟网络硬盘的数据进行修改更新后的数据一致。Here, when the local area network server allows the user terminal to mount, the corresponding data file on the local area network server is mapped locally on the user terminal to generate a virtual network hard disk, so that the virtual network hard disk is formed by the hard disk locally in the user terminal, so that the user can be at the user terminal. Directly perform local operations on the data in the virtual network hard disk, that is, each time the user reads and writes data, it is completed locally. Of course, the actual mount action is implemented by the bus driver. The LAN server transmits data to the virtual network hard disk generated by mapping on the user terminal through the data channel. Include the actual data storage bit in the LAN server Set, the size of the allocated space, the registered terminal information, the current virtual network disk status and other information. It should be noted that a plurality of virtual network hard disk files are stored on the local area network server, and each virtual network hard disk file can be attributed to multiple users, and each user can log in online at multiple different user terminals, but only allowed at the same time. A user successfully mounts the corresponding virtual network hard disk file on a user terminal, and maps to generate a virtual network hard disk. That is, a virtual network hard disk can only be mounted on one user terminal at the same time, thereby performing data on the virtual network hard disk. Read and write operations. In this way, to ensure that user access does not conflict, and also ensure that the data after the user changes and updates the data of the virtual network hard disk is consistent.
其中,作为本发明一种可选的实施方式,在步骤102中,根据挂载请求,判断是否允许第一用户终端挂载的步骤包括:As an optional implementation manner of the present invention, in step 102, the step of determining whether to allow the first user terminal to be mounted according to the mount request includes:
查询当前是否有第一用户终端以外的其他用户终端正在挂载,并在当前没有其他用户终端挂载时,确定允许第一用户终端挂载。It is queried whether other user terminals other than the first user terminal are currently being mounted, and when no other user terminals are currently mounted, it is determined that the first user terminal is allowed to be mounted.
这里,局域网服务器判断是否允许用户终端进行挂载时,即对当前是否有其他用户终端挂载的情况进行查询,确定当前没有其他用户终端挂载后,局域网服务器即确定允许该用户终端挂载。Here, when the local area network server determines whether the user terminal is allowed to perform the mount, that is, whether the other user terminal is currently mounted, the local area network server determines that the user terminal is allowed to be mounted after determining that no other user terminal is currently mounted.
其中,作为本发明一种可选的实施方式,在步骤102中,根据挂载请求,判断是否允许第一用户终端挂载的步骤还可包括:As an optional implementation manner of the present invention, in step 102, the step of determining whether to allow the first user terminal to be mounted according to the mounting request may further include:
在当前有其他用户终端挂载时,向其他用户终端发送第一卸载请求,并在其他用户终端根据卸载请求成功卸载时,确定允许第一用户终端挂载。When other user terminals are currently mounted, the first uninstall request is sent to other user terminals, and when the other user terminals successfully uninstall according to the uninstall request, it is determined that the first user terminal is allowed to be mounted.
这里,当局域网内已有其他用户终端挂载时,局域网服务器向包括第一用户终端在内的当前在线的所有用户终端发送已经挂载的用户终端的MAC(Medium/Media Access Control)地址,同时向已经挂载的用户终端发送一个卸载请求,提示当前在线的用户终端已经有用户终端正在挂载,当没有用户挂载时,该MAC地址为空。这里该已经挂载的用户终端基于自身当前虚拟网络硬盘的工作状态进行判断,其中虚拟网络硬盘的工作状态包括空闲、读取中以及写入中。当该已经挂载的用户终端的虚拟网络硬盘处在空闲状态时,局域网服务器接收到其发送的接受卸载应答,在该已经挂载的用户终端根据卸载请求成功卸载时,局域网服务器确定允许第一用户终端挂载。当该已经挂载的用户终端的虚拟网络硬盘处在非空闲状态时,局域网服务器接收到拒绝卸载的应答,则局域网服务器向第一用户终端发送挂载请求失败的应答,使第一用户终端放弃挂载。Here, when other user terminals are mounted in the local area network, the local area network server sends the MAC (Medium/Media Access Control) address of the already installed user terminal to all the currently online user terminals including the first user terminal, and simultaneously An unloading request is sent to the user terminal that has been mounted, indicating that the currently online user terminal has a user terminal being mounted, and when no user is mounted, the MAC address is empty. Here, the already mounted user terminal judges based on the working state of the current virtual network hard disk, wherein the working state of the virtual network hard disk includes idle, reading, and writing. When the virtual network hard disk of the already mounted user terminal is in an idle state, the local area network server receives the accepting offload response sent by the local area network server, and when the already mounted user terminal successfully uninstalls according to the uninstall request, the local area network server determines to allow the first The user terminal is mounted. When the virtual network hard disk of the already mounted user terminal is in the non-idle state, the local area network server receives the response rejecting the uninstallation, and the local area network server sends a response to the first user terminal that the mount request failed, so that the first user terminal gives up. Mount.
作为本发明实施例进一步的实施方式,当所述第一用户终端挂载成功并完成本地读写操作后,所述方法还可包括:As a further embodiment of the embodiment of the present invention, after the first user terminal is successfully mounted and the local read/write operation is completed, the method may further include:
接收第一用户终端发送的第二卸载请求。Receiving a second uninstall request sent by the first user terminal.
这里,当用户终端成功挂载,且用户在用户终端本地完成读写操作后,用户通过用户终端发出第二卸载请求,局域网服务器通过控制通道接收到用户终端的第二卸载请求。这里,第二卸载请求即为用户终端发出的卸载请求,以区别前述实施例中由局域网服务器发出的第一卸载请求。 Here, after the user terminal is successfully mounted, and the user completes the read/write operation locally at the user terminal, the user issues a second uninstall request through the user terminal, and the local area network server receives the second uninstall request of the user terminal through the control channel. Here, the second offload request is an offload request issued by the user terminal to distinguish the first offload request issued by the local area network server in the foregoing embodiment.
根据第二卸载请求,使第一用户终端上传当前修改数据至局域网服务器,确定允许第一用户终端卸载。And according to the second uninstall request, causing the first user terminal to upload the current modified data to the local area network server, and determining to allow the first user terminal to uninstall.
这里,为确保当前虚拟网络硬盘内的数据修改后,局域网服务器内数据的一致性,局域网服务器接收到用户终端发送的第二卸载请求后,使用户终端对当前修改数据同步至局域网服务器。Here, in order to ensure the consistency of data in the local area network server after the data in the current virtual network hard disk is modified, the local area network server synchronizes the current modified data to the local area network server after receiving the second unloading request sent by the user terminal.
其中,作为本发明的一种可选实施方式,在步骤103,允许第一用户终端挂载时,为第一用户终端映射生成第一虚拟网络硬盘之后,所述方法还可包括:As an optional implementation manner of the present invention, after the first user terminal is configured to be configured to generate the first virtual network hard disk for the first user terminal, the method may further include:
判断第一虚拟网络硬盘上的数据是否在已经第一用户终端上存在缓存。It is determined whether the data on the first virtual network hard disk has a cache on the first user terminal.
这里,在用户终端上挂载的虚拟网络硬盘包括网络盘、半缓存网络盘以及全缓存网络盘等几种类型,当虚拟网络硬盘属于半缓存网络盘或全缓存网络盘类型时,在用户终端内存和本地硬盘中存在数据缓存;当虚拟网络硬盘属于全缓存网络盘类型时,在用户终端上可以进行离线使用;而当虚拟网络硬盘属于网络盘类型时,在用户终端上每次读写都需要消耗网络流量。Here, the virtual network hard disk mounted on the user terminal includes several types, such as a network disk, a half-cache network disk, and a full-cache network disk. When the virtual network disk belongs to a half-cache network disk or a full-cache network disk type, the user terminal There is data cache in the memory and local hard disk; when the virtual network disk belongs to the full cache network disk type, it can be used offline on the user terminal; and when the virtual network disk belongs to the network disk type, it is read and written every time on the user terminal. Need to consume network traffic.
当判断结果为是,将局域网服务器的数据同步更新至第一用户终端。When the judgment result is yes, the data of the local area network server is synchronously updated to the first user terminal.
这里,当判断虚拟网络硬盘属于半缓存网络盘或者全缓存网络盘时,在用户终端上使用时需要将局域网服务器的数据同步更新到用户终端上,以保证数据的一致。Here, when it is determined that the virtual network hard disk belongs to the half-cache network disk or the full-cache network disk, the data of the local area network server needs to be synchronously updated to the user terminal when used on the user terminal to ensure data consistency.
优选的,在上述实施方式中,将局域网服务器的数据同步更新至用户终端的步骤,包括:Preferably, in the above embodiment, the step of synchronously updating data of the local area network server to the user terminal includes:
判断第一虚拟网络硬盘的主引导记录数据(Master Boot Record,MBR)是否为空,当MBR数据不为空时,更新局域网服务器的数据至用户终端。It is determined whether the master boot record (MBR) of the first virtual network hard disk is empty, and when the MBR data is not empty, the data of the local area network server is updated to the user terminal.
这里,由于虚拟网络硬盘是整个硬盘的虚拟化,对虚拟网络硬盘的MBR数据进行判断,当该MBR数据数据为空时,即局域网服务器的数据并未修改更新,局域网服务器不需要对用户终端上的数据进行更新,当MBR数据不为空时,更新局域网服务器的数据至用户终端,以确保数据的一致。Here, since the virtual network hard disk is the virtualization of the entire hard disk, the MBR data of the virtual network hard disk is judged. When the MBR data data is empty, that is, the data of the local area network server is not modified and updated, the local area network server does not need to be on the user terminal. The data is updated, and when the MBR data is not empty, the data of the LAN server is updated to the user terminal to ensure the consistency of the data.
与前述应用于局域网服务器的虚拟网络硬盘挂载方法相对应的,如图2所示的本发明实施例的虚拟网络硬盘挂载方法应用于用户终端的流程框图,本发明的实施例还提供一种虚拟网络硬盘挂载方法,应用于用户终端,所述方法包括:The virtual network hard disk mounting method of the embodiment of the present invention as shown in FIG. 2 is applied to the flow chart of the user terminal, and the embodiment of the present invention further provides a method corresponding to the virtual network hard disk mounting method applied to the local area network server. A virtual network hard disk mounting method is applied to a user terminal, and the method includes:
步骤201,向局域网服务器发送挂载请求,使局域网服务器根据挂载请求判断是否用户终端挂载。Step 201: Send a mount request to the local area network server, so that the local area network server determines whether the user terminal is mounted according to the mount request.
这里,在局域网内,局域网服务器与用户终端可以采用包括控制通道和数据通道的私有协议,该控制通道采用二进制消息传输控制协议Tcp连接,数据通道采用二进制编码http消息连接,用户终端通过该控制通道向局域网服务器发送挂载请求。Here, in the local area network, the local area network server and the user terminal may adopt a private protocol including a control channel and a data channel, and the control channel is connected by a binary message transmission control protocol Tcp, and the data channel is connected by a binary coded http message, and the user terminal passes the control channel. Send a mount request to the LAN server.
步骤202,接收局域网服务器允许挂载的挂载请求应答。 Step 202: Receive a mount request response that the local area network server allows to mount.
这里,用户终端通过该控制通道接收局域网服务器发送的挂载请求应答。Here, the user terminal receives the mount request response sent by the local area network server through the control channel.
步骤203,根据应答在本地映射生成虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。Step 203: Generate a virtual network hard disk according to the local mapping in response, wherein one virtual network hard disk can only be mounted on one user terminal at the same time.
这里,用户终端接收到局域网服务器发送的一个MAC地址,并判断该MAC地址是否为用户终端本机的MAC地址,当判断为是时,用户终端执行挂载,在本地生成虚拟网络硬盘,这样用户可在用户终端上对虚拟网络硬盘中的数据直接进行本地操作,即用户每次数据读写都是在本地完成。需要说明的是,在局域网服务器上存储有多个虚拟网络硬盘文件,每一虚拟网络硬盘文件可归属于多个用户,而每一用户可在多个不同用户终端登录在线,但同时只能允许一个用户将对应的虚拟网络硬盘文件在一个用户终端上成功挂载,映射生成虚拟网络硬盘,即,一个虚拟网络硬盘同时只能在一个用户终端上挂载,进而对虚拟网络硬盘中的数据进行读写操作。这样,以保证用户访问不会发生冲突,同时也保证在用户对虚拟网络硬盘的数据进行修改更新后的数据一致。Here, the user terminal receives a MAC address sent by the local area network server, and determines whether the MAC address is the MAC address of the local end of the user terminal. When the determination is yes, the user terminal performs mounting, and generates a virtual network hard disk locally, so that the user The data in the virtual network hard disk can be directly operated locally on the user terminal, that is, each time the user reads and writes data, it is completed locally. It should be noted that a plurality of virtual network hard disk files are stored on the local area network server, and each virtual network hard disk file can be attributed to multiple users, and each user can log in online at multiple different user terminals, but only allowed at the same time. A user successfully mounts the corresponding virtual network hard disk file on a user terminal, and maps to generate a virtual network hard disk. That is, a virtual network hard disk can only be mounted on one user terminal at the same time, thereby performing data on the virtual network hard disk. Read and write operations. In this way, to ensure that user access does not conflict, and also ensure that the data after the user changes and updates the data of the virtual network hard disk is consistent.
装置实施例Device embodiment
如图3所示为本发明实施例的局域网服务器的结构框图,本发明实施例提供一种相应的局域网服务器,所述局域网服务器包括:FIG. 3 is a structural block diagram of a local area network server according to an embodiment of the present invention. The embodiment of the present invention provides a corresponding local area network server, where the local area network server includes:
第一接收模块31,设置为接收局域网内第一用户终端发送的挂载请求;The first receiving module 31 is configured to receive a mount request sent by the first user terminal in the local area network;
第一判断模块32,设置为根据所述挂载请求,判断是否允许所述第一用户终端挂载,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载;The first determining module 32 is configured to determine, according to the mounting request, whether to allow the first user terminal to be mounted, wherein a virtual network hard disk can only be mounted on one user terminal at a time;
挂载模块33,设置为在允许所述第一用户终端挂载时,为所述第一用户终端映射生成第一虚拟网络硬盘。The mounting module 33 is configured to generate a first virtual network hard disk for the first user terminal mapping when the first user terminal is allowed to be mounted.
其中,作为一种可选的实施方式,第一判断模块32包括:As an optional implementation manner, the first determining module 32 includes:
第一确定单元,设置为查询当前是否有第一用户终端以外的其他用户终端正在挂载,并在当前其他用户终端挂载时,确定允许第一用户终端挂载。The first determining unit is configured to query whether other user terminals other than the first user terminal are currently being mounted, and determine that the first user terminal is allowed to be mounted when the other user terminals are currently mounted.
其中,作为一种可选的实施方式,第一判断模块32还可包括:As an optional implementation manner, the first determining module 32 may further include:
第二确定单元,设置为在当前有其他用户终端挂载时,向其他用户终端发送第一卸载请求,并在其他用户终端根据卸载请求成功卸载时,确定允许第一用户终端挂载。The second determining unit is configured to send the first uninstall request to the other user terminals when the other user terminals are currently mounted, and determine that the first user terminal is allowed to be mounted when the other user terminals successfully uninstall according to the uninstall request.
作为本发明实施例进一步的实施方式,局域网服务器还可包括:As a further implementation of the embodiment of the present invention, the local area network server may further include:
第二接收模块,设置为第一用户终端成功挂载并完成读写操作后,接收第一用户终端发送的第二卸载请求;The second receiving module is configured to receive the second uninstall request sent by the first user terminal after the first user terminal successfully mounts and completes the read/write operation;
卸载模块,设置为根据第二卸载请求,使第一用户终端上传当前修改数据至局域网服务器,确定允许第一用户终端卸载。 And the uninstalling module is configured to enable the first user terminal to upload the current modified data to the local area network server according to the second uninstall request, and determine to allow the first user terminal to uninstall.
其中,作为本发明实施例的一种可选实施方式,局域网服务器还可包括:As an optional implementation manner of the embodiment of the present invention, the local area network server may further include:
第二判断模块,设置为判断第一虚拟网络硬盘上的数据是否在已经第一用户终端上存在缓存;The second determining module is configured to determine whether the data on the first virtual network hard disk has a cache on the first user terminal;
更新模块,设置为当判断结果为是,将局域网服务器的数据同步更新至第一用户终端。The update module is configured to synchronously update the data of the local area network server to the first user terminal when the determination result is yes.
优选的,在上述实施方式中,更新模块可包括:Preferably, in the above embodiment, the updating module may include:
更新单元,设置为判断第一虚拟网络硬盘的主引导记录MBR数据是否为空,当MBR数据不为空时,更新局域网服务器的数据至用户终端。The updating unit is configured to determine whether the main boot record MBR data of the first virtual network hard disk is empty, and when the MBR data is not empty, update the data of the local area network server to the user terminal.
局域网服务器能够实现前述应用于局域网服务器的虚拟网络硬盘的挂载方法实施例中局域网服务器实现的各个过程,为避免重复,这里不再赘述。The LAN server can implement the foregoing processes of the LAN server in the embodiment of the method for mounting the virtual network hard disk applied to the local area network server. To avoid repetition, details are not described herein.
与前述局域网服务器相对应的,如图4所示为本发明实施例的用户终端的结构框图,本发明实施例提供一种用户终端,所述用户终端包括:Corresponding to the foregoing LAN server, as shown in FIG. 4 is a structural block diagram of a user terminal according to an embodiment of the present invention. The embodiment of the present invention provides a user terminal, where the user terminal includes:
发送模块41,设置为向局域网服务器发送挂载请求,使局域网服务器根据挂载请求判断是否用户终端挂载;The sending module 41 is configured to send a mount request to the local area network server, so that the local area network server determines, according to the mount request, whether the user terminal is mounted;
接收模块42,设置为接收局域网服务器允许挂载的挂载请求应答;The receiving module 42 is configured to receive a mount request response that the local area network server allows to be mounted;
挂载模块43,设置为根据应答在本地映射生成虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。The mounting module 43 is configured to generate a virtual network hard disk according to the local mapping in response, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
用户终端能够实现前述应用于用户终端的虚拟网络硬盘的挂载方法实施例中用户终端实现的各个过程,为避免重复,这里不再赘述。The user terminal can implement the various processes implemented by the user terminal in the foregoing method for mounting the virtual network hard disk of the user terminal. To avoid repetition, details are not described herein again.
需要说明的是,在上述各个实施例中,用户使用的用户终端包括有代理消息处理程序,并且安装有相关的虚拟网络硬盘驱动。It should be noted that, in the above various embodiments, the user terminal used by the user includes a proxy message processing program, and an associated virtual network hard disk drive is installed.
系统实施例System embodiment
如图5所示为本发明实施例的虚拟网络硬盘的挂载系统的模块示意图。本发明的实施例还提供一种虚拟网络硬盘的挂载系统,包括如上述任一项所述的局域网服务器和如上述所述的用户终端。FIG. 5 is a schematic block diagram of a mounting system of a virtual network hard disk according to an embodiment of the present invention. The embodiment of the present invention further provides a mounting system for a virtual network hard disk, comprising the local area network server according to any of the above, and the user terminal as described above.
本发明的上述实施例通过接收局域网内用户终端发送的挂载请求;局域网服务器根据挂载请求,判断是否允许用户终端挂载,在允许用户终端挂载时,在用户终端的本地映射生成虚拟网络硬盘,且局域网服务器同时只能允许一个用户终端挂载,保证了数据的一致,并防止用户访问冲突;并且该虚拟网络硬盘在用户终端本地映射生成,即在本地提供一个完整地硬盘,使用户可以直接对数据进行操作。The foregoing embodiment of the present invention receives a mount request sent by a user terminal in a local area network; the local area network server determines whether the user terminal is allowed to be mounted according to the mount request, and generates a virtual network in the local mapping of the user terminal when the user terminal is allowed to be mounted. The hard disk, and the LAN server can only allow one user terminal to be mounted at the same time, ensuring the consistency of data and preventing user access conflicts; and the virtual network hard disk is locally mapped and generated on the user terminal, that is, a complete hard disk is provided locally, so that the user Data can be manipulated directly.
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为 本发明的保护范围。The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. Should be considered The scope of protection of the present invention.
工业实用性Industrial applicability
本发明实施例提供的上述技术方案,可以应用于虚拟网络硬盘的挂载过程中,通过接收局域网内用户终端发送的挂载请求;局域网服务器根据挂载请求,判断是否允许用户终端挂载,在允许用户终端挂载时,在用户终端的本地映射生成虚拟网络硬盘,且一个虚拟网络硬盘同时只能在一个用户终端上挂载,保证了数据的一致,并防止用户访问冲突;并且该虚拟网络硬盘在用户终端本地映射生成,即在本地提供一个完整地硬盘,使用户可以直接对数据进行操作。 The foregoing technical solution provided by the embodiment of the present invention can be applied to receive a mount request sent by a user terminal in a local area network during a mounting process of the virtual network hard disk; and the local area network server determines whether the user terminal is allowed to be mounted according to the mount request. When the user terminal is allowed to be mounted, a virtual network hard disk is generated on the local mapping of the user terminal, and a virtual network hard disk can be mounted on only one user terminal at the same time, ensuring data consistency and preventing user access conflicts; and the virtual network The hard disk is locally mapped on the user terminal, that is, a complete hard disk is provided locally, so that the user can directly operate on the data.

Claims (15)

  1. 一种虚拟网络硬盘挂载方法,应用于局域网服务器,所述方法包括:A virtual network hard disk mounting method is applied to a local area network server, and the method includes:
    接收局域网内第一用户终端发送的挂载请求;Receiving a mount request sent by the first user terminal in the local area network;
    根据所述挂载请求,判断是否允许所述第一用户终端挂载;Determining, according to the mount request, whether the first user terminal is allowed to be mounted;
    在允许所述第一用户终端挂载时,为所述第一用户终端映射生成第一虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。When the first user terminal is allowed to be mounted, the first virtual network hard disk is generated for the first user terminal mapping, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  2. 根据权利要求1所述的方法,其中,所述根据所述挂载请求,判断是否允许所述第一用户终端挂载的步骤包括:The method according to claim 1, wherein the step of determining whether to allow the first user terminal to be mounted according to the mount request comprises:
    查询当前是否有第一用户终端以外的其他用户终端正在挂载,并在当前没有其他用户终端挂载时,确定允许所述第一用户终端挂载。It is queried whether other user terminals other than the first user terminal are currently being mounted, and when no other user terminals are currently mounted, it is determined that the first user terminal is allowed to be mounted.
  3. 根据权利要求2所述的方法,其中,所述根据所述挂载请求,判断是否允许所述第一用户终端挂载的步骤还包括:The method of claim 2, wherein the step of determining whether to allow the first user terminal to be mounted according to the mount request further comprises:
    在当前有其他用户终端挂载时,向所述其他用户终端发送第一卸载请求,并在所述其他用户终端根据所述卸载请求成功卸载时,确定允许所述第一用户终端挂载。When the other user terminals are currently mounted, the first uninstall request is sent to the other user terminals, and when the other user terminals successfully uninstall according to the uninstall request, it is determined that the first user terminal is allowed to be mounted.
  4. 根据权利要求1-3任一项所述的方法,其中,当所述第一用户终端成功挂载并完成读写操作后,所述方法还包括:The method according to any one of claims 1-3, wherein, after the first user terminal successfully mounts and completes a read/write operation, the method further includes:
    接收所述第一用户终端发送的第二卸载请求;Receiving a second uninstall request sent by the first user terminal;
    根据所述第二卸载请求,使所述第一用户终端上传当前修改数据至所述局域网服务器,确定允许所述第一用户终端卸载。And according to the second uninstall request, causing the first user terminal to upload current modification data to the local area network server, and determining to allow the first user terminal to uninstall.
  5. 根据权利要求1所述的方法,其中,所述允许所述第一用户终端挂载时,为所述第一用户终端映射生成第一虚拟网络硬盘之后,所述方法还包括:The method according to claim 1, wherein, after the first user terminal is allowed to be mounted, the first virtual network hard disk is generated for the mapping of the first user terminal, the method further includes:
    判断所述第一虚拟网络硬盘上的数据是否在已经所述第一用户终端上存在缓存;Determining whether data on the first virtual network hard disk exists on the first user terminal;
    当判断结果为是,将所述局域网服务器的数据同步更新至所述第一用户终端。When the determination result is yes, the data of the local area network server is synchronously updated to the first user terminal.
  6. 根据权利要求5所述的方法,其中,所述将所述局域网服务器的数据同步更新至所述用户终端的步骤,包括:The method of claim 5, wherein the step of synchronously updating data of the local area network server to the user terminal comprises:
    判断所述第一虚拟网络硬盘的主引导记录MBR数据是否为空,当所述MBR数据不为空时,更新所述局域网服务器的数据至所述用户终端。Determining whether the main boot record MBR data of the first virtual network hard disk is empty, and updating the data of the local area network server to the user terminal when the MBR data is not empty.
  7. 一种虚拟网络硬盘挂载方法,应用于用户终端,所述方法包括:A virtual network hard disk mounting method is applied to a user terminal, and the method includes:
    向局域网服务器发送挂载请求,使所述局域网服务器根据所述挂载请求判断是否所述用户终端挂载; Sending a mount request to the local area network server, so that the local area network server determines, according to the mount request, whether the user terminal is mounted;
    接收所述局域网服务器允许挂载的挂载请求应答;Receiving a mount request response that the local area network server allows to be mounted;
    根据所述应答在本地映射生成虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。A virtual network hard disk is generated locally according to the response, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  8. 一种局域网服务器,所述局域网服务器包括:A local area network server, the local area network server includes:
    第一接收模块,设置为接收局域网内第一用户终端发送的挂载请求;The first receiving module is configured to receive a mount request sent by the first user terminal in the local area network;
    第一判断模块,设置为根据所述挂载请求,判断是否允许所述第一用户终端挂载;The first determining module is configured to determine, according to the mounting request, whether to allow the first user terminal to be mounted;
    挂载模块,设置为在允许所述第一用户终端挂载时,为所述第一用户终端映射生成第一虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。The mounting module is configured to generate a first virtual network hard disk for the first user terminal mapping when the first user terminal is allowed to be mounted, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  9. 根据权利要求8所述的局域网服务器,其中,所述第一判断模块包括:The local area network server according to claim 8, wherein the first determining module comprises:
    第一确定单元,设置为查询当前是否有第一用户终端以外的其他用户终端正在挂载,并在当前没有其他用户终端挂载时,确定允许所述第一用户终端挂载。The first determining unit is configured to query whether other user terminals other than the first user terminal are currently being mounted, and determine that the first user terminal is allowed to be mounted when no other user terminals are currently mounted.
  10. 根据权利要求9所述的局域网服务器,其中,所述第一判断模块还包括:The local area network server according to claim 9, wherein the first determining module further comprises:
    第二确定单元,设置为在当前有其他用户终端挂载时,向所述其他用户终端发送第一卸载请求,并在所述其他用户终端根据所述卸载请求成功卸载时,确定允许所述第一用户终端挂载。a second determining unit, configured to send a first uninstall request to the other user terminal when the other user terminal is currently mounted, and determine to allow the first when the other user terminal successfully uninstalls according to the uninstall request A user terminal is mounted.
  11. 根据权利要求8-10任一项所述的局域网服务器,其中,所述局域网服务器还包括:The local area network server according to any one of claims 8 to 10, wherein the local area network server further comprises:
    第二接收模块,设置为所述第一用户终端成功挂载并完成读写操作后,接收所述第一用户终端发送的第二卸载请求;The second receiving module is configured to receive the second uninstall request sent by the first user terminal after the first user terminal successfully mounts and completes the read/write operation;
    卸载模块,设置为根据所述第二卸载请求,使所述第一用户终端上传当前修改数据至所述局域网服务器,确定允许所述第一用户终端卸载。And the uninstalling module is configured to enable the first user terminal to upload current modification data to the local area network server according to the second uninstall request, and determine to allow the first user terminal to uninstall.
  12. 根据权利要求8所述的局域网服务器,其中,所述局域网服务器还包括:The local area network server according to claim 8, wherein the local area network server further comprises:
    第二判断模块,设置为判断所述第一虚拟网络硬盘上的数据是否在已经所述第一用户终端上存在缓存;a second determining module, configured to determine whether data on the first virtual network hard disk is cached on the first user terminal;
    更新模块,设置为当判断结果为是,将所述局域网服务器的数据同步更新至所述第一用户终端。And updating the module, configured to update the data of the local area network server to the first user terminal synchronously when the determination result is yes.
  13. 根据权利要求12所述的局域网服务器,其中,所述更新模块包括:The local area network server according to claim 12, wherein the update module comprises:
    更新单元,设置为判断所述第一虚拟网络硬盘的主引导记录MBR数据是否为空,当所述MBR数据不为空时,更新所述局域网服务器的数据至所述用户终端。And an update unit, configured to determine whether the main boot record MBR data of the first virtual network hard disk is empty, and update the data of the local area network server to the user terminal when the MBR data is not empty.
  14. 一种虚拟网络硬盘的用户终端,所述用户终端包括: A user terminal of a virtual network hard disk, the user terminal includes:
    发送模块,设置为向局域网服务器发送挂载请求,使所述局域网服务器根据所述挂载请求判断是否所述用户终端挂载;The sending module is configured to send a mount request to the local area network server, so that the local area network server determines, according to the mount request, whether the user terminal is mounted;
    接收模块,设置为接收所述局域网服务器允许挂载的挂载请求应答;a receiving module, configured to receive a mount request response that the local area network server allows to be mounted;
    挂载模块,设置为根据所述应答在本地映射生成虚拟网络硬盘,其中,一个虚拟网络硬盘同时只能在一个用户终端上挂载。The mounting module is configured to generate a virtual network hard disk according to the response in a local mapping, wherein one virtual network hard disk can be mounted on only one user terminal at the same time.
  15. 一种虚拟网络硬盘的挂载系统,包括如权利要求8-13任一项所述的局域网服务器和如权利要求14所述的用户终端。 A mounting system for a virtual network hard disk, comprising the local area network server according to any one of claims 8 to 13 and the user terminal according to claim 14.
PCT/CN2016/095276 2015-12-02 2016-08-15 Virtual network hard disk mounting method, lan server, user terminal and system WO2017092402A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510876091.X 2015-12-02
CN201510876091.XA CN106817399A (en) 2015-12-02 2015-12-02 Virtual network hard disk hanging method, LAN server, user terminal and system

Publications (1)

Publication Number Publication Date
WO2017092402A1 true WO2017092402A1 (en) 2017-06-08

Family

ID=58796182

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/095276 WO2017092402A1 (en) 2015-12-02 2016-08-15 Virtual network hard disk mounting method, lan server, user terminal and system

Country Status (2)

Country Link
CN (1) CN106817399A (en)
WO (1) WO2017092402A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334283B (en) * 2018-01-16 2021-06-01 广州视源电子科技股份有限公司 Data writing-in and reading method and system, and data reading-writing system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996051A (en) * 2009-08-25 2011-03-30 联想(北京)有限公司 Virtual disk system, virtual disk implementation method and terminal equipment
US20110145517A1 (en) * 2009-12-10 2011-06-16 International Business Machines Corporation Dynamic reuse and reconfiguration of logical data objects in a virtual tape system
CN102622187A (en) * 2011-11-28 2012-08-01 苏州奇可思信息科技有限公司 Network mapping based distributive file storage method
CN104391654A (en) * 2014-11-06 2015-03-04 浪潮(北京)电子信息产业有限公司 Shared disk management method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996051A (en) * 2009-08-25 2011-03-30 联想(北京)有限公司 Virtual disk system, virtual disk implementation method and terminal equipment
US20110145517A1 (en) * 2009-12-10 2011-06-16 International Business Machines Corporation Dynamic reuse and reconfiguration of logical data objects in a virtual tape system
CN102622187A (en) * 2011-11-28 2012-08-01 苏州奇可思信息科技有限公司 Network mapping based distributive file storage method
CN104391654A (en) * 2014-11-06 2015-03-04 浪潮(北京)电子信息产业有限公司 Shared disk management method and system

Also Published As

Publication number Publication date
CN106817399A (en) 2017-06-09

Similar Documents

Publication Publication Date Title
US11340672B2 (en) Persistent reservations for virtual disk using multiple targets
KR101465928B1 (en) Converting machines to virtual machines
US8924664B2 (en) Logical object deletion
US9092426B1 (en) Zero-copy direct memory access (DMA) network-attached storage (NAS) file system block writing
JP4808275B2 (en) Network boot system
JP4464378B2 (en) Computer system, storage system and control method for saving storage area by collecting the same data
US11922537B2 (en) Resiliency schemes for distributed storage systems
US20140082275A1 (en) Server, host and method for reading base image through storage area network
US20230273899A1 (en) Data migration in a distributive file system
JP2004127295A (en) Virtual storage system and its operation method
EP3679478A1 (en) Scalable storage system
US7725654B2 (en) Affecting a caching algorithm used by a cache of storage system
US8332844B1 (en) Root image caching and indexing for block-level distributed application management
US20190220211A1 (en) System and methods of using in-memory replicated object to support file services
WO2017092402A1 (en) Virtual network hard disk mounting method, lan server, user terminal and system
WO2021249141A1 (en) Method for processing metadata in storage device and related device
WO2016070641A1 (en) Data storage method and device, and data reading method and device
JP2005301560A (en) Cluster file server
CN117806557A (en) Host system, data computing method and independently computable memory redundancy system
JP2013011971A (en) Distributed shared memory management system, distributed shared memory management method and distributed shared memory management program
WO2016069037A1 (en) File system configuration data storage
JP2011209874A (en) Storage device and data transfer method using the same

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

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

Country of ref document: EP

Kind code of ref document: A1