A kind of network type location mode and system based on Network Attached Storage
Technical field
The present invention relates to network attached storage technical field more particularly to a kind of network types based on Network Attached Storage
Location mode and system.
Background technology
NAS (network attached storage) is defined as a kind of special exclusive data storage server, including memory device (example
Such as disk array, CD/DVD drivers, tape drive or moveable storage medium) and embedded systems software, it is possible to provide across
Platform file sharing functionality.NAS usually occupies the node of oneself on a LAN, is not necessarily to the intervention of application server, permits
Family allowable accesses data on network, and in this configuration, all data in NAS centralized management and processing network will load
It is unloaded from application or enterprise servers, effectively reduces total cost of ownership, protect customer investment.
By taking household NAS as an example, if family has more NAS, general is difficult to be managed collectively to it.Household at present
NAS generally use routers add the mode of mobile hard disk or the mode of special NAS system, the former is using millet router HD as generation
Table, the latter is using group's sunshine DSM as representative.But both modes all can only be managed individually at present, when user's family has more NAS,
File can not be managed collectively.
And at present solution to the problems described above have it is following two:1, it needs that cumbersome port mapping is arranged on the router
Rule could accurately find target NAS files, and when router WAN port address changes, remote access success rate can be big
It is big to reduce;2, the file on more NAS is synchronized to third party's cloud disk, user directly accesses third party's cloud disk, on the one hand uses
Family privacy cannot be protected, and on the other hand when a user has more NAS, can not be managed collectively.
For another example application No. is 201710181643.4 Chinese invention applications to disclose a kind of attached storage of distributed network
Method and system, this method include:Proxy server receives the carry request that client is initiated, wherein proxy server connects
To multiple NAS virtual machines, multiple NAS virtual machines are connect with client, and are connected by routing device and rear end storage file system
It connects;The carry request of different clients is distributed to different NAS virtual machines by proxy server, is made by selected NAS virtual machines
For file system server Network File System service is provided to corresponding client.
Although the above method can be managed collectively more NAS, need introduce proxy server, on the one hand at
This is higher, and on the other hand it needs to receive by proxy server and ask, and it is virtual then to send the request to corresponding NAS again
Machine, overall process it is inefficient.
Invention content
The purpose of the present invention is to solve the above-mentioned problems of the prior art, provide a kind of based on network attached storage
The network type location mode of device can efficiently be managed collectively more Network Attached Storages, and ensure user
Privacy.
The purpose of the present invention is what is be achieved through the following technical solutions:
A kind of network type location mode based on Network Attached Storage, includes the following steps:
Step 1, cloud platform establishes long connection with Network Attached Storage;
Step 2, the cloud platform receives the abstract for the local file that the Network Attached Storage reports;
Step 3, the cloud platform is by the abstract of the local file received and the corresponding network attached storage
Device information indexes;
Step 4, when remote user accesses the local file to the cloud platform, the cloud platform is assisted according to the index
It helps the remote user to establish with the Network Attached Storage where the local file to connect.
Preferably, in the Network Attached Storage when thering is file to update or thering is new file to upload, will update
The abstract of the abstract of file afterwards or new file reports to the cloud platform.
Preferably, the step 4 medium cloud platform to assist remote user establishes the specific of connection with Network Attached Storage
Method is:
The cloud platform informs the public network address of remote user described in the Network Attached Storage;
The Network Attached Storage initiates a request to remote user's public network address;
The cloud platform notifies the public network address where Network Attached Storage described in the remote user;
Described network attached deposit is accessed by the public network address where the Network Attached Storage in the remote user
Reservoir.
Preferably, further including before the step 4:The cloud platform verifies the access rights of the remote user,
If the remote user does not have access rights, refuse its access request;
If the remote user has level-one access rights, it is allowed to check document information;
If the remote user has second-level access permission, it is allowed to check document information, and download or on
Transmitting file.
Preferably, the abstract of the local file includes filename, file type, file size, creation time, file
Attribute and file message digest algorithm values.
The present invention also provides a kind of network type compartment system based on Network Attached Storage, including:
Multiple Network Attached Storages for storage file and generate the abstract of file, and by the abstract of the file
Be reported to cloud platform;
Cloud platform, the abstract for storing the file, and by the abstract of the file with it is corresponding described network attached
Memory indexes, and is connected with assisting remote user to be established with the corresponding Network Attached Storage;
Remote user directly accesses the cloud platform, is directly viewable the abstract of the file by the cloud platform, and
The Network Attached Storage is accessed under the assistance of the cloud platform.
Preferably, the Network Attached Storage includes:
File storage module is used for storage file and document;
Summarization generation module, the abstract for generating the file;
Abstract reporting module, for the abstract of the file to be reported to the cloud platform;
Abstract update module, the abstract for updating the modified file.
Preferably, the cloud platform includes:
Abstract memory module, the abstract for storing the file;
Index establishes module, is indexed for establishing the abstract of the file with the corresponding Network Attached Storage;
Collect address module, the public network address for collecting the Network Attached Storage and remote user;
Address sending module will for the public network address of the remote user to be sent to the Network Attached Storage
The public network address of the Network Attached Storage is sent to the remote user.
Preferably, the cloud platform further includes:
Authority management module, access rights and Permission Levels for setting each remote user, and described
Its permission is verified when remote user access.
Preferably, the Permission Levels in the authority management module specifically include:
Without access rights, the remote user can not access the Network Attached Storage, and can not check the text
The abstract of part;
Level-one access rights, the remote user can check the abstract of the file, but it is attached to access the network
Belong to memory;
Second-level access permission, the remote user can check the abstract of the file, and can access the network
Annex storage.
It is an advantage of the invention that:1, Network Attached Storage and cloud platform keep long connection, are not influenced by first line of a couplet network.2、
Network Attached Storage only reporting file is made a summary, without uploading All Files, to ensure privacy of user.3, cloud platform is without preserving
User file reduces the operation cost of cloud platform.4, user can be allowed to be managed collectively more Network Attached Storages.
Description of the drawings
Fig. 1 is a kind of flow chart of embodiment of the method for the present invention;
Fig. 2 is the structure principle chart of present system.
Specific implementation mode
Below in conjunction with the drawings and specific embodiments, the present invention is described in further detail.
Embodiment 1
A kind of network type location mode based on Network Attached Storage, includes the following steps:
Step 1, cloud platform establishes long connection with Network Attached Storage;
Step 2, the cloud platform receives the abstract for the local file that the Network Attached Storage reports;
Step 3, the cloud platform is by the abstract of the local file received and the corresponding network attached storage
Device information indexes;
Step 4, when remote user accesses the local file to the cloud platform, the cloud platform is assisted according to the index
It helps the remote user to establish with the Network Attached Storage where the local file to connect.
It, can be in general, the Network Attached Storage has more, after every Network Attached Storage starts
The cloud platform establishes long connection, and then every Network Attached Storage can will be stored on the abstract of local file
It reports for work the cloud platform, the cloud platform by each document and reports the file after receiving the document
The Network Attached Storage of abstract establishes index, by the Network Attached Storage moment of each document and storage this document
It is corresponding, and when remote user to the cloud platform access needed for file when, file that cloud platform is needed according to remote user and
Index corresponding with this document, quickly and accurately finds target network annex storage, and assists the remote user and be somebody's turn to do
Network Attached Storage establishes connection, so that remote user is able to access that file destination.
Certainly, the Network Attached Storage, can be to each file according to one after receiving the file locally uploaded
Fixed rule does informative abstract, and described information abstract generally comprises filename, file type, file size, creation time, file
Attribute and file message digest algorithm values etc..If the file to being stored in the Network Attached Storage is updated,
It needs to synchronize and informative abstract is updated, and updated document is reported into cloud platform, to ensure that cloud platform indexes
Accuracy.
In addition, Network Attached Storage may be due to safeguarding or other factors and temporary close, and when it is again started up
When, it first or needs to establish long connection with cloud platform, then needs to carry out the synchronizing information with cloud platform, to ensure cloud platform
The validity of index.Described information synchronize method can be:
The Network Attached Storage makes an abstract local All Files again, then reports all documents
To cloud platform, then cloud platform deletes original all abstracts and index corresponding to the Network Attached Storage, and again right
This new document reported makes new index.This method can effectively ensure Network Attached Storage and cloud platform
Synchronizing information, simultaneously because being only to handle the abstract of file, therefore the efficiency of whole process is higher in the process.
Alternatively, local existing document is directly reported to cloud platform, cloud platform by the Network Attached Storage again
The document that this is reported is compared with the document for being stored in cloud platform, and is with the document that this is reported
Standard, delete cloud platform in store fail abstract corresponding with the document that this is reported and respective index.Certainly, the net
Network annex storage may also have the file that the new file that not make an abstract or abstract are lost on startup, then according to make an abstract,
The conventional steps of cloud platform, making index are reported to be handled.
Embodiment 2
In Network Attached Storage described in embodiment 1 when thering is file to update or thering is new file to upload, will update
The abstract of the abstract of file afterwards or new file reports to the cloud platform.
Specifically, when there is new file to be uploaded to Network Attached Storage, the Network Attached Storage is to this document
It makes an abstract, document is then reported into the cloud platform, subsequent cloud platform makes a summary this document and the network attached storage
Device indexes.
If being updated to local existing file, then the Network Attached Storage needs synchronized update this document
Abstract, make an abstract again to this document in other words, updated abstract then reported into cloud platform, and cloud platform is receiving
After making a summary to this document, makes a summary to this document and index with the corresponding Network Attached Storage again, and delete this article
Document and index before part update.And the document and index before this document update are quickly and accurately found,
It can be by the following method:After some file of Network Attached Storage is updated, and synchronize its document it
Before, original document is reported into cloud platform again, while delete operation signal can be carried, when cloud platform receives this
It after document, is compared immediately with the document that it is stored, to find this document abstract and index, and is deletion behaviour
Make.
The step 4 medium cloud platform to assist remote user establishes the specific method connected with Network Attached Storage:
The cloud platform informs the public network address of remote user described in the Network Attached Storage;
The Network Attached Storage initiates a request to remote user's public network address;
The cloud platform notifies the public network address where Network Attached Storage described in the remote user;
Described network attached deposit is accessed by the public network address where the Network Attached Storage in the remote user
Reservoir.
In general, when remote user uploads or download the operation of some file, cloud platform can just assist it
It establishes and connects with corresponding Network Attached Storage.Cloud platform informs that corresponding network is attached by the long interface channel in step 1
Belong to the public network address of the memory remote user, the subsequent Network Attached Storage initiates one to remote user's public network address
Request, at this time cloud platform reinform the public network address where the remote user Network Attached Storage, last remote subscriber passes through
The Network Attached Storage is accessed in public network address where the Network Attached Storage.The above process is efficient, and can protect
Card remote user can accurately establish the connection with target network memory.
Further include before the step 4:The cloud platform verifies the access rights of the remote user,
If the remote user does not have access rights, refuse its access request;
If the remote user has level-one access rights, it is allowed to check document information;
If the remote user has second-level access permission, it is allowed to check document information, and download or on
Transmitting file.
In order to improve the confidentiality to some vital documents, and the orderly and efficient of whole system operation is improved, avoided
Some unnecessary access increase authority classification and Authority Verification step.
Due to having more Network Attached Storages, a remote user that may only have for wherein one in a system
The access rights of platform or several Network Attached Storages then should without having the permission for accessing other Network Attached Storages
Remote user can directly be refused by cloud platform when asking to access other network memories to cloud platform.
And for some vital documents, there may be multiple remote users that there are access rights, but the rank of permission may
Different, some remote users can only check the summary info of file, can not check the interior perhaps to file of file itself
It is operated, such remote user is with the level-one access rights to this document.And the higher remote user of rank then can be with
Check document simultaneously, file content itself and the operations such as uploaded or downloaded to file, such original subscriber be with pair
The second-level access permission of this document.
The present invention also provides a kind of network type compartment system based on Network Attached Storage, including:
Multiple Network Attached Storages for storage file and generate the abstract of file, and by the abstract of the file
Be reported to cloud platform;
Cloud platform, the abstract for storing the file, and by the abstract of the file with it is corresponding described network attached
Memory indexes, and is connected with assisting remote user to be established with the corresponding Network Attached Storage;
Remote user directly accesses the cloud platform, is directly viewable the abstract of the file by the cloud platform, and
The Network Attached Storage is accessed under the assistance of the cloud platform.
As described in the above method, when this system works:Every Network Attached Storage is locally uploaded receiving
After file, informative abstract can be done according to certain rule to each file, described information abstract generally comprises filename, file
Type, file size, creation time, file attribute and file message digest algorithm values etc..If to being stored in the network
The file of annex storage is updated, it is also desirable to be synchronized and is updated to informative abstract, and will be on updated document
Report is to cloud platform, to ensure the accuracy of cloud platform index.
And after every Network Attached Storage starts, can establish length with the cloud platform connects, then every
The Network Attached Storage can be reported to the abstract for being stored in local file the cloud platform, the cloud platform connecing
After receiving the document, by each document and the Network Attached Storage of the document is reported to establish index,
With each document is corresponding with the storage Network Attached Storage moment of this document, and work as remote user to the cloud platform
Needed for accessing when file, the file and index corresponding with this document that cloud platform is needed according to remote user, fast and accurately
Ground finds target network annex storage, and the remote user and the Network Attached Storage is assisted to establish connection, so that
Remote user is able to access that file destination.
Specifically, the Network Attached Storage includes:
File storage module is used for storage file and document;
Summarization generation module, the abstract for generating the file;
Abstract reporting module, for the abstract of the file to be reported to the cloud platform;
Abstract update module, the abstract for updating the modified file.
It is noted that the summarization generation module is to generate the abstract of the file newly uploaded;And the abstract updates mould
Block is then to synchronize update to its original abstract after being updated to stored file.The specific work for update module of making a summary
Making principle can be:It makes an abstract again to updated file, the original abstract of this document is then deleted, then by abstract
New abstract is reported to cloud platform by report module.And in order to coordinate the update of information in cloud platform, it is deleted in Network Attached Storage
Before the original abstract of this document, original abstract is first reported into cloud platform, in order to which cloud platform can be quickly found out
The original abstract of this document and index, consequently facilitating cloud platform carries out subsequent update operation.
The cloud platform includes:
Abstract memory module, the abstract for storing the file;
Index establishes module, is indexed for establishing the abstract of the file with the corresponding Network Attached Storage;
Collect address module, the public network address for collecting the Network Attached Storage and remote user;
Address sending module will for the public network address of the remote user to be sent to the Network Attached Storage
The public network address of the Network Attached Storage is sent to the remote user.
Specifically, cloud platform collects the public network address of remote user and the long-range use by the collection address module
The public network address of the family Network Attached Storage to be accessed, then informs corresponding network attached storage by address sending module
The public network address of the device remote user, the subsequent Network Attached Storage initiate a request to remote user's public network address,
Cloud platform reinforms the public network address where the remote user Network Attached Storage at this time, and last remote subscriber passes through the network
The Network Attached Storage is accessed in public network address where annex storage.
The cloud platform further includes:
Authority management module, access rights and Permission Levels for setting each remote user, and described
Its permission is verified when remote user access.
Permission Levels in the authority management module specifically include:
Without access rights, the remote user can not access the Network Attached Storage, and can not check the text
The abstract of part;
Level-one access rights, the remote user can check the abstract of the file, but it is attached to access the network
Belong to memory;
Second-level access permission, the remote user can check the abstract of the file, and can access the network
Annex storage.
In order to improve the confidentiality to some vital documents, and the orderly and efficient of whole system operation is improved, avoided
Some unnecessary access increase authority management module, to carry out differentiated control to the permission of different user.
Due to having more Network Attached Storages, a remote user that may only have for wherein one in a system
The access rights of platform or several Network Attached Storages then should without having the permission for accessing other Network Attached Storages
Remote user to cloud platform ask access other network memories when, can directly be refused by cloud platform, such user be for
The file is without access rights.
And for some vital documents, there may be multiple remote users that there are access rights, but the rank of permission may
Different, some remote users can only check the summary info of file, can not check the interior perhaps to file of file itself
It is operated, such remote user is with the level-one access rights to this document.And the higher remote user of rank then can be with
Check document simultaneously, file content itself and the operations such as uploaded or downloaded to file, such original subscriber be with pair
The second-level access permission of this document.
Specific embodiment described herein is only an example for the spirit of the invention.Technology belonging to the present invention is led
The technical staff in domain can make various modifications or additions to the described embodiments or replace by a similar method
In generation, however, it does not deviate from the spirit of the invention or beyond the scope of the appended claims.