CN101076031B - Method for applying network hard disk - Google Patents

Method for applying network hard disk Download PDF

Info

Publication number
CN101076031B
CN101076031B CN2006101622233A CN200610162223A CN101076031B CN 101076031 B CN101076031 B CN 101076031B CN 2006101622233 A CN2006101622233 A CN 2006101622233A CN 200610162223 A CN200610162223 A CN 200610162223A CN 101076031 B CN101076031 B CN 101076031B
Authority
CN
China
Prior art keywords
network hard
hard disc
file
catalogue
server
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN2006101622233A
Other languages
Chinese (zh)
Other versions
CN101076031A (en
Inventor
刘致远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN2006101622233A priority Critical patent/CN101076031B/en
Publication of CN101076031A publication Critical patent/CN101076031A/en
Application granted granted Critical
Publication of CN101076031B publication Critical patent/CN101076031B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The method comprises: when needing to save the file into the network hard drive; the client side of the network hard drive compresses said file, and during the compression, transmits the compressed part of file to the network hard drive server to save by using a write-in command; when needing to read out the file, the network hard drive server firstly sends the file to the network hard drive client side; the network hard drive decompresses the file. By the invention, the files saved in the network hard drive server are compressed files so as to save the storage space of the network hard drive and improve the transmission efficiency.

Description

A kind of method of applying network hard disk
Technical field
The present invention relates to Network storage technology, particularly relate to a kind of method of applying network hard disk.
Background technology
Along with computer technology popularizing in social life, the user possibly or handle common transaction in different place office, study, and hope can be obtained prior files stored at any time.
Traditional hard disk is owing to be fixed in the computer; Obviously be difficult to satisfy this user's request; Though and memories such as portable hard drive commonly used at present, USB flash disk can get off the file storage in the computer; And use on an other computer through the mode of plug and play, can meet user's mobile office, study or handle the characteristics of common transaction.But; This not only needs all computers to possess the hardware supports of data importing and derivation, such as USB (USB) data-interface, also needs the user to carry portable hard drive or USB flash disk; There is the unsafe hidden danger of user data, and uses inconvenient shortcoming.
In order to satisfy user security better, to store the demand of data easily, at present, network hard disc has been transported Ying Ersheng.
For the user, use the method for network hard disc and common hard disk basic identical, its difference is that file directly is not stored in the hard disk of client, but be stored in server that client links to each other in.Like this, the user just can any one with computer that server links to each other in, obtain prior files stored through the mode of access server, and needn't carry portable hard drive or USB flash disk, reach the purpose of safety, convenient storage.
But in existing network hard disc technology, the file at user data place is that the size according to original document directly is stored in the server, has taken a large amount of server stores spaces.If use the user of network hard disc many; Enough memory spaces are provided not only can not for each user, and in the process of client and server interaction, also can take a large amount of Internet resources; Reduce the efficient of transfer files, do not utilize the professional popularization of network hard disc.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method of applying network hard disk, can practice thrift the memory space of network hard disc, reduces interactive data quantity between the client and server, conserve network resources.
In order to achieve the above object, the technical scheme of the present invention's proposition is:
A kind of method of applying network hard disk, when needs with file storage during at network hard disc, this method is:
The network hard disc client is earlier compressed said file, and in the process of compression, through write file instruction compressed portion be transferred to the network hard disc server for saving.
In the such scheme, create the compression catalogue at the network hard disc server in advance, said compression catalogue is used to preserve the file through overcompression, and said network hard disc server is kept at file in the compression catalogue.
In the such scheme, said network hard disc server also comprises non-compression catalogue, and said non-compression catalogue is used to preserve the file without overcompression, and before the then said network hard disc client compressed file, this method further comprises:
A1, network hard disc client are obtained the routing information by user's appointment, and said routing information comprises the catalogue that will preserve file;
A2, network hard disc client judge according to said routing information whether the catalogue that will preserve file is the compression catalogue again, if the compression catalogue then continues to carry out; If be non-compression catalogue, then directly said file is transferred to the network hard disc server through writing file instruction, by the network hard disc server for saving in non-compression catalogue.
In the such scheme, further comprise after the said step a2:
A3, network hard disc server return success the message of preservation to the network hard disc client.
According to claim 3 or 4 described methods, it is characterized in that 5, during file in reading the network hard disc server, this method further comprises:
B1, network hard disc client are obtained the routing information by user's appointment, and said routing information comprises the catalogue at the file place that will read, and the file instruction that reads that will carry routing information again sends to the network hard disc server;
B2, network hard disc server obtain file according to said routing information, and return to the network hard disc client;
B3, network hard disc client judge according to routing information whether file place catalogue is the compression catalogue, if the compression catalogue is then carried out decompress(ion) with said file; If be non-compression catalogue, then do not deal with.
In the such scheme, after the said step b3, this method further comprises:
B4, network hard disc server return to the network hard disc client with the message that successfully reads.
In the such scheme, when needs when the network hard disc server creaties directory, this method further comprises:
The instruction that creaties directory that the network hard disc client will carry directory attribute is transferred to the network hard disc server, and said directory attribute is used to identify catalogue and is compression catalogue or non-compression catalogue; The network hard disc server is created compression catalogue or non-compression catalogue according to directory attribute.
In the such scheme, after the network hard disc server creatied directory, this method further comprised:
The network hard disc server returns to the network hard disc client with the message that successfully creaties directory.
In the such scheme, when the file in the needs deletion network hard disc, this method further comprises:
The deleted file instruction that the network hard disc client will carry routing information sends to the network hard disc server, and the network hard disc server obtains and deleted file according to routing information.
In the such scheme, after network hard disc server deleted file, this method further comprises:
The network hard disc server returns to the network hard disc client with successful message of deleting.
In sum, the present invention proposes a kind of method of applying network hard disk, and the network hard disc client is earlier compressed said file, and in the process of compression, through write file instruction compressed portion be transferred to the network hard disc server for saving.Correspondingly, when reading file, the network hard disc server is given the network hard disc client with file transfer earlier, by network hard disc client decompress(ion).Like this, because the network hard disc server for saving is the file through overcompression, can improve the capacity of network hard disc server significantly, conserve storage.In addition, because transmission can conserve network resources through the file of overcompression between network hard disc client and the network hard disc server, improve efficiency of transmission.
Description of drawings
Fig. 1 is the present invention program's a flow chart;
Fig. 2 is the flow chart that creaties directory in the embodiment of the invention;
Fig. 3 is a flow chart of preserving file in the embodiment of the invention;
Fig. 4 is the flow chart that reads file in the embodiment of the invention;
Fig. 5 is the flow chart of deleted file in the embodiment of the invention.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, will combine accompanying drawing and specific embodiment that the present invention is done to describe in detail further below.
Basic thought of the present invention is: earlier file is compressed, be kept in the network hard disc server again, improve the capacity of network hard disc server with this, and reduce interactive data quantity between network hard disc server and the network hard disc client.
Fig. 1 is the present invention program's a flow chart.As shown in Figure 1, when needs during at network hard disc, the present invention includes following steps with file storage:
Step 101: the network hard disc client is compressed said file.
Step 102: in the process of compression, the network hard disc client is through writing file instruction, and compressed portion is transferred to the network hard disc server for saving.
In order to distinguish file better through overcompression, still without overcompression, the network hard disc server can be created the compression catalogue in advance, and compression catalogue described here is specifically designed to the file of preservation through overcompression.
For the present existing network hard disc method for using of compatibility, can in the network hard disc server, set up non-compression catalogue, be specifically designed to the file of preservation without overcompression.
That is to say that if existing compression catalogue in the network hard disc server has non-compression catalogue again, the routing information of preserving file is promptly specified in the position that just needs user's specified file to preserve, said routing information comprises the catalogue that will preserve file.
At this moment, before the said step 101, this method need further comprise:
A1, network hard disc client are obtained the routing information by user's appointment, and said routing information comprises the catalogue that will preserve file;
A2, network hard disc client judge according to said routing information whether the catalogue that will preserve file is the compression catalogue again, if the compression catalogue then continues to carry out; If be non-compression catalogue, then directly said file is transferred to the network hard disc server through writing file instruction, by the network hard disc server for saving in non-compression catalogue.
The present invention program be described in detail below with embodiment in order better to explain.
In the present embodiment, with before file storage is in server, compression catalogue and non-compression catalogue in the network hard disc server, have been created in the network hard disc client.
Fig. 2 has shown the flow chart that present embodiment network hard disc client creaties directory.As shown in Figure 2, the method that creaties directory may further comprise the steps:
Step 201: the instruction that creaties directory that the network hard disc client will carry directory attribute is transferred to the network hard disc server, and said directory attribute is used to identify catalogue and is compression catalogue or non-compression catalogue.
Directory attribute can represent with a bit, such as: 1 expression compression catalogue, the non-compression catalogue of 0 expression.Certainly, can also represent directory attribute, as long as the network hard disc server can be discerned with other modes.
The said instruction that creaties directory also need comprise routing information and directory name usually, and the network hard disc server will create directory under the path of appointment according to the instruction that creaties directory, and the directory name of creating be set to instruct in the directory name of appointment.Createing directory according to routing information and directory name as for how belongs to prior art, repeats no more here.
Step 202: the network hard disc server is differentiated directory attribute, if compression catalogue sign, then execution in step 203; If be non-compression catalogue sign, then execution in step 204.
Step 203: the network hard disc server is created the compression catalogue, and withdraws from this flow process.
Step 204: the network hard disc server is created non-compression catalogue, and withdraws from this flow process.
The method that creaties directory in step 203 described here and the step 204 is not essentially different, and its difference only is that needing the new catalogue of creating of record is that the compression catalogue also is non-compression catalogue.Certainly, distinguish can be used different icons or color Display directory for ease.
No matter be that establishment compression catalogue also is non-compression catalogue, after creating completion, the network hard disc server can also return success the message that creaties directory to the network hard disc client, and the network hard disc client is shown to the user with the information that successfully creaties directory again
Fig. 3 is that the network hard disc client is kept at the flow chart in the server with file in the present embodiment.As shown in Figure 3, the method for preserving file may further comprise the steps:
Step 301: the network hard disc client is obtained the routing information by user's appointment, and said routing information comprises the catalogue that will preserve file.
In the present embodiment,, need file be kept under that catalogue, can confirm voluntarily by the user, promptly by user's specified path information owing to have compression catalogue and non-compression catalogue in the network hard disc server.The method of user's specified path information can have a lot; Such as directly specifying with order line; Perhaps in the graphic interface of network hard disc client display server bibliographic structure, click needs to preserve the file of file, just can confirm routing information from root to the file of clicking so.
Step 302: the network hard disc client judges according to said routing information whether the catalogue that will preserve file is the compression catalogue, if the compression catalogue, then execution in step 303 again; Otherwise, execution in step 305.
Because the network hard disc client can be preserved bibliographic structure in the network hard disc server in advance; Also preserve the directory attribute of each catalogue naturally; So; When confirming the catalogue that needs are preserved according to routing information, just can be easy to confirm the directory attribute of this catalogue, promptly compress catalogue or non-compression catalogue.
Step 303: the file that the network hard disc client will be preserved compresses, in the process of compression, through write file instruction will be compressed portion be transferred to the network hard disc server.
The present invention adopts the transmission manner while compressing, such as: the file that will compress is divided into n part, earlier first part is compressed; To after having compressed immediately, compressed portion is transferred to the network hard disc server; Simultaneously second part is compressed, the rest may be inferred, up to complete file of compression.
In the practical application, the network hard disc client can adopt a lot of compression methods that file is compressed, such as ZIP compression method etc.
In addition, this step said write file instruction also need comprise information such as routing information, filename usually.
Step 304: the network hard disc server is kept at file in the compression catalogue, and said compression catalogue is the catalogue described in the routing information.
In order to narrate conveniently, the catalogue in the present embodiment all is the catalogue under the network hard disc server root directory, and in the practical application, the user can also specify some subdirectories for preserving the catalogue of file, and its method is identical with prior art, repeats no more here.
But it should be noted that if comprise multistage catalogue in the routing information if highest catalogue is the compression catalogue, then all subdirectories all should be the compression catalogue; If highest catalogue is non-compression catalogue, then all subdirectories all should be non-compression catalogue.And the network hard disc server should be kept at file in the catalogue of minimum one-level.
Step 305: the network hard disc client is directly given the network hard disc server with file transfer through writing file instruction.
Step 306: the network hard disc server is kept at file in the non-compression catalogue, and said non-compression catalogue is the catalogue described in the routing information.
Said step 305 and step 306 are to need not File Compress, the method can with existing network hard disc technical compatibility.
In addition, preserve after the file, the network hard disc server can also return success the message of preservation to the network hard disc client, and the network hard disc client can be shown to the user with the information that success is preserved.
Fig. 4 is the flow chart that the network hard disc client reads the server file in the present embodiment.As shown in Figure 4, the method that reads file may further comprise the steps:
Step 401: the network hard disc client is obtained the routing information by user's appointment, and said routing information comprises the catalogue at the file place that will read.
Identical during with the preservation file, to read the file under that catalogue here, also can confirm voluntarily, promptly by user's specified path information by the user.The method of user's specified path information also can have employing directly to specify with order line; Perhaps in the graphic interface of network hard disc client display server bibliographic structure; The file that click need be read just can be confirmed routing information from root to the file of clicking so.
Step 402: the file instruction that reads that the network hard disc client will carry routing information sends to the network hard disc server.
Step 403: the network hard disc server obtains file according to said routing information, and returns to the network hard disc client.
Step 404: the network hard disc client judges according to routing information whether file place catalogue is the compression catalogue, if the compression catalogue, then execution in step 405; If be non-compression catalogue, then do not deal with.
Step 405: the network hard disc client will be carried out decompress(ion) from the file that the network hard disc server returns.
This step, network hard disc client are in the process that receives file, and the file edge joint that receives is received the limit decompress(ion).Such as: file is divided into n part, earlier first part of receiving is carried out decompress(ion), receive second part simultaneously, carry out decompress(ion) to second part again, and the rest may be inferred.
Afterwards, the network hard disc server can also return to the network hard disc client with the message that successfully reads, and the network hard disc client is shown to the user with the information that successfully reads.
Fig. 5 is the flow chart of network hard disc client deletion network hard disc file in the present embodiment.As shown in Figure 5, the method for deleted file may further comprise the steps:
Step 501: the deleted file instruction that the network hard disc client will carry routing information sends to the network hard disc server.
Identical when preserving file or reading file, to delete the file under which catalogue here, also can confirm voluntarily by the user, promptly, repeat no more by user's specified path information here.
Step 502: the network hard disc server obtains and deleted file according to routing information.
Afterwards, the network hard disc server can return to the network hard disc client with the message that success is deleted, and the network hard disc client is shown to the user again.
In fact, no matter the catalogue at file place is that the compression catalogue also is non-compression catalogue, the method for deleted file is identical with prior art, i.e. the present invention can compatible prior art.
Use the present embodiment scheme, can in the network hard disc server, create compression catalogue and non-compression catalogue, if the user selects file is saved in when compressing in the catalogue, the network hard disc client need be transmitted file through overcompression again; Correspondingly, if the file that the user selects to read is the file in the compression catalogue, then the network hard disc server is transferred to the network hard disc client with this document earlier, by network hard disc client decompress(ion).Like this, be file because the network hard disc server preserves in the catalogue in compression through overcompression, can improve the capacity of network hard disc server significantly, conserve storage.Simultaneously, because the flanging transmission manner is separated on transmission while compress and limit that the present invention adopts, can save compressed and total time of transmission, improve the efficient of compressing and transmitting.In addition, because transmission can conserve network resources through the file of overcompression between network hard disc client and the network hard disc server, improve efficiency of transmission.
In sum, more than being merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. the method for an applying network hard disk; It is characterized in that; Create compression catalogue and non-compression catalogue at the network hard disc server in advance, said compression catalogue is used to preserve the file through overcompression, and said non-compression catalogue is used to preserve the file without overcompression; When needs with file storage during at network hard disc, this method is:
A1, network hard disc client are obtained the routing information by user's appointment, and said routing information comprises the catalogue that will preserve file;
A2, network hard disc client judge according to said routing information whether the catalogue that will preserve file is the compression catalogue; If compression catalogue; The network hard disc client is divided into n part with said file and it is compressed; In the process of compression, through write file instruction will be compressed portion be transferred to the network hard disc server for saving, by the network hard disc server for saving in the compression catalogue; If be non-compression catalogue, then directly give the network hard disc server with said file transfer, by the network hard disc server for saving in non-compression catalogue.
2. method according to claim 1 is characterized in that, further comprises after the said step a2:
A3, network hard disc server return success the message of preservation to the network hard disc client.
3. method according to claim 1 and 2 is characterized in that, during file in reading the network hard disc server, this method further comprises:
B1, network hard disc client are obtained the routing information by user's appointment, and said routing information comprises the catalogue at the file place that will read, and the file instruction that reads that will carry routing information again sends to the network hard disc server;
B2, network hard disc server obtain file according to said routing information, and return to the network hard disc client;
B3, network hard disc client judge according to routing information whether file place catalogue is the compression catalogue, if the compression catalogue is then carried out decompress(ion) with said file; If be non-compression catalogue, then do not deal with.
4. method according to claim 3 is characterized in that, after the said step b3, this method further comprises:
B4, network hard disc server return to the network hard disc client with the message that successfully reads.
5. method according to claim 1 is characterized in that, when needs when the network hard disc server creaties directory, this method further comprises:
The instruction that creaties directory that the network hard disc client will carry directory attribute is transferred to the network hard disc server, and said directory attribute is used to identify catalogue and is compression catalogue or non-compression catalogue; The network hard disc server is created compression catalogue or non-compression catalogue according to directory attribute.
6. method according to claim 5 is characterized in that, after the network hard disc server creatied directory, this method further comprised:
The network hard disc server returns to the network hard disc client with the message that successfully creaties directory.
7. method according to claim 1 is characterized in that, when the file in the needs deletion network hard disc, this method further comprises:
The deleted file instruction that the network hard disc client will carry routing information sends to the network hard disc server, and the network hard disc server obtains and deleted file according to routing information.
8. method according to claim 7 is characterized in that, after network hard disc server deleted file, this method further comprises:
The network hard disc server returns to the network hard disc client with successful message of deleting.
CN2006101622233A 2006-12-06 2006-12-06 Method for applying network hard disk Active CN101076031B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006101622233A CN101076031B (en) 2006-12-06 2006-12-06 Method for applying network hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006101622233A CN101076031B (en) 2006-12-06 2006-12-06 Method for applying network hard disk

Publications (2)

Publication Number Publication Date
CN101076031A CN101076031A (en) 2007-11-21
CN101076031B true CN101076031B (en) 2012-05-23

Family

ID=38976849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006101622233A Active CN101076031B (en) 2006-12-06 2006-12-06 Method for applying network hard disk

Country Status (1)

Country Link
CN (1) CN101076031B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867559B (en) * 2009-04-20 2013-06-19 王金波 Method for compressing file in instant communication and network storage system
CN102148859A (en) * 2011-01-20 2011-08-10 南京烽火星空通信发展有限公司 Network file service method
US8423585B2 (en) * 2011-03-14 2013-04-16 Amazon Technologies, Inc. Variants of files in a file system
CN104038526B (en) * 2013-03-08 2018-10-12 联想(北京)有限公司 Data access method and system
CN107105058A (en) * 2017-05-24 2017-08-29 努比亚技术有限公司 Folder transmission method and mobile terminal
CN111209044B (en) * 2018-11-21 2022-11-25 展讯通信(上海)有限公司 Instruction compression method and device
CN112860323A (en) * 2019-11-27 2021-05-28 珠海格力电器股份有限公司 Method and device for loading file into memory
CN111414339B (en) * 2020-03-13 2023-04-25 浙江大华技术股份有限公司 File processing method, system, device, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1633086A (en) * 2005-01-26 2005-06-29 北京大学 Online backup method based on data block redundancy and virtualized storage

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1633086A (en) * 2005-01-26 2005-06-29 北京大学 Online backup method based on data block redundancy and virtualized storage

Also Published As

Publication number Publication date
CN101076031A (en) 2007-11-21

Similar Documents

Publication Publication Date Title
CN101076031B (en) Method for applying network hard disk
CN103731483A (en) Virtual file system based on cloud computing
US7836105B2 (en) Converting file-systems that organize and store data for computing systems
KR101190426B1 (en) Synchronizati0n methods and systems
WO2012170235A2 (en) Storage architecture for backup application
US20090019223A1 (en) Method and systems for providing remote strage via a removable memory device
CN101917396A (en) Real-time repetition removal and transmission method for data in network file system
CN102272751B (en) Data integrity in a database environment through background synchronization
US8620957B1 (en) Storing and accessing data using a shell interface
CN102821140A (en) Information sharing method and information sharing terminal
CN102821111A (en) Real-time synchronizing method for file cloud storage
CN103049491A (en) Method and device for managing picture file
CN102238223B (en) Networked personal data management method for mobile device
CN102682013A (en) Method for operating compressed file in network storage appliance
CN104765849A (en) Method and system for acquiring copied data source information
CN110989937A (en) Data storage method, device and equipment and computer readable storage medium
CN102377688B (en) File transmission method and equipment
JP4716136B2 (en) E-mail storage method, e-mail reproduction method, e-mail system, and e-mail storage / reproduction program
US8255367B2 (en) File management apparatus, method, and program
CN105701179A (en) Windows access method of distributed file system based on UniWhale
CN105677579A (en) Data access method and system in cache system
US6714950B1 (en) Methods for reproducing and recreating original data
US7602979B2 (en) Information processing method and apparatus
CN103714089A (en) Method and system of rolling back cloud database
CN106126555B (en) A kind of file management method and file system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190807

Address after: 518057 Nanshan District science and technology zone, Guangdong, Zhejiang Province, science and technology in the Tencent Building on the 1st floor of the 35 layer

Co-patentee after: Tencent cloud computing (Beijing) limited liability company

Patentee after: Tencent Technology (Shenzhen) Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518044 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.