Summary of the invention
The main technical problem to be solved in the present invention is, provides a kind of file to prevent the download process method and system, can prevent that file from arbitrarily being downloaded.
For solving the problems of the technologies described above, the invention provides the anti-download process method of a kind of file, comprising:
Server end:
File destination or target directory are set to anti-file or the catalogue of downloading;
After the request of receiving the described file destination of access or target directory, the file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file;
Client:
Send the request of the file in access file or the catalogue;
The information that the reception server end returns according to described request;
Judge whether comprise in the described information that with described file or directory markeys be the label information of anti-download file;
If comprise described label information, the significant data of the file in described file or the catalogue is prevented download process.
The invention allows for:
A kind of file is prevented downloading processing system, comprising: server end and client;
Server end comprises:
Setting device is used for file destination or target directory and is set to anti-file or the catalogue of downloading;
Labelling apparatus is used for after the request of receiving the described file destination of access or target directory, and the file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file;
Client comprises:
Request unit is for the request of the file that sends access file or catalogue;
Receiving system is used for the information that the reception server end returns according to described request;
Judgment means is used for judging whether described information comprises that with described file or directory markeys be the label information of anti-download file;
Anti-download apparatus is used for comprising described label information when the judgment means judgement, and the significant data of the file in described file or the catalogue is prevented download process.
In addition, the present invention also provides a kind of file of server end anti-download process method, it is characterized in that, comprising:
File destination or target directory are set to anti-file or the catalogue of downloading;
After the request of receiving the described file destination of access or target directory, the file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file.
A kind of file of client is prevented the download process method, it is characterized in that, comprising:
Send the request of the file in access file or the catalogue;
The information that the reception server end returns according to described request;
Judge whether comprise in the described information that with described file or directory markeys be the label information of anti-download file;
If comprise described label information, the significant data of the file in described file or the catalogue is prevented download process.
A kind of server is characterized in that, comprising:
Setting device is used for file destination or target directory and is set to anti-file or the catalogue of downloading;
Labelling apparatus is used for after the request of receiving the described file destination of access or target directory, and the file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file.
A kind of client is characterized in that, comprising:
Request unit is for the request of the file that sends access file or catalogue;
Receiving system is used for the information that the reception server end returns according to described request;
Judgment means is used for judging whether described information comprises that with described file or directory markeys be the label information of anti-download file;
Anti-download apparatus is used for comprising described label information when the judgment means judgement, and the significant data of the file in described file or the catalogue is prevented download process.
The invention has the beneficial effects as follows: the anti-download process method and system of the file that the present invention proposes, can realize the anti-download of file by simple change, prevented that effectively file from arbitrarily being downloaded.
Embodiment
By reference to the accompanying drawings the present invention is described in further detail below by embodiment.
In embodiments of the present invention, in order to prevent that file is downloaded, server end can prevent that to needs file or the catalogue downloaded from arranging anti-the download in advance, during file in receiving these files of client-access or catalogue, server end judges whether the file of request has set anti-download, allows normal the download if do not arrange then return normal link; If be provided with anti-the download for the file of asking, then server increases file in described file or the catalogue for preventing the label information of download file in the information of returning.After client is sent the request of the file in access file or the catalogue, whether judgement comprises that in the information that server returns with described file or directory markeys be the label information of anti-download file, if comprise described label information, then the significant data of the file in described file or the catalogue is prevented download process.
More than the embodiment of the invention has been done the description of a summary, below in conjunction with description of drawings each specific embodiment of the present invention.
As shown in Figure 1, the schematic flow sheet for an embodiment of the anti-download process method of the file of a kind of server end of the present invention comprises:
101, anti-download file or catalogue are set;
Particularly, file destination or target directory are set to anti-file or the catalogue of downloading;
103, receive access request after, increase the label information of anti-download file;
Particularly, after the request of receiving the described file destination of access or target directory, the file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file;
Further, the method that specifically increases label information can be:
A, will be behind the chained address of the file in described file destination or the target directory in the information of returning increase the anti-tag field of downloading; For example can Zeng Jia ﹠amp; The save=false field represents that this file has been set up anti-download, also can increase other and be used for the field of mark;
B, extra increase is used for specially tab file and is the part of anti-download file in the information of returning, and for example can additionally increase block of information, particular content Ke Wei ﹠amp; Save=0 represents that this file has been set up anti-download.
Be exemplary illustration only below, the anti-form of downloading label information be set be not limited to this that as long as server end and client are made an appointment, client can identify anti-Download Info and get final product.
After server end has carried out above-mentioned processing, after client is sent download request, can carry out to the file that has passed through above-mentioned setting certain processing and be downloaded preventing, as described below:
As shown in Figure 2, the schematic flow sheet for an embodiment of the anti-download process method of the file of a kind of client of the present invention comprises:
201, send the request of access file;
Particularly, send the request of the file in access file or the catalogue;
203, receive the information of returning;
Particularly, the information returned according to described request of reception server end;
205, judge whether to comprise label information;
Particularly, judge whether comprise in the described information that with described file or directory markeys be the label information of anti-download file;
207, anti-download process;
Particularly, if judgement comprises described label information in 205, the significant data of the file in described file or the catalogue is prevented download process;
Generally, affecting the normal significant data that uses of file is the first blocks of data, and the large I of the first blocks of data is set according to file actual size and actual needs, and for example for the file of a 100M, the first blocks of data can be 256K; Can be not limited to above-mentioned concrete form in the reality, just describe for example herein;
Below describe as the first blocks of data as example take significant data, concrete anti-download process method can be:
A, the first blocks of data of the file in described file or the catalogue is stored in the internal memory;
Because data are stored in the internal memory, can be with the data deletion, so the file of so downloading can not use owing to lack vital document after client is restarted;
B, the first blocks of data of the file in described file or the catalogue is stored in the catalogue different from other data;
The method does not cause file not use in same catalogue owing to the first blocks of data and other data;
C, the first blocks of data of the file in described file or the catalogue is encrypted;
The method can't be accessed and causes file not use owing to the first blocks of data;
D, the first blocks of data of the file in described file or the catalogue is cut into fritter.
The method causes file not use owing to the first blocks of data can't use.
The invention allows for the anti-download process method of a kind of file, be illustrated in figure 3 as the schematic flow sheet of an embodiment of the anti-download process method of a kind of file of the present invention, comprising:
The processing of server end:
301, file destination or target directory are set to anti-file or the catalogue of downloading;
303, after the request of receiving the described file destination of access or target directory, the file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file;
The processing of client:
305, send the request of the file in access file or the catalogue;
307, the information returned according to described request of reception server end;
309, judge whether comprise in the described information that with described file or directory markeys be the label information of anti-download file;
If 311 comprise described label information, the significant data of the file in described file or the catalogue is prevented download process.
Preferably,
File in described file destination or the target directory is media file;
File in described file or the catalogue is media file;
Described significant data is the first blocks of data of media file;
The method that the described file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file comprises:
In the information of returning, the anti-tag field of downloading will be increased behind the chained address of the file in described file destination or the target directory;
Described significant data to the file in file or the catalogue prevents that the method for download process comprises:
The significant data of the file in described file or the catalogue is stored in the internal memory;
Or,
The significant data of the file in described file or the catalogue is encrypted;
Or,
The significant data of the file in described file or the catalogue is cut into fritter;
Or,
The significant data of the file in described file or the catalogue is stored in the position different from other data.
Explanation by above-mentioned embodiment to the anti-download process method of each file of the present invention can find out, the anti-download process method of the file that the present invention proposes can realize by simple change that file is anti-and download, prevent that effectively file from arbitrarily being downloaded.
More than the anti-download process method of file that the embodiment of the invention is proposed be illustrated the anti-download system of file that proposes below in conjunction with the description of drawings embodiment of the invention.
As shown in Figure 4, the module diagram for an embodiment of a kind of server of the present invention comprises:
401, setting device is used for file destination or target directory and is set to anti-file or the catalogue of downloading;
403, labelling apparatus is used for after the request of receiving the described file destination of access or target directory, and the file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file.
As shown in Figure 5, the module diagram for an embodiment of a kind of client of the present invention comprises:
501, request unit is for the request of the file that sends access file or catalogue;
503, receiving system is used for the information that the reception server end returns according to described request;
505, judgment means is used for judging whether described information comprises that with described file or directory markeys be the label information of anti-download file;
507, anti-download apparatus is used for comprising described label information when the judgment means judgement, and the significant data of the file in described file or the catalogue is prevented download process.
As shown in Figure 6, the module diagram for an embodiment of the anti-downloading processing system of a kind of file of the present invention comprises:
600A, server end:
601, setting device is used for file destination or target directory and is set to anti-file or the catalogue of downloading;
603, labelling apparatus is used for after the request of receiving the described file destination of access or target directory, and the file that increases in the information of returning in described file destination or the target directory is the label information of anti-download file;
600B, client:
605, request unit is for the request of the file that sends access file or catalogue;
607, receiving system is used for the information that the reception server end returns according to described request;
609, judgment means is used for judging whether described information comprises that with described file or directory markeys be the label information of anti-download file;
611, anti-download apparatus is used for comprising described label information when the judgment means judgement, and the significant data of the file in described file or the catalogue is prevented download process.
Explanation by above-mentioned embodiment to the anti-download process device of each file of the present invention or system can be found out, the anti-download process device of the file that the present invention proposes or system can realize the anti-download of file by simple change, have prevented that effectively file from arbitrarily being downloaded.
Above content is the further description of the present invention being done in conjunction with concrete execution mode, can not assert that implementation of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can also make some simple deduction or replace, all should be considered as belonging to protection scope of the present invention.