CN102222094A - Equipment and method for eliminating resource files based on resource utilization rate - Google Patents

Equipment and method for eliminating resource files based on resource utilization rate Download PDF

Info

Publication number
CN102222094A
CN102222094A CN2011101526326A CN201110152632A CN102222094A CN 102222094 A CN102222094 A CN 102222094A CN 2011101526326 A CN2011101526326 A CN 2011101526326A CN 201110152632 A CN201110152632 A CN 201110152632A CN 102222094 A CN102222094 A CN 102222094A
Authority
CN
China
Prior art keywords
resource file
resource
file
storage space
node device
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.)
Granted
Application number
CN2011101526326A
Other languages
Chinese (zh)
Other versions
CN102222094B (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.)
Shanghai Synacast Media Technology Co Ltd
Original Assignee
Shanghai Synacast Media Technology 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 Shanghai Synacast Media Technology Co Ltd filed Critical Shanghai Synacast Media Technology Co Ltd
Priority to CN201110152632.6A priority Critical patent/CN102222094B/en
Publication of CN102222094A publication Critical patent/CN102222094A/en
Application granted granted Critical
Publication of CN102222094B publication Critical patent/CN102222094B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides node equipment for eliminating resource files based on a resource utilization rate and a method thereof. The method comprises the following steps: acquiring the resource files in a first storage space of the node equipment; according to the resource files, acquiring the resource utilization rate corresponding to the resource files; according to the resource utilization rate, selecting a target resource file to be processed from the resource files; and deleting the target resource file. Compared with the prior art, in the invention, by acquiring the resource utilization rate corresponding to the resource files, the target resource file to be processed in the node equipment is selected based on the acquired resource utilization rate and then is deleted, and further a storage area corresponding to the target resource file is released so as to optimize the storage space of the equipment.

Description

A kind of equipment and method that is used for eliminating resource file based on resource utilization
Technical field
The present invention relates to the network flow-medium technical field, relate in particular to the equipment and the method that are used for eliminating resource file based on resource utilization.
Background technology
Along with the development of network flow-medium technology, Video service has also obtained developing rapidly, and has become the profit growth point that a lot of Internet Service Providers give prominence to gradually as one of main application of network value added business.Than traditional C/S (Client/Server) pattern, peer-to-peer network technology (such as P2P network, P2SP network) has proposed a kind of new technical solution, in this peer-to-peer network, each node is both as client other node data download from network, upload data as server end other node in network again, the mode of this multinode parallel transmission data makes the network bandwidth obtain effective utilization, thereby more and more is subjected to the network user's favor based on the Video service of peer-to-peer network.
With the P2P network is example, and the arbitrary node device in the network all provides certain memory capacity, to store a plurality of resource files.When the user at other node places needed a certain resource, the one or more nodes that have this resource in the network just sent to the demand user with this resource.Yet the storage space in the node device is relatively limited, and under the situation of constantly adding new resources, the disk that will certainly face between multiple resource is eliminated problem, but not corresponding superseded machine-processed reasonably to keep or the deletion resource file in the prior art.
In view of this, how to design a kind of method of eliminating resource file based on resource utilization, with the relatively low resource file of deletion resource utilization, thereby the storage space of release and the corresponding storage area optimizing equipment of described resource file is the problem that those skilled in the art need solve.
Summary of the invention
The purpose of this invention is to provide a kind of Apparatus for () and method therefor of eliminating resource file based on resource utilization.
According to an aspect of the present invention, provide a kind of method that is used for eliminating based on resource utilization resource file in the node device of peer-to-peer network, wherein, this method may further comprise the steps:
A obtains the resource file in first storage space of described node device;
B obtains and the corresponding resource utilization of described resource file according to described resource file;
C selects pending target resource file according to described resource utilization from described resource file;
D carries out deletion action to described target resource file, to discharge in described first storage space and the corresponding storage area of described target resource file.
According to another aspect of the present invention, also provide a kind of node device that is used for eliminating based on resource utilization resource file in peer-to-peer network, wherein, described node device comprises:
First deriving means is used for obtaining the resource file of first storage space of described node device;
Second deriving means is used for according to described resource file, obtains and the corresponding resource utilization of described resource file;
Selecting arrangement is used for according to described resource utilization, selects pending target resource file from described resource file;
Actuating unit is used for described target resource file is carried out deletion action, to discharge in described first storage space and the corresponding storage area of described target resource file.
Compared with prior art, the present invention is by obtaining the resource utilization corresponding to resource file, and select target resource file pending in the node device based on the resource utilization of being obtained, thereby described target resource file is carried out deletion action, thereby the storage space of release and the corresponding storage area optimizing equipment of described target resource file.
Description of drawings
By reading the detailed description of doing with reference to the following drawings that non-limiting example is done, it is more obvious that other features, objects and advantages of the present invention will become:
Fig. 1 illustrates the node device synoptic diagram that is used for eliminating based on resource utilization resource file according to one aspect of the present invention in peer-to-peer network;
Fig. 2 illustrates the node device synoptic diagram that is used for eliminating based on resource utilization resource file according to a preferred embodiment of the present invention in peer-to-peer network;
Fig. 3 illustrates the method flow diagram that is used for eliminating based on resource utilization resource file according to another aspect of the present invention in the node device of peer-to-peer network;
Fig. 4 illustrates the method flow diagram that is used for eliminating based on resource utilization resource file according to a preferred embodiment of the present invention in the node device of peer-to-peer network.
Same or analogous Reference numeral is represented same or analogous parts in the accompanying drawing.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail.
Fig. 1 illustrates the node device synoptic diagram that is used for eliminating based on resource utilization resource file according to one aspect of the present invention in peer-to-peer network.At this, peer-to-peer network includes but not limited to: pure distributing P2P network and hybrid P2P network, particularly, in pure distributing P2P network, constitute a distributed network between the node of chain, by the peer node that exists in the client software search network based on the peer-to-peer network agreement, needn't come transfer by server between node in the network and the node, they can directly connect.On the other hand, in hybrid P2P network, also can directly connect between each node, but the structure of network needs server, by Collective qualification, sets up index mechanism, in case successfully connect between the peer node, the server in the network just no longer works.
With reference to Fig. 1, this node device 1 comprises first deriving means 11, second deriving means 12, selecting arrangement 13 and actuating unit 14.Particularly, first deriving means 11 obtains the resource file in first storage space of described node device 1; Then, second deriving means 12 obtains and the corresponding resource utilization of described resource file according to the resource file that is obtained; Then, selecting arrangement 13 is selected pending target resource file according to described resource utilization from described resource file; At last, the described target resource files of 14 pairs of actuating units are carried out deletion actions, to discharge in described first storage space and the corresponding storage area of described target resource file.At this, described node device 1 includes but not limited to network host, single network server, a plurality of webserver collection or based on the set of computers of cloud computing.
First deriving means 11 obtains the resource file in first storage space of described node device 1.First storage space herein includes but not limited to, hard disk, internal memory, external USB storage part, portable hard drive.Particularly, first deriving means 11 is by obtaining the resource file of described first storage space such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1.For example, be the video file of rm at file type, first deriving means 11 can use the file polling function in the operating system to obtain in described first storage space with the video file of rm as suffix.Again for example, first deriving means 11 directly is specifically designed to the file directory or the disk partition of depositing video file in the access node equipment 1, to obtain corresponding resource file.The mode that those skilled in the art will be understood that the resource file in above-mentioned first storage space that obtains described node device is only for for example; the mode of the resource file in other existing or first storage spaces that obtain described node device that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Second deriving means 12 obtains and the corresponding resource utilization of described resource file according to described resource file.Particularly, second deriving means 12 is by uploading daily record or other Operation Logs etc. such as the access log of the described resource file of inquiry or the file of inquiring about described node device 1, obtain and the corresponding utilization of resources information of described resource file, as the life period of resource file, upload data volume etc., and determine the resource utilization of this resource file based on this, as uploading number of times or uploading data volume in the unit interval in the unit interval.For example, second deriving means 12 is according to the resource file that is obtained via described first deriving means 11, through inquiring about the access log of described resource file, obtain content, Production Time, version or the daily record etc. of described resource file, obtain and the corresponding resource utilization of described resource file by above-mentioned and described resource file relevant content, time, version or daily record.Again for example, second deriving means 12 can also query node equipment 1 file upload daily record or other Operation Logs, and upload in daily record or other Operation Logs frequency of calling of resource file according to the file of described node device 1 and just obtain and the corresponding resource utilization of described resource file.Those skilled in the art will be understood that above-mentioned obtain with the mode of the corresponding resource utilization of described resource file only for for example; the mode of other existing or obtaining of may occurring from now on and the corresponding resource utilization of described resource file is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Selecting arrangement 13 is selected pending target resource file according to described resource utilization from described resource file.Particularly, second deriving means 12 obtain with the corresponding resource utilization of described resource file after, selecting arrangement 13 is by handling such as ordering or threshold ratio waits operation, the pending target resource file of selection from described resource file.For example, selecting arrangement 13 is according to default resource utilization threshold value, chooses a part of resource file in the resource file as described pending target resource file.Again for example, selecting arrangement 13 obtains the average resource of first storage space in the node device 1 based on the corresponding resource utilization of second deriving means, 12 resource files that obtained and described, selects described pending target resource file according to average resource then.Those skilled in the art will be understood that the above-mentioned mode of selecting pending target resource file based on resource utilization is only for for example; other existing or modes of selecting pending target resource file based on resource utilization that may occur from now on are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
The described target resource files of 14 pairs of actuating units are carried out deletion actions, to discharge in described first storage space and the corresponding storage area of described target resource file.Particularly, selecting arrangement 13 is chosen described pending target resource file according to described resource utilization from described resource file after, actuating unit 14 by such as in the canned data concordance list of revising described first storage space with store status field, initialization and the corresponding storage area of described target resource file of the pairing canned data record of described target resource file or remove described target resource file and carry out deletion action, to discharge in described first storage space and the corresponding storage area of described target resource file.For example, actuating unit 14 can based on the memory address of described target resource file and write command operation (as writing x00) empty with as described in the corresponding storage area of target resource file.Those skilled in the art will be understood that above-mentioned mode to described target resource file execution deletion action only is for example; other existing or modes that described target resource file is carried out deletion action that may occur from now on are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Preferably, first deriving means 11, second deriving means 12, selecting arrangement 13 and actuating unit 14 are constant work.Particularly, first deriving means 11 obtains the resource file in first storage space of described node device 1; Then, second deriving means 12 obtains and the corresponding resource utilization of described resource file according to the resource file that is obtained; Then, selecting arrangement 13 is selected pending target resource file according to described resource utilization from described resource file; At last, the described target resource files of 14 pairs of actuating units are carried out deletion actions, to discharge in described first storage space and the corresponding storage area of described target resource file.At this, it will be understood by those skilled in the art that " continuing " be meant first deriving means 11, second deriving means 12, selecting arrangement 13 and actuating unit 14 respectively according to the mode of operation of setting or adjust in real time require to carry out the obtaining of resource file, with the selection of the obtaining of the corresponding resource utilization of described resource file, pending target resource file, and the deletion of target resource file, stop to obtain resource file in described first storage space in a long time until node device 1.
Preferably, described node device 1 also comprises the adjusting gear (not shown), and this adjusting gear is adjusted described resource utilization based on the supplementary of described resource file; Then, described selecting arrangement 13 is selected described pending target resource file according to the adjusted resource utilization of described adjusting gear from described resource file.For example, described second deriving means 12 obtain with the corresponding resource utilization of described resource file after, described adjusting gear is according to the supplementary of described resource file, as information such as the temperature of resource file, recommendation degree, adjust described resource utilization, for example when the temperature of described resource file was higher, described adjusting gear was correspondingly heightened described resource utilization, perhaps when the temperature of described resource file was hanged down, described adjusting gear was correspondingly turned down described resource utilization; Then, described selecting arrangement 13 is selected pending target resource file according to adjusted resource utilization.Those skilled in the art will be understood that it only is for example that above-mentioned supplementary based on resource file is adjusted the mode of resource utilization; other existing or modes of adjusting resource utilization based on supplementarys of resource file that may occur from now on are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
More preferably, the supplementary of described resource file includes but not limited to, below at least each:
1) temperature of resource file;
2) the recommendation degree of resource file;
3) Time To Market of resource file.
1) temperature with resource file is an example, for example, described second deriving means 12 obtain with the corresponding resource utilization of described resource file after, described adjusting gear is according to the temperature of described resource file, adjust described resource utilization, for example when the temperature of described resource file was higher, described adjusting gear was correspondingly heightened described resource utilization, perhaps when the temperature of described resource file was hanged down, described adjusting gear was correspondingly turned down described resource utilization; Then, described selecting arrangement 13 is selected pending target resource file according to adjusted resource utilization.
2) the recommendation degree with resource file is an example, for example, described second deriving means 12 obtain with the corresponding resource utilization of described resource file after, described adjusting gear is according to the recommendation degree of described resource file, adjust described resource utilization, for example when the recommendation degree of described resource file was higher, described adjusting gear was correspondingly heightened described resource utilization, perhaps when the recommendation degree of described resource file hanged down, described adjusting gear was correspondingly turned down described resource utilization; Then, described selecting arrangement 13 is selected pending target resource file according to adjusted resource utilization.
3) Time To Market with resource file is an example, for example, described second deriving means 12 obtain with the corresponding resource utilization of described resource file after, described adjusting gear is according to the Time To Market of described resource file, adjust described resource utilization, for example, when the Time To Market of described resource file distance current when nearer, described adjusting gear is correspondingly heightened described resource utilization, perhaps when the Time To Market of described resource file early the time, described adjusting gear is correspondingly turned down described resource utilization; Then, described selecting arrangement 13 is selected pending target resource file according to adjusted resource utilization.In addition, the adjusting gear of described node device 1 also can be based on the combination in any in the Time To Market of the recommendation degree of the temperature of resource file, resource file, resource file, adjust and the corresponding resource utilization of described resource file, described then selecting arrangement 13 is selected pending target resource file according to adjusted resource utilization.Those skilled in the art will be understood that the supplementary of above-mentioned resource file is only for giving an example; the supplementary of other resource files existing or that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Preferably, described selecting arrangement 13 based on described resource utilization, is selected pending target resource file also according to default screening rule from described resource file.More preferably, described default screening rule based on following at least each: ordering, threshold ratio is right.Sorting based on the resource utilization to described resource file with described default screening rule is example, described selecting arrangement 13 with the corresponding resource utilization of second deriving means, 12 resource files that obtained and described according to from high to low or order from low to high sort, select several the minimum resource files of resource utilization in this sequence then, as several resource files (when sorting from high to low) of sequence tail end or several resource files (when sorting from low to high) of sequence header, as pending target resource file.Compare based on the resource utilization of described resource file and utilization factor threshold value with described default screening rule and to be example, described selecting arrangement 13 is compared second deriving means, 12 corresponding resource utilizations of resource file that obtained and described and utilization factor threshold value, for example, the resource file that resource utilization is higher than described utilization factor threshold value is labeled as " handling ", and the resource file that resource utilization is lower than described utilization factor threshold value is labeled as " pending ", the resource file of selecting all to be labeled as " pending " then is as pending target resource file.In addition, the selecting arrangement 13 of described node device 1 can also be with ordering and threshold ratio to combining, based on described resource utilization, and the pending target resource file of selection from described resource file.Those skilled in the art will be understood that above-mentioned default screening rule only for giving an example, and other default screening rules existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and are contained in this with way of reference.
Preferably, described actuating unit 14 also is transferred to second storage space with described target resource file from first storage space of described node device 1, to discharge in described first storage space and the corresponding storage area of described target resource file.Herein first storage space and second storage space include but not limited to, hard disk, internal memory, external USB storage part, portable hard drive.
Preferably, described first deriving means 11 is also according to default trigger condition, obtains the resource file in first storage space of described node device 1, wherein, described default trigger condition based on following at least each:
1) active volume of described first storage space is lower than preset capacity;
2) described first storage space active volume deficiency when receiving data download;
3) memory capacity of described first storage space is full;
4) obtain time interval of described resource file.
1) being lower than preset capacity with described default trigger condition based on the active volume of described first storage space is example, when the active volume of described first storage space was lower than preset capacity, first deriving means 11 was by the resource file in first storage space that obtains described node device 1 such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1.For example, node device 1 preestablishes disk retained storage capacity (being preset capacity), as 2G bytes of memory zone, so that first storage space of this node device 1 all has at least 2G bytes of memory zone to store new resource file at any time, when the active volume of described first storage space is lower than preset capacity, first deriving means 11 is by the resource file in first storage space that obtains described node device 1 such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1.
2) be example with described default trigger condition based on described first storage space active volume deficiency when receiving data download, when active volume was not enough when described first storage space receives data download, first deriving means 11 was by the resource file in first storage space that obtains node device 1 such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1.For example, node device 1 is in the process that receives data download, active volume in first storage space is not enough to hold data downloaded soon, at this moment, first deriving means 11 is by the resource file in first storage space that obtains node device 1 such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1.
3) completely be example with described default trigger condition based on the memory capacity of described first storage space, when the memory capacity of described first storage space expired, first deriving means 11 was by the resource file in first storage space that obtains node device 1 such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1.For example, full and can't store new resource file the time when the memory capacity of described first storage space, described first deriving means 11 is by the resource file in first storage space that obtains node device 1 such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1.
4) be example with described default trigger condition based on the time interval of obtaining described resource file, described node device 1 sets in advance the time interval of obtaining described resource file, so that eliminate resource file according to the utilization factor of resource file termly, first deriving means 11 is according to this time interval, as every 2 weeks, by the resource file in first storage space that obtains node device 1 such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1.Preferably, described first deriving means 11 is also according to the combination in any of above-mentioned default trigger condition, obtains the resource file in first storage space of described node device 1.Those skilled in the art will be understood that above-mentioned default trigger condition only for giving an example, and other default trigger conditions existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and are contained in this with way of reference.
Fig. 2 illustrates the node device synoptic diagram that is used for eliminating based on resource utilization resource file according to a preferred embodiment of the present invention in peer-to-peer network.At this, peer-to-peer network includes but not limited to: pure distributing P2P network and hybrid P2P network, particularly, in pure distributing P2P network, constitute a distributed network between the node of chain, by the peer node that exists in the client software search network based on the peer-to-peer network agreement, needn't come transfer by server between node in the network and the node, they can directly connect.On the other hand, in hybrid P2P network, also can directly connect between each node, but the structure of network needs server, by Collective qualification, sets up index mechanism, in case successfully connect between the peer node, the server in the network just no longer works.
With reference to Fig. 2, this node device 1 ' comprises first deriving means 11 ', second deriving means 12 ', selecting arrangement 13 ' and actuating unit 14 ', and described second deriving means 12 ' comprises the 3rd deriving means 121 ' and the 4th deriving means 122 '.Particularly, first deriving means 11 ' obtains the resource file in first storage space of described node device 1 '; Then, the 3rd deriving means 121 ' of second deriving means 12 ' obtains and the corresponding resource characteristic information of described resource file according to the resource file that is obtained; Then, the 4th deriving means 122 ' of second deriving means 12 ' obtains and the corresponding resource utilization of described resource file according to described resource characteristic information; Then, selecting arrangement 13 ' is selected pending target resource file according to described resource utilization from described resource file; At last, actuating unit 14 ' is carried out deletion action to described target resource file, to discharge in described first storage space and the corresponding storage area of described target resource file.At this, described node device 1 ' includes but not limited to network host, single network server, a plurality of webserver collection or based on the set of computers of cloud computing.
In the node device 1 ' of Fig. 2, first deriving means 11 ', selecting arrangement 13 ' and actuating unit 14 ' first deriving means 11, the selecting arrangement 13 with shown in Figure 1 respectively are identical with actuating unit 14, for describing for simplicity, so locate to repeat no more, and be contained in this by reference.
Second deriving means 12 ' comprises the 3rd deriving means 121 ' and the 4th deriving means 122 '.Particularly, obtain the resource file in first storage space of described node device 1 ' by first deriving means 11 ' after, the 3rd deriving means 121 ' obtains and the corresponding resource characteristic information of described resource file according to described resource file; Then, the 4th deriving means 122 ' obtains and the corresponding resource utilization of described resource file according to described resource characteristic information.Preferably, described resource characteristic information comprise following at least each:
1) life period of described resource file;
2) described resource file uploads data volume;
3) file size of described resource file.
1) comprises that with described resource characteristic information the life period of described resource file is an example, the 3rd deriving means 121 ' obtains the life period of described resource file according to described resource file, and the 4th deriving means 122 ' obtains described resource utilization by the life period of described resource file then.For example, described the 3rd deriving means 121 ' obtains the life period of described resource file according to described resource file, when the life period of described resource file more in short-term, the resource utilization that described the 4th deriving means 122 ' obtains according to the life period of described resource file is also higher relatively; Perhaps, described the 3rd deriving means 121 ' obtains the life period of described resource file according to described resource file, when the life period of described resource file was longer, the resource utilization that described the 4th deriving means 122 ' obtains according to the life period of described resource file was also relatively low.
2) comprise that with described resource characteristic information the data volume of uploading of described resource file is an example, the 3rd deriving means 121 ' is according to described resource file, by obtaining and the corresponding data volume of uploading of described resource file such as detecting described node device 1 ' total flow of uploading, the 4th deriving means 122 ' obtains described resource utilization by the data volume of uploading of described resource file then.For example, described the 3rd deriving means 121 ' obtains the data volume of uploading of described resource file according to described resource file, when described resource file upload data volume when big, described the 4th deriving means 122 ' according to described resource file to upload the resource utilization that data volume obtains also higher relatively; Perhaps, described the 3rd deriving means 121 ' obtains the data volume of uploading of described resource file according to described resource file, when described resource file upload data volume hour, described the 4th deriving means 122 ' according to described resource file to upload the resource utilization that data volume obtains also relatively low.
3) comprise that with described resource characteristic information the file size of described resource file is an example, the 3rd deriving means 121 ' is according to described resource file, by obtaining and the corresponding file size of described resource file such as the resource file attribute in the described node device 1 ' of inquiry, the 4th deriving means 122 ' obtains described resource utilization by the file size of described resource file then.For example, described the 3rd deriving means 121 ' obtains the file size of described resource file according to described resource file, when the file size of described resource file was big, described the 4th deriving means 122 ' was also relatively low according to the resource utilization that file size obtained of described resource file; Perhaps, described the 3rd deriving means 121 ' obtains the file size of described resource file according to described resource file, when the file size of described resource file hour, described the 4th deriving means 122 ' is also higher relatively according to the resource utilization that file size obtained of described resource file.In addition, described the 3rd deriving means 121 ' can obtain combination in any in the file size of uploading data volume and described resource file of the life period of described resource file, described resource file according to described resource file, as, the unit length correspondence upload data volume etc., described then the 4th deriving means 122 ' obtains and the corresponding resource utilization of described resource file according to the combination of above-mentioned resource characteristic information.Those skilled in the art will be understood that the mode of the corresponding resource characteristic information of above-mentioned and described resource file is only for giving an example; other existing or that may occur from now on and modes corresponding resource characteristic information of described resource file are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Preferably, on the basis of embodiment that above-mentioned Fig. 2 describes, described the 4th deriving means 122 ' obtains and the corresponding resource utilization of described resource file according to described resource characteristic information, and wherein, described resource utilization satisfies following relational expression:
U = V upload L ;
Wherein, U represents resource utilization, V UploadRepresent the data volume of uploading of resource file, L represents the file size of resource file.
Preferably, on the basis of embodiment that above-mentioned Fig. 2 describes, described node device 1 ' also comprises the adjusting gear (not shown), and described adjusting gear is adjusted described resource utilization based on the supplementary of described resource file; Then, described selecting arrangement 13 ' is selected described pending target resource file according to the adjusted resource utilization of described adjusting gear from described resource file.For example, described the 4th deriving means 122 ' obtain with the corresponding resource utilization of described resource file after, described adjusting gear is according to the supplementary of described resource file, as information such as the temperature of resource file, recommendation degree, adjust described resource utilization, for example when the temperature of described resource file was higher, described adjusting gear was correspondingly heightened described resource utilization, perhaps when the temperature of described resource file was hanged down, described adjusting gear was correspondingly turned down described resource utilization; Then, described selecting arrangement 13 ' is selected pending target resource file according to adjusted resource utilization.Those skilled in the art will be understood that it only is for example that above-mentioned supplementary based on resource file is adjusted the mode of resource utilization; other existing or modes of adjusting resource utilization based on supplementarys of resource file that may occur from now on are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
More preferably, the supplementary of described resource file includes but not limited to, below at least each:
1) temperature of resource file;
2) the recommendation degree of resource file;
3) Time To Market of resource file.
1) temperature with resource file is an example, for example, described the 4th deriving means 122 ' obtain with the corresponding resource utilization of described resource file after, described adjusting gear is according to the temperature of described resource file, adjust described resource utilization, for example when the temperature of described resource file was higher, described adjusting gear was correspondingly heightened described resource utilization, perhaps when the temperature of described resource file was hanged down, described adjusting gear was correspondingly turned down described resource utilization; Then, described selecting arrangement 13 ' is selected pending target resource file according to adjusted resource utilization.
2) the recommendation degree with resource file is an example, for example, described the 4th deriving means 122 ' obtain with the corresponding resource utilization of described resource file after, described adjusting gear is according to the recommendation degree of described resource file, adjust described resource utilization, for example when the recommendation degree of described resource file was higher, described adjusting gear was correspondingly heightened described resource utilization, perhaps when the recommendation degree of described resource file hanged down, described adjusting gear was correspondingly turned down described resource utilization; Then, described selecting arrangement 13 ' is selected pending target resource file according to adjusted resource utilization.
3) Time To Market with resource file is an example, for example, described the 4th deriving means 122 ' obtain with the corresponding resource utilization of described resource file after, described adjusting gear is according to the Time To Market of described resource file, adjust described resource utilization, for example, when the Time To Market of described resource file distance current when nearer, described adjusting gear is correspondingly heightened described resource utilization, perhaps when the Time To Market of described resource file early the time, described adjusting gear is correspondingly turned down described resource utilization; Then, described selecting arrangement 13 ' is selected pending target resource file according to adjusted resource utilization.In addition, the adjusting gear of described node device 1 ' also can be based on the combination in any in the Time To Market of the recommendation degree of the temperature of resource file, resource file, resource file, adjust and the corresponding resource utilization of described resource file, described then selecting arrangement 13 ' is selected pending target resource file according to adjusted resource utilization.Those skilled in the art will be understood that the supplementary of above-mentioned resource file is only for giving an example; the supplementary of other resource files existing or that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Preferably, on the basis of embodiment that above-mentioned Fig. 2 describes, described selecting arrangement 13 ' based on described resource utilization, is selected pending target resource file also according to default screening rule from described resource file.More preferably, described default screening rule based on following at least each: ordering, threshold ratio is right.Sorting based on the resource utilization to described resource file with described default screening rule is example, described selecting arrangement 13 ' the 4th deriving means 122 ' is obtained with the corresponding resource utilization of described resource file according to from high to low or order from low to high sort, select several the minimum resource files of resource utilization in this sequence then, as several resource files (when sorting from high to low) of sequence tail end or several resource files (when sorting from low to high) of sequence header, as pending target resource file.Compare based on the resource utilization of described resource file and utilization factor threshold value with described default screening rule and to be example, what described selecting arrangement 13 ' was obtained the 4th deriving means 122 ' compares with corresponding resource utilization of described resource file and utilization factor threshold value, for example, the resource file that resource utilization is higher than described utilization factor threshold value is labeled as " handling ", and the resource file that resource utilization is lower than described utilization factor threshold value is labeled as " pending ", the resource file of selecting all to be labeled as " pending " then is as pending target resource file.In addition, the selecting arrangement 13 ' of described node device 1 ' can also be with ordering and threshold ratio to combining, based on described resource utilization, and the pending target resource file of selection from described resource file.Those skilled in the art will be understood that above-mentioned default screening rule only for giving an example, and other default screening rules existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and are contained in this with way of reference.
Preferably, on the basis of embodiment that above-mentioned Fig. 2 describes, described actuating unit 14 ' also is transferred to second storage space with described target resource file from first storage space of described node device 1 ', to discharge in described first storage space and the corresponding storage area of described target resource file.Herein first storage space and second storage space include but not limited to, hard disk, internal memory, external USB storage part, portable hard drive.
Preferably, on the basis of embodiment that above-mentioned Fig. 2 describes, described first deriving means 11 ' is also according to default trigger condition, obtains the resource file in first storage space of described node device 1 ', wherein, described default trigger condition based on following at least each:
1) active volume of described first storage space is lower than preset capacity;
2) described first storage space active volume deficiency when receiving data download;
3) memory capacity of described first storage space is full;
4) obtain time interval of described resource file.
1) being lower than preset capacity with described default trigger condition based on the active volume of described first storage space is example, when the active volume of described first storage space was lower than preset capacity, first deriving means 11 ' was by the resource file in first storage space that obtains described node device 1 ' such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1 '.For example, node device 1 ' preestablishes disk retained storage capacity (being preset capacity), as 2G bytes of memory zone, so that first storage space of this node device 1 ' all has at least 2G bytes of memory zone to store new resource file at any time, when the active volume of described first storage space is lower than preset capacity, first deriving means 11 ' is by the resource file in first storage space that obtains described node device 1 ' such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1 '.
2) be example with described default trigger condition based on described first storage space active volume deficiency when receiving data download, when active volume was not enough when described first storage space receives data download, first deriving means 11 ' was by the resource file in first storage space that obtains node device 1 ' such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1 '.For example, node device 1 ' is in the process that receives data download, active volume in first storage space is not enough to hold data downloaded soon, at this moment, first deriving means 11 ' is by the resource file in first storage space that obtains node device 1 ' such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1 '.
3) completely be example with described default trigger condition based on the memory capacity of described first storage space, when the memory capacity of described first storage space expired, first deriving means 11 ' was by the resource file in first storage space that obtains node device 1 ' such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1 '.For example, full and can't store new resource file the time when the memory capacity of described first storage space, described first deriving means 11 ' is by the resource file in first storage space that obtains node device 1 ' such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1 '.
4) be example with described default trigger condition based on the time interval of obtaining described resource file, described node device 1 ' sets in advance the time interval of obtaining described resource file, so that eliminate resource file according to the utilization factor of resource file termly, first deriving means 11 ' is according to this time interval, as every 2 weeks, by the resource file in first storage space that obtains node device 1 ' such as the canned data concordance list that reads described first storage space or first storage space that scans described node device 1 '.Preferably, described first deriving means 11 ' is also according to the combination in any of above-mentioned default trigger condition, obtains the resource file in first storage space of described node device 1 '.Those skilled in the art will be understood that above-mentioned default trigger condition only for giving an example, and other default trigger conditions existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and are contained in this with way of reference.
Fig. 3 illustrates the method flow diagram that is used for eliminating based on resource utilization resource file according to another aspect of the present invention in the node device of peer-to-peer network.At this, peer-to-peer network includes but not limited to: pure distributing P2P network and hybrid P2P network, particularly, in pure distributing P2P network, constitute a distributed network between the node of chain, by the peer node that exists in the client software search network based on the peer-to-peer network agreement, needn't come transfer by server between node in the network and the node, they can directly connect.On the other hand, in hybrid P2P network, also can directly connect between each node, but the structure of network needs server, by Collective qualification, sets up index mechanism, in case successfully connect between the peer node, the server in the network just no longer works.In addition, described node device includes but not limited to network host, single network server, a plurality of webserver collection or based on the set of computers of cloud computing.
In step S1, node device obtains the resource file in first storage space.First storage space herein includes but not limited to, hard disk, internal memory, external USB storage part, portable hard drive.Particularly, node device is by such as the canned data concordance list that reads described first storage space or scan the resource file that first storage space obtains described first storage space.For example, be the video file of rm at file type, node device can use the file polling function in the operating system to obtain in described first storage space with the video file of rm as suffix.Again for example, node device can also directly be visited and is specifically designed to the file directory or the disk partition of depositing video file, to obtain corresponding resource file.Those skilled in the art will be understood that the above-mentioned mode of the resource file in first storage space of obtaining is only for giving an example; the mode of other existing or resource files that obtain first storage space that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
In step S2, node device obtains and the corresponding resource utilization of described resource file according to described resource file.Particularly, node device is by uploading daily record or other Operation Logs etc. such as the access log or the inquiry file of the described resource file of inquiry, obtain and the corresponding utilization of resources information of described resource file, as the life period of resource file, upload data volume etc., and determine the resource utilization of this resource file based on this, as uploading number of times or uploading data volume in the unit interval in the unit interval.For example, node device is according to the resource file that is obtained among the step S1, through inquiring about the access log of described resource file, obtain content, Production Time, version or the daily record etc. of described resource file, obtain and the corresponding resource utilization of described resource file by above-mentioned and described resource file relevant content, time, version or daily record.Again for example, node device can also be uploaded daily record or other Operation Logs by inquiry file, and uploads in daily record or other Operation Logs frequency of calling of resource file according to described file and just obtain and the corresponding resource utilization of described resource file.Those skilled in the art will be understood that above-mentioned obtain with the mode of the corresponding resource utilization of described resource file only for for example; the mode of other existing or obtaining of may occurring from now on and the corresponding resource utilization of described resource file is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
In step S3, node device is selected pending target resource file according to described resource utilization from described resource file.Particularly, step S2 obtain with the corresponding resource utilization of described resource file after, node device is by handling such as ordering or threshold ratio waits operation, the pending target resource file of selection from described resource file.For example, node device is according to default resource utilization threshold value, chooses a part of resource file in the resource file as described pending target resource file.Again for example, what node device was obtained based on step S2 obtains the average resource of first storage space in the node device with the corresponding resource utilization of described resource file, selects described pending target resource file according to average resource then.Those skilled in the art will be understood that the above-mentioned mode of selecting pending target resource file based on resource utilization is only for for example; other existing or modes of selecting pending target resource file based on resource utilization that may occur from now on are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
In step S4, node device is carried out deletion action to described target resource file, to discharge in described first storage space and the corresponding storage area of described target resource file.Particularly, step S3 chooses described pending target resource file according to described resource utilization from described resource file after, node device by such as in the canned data concordance list of revising described first storage space with store status field, initialization and the corresponding storage area of described target resource file of the pairing canned data record of described target resource file or remove described target resource file and carry out deletion action, to discharge in described first storage space and the corresponding storage area of described target resource file.For example, node device can based on the memory address of described target resource file and write command operation (as writing x00) empty with as described in the corresponding storage area of target resource file.Those skilled in the art will be understood that above-mentioned mode to described target resource file execution deletion action only is for example; other existing or modes that described target resource file is carried out deletion action that may occur from now on are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Preferably, this method also comprises step S5 (not shown), and in described step S5, node device is adjusted described resource utilization based on the supplementary of described resource file; Then, according to the adjusted resource utilization of described adjusting gear, from described resource file, select described pending target resource file.For example, described step S2 obtain with the corresponding resource utilization of described resource file after, node device is according to the supplementary of described resource file, as information such as the temperature of resource file, recommendation degree, adjust described resource utilization, for example when the temperature of described resource file was higher, node device was correspondingly heightened described resource utilization, perhaps when the temperature of described resource file was hanged down, node device was correspondingly turned down described resource utilization; And then select pending target resource file according to adjusted resource utilization.Those skilled in the art will be understood that it only is for example that above-mentioned supplementary based on resource file is adjusted the mode of resource utilization; other existing or modes of adjusting resource utilization based on supplementarys of resource file that may occur from now on are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
More preferably, the supplementary of described resource file includes but not limited to, below at least each:
1) temperature of resource file;
2) the recommendation degree of resource file;
3) Time To Market of resource file.
1) temperature with resource file is an example, for example, described step S2 obtain with the corresponding resource utilization of described resource file after, node device is according to the temperature of described resource file, adjust described resource utilization, for example when the temperature of described resource file was higher, node device was correspondingly heightened described resource utilization, perhaps when the temperature of described resource file was hanged down, node device was correspondingly turned down described resource utilization; And then select pending target resource file according to adjusted resource utilization.
2) the recommendation degree with resource file is an example, for example, described step S2 obtain with the corresponding resource utilization of described resource file after, node device is according to the recommendation degree of described resource file, adjust described resource utilization, for example when the recommendation degree of described resource file was higher, node device was correspondingly heightened described resource utilization, perhaps when the recommendation degree of described resource file hanged down, node device was correspondingly turned down described resource utilization; And then select pending target resource file according to adjusted resource utilization.
3) Time To Market with resource file is an example, for example, described step S2 obtain with the corresponding resource utilization of described resource file after, node device is adjusted described resource utilization, for example according to the Time To Market of described resource file, when the Time To Market of described resource file distance current when nearer, node device is correspondingly heightened described resource utilization, and perhaps when the Time To Market of described resource file early the time, node device is correspondingly turned down described resource utilization; And then select pending target resource file according to adjusted resource utilization.In addition, described node device also can be based on the combination in any in the Time To Market of the recommendation degree of the temperature of resource file, resource file, resource file, adjust and the corresponding resource utilization of described resource file, and then select pending target resource file according to adjusted resource utilization.Those skilled in the art will be understood that the supplementary of above-mentioned resource file is only for giving an example; the supplementary of other resource files existing or that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Preferably, in step S3, node device based on described resource utilization, is selected pending target resource file also according to default screening rule from described resource file.More preferably, described default screening rule based on following at least each: ordering, threshold ratio is right.Sorting based on the resource utilization to described resource file with described default screening rule is example, described node device with obtained among the step S2 with the corresponding resource utilization of described resource file according to from high to low or order from low to high sort, select several the minimum resource files of resource utilization in this sequence then, as several resource files (when sorting from high to low) of sequence tail end or several resource files (when sorting from low to high) of sequence header, as pending target resource file.Compare based on the resource utilization of described resource file and utilization factor threshold value with described default screening rule and to be example, described node device is with comparing with corresponding resource utilization of described resource file and utilization factor threshold value of being obtained among the step S2, for example, the resource file that resource utilization is higher than described utilization factor threshold value is labeled as " handling ", and the resource file that resource utilization is lower than described utilization factor threshold value is labeled as " pending ", the resource file of selecting all to be labeled as " pending " then is as pending target resource file.In addition, in step S3, described node device can also be with ordering and threshold ratio to combining, based on described resource utilization, and the pending target resource file of selection from described resource file.Those skilled in the art will be understood that above-mentioned default screening rule only for giving an example, and other default screening rules existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and are contained in this with way of reference.
Preferably, in step S4, described node device also is transferred to second storage space with described target resource file from first storage space, to discharge in described first storage space and the corresponding storage area of described target resource file.Herein first storage space and second storage space include but not limited to, hard disk, internal memory, external USB storage part, portable hard drive.
Preferably, in step S1, described node device also according to default trigger condition, obtains the resource file in first storage space, wherein, described default trigger condition based on following at least each:
1) active volume of described first storage space is lower than preset capacity;
2) described first storage space active volume deficiency when receiving data download;
3) memory capacity of described first storage space is full;
4) obtain time interval of described resource file.
1) being lower than preset capacity with described default trigger condition based on the active volume of described first storage space is example, when the active volume of described first storage space was lower than preset capacity, node device was by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains described node device.For example, node device preestablishes disk retained storage capacity (being preset capacity), as 2G bytes of memory zone, so that first storage space of this node device all has at least 2G bytes of memory zone to store new resource file at any time, when the active volume of described first storage space is lower than preset capacity, node device is by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains described node device.
2) be example with described default trigger condition based on described first storage space active volume deficiency when receiving data download, when active volume was not enough when described first storage space receives data download, node device was by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains node device.For example, node device is in the process that receives data download, active volume in first storage space is not enough to hold data downloaded soon, at this moment, node device is by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains node device.
3) completely be example with described default trigger condition based on the memory capacity of described first storage space, when the memory capacity of described first storage space expired, node device was by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains node device.For example, full and can't store new resource file the time when the memory capacity of described first storage space, described node device is by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains node device.
4) be example with described default trigger condition based on the time interval of obtaining described resource file, described node device sets in advance the time interval of obtaining described resource file, so that eliminate resource file according to the utilization factor of resource file termly, node device is according to this time interval, as every 2 weeks, by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains node device.Preferably, described node device obtains the resource file of first storage space of described node device also according to the combination in any of above-mentioned default trigger condition.Those skilled in the art will be understood that above-mentioned default trigger condition only for giving an example, and other default trigger conditions existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and are contained in this with way of reference.
Fig. 4 illustrates the method flow diagram that is used for eliminating based on resource utilization resource file according to a preferred embodiment of the present invention in the node device of peer-to-peer network.At this, peer-to-peer network includes but not limited to: pure distributing P2P network and hybrid P2P network, particularly, in pure distributing P2P network, constitute a distributed network between the node of chain, by the peer node that exists in the client software search network based on the peer-to-peer network agreement, needn't come transfer by server between node in the network and the node, they can directly connect.On the other hand, in hybrid P2P network, also can directly connect between each node, but the structure of network needs server, by Collective qualification, sets up index mechanism, in case successfully connect between the peer node, the server in the network just no longer works.In addition, described node device includes but not limited to network host, single network server, a plurality of webserver collection or based on the set of computers of cloud computing.
With reference to Fig. 4, step S1, the step S3 with shown in Figure 3 is identical with step S4 respectively with step S4 ' for the step S1 ' of this method, step S3 ', for describing for simplicity, so locate to repeat no more, and be contained in this by reference.
Particularly, node device obtains resource file in first storage space of described node device by step S1 ' after, in step S21 ', node device obtains and the corresponding resource characteristic information of described resource file according to described resource file; Then, in step S22 ', node device obtains and the corresponding resource utilization of described resource file according to described resource characteristic information.Preferably, described resource characteristic information comprise following at least each:
1) life period of described resource file;
2) described resource file uploads data volume;
3) file size of described resource file.
1) comprises that with described resource characteristic information the life period of described resource file is an example, in step S21 ', node device obtains the life period of described resource file according to described resource file, in step S22 ', node device obtains described resource utilization by the life period of described resource file then.For example, in step S21 ', node device obtains the life period of described resource file according to described resource file, when the life period of described resource file more in short-term, in step S22 ', the resource utilization that node device obtains according to the life period of described resource file is also higher relatively; Perhaps, in step S21 ', node device obtains the life period of described resource file according to described resource file, when the life period of described resource file is longer, in step S22 ', the resource utilization that node device obtains according to the life period of described resource file is also relatively low.
2) comprise that with described resource characteristic information the data volume of uploading of described resource file is an example, in step S21 ', node device is according to described resource file, by obtaining and the corresponding data volume of uploading of described resource file such as detecting the total flow of uploading of described node device, in step S22 ', node device obtains described resource utilization by the data volume of uploading of described resource file then.For example, in step S21 ', node device obtains the data volume of uploading of described resource file according to described resource file, upload data volume when big when described resource file, in step S22 ', node device according to described resource file to upload the resource utilization that data volume obtains also higher relatively; Perhaps, in step S21 ', node device obtains the data volume of uploading of described resource file according to described resource file, upload data volume hour when described resource file, in step S22 ', node device according to described resource file to upload the resource utilization that data volume obtains also relatively low.
3) comprise that with described resource characteristic information the file size of described resource file is an example, in step S21 ', node device is according to described resource file, by obtaining and the corresponding file size of described resource file such as the resource file attribute in the described node device of inquiry, in step S22 ', node device obtains described resource utilization by the file size of described resource file then.For example, in step S21 ', node device obtains the file size of described resource file according to described resource file, when the file size of described resource file is big, in step S22 ', node device is also relatively low according to the resource utilization that file size obtained of described resource file; Perhaps, in step S21 ', node device obtains the file size of described resource file according to described resource file, when the file size of described resource file hour, in step S22 ', node device is also higher relatively according to the resource utilization that file size obtained of described resource file.In addition, node device can obtain combination in any in the file size of uploading data volume and described resource file of the life period of described resource file, described resource file according to described resource file, as, the unit length correspondence upload data volume etc., and then obtain and the corresponding resource utilization of described resource file according to the combination of above-mentioned resource characteristic information.Those skilled in the art will be understood that the mode of the corresponding resource characteristic information of above-mentioned and described resource file is only for giving an example; other existing or that may occur from now on and modes corresponding resource characteristic information of described resource file are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Preferably, on the basis of embodiment that above-mentioned Fig. 4 describes, among the step S22 ', node device obtains and the corresponding resource utilization of described resource file according to described resource characteristic information, and wherein, described resource utilization satisfies following relational expression:
U = V upload L ;
Wherein, U represents resource utilization, V UploadRepresent the data volume of uploading of resource file, L represents the file size of resource file.
Preferably, on the basis of embodiment that above-mentioned Fig. 4 describes, this method also comprises step S5 ' (not shown), and in described step S5 ', node device is adjusted described resource utilization based on the supplementary of described resource file; And then, from described resource file, select described pending target resource file according to the adjusted resource utilization of described adjusting gear.For example, step S22 ' obtain with the corresponding resource utilization of described resource file after, described node device is according to the supplementary of described resource file, as information such as the temperature of resource file, recommendation degree, adjust described resource utilization, for example when the temperature of described resource file was higher, described node device was correspondingly heightened described resource utilization, perhaps when the temperature of described resource file was hanged down, described node device was correspondingly turned down described resource utilization; Then, in step S3 ', described node device is selected pending target resource file according to adjusted resource utilization.Those skilled in the art will be understood that it only is for example that above-mentioned supplementary based on resource file is adjusted the mode of resource utilization; other existing or modes of adjusting resource utilization based on supplementarys of resource file that may occur from now on are as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
More preferably, the supplementary of described resource file includes but not limited to, below at least each:
1) temperature of resource file;
2) the recommendation degree of resource file;
3) Time To Market of resource file.
1) temperature with resource file is an example, for example, described step S22 ' obtain with the corresponding resource utilization of described resource file after, in step S5 ', described node device is adjusted described resource utilization according to the temperature of described resource file, for example when the temperature of described resource file is higher, described node device is correspondingly heightened described resource utilization, and perhaps when the temperature of described resource file was hanged down, described node device was correspondingly turned down described resource utilization; Then, in step S3 ', described node device is selected pending target resource file according to adjusted resource utilization.
2) the recommendation degree with resource file is an example, for example, described step S22 ' obtain with the corresponding resource utilization of described resource file after, in step S5 ', described node device is adjusted described resource utilization according to the recommendation degree of described resource file, for example when the recommendation degree of described resource file is higher, described node device is correspondingly heightened described resource utilization, and perhaps when the recommendation degree of described resource file hanged down, described node device was correspondingly turned down described resource utilization; Then, in step S3 ', described node device is selected pending target resource file according to adjusted resource utilization.
3) Time To Market with resource file is an example, for example, described step S22 ' obtain with the corresponding resource utilization of described resource file after, in step S5 ', described node device is according to the Time To Market of described resource file, adjust described resource utilization, for example, when the Time To Market of described resource file distance current when nearer, described node device is correspondingly heightened described resource utilization, perhaps when the Time To Market of described resource file early the time, described node device is correspondingly turned down described resource utilization; Then, in step S3 ', described node device is selected pending target resource file according to adjusted resource utilization.In addition, described node device also can be based on the combination in any in the Time To Market of the recommendation degree of the temperature of resource file, resource file, resource file, adjust and the corresponding resource utilization of described resource file, and then select pending target resource file according to adjusted resource utilization.Those skilled in the art will be understood that the supplementary of above-mentioned resource file is only for giving an example; the supplementary of other resource files existing or that may occur from now on is as applicable to the present invention; also should be included in the protection domain of the present invention, and be contained in this with way of reference.
Preferably, on the basis of embodiment that above-mentioned Fig. 4 describes, among the step S3 ', described node device based on described resource utilization, is selected pending target resource file also according to default screening rule from described resource file.More preferably, described default screening rule based on following at least each: ordering, threshold ratio is right.Sorting based on the resource utilization to described resource file with described default screening rule is example, in step S3 ', described node device step S22 ' is obtained with the corresponding resource utilization of described resource file according to from high to low or order from low to high sort, select several the minimum resource files of resource utilization in this sequence then, as several resource files (when sorting from high to low) of sequence tail end or several resource files (when sorting from low to high) of sequence header, as pending target resource file.Compare based on the resource utilization of described resource file and utilization factor threshold value with described default screening rule and to be example, in step S3 ', what described node device was obtained step S22 ' compares with corresponding resource utilization of described resource file and utilization factor threshold value, for example, the resource file that resource utilization is higher than described utilization factor threshold value is labeled as " handling ", and the resource file that resource utilization is lower than described utilization factor threshold value is labeled as " pending ", select then all be labeled as " pending ' ' resource file, as pending target resource file.In addition, described node device can also be with ordering and threshold ratio to combining, based on described resource utilization, and the pending target resource file of selection from described resource file.Those skilled in the art will be understood that above-mentioned default screening rule only for giving an example, and other default screening rules existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and are contained in this with way of reference.
Preferably, on the basis of embodiment that above-mentioned Fig. 4 describes, among the step S4 ', described node device also is transferred to second storage space with described target resource file from first storage space of described node device, to discharge in described first storage space and the corresponding storage area of described target resource file.Herein first storage space and second storage space include but not limited to, hard disk, internal memory, external USB storage part, portable hard drive.
Preferably, on the basis of embodiment that above-mentioned Fig. 4 describes, among the step S1 ', described node device is also according to default trigger condition, obtain the resource file in first storage space of described node device, wherein, described default trigger condition based on following at least each:
1) active volume of described first storage space is lower than preset capacity;
2) described first storage space active volume deficiency when receiving data download;
3) memory capacity of described first storage space is full;
4) obtain time interval of described resource file.
1) being lower than preset capacity with described default trigger condition based on the active volume of described first storage space is example, when the active volume of described first storage space is lower than preset capacity, in step S1 ', described node device is by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains described node device.For example, node device preestablishes disk retained storage capacity (being preset capacity), as 2G bytes of memory zone, so that first storage space of this node device all has at least 2G bytes of memory zone to store new resource file at any time, when the active volume of described first storage space is lower than preset capacity, in step S1 ', described node device is by such as the canned data concordance list that reads described first storage space or scan resource file in first storage space that first storage space obtains described node device.
2) be example with described default trigger condition based on described first storage space active volume deficiency when receiving data download, when active volume is not enough when described first storage space receives data download, in step S1 ', described node device is by obtaining the resource file in described first storage space such as the canned data concordance list that reads described first storage space or first storage space that scans described node device.For example, node device is in the process that receives data download, active volume in first storage space is not enough to hold data downloaded soon, at this moment, described node device is by obtaining the resource file in described first storage space such as the canned data concordance list that reads described first storage space or first storage space that scans described node device.
3) completely be example with described default trigger condition based on the memory capacity of described first storage space, when the memory capacity of described first storage space has expired, in step S1 ', described node device is by obtaining the resource file in described first storage space such as the canned data concordance list that reads described first storage space or first storage space that scans described node device.For example, when the memory capacity of described first storage space completely can't be stored new resource file, in step S1 ', described node device is by obtaining the resource file in described first storage space such as the canned data concordance list that reads described first storage space or first storage space that scans described node device.
4) be example with described default trigger condition based on the time interval of obtaining described resource file, described node device sets in advance the time interval of obtaining described resource file, so that eliminate resource file according to the utilization factor of resource file termly, in step S1 ', described node device is according to this time interval, as every 2 weeks, by obtain the resource file in described first storage space such as the canned data concordance list that reads described first storage space or first storage space that scans described node device.Preferably, described node device is also according to the combination in any of above-mentioned default trigger condition, obtains the resource file in first storage space of described node device.Those skilled in the art will be understood that above-mentioned default trigger condition only for giving an example, and other default trigger conditions existing or that may occur from now on also should be included in the protection domain of the present invention as applicable to the present invention, and are contained in this with way of reference.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and under the situation that does not deviate from spirit of the present invention or essential characteristic, can realize the present invention with other concrete form.Therefore, no matter from which point, all should regard embodiment as exemplary, and be nonrestrictive, scope of the present invention is limited by claims rather than above-mentioned explanation, therefore is intended to include in the present invention dropping on the implication that is equal to important document of claim and all changes in the scope.Any Reference numeral in the claim should be considered as limit related claim.In addition, obviously other unit or step do not got rid of in " comprising " speech, and odd number is not got rid of plural number.A plurality of unit of stating in system's claim or device also can be realized by software or hardware by a unit or device.The first, the second word such as grade is used for representing title, and does not represent any specific order.

Claims (22)

1. method that in the node device of peer-to-peer network, is used for eliminating resource file based on resource utilization, wherein, this method may further comprise the steps:
A obtains the resource file in first storage space of described node device;
B obtains and the corresponding resource utilization of described resource file according to described resource file;
C selects pending target resource file according to described resource utilization from described resource file;
D carries out deletion action to described target resource file, to discharge in described first storage space and the corresponding storage area of described target resource file.
2. method according to claim 1, wherein, described step b also comprises:
B1 obtains and the corresponding resource characteristic information of described resource file according to described resource file;
B2 obtains and the corresponding resource utilization of described resource file according to described resource characteristic information.
3. method according to claim 2, wherein, described resource characteristic information comprise following at least each:
The life period of-described resource file;
-described resource file upload data volume;
The file size of-described resource file.
4. method according to claim 3, wherein, described step b2 also comprises:
-according to described resource characteristic information, obtain and the corresponding resource utilization of described resource file, wherein, described resource utilization satisfies following relational expression:
U = V upload L ;
Wherein, U represents resource utilization, V UploadRepresent the data volume of uploading of described resource file, L represents the file size of described resource file.
5. according to each described method in the claim 1 to 4, wherein, described method also comprises step:
-based on the supplementary of described resource file, adjust described resource utilization;
Wherein, described step c also comprises:
-according to described adjusted resource utilization, from described resource file, select described pending target resource file.
6. method according to claim 5, wherein, the supplementary of described resource file comprise following at least each:
The temperature of-described resource file;
The recommendation degree of-described resource file;
The Time To Market of-described resource file.
7. according to each described method in the claim 1 to 6, wherein, described step c also comprises:
-according to default screening rule,, from described resource file, select described pending target resource file based on described resource utilization.
8. method according to claim 7, wherein, described default screening rule based on following at least each:
-ordering;
-threshold ratio is right.
9. according to each described method in the claim 1 to 8, wherein, described steps d also comprises:
-described target resource file is transferred to second storage space of described node device from described first storage space, to discharge in described first storage space and the corresponding storage area of described target resource file.
10. according to each described method in the claim 1 to 9, wherein, described step a also comprises:
-according to default trigger condition, obtain the resource file in described first storage space;
Wherein, described default trigger condition based on following at least each:
The active volume of-described storage space is lower than preset capacity;
-described storage space is the active volume deficiency when receiving data download;
The memory capacity of-described storage space is full;
-obtain the time interval of described resource file.
11. according to each described method in the claim 1 to 10, wherein, described peer-to-peer network comprises:
-pure distributed P2P network;
-hybrid-type P2P network.
12. a node device that is used for eliminating based on resource utilization resource file in peer-to-peer network, wherein, described node device comprises:
First deriving means is used for obtaining the resource file of first storage space of described node device;
Second deriving means is used for according to described resource file, obtains and the corresponding resource utilization of described resource file;
Selecting arrangement is used for according to described resource utilization, selects pending target resource file from described resource file;
Actuating unit is used for described target resource file is carried out deletion action, to discharge in described first storage space and the corresponding storage area of described target resource file.
13. node device according to claim 12, wherein, described second deriving means also comprises:
The 3rd deriving means is used for according to described resource file, obtains and the corresponding resource characteristic information of described resource file;
The 4th deriving means is used for according to described resource characteristic information, obtains and the corresponding resource utilization of described resource file.
14. node device according to claim 13, wherein, described resource characteristic information comprise following at least each:
The life period of-described resource file;
-described resource file upload data volume;
The file size of-described resource file.
15. node device according to claim 14, wherein, described the 4th deriving means also is used for:
-according to described resource characteristic information, obtain and the corresponding resource utilization of described resource file, wherein, described resource utilization satisfies following relational expression:
U = V upload L ;
Wherein, U represents resource utilization, V UploadRepresent the data volume of uploading of described resource file, L represents the file size of described resource file.
16. according to each described node device in the claim 12 to 15, wherein, described node device also comprises adjusting gear, is used for:
-based on the supplementary of described resource file, adjust described resource utilization;
Wherein, described selecting arrangement also comprises:
-according to described adjusted resource utilization, from described resource file, select described pending target resource file.
17. node device according to claim 16, wherein, the supplementary of described resource file comprise following at least each:
The temperature of-described resource file;
The recommendation degree of-described resource file;
The Time To Market of-described resource file.
18. according to each described node device in the claim 12 to 17, wherein, described selecting arrangement also is used for:
-according to default screening rule,, from described resource file, select described pending target resource file based on described resource utilization.
19. node device according to claim 18, wherein, described default screening rule based on following at least each:
-ordering;
-threshold ratio is right.
20. according to each described node device in the claim 12 to 19, wherein, described actuating unit also is used for:
-described target resource file is transferred to second storage space of described node device from described first storage space, to discharge in described first storage space and the corresponding storage area of described target resource file.
21. according to each described node device in the claim 12 to 20, wherein, described first deriving means also is used for:
-according to default trigger condition, obtain the resource file in described first storage space;
Wherein, described default trigger condition based on following at least each:
The active volume of-described storage space is lower than preset capacity;
-described storage space is the active volume deficiency when receiving data download;
The memory capacity of-described storage space is full;
-obtain the time interval of described resource file.
22. according to each described node device in the claim 12 to 21, wherein, described peer-to-peer network comprises:
-pure distributed P2P network;
-hybrid-type P2P network.
CN201110152632.6A 2011-06-08 2011-06-08 Equipment and method for eliminating resource files based on resource utilization rate Expired - Fee Related CN102222094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110152632.6A CN102222094B (en) 2011-06-08 2011-06-08 Equipment and method for eliminating resource files based on resource utilization rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110152632.6A CN102222094B (en) 2011-06-08 2011-06-08 Equipment and method for eliminating resource files based on resource utilization rate

Publications (2)

Publication Number Publication Date
CN102222094A true CN102222094A (en) 2011-10-19
CN102222094B CN102222094B (en) 2014-06-04

Family

ID=44778646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110152632.6A Expired - Fee Related CN102222094B (en) 2011-06-08 2011-06-08 Equipment and method for eliminating resource files based on resource utilization rate

Country Status (1)

Country Link
CN (1) CN102222094B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104717569A (en) * 2013-12-13 2015-06-17 乐视网信息技术(北京)股份有限公司 Data elimination method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874490A (en) * 2006-06-30 2006-12-06 华中科技大学 Disk buffering method in use for video on demand system of peer-to-peer network
CN101471919A (en) * 2007-12-29 2009-07-01 突触计算机系统(上海)有限公司 Method and device for downloading slicing of equipment based on point-to-point transmission protocol
CN101635734A (en) * 2008-07-22 2010-01-27 上海聚力传媒技术有限公司 Method and device for storing and managing downloaded data on non-volatile storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874490A (en) * 2006-06-30 2006-12-06 华中科技大学 Disk buffering method in use for video on demand system of peer-to-peer network
CN101471919A (en) * 2007-12-29 2009-07-01 突触计算机系统(上海)有限公司 Method and device for downloading slicing of equipment based on point-to-point transmission protocol
CN101635734A (en) * 2008-07-22 2010-01-27 上海聚力传媒技术有限公司 Method and device for storing and managing downloaded data on non-volatile storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104717569A (en) * 2013-12-13 2015-06-17 乐视网信息技术(北京)股份有限公司 Data elimination method and device

Also Published As

Publication number Publication date
CN102222094B (en) 2014-06-04

Similar Documents

Publication Publication Date Title
US10581957B2 (en) Multi-level data staging for low latency data access
AU2014212780B2 (en) Data stream splitting for low-latency data access
US7529723B2 (en) Multi-tiered structure for file sharing based on social roles
CN104731516B (en) A kind of method, apparatus and distributed memory system of accessing file
CN111200657B (en) Method for managing resource state information and resource downloading system
US8849898B2 (en) Adaptive collaborative de-duplication
JP5967673B2 (en) Data maintenance methods
US20190037015A1 (en) Peer-to-peer network prioritizing propagation of objects through the network
CN102947799A (en) Delivering messages from message sources to subscribing recipients
US20100250674A1 (en) Content delivery apparatus, content delivery method, and content delivery program
US8208477B1 (en) Data-dependent overlay network
KR102122679B1 (en) Method and system for preventing distribution of illegal contents over the internet
US20140359066A1 (en) System, method and device for offline downloading resource and computer storage medium
EP2141601A1 (en) Content distribution device, content distribution method, and content distribution program
CN107463606B (en) Data compression engine and method for big data storage system
CN110958300A (en) Data uploading method, system, device, electronic equipment and computer readable medium
CN111447265A (en) File storage method, file downloading method, file processing method and related components
US20190171615A1 (en) System, data management method, and file server
KR100876105B1 (en) How to download multimedia contents to wired and wireless terminals
CN102222094A (en) Equipment and method for eliminating resource files based on resource utilization rate
CN111966742A (en) Data migration method and system
EP2765517B1 (en) Data stream splitting for low-latency data access
CN100474809C (en) File transfer method and apparatus
KR101436406B1 (en) Client, server, system and method for updating data based on peer to peer
CN105224438A (en) Based on customer consumption based reminding method and the device of net dish

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140604

Termination date: 20210608