CN104717569A - Data elimination method and device - Google Patents

Data elimination method and device Download PDF

Info

Publication number
CN104717569A
CN104717569A CN201310688003.4A CN201310688003A CN104717569A CN 104717569 A CN104717569 A CN 104717569A CN 201310688003 A CN201310688003 A CN 201310688003A CN 104717569 A CN104717569 A CN 104717569A
Authority
CN
China
Prior art keywords
video data
video
data
threshold value
frequency threshold
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.)
Pending
Application number
CN201310688003.4A
Other languages
Chinese (zh)
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.)
LeTV Information Technology Beijing Co Ltd
Original Assignee
LeTV Information Technology Beijing 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 LeTV Information Technology Beijing Co Ltd filed Critical LeTV Information Technology Beijing Co Ltd
Priority to CN201310688003.4A priority Critical patent/CN104717569A/en
Publication of CN104717569A publication Critical patent/CN104717569A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a data elimination method and device. The method and device can solve the problem that in the prior art, a data elimination scheme of a P2P video layer is not reasonable enough. The data elimination method includes the steps that when data quantity of video data locally stored in the P2P video player reaches a data quantity storage threshold, and the number of downloading times of the video data, played by the P2P video player and downloaded by neighbor nodes of the P2P video player, in the video data is determined; the video data with the number of downloading times not smaller than the threshold are preferentially eliminated.

Description

A kind of data eliminate method and device
Technical field
The present invention relates to video player field, the data particularly relating to a kind of P2P video player eliminate method and device.
Background technology
At P2P(peer-to-peer, point-to-point) in network, each node is the brother of node of equality, any node can to other node be connected with this node, namely the neighbor node of this node serves as client or server, the data of various ways can be shared, as video data, voice data etc. between each node be connected.
Therefore, P2P video player as the node of in P2P network, for the video data play can not carry out immediately eliminate delete, but can store a period of time for its neighbor node download acquisition or video playback time.The video data that P2P video player this locality stores namely for be obtained by P2P video player and to be stored in the video data in the terminal at this P2P video player place, in the internal memory that this video data specifically can be stored in terminal and/or disk.
In prior art; for the video data avoiding P2P video player this locality to store too much takies a large amount of system resource; in prior art; usually a memory data output threshold value can be preset; when the data volume of the video data of P2P video player this locality storage reaches this memory data output threshold value; the video data started having play is eliminated; distance P2P video player current video broadcast point video data far away is more preferentially eliminated, and namely reproduction time video data more early is more preferentially eliminated.
But, the video data adopting above-mentioned data robin scheme to eliminate is probably that the neighbor node of P2P video player needs to download the video data obtained, and the existing data robin scheme only considering the reproduction time of the video data play is obviously reasonable not.
Summary of the invention
The embodiment of the present invention provides a kind of data to eliminate method and device, eliminates irrational problem in order to solve P2P video player data.
The embodiment of the present invention provides a kind of data to eliminate method, comprising:
When the data volume of video data stored when P2P video player this locality reaches memory data output threshold value, determine each video data that the described P2P video player in described video data play respectively by download time that the neighbor node of described P2P video player is downloaded;
The preferential video data eliminated download time and be not less than frequency threshold value.
The embodiment of the present invention also provides a kind of data to eliminate device, comprising:
Determining unit, when the data volume of video data for storing when P2P video player this locality reaches memory data output threshold value, determine each video data that the described P2P video player in described video data play respectively by download time that the neighbor node of described P2P video player is downloaded;
Eliminate unit, for preferentially eliminating the video data that download time is not less than frequency threshold value.
Beneficial effect of the present invention comprises:
In the scheme that the embodiment of the present invention provides, P2P video player is when carrying out superseded to the video data play, take into account the download time downloaded by the neighbor node of this P2P video player of the video data play, compared to the video data being downloaded number of times and being less than frequency threshold value, the preferential superseded video data being downloaded number of times and being not less than frequency threshold value, due to video data be downloaded number of times be not less than frequency threshold value time, show that this video data has been downloaded by the neighbor node of some to obtain, compared to the video data being downloaded number of times and being less than frequency threshold value, being downloaded number of times, to be not less than the follow-up possibility be downloaded of video data of frequency threshold value less, therefore, compared to the data robin scheme of prior art, the data robin scheme that the embodiment of the present invention provides is more reasonable.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for specification, is used from explanation the present invention, is not construed as limiting the invention with the embodiment of the present invention one.In the accompanying drawings:
Fig. 1 eliminates the flow chart of method for data that the embodiment of the present invention provides;
Fig. 2 eliminates the detail flowchart of method for data that the embodiment of the present invention provides;
Fig. 3 eliminates the structural representation of device for data that the embodiment of the present invention provides.
Embodiment
The implementation of video data is rationally eliminated in order to provide P2P video player, embodiments provide a kind of data and eliminate method and device, in conjunction with Figure of description, the preferred embodiments of the present invention are described, be to be understood that, preferred embodiment described herein, only for instruction and explanation of the present invention, is not intended to limit the present invention.And when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Embodiments provide a kind of data and eliminate method, as shown in Figure 1, comprising:
When step 101, the data volume of video data stored when P2P video player this locality reach memory data output threshold value, determine each video data that this P2P video player in this video data play respectively by download time that the neighbor node of this P2P video player is downloaded;
Step 102, the preferential video data eliminated download time and be not less than frequency threshold value.
Namely the data embodiments provided are eliminated in method, and each video data play by P2P video player is divided into two classes: be downloaded number of times and be not less than the playing video data of frequency threshold value and be downloaded the playing video data that number of times is less than frequency threshold value.When carrying out data and eliminating, compared to the playing video data being downloaded number of times and being less than frequency threshold value, preferentially eliminate the playing video data being downloaded number of times and being not less than frequency threshold value.
In one embodiment of the invention, specifically when superseded download time is not less than the video data of frequency threshold value, can be not less than in the video data of frequency threshold value in download time and eliminate at random.
In another embodiment of the present invention, specifically when superseded download time is not less than the video data of frequency threshold value, also can according to the first rule of elimination arranged, the preferential video data eliminated download time and be not less than frequency threshold value; Wherein, this first rule of elimination can comprise: distance P2P video player current video broadcast point video data far away is more preferentially eliminated; Preferably, this first rule of elimination comprises: the video data that download time is more is more preferentially eliminated.Be not less than in the video data of frequency threshold value being downloaded number of times, being downloaded the more video datas of number of times, follow-up to be downloaded by neighbor node the possibility obtained less.
Further, when there is not download time in each video data that this has been play and being not less than the video data of frequency threshold value, this each video data play can be eliminated according to the second rule of elimination arranged; Wherein, this second rule of elimination can comprise: distance P2P video player current video broadcast point video data far away is more preferentially eliminated; Preferably, this second rule of elimination comprises: according to download time by few order at the most, eliminate each video data play successively.Be less than in the video data of frequency threshold value being downloaded number of times, being downloaded the fewer video data of number of times, follow-up to be downloaded by neighbor node the possibility obtained less.
Above-mentioned frequency threshold value specifically can according to the quantity set of the neighbor node of P2P video player, such as, can be the prescribed percentage of the quantity of the neighbor node of P2P video player based on user's request, actual conditions set point number threshold value.
In embodiments of the present invention, frequency threshold value is specifically set as the half of the quantity of the neighbor node of P2P video player.Namely, after the video data play when P2P video player is downloaded acquisition by the neighbor node of the half of this P2P video player, when carrying out data and eliminating, this is preferentially eliminated by the video data play that the neighbor node of half downloads acquisition.
Due to, compared to the video data being downloaded number of times and being less than frequency threshold value, being downloaded number of times, to be not less than the follow-up possibility be downloaded of video data of frequency threshold value less, therefore, the data that the embodiment of the present invention provides eliminate method, the preferential superseded video data being downloaded number of times and being not less than frequency threshold value, more reasonable compared to the data robin scheme of prior art.
Below in conjunction with accompanying drawing, with specific embodiment, the data method of eliminating that the embodiment of the present invention provides is described in detail.
Embodiment 1:
In the embodiment of the present invention 1, video data piecemeal is downloaded by P2P video player, stores data block, eliminates the base unit of video data as P2P video player.
Figure 2 shows that data that the embodiment of the present invention 1 provides eliminate the flow chart of method, specifically comprise:
Step 201, judge whether the data volume of video data that P2P video player this locality stores reaches memory data output threshold value.
When determining that the data volume of the video data that P2P video player this locality stores reaches memory data output threshold value, enter step 202;
When determining that the data volume of the video data that P2P video player this locality stores does not reach memory data output threshold value, circulation performs this step 201, carries out cycle criterion.
Memory data output threshold value can set based on user's request, actual conditions in advance, and this is prior art, is not described in detail in this.
Step 202, judge whether there is the block of video data that P2P video player play in the video data that P2P video player this locality stores.
When there is the block of video data that P2P video player has been play in the video data determining the storage of P2P video player this locality, enter step 203;
When there is not the block of video data that P2P video player has been play in the video data determining the storage of P2P video player this locality, circulation performs this step 202, carry out cycle criterion, and, a large amount of system resource is taken for the video data avoiding P2P video player this locality to store gets more and more, now, P2P video player can suspend the download of video data, when determining to there is the block of video data that P2P video player play in the video data that P2P video player this locality stores, when namely can carry out video data superseded, P2P video player opens the download of video data again.
Step 203, determine in the video data that P2P video player this locality stores, each block of video data of having play of P2P video player is respectively by download time that the neighbor node of this P2P video player is downloaded.
This step 203 essence is determine that each block of video data that P2P video player has been play was obtained by how many neighbor nodes downloads respectively.
Step 204, judge whether there is the block of video data being downloaded number of times and being not less than frequency threshold value in each block of video data that P2P video player has been play.
When determine not exist in each block of video data that P2P video player has been play be downloaded number of times be not less than the block of video data of frequency threshold value time, enter step 205;
When determine in each block of video data that P2P video player has been play exist be downloaded number of times be not less than the block of video data of frequency threshold value time, enter step 206.
In embodiments of the present invention, frequency threshold value is specifically set as the half of the quantity of the neighbor node of P2P video player.Whether namely this step 204 judges in each block of video data that P2P video player has been play, exist and downloaded by the neighbor node of at least half the block of video data obtained.
The quantity supposing the neighbor node of P2P video player is 10, then frequency threshold value is set as 5.Now whether this step 204 is specially in each block of video data judging that P2P video player has been play to exist and is downloaded the block of video data that number of times is not less than 5 times.
Carry out data in step 205, each block of video data of having play at P2P video player to eliminate, the block of video data being downloaded number of times fewer is more preferentially eliminated.
Further, being downloaded in the identical video data of number of times, can eliminate at random, preferably, can more preferentially be eliminated by the video data far away apart from P2P video player current video broadcast point.
This secondary data is eliminated flow process and is terminated.
Carry out data in step 206, each block of video data of having play at P2P video player to eliminate, preferentially eliminate the block of video data being downloaded number of times and being not less than frequency threshold value.
And be not less than in the block of video data of frequency threshold value being downloaded number of times, the video data being downloaded number of times more is more preferentially eliminated; Be less than in the video data of frequency threshold value being downloaded number of times, the video data being downloaded number of times fewer is more preferentially eliminated.
Further, being downloaded in the identical video data of number of times, can eliminate at random, the scheme also can taked with step 205 is identical, and distance P2P video player current video broadcast point video data far away is more preferentially eliminated.
This secondary data is eliminated flow process and is terminated.
When superseded video data, often can perform a secondary data and eliminate the video data that flow process only eliminates unit data quantity.Preferably, for avoiding frequent execution to eliminate flow process, often can perform a secondary data and eliminating the video data that flow process eliminates preset data amount.
Visible, adopt the scheme that the embodiment of the present invention 1 provides, more reasonable compared to prior art, the experience of user can be improved.
In the specific implementation, there is a kind of comparatively special situation, i.e. the situation of a P2P video player loop play video.When P2P video player starts to play this video after second time or second time, if the data volume of the video data of now P2P video player this locality storage reaches memory data output threshold value, need to carry out data to eliminate, for the broadcasting of this (second time or second time after) this video, playing video data may not be there is, but the P2P video player last time may download the video data of this video most end portion when playing this video, although for the broadcasting of this this video, the video data of this most end portion is the video data do not play, but in order to ensure the fluency of video playback, be not positioned at the prerequisite of emergency data download area and time emergency data download area (P2P download area) at the video data of this most end portion under, namely under the prerequisite that the video data distance current playing point of this most end portion is far away, also number of times can be downloaded according to video data, the video data of this most end portion is eliminated.
Embodiment 2:
Based on same inventive concept, eliminate method according to the data that the above embodiment of the present invention provides, correspondingly, the embodiment of the present invention 2 also provides a kind of data to eliminate device, as shown in Figure 3, specifically comprises:
Determining unit 301, when the data volume of video data for storing when P2P video player this locality reaches memory data output threshold value, determine each video data that this P2P video player in this video data play respectively by download time that the neighbor node of this P2P video player is downloaded;
Eliminate unit 302, for preferentially eliminating the video data that download time is not less than frequency threshold value.
Preferably, eliminate unit 302, specifically for according to the first rule of elimination arranged, preferentially eliminate the video data that download time is not less than frequency threshold value; Wherein, this first rule of elimination comprises: the video data that download time is more is more preferentially eliminated.
Preferably, eliminate unit 302, also for when there is not download time in each video data that this has been play and being not less than the video data of frequency threshold value, eliminate this each video data play according to the second rule of elimination arranged;
Further, this frequency threshold value is according to the quantity set of the neighbor node of this P2P video player.
Further, this frequency threshold value is specially the half of the quantity of the neighbor node of this P2P video player.
The function of above-mentioned each unit may correspond to the respective handling step in flow process shown in Fig. 1 or Fig. 2, does not repeat them here.
In sum, the data robin scheme that the embodiment of the present invention provides, comprise: when the data volume of video data stored when P2P video player this locality reaches memory data output threshold value, determine each video data that this P2P video player in this video data play respectively by download time that the neighbor node of this P2P video player is downloaded; The preferential video data eliminated download time and be not less than frequency threshold value.The scheme adopting the embodiment of the present invention to provide, can improve the reasonability that P2P video player data are eliminated.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the embodiment of the present invention and not depart from the spirit and scope of the embodiment of the present invention.Like this, if these amendments of the embodiment of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. data eliminate a method, it is characterized in that, comprising:
When the data volume of video data stored when P2P video player this locality reaches memory data output threshold value, determine each video data that the described P2P video player in described video data play respectively by download time that the neighbor node of described P2P video player is downloaded;
The preferential video data eliminated download time and be not less than frequency threshold value.
2. the method for claim 1, is characterized in that, the preferential video data eliminated download time and be not less than frequency threshold value, specifically comprises:
According to the first rule of elimination arranged, the preferential video data eliminated download time and be not less than frequency threshold value;
Wherein, described first rule of elimination comprises: the video data that download time is more is more preferentially eliminated.
3. method as claimed in claim 1 or 2, is characterized in that, also comprise:
When there is not download time in the described each video data play and being not less than the video data of frequency threshold value, each video data play described in eliminating according to the second rule of elimination arranged;
Wherein, described second rule of elimination comprises: according to download time by few order at the most, eliminate each video data play successively.
4. the method for claim 1, is characterized in that, described frequency threshold value is according to the quantity set of the neighbor node of described P2P video player.
5. method as claimed in claim 4, it is characterized in that, described frequency threshold value is specially the half of the quantity of the neighbor node of described P2P video player.
6. data eliminate a device, it is characterized in that, comprising:
Determining unit, when the data volume of video data for storing when P2P video player this locality reaches memory data output threshold value, determine each video data that the described P2P video player in described video data play respectively by download time that the neighbor node of described P2P video player is downloaded;
Eliminate unit, for preferentially eliminating the video data that download time is not less than frequency threshold value.
7. device as claimed in claim 6, is characterized in that, described superseded unit, specifically for according to the first rule of elimination arranged, preferentially eliminates the video data that download time is not less than frequency threshold value;
Wherein, described first rule of elimination comprises: the video data that download time is more is more preferentially eliminated.
8. device as claimed in claims 6 or 7, described superseded unit, also for when there is not download time in the described each video data play and being not less than the video data of frequency threshold value, each video data play described in eliminating according to the second rule of elimination arranged;
Wherein, described second rule of elimination comprises: according to download time by few order at the most, eliminate each video data play successively.
9. device as claimed in claim 6, it is characterized in that, described frequency threshold value is according to the quantity set of the neighbor node of described P2P video player.
10. device as claimed in claim 9, it is characterized in that, described frequency threshold value is specially the half of the quantity of the neighbor node of described P2P video player.
CN201310688003.4A 2013-12-13 2013-12-13 Data elimination method and device Pending CN104717569A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310688003.4A CN104717569A (en) 2013-12-13 2013-12-13 Data elimination method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310688003.4A CN104717569A (en) 2013-12-13 2013-12-13 Data elimination method and device

Publications (1)

Publication Number Publication Date
CN104717569A true CN104717569A (en) 2015-06-17

Family

ID=53416447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310688003.4A Pending CN104717569A (en) 2013-12-13 2013-12-13 Data elimination method and device

Country Status (1)

Country Link
CN (1) CN104717569A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110062280A (en) * 2019-04-23 2019-07-26 湖南快乐阳光互动娱乐传媒有限公司 A kind of video cache management, playback method, system and medium towards P2P
CN111385643A (en) * 2020-03-20 2020-07-07 北京字节跳动网络技术有限公司 Method and device for storing data, electronic equipment and storage medium

Citations (5)

* 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
CN101635734A (en) * 2008-07-22 2010-01-27 上海聚力传媒技术有限公司 Method and device for storing and managing downloaded data on non-volatile storage medium
CN102222094A (en) * 2011-06-08 2011-10-19 上海聚力传媒技术有限公司 Equipment and method for eliminating resource files based on resource utilization rate
CN103051975A (en) * 2012-12-31 2013-04-17 乐视网信息技术(北京)股份有限公司 P2P (peer to peer) cache data elimination method
CN103365977A (en) * 2013-06-28 2013-10-23 北京奇艺世纪科技有限公司 Storage processing method and device for data on nonvolatile storage medium

Patent Citations (5)

* 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
CN101635734A (en) * 2008-07-22 2010-01-27 上海聚力传媒技术有限公司 Method and device for storing and managing downloaded data on non-volatile storage medium
CN102222094A (en) * 2011-06-08 2011-10-19 上海聚力传媒技术有限公司 Equipment and method for eliminating resource files based on resource utilization rate
CN103051975A (en) * 2012-12-31 2013-04-17 乐视网信息技术(北京)股份有限公司 P2P (peer to peer) cache data elimination method
CN103365977A (en) * 2013-06-28 2013-10-23 北京奇艺世纪科技有限公司 Storage processing method and device for data on nonvolatile storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110062280A (en) * 2019-04-23 2019-07-26 湖南快乐阳光互动娱乐传媒有限公司 A kind of video cache management, playback method, system and medium towards P2P
CN111385643A (en) * 2020-03-20 2020-07-07 北京字节跳动网络技术有限公司 Method and device for storing data, electronic equipment and storage medium
CN111385643B (en) * 2020-03-20 2022-04-05 北京字节跳动网络技术有限公司 Method and device for storing data, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP2021516395A (en) Resource configuration method, equipment, terminals, and storage media
US20170192819A1 (en) Method and electronic device for resource allocation
CN102857578B (en) A kind of file uploading method of network hard disc, system and net dish client
KR20140004799A (en) Peer-to-peer data migration
CN103648059A (en) Advertisement broadcasting method and apparatus
CN104244083A (en) Online video downloading method and electronic device
CN106028092A (en) Television screenshot sharing method and device
CN104219561A (en) Method and user equipment for cleaning offline videos
JP2016502781A5 (en)
CN106775470B (en) Data storage method and system
CN111367558A (en) Data updating method and device for application program
CN105245500A (en) Multimedia resource sharing method and device
CN109962947B (en) Task allocation method and device in peer-to-peer network
CN105025358A (en) Video playing method and device based on EPG
JP6587997B6 (en) Sliding window management method and system for time machine function
CN102611734A (en) Mirroring instance starting method and device based on cloud computing
CN104932986A (en) Data redistribution method and apparatus
CN104717569A (en) Data elimination method and device
CN104486347A (en) Method and device for pushing multimedia
CN103365977A (en) Storage processing method and device for data on nonvolatile storage medium
CN103647755A (en) Advertisement broadcasting method, server, client and system
CN103634385A (en) System, method and server for data synchronizing
CN111698281B (en) Resource downloading method and device, electronic equipment and storage medium
CN104735115A (en) P2P downloading method and device
CN104735482A (en) Video pushing implementation method, system and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150617