Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Faster P2P By Matching Similiar Files?

Posted by CmdrTaco on Wed Apr 11, 2007 10:45 AM
from the something-doesn't-jive-here dept.
Andreaskem writes "A Carnegie Mellon University computer scientist says transferring large data files, such as movies and music, over the Internet could be sped up significantly if peer-to-peer (P2P) file-sharing services were configured to share not only identical files, but also similar files. "SET speeds up data transfers by simultaneously downloading different chunks of a desired data file from multiple sources, rather than downloading an entire file from one slow source. Even then, downloads can be slow because these networks can't find enough sources to use all of a receiver's download bandwidth. That's why SET takes the additional step of identifying files that are similar to the desired file... No one knows the degree of similarity between data files stored in computers around the world, but analyses suggest the types of files most commonly shared are likely to contain a number of similar elements. Many music files, for instance, may differ only in the artist-and-title headers, but are otherwise 99 percent similar.""
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Nickelback? (Score:5, Funny)

    by onemorehour (162028) * on Wednesday April 11 2007, @10:46AM (#18690017)

    Many music files, for instance, may differ only in the artist-and-title headers, but are otherwise 99 percent similar.


    Well, sure, if you're only looking at Nickelback [thewebshite.net] songs.
    • Re:Nickelback? (Score:5, Informative)

      by beckerist (985855) on Wednesday April 11 2007, @10:54AM (#18690193) Homepage
      The idea is that the song "Girl Talk - Once Again" might be represented as "girltalk-onceagain" "girl talk - once again" "GirlTalk - Once Again" "01-once again.mp3" "OnceAgain.mp3"

      Being that the only difference is just the text (ID3, ID3-2) tags, the rest of the song is exactly the same, so why can't you use that as a download source too? I personally organize all of my music, and because of this P2P programs believe that it's an entirely new file, when really it was just renamed and the header information was changed (generally to be grammatically correct.)</summary>
      • Re:Nickelback? (Score:5, Interesting)

        by thepotoo (829391) <thepotoospam@yah[ ]com ['oo.' in gap]> on Wednesday April 11 2007, @11:17AM (#18690599)
        If you use bittorrent, the DHT protocol (supported by Azureus, BitComet, and uTorrent, among others) does the exact thing you're describing. It checks MD5 hashes for files (the whole file, not the pieces, I think), and connects you to peers which have the same file.
        DHT even supports partially corrupted files, your client just discards the corrupt data.

        My question is, why would I want to use SET over DHT? Does SET not need a ceneralized server, or does it have any other advantage at all?
        TFA is really short on technical details, but it sounds to me as though SET is just a re-design of DHT. Still, I imagine SET support will be in the next builds of all the major bittorrent clients if it ends up being worth something.

        • Re:Nickelback? (Score:4, Informative)

          by Robotech_Master (14247) * on Wednesday April 11 2007, @11:46AM (#18691075) Homepage Journal
          If I understand the article right, SET looks at individual files within a particular download. DHT just looks at the whole download.

          For instance, if I'm uploading my "Songs I Like to Dance To" mp3 mix, and someone else is uploading an "All-Time Greatest Dance Hits" CD rip, and there are a couple of songs both uploads have in common, SET would enable someone downloading my MP3 mix to treat the CD rip as a partial seed (and vice versa), and pull down the songs held in common from either one.

          Whereas DHT would simply enable people to pull down my mix from other people uploading the mix, or the CD rip from other people uploading the CD rip, even if the tracker was down. (If I understand what DHT does correctly. Which it is possible I don't.)
        • Re:Nickelback? (Score:5, Interesting)

          by Andy Dodd (701) <atd7@PLANCKcornell.edu minus physicist> on Wednesday April 11 2007, @11:46AM (#18691089) Homepage
          If I recall correctly, DHT takes the file name into account when calculating the hash. Thus identical files with different names are treated differently.

          Some P2P protocols allow looking up a file by a hash which does not take filename into account, but this will not handle the case where the files differ in only one small section. The best example is the following:
          Person downloads an MP3.
          Person finds that the MP3 is not properly tagged (for example, has a comment field saying who ripped it/released the rip, and has no track number.)
          Person changes the MP3's ID3 tag
          Now, nearly all existing P2P protocols will treat the new file as a completely different file, when in reality the most important contents (the audio itself) have not changed, only the file's metadata.
          Other users will go for the "full-file" match with the largest number of sources, thus causing the mistagged MP3 to propagate more than a "fixed" one.

          So a P2P system that ignores the ID3 tag when hashing would have significant advantages, in which the user could download the file from many sources and then choose which source to get their metadata from.
          • Re: (Score:3, Informative)

            Actually, DHT doesn't care about file names. You can test this yourself if you have a LAN. Grab a torrent, start downloading it on one computer (save as a different filename), get a little of the file downloaded, and start the same torrent on a different computer. Use your firewall to block the second computer's access to the tracker. DHT will kick in, your computers will log in, get each other's IPs, and computer 2 will get an insanely fast download speed until it catches up with computer 1.
            Tested on u
          • Re: (Score:3, Informative)

            Some P2P protocols allow looking up a file by a hash which does not take filename into account,

            By "Some", you mean "Every Single Frickin' One Of Them", right?

            nearly all existing P2P protocols will treat the new file as a completely different file,

            No. Only the most brain-dead P2P protocols will. "tree" hashes are in use by several P2P protocols. Some are just old or primitive, and have a large number of old servants around that don't understand newer hashes.

      • Re:Nickelback? (Score:4, Interesting)

        by hey! (33014) on Wednesday April 11 2007, @11:41AM (#18690987) Homepage Journal
        I don't think this is just about inconsistent metadata.

        I think what he's talking about may be more like the document fingerprinting algorithms used to pare search engine results, or to detect plagiarism in student papers.

        In some cases you will be downloading components of a file from two sources, neither of which have the others' component. The example in TFA was downloading the video portion of a movie from a foreign language site and the audio from a site with the language you speak but less bandwidth.

        I suppose another example would be that if you were downloading an anthology of stories, you could take a particular story from a server that hosted a different anthology including that story. Or maybe you are downloading the new distro; you could take some of your files from sites offering the distro version you are looking for, some from sites only offering the files you need to upgrade to that version, and some from entirely different distros or much older versions if they happened to be the same.

        I guess it could be thought of as a kind of "fuzzy akamai".

        It's an interesting idea, but I don't see any commercial support for it. In fact I see commercial opposition under the current regime of copyright laws and royalty based business models.

      • Re: (Score:3, Insightful)

        The only thing I use the file sharing networks for is to download new images of FreeBSD and Linux using BitTorrent.

        The last thing I want is a "similar" file.

        What would be a "similar" file to a FreeBSD ISO? It would either be a corrupted file or one with an introduced exploit.
        • Re:TorrentSoup (Score:5, Informative)

          by joe_cot (1011355) on Wednesday April 11 2007, @11:06AM (#18690417) Homepage
          It would still work the same way as it does now: an md5 of each specific block, and an md5 of the whole thing. If the md5 for the block doesn't match, it's not going to download, and if it's someone using collision to inject a block with the same md5, 1) it's not going to pass the md5 on the whole thing, 2) you're already vulnerable to it. The reason this will work is that they'll be lots of people sharing incomplete or corrupted versions of your FreeBSD iso; you'll get the blocks that are good, and skip the blocks that aren't, making "similar" files very useful. Not too difficult to understand, and no need for tin foil hats.
        • Re:TorrentSoup (Score:4, Interesting)

          by ShieldW0lf (601553) on Wednesday April 11 2007, @11:41AM (#18690979) Journal
          So if someone is sharing an older ISO, and it happens to have large portions that exactly match the one you're downloading, with other portions that are not identical, you don't want to download the identical chunks off that person?

          It would be interesting if the implementing software could also look for possible matches within your existing file structure and reduce the data downloaded automatically, kind of like using diff and just downloading the patch.
          • Re:TorrentSoup (Score:4, Informative)

            by CastrTroy (595695) on Wednesday April 11 2007, @11:58AM (#18691255) Homepage
            I'm not sure if this would work if you changed the byte offset though. Sure both ISOs may contain a lot of the same data, but I think it's very unlikely that the data would be at the same byte-offset in the file. I don't think that you'd be able to accomplish this for different byte offsets, because for a 100 MB File, assuming 5 MB chunks, You're looking at about 2,000,000,000 chunks to calculate (20 chunks, calculated at each byte offset).
      • Re:TorrentSoup (Score:4, Insightful)

        by drix (4602) on Wednesday April 11 2007, @11:27AM (#18690749) Homepage
        Because it gets you published and, thus, increases your chance for tenure, that from which all blessings flow.
  • I'm hoping this CATCHES ON and wet ransfer a11 sorts of information like this. It'11 be 1ike getting every thing in the form of a ransom n0te.
  • by Vollernurd (232458) on Wednesday April 11 2007, @10:51AM (#18690111) Homepage
    So it's not me then? All new tunes DO sound the same?
  • porn.

    No wait, hear me out. Most porn is going to be largely white or black skin colour (particularly with Friesian Cows if you're into that sort of thing), so the P2P can just find a chunk with a similar amount of that colour and download that!
  • Summary: (Score:5, Informative)

    by PhrostyMcByte (589271) <phrosty@gmail.com> on Wednesday April 11 2007, @10:53AM (#18690153) Homepage
    instead of sharing files, divide them into 16KB chunks and share those, to help work around files that get renamed or trivially altered (eg a website tagging their url to all the files you upload).
  • LOTS of overhead just to find the chunks.
    The article talks about 16kb chunks, which for a dvd image would take more than the torrent protocol currently allows.

    The client would spend more time communicating its chunk lists around than actually getting data.

    (If I remember rightly, torrents can have a max of 65535 chunks and some servers prevent huge .torrent files which contain the chunk breakpoints anyway)
  • not particularly new. many P2Ps have been grouping identical files together. i know one of the early ones did it (was it Napster, Audiogalaxy?), but i think only if the files were 100% identical other than the filename.

    there's definitely potential for problem here. what if those files really arent supposed to be the same? a swapped byte here and there could have huge effects on the end result.
  • Wouldn't this generate a lot more overhead traffic?
    I'm sure smarter people than I have already thought this out,
    but that seems to be the most immediate downside.

    "SET divides a one-gigabyte file into 64,000 16-kilobyte chunks"

    In other words: instead of seeking out the one master-hash for the file,
    your P2P is looking up the thousands of chunk hashes.

  • I have no idea what the overheads might be for their "handprinting" algorithms, or how effective they are. But I've wondered in the past whether something vaguely similar could be achieved by for example hashing each stream and headers separately in audio and video files, or each file within an archive. The same could apply to any container format. That would certainly deal with e.g. the same mp3 with different ID3 tags, and the overheads might be lower. Could get messy though, I guess.
  • by Anonymous Coward
    I think everyone posting above saying "it won't work" should RTFA.

    This works by breaking files down into clusters and hashing the clusters (like Bittorrent already does). Then it searches for other shares that have clusters with the same hash value, and requests them.

    Assuming that the hashing scheme being used it "good" in that there are no collisions, two clusters with the same hash will contain the *exact same* information.

    Should work just fine.
  • Of COURSE all files are "basically" the same, after all its just a set of 1s and 0s, and given that you already have lots of 1s and 0s on your machine this means that you already have the file even before you download it. It reminds me of Eric Morcambe and Andre Previn Previn: You were playing all the wrong notes Morcambe: No I was playing all the right notes just not necessarily in the right order
  • This is just an illustration of the fact that P2P is an incredibly inefficient way of transferring files around. Most of the material is not only pirated, but a big fraction of the pirated material is the same stuff. P2P "peers" aren't necessarily nearby, either in a physical or bandwidth sense. So huge amounts of bandwidth are being spent shipping the same stuff around.

    If it weren't for the piracy issue, the daily output of the RIAA, which is a few gigabytes, could be distributed efficiently by putti

  • by dduardo (592868) on Wednesday April 11 2007, @11:14AM (#18690557)
    So let say person A wants to download copyrighted material. They would connect to a tracker who would when tell person A where to get chunk 1 from. This chunk could come from copyrighted data or public domain data. What the tracker stores isn't the actual copyrighted data, but offsets, lengths, and ip addresses of where to find particular chunks.

    In essence, if you were downloading a music CD, the data chunks could be coming from someone who has an Ubuntu ISO image, or some type of copyrighted material.

    With this system it essential becomes impossible to tell who is uploading what.
    • The chances of two 16kB chunks from a Ubuntu ISO and a music CD being identical are extremely unlikely, or for that matter, the chances of any two 16kbit chunks from any two non-similar (meaning, in this case, files that are not of/from the same source [the same movie, album, program, whatever]) files being the same are incredibly slim.

      That being said, about 90% of the commenters missed the point completly, though it is somewhat understandable given how vague and nontechnical the linked article and summa
  • by Junior J. Junior III (192702) on Wednesday April 11 2007, @12:10PM (#18691415) Homepage
    At their fundamental level, all files are essentially similar. They're encoded as 1's and 0's. So, wherever a file happens to call for a 1, you should be able to just pull that 1 from ANYWHERE. Even some random file on your local hard drive. And likewise for zeroes. All you need is a smart download algorithm to re-assemble the 1s and 0s in the correct order, and you're set.
  • by J0nne (924579) on Wednesday April 11 2007, @12:13PM (#18691459)
    Shareaza has been doing this for years. When hashing MP3 files, it disregards what(s in the id3 tags, and just computes a hash for the audio information. This means that files with different id3 tags will still be added to the swarm, whicj is great.
    Unfortunately, there are some issues with it:
    -Only Shareaza supports it, other clients didn't want to play along.
    -Shareaza has/d a bug where it would fail to reconstruct the id3 tag after downloading, giving you files with empty tags
    -Only mp3 is supported, so no ogg, aac or wma

    So this paper isn't as revolutionary (if that's what they mean).

    This will only work with identical files that have metadata that is frequently changed by end-users, because there's no way you're going to be able to get a good file if you try to mix a cam with a dvdrip, or an ogg with an mp3, or an xvid file with a divx file. It just doesn't work that way.
  • by DigitAl56K (805623) on Wednesday April 11 2007, @12:39PM (#18691913)
    If a client recreates a file from "similar" pieces, is it a derivative work?
  • I tried it (Score:3, Funny)

    by Intron (870560) on Wednesday April 11 2007, @01:36PM (#18692799)
    I tried downloading "My Sweet Lord" by George Harrison, but I got "He's So Fine" by the Chiffons instead.
  • by Bluesman (104513) on Wednesday April 11 2007, @02:21PM (#18693521) Homepage
    This seems to be an intractable problem.

    How do you know a file is similar? By hashing? There's no guarantee that a particular chunk of a file with an md5 hash (for example) contains the same bytes as that of another file.

    There are 2^256 possible chunks of 256 bits of data. There are 2^16 possible hashes with (using a 16 bit binary key) for that same data. That means that for every hash match, the data has a 1 in 16 chance of actually matching.

    You can extend the key length to reduce this ratio, but you'll end up with a key length equal to your data size before you're sure the data is not a collision.

    The problem gets worse if the chunks of data aren't equal in size.

    This can only work if you have a centralized database of every possible file combination on your network. It's workable for a small amount of files, but will grow exponentially in a real environment. Not to mention, the centralized database would have to handle a significant amount of traffic, reducing the speed gains possible.

    Count me as skeptical.
  • perhaps 100% similar (Score:3, Interesting)

    by Frisky070802 (591229) * on Wednesday April 11 2007, @02:46PM (#18693821) Journal
    I recall hearing a story on NPR Music a few weeks ago about someone who plugged a CD into itunes and had it come up with the right piece but the wrong performer. Then it happened again, with the same ostensible pianist but yet another "wrong" performer. Detailed analysis showed the pianist had apparently published CDs claiming to perform pieces but actually substituting the work of others! Itunes must have used a signature over the content to index the piece by the earlier CD.

    Similarity detection rules.
    • Re: (Score:3, Informative)

      Ok, perhaps you're not certain how files work. But things compressed with different codecs and bitrates look VERY different when you actually look at the coding in the file as opposed to the same file named differently or with minor changes.
      • What the parent is saying can be summarized with a simple example:

        A 200MB, 30min video that was compressed at 1000kbps DiVX is not the "same file with minor changes" as a 200MB, 30min video that was compressed at 900kbps DiVX. They ARE different files and should be treated as such. You also can't deduce anything from their filenames, play length, or any other characteristic so how would you determine which ones can go together and which ones can't? I did not see codecs or compression mentioned at al
          • Re: (Score:3, Interesting)

            Correct (and the parent is correct as well). We didn't exhaustively characterize the reasons that the files differed, but most of the cases appeared to be modifications _after_ encoding. We have on the TODO list to test encode the same CD multiple times with the same settings to see if it produces a similar file, but we haven't run the test yet. There were tons of cases of metadata-altered MP3s, many cases of video files with the same video content but different audio or subtitle information, and some ca
    • Re:Right.... (Score:5, Informative)

      by angio (33504) on Wednesday April 11 2007, @11:01AM (#18690311) Homepage
      Take a peek at the paper [cmu.edu] - it actually does work, and we demonstrated it. The intuition: people make small changes to files like changing the artist or title in the MP3 header, and then BitTorrent and other systems treat this as a "different" file, when in fact it's 99.9% similar.
      (Yes, I'm one of the authors.)
      • I haven't read the detailed paper, but it seems to me that there could be problems in finding similarity when there are random insertions. This is analogous to protein sequence matching (peripherally my field of research) when there are random insertions in the primary sequence. So if you have two identical 16k files, eight 2k chunks will be identical to each other. However, if you insert 512 bytes at the start of one file, eight 2k chunks will be different.
        • by angio (33504) on Wednesday April 11 2007, @12:38PM (#18691895) Homepage
          We define chunk boundaries using Rabin fingerprinting. It's a cute trick - not one of our own invention - that is relatively insensitive to insertions and deletions. It was used in some of the other work in this area, such as the Low Bandwidth File System (LBFS). There's a family of work in this area called "shingling" that can also apply to sequence similarity.
        • Let's go with a fairly vanilla scenario:

          I grab an mp3 from person A. I then clean up the tag and rename it to suit me.

          You want to download that same song with a different name and different tag.

          You connect to person B sharing it. If you're using BitTorrent, you can also connect to any of 99 other people trying to download it from person B.

          Using the new model, you could also connect to person A and myself and download the blocks that are the same.

          So instead of only...
          99 people in the swarm and 1 seeder
          you'd
        • Re:Right.... (Score:4, Informative)

          by angio (33504) on Wednesday April 11 2007, @12:41PM (#18691943) Homepage
          Similar in spirit - except rsync looks at files on your local hard drive by the same name, so there's only one possible candidate to draw from. SET looks at all of the files that everyone else is currently downloading, so we had to develop a much more efficient technique for locating useful files.
        • Re: (Score:3, Interesting)

          The only way you could implement a system like this is to create an entirely new protocol, server software and client software.

          I disagree, this could be done with No Change to any protocol, client, or server: the only thing that needs created is a torrent creator located on a machine that had a full version of every "simular" torrent to be shared. the torrents would all be linked read only to the same DVD image (for exampl), only part of that DVD image would be labeled as "downloaded" and you would put the

        • Re: (Score:3, Informative)


          It's already been addressed: files encoded with different codecs, bitrates, compression ratios, what-have-you look completely different, have vastly different checksums, and even if named exactly the same and with the exact same file size, would never be confused for each other by any algorithm that's comparing what's actually IN the files.

            -l

    • Or it may even be native to the service itself (i think gnutella or edonkey.. one of the two). Anyway, the point is if you search for a certain file and the hash for specific blocks are identical, Shareaza will attempt to download that copy as well. So if you download, say, a 4mb tupac song and suddenly see a 2.5mb britney spears song in the list.. don't cancel the download. It could be that the 2.5mb britney spears song is actually the same tupac song that was renamed and incomplete.

      However, there is no
    • Taking advantage of those similarities could speed downloads considerably. If a U.S. computer user wanted to download a German-language version of a popular movie, for instance, existing systems would probably download most of the movie from sources in Germany. But if the user could download from similar files, the user could retrieve most of the video from English versions readily available from U.S. sources, and download only the audio portion of the movie from the German sources.

      To paraphrase Morbo: "DOW

    • Re: (Score:3, Funny)

      by Anonymous Coward

      this statement in particular is ludicrous.
      You don't listen to pop music, do you?
    • Re:Snakeoil (Score:4, Funny)

      by discord5 (798235) on Wednesday April 11 2007, @12:28PM (#18691721)

      It's not even 9AM and I have already filled my bullshit quota for the day. The concept itself is dubious, but this statement in particular is ludicrous.

      May I suggest you don't open your e-mail and refrain from answering the phone for today? I usually fill up my bullshit quota with those two media alone. Slashdot is just the icing on the cake. ;)

    • Re: (Score:2, Insightful)

      No seriously, the coward is right. WTF?

      Okay, I'll admit that there's a few MP3s that have different ID3 tags but the actual audio is the same. A few. The large majority of duplicate songs are NOT the same audio data. It's been re-ripped, transcoded, or some other horrid thing done to it and is not the same data anymore.

      Now, even assuming that there ARE tons of very-alike files out there, you'd have to write an intelligent comparer for each one so that it knew how to deal with the file and what informati
      • Re: (Score:3, Interesting)

        Okay, I'll admit that there's a few MP3s that have different ID3 tags but the actual audio is the same.

        It's more then a few. Most people use the default settings in their audio ripper/compression program, and it's all from the same CD. Even more people never uses an audio ripper and/or compressor, and simply downloads the file from the Internet. Not that many people bother to change ID3-tags either, but every single person that do, leads to a different file.

        And if they don't want it that bad, they aren

    • It depends on how they calculate "similar". If they run checksums on the chunks and submit a query to other machines on the network that have pieces with identical chunks, then it would be valid to download. I'm pretty sure a few P2P services in the pre-bittorrent days did something like this, files with identical hashes would be grouped together.

      But the article makes it sound like their custom software breaks up media files into their component streams, which clients can download separately as they desire.
    • Anything compressed/encrypted won't work so well. Unless it is just a mislabeled peice of music. If you google around for Low Bandwidth File System (LBFS) you'll see what technique the article is really talking about.(disclaimer -- I didn't read the article either) Variable Length chunking will handle cases where new data is inserted halfway into the file, however with compression that extra data will end up changing the whole damned file.