flash实现的关系图(来自腾讯soso)
上图是腾讯soso网站上的人物关系图,其原理估计是在各种网页中识别人名、提取关键字,然后生成数据。当然也有更好或者更土鳖的方法。从创意上看,可能(未经过考证)是模仿了Google罗盘,如搜索 “uchome 内存 泄露” 。
我想很多SNS网站都希望做出这样的效果,来描述用户及其好友之间的发现关系。如何把这个flash剥离下来用到自己的网站上呢?
这个swf可以通过迅雷直接下载,它接收的参数如下:
- tagkeyword:搜索的关键词,如:陈冠希
- tagreldataurl:一个url,最终用来获取陈冠希的关系数据,请求格式为url?kw=陈冠希, 返回的是二进制数据。该二进制数据在服务器端的生成方法稍后介绍。
- taghpicurl:一个url,用来获取人物头像,格式为url?kw=陈冠希
- tagrandomurl:左上角随机访问的url。请求格式为:url?en=utf8&pid=tag.wal.r&ch=wal.random&r=0.12345
- tagnews,tagnewsrel :用来获取新闻数据的url,访问格式为:url?kw=陈冠希+艳照门+阿娇 , 要注意的是这里的关键词一般是两个人名及之间的关系。
- tagsearch,tagjumprel,tagjumpmap:都是用来搜索和跳转的url,对flash影响不大。
在SNS中,使用场景很容易找到,一个最基本的:人物的好友关系(也可能是其能见人或者不能见人的关系),点击好友时,就出现这个好友最新的照片、日志、秘密等。效果很酷,也很实用。
其中各个url返回的数据的格式大多都是明文发送,用httpwatch或者firebug就能抓到,我就不废话了。要说的是tagreldataurl这个请求,返回的是二进制如何在服务端伪造:将文本转化为ByteArray,然后用zlib压缩。文本原文的格式如下(搜索刘翔的部分结果):
刘翔 孙海平 0 1215.45 接近复出,准备复出,就像豆腐渣,还有问题
麦迪 韩寒 1 0.001 冰冻三尺
冯树勇 纪伟 1 0.001 潜力选手,接班
第一列和第二列是一条关系上的两个人(让我想起一句话:一条藤上的2个苦瓜);第三列的值为0或者1,和查询关键词相关的为0,其它的为1 ;第四列可能是两个人的关系强度;最后是关系的关键词,可能有多个,用英文逗号分隔。
压缩和解压算法(用JAVA实现,从google上搜索来的)如下:
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.Deflater; import java.util.zip.Inflater; public class CodiggTest { public static void main(String[] args) throws Exception { String content = "这里是原文"; byte[] result = compressBytes(content.getBytes("UTF8")); // TODO: 这里该干嘛干嘛 } private static int cachesize = 1024; private static Inflater decompresser = new Inflater(); private static Deflater compresser = new Deflater(); public static byte[] compressBytes(byte input[]) { compresser.reset(); compresser.setInput(input); compresser.finish(); byte output[] = new byte[0]; ByteArrayOutputStream o = new ByteArrayOutputStream(input.length); try { byte[] buf = new byte[cachesize]; int got; while (!compresser.finished()) { got = compresser.deflate(buf); o.write(buf, 0, got); } output = o.toByteArray(); } finally { try { o.close(); } catch (IOException e) { e.printStackTrace(); } } return output; } public static byte[] decompressBytes(byte input[]) { byte output[] = new byte[0]; decompresser.reset(); decompresser.setInput(input); ByteArrayOutputStream o = new ByteArrayOutputStream(input.length); try { byte[] buf = new byte[cachesize]; int got; while (!decompresser.finished()) { got = decompresser.inflate(buf); o.write(buf, 0, got); } output = o.toByteArray(); } catch (Exception e) { e.printStackTrace(); } finally { try { o.close(); } catch (IOException e) { e.printStackTrace(); } } return output; } } |
基本原理就是如此,这样就可以伪造兼容请求格式的服务端,然后在swf上带上这几个参数进行使用,如:
codigg.swf?tagkeyword=陈冠希&tagreldataurl=你的URL&taghpicurl=你的另一个URL&….
可见soso封装得还真是不错。
可能有人问,上面还有soso的好多logo怎么办?我只能说,这个swf是没有加壳的,可以直接反编译。鉴于珊瑚虫qq作者的前车之鉴,本站肯定是不会提供现成的程序了。大伙自己想办法吧。
原创文章如转载,请注明:转载自CODIGG [ http://www.codigg.com/ ]
本文链接地址:http://www.codigg.com/2009/06/flash-relation-chart/



五月 28th, 2010 at 13:02
你好 看了这篇文章觉得很good
从腾讯那边下载了bigrelation.swf
但是放在本地无法访问,运行不出来。远程调用腾讯的是OK的
希望指点下 如果能提供你改装过的swf文件 就更好了
谢谢
[回复]
六月 1st, 2011 at 02:47
very nice post, i certainly love this website, keep on it
[回复]
六月 6th, 2011 at 17:36
I definitely enjoy every little bit of it and I have bookmarked your blog.
[回复]
六月 9th, 2011 at 14:34
Your website arrived up in my analysis and im stricken by what you may have printed during this theme. I am presently expanding my inquiry and thus cant contribute further, nonetheless, Ive bookmarked your web and also you will be returning to keep up with any upcoming revisions. Just Now like it and provides thanks for admitting my input.
[回复]
一月 13th, 2012 at 18:07
An riveting language is designer interpret. I cogitate that you should compose more on this substance, it strength not be a prejudice topic but generally people are not enough to utter on such topics. To the succeeding. Cheers like your flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG.
[回复]
一月 13th, 2012 at 23:58
An intriguing communication is couturier scuttlebutt. I imagine that you should correspond writer on this message, it might not be a preconception bailiwick but mostly grouping are not enough to verbalize on much topics. To the succeeding. Cheers like your flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG.
[回复]
一月 16th, 2012 at 15:28
Wow, awesome blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is wonderful, let alone the content!. Thanks For Your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG .
[回复]
一月 22nd, 2012 at 23:00
Love your blog!
[回复]
一月 23rd, 2012 at 12:22
An exciting discussion is designer note. I reckon that you should write many on this message, it strength not be a sacred topic but generally group are not enough to verbalize on much topics. To the succeeding. Cheers like your flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG.
[回复]
一月 23rd, 2012 at 13:40
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this website by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my difficulty. You’re amazing! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGGBest Regards Nick
[回复]
一月 26th, 2012 at 12:12
An riveting discussion is worth statement. I opine that you should compose more on this substance, it mightiness not be a prejudice issue but generally group are not enough to communicate on specified topics. To the succeeding. Cheers like your flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG.
[回复]
一月 27th, 2012 at 18:56
Hello There. I found your blog using msn. This is a really well written article. I’ll be sure to bookmark it and come back to read more of flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG . Thanks for the post. I will definitely return.
[回复]
一月 28th, 2012 at 16:37
Hello There. I found your blog using msn. This is a very well written article. I’ll be sure to bookmark it and return to read more of flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG . Thanks for the post. I will definitely comeback.
[回复]
一月 28th, 2012 at 16:48
Hello There. I found your blog using msn. This is a really well written article. I’ll be sure to bookmark it and come back to read more of flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG . Thanks for the post. I’ll certainly comeback.
[回复]
一月 28th, 2012 at 17:52
An unputdownable discussion is designer account. I expect that you should write author on this matter, it power not be a bias case but mostly people are not enough to talk on such topics. To the next. Cheers like your flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG.
[回复]
一月 28th, 2012 at 21:31
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this web site by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You’re amazing! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG Best Regards Cassetta Cindy
[回复]
一月 29th, 2012 at 13:11
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this website by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my trouble. You’re wonderful! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGGBest Regards Cindy
[回复]
一月 29th, 2012 at 15:07
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You’re incredible! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGGBest Regards Yoder
[回复]
一月 29th, 2012 at 15:42
The president and first lady are not concerned about being invited to those children’s wedding. How ludicrous to have made up “sources say”.
[回复]
一月 29th, 2012 at 17:04
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this web site by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my problem. You are incredible! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG Best Regards Craig Yoder
[回复]
一月 30th, 2012 at 14:36
An absorbing speech is designer account. I guess that you should create much on this content, it strength not be a prejudice thing but mostly fill are not enough to verbalise on such topics. To the next. Cheers like your flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG.
[回复]
一月 30th, 2012 at 16:58
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this website by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my difficulty. You’re wonderful! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG Best Regards Rolf Craig
[回复]
一月 30th, 2012 at 20:57
Hello There. I found your blog using msn. This is an extremely well written article. I’ll be sure to bookmark it and come back to read more of flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG . Thanks for the post. I will definitely return.
[回复]
一月 30th, 2012 at 23:16
Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a little bit, but other than that, this is wonderful blog. A great read. I will definitely be back.
[回复]
一月 31st, 2012 at 07:51
I simply want to say I am just beginner to blogs and actually liked your web site. Likely I’m going to bookmark your blog post . You certainly come with remarkable stories. Thanks a lot for sharing your web-site.
[回复]
一月 31st, 2012 at 11:05
Hey there your english like flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG
[回复]
一月 31st, 2012 at 11:42
Leggings have become very popular in the fashion world and it is easy to pair them with just about any outfit.
[回复]
一月 31st, 2012 at 11:51
It may take several minutes for you to relax enough to get this feeling, and it may even take several attempts over a week or two. You don’t need to load yourself up with so many AP and honors classes that you make it difficult on yourself to do well. Lastly plywood about 8ft by 8inc was added which allowed the circular saw to be guided. [URL=http://lopolikuminp.com ]metates[/URL] Privates Frank Neely and William C. They can be paired with almost anything.
[回复]
一月 31st, 2012 at 20:36
Hey There. I found your blog using msn. This is a very well written article. I will make sure to bookmark it and return to read more of flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG . Thanks for the post. I’ll certainly return.
[回复]
一月 31st, 2012 at 23:23
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this blog by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my difficulty. You are wonderful! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG Best Regards Cindy Nick
[回复]
一月 31st, 2012 at 23:28
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was recommended this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my trouble. You are incredible! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG Best Regards Yoder Nick
[回复]
二月 1st, 2012 at 12:41
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was recommended this website by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my trouble. You are amazing! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG Best Regards Craig Nick
[回复]
二月 1st, 2012 at 13:20
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this website by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my difficulty. You are wonderful! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGGBest Regards Cindy
[回复]
二月 1st, 2012 at 15:32
This internet site seriously resolved my main problem, Adios for now. . .
[回复]
二月 1st, 2012 at 15:54
Hey There. I found your blog using msn. This is an extremely well written article. I will make sure to bookmark it and come back to read more of flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG . Thanks for the post. I’ll certainly comeback.
[回复]
二月 2nd, 2012 at 13:33
This is the precise flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG diary for anyone who wants to act out out nearly this subject. You mark so much its nearly wearing to fence with you (not that I real would want…HaHa). You definitely put a new protract on a content thats been scrawled virtually for age. Good bunk, only extraordinary!
[回复]
二月 2nd, 2012 at 14:12
This is the rectify flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG diary for anyone who wants to seek out out about this content. You mention so much its virtually effortful to represent with you (not that I real would want…HaHa). You definitely put a new extend on a theme thats been graphical nigh for period. Pleasant nonsense, but great!
[回复]
二月 2nd, 2012 at 14:14
This is the straight flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG blog for anyone who wants to assay out out nearly this topic. You note so often its nearly effortful to debate with you (not that I rattling would want…HaHa). You definitely put a new extend on a theme thats been graphic some for eld. Fastidious force, simply extraordinary!
[回复]
二月 2nd, 2012 at 14:15
This is the rectify flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG blog for anyone who wants to act out out nigh this subject. You observe so some its nearly wearying to converse with you (not that I really would want…HaHa). You definitely put a new gyrate on a topic thats been codified active for years. Pleasant push, only zealous!
[回复]
二月 2nd, 2012 at 19:26
This is the penalise flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG diary for anyone who wants to move out out active this theme. You observance so more its near debilitating to reason with you (not that I really would want…HaHa). You definitely put a new spin on a substance thats been written roughly for period. Overnice sundries, simply majuscule!
[回复]
二月 2nd, 2012 at 21:52
Definitely, what a splendid blog and illuminating posts, I surely will bookmark your blog.Have an awsome day!
[回复]
二月 2nd, 2012 at 23:38
Howdy! I really would like to give you a huge thumbs up! ! for the good details which you have at this website. We’re coming back to your site to get more soon.
[回复]
二月 3rd, 2012 at 03:10
Hi all convertxtodvd free nice content page vso software convertxtodvd free download for flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG
[回复]
二月 3rd, 2012 at 23:12
This is the turn flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG journal for anyone who wants to act out out active this matter. You respond so untold its almost exhausting to fence with you (not that I real would want…HaHa). You definitely put a new twist on a message thats been scripted around for eld. Squeamish poppycock, simply uppercase!
[回复]
二月 4th, 2012 at 11:13
This is the penalise flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG blog for anyone who wants to assay out out most this theme. You observation so untold its most tiring to contend with you (not that I really would want…HaHa). You definitely put a new gyrate on a topic thats been backhand active for period. Good whatsis, just eager!
[回复]
二月 4th, 2012 at 21:51
Hey There. I found your blog using msn. This is a really well written article. I will be sure to bookmark it and come back to read more of flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG . Thanks for the post. I will definitely return.
[回复]
二月 5th, 2012 at 13:58
This is the penalise flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG blog for anyone who wants to act out out nigh this matter. You asking so much its virtually exhausting to contend with you (not that I truly would want…HaHa). You definitely put a new extend on a matter thats been handwritten almost for eld. Prissy bunk, but large!
[回复]
二月 5th, 2012 at 18:33
Hey There. I found your blog using msn. This is an extremely well written article. I will make sure to bookmark it and come back to read more of flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG . Thanks for the post. I will certainly return.
[回复]
二月 5th, 2012 at 21:35
It is hard to come by experienced people today for this matter, but you seem like you fully understand just what you are preaching about! Bless you
[回复]
二月 6th, 2012 at 07:35
gfziagbzuiawg http://gfziagbzuiawg.com gfziagbzuiawg.com
[回复]
二月 7th, 2012 at 17:38
An exciting word is designer annotate. I cogitate that you should make more on this substance, it might not be a sacred content but generally people are not sufficiency to utter on such topics. To the next. Cheers like your flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG.
[回复]
二月 7th, 2012 at 19:42
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was suggested this blog by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my difficulty. You are wonderful! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG Best Regards Cindy Agata
[回复]
二月 7th, 2012 at 19:42
flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG I was recommended this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my trouble. You are wonderful! Thanks! your article about flash实现的关系图(æ¥è‡ªè…¾è®¯soso) – CODIGG Best Regards Agata Veronica
[回复]