Google.Social Graph学习笔记
来源:互联网 发布:中文输入法下载 linux 编辑:程序博客网 时间:2024/06/05 00:33
Social Graph可以看作一个简单的推理机,可以进行更深入的处理。
1、NodeCanonicalization
某个叫Brad的人,在某个网站注册后,可能有如下链接:
l http://brad.social-network.example.com
l http://brad.social-network.example.com/
l http://BRAD.SOCIAL-NETWORK.EXAMPLE.COM/
l http://social-network.example.com/viewBlog?user=brad
l http://social-network.example.com/viewProfile?user=brad
l http://social-network.example.com:80/viewBlog?user=brad
l http://social-network.example.com/users/brad/data/foaf
需要将URL标准化为这样的形式:sgn://social-network.example.com/?ident=brad
有开源工具sgnodemapperproject可以做到这点。
2、Attributes
返回的节点对象包含一系列属性:
属性名称
描述
url
The main URL for this node. Note that this may differ from the node's key in the nodes
dictionary, especially when using the sgn=1
parameter.
profile
Profile URL. Typically about the person, rather than their main content.个人资料的URL。
rss
RSS URL
atom
Atom URL
foaf
FOAF URL
photo
Photo/avatar URL.
fn
Name. (formatted name)
你的应用不应该局限于上面几种属性,以后可能增加更多的属性。
3、Edge Types
All edge types from all supported formatsare mapped onto their closest XFN equivalent. Consult the XFN 1.1 documentation for details.
In summary,the XFN relation types are:
l Identity:
me: a claim that the referenced URL is yours
l Those that indicate a relation toanother person 与他人有关联的声明:
contact
acquaintance 熟人,熟知,认识
friend
met
co-worker 同事,合作者
colleague 同事,同行
co-resident 同居
neighbor
child
parent
sibling
spouse 配偶
kin 亲戚
muse
crush
date
sweetheart 情人,爱人
Other source of me links 除XFN之外的其它链接源
l Fields in FOAF, such as:
weblog
homepage
openid
mbox_sha1sum, with the resultinginternal target node of the format:
sgn://mboxsha1/?pk=4caa1d6f6203d21705a00a7aca86203e82a9cf7a
· OpenIDdelegation <link> tags, both openid.delegate and openid2.local_id.
· FOAFdeclaration <link> tags. (i.e. if http://example.com/ has a <link>to http://example.com/my-foaf.rdf, then a me edge is created from http://example.com/to http://example.com/my-foaf.rdf)
· mailto: queries.When querying on an email address, a directed edge of type me from mailto:foo@bar.comto sgn://mboxsha1/?pk=xxxxx... is temporarily assumed, but not stored.
MappingFOAF’s knows field 映射到FOAF的knows域
By default, any knowsrelation in a FOAF file is mapped to the XFN value of contact. However, in cases where asite publishes both XFN and FOAF, with a single XFN edge type, the FOAF knows mapping will be the site'sXFN edge type used.
4、APIs:http://code.google.com/intl/zh-CN/apis/socialgraph/docs/api.html
下面几个方法是可用的:
lookup:low-level access to the graph. It lets you list all the edges out of or into agiven node.
otherme:given one or more of a person's identifiers (e.g. URLs), return otheridentifiers for that person. 给定某个人的若干URL,返回其此人它的URL。
我给出了我的3个帐号:blog.sohu,blog.CSDN和fanfou。最后返回了我在jiwai的链接,不过只指出了我在jiwai链接向CSDN的博客。
testparse:test your site's XFN or FOAF to see what the Social Graph API's parsers find init。测试你的站点的XFN或FOAF,看看Social Graph API的解析器能从中找到什么。
5、使用的前提;对站点的要求:
To use XFN to connect sites, add rel="friend"
to your link like this:<ahref="http://bradfitz.com" rel="friend">Brad</a>
To use FOAF, create a FOAF file and link to it from your web page. More details on FOAF.
- Google.Social Graph学习笔记
- Google推出Social Graph API
- 《Attributed Social Network Embedding》论文学习笔记
- 《Attributed Social Network Embedding》论文学习笔记
- 论文阅读笔记 - TAO: Facebook'sDistributed Data Store for the Social Graph
- TAO: Facebook's Distributed Data Store for the Social Graph论文阅读笔记
- Boost Graph Library 学习笔记
- Meego上Semantic social desktop的基础Ontology(学习笔记)
- 《DeepWalk: Online Learning of Social Representations》学习笔记
- Graph Cuts学习笔记2014.5.16----1
- JMeter学习笔记10-Graph Results介绍
- Google Test 学习笔记
- google Gson学习笔记
- Google BigTable 学习笔记
- Google MapReduce 学习笔记
- Google Bigtable 学习笔记
- Google Guava学习笔记
- Google Guava学习笔记
- 寻找素数 Google题
- DispatchAction的详细说明
- 打印位图上
- 传统服务往移动领域的迁移
- 啊 啊
- Google.Social Graph学习笔记
- 打印位图下
- Windows调试工具入门1—Windows调试工具介绍
- 如何调试wince驱动产生的异常
- 使用blockUI制作自定义的漂亮的网页提示框(代替confirm和alert)
- 天网防火墙 与 Filemon和Regmon 有冲突
- ToAWE和ToAWS两个参数的解释
- C++文档生成工具——Doxygen相关文章的链接
- pb中日期加减函数,类似sql的Dateadd函数