|
转自http://boinc-doc.net/boinc-wiki/index.php?title=CPID
Cross-Project Identification of Participants
用户的跨项目标识符(CPID)
Accounts on different BOINC Powered Projects are considered equivalent if they have the same email address (the BOINC Developers had considered other concepts, but they all lead to extreme complexity).
不同BOINC项目的帐号,只要使用了相同的email地址,就认为是由同一个用户创建的。
BOINC Powered Projects can't export email addresses in statistics files; email addresses are private. It's also not desirable to export hashed email addresses, because spammers could enumerate feasible email addresses and compare them with the hashed addresses.
但BOINC项目网站不能在对外提供的统计信息文件中提供email地址,因为email地址是不方便公开的。就算对其进行某些处理,也不能防止别有用心的人想方设法找出原始的email地址。
To solve these problems the BOINC System uses the following system:
为了解决这个问题,BOINC采用了如下的方法:
Each Account is assigned a "Cross-Project Identifier" (CPID) when it's created; it's a long random string.
每个帐号在被创建时被随机分配一个字符串,即跨项目标识符,简称CPID。
When a Scheduling Server replies to an Scheduler Request Message (Scheduler RPC)), it includes the Account's Cross-Project Identifier and hashed e-Mail address.
当调度服务器回应客户端的请求时,将在回应中包含这个帐号的CPID和处理过的email地址。
The BOINC Manager stores the Cross-Project Identifier and hashed e-Mail address of each Account to which it's attached in the Client State File.
客户端将服务器发送过来的CPID及处理过的email地址保存在配置文件中。
When the BOINC Daemon sends an Scheduler Request Message to a Scheduling Server, it includes the greatest (in terms of numeric comparison) Cross-Project Identifier from among Projects with the same hashed e-Mail address.
当客户端向服务器发送请求时,它将对比本机中其它项目的处理过的email地址,如果和当前项目相同,它将从中找出最大的CPID,并在请求中包含这个CPID。
Note: This method was depreciated at approximately Version 4.3x of the BOINC Client Software. Later Versions pass the oldest Cross-Project Identifier. This prevents the Cross-Project Identifier from changing when adding Projects.
注意:前段所述仅适用于4.3x之前版本的客户端。之后的版本在请求中包含的是本机最早注册的项目的CPID,这样就不会发生加入新项目后导致CPID被改变的情况了。
程序中的相关代码如下:
- // Of the projects with same email hash as this one,
- // send the oldest cross-project ID.
- // Use project URL as tie-breaker.
- //
- PROJECT* winner = p;
- for (i=0; i<projects.size(); i++ ) {
- PROJECT* project = projects[i];
- if (project == p) continue;
- if (strcmp(project->email_hash, p->email_hash)) continue;
- if (project->user_create_time < winner->user_create_time) {
- winner = project;
- } else if (project->user_create_time == winner->user_create_time) {
- if (strcmp(project->master_url, winner->master_url) < 0) {
- winner = project;
- }
- }
- }
- fprintf(f,
- "<cross_project_id>%s</cross_project_id>\n",
- winner->cross_project_id
- );
复制代码
If the Scheduling Server receives a Cross-Project Identifier different from the one in its BOINC Database, it updates the BOINC Database with the new Cross-Project Identifier.
如果调度服务器收到的请求中包含的CPID与服务器上保存的不同,它就将新的CPID保存下来。
User elements in the XML download files include a hash of (email address, Cross-Project Identifier); this "export" Cross-Project Identifier serves as a unique identifier of all accounts with that email address. The last step, hashing with the e-Mail address, prevents people from impersonating other people.
This system provides cross-project identification based on e-Mail address, without publicizing any information from which actual e-Mail addresses could be derived.
系统就这样提供了一种基于email地址的跨项目标识方案,同时也并没有对外泄漏任何关于email地址的信息。
Note:
There is a Cross-Project Identifier that is internal to Projects, and a second one that is used to tie together XML data exports. When you are using the Cross-Project Identifier for statistic sites you will have to use the second value which you will have to obtain using information such as your name (or alias if you use one).
[ Last edited by Youth on 2006-2-11 at 10:15 ] |
|