1. 程式人生 > >2016 微軟程式設計之美複賽題目中文翻譯

2016 微軟程式設計之美複賽題目中文翻譯

Microsoft Academic Graph (MAG) is a large heterogeneous graph containing entities such as authors, papers, journals, conferences and relations between them. Microsoft provides Academic Knowledge API for this contest. The Entity attributes are defined here.

微軟學術圖譜(Microsoft Academic Graph ,MAG)是一個大型的,豐富多樣的圖,其包括的內容如:作者、論文、期刊、會議、以及上述實體之間的關係。微軟為本次比賽提供了學術知識API(

Academic Knowledge API )。實體屬性的定義如下(見連結)。

Participants are supposed to provide a REST service endpoint that can find all the 1-hop, 2-hop, and 3-hop graph paths connecting a given pair of entity identifiers in MAG. The given pair of entity identifiers could be [Id, Id], [Id, AA.AuId], [AA.AuId, Id], [AA.AuId, AA.AuId]. Each node of a path should be one of the following identifiers: Id, F.Fid, J.JId, C.CId, AA.AuId, AA.AfId. Possible edges (a pair of adjacent nodes) of a path are:

參賽者需要提供REST服務終端。此服務應該能找到所有的1-hop、2-hop、3-hop圖路徑,這些路徑連線了MAG中給定的實體識別符號(entity indentifier)的對子。實體識別符號對子的可能形式為:[Id, Id], [Id, AA.AuId], [AA.AuId, Id], [AA.AuId, AA.AuId]。一條路徑的每一個節點都應為下列識別符號中的中的一種:Id, F.Fid, J.JId, C.CId, AA.AuId, AA.AfId. 可能的一條路徑的邊(也即相鄰節點對)如下:

路徑條件

For each test case, the REST service endpoint will receive a JSON array via HTTP with a pair of entity identifiers, where the identifiers are 64-bit integers, e.g. [123, 456]. The service endpoint needs to respond with a JSON array within 300 seconds. The response JSON array consists of a list of graph paths in the form of [path1, path2, …, pathn], where each path is an array of entity identifiers. For example, if your program finds one 1-hop paths, two 2-hop paths, and one 3-hop paths, the results may look like this: [[123,456], [123,2,456], [123,3,456], [123,4,5,456]]. For a path such as [123,4,5,456], the integers are the identifiers of the entities on the path. After receiving the response, the evaluator will wait for a random period of time before sending the next requests.

對於每種測試樣例,REST服務終端將會收到以HTTP方式傳輸的JSON陣列(json array),其帶有成對的實體識別符號,其中,識別符號是64位整數,如[123, 456]。服務終端需要在300s內返回JSON陣列。(參賽者的)伺服器端響應的JSON陣列中含有圖中路徑的列表,形式如下: [path1, path2, …, pathn]。每一條路徑都是實體識別符號的陣列。比如,如果程式發現了一條1-hop路徑,兩條2-hop路徑和一條3-hop路徑,結果應該就有下面的形式:[[123,456], [123,2,456], [123,3,456], [123,4,5,456]]。對於一條路徑,如[123,4,5,456],其中的整數是路徑上的實體識別符號。在收到伺服器的響應後,評估程式(比賽的評分程式)將會等待隨機的一段時間,然後再次傳送請求。

Evaluation Metric 評分指標

The REST service must be deployed to a Standard_A3 virtual machine for the final test. There are no constraints on the programming language you can use.

參加最終測試的REST服務必須部署在Standard A3虛擬機器上。參賽者使用的語言沒有任何限制。

The test cases are not available before the final evaluation. When the evaluation starts, the evaluator system sends test cases to the REST endpoint of each team individually. Each team will receive 10 test cases (Q1to Q10). The response time for test case Qi is recorded as Ti(1≤i≤10). The final score is calculated using:

在最終評分前,測試用例將不會開放。當評分程式啟動後,評分系統會將單獨地將測試用例傳送至每一參賽隊伍的REST終端。每個隊伍會受到10個測試用例(Q1到 Q10)。測試用例Qi的響應時間記為Ti,最終的得分使用如下公式計算:
分數計算公式

where Ni is the size of the solution (the total number of correct paths) for Qi , Ki is the total number of paths returned by the REST service, Mi is the number of distinct correct paths returned by the REST service.

其中Ni代表Qi解的大小(正確路徑的總數目);Ki是REST服務返回的路徑的總數目;Mi是REST服務返回的不相同的正確路徑的數目(即,先在正確路徑中去重,再計算總數目)。