摘要 |
<p>Disclosed is a second-degree friend query method, comprising: storing first-degree friends of each account, querying the first-degree friends after receiving a second-degree friend query command, and routing the first-degree friends once again to obtain a second-degree friend. Because only first-degree friend relationships must be stored, the occupied machine resources are greatly reduced; and because the second-degree friend is obtained by querying the first-degree friends, the method has a stronger real-time performance when compared to an offline calculation method. Also disclosed are a second-degree friend query device and system, and a storage medium corresponding to the method. The system comprises a calculation server and a storage server, wherein the storage server stores the first-degree friends of each account, and queries and returns the first-degree friends at the request of the calculation server; and the calculation server controls the whole query process, obtains a second-degree friend after querying twice, and supports the obtaining of the friend relationship chains of a plurality of services in a query command because the calculation server can manage a plurality of storage servers.</p> |