Method and server for searching for nearby user in social networking services
First Claim
1. A method for searching for nearby users in Social Networking Services (SNS) applied to a computer comprising a storage and a processor, which executes instructions stored in the storage to execute steps of:
- receiving location information and a user Identification (ID) from a client terminal device of a user X;
determining a grid Y, to which the location information belongs;
saving the user ID, the location information and reporting time of the user X in a list of the grid Y;
wherein the grid Y is one of grids in a grid array obtained by dividing a surface of the earth into the grids and areas of the grids are the same;
searching for users in the grid Y and other girds;
wherein the grid Y and the other grids form an N-grid and the grid Y is a center of the N-grid, N=n*n, n is an odd larger than or equal to 3;
ranking the users according to distances between the users and the user X and the reporting time of the user X;
wherein the closer a distance between a user and the user X, the higher rank of the user is, and the shorter time between the reporting time of the user and a current time is, the higher the rank of the user is; and
sending the ranked user IDs of the users and the distances between the users and the user X to the client terminal device of the user X,wherein the ranked user IDs of the users are received by the user X and used by the user X to contact other users;
wherein ranking the users according to the distances between the users and the user X and the reporting time of the user X comprises;
computing a weight Ai=a*Di+b*Ti of a user i;
wherein a and b are weighting coefficients, Di is a distance between the user i and the user X, Ti is time between the current time and the reporting time of the user i; and
ranking the users in an ascending order of the weight.
1 Assignment
0 Petitions
Accused Products
Abstract
When location information and a user Identification (ID) is received from a client terminal device of a user X, a grid Y, to which the location information belongs, is determined. The user ID and the location information of the user X is stored in a list of the grid Y. The grid Y is in a grid array obtained by dividing a surface of the earth into the grids and areas of the grids are the same. Users in the grid Y and other grids are searched. The grid Y and the other grids form an N-grid and the grid Y is a center of the N-grid. The users are ranked in an ascending order of distances between the users and the user X. The ranked user IDs and distances between the users and the user X are sent to the client terminal device of the user X.
5 Citations
5 Claims
-
1. A method for searching for nearby users in Social Networking Services (SNS) applied to a computer comprising a storage and a processor, which executes instructions stored in the storage to execute steps of:
-
receiving location information and a user Identification (ID) from a client terminal device of a user X;
determining a grid Y, to which the location information belongs;saving the user ID, the location information and reporting time of the user X in a list of the grid Y;
wherein the grid Y is one of grids in a grid array obtained by dividing a surface of the earth into the grids and areas of the grids are the same;searching for users in the grid Y and other girds;
wherein the grid Y and the other grids form an N-grid and the grid Y is a center of the N-grid, N=n*n, n is an odd larger than or equal to 3;ranking the users according to distances between the users and the user X and the reporting time of the user X;
wherein the closer a distance between a user and the user X, the higher rank of the user is, and the shorter time between the reporting time of the user and a current time is, the higher the rank of the user is; andsending the ranked user IDs of the users and the distances between the users and the user X to the client terminal device of the user X, wherein the ranked user IDs of the users are received by the user X and used by the user X to contact other users; wherein ranking the users according to the distances between the users and the user X and the reporting time of the user X comprises; computing a weight Ai=a*Di+b*Ti of a user i;
wherein a and b are weighting coefficients, Di is a distance between the user i and the user X, Ti is time between the current time and the reporting time of the user i; andranking the users in an ascending order of the weight. - View Dependent Claims (2, 3)
-
-
4. A server, comprising:
- a processor and a storage;
wherein the storage comprises;
a first processing module and a second processing module, whereinthe first processing module executed by the processor, to divide a surface of the earth into a grid array, in which an area of each grid is the same, and set a list for a grid; the second processing module executed by the processor, when location information and a user Identification (ID) from a client terminal device of a user X is received, to determine a grid Y, to which the location information belongs, store the user ID, the location information and reporting time of the user X in a list of the grid Y, search for users in the grid Y and other girds, in which the grid Y and the other grids form an N-grid and the grid Y is a center of the N-grid, N=n*n and n is an odd larger than or equal to 3, rank the users according to distances between the users and the user X and the reporting time of the user X and send the ranked user IDs of the users and distances between the users and the user X to the client terminal device of the user X;
wherein the closer a distance between a user and the user X is, the higher rank of the user is, and the shorter time between the reporting time of the user and a current time is, the higher the rank of the user is;wherein the ranked user IDs of the users are received by the user X and used by the user X to contact other users; wherein the second processing module is further executed by the processor to compute a weight Ai=a*Di+b*Ti of a user i;
wherein a and b are weighting coefficients, Di is a distance between the user i and the user X, Ti is time between the current time and the reporting time of the user i and rank the users in an ascending order of the weight. - View Dependent Claims (5)
- a processor and a storage;
Specification