A non-transitory computer storage medium used to store computer-executable instructions, the computer-executable instructions used for implementing a visual field controlling method, wherein the method, executed by a processor, comprises the following steps:
- obtaining a map location where a current user locates;
- generating a visual field search request according to a preset search grid and the map location where the current user locates when the current user moves across a search grid, wherein generating the visual field search request further comprises obtaining a stored visual field list corresponding to the current user in response to the visual field search request and marking a user in the stored visual field list;
- obtaining a first user list in a 3×3 grid with the current user in the center of the 3×3 grid in response to the visual field search field, wherein after the step of obtaining the first user list in the 3×3 grid further comprises obtaining a user having a mark in the first user list and adding the user having the mark into the visual field list corresponding to the current user;
- obtaining distances between users and the current user in the first user list in a map scene of a map-based application in a map server;
- generating at least two distance queues corresponding to preset distance ranges according to the distances, one of the distance queues being a second user list comprising users in the first user list whose distances from the current user are in a corresponding distance range;
- assigning selection quotas corresponding to the distance queues according to a preset weight and a preset visual field upper limit, wherein selection quotas for sub-grids along a heading direction of the current user is larger than selection quotas of other sub-grids except the sub-grid where the current user locates;
- selecting a preset number of users from the distance queues into a visual field list according to the preset weight corresponding to the distance queues, wherein the closer the distance range corresponding to the distance queues from the current user is, the higher the preset weight corresponding to the distance queues is and the selection granularity is a ratio of number of users in the one of the distance queues to the selection quotas, and wherein the visual field list is a third user list for users that are in a visual field of the current user in the map-based application, and wherein selecting a preset number of users from the distance queues into the visual field list according to the preset weight corresponding to the distance queues further comprises selecting a user randomly in the distance queues and selecting users sequentially beginning from the randomly-selected user in the distance queues into the visual field list according to the preset selection granularity;
- eliminating the mark of the user in the visual field list after selecting a preset number of users from the distance queues into the visual field list according to the preset weight corresponding to the distance queues;
- and
- broadcasting, executed by the map server, state change information of the current user to the third user list of users that are in the visual field of the current user in the map-based application.