Method and device for notifying users of going online and offline
A technology for notifying users and users, applied in the network field, can solve the problems of untimely notification of users going online and offline, large query volume, etc., and achieve the effect of small query volume and timely notification
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Publication Date
- 2020-06-26
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention relates to the field of network technology, in particular to a method for notifying a user of going online and a device for notifying a user of going online and offline. Background technique
[0002] With the rapid development of network technology, various websites continue to emerge. In order to facilitate website maintenance, it is usually necessary to monitor the online status of website users and trigger notifications of users going online and offline. But when the number of simultaneous online users reaches tens of thousands, it will become difficult to monitor the online status of website users. For example, an online user sends a heartbeat message to the server. When the heartbeat message is sent for the first time, it means that the user is online. When the user's heartbeat message is not received for more than 3 heartbeat intervals, it is determined that the user is offline. If the website platform currently has 1.2 million use...
Examples
Embodiment 1
[0048] refer to figure 1 , shows a flow chart of steps of a method for notifying a user of going offline according to Embodiment 1 of the present invention. The method of this embodiment may include the following steps:
[0049] Step 101, when receiving the dotted data including the dotted user ID, setting the online cut-off time corresponding to the dotted user ID.
[0050] At present, most of the business statistics rely on the dot management at the browser side, that is, the browser sends the dot data to the server by initiating a dot request, and the server records the dot data. The so-called dotted data is the business data of the function point. For example, when a user clicks a link on a web page, the click information on the link is the dotted data.
[0051] In this embodiment, the dotted data may be the heartbeat information sent by the user, wherein for each online user, the user's heartbeat information is sent once every preset time (for example, 10s, etc.). The ...
Embodiment 2
[0064] refer to figure 2 , shows a flow chart of steps of a method for notifying a user of going offline according to Embodiment 2 of the present invention. The method of this embodiment may include the following steps:
[0065] In step 201, the receiving thread receives the dotted data including the dotted user ID, and when receiving the dotted data, sends the dotted data to the processing thread.
[0066] In this embodiment, the receiving thread is set to receive the dot data sent by the user, and the processing thread is set to perform subsequent processing. The receiving thread and the processing thread can communicate with each other. When the receiving thread receives the dotted data, the dotted data will be processed. sent to the processing thread.
[0067] Preferably, in this step 201, when the receiving thread receives the dotted data, the process of sending the dotted data to the processing thread may include: when the receiving thread receives the dotted data, ac...
Embodiment 3
[0091] refer to image 3 , shows a flow chart of steps of a method for notifying a user of going offline according to Embodiment 3 of the present invention. The method of this embodiment may include the following steps:
[0092] Step 301, divide user IDs into multiple groups, and create a corresponding independent processing thread for each group of user IDs.
[0093] In this embodiment, user identifiers can be divided into multiple groups according to the setting method. For the specific division method, those skilled in the art can choose any applicable method based on actual experience, and this embodiment of the present invention does not limit it . For example, user IDs 1-10000 may be divided into a group, user IDs 10001-20000 may be divided into a group, and so on, and so on.
[0094] For each group of user IDs, a corresponding independent processing thread may be created, and the independent processing thread is mainly used to process events related to the correspond...