CN106411713B - State notification method and server - Google Patents

State notification method and server Download PDF

Info

Publication number
CN106411713B
CN106411713B CN201610940867.4A CN201610940867A CN106411713B CN 106411713 B CN106411713 B CN 106411713B CN 201610940867 A CN201610940867 A CN 201610940867A CN 106411713 B CN106411713 B CN 106411713B
Authority
CN
China
Prior art keywords
client
state
online
time period
notification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610940867.4A
Other languages
Chinese (zh)
Other versions
CN106411713A (en
Inventor
沈义鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN201610940867.4A priority Critical patent/CN106411713B/en
Publication of CN106411713A publication Critical patent/CN106411713A/en
Application granted granted Critical
Publication of CN106411713B publication Critical patent/CN106411713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/043Real-time or near real-time messaging, e.g. instant messaging [IM] using or handling presence information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention discloses a state determination method and a server, wherein the method comprises the following steps: acquiring a client identifier of a client with an operation state marked as an online state in an online database; when online state notification information sent by a client corresponding to a client identifier is received within a preset time period, determining that the current operation state of the client is an online state; and when online state notification information sent by the client is not received within a preset time period, determining that the current operation state of the client is an offline state. By adopting the embodiment of the invention, the running state of the client can be accurately identified, and the accuracy of online state identification is improved.

Description

State notification method and server
Technical Field
The invention relates to the technical field of internet, in particular to a state notification method and a server.
Background
Currently, in many online live programs, an on-demand user located in a channel (also referred to as a virtual space or a virtual room) of an anchor user can interact with the anchor user. The maintenance of the online listing is particularly important if the anchor or on-demand user in the channel can be aware of all members entering the channel through the online listing. When the anchor user creates a channel or the on-demand user enters the channel, the server may determine that the user is in an online state; after the anchor user or the on-demand user sends an exit request to the server, the server may determine that the user is offline. However, when the user exits abnormally due to network failure or power failure and other factors, the server considers that the user is in the online state, and the client identifier of the user still exists in the online list, so that other members in the channel consider that the user is still in the online state, and the running state of the user cannot be accurately identified, so that the accuracy of online state identification is low.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a state determining method and a server, which can accurately identify an operating state of a client and improve accuracy of online state identification.
In order to solve the above technical problem, an embodiment of the present invention provides a state determining method, where the method includes:
acquiring a client identifier of a client with an operation state marked as an online state in an online database;
when online state notification information sent by a client corresponding to the client identifier is received within a preset time period, determining that the current operation state of the client is an online state;
and when the online state notification information sent by the client is not received within the preset time period, determining that the current operation state of the client is an offline state.
Correspondingly, an embodiment of the present invention further provides a server, where the server includes:
the identification acquisition module is used for acquiring the client identification of the client with the running state marked as the online state in the online database;
the online state determining module is used for determining that the current operation state of the client is the online state when online state notification information sent by the client corresponding to the client identifier is received within a preset time period;
and the offline state determining module is used for determining that the current running state of the client is an offline state when the online state notification information sent by the client is not received in the preset time period.
By implementing the embodiment of the invention, the client terminal identification of the client terminal with the running state marked as the on-line state in the on-line database is obtained, when the on-line state notification information sent by the client terminal corresponding to the client terminal identification is received in the preset time period, the current running state of the client terminal is determined to be the on-line state, and when the on-line state notification information sent by the client terminal is not received in the preset time period, the current running state of the client terminal is determined to be the off-line state, so that the running state of the client terminal can be accurately identified, and the accuracy of on-line state identification is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts;
fig. 1 is a schematic structural diagram of a state determination system provided in an embodiment of the present invention;
fig. 2 is a schematic flow chart of a state determination method provided in an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a server provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server provided in another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a state determination method, wherein a server acquires a client terminal identification of a client terminal of which the running state is marked as an online state in an online database, determines that the current running state of the client terminal is the online state when online state notification information sent by the client terminal corresponding to the client terminal identification is received in a preset time period, and determines that the current running state of the client terminal is the offline state when the online state notification information sent by the client terminal is not received in the preset time period. Compared with the conventional state determination method, the current operation state of the client is determined to be the online state when a login request sent by the client is received, the current operation state of the client is determined to be the offline state when a quit request sent by the client is received, and the server determines that the current operation state of the client is the online state when the quit request sent by the client is not received by the server due to network failure or power failure and other factors, but the client cannot send online state notification information to the server when the client abnormally quits due to network failure or power failure and other factors in the embodiment of the invention, so that when the server does not receive the online state notification information sent by the client within a preset time period, the current operation state of the client is determined to be the offline state, and the operation state of the client can be accurately identified, and the accuracy of online state identification is improved.
Based on the foregoing principle, an embodiment of the present invention provides a state determination system, which may be an internet application system such as an instant messaging application system, an SNS (Social Networking Services) application system, and the like. Referring to fig. 1, the architecture of the state determination system includes at least: a server 101 and at least one client 102 accessing said server 101.
The client 102 may operate in a terminal such as a notebook computer, a mobile phone, a PAD (tablet computer), a vehicle-mounted terminal, or a smart wearable device, and the client 102 may include an instant messaging client (e.g., a WeChat client or a QQ client), a live broadcast client (e.g., a pattern live broadcast client), or a video playing client (e.g., a Tencent video client). At least one type of internet application may be run in the terminal, including but not limited to: instant messaging applications, SNS applications, and the like. The user can use internet applications through the terminal, such as: a user can submit a social message in a live broadcast room through a terminal; or, the user may interact with other users in the internet application through the terminal, for example, the user uses instant messaging applications such as WeChat or QQ through the terminal, displays a session interface with other users, and the user may input social messages in the session interface; and so on. The server 101 may be an independent service device in the internet, or a cluster service device formed by multiple independent service devices in the internet; the server 101 may be used to handle various requirements of the internet application in the process of implementing functions such as data configuration and information interaction, and the server 101 may be used to manage related data of users in the internet application and interaction messages between users, for example, maintain an online database.
At least one client 102 accessing to the server 101 may belong to the same social relationship cluster, and each client in the social relationship cluster may share data such as text messages, files, voice or video with each other, the social relationship cluster is often established by a small group having commonalities, and group members generally have close connections, for example, the social relationship cluster may be a virtual group established based on a certain common hobby, interest or demand, such as a "shopping group", a "travel group", a "stock group" or a "song star live broadcast room", or a virtual group established based on a certain real group, such as a "peer group", or a "peer group".
The online database may include a client identifier of a client in the social relationship cluster, the client having an online operation status, and may be used to prompt the group members to specify the operation status of the user.
Based on the schematic structural diagram of the state determination system shown in fig. 1, the embodiment of the invention discloses a schematic flow diagram of the state determination method shown in fig. 2. As shown in fig. 2, the state determination method may include the steps of:
s201, acquiring a client identifier of a client with an operation state marked as an online state in an online database.
The server may obtain a client identification of the client whose running state is marked as online in the online database. The client identifier may be used to uniquely identify the client, for example, a login account of the user, an Internet Protocol (IP) address of an interconnection between networks of the client, a Media Access Control (MAC) address, or an International Mobile Equipment Identity (IMEI).
In a specific implementation, different social relationship clusters may correspond to different online databases, the online databases may be online lists, each online list may include a client identifier of at least one client, and the running state of each client identifier in the online lists corresponding to the client is marked as an online state, for example, after a user sends a login request to a server through a client, the server may determine that the current running state of the client is an online state, and store the client identifier of the client in the online list; when the client actively exits from the social relationship cluster to which the client belongs or abnormally exits due to network failure or the like, the server may determine that the current operation state of the client is an offline state, and delete the client identifier of the client in the online list. In order to accurately identify the operating state of the client, the server needs to identify the operating state of the client in the online list at regular time, so as to update the current operating state of the client, and the server can obtain the client identifier of the client in the online database.
S202, when online state notification information sent by the client corresponding to the client identifier is received within a preset time period, determining that the current operation state of the client is an online state.
After the server acquires the client identifier of the client with the running state marked as the online state in the online database, whether online state notification information sent by the client corresponding to the client identifier is received in a preset time period can be judged, and when the online state notification information sent by the client is received in the preset time period, the server can determine that the current running state of the client is the online state. The presence notification information may be null data or data with a data size greater than zero, and is not limited by the embodiment of the present invention.
In the specific implementation, a user can input information such as a login account and the like through a client to establish communication connection with a server, the operating state of the client is an online state, the client can regularly send online state notification information to the server through the communication connection with the server, and when the server receives the online state notification information sent by the client in a preset time period, the current operating state of the client can be determined to be the online state; if the client actively quits the social relationship cluster to which the client belongs or the client abnormally quits due to network faults and the like, the communication connection between the client and the server is disconnected, the client cannot send online state notification information to the server, and the server can determine that the current operation state of the client is an offline state when not receiving the online state notification information sent by the client within a preset time period.
Optionally, the server may obtain a client type of the client, determine a first time period corresponding to the first type when the client type of the client is the first type, and determine that the current operating state of the client is an online state when online state notification information sent by the client is received in the first time period. The client types may include a first type and a second type, for example, the first type is an anchor user, the second type is an on-demand user, it should be noted that the types of the client types in the embodiment of the present invention include but are not limited to two types, and the types of the client types may be at least three types, for example, the types of the client include a first type, a second type, and a third type, the first type is a group owner, the second type is an administrator, the third type is a common user, and the like, which are not limited by the embodiment of the present invention specifically.
For example, if the first type is a main broadcasting user, the server obtains a client identifier of a client whose running state is marked as an online state in the online database, the client type of the client corresponding to the client identifier is the main broadcasting user, and because the main broadcasting user has more interaction with other users and the real-time requirement for the running state identification is higher, the sending frequency of the online state notification information sent by the main broadcasting user configured by the server can be higher than the sending frequency of the online state notification information sent by the on-demand user. For example, the server may configure the time period corresponding to the anchor user as 20s, if the server stores the client identifier of the client in the online database after the client sends the login request to the server, and the client type of the client is the anchor user, and after the server establishes a communication connection with the client, the server may configure the sending period of the client as 10s and send the sending period to the client, the client may send the online status notification information to the server once every 10s, the server determines whether the online status notification information sent by the client is received within the time period of 20s from the last time the online status notification information sent by the client is received, and when the server receives the online status notification information sent by the client within the time period of 20s from the last time the online status notification information sent by the client is received, the server may determine that the current operating state of the client is an online state.
Optionally, the online database may further include a client type of the client corresponding to each client identifier, and after the server obtains the client identifier in the online database, the server may determine the client type of the client corresponding to the client identifier, and determine whether the online state notification information sent by the client is received in a time period corresponding to the client type, and when the online state notification information sent by the client is received in the time period corresponding to the client type, the server may determine that the current operating state of the client is an online state; when online state notification information sent by the client is not received in a time period corresponding to the type of the client, the server may determine that the current operation state of the client is an offline state.
Optionally, when the server receives the online state notification information sent by the client, the online state notification information may carry a client type, and the server may determine whether the online state notification information sent by the client is received in a time period corresponding to the client type, and when the online state notification information sent by the client is received in a time period corresponding to the client type, the server may determine that the current operation state of the client is an online state; when online state notification information sent by the client is not received in a time period corresponding to the type of the client, the server may determine that the current operation state of the client is an offline state.
S203, when the online state notification information sent by the client is not received in the preset time period, determining that the current operation state of the client is an offline state.
After the server obtains the client identifier of the client with the running state marked as the online state in the online database, whether online state notification information sent by the client corresponding to the client identifier is received in a preset time period can be judged, and when the online state notification information sent by the client is not received in the preset time period, the server can determine that the current running state of the client is the offline state.
Optionally, the server may obtain the client type of the client, determine a second time period corresponding to the second type when the client type of the client is the second type, and determine that the current operating state of the client is an offline state when online state notification information sent by the client is not received in the second time period.
For example, if the second type is an on-demand user, the server obtains a client identifier of a client whose running state is marked as an on-line state in the on-line database, where the client type of the client corresponding to the client identifier is the on-demand user, and because the interaction between the on-demand user and other users is less and the real-time requirement for running state identification is lower, the sending frequency of the on-demand user configured by the server to send the on-line state notification information may be lower than the sending frequency of the anchor user to send the on-line state notification information. For example, the server may configure a time period corresponding to the on-demand user as 30s, if the client sends a login request to the server, the server stores a client identifier of the client in an online database, and the client type of the client is the on-demand user, and when the server establishes a communication connection with the client and does not receive online state notification information sent by the client within the time period of 30s, the server may determine that a current operation state of the client is an offline state; if the server receives the presence notification information sent by the client last time, the server may determine that the current operation state of the client is an offline state when the server does not receive the presence notification information sent by the client within a time period of 30 seconds from the last time the server receives the presence notification information sent by the client.
Optionally, after determining that the current operation state of the client is the offline state, the server may delete the client identifier in the online database. In a specific implementation, when the server does not receive the online state notification information sent by the client within a preset time period, it may determine that the current operating state of the client is an offline state, and delete the client identifier in the online database, so as to ensure that the current operating states of the clients corresponding to the client identifiers in the online database are all online states.
Optionally, when detecting the time interval submitted to the client, the server may generate sending period update information, where the sending period update information may carry the time interval, and the server may send the sending period update information to the client, so that the client feeds back the online state notification information with the time interval as the sending period.
In a specific implementation, when the server load is high, the server may generate a time interval to the client, further generate sending period update information, and send the sending period update information to the client. For example, the sending period of the client corresponding to the first type is 10s, the sending period of the client corresponding to the second type is 30s, and since the current load of the server is high, in order to improve the utilization rate of system resources, the server may increase the time interval corresponding to different client types, for example, the time interval corresponding to the first type is adjusted to 30s, and the time interval corresponding to the second type is adjusted to 60s, that is, the server generates the time interval for the client of which the client type is the first type, wherein the time interval is 30s, generates sending period update information, and sends the sending period update information to the client, so that the client sends online status notification information once every 30 s; the server may further generate a time interval for the client having the second type of client type, wherein the time interval is 60s, and generate transmission cycle update information, and transmit the transmission cycle update information to the client, so that the client transmits the presence notification information once every 60 s.
Optionally, after the server sends the sending period update information to the client, the server may update the preset time period to obtain an updated time period, and when the online state notification information sent by the client is received before the updated time period since the online state notification information is received last time, the server may determine that the current operating state of the client is an online state; when the online status notification information sent by the client is not received after the updated time period since the online status notification information was received last time, the server may determine that the current operation state of the client is an offline state. The updated time period may be greater than the time interval submitted to the client, that is, the determination period for the server to determine whether the online status notification information sent by the client is received is greater than the sending period for the client to send the online status notification information, for example, the determination period may be two sending periods, and for example, when the sending period is 30s, the determination period may be 60 s.
For example, if the time interval carried by the sending period update information is 30s, the client sends the online status notification information every 10s to update the online status notification information every 30s, before the server sends the sending period update information to the client, the server determines the current operating status of the client by judging whether the online status notification information sent by the client is received or not every 20s, since the updated time period is 60s, after the server sends the sending period update information to the client, the server can judge whether the online state notification information sent by the client is received within a time period of 60s since the online state notification information sent by the first type of client is received last time, and if so, the current operation state of the client is determined to be the online state; if not, determining that the current running state of the client is an offline state.
For another example, if the time interval carried by the sending period update information is 60s, the client sends the online state notification information every 30s to update the online state notification information every 60s, before the server sends the sending period update information to the second type of client, the server determines the current operating state of the client by judging whether the online state notification information sent by the client is received or not every 60s, since the updated time period is 120s, after the server sends the sending period update information to the client, the server can judge whether the online state notification information sent by the client is received within a time period of 120s since the online state notification information sent by the first type of client is received last time, and if so, the current operation state of the client is determined to be the online state; if not, determining that the current running state of the client is an offline state.
In the embodiment of the invention, the server acquires the client terminal identification of the client terminal with the running state marked as the on-line state in the on-line database, determines that the current running state of the client terminal is the on-line state when the on-line state notification information sent by the client terminal corresponding to the client terminal identification is received in the preset time period, and determines that the current running state of the client terminal is the off-line state when the on-line state notification information sent by the client terminal is not received in the preset time period, so that the running state of the client terminal can be accurately identified, and the accuracy of on-line state identification is improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a server provided in an embodiment of the present invention, where the server may be used to implement part or all of the steps in the method embodiment shown in fig. 2, and as shown in the drawing, the server in this embodiment may at least include an identifier obtaining module 301, an online status determining module 302, and an offline status determining module 303, where:
the identifier obtaining module 301 is configured to obtain a client identifier of a client whose running state is marked as an online state in an online database.
The online status determining module 302 is configured to determine that a current operation status of the client is an online status when online status notification information sent by the client corresponding to the client identifier is received within a preset time period.
An offline state determining module 303, configured to determine that the current operation state of the client is an offline state when the online state notification information sent by the client is not received within the preset time period.
Optionally, the online status determining module 302 is specifically configured to:
and acquiring the client type of the client.
When the client type of the client is a first type, determining a first time period corresponding to the first type.
And when the online state notification information sent by the client is received in the first time period, determining that the current operation state of the client is an online state.
Optionally, the server in the embodiment of the present invention may further include:
an identifier deleting module 304, configured to delete the client identifier in the online database after the offline state determining module 303 determines that the current operation state of the client is an offline state.
Optionally, the server in the embodiment of the present invention may further include:
an update information generating module 305, configured to generate sending cycle update information when a time interval submitted to the client is detected, where the sending cycle update information carries the time interval.
An update information sending module 306, configured to send the sending period update information to the client, so that the client feeds back the online status notification information with the time interval as a sending period.
Optionally, the server in the embodiment of the present invention may further include:
the updating module 307 is configured to update the preset time period after the update information sending module 306 sends the sending cycle update information to the client, so as to obtain an updated time period.
The presence determining module 302 is further configured to determine that the current operation state of the client is a presence state when the presence notification information sent by the client is received before the updated time period elapses since the presence notification information was last received.
The offline state determining module 303 is further configured to determine that the current operation state of the client is an offline state when the online state notification information sent by the client is not received after the updated time period since the online state notification information was last received.
In the embodiment of the present invention, the identifier obtaining module 301 obtains the client identifier of the client whose running state is marked as the online state in the online database, when online state notification information sent by the client corresponding to the client identifier is received within a preset time period, the online state determining module 302 determines that the current running state of the client is the online state, and when online state notification information sent by the client is not received within the preset time period, the offline state determining module 303 determines that the current running state of the client is the offline state, which can accurately identify the running state of the client, and improve the accuracy of online state identification.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a server according to another embodiment of the present invention, where the server according to the embodiment of the present invention may be used to implement the method according to the embodiment of the present invention shown in fig. 2, and for convenience of description, only the part related to the embodiment of the present invention is shown, and details of the specific technology are not disclosed, please refer to the embodiment of the present invention shown in fig. 2.
As shown in fig. 4, the server includes: at least one processor 401, such as a CPU, at least one input device 403, at least one output device 404, memory 405, at least one communication bus 402. Wherein a communication bus 402 is used to enable connective communication between these components. The input device 403 may specifically be a network interface, and is configured to receive presence notification information sent by the client. The output device 404 may be specifically a network interface, and is configured to send the transmission cycle update information to the client. The memory 405 may include a high-speed RAM memory, and may further include a non-volatile memory, such as at least one disk memory, specifically for storing a web page including a preset user interface. The memory 405 may optionally include at least one memory device located remotely from the processor 401 as previously described. A set of program codes is stored in the memory 405, and the processor 401, the input device 403, and the output device 404 call the program codes stored in the memory 405 for performing the following operations:
processor 401 obtains the client id of the client whose running status is marked as online status in the online database.
When the input device 403 receives the online status notification information sent by the client corresponding to the client identifier within a preset time period, the processor 401 determines that the current operating status of the client is online.
When the input device 403 does not receive the online status notification information sent by the client within the preset time period, the processor determines that the current operation status of the client is an offline status.
Optionally, when the input device 403 receives online status notification information sent by a client corresponding to the client identifier within a preset time period, the processor 401 determines that the current operating status of the client is an online status, which may specifically be:
the processor 401 obtains the client type of the client.
When the client type of the client is a first type, the processor 401 determines a first time period corresponding to the first type.
When the input device 403 receives the presence notification information sent by the client within the first time period, the processor 401 determines that the current operation state of the client is a presence state.
Optionally, after the processor 401 determines that the current operation state of the client is an offline state when the input device 403 does not receive the online state notification information sent by the client within the preset time period, the following operations are further performed:
processor 401 deletes the client identification in the online database.
Optionally, the processor 401 may further perform the following operations:
when the time interval submitted to the client is detected, the processor 401 generates sending cycle update information, where the sending cycle update information carries the time interval.
The output device 404 sends the sending period update information to the client, so that the client feeds back the online status notification information with the time interval as the sending period.
Optionally, after the output device 404 sends the sending period update information to the client, the following operations may be further performed:
and updating the preset time period to obtain an updated time period.
When the input device 403 receives the presence notification information sent by the client before the updated time period elapses since the presence notification information was last received, the processor 401 determines that the current operating state of the client is a presence state;
when the input device 403 does not receive the presence notification information sent by the client after the updated time period since the presence notification information was last received, the processor 401 determines that the current operating state of the client is an offline state.
Specifically, the server described in the embodiment of the present invention may be used to implement part or all of the flow in the embodiment of the method described in conjunction with fig. 2 of the present invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (6)

1. A method of state determination, the method comprising:
acquiring a client identifier of a client with an operation state marked as an online state in an online database;
acquiring the client type of the client corresponding to the client identification in the online database;
when the client type of the client is a first type, determining a first time period corresponding to the first type, wherein the first type is a main broadcasting user;
when online state notification information sent by a client corresponding to the client identifier is received within the first time period, determining that the current operation state of the client is an online state;
when the client type of the client is a second type, determining a second time period corresponding to the second type, and when online state notification information sent by the client is not received in the second time period, determining that the current operation state of the client is an offline state, and deleting the client identifier in the online database, wherein the second type is an on-demand user, and the second time period is greater than the first time period;
when the server load is higher than a preset threshold value, generating a time interval for the client;
generating sending cycle updating information when a time interval submitted to the client is detected, wherein the sending cycle updating information carries the time interval;
sending the sending period updating information to the client so that the client feeds back the online state notification information by taking the time interval as a sending period;
updating the first time period to obtain an updated time period, wherein the updated time period is greater than a time interval submitted to the client;
when the online state notification information sent by the client is received before the updated time period since the online state notification information is received last time, determining that the current operation state of the client is an online state;
and when the online state notification information sent by the client is not received after the updated time period since the online state notification information is received last time, determining that the current operation state of the client is an offline state.
2. The method of claim 1, wherein when the client type of the client is a first type, after determining the first time period corresponding to the first type, further comprising:
and when the online state notification information sent by the client is not received in the first time period, determining that the current operation state of the client is an offline state.
3. The method of claim 2, wherein after determining that the current operation state of the client is an offline state when the online state notification information sent by the client is not received within the first time period, the method further comprises:
and deleting the client identification in the online database.
4. A server, characterized in that the server comprises:
the identification acquisition module is used for acquiring the client identification of the client with the running state marked as the online state in the online database;
the online state determining module is used for acquiring the client type of the client corresponding to the client identifier in the online database, determining a first time period corresponding to the first type when the client type of the client is the first type, and determining the current running state of the client to be an online state when online state notification information sent by the client corresponding to the client identifier is received in the first time period, wherein the first type is a main broadcast user;
an offline state determining module, configured to obtain a client type of the client corresponding to the client identifier in the online database, determine a second time period corresponding to the second type when the client type of the client is the second type, and determine that a current operating state of the client is an offline state when online state notification information sent by the client is not received within the second time period, where the second type is an on-demand user, and the second time period is greater than the first time period;
the identifier deleting module is used for deleting the client identifier in the online database after the offline state determining module determines that the current operation state of the client is the offline state;
the update information generation module is used for generating a time interval for the client when the load of the server is higher than a preset threshold value, and generating sending cycle update information when the time interval submitted to the client is detected, wherein the sending cycle update information carries the time interval;
the update information sending module is used for sending the sending period update information to the client so that the client feeds back the online state notification information by taking the time interval as a sending period;
the updating module is used for updating the first time period to obtain an updated time period after the updating information sending module sends the sending cycle updating information to the client, wherein the updated time period is greater than the time interval submitted to the client;
the online state determining module is further configured to determine that the current operating state of the client is an online state when the online state notification information sent by the client is received before the updated time period since the online state notification information was last received;
the offline state determining module is further configured to determine that the current operating state of the client is an offline state when the online state notification information sent by the client is not received after the updated time period since the online state notification information was last received.
5. The server according to claim 4, wherein the offline state determining module is further configured to determine that the current operating state of the client is an offline state when the online state notification information sent by the client is not received within the first time period.
6. The server according to claim 5, wherein the identifier deleting module is further configured to delete the client identifier in the online database after the offline status determining module determines that the current operating status of the client is an offline status.
CN201610940867.4A 2016-10-24 2016-10-24 State notification method and server Active CN106411713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610940867.4A CN106411713B (en) 2016-10-24 2016-10-24 State notification method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610940867.4A CN106411713B (en) 2016-10-24 2016-10-24 State notification method and server

Publications (2)

Publication Number Publication Date
CN106411713A CN106411713A (en) 2017-02-15
CN106411713B true CN106411713B (en) 2020-06-05

Family

ID=58012685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610940867.4A Active CN106411713B (en) 2016-10-24 2016-10-24 State notification method and server

Country Status (1)

Country Link
CN (1) CN106411713B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106888384B (en) * 2017-03-23 2019-08-30 北京奇艺世纪科技有限公司 A kind of receiving handling method and device of offline message
CN107205157A (en) * 2017-05-17 2017-09-26 贵阳朗玛信息技术股份有限公司 Net cast method based on IPTV, apparatus and system
CN108632234B (en) * 2017-08-28 2019-11-12 视联动力信息技术股份有限公司 A kind of user login method and device
CN113301063B (en) * 2020-02-24 2023-02-28 中国移动通信集团上海有限公司 Method, device and equipment for determining equipment information of Internet of things and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552740A (en) * 2009-05-14 2009-10-07 腾讯科技(北京)有限公司 Instant communication system, clients, server and method for judging on-line state
CN102647314A (en) * 2012-05-16 2012-08-22 深圳市乐唯科技开发有限公司 Client side on-line state judgment method and system
CN103297323A (en) * 2013-05-02 2013-09-11 华为软件技术有限公司 Method and device for sending user states

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8612520B2 (en) * 2008-06-16 2013-12-17 Microsoft Corporation Online/offline proto link behavior and proto page conflict resolution
US9320968B1 (en) * 2011-05-24 2016-04-26 Zynga Inc. Online game with matching of different data types
CN103873895B (en) * 2012-12-14 2017-07-25 中国传媒大学 A kind of DVB/IPTV bimodulus interactive service protects system
US20150172340A1 (en) * 2013-01-11 2015-06-18 Telefonaktiebolaget L M Ericsson (Publ) Technique for Operating Client and Server Devices in a Broadcast Communication Network
JP6124965B2 (en) * 2015-09-03 2017-05-10 大都販売株式会社 server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552740A (en) * 2009-05-14 2009-10-07 腾讯科技(北京)有限公司 Instant communication system, clients, server and method for judging on-line state
CN102647314A (en) * 2012-05-16 2012-08-22 深圳市乐唯科技开发有限公司 Client side on-line state judgment method and system
CN103297323A (en) * 2013-05-02 2013-09-11 华为软件技术有限公司 Method and device for sending user states

Also Published As

Publication number Publication date
CN106411713A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
US10917297B2 (en) Application service configuration system
US10834031B2 (en) Information exchange method, client, and apparatus
CN107645529B (en) Heartbeat packet sending method and device
CN115408604A (en) Messaging platform for delivering real-time messages
CN108881354B (en) Push information storage method and device, server and computer storage medium
CN106411713B (en) State notification method and server
WO2021237433A1 (en) Message pushing method and apparatus, and electronic device and computer-readable medium
CN114024972B (en) Long connection communication method, system, device, equipment and storage medium
US10574782B2 (en) Method and server for generating contact relationship data in network communication system
US9282157B2 (en) Intermediary API for providing presence data to requesting clients
US11533226B2 (en) Application service configuration system
CN110198335A (en) Message synchronization method and device, electronic equipment and storage medium
CN111541555A (en) Group chat optimization method and related product
US10478731B2 (en) Method and apparatus for storing user data
CN111277544B (en) Communication method, system and related equipment
CN113382065A (en) File downloading method, device, system, equipment and storage medium
WO2014015525A1 (en) Method and device for querying for user online state
CN112953794B (en) Network detection method, device, equipment and storage medium of router
CN113132758B (en) Control method, device and computer program product of content distribution network
US9515970B2 (en) Techniques for auto-detecting positions in a multi-resource login control of instant messaging
CN108574622B (en) Instant message processing method and device based on XMPP
US8949445B2 (en) Optimizing electronic communication channels
CN111726280A (en) Instant message transmission method and device, electronic equipment and storage medium
CN110086706B (en) Method and system for joining a device-specific message group
CN110012438B (en) Method and system for joining a device-specific message group

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant