CN109428924B - Application online state maintenance method, access layer assembly, application system and equipment - Google Patents

Application online state maintenance method, access layer assembly, application system and equipment Download PDF

Info

Publication number
CN109428924B
CN109428924B CN201710757797.3A CN201710757797A CN109428924B CN 109428924 B CN109428924 B CN 109428924B CN 201710757797 A CN201710757797 A CN 201710757797A CN 109428924 B CN109428924 B CN 109428924B
Authority
CN
China
Prior art keywords
user
application
online state
layer component
identifier
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
CN201710757797.3A
Other languages
Chinese (zh)
Other versions
CN109428924A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710757797.3A priority Critical patent/CN109428924B/en
Publication of CN109428924A publication Critical patent/CN109428924A/en
Application granted granted Critical
Publication of CN109428924B publication Critical patent/CN109428924B/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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses an online state maintenance method of an application, an access layer component, an application system and equipment, wherein the method comprises the following steps: an access layer component of an application receives a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application; and the access layer component maintains the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing an application service layer of the application.

Description

Application online state maintenance method, access layer assembly, application system and equipment
Technical Field
The present application relates to the field of computer software technologies, and in particular, to an application online status maintenance method, an access layer component, and an application system.
Background
In existing large application systems, the online status of users of applications is typically maintained by an application service layer component. Because each online user needs to send a heartbeat-keeping request for maintaining the online state of the user every few seconds, for applications with a huge user group, such as vigorous, precious, QQ, etc., the online state maintenance traffic of the users of the application system is very large, and the instantaneous online state maintenance of the users can reach millions, tens of millions or hundreds of millions. Such a large amount of maintenance traffic requests the application service layer component of the application system to maintain the user online status through the access layer component of the application system, such as the API gateway, and needs to consume a certain amount of processing resources in the application system.
Disclosure of Invention
An object of the embodiments of the present application is to provide an application online status maintenance method, an access stratum component, an application system, and an application device, so as to improve the online status maintenance efficiency of a user in an application system, thereby saving processing resources of the application system to a certain extent and improving the processing efficiency of the application system.
In order to solve the above technical problem, the embodiment of the present application is implemented as follows:
in a first aspect, a method for maintaining an online status of an application user is provided, where the method includes:
an access layer component of an application receives a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
and the access layer component maintains the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application.
In a second aspect, an access stratum component of an application is proposed, the access stratum component comprising:
the receiving unit is used for receiving a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
and the maintenance unit is used for maintaining the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application.
In a third aspect, an electronic device is provided, which includes:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
and maintaining the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application.
In a fourth aspect, a computer-readable storage medium is presented, the computer-readable storage medium storing one or more programs that, when executed by an electronic device that includes a plurality of application programs, cause the electronic device to:
receiving a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
and maintaining the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application.
In a fifth aspect, an application system is proposed, comprising an application client, an application access layer component and an application service layer component, wherein,
the application client sends a user online state maintenance request to the application access layer component, wherein the user online state maintenance request carries a first user identifier of an application;
the application access layer component receives the user online state maintenance request, and maintains the online state of the user corresponding to the first user identifier in a cache corresponding to the application access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application.
In a sixth aspect, a method for maintaining an online status of an application is provided, where the method includes:
an access layer component receives an online state maintenance request of the application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
and the access layer component maintains the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request.
In a seventh aspect, an access stratum component of an application is provided, where the access stratum component includes:
the receiving unit is used for receiving an online state maintenance request of the application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
and the maintenance unit is used for maintaining the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request.
In an eighth aspect, an electronic device is provided, which includes:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving an online state maintenance request of the application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
and maintaining the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request.
In a ninth aspect, a computer-readable storage medium is presented, the computer-readable storage medium storing one or more programs that, when executed by an electronic device that includes a plurality of application programs, cause the electronic device to:
receiving an online state maintenance request of the application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
and maintaining the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request.
In a tenth aspect, an application system is proposed, comprising an application client, an application access layer component and an application service layer component, wherein,
the application client sends an online state maintenance request of the application to the application access layer component, wherein the online state maintenance request carries a first identifier of the application;
the application access layer component receives an online state maintenance request of the application sent by the application client, and maintains the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request.
According to the technical scheme provided by the embodiment of the application, the online state of the user is maintained through the access layer component in the application according to the user online state maintenance request of the application client, so that the online state maintenance of the user in the application system can be completed only by the next hop of equipment of the client.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be 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 described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a flow diagram of a method for user online status maintenance according to an embodiment of the present application.
FIG. 2 is a detailed flow diagram of maintaining user presence information based on maintaining heartbeat requests according to an embodiment of the present application.
FIG. 3 is a detailed flow diagram of maintaining user presence information based on a logoff request, according to an embodiment of the present application.
FIG. 4 is a detailed flowchart of maintaining user online status information according to a login request according to an embodiment of the present application.
FIG. 5 is a detailed flow diagram of maintaining user presence information based on heartbeat time according to an embodiment of the present application.
Fig. 6 is a specific flowchart of sending a downlink message/downlink notification by an application service layer according to an embodiment of the present application.
FIG. 7 is a specific flowchart of an embodiment of the present application for querying the online status of a user by the application service layer.
FIG. 8 is a specific flowchart of an embodiment of the present application for querying the user presence statistics by the application service layer.
Fig. 9 is a specific flowchart of sending an offline message by the application service layer according to an embodiment of the present application.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 11 is a schematic structural diagram of an access stratum assembly according to an embodiment of the present application.
Fig. 12 is a schematic structural diagram of an application system according to an embodiment of the present application.
FIG. 13 is a flow diagram of a method for applying online status maintenance according to an embodiment of the present application.
Fig. 14 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Fig. 15 is a schematic structural diagram of an access stratum assembly according to another embodiment of the present application.
Fig. 16 is a schematic structural diagram of an application system according to another embodiment of the present application.
Detailed Description
The embodiment of the application provides a user online state maintenance method and an application interface gateway.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
FIG. 1 is a flow diagram of a method for online status maintenance of an application user, according to an embodiment of the present application. The method of fig. 1 is performed by an access stratum component of an application. In the embodiment of the present application, the access layer component may be an API gateway or the like. The method of fig. 1 may include:
s102, an access layer component of the application receives a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application.
Of course, it should be understood that in the embodiment of the present application, the access stratum component of the application has established a long connection with the client of the application, or in other words, the method of step S102 is executed after the access stratum component of the application has established a long connection with the client of the application.
The type of long connection may include a variety. Specifically, in applications on the PC side, such as a laptop, desktop, etc., the long connection may be a socket connection; in applications of mobile terminals such as smartphones, tablet computers, etc., the long connection may also be a socket connection; in particular, when the application is a web application, i.e., the application is logged in web form, the long connection may be a web socket connection.
In the embodiment of the application, the access stratum component may receive a user online status maintenance request sent by a client through an established long connection between the access stratum component and the client.
And S104, the access layer component maintains the online state of the user corresponding to the first user identifier in the cache corresponding to the access layer component according to the user online state maintenance request.
Wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application.
It should be understood that in the embodiments of the present application, an application system may include a plurality of access stratum components, each of the plurality of access stratum components corresponding to a cache of the application system, the plurality of access stratum components sharing the cache. The cache may be a cache server or a cluster of cache servers. Taking a pay treasure as an example, an access layer of a pay treasure system comprises a plurality of API gateways, each API gateway corresponds to a cache server cluster, and the cache server cluster is used for storing the online state of a user logging in the pay treasure. The API gateway is an access layer component in the embodiments of the present application, and the cache server cluster is a cache in the embodiments of the present application.
It should be understood that in the embodiment of the present application, only the API gateway needs to maintain the presence information of the user, and the application service layer component of the application does not maintain the presence information of the user, nor caches the presence information of the user.
In the embodiment of the application, the access layer component of the application maintains the online state of the user according to the user online state maintenance request of the client of the application, so that the online state maintenance of the user in the application system can be completed only by the next hop of equipment of the client.
Optionally, as an embodiment, when the user online status maintenance request is a login request, step S102 is specifically implemented as: the access layer component receives a login request sent by the client, wherein the login request carries the first user identifier and the verification information;
wherein, step S104 is specifically implemented as: the access layer component requests the application service layer component to verify the validity of the first user identification and the verification information according to the login request; when the first user identifier and the verification information are valid, the access layer component stores the online state of the user corresponding to the first user identifier in the cache, wherein the online state of the user corresponding to the first user identifier is online.
It should be understood that in the embodiment of the present application, the verification information may be a password, or an electronic certificate (Credential) string, or a fingerprint of the user, or a facial feature map of the user, etc. The confidential string may be, for example, a random string sent by the application system to the smartphone or the mailbox. The facial feature map of the user is collected in the face-brushing login function of the payment treasure.
In the embodiment of the application, the access layer component can perform authentication in the application service layer according to the login request sent by the client, and store the online state of the user identifier corresponding to the login request in the cache after the user identifier and the authentication information are valid.
Further, in an embodiment of the present application, the method further includes: if the login verification result is that the first user identification and the verification information are valid, the access layer component marks the long connection as a logged-in state.
Optionally, as another embodiment, when the user online status maintenance request is a heartbeat maintaining request, step S104 is implemented specifically as: and the access layer component updates the heartbeat time in the online state of the user corresponding to the first user identifier in the cache according to the time for receiving the heartbeat keeping request or the timestamp carried by the heartbeat keeping request.
In the embodiment of the application, the heartbeat time of the online state of the user is maintained according to the heartbeat maintaining request, so that the access layer component can determine whether the heartbeat is overtime according to the heartbeat time, and further determine whether the user is online.
Optionally, as another embodiment, when the user online status maintenance request is a logout request, step S104 is implemented specifically as: and the access layer component deletes the online state data of the user corresponding to the first user identification in the cache according to the logout request.
In the embodiment of the application, the online state data of the corresponding user in the cache is deleted according to the logout request, so that the maintenance operation of the user can be responded in time, and the maintenance efficiency of the online state data of the user is improved.
Further, in an embodiment of the present application, the method further includes: and the access layer component sends a request for logging off the user corresponding to the first user identification to the application service layer component, and the access layer component closes the long connection with the client.
In the embodiment of the application, the corresponding long connection is closed according to the logout request, so that the memory resource of the access layer component can be released in time.
Optionally, as an embodiment, the method may further include: the access layer component monitors heartbeat time corresponding to the online state of each user in the cache; and if the time interval between the current time and the heartbeat time corresponding to the online state of the user corresponding to the second user identification is greater than the heartbeat period, deleting the online state data of the user corresponding to the second user identification in the cache, and closing the long connection corresponding to the second user identification.
It should be understood that the heartbeat period and heartbeat time are indicators used to gauge whether the heartbeat is timed out. The heartbeat time is typically before the current time. And if the time interval between the current time and the heartbeat time is greater than the heartbeat period, the heartbeat is overtime.
In the embodiment of the application, the online state data of the user which abnormally exits can be maintained in time by monitoring the heartbeat time of the online state of the user, deleting the corresponding online state data of the user in the cache after the heartbeat is overtime and closing the corresponding long connection in the access layer component.
Optionally, as an embodiment, the method may further include:
the access layer component receives a downlink message/downlink notification sent by the application service layer component, wherein the downlink message/downlink notification carries a third user identifier;
and if the memory of the access layer component has the long connection corresponding to the third user identifier, the access layer component sends the downlink message/downlink notification to the client corresponding to the third user identifier through the long connection corresponding to the third user identifier.
In the embodiment of the application, the access layer component judges whether the access layer has the corresponding long connection of the user according to the downlink message/downlink notification sent by the application service layer component, and sends the downlink message/downlink notification through the client corresponding to the user when the corresponding long connection exists, so that the action of judging whether the user is on line in the application system can be processed by the access layer component, and the processing resource consumption of the application service layer is reduced to a certain extent.
Optionally, as an embodiment, the method may further include:
the access layer component receives a downlink message/downlink notification sent by the application service layer component, wherein the downlink message/downlink notification carries a third user identifier;
and if the long connection corresponding to the third user identification does not exist in the memory of the access layer component, the access layer component feeds back the response message that the user corresponding to the third user identification is not online to the application service layer component.
In the embodiment of the application, the access layer component judges whether the access layer has the corresponding long connection of the user according to the downlink message/downlink notification sent by the application service layer component, and feeds back the response message of the user which is not online to the application service layer component when the corresponding long connection does not exist, so that the action of judging whether the user is online in the application system can be processed by the access layer component, and the processing resource consumption of the application service layer is reduced to a certain extent.
Optionally, as an embodiment, the method may further include: the access layer component receives a user online state query request sent by the application service layer component, wherein the user online state query request carries a fourth user identifier, the user online state query request is used for requesting to query the online state of a user corresponding to the fourth user identifier, and the application service layer component stores the corresponding relation between the user identifier and the access layer component; and if the memory of the access layer component has long connection corresponding to the fourth user identification, the access layer component feeds back a response message of the online user corresponding to the fourth user identification to the application service layer component.
It should be understood that, in the embodiment of the present application, the application service layer component may determine, according to a login request sent by the access layer component when the user logs in, a correspondence between the user identifier and the access layer component, or a correspondence between the user and the access layer component accessed by the user. When the application service layer component sends the user online state query request, the access layer component corresponding to the user identifier can be determined according to the corresponding relation between the user identifier and the access layer component, and the user online state query request is sent.
Or, optionally, as another embodiment, the method may further include: the access layer component receives a user online state query request sent by the application service layer component, wherein the user online state query request carries a fourth user identifier, the user online state query request is used for requesting to query the online state of a user corresponding to the fourth user identifier, and the application service layer component stores the corresponding relation between the user identifier and the access layer component; and if the long connection corresponding to the fourth user identification does not exist in the memory of the access layer component, the access layer component feeds back an offline response message of the user corresponding to the fourth user identification to the application service layer component.
Optionally, as an embodiment, the method may further include: the access layer component receives a user online state statistical request sent by the application service layer component, wherein the user online state statistical request is used for requesting to acquire statistical information of online state data of the user of the application; and the access layer component counts the online state data of the user of the application in the cache and feeds the online state data back to the application service layer component.
Optionally, as an embodiment, the method may further include: the access layer component receives an offline request sent by the application service layer component, the offline request carries a fifth user identifier, the offline request is used for kicking off a user offline corresponding to the fifth user identifier, and the application service layer component stores the corresponding relation between the user identifier and the access layer component; and if the long connection corresponding to the fifth user identification exists in the memory of the access layer component, deleting the online state data of the user corresponding to the fifth user identification in the cache, and sending an offline notification to the client corresponding to the fifth user identification through the long connection corresponding to the fourth user identification. Optionally, the method further comprises: and closing the long connection corresponding to the fourth user identification.
It should be understood that, in the embodiment of the present application, the application service layer component may determine, according to a login request sent by the access layer component when the user logs in, a correspondence between the user identifier and the access layer component, or a correspondence between the user and the access layer component accessed by the user. When the application service layer component sends the offline request, the access layer component corresponding to the user identifier can be determined according to the corresponding relation between the user identifier and the access layer component, and the offline request is sent.
The method of the embodiments of the present application will be further described with reference to specific embodiments.
FIG. 2 is a detailed flowchart of an embodiment of the present application for maintaining user online status information according to a login request. The method of fig. 2 may include:
the client sends a login request to the API gateway 201.
It should be understood that the login request also carries the user identification information of the application, and it is not assumed that the user identification information is the first user identification.
In the embodiment shown in fig. 2, the client may be a client including an SDK, such as an Android client or an apple client. Of course, it should be understood that, in a specific application, the client of the application may be a client on other terminal devices such as a PC or a tablet computer, besides the client in the mobile phone, and the embodiment of the present application does not limit this. In addition, the client may be a client opened through an app or an application program corresponding to the application, or a web client opened through a web page, and embodiments of the present application are not limited herein. The clients present in the embodiments shown in fig. 3-9 described below function identically to the clients of the embodiments of the present application.
In the embodiment of the present application, the API gateway is an access layer component in the embodiment shown in fig. 1 of the present application. The API gateway present in the embodiments shown in fig. 3-9 described below functions the same as the API gateway of the embodiments of the present application.
In the embodiment of the application, the login request may carry authentication information in addition to the first user identifier.
It should be understood that in the embodiment of the present application, the verification information may be a password, or an electronic certificate (Credential) string, or a fingerprint of the user, or a facial feature map of the user, etc. The confidential string may be, for example, a random string for verification sent by the application system to the smartphone or the mailbox, or the like. The face feature map of the user, for example, the face feature map of the user collected in the face-brushing login function of the payment instrument, and the like.
202, the API gateway sends a login authentication request to the application service layer.
In this embodiment, the application service layer is an application service layer component in the embodiment shown in fig. 1 of this application, and refers to a service device in an application system. The application service layers present in the embodiments shown in fig. 3-9 described below are functionally identical to the application service layers of the embodiments of the present application.
After receiving the login request sent by the client, the API gateway may send a login authentication request to the application service layer based on the login request, requesting to authenticate the validity of the first user identifier and the authentication information. The login authentication request may also carry the first user identifier and the authentication information.
And 203, feeding back the login verification result to the API gateway by the application service layer.
The application service layer can feed back the login authentication result to the API gateway based on the login authentication request. Of course, it should be understood that the application service layer may also determine, according to the login authentication request, after the authentication is successful, a corresponding relationship between the user identifier and the API gateway, or a corresponding relationship between the user and the API gateway to which the user accesses.
204, the API gateway adds the user presence information.
The API gateway may store presence information for users accessing the application service layer through the cache server. It should be understood that the cache server in the embodiment of the present application is the cache in the embodiment shown in fig. 1 of the present application, and the cache servers in the embodiments shown in fig. 3 to fig. 9 described below have the same functions as the cache server in the embodiment of the present application. Of course, it should be understood that, in a specific application, the cache in the embodiment shown in fig. 1 of the present application may also be a cache server cluster formed by a plurality of cache servers, and the like.
If the login verification result shows that the first user identification and the verification information are valid, the API gateway can add the online state information of the user corresponding to the first user identification on the cache server, mark the online state as online, and mark the heartbeat time of the online state information of the user corresponding to the first user identification.
In addition, the API gateway may also mark a long connection with the client as logged in.
Of course, it should be understood that if the login authentication result indicates that the first user identification and authentication information are invalid, the API gateway may feed back a prompt to the client for a login failure.
In the embodiment of the application, the verification is performed in the application service layer according to the login request sent by the client, and the online state of the user identifier corresponding to the login request is stored in the cache server after the user identifier and the verification information are valid, so that the possibility of realizing the subsequent online state maintenance work of the user is provided.
FIG. 3 is a detailed flow diagram of maintaining user presence information based on maintaining heartbeat requests according to an embodiment of the present application. The method of fig. 3 may include:
301, the client sends a keep heartbeat request to the API gateway.
It should be appreciated that the user identification information of the application is kept portable in the heartbeat request. It is not assumed that the subscriber identity information is the first subscriber identity.
In the embodiment of the application, the client terminal establishes a long connection with the API gateway and successfully logs in. After the client logs in, a heartbeat keeping request needs to be sent to the API gateway to keep the online state of the client. The client may send the keep-alive heartbeat request over a long connection with the API gateway.
It should be appreciated that, in general, the client may send the keep heartbeat request periodically, with the sending period not exceeding the heartbeat period. Of course, the client may also send the heartbeat keeping request at irregular time according to the network condition, and the time interval between two adjacent sending heartbeat keeping requests should be less than or equal to the heartbeat period.
The API gateway updates the user presence information 302.
After receiving the heartbeat keeping request, the API gateway may update the heartbeat time of the online state information of the user corresponding to the first user identifier in the cache server according to the time when the API gateway receives the heartbeat keeping request, or according to the timestamp carried in the heartbeat keeping request.
Of course, before maintaining the user online state information, the API gateway may further determine whether the heartbeat time of the user online state information corresponding to the first user identifier is overtime, and if not, update the heartbeat time.
In the embodiment of the application, the heartbeat time of the online state of the user is maintained according to the heartbeat maintaining request, so that the API gateway can determine whether the heartbeat is overtime according to the heartbeat time, and further determine whether the user is online.
FIG. 4 is a detailed flow diagram of maintaining user presence information based on a logoff request, according to an embodiment of the present application. The method of FIG. 4 may include:
401, the client sends a logout request to the API gateway.
It should be understood that the logout request also carries the user identification information of the application, and it is not assumed that the user identification information is the first user identification.
Similar to step 201, the client may also send the logoff request over a long connection with the API gateway.
402, the API gateway deletes the user presence information.
After receiving the logout request, the API gateway may delete the online status information of the user corresponding to the first user identifier from the cache server according to the logout request.
The API gateway sends a logout user notification to the application service layer 403.
After deleting the user online state information corresponding to the first user identifier, the API gateway may send a logout user notification to the application service layer, where the logout user notification carries the first user identifier and is used to notify the application service layer to logout the online state of the user corresponding to the first user identifier.
The API gateway closes the long connection with the client 404.
After deleting the user online state information corresponding to the first user identifier, the API gateway can also close the long connection with the client side, and timely release the resources of the API gateway.
In the embodiment of the application, the online state data of the corresponding user in the cache is deleted according to the logout request, so that the maintenance operation of the user can be responded in time, and the maintenance efficiency of the online state data of the user is improved.
FIG. 5 is a detailed flow diagram of maintaining user presence information based on heartbeat time according to an embodiment of the present application. The method of fig. 5 includes:
501, the API gateway monitors the heartbeat.
The API gateway may periodically monitor the heartbeat time of users accessed through the API gateway. The monitoring period can be less than the heartbeat period or equal to the heartbeat period.
It should be understood that, in the embodiment of the present application, the heartbeat cycle refers to the maximum time when the user online status information is valid. If the time interval between the heartbeat time of the user online state information and the current time is less than the heartbeat period, the heartbeat is not overtime; otherwise, if the time interval between the heartbeat time of the user online state information and the current time is greater than the heartbeat period, the heartbeat is overtime.
The API gateway can inquire whether the heartbeat of the user identifier corresponding to the long connection in the cache server is overtime or not according to the long connection existing in the memory.
The presence information of the user with the heartbeat timeout is deleted 502.
And the API gateway determines whether the user is overtime according to the heartbeat period and the heartbeat time of the user online state information. In this embodiment of the present application, it is not assumed that the user online status information corresponding to the second user identifier is overtime.
And after monitoring that the user online state information is overtime, the API gateway can delete the corresponding user online state information.
In this embodiment of the present application, the API gateway may delete the user online status information corresponding to the second user identifier in the cache server.
Of course, in a specific application, if the cache server records the user online status information with the database, the API gateway may directly delete the user online status information whose heartbeat time is greater than the heartbeat period from the current time interval by executing a deletion statement.
The API gateway sends a logout user notification to the application service layer 503.
In this embodiment of the application, the API gateway may further send a logout user notification to the application service layer, where the logout user notification carries the second user identifier and is used to notify the application service layer to logout the online state of the user corresponding to the second user identifier.
The API gateway closes the long connection with the client 504.
After sending the notification of the logged off user, the API gateway may close the long connection between the client corresponding to the second user identification.
In the embodiment of the application, the online state data of the user who abnormally quits can be timely maintained by monitoring the heartbeat time of the online state of the user, deleting the corresponding online state data of the user in the cache server after the heartbeat is overtime, and closing the corresponding long connection in the API gateway.
Fig. 6 is a specific flowchart of sending a downlink message/downlink notification by an application service layer according to an embodiment of the present application. The method of FIG. 6 may include:
601, the application service layer sends a downlink message/downlink notification to the API gateway.
The application service layer sends a downlink message/downlink notification to the API gateway to the specified user. The third user id is carried in the downlink message/downlink notification, assuming that the user id of the specified user is the third user id.
The API gateway sends a downlink message/downlink notification 602.
After receiving the downlink message/downlink notification, the API gateway may query whether a long connection corresponding to the third user identifier exists in the API gateway according to the third user identifier in the downlink message/downlink notification. If the user corresponding to the third user identifier accesses the application service layer through the API gateway and the heartbeat of the user online state information is not overtime, the API gateway can have long connection after the user logs in.
If the long connection corresponding to the third user identifier exists in the API gateway, the API gateway can send the downlink message/downlink notification to the client corresponding to the long connection through the long connection. The processing operation of the client receiving the downlink message/downlink notification may refer to the prior art.
Of course, it should be understood that if the long connection corresponding to the third user identifier does not exist in the API gateway, the API gateway may return a response message to the application service layer that the user is not online.
In the embodiment of the application, the API gateway judges whether the corresponding long connection of the user exists in the API gateway according to the downlink message/downlink notification sent by the application service layer, and sends the downlink message/downlink notification through the client corresponding to the user when the corresponding long connection exists, so that the action of judging whether the user is online in the application system can be processed in the access layer, and the processing resource consumption of the application service layer is reduced to a certain extent.
FIG. 7 is a specific flowchart of an embodiment of the present application for querying the online status of a user by the application service layer. The method of FIG. 7 includes:
701, the application service layer sends a user online status query request to the API gateway.
It should be understood that, when a user logs in, the application service layer may determine, based on the login authentication request, the correspondence between the user identifier and the API gateway, or the correspondence between the user and the API gateway to which the user has access, after the authentication is successful.
And the application service layer sends a user online state query request of a specified user to the API gateway. If the user identifier of the specified user is assumed to be the fourth user identifier, the user online status query request carries the fourth user identifier, and the user online status query request is used for requesting to query the online status of the user corresponding to the fourth user identifier.
The application service layer may determine an API gateway for the fourth subscriber identity and send the subscriber presence query request to the API gateway.
The API gateway sends 702 the user presence status to the application service layer.
After receiving the online status query request, the API gateway may query whether a long connection corresponding to the fourth user identifier exists in the API gateway according to the fourth user identifier in the online status query request.
If the long connection corresponding to the fourth user identifier exists in the API gateway, the API gateway can feed back an online response message of the user corresponding to the fourth user identifier to the application service layer;
if the long connection corresponding to the fourth user identifier does not exist in the API gateway, the API gateway may feed back, to the application service layer, a response message that the user corresponding to the fourth user identifier is not online.
FIG. 8 is a specific flowchart of an embodiment of the present application for querying the user presence statistics by the application service layer. The method of FIG. 8 includes:
the application service layer sends a user presence statistics request to the API gateway 801.
And the application service layer sends a user online state statistical request to the API gateway to request to acquire statistical information of online state data of the user of the application.
And 802, the API gateway counts the online state information of the user.
After receiving the online status statistics request, the API gateway may count the online status data of the user of the application in the cache server.
803, the API gateway feeds back the user online state statistical information to the application service layer.
After the API gateway finishes counting, the statistical information of the user online state data can be fed back to the application service layer.
Fig. 9 is a specific flowchart of sending an offline message by the application service layer according to an embodiment of the present application. The method of fig. 9 includes:
901, the application service layer sends a logoff request to the API gateway.
And the application service layer sends an offline request to the API gateway for the specified user. If the user identifier of the specified user is not assumed to be the fifth user identifier, the offline request carries the fifth user identifier, and is used for kicking the offline of the user corresponding to the fifth user identifier.
The API gateway deletes the user presence information 902.
After receiving the downlink request, the API gateway may delete the user online status information corresponding to the fifth user identifier from the cache server according to the fifth user identifier in the downlink request.
903, the API gateway sends a down notification.
The API gateway may send an offline notification to the client corresponding to the fifth user identifier through the long connection corresponding to the fifth user identifier according to the fifth user identifier in the downlink request, so as to notify the user that the client is offline.
The API gateway closes the long connection with the client 904.
After sending the down notification, the API gateway may close the long connection between the clients corresponding to the fifth user identification.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 10, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 10, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs the computer program to form the access layer component on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
receiving a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
and maintaining the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application.
The methods performed by the access stratum components or API gateways as disclosed in the embodiments of fig. 1-9 of the present application may be implemented in or by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It should be understood that in the embodiment of the present application, only the API gateway needs to maintain the presence information of the user, and the application service layer component of the application does not maintain the presence information of the user, nor caches the presence information of the user.
The electronic device may also execute the method in fig. 1, and implement the functions of the access layer component or the API gateway in the embodiments shown in fig. 1 to 9, which are not described herein again in this embodiment of the present application.
Of course, besides the software implementation, the electronic device of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, enable the portable electronic device to perform the method of the embodiment shown in fig. 1.
Fig. 11 is a schematic structural diagram of an access stratum assembly according to an embodiment of the present application. Referring to fig. 11, in one software implementation, the access stratum component may include:
a receiving unit 1110, configured to receive a user online status maintenance request of the application sent by a client of the application, where the user online status maintenance request carries a first user identifier of the application;
the maintaining unit 1120 is configured to maintain the online status of the user corresponding to the first user identifier in the cache corresponding to the access stratum component according to the user online status maintaining request, where the cache is used to store the online status of a specific user, and the specific user is a user accessing the application service stratum component of the application.
In the embodiment of the application, the access layer component of the application maintains the online state of the user according to the user online state maintenance request of the client of the application, so that the online state maintenance of the user in the application system can be completed only by the next hop of equipment of the client.
It should be understood that in the embodiment of the present application, only the API gateway needs to maintain the presence information of the user, and the application service layer component of the application does not maintain the presence information of the user, nor caches the presence information of the user.
Optionally, as an embodiment, when the user online status maintenance request is a login request, the receiving unit 1110 is specifically configured to: receiving a login request sent by the client, wherein the login request carries the first user identifier and the verification information;
wherein, the maintenance unit 1120 is specifically configured to: requesting the application service layer component to verify the validity of the first user identification and the verification information according to the login request; and when the first user identification and the verification information are valid, storing the online state of the user corresponding to the first user identification in the cache, wherein the online state of the user corresponding to the first user identification is online.
Further, in this embodiment, if the first user identifier and the verification information are valid, the maintenance unit 1120 is further configured to mark the long connection as a logged-in state.
Optionally, as another embodiment, when the user online status maintenance request is a heartbeat maintaining request, the maintenance unit 1110 is specifically configured to: and updating the heartbeat time in the online state of the user corresponding to the first user identifier in the cache according to the time for receiving the heartbeat keeping request or the timestamp carried by the heartbeat keeping request.
Optionally, as another embodiment, when the user online status maintenance request is a logout request, the maintenance unit 1110 is specifically configured to: and deleting the online state data of the user corresponding to the user identification in the cache according to the logout request.
Further, as shown in fig. 11, the access layer component may further include a sending unit 1130, where the sending unit 1130 may send a request to the application service layer component to log out the user corresponding to the user identifier; the maintenance unit 1120 also closes the long connection with the client.
Optionally, as shown in fig. 11, the access layer component may further include a monitoring unit 1140, which monitors a heartbeat time corresponding to an online state of each user in the cache; if the monitoring unit 1140 monitors that the time interval between the current time and the heartbeat time corresponding to the online status of the user corresponding to the second user identifier is greater than the heartbeat cycle, the maintenance unit 1120 further deletes the online status data of the user corresponding to the second user identifier in the cache, and closes the long connection corresponding to the second user identifier.
Optionally, the receiving unit 1110 further receives a downlink message/downlink notification sent by the application service layer component, where the downlink message/downlink notification carries a third user identifier; if the memory of the access stratum component has a long connection corresponding to the third user identifier, the sending unit 1130 further sends the downlink message/downlink notification to the client corresponding to the third user identifier through the long connection corresponding to the third user identifier; alternatively, if there is no long connection corresponding to the third user identifier in the memory of the access stratum component, the sending unit 1130 further feeds back, to the application service stratum component, a response message that the user corresponding to the third user identifier is not online.
Optionally, the receiving unit 1110 further receives a user online status query request sent by the application service layer component, where the user online status query request carries a fourth user identifier, the user online status query request is used to request to query an online status of a user corresponding to the fourth user identifier, and the application service layer component stores a corresponding relationship between the user identifier and the access layer component; if the memory of the access layer component has a long connection corresponding to the fourth user identifier, the sending unit 1130 further feeds back an online response message of the user corresponding to the fourth user identifier to the application service layer component; or, if there is no long connection corresponding to the fourth ue in the memory of the access stratum component, the sending unit 1130 further feeds back, to the application service stratum component, a response message that the user corresponding to the fourth ue is not online.
Optionally, as shown in fig. 11, the access layer component further includes a statistics unit 1150, and the receiving unit 1110 further receives a user online status statistics request sent by the application service layer component, where the user online status statistics request is used to request to obtain statistics information of online status data of a user in the application; the counting unit 1150 counts the online status data of the user of the application in the cache; the sending unit 1130 feeds back the presence data to the application service layer component.
Optionally, the receiving unit 1110 further receives an offline request sent by the application service layer component, where the offline request carries a fifth user identifier, the offline request is used to kick out that a user corresponding to the fifth user identifier is offline, and the application service layer component stores a corresponding relationship between the user identifier and the access layer component; if the memory of the access stratum component has a long connection corresponding to the fifth subscriber identity, the maintenance unit 1120 deletes the online status data of the user corresponding to the fifth subscriber identity from the cache, and the sending unit 1130 sends a down kick notification to the client corresponding to the fifth subscriber identity through the long connection corresponding to the fourth subscriber identity, and the maintenance unit 1120 further closes the long connection corresponding to the fourth subscriber identity.
Fig. 12 is a schematic structural diagram of an application system according to an embodiment of the present application. As shown in fig. 12, the application system includes an application client 1210, an application access layer component 1220, and an application service layer component 1230, wherein,
the application client 1210 sends a user online state maintenance request to the application access layer component 1220, where the user online state maintenance request carries a first user identifier of an application;
the application access layer component 1220 receives the user online status maintenance request, and maintains the online status of the user corresponding to the first user identifier in the cache corresponding to the application access layer component 1220 according to the user online status maintenance request, where the cache is used for storing the online status of the user of the application.
In the embodiment of the application, the application access layer component maintains the online state of the user according to the user online state maintenance request of the application client, so that the online state maintenance of the user in the application system can be completed only by the next hop of equipment of the client.
It should be understood that, in this embodiment of the application, the application client 1210 may further execute a method executed by the client in the embodiment shown in fig. 2 to 9, the application access layer component 1220 may further execute a method executed by the access layer component or the API network manager in the embodiment shown in fig. 1 to 9, and the application service layer component 1230 may further execute a method executed by the application service layer in the embodiment shown in fig. 2 to 9, which may refer to the embodiment shown in fig. 1 to 9 for specific implementation, and this embodiment of the application is not described herein again.
FIG. 13 is a flow diagram of a method for online status maintenance as applied by one embodiment of the present application. The method of fig. 13 is performed by an access stratum component of an application. In the embodiment of the present application, the access layer component may be an API gateway or the like. The method of FIG. 13 may include:
s1302, the access layer component receives an online status maintenance request of the application sent by the client, wherein the online status maintenance request carries the first identifier of the application.
It should be understood that in the embodiment of the present application, the access stratum component of the application has established a long connection with the client of the application, or in other words, the method of step S1302 is executed after the access stratum component of the application has established a long connection with the client of the application.
S1304, the access stratum component maintains the online status corresponding to the first identifier in the cache corresponding to the access stratum component according to the online status maintenance request.
Wherein the cache is used for storing the online state of the application.
It should be understood that in the embodiment of the present application, only the API gateway needs to maintain the presence information of the application, and the application service layer component of the application does not maintain the presence information of the application, nor caches the presence information of the application.
In the embodiment of the application, the access layer component of the application maintains the online state of the application according to the online state maintenance request of the application, so that the online state maintenance in the application system can be completed only by the next hop of equipment of the client.
Optionally, as an embodiment, when the online status maintenance request is a login request, step S1302 is specifically implemented as: the access layer component receives a login request sent by the client, wherein the login request carries the first identifier and the verification information;
wherein, step S1304 is specifically implemented as: the access layer component requests the application service layer component to verify the validity of the first identifier and the verification information according to the login request; when the first identifier and the verification information are valid, the access layer component stores the online state corresponding to the first identifier in the cache, wherein the online state corresponding to the first identifier is online.
It should be understood that in the embodiment of the present application, the verification information may be a password, or an electronic certificate (Credential) string, or a fingerprint of the user, or a facial feature map of the user, etc. The confidential string may be, for example, a random string sent by the application system to the smartphone or the mailbox. The facial feature map of the user is collected in the face-brushing login function of the payment treasure.
In this embodiment of the application, the access layer component may perform authentication in the application service layer according to a login request sent by the client, and store the online state of the first identifier corresponding to the login request in the cache after the first identifier and the authentication information are valid.
Further, in an embodiment of the present application, the method further includes: if the login verification result is that the first identification and the verification information are valid, the access layer component marks the long connection as a logged-in state.
Optionally, as another embodiment, when the online status maintenance request is a heartbeat maintaining request, step S1304 is specifically implemented as: and the access layer component updates the heartbeat time in the online state corresponding to the first identifier in the cache according to the time for receiving the heartbeat keeping request or the timestamp carried by the heartbeat keeping request.
In the embodiment of the application, the heartbeat time of the online state is maintained according to the heartbeat maintaining request, so that the access layer component can determine whether the heartbeat is overtime according to the heartbeat time, and determine whether the application is online.
Optionally, as another embodiment, when the online status maintenance request is a logout request, step S1304 is implemented specifically as: and the access layer component deletes the online state data corresponding to the first identifier in the cache according to the logout request.
In the embodiment of the application, the corresponding online state data in the cache is deleted according to the logout request, so that the maintenance operation of the application can be responded in time, and the maintenance efficiency of the online state data is improved.
Further, in an embodiment of the present application, the method further includes: and the access layer component sends a request for canceling the first identifier to the application service layer component, and closes the long connection with the client.
In the embodiment of the application, the corresponding long connection is closed according to the logout request, so that the memory resource of the access layer component can be released in time.
Optionally, as an embodiment, the method may further include: the access layer component monitors heartbeat time corresponding to each online state in the cache; and if the time interval between the current time and the heartbeat time corresponding to the online state corresponding to the second identifier is greater than the heartbeat period, deleting the online state data corresponding to the second identifier in the cache, and closing the long connection corresponding to the second identifier.
It should be understood that the heartbeat period and heartbeat time are indicators used to gauge whether the heartbeat is timed out. The heartbeat time is typically before the current time. And if the time interval between the current time and the heartbeat time is greater than the heartbeat period, the heartbeat is overtime.
In the embodiment of the application, the online state data of the abnormally quitted user can be maintained in time by monitoring the heartbeat time of the online state, deleting the corresponding online state in the cache after the heartbeat is overtime and closing the corresponding long connection in the access layer component.
Optionally, as an embodiment, the method may further include:
the access layer component receives a downlink message/downlink notification sent by the application service layer component, wherein the downlink message/downlink notification carries a third identifier;
and if the long connection corresponding to the third identifier exists in the memory of the access layer component, the access layer component sends the downlink message/downlink notification to the client corresponding to the third identifier through the long connection corresponding to the third identifier.
In the embodiment of the application, the access layer component judges whether the access layer has the corresponding long connection of the application according to the downlink message/downlink notification sent by the application service layer component, and sends the downlink message/downlink notification through the application client when the corresponding long connection exists, so that the action of judging whether the application is on line can be put into the access layer component for processing in the application system, and the processing resource consumption of the application service layer is reduced to a certain extent.
Optionally, as an embodiment, the method may further include:
the access layer component receives a downlink message/downlink notification sent by the application service layer component, wherein the downlink message/downlink notification carries a third identifier;
and if the long connection corresponding to the third identifier does not exist in the memory of the access layer component, the access layer component feeds back an offline response message of the application corresponding to the third identifier to the application service layer component.
In the embodiment of the application, the access layer component judges whether the access layer has the corresponding long connection of the application or not according to the downlink message/downlink notification sent by the application service layer component, and feeds back the response message of the user which is not online to the application service layer component when the corresponding long connection does not exist, so that the action of judging whether the user is online in the application system can be processed by the access layer component, and the processing resource consumption of the application service layer is reduced to a certain extent.
Optionally, as an embodiment, the method may further include: the access layer component receives an online state query request sent by the application service layer component, wherein the online state query request carries a fourth identifier, the online state query request is used for requesting to query the online state corresponding to the fourth identifier, and the application service layer component stores the corresponding relation between the identifier and the access layer component; and if the long connection corresponding to the fourth identifier exists in the memory of the access layer component, the access layer component feeds back an online application response message corresponding to the fourth identifier to the application service layer component.
It should be understood that, in the embodiment of the present application, the application service layer component may determine, according to a login request sent by the access layer component when the user logs in, a correspondence between the identifier and the access layer component, or a correspondence between the user and the access layer component accessed by the user. When the application service layer component sends the online state query request, the access layer component corresponding to the identifier can be determined according to the corresponding relation between the identifier and the access layer component, and the online state query request is sent.
Or, optionally, as another embodiment, the method may further include: the access layer component receives an online state query request sent by the application service layer component, wherein the online state query request carries a fourth identifier, the online state query request is used for requesting to query the online state corresponding to the fourth identifier, and the application service layer component stores the corresponding relation between the identifier and the access layer component; and if the long connection corresponding to the fourth identifier does not exist in the memory of the access layer component, the access layer component feeds back an offline response message of the application corresponding to the fourth identifier to the application service layer component.
Optionally, as an embodiment, the method may further include: the access layer component receives an online state statistical request sent by the application service layer component, wherein the online state statistical request is used for requesting to acquire statistical information of online state data of a user of the application; and the access layer component counts the online state data of the user of the application in the cache and feeds the online state data back to the application service layer component.
Optionally, as an embodiment, the method may further include: the access layer component receives an offline request sent by the application service layer component, the offline request carries a fifth identifier, the offline request is used for kicking an application offline corresponding to the fifth identifier, and the application service layer component stores the corresponding relation between the identifier and the access layer component; and if the long connection corresponding to the fifth identifier exists in the memory of the access layer component, deleting the online state data corresponding to the fifth identifier in the cache, and sending an offline-kicking notification to the application corresponding to the fifth identifier through the long connection corresponding to the fourth identifier. Optionally, the method further comprises: and closing the long connection corresponding to the fourth identification.
It should be understood that, in the embodiment of the present application, the application service layer component may determine, according to a login request sent by the access layer component when the user logs in, a correspondence between the identifier and the access layer component, or a correspondence between the application and the access layer component accessed by the application. When the application service layer component sends the offline request, the access layer component corresponding to the identifier can be determined according to the corresponding relation between the identifier and the access layer component, and the offline request is sent.
For specific implementation of the embodiments of the present application, reference may be made to functions of the access layer component or the API gateway in the embodiments shown in fig. 1 to 9, which are not described herein again.
Fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 14, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 14, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs the computer program to form the access layer component on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
receiving an online state maintenance request of an application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
and maintaining the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request.
The methods performed by the access stratum components or API gateways as disclosed in the embodiments of fig. 1-9 of the present application may be implemented in or by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It should be understood that in the embodiment of the present application, only the API gateway needs to maintain the presence information of the application, and the application service layer component of the application does not maintain the presence information of the application, nor caches the presence information of the application.
The electronic device may also execute the method in fig. 1, and implement the functions of the access layer component or the API gateway in the embodiments shown in fig. 1 to 9, which are not described herein again in this embodiment of the present application.
Of course, besides the software implementation, the electronic device of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, enable the portable electronic device to perform the method of the embodiment shown in fig. 1.
Fig. 15 is a schematic structural diagram of an access stratum assembly according to an embodiment of the present application. Referring to fig. 15, in one software implementation, the access stratum component may include:
a receiving unit 1510, configured to receive an online status maintenance request of an application sent by a client, where the online status maintenance request carries a first identifier of the application;
the maintaining unit 1520, according to the online status maintaining request, maintains the online status corresponding to the first identifier in the cache corresponding to the access stratum component. Wherein the cache is used for storing the online state of the application.
In the embodiment of the application, the access layer component of the application maintains the online state of the application according to the online state maintenance request of the client of the application, so that the online state maintenance of the application in the application system can be completed only by the next hop of equipment of the client.
It should be understood that in the embodiment of the present application, only the API gateway needs to maintain the presence information of the application, and the application service layer component of the application does not maintain the presence information of the application, nor caches the presence information of the application.
Optionally, as an embodiment, when the online status maintenance request is a login request, the receiving unit 1510 is specifically configured to: receiving a login request sent by the client, wherein the login request carries the first identifier and the verification information;
wherein, the maintenance unit 1520 is specifically configured to: requesting the application service layer component to verify the validity of the first identifier and the verification information according to the login request; and when the first identifier and the verification information are valid, storing the online state of the application corresponding to the first identifier in the cache, wherein the online state of the application corresponding to the first identifier is online.
Further, in this embodiment, if the first identifier and the verification information are valid, the maintenance unit 1520 is further configured to mark the long connection as logged in.
Optionally, as another embodiment, when the online status maintenance request is a heartbeat maintenance request, the maintenance unit 1510 is specifically configured to: and updating the heartbeat time in the online state of the application corresponding to the first identifier in the cache according to the time for receiving the heartbeat keeping request or the timestamp carried by the heartbeat keeping request.
Optionally, as another embodiment, when the online status maintenance request is a logout request, the maintenance unit 1510 is specifically configured to: and deleting the online state data of the application corresponding to the first identifier in the cache according to the logout request.
Further, as shown in fig. 15, the access layer component may further include a sending unit 1530, and the sending unit 1530 may send a request to the application service layer component to unregister the application corresponding to the first identifier; the maintenance unit 1520 also closes the long connection with the client.
Optionally, as shown in fig. 15, the access stratum component may further include a monitoring unit 1540 for monitoring the heartbeat time corresponding to each online state in the cache; if the monitoring unit 1540 monitors that the time interval between the current time and the heartbeat time corresponding to the online state of the application corresponding to the second identifier is greater than the heartbeat cycle, the maintenance unit 1520 further deletes the online state data of the application corresponding to the second identifier in the cache, and closes the long connection corresponding to the second identifier.
Optionally, the receiving unit 1510 further receives a downlink message/downlink notification sent by the application service layer component, where the downlink message/downlink notification carries the third identifier; if the long connection corresponding to the third identifier exists in the memory of the access stratum component, the sending unit 1530 also sends the downlink message/downlink notification to the client corresponding to the third identifier through the long connection corresponding to the third identifier; or, if there is no long connection corresponding to the third identifier in the memory of the access stratum component, the sending unit 1530 also feeds back, to the application service stratum component, a response message that the application corresponding to the third identifier is not online.
Optionally, the receiving unit 1510 further receives an online status query request sent by the application service layer component, where the online status query request carries a fourth identifier, the online status query request is used to request to query an online status of an application corresponding to the fourth identifier, and the application service layer component stores a corresponding relationship between the identifier and the access layer component; if the long connection corresponding to the fourth identifier exists in the memory of the access layer component, the sending unit 1530 also feeds back an online response message of the application corresponding to the fourth identifier to the application service layer component; or, if there is no long connection corresponding to the fourth identifier in the memory of the access stratum component, the sending unit 1530 also feeds back, to the application service stratum component, a response message that the application corresponding to the fourth identifier is not online.
Optionally, as shown in fig. 15, the access layer component further includes a statistics unit 1550, and the receiving unit 1510 further receives a presence statistics request sent by the application service layer component, where the presence statistics request is used to request to obtain statistics information of presence data of an application; the statistical unit 1550 counts the online status data applied in the cache; the sending unit 1530 feeds back the presence data to the application service layer component.
Optionally, the receiving unit 1510 further receives an offline request sent by the application service layer component, where the offline request carries a fifth identifier, the offline request is used to kick an application offline corresponding to the fifth identifier, and the application service layer component stores a corresponding relationship between the identifier and the access layer component; if there is a long connection corresponding to the fifth identifier in the memory of the access stratum component, the maintenance unit 1520 deletes the online status data of the application corresponding to the fifth identifier in the cache, and the sending unit 1530 sends a notification of the offline kicking to the client corresponding to the fifth identifier through the long connection corresponding to the fourth identifier, and the maintenance unit 1520 further closes the long connection corresponding to the fourth identifier.
Fig. 16 is a schematic structural diagram of an application system according to an embodiment of the present application. As shown in fig. 16, the application system includes an application client 1610, an application access layer component 1620, and an application service layer component 1630, wherein,
the application client 1610 sends an online status maintenance request to the application access layer component 1620, where the online status maintenance request carries a first identifier of an application;
the application access layer component 1620, receiving the online status maintenance request, and maintaining the online status of the application corresponding to the first identifier in the cache corresponding to the application access layer component 1620 according to the online status maintenance request, where the cache is used for storing the online status of the application.
In the embodiment of the application, the application access layer component maintains the online state of the application according to the online state maintenance request of the application, so that the online state maintenance of the application in the application system can be completed only by the next hop of equipment of the client.
It should be understood that, in this embodiment of the application, the application client 1610 may further execute a method executed by the client in the embodiment shown in fig. 2 to 9, the application access layer component 1620 may further execute a method executed by the access layer component or the API network manager in the embodiments shown in fig. 2 to 9 and 13, and the application service layer component 1630 may further execute a method executed by the application service layer in the embodiments shown in fig. 2 to 9, and specific implementation may refer to the embodiments shown in fig. 2 to 9 and 13, which is not described herein again in this embodiment of the application.
In short, the above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (19)

1. An online status maintenance method for an application user, comprising:
an access layer component of an application receives a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
the access layer component maintains the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application;
and the access layer component monitors the heartbeat time corresponding to the online state of each user in the cache, and if the time interval between the current time and the heartbeat time corresponding to the online state of the user corresponding to the second user identification is greater than the heartbeat period, deletes the online state data of the user corresponding to the second user identification in the cache, and closes the long connection corresponding to the second user identification.
2. The method of claim 1,
when the user online state maintenance request is a login request, an access layer component of the application receives the user online state maintenance request of the application sent by a client of the application, and the method comprises the following steps: the access layer component receives a login request sent by the client, wherein the login request carries the first user identification and the verification information;
wherein, the step of maintaining the online state of the user corresponding to the first user identifier in the cache corresponding to the access stratum component by the access stratum component according to the user online state maintenance request comprises: the access layer component requests the application service layer component to verify the validity of the first user identification and the verification information according to the login request; and when the first user identification and the verification information are valid, the access layer component stores the online state of the user corresponding to the first user identification in the cache, wherein the online state of the user corresponding to the first user identification is online.
3. The method of claim 2, wherein the method further comprises:
if the first user identification and the verification information are valid, the access stratum component marks a long connection between the access stratum component and the client as a logged-in state.
4. The method of claim 1,
when the user online state maintenance request is a request for maintaining heartbeat, the maintaining, by the access layer component, the online state of the user corresponding to the user identifier in the cache corresponding to the access layer component according to the user online state maintenance request includes:
and the access layer component updates the heartbeat time in the online state of the user corresponding to the first user identifier in the cache according to the time for receiving the heartbeat keeping request or the timestamp carried by the heartbeat keeping request.
5. The method of claim 1,
when the user online state maintenance request is a logout request, the access layer component maintains the online state of the user corresponding to the first user identifier in the cache corresponding to the access layer component according to the user online state maintenance request, wherein the step of maintaining the online state of the user corresponding to the first user identifier in the cache corresponding to the access layer component comprises the following steps: and the access layer component deletes the online state data of the user corresponding to the first user identification in the cache according to the logout request.
6. The method of claim 5, wherein the method further comprises:
the access layer component sends a request for logging off a user corresponding to the first user identification to the application service layer component;
the access stratum component closes the long connection with the client.
7. The method of any one of claims 1-6, further comprising:
the access layer component receives a downlink message/downlink notification sent by the application service layer component, wherein the downlink message/downlink notification carries a third user identifier;
if the memory of the access layer component has a long connection corresponding to the third user identifier, the access layer component sends the downlink message/downlink notification to the client corresponding to the third user identifier through the long connection corresponding to the third user identifier; or
And if the long connection corresponding to the third user identification does not exist in the memory of the access layer assembly, the access layer assembly feeds back the response message that the user corresponding to the third user identification is not online to the application service layer assembly.
8. The method of any one of claims 1-6, further comprising:
the access layer component receives a user online state query request sent by the application service layer component, wherein the user online state query request carries a fourth user identifier, the user online state query request is used for requesting to query the online state of a user corresponding to the fourth user identifier, and the application service layer component stores the corresponding relation between the user identifier and the access layer component;
if the long connection corresponding to the fourth user identifier exists in the memory of the access layer component, the access layer component feeds back a response message of the online user corresponding to the fourth user identifier to the application service layer component; or
And if the long connection corresponding to the fourth user identification does not exist in the memory of the access layer component, the access layer component feeds back an offline response message of the user corresponding to the fourth user identification to the application service layer component.
9. The method of any one of claims 1-6, further comprising:
the access layer component receives a user online state statistical request sent by the application service layer component, wherein the user online state statistical request is used for requesting to acquire statistical information of online state data of the user of the application;
and the access layer component counts the online state data of the user of the application in the cache and feeds the online state data back to the application service layer component.
10. The method of any one of claims 1-6, further comprising:
the access layer component receives an offline request sent by the application service layer component, wherein the offline request carries a fifth user identifier, the offline request is used for kicking off the offline user corresponding to the fifth user identifier, and the application service layer component stores the corresponding relation between the user identifier and the access layer component;
and if the long connection corresponding to the fifth user identification exists in the memory of the access layer component, deleting the online state data of the user corresponding to the fifth user identification in the cache, sending an offline-kicking notification to the client corresponding to the fifth user identification through the long connection corresponding to the fourth user identification, and closing the long connection corresponding to the fourth user identification.
11. An access stratum component of an application, comprising:
the receiving unit is used for receiving a user online state maintenance request of the application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
a maintenance unit, configured to maintain, according to the user online status maintenance request, an online status of a user corresponding to the first user identifier in a cache corresponding to the access stratum component, where the cache is used to store an online status of a specific user, and the specific user is a user accessing an application service stratum component of the application;
the monitoring unit is used for monitoring heartbeat time corresponding to the online state of each user in the cache;
and if the monitoring unit monitors that the time interval between the current time and the heartbeat time corresponding to the online state of the user corresponding to the second user identification is greater than the heartbeat period, the maintenance unit also deletes the online state data of the user corresponding to the second user identification in the cache, and closes the long connection corresponding to the second user identification.
12. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving a user online state maintenance request of an application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
maintaining the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component of the application according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application;
monitoring heartbeat time corresponding to the online state of each user in the cache;
and if the time interval between the current time and the heartbeat time corresponding to the online state of the user corresponding to the second user identification is greater than the heartbeat period, deleting the online state data of the user corresponding to the second user identification in the cache, and closing the long connection corresponding to the second user identification.
13. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
receiving a user online state maintenance request of an application sent by a client of the application, wherein the user online state maintenance request carries a first user identifier of the application;
maintaining the online state of the user corresponding to the first user identifier in a cache corresponding to the access layer component of the application according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application;
monitoring heartbeat time corresponding to the online state of each user in the cache;
and if the time interval between the current time and the heartbeat time corresponding to the online state of the user corresponding to the second user identification is greater than the heartbeat period, deleting the online state data of the user corresponding to the second user identification in the cache, and closing the long connection corresponding to the second user identification.
14. An application system comprising an application client, an application access layer component and an application service layer component, characterized in that,
the application client sends a user online state maintenance request to the application access layer component, wherein the user online state maintenance request carries a first user identifier of an application;
the application access layer component receives the user online state maintenance request and maintains the online state of the user corresponding to the first user identifier in a cache corresponding to the application access layer component according to the user online state maintenance request, wherein the cache is used for storing the online state of a specific user, and the specific user is a user accessing the application service layer component of the application;
and the application access layer component also monitors the heartbeat time corresponding to the online state of each user in the cache, and if the time interval between the current time and the heartbeat time corresponding to the online state of the user corresponding to the second user identifier is greater than a heartbeat period, deletes the online state data of the user corresponding to the second user identifier in the cache, and closes the long connection corresponding to the second user identifier.
15. An online status maintenance method for an application, comprising:
an access layer component receives an online state maintenance request of the application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
the access layer component maintains the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request;
and the access layer component monitors the heartbeat time corresponding to each online state in the cache, and if the time interval between the current time and the heartbeat time corresponding to the online state corresponding to the second identifier is greater than the heartbeat period, the online state data corresponding to the second identifier in the cache is deleted, and the long connection corresponding to the second identifier is closed.
16. An access stratum component of an application, comprising:
the receiving unit is used for receiving an online state maintenance request of the application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
the maintenance unit is used for maintaining the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request;
the monitoring unit is used for monitoring heartbeat time corresponding to each online state in the cache;
and if the monitoring unit monitors that the time interval between the current time and the heartbeat time corresponding to the online state of the application corresponding to the second identifier is greater than the heartbeat period, the maintenance unit also deletes the online state data of the application corresponding to the second identifier in the cache, and closes the long connection corresponding to the second identifier.
17. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving an online state maintenance request of an application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
maintaining the online state corresponding to the first identifier in a cache corresponding to the access layer component of the application according to the online state maintenance request;
monitoring heartbeat time corresponding to each online state in the cache;
and if the time interval between the current time and the heartbeat time corresponding to the online state corresponding to the second identifier is greater than the heartbeat period, deleting the online state data corresponding to the second identifier in the cache, and closing the long connection corresponding to the second identifier.
18. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
receiving an online state maintenance request of an application sent by a client, wherein the online state maintenance request carries a first identifier of the application;
maintaining the online state corresponding to the first identifier in a cache corresponding to the access layer component of the application according to the online state maintenance request;
monitoring heartbeat time corresponding to each online state in the cache;
and if the time interval between the current time and the heartbeat time corresponding to the online state corresponding to the second identifier is greater than the heartbeat period, deleting the online state data corresponding to the second identifier in the cache, and closing the long connection corresponding to the second identifier.
19. An application system comprising an application client, an application access layer component and an application service layer component, characterized in that,
the application client sends an online state maintenance request of an application to the application access layer component, wherein the online state maintenance request carries a first identifier of the application;
the application access layer component receives an online state maintenance request of the application sent by the application client, and maintains the online state corresponding to the first identifier in the cache corresponding to the access layer component according to the online state maintenance request;
and the application access layer component also monitors the heartbeat time corresponding to each online state in the cache, and if the time interval between the current time and the heartbeat time corresponding to the online state corresponding to the second identifier is greater than the heartbeat period, deletes the online state data corresponding to the second identifier in the cache and closes the long connection corresponding to the second identifier.
CN201710757797.3A 2017-08-29 2017-08-29 Application online state maintenance method, access layer assembly, application system and equipment Active CN109428924B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710757797.3A CN109428924B (en) 2017-08-29 2017-08-29 Application online state maintenance method, access layer assembly, application system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710757797.3A CN109428924B (en) 2017-08-29 2017-08-29 Application online state maintenance method, access layer assembly, application system and equipment

Publications (2)

Publication Number Publication Date
CN109428924A CN109428924A (en) 2019-03-05
CN109428924B true CN109428924B (en) 2021-07-13

Family

ID=65503624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710757797.3A Active CN109428924B (en) 2017-08-29 2017-08-29 Application online state maintenance method, access layer assembly, application system and equipment

Country Status (1)

Country Link
CN (1) CN109428924B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977117A (en) * 2019-03-18 2019-07-05 广州虎牙信息科技有限公司 The method and device that storage method, the data of status data are sent
CN113360783B (en) * 2021-06-21 2023-03-14 上海哔哩哔哩科技有限公司 User online list updating method and device and computer equipment
CN117222043A (en) * 2023-09-20 2023-12-12 广东保伦电子股份有限公司 Communication method between server and terminal based on intermediate medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217512A (en) * 2008-01-11 2008-07-09 腾讯科技(深圳)有限公司 A client-end state maintenance method, system, client-end and application server
CN102395119A (en) * 2011-11-15 2012-03-28 华为技术有限公司 Method for supporting permanent online of application client, system and apparatus thereof
CN103001860A (en) * 2012-12-20 2013-03-27 北京思特奇信息技术股份有限公司 Achieving system for converged communication Web instant messages
CN103297470A (en) * 2012-02-29 2013-09-11 中国移动通信集团公司 Method for processing always-online service, application server, user terminal and system
CN103312766A (en) * 2011-11-15 2013-09-18 华为技术有限公司 Method, system and device for supporting permanent online of application client
US8670387B2 (en) * 2006-02-28 2014-03-11 Apple, Inc. WiMAX R6 control architecture
CN105721227A (en) * 2016-04-14 2016-06-29 武汉斗鱼网络科技有限公司 Method and system for carrying out statistics to online durations of user and state server

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571817B (en) * 2012-02-15 2014-12-10 华为技术有限公司 Method and device for accessing application server
CN103546348A (en) * 2013-10-30 2014-01-29 上海斐讯数据通信技术有限公司 Method for detecting abnormal offline of authenticated user
CN104579753B (en) * 2014-12-15 2018-03-23 腾讯科技(深圳)有限公司 User data statistical method, access stratum server and statistical server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8670387B2 (en) * 2006-02-28 2014-03-11 Apple, Inc. WiMAX R6 control architecture
CN101217512A (en) * 2008-01-11 2008-07-09 腾讯科技(深圳)有限公司 A client-end state maintenance method, system, client-end and application server
CN102395119A (en) * 2011-11-15 2012-03-28 华为技术有限公司 Method for supporting permanent online of application client, system and apparatus thereof
CN103312766A (en) * 2011-11-15 2013-09-18 华为技术有限公司 Method, system and device for supporting permanent online of application client
CN103297470A (en) * 2012-02-29 2013-09-11 中国移动通信集团公司 Method for processing always-online service, application server, user terminal and system
CN103001860A (en) * 2012-12-20 2013-03-27 北京思特奇信息技术股份有限公司 Achieving system for converged communication Web instant messages
CN105721227A (en) * 2016-04-14 2016-06-29 武汉斗鱼网络科技有限公司 Method and system for carrying out statistics to online durations of user and state server

Also Published As

Publication number Publication date
CN109428924A (en) 2019-03-05

Similar Documents

Publication Publication Date Title
US10554655B2 (en) Method and system for verifying an account operation
US10965772B2 (en) Interface invocation method and apparatus for hybrid cloud
CN106101258B (en) Interface calling method, device and system of hybrid cloud
US9800573B1 (en) Authentication on a computing device
US20180324170A1 (en) Method and apparatus for allocating device identifiers
CN108632213B (en) Equipment information processing method and device
CN111031035B (en) Sensitive data access behavior monitoring method and device
CN108183950B (en) Method and device for establishing connection of network equipment
US9589122B2 (en) Operation processing method and device
CN109428924B (en) Application online state maintenance method, access layer assembly, application system and equipment
US20150142658A1 (en) Payment binding management method, payment server, client, and system
US9544317B2 (en) Identification of potential fraudulent website activity
US10567388B1 (en) Automatic account resource and policy decommissioning
US20210314156A1 (en) Authentication method, content delivery network cdn, and content server
CN106776917B (en) Method and device for acquiring resource file
US20170070861A1 (en) Subscriber location database
US11816249B2 (en) System and method for dynamic management of private data
KR20170095300A (en) Techniques for contextual mobile data access
CN108259207B (en) Traffic statistical method, client, server and system
WO2014152076A1 (en) Retry and snapshot enabled cross-platform synchronized communication queue
CN115694699A (en) Time delay parameter acquisition method and device, electronic equipment and storage medium
US9569433B1 (en) Mobile application analytics
KR102562178B1 (en) Prevention of data manipulation of communication network measurements and protection of user privacy
CN114741683A (en) Access information processing method and device, computer equipment and storage medium
CN115437605A (en) Business logic execution method, storage medium, electronic device and system

Legal Events

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